@mobielnl/elements 0.12.9 → 0.12.11
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 +4 -3
- package/dist/elements.umd.cjs +422 -108
- package/dist/{index-BomnOT_0.js → index-BaHMQzhD.js} +1 -1
- package/dist/{index-DbVXxL82.js → index-DZOjiJEi.js} +22704 -17123
- package/dist/index.d.ts +97 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -276,6 +276,11 @@ declare type DetailsModalClassNames = {
|
|
|
276
276
|
costOverview?: CostOverviewClassNames;
|
|
277
277
|
};
|
|
278
278
|
|
|
279
|
+
export declare type DetailsModalState = {
|
|
280
|
+
proposition: ProductCardPropositionFragment;
|
|
281
|
+
tab: DetailsModalTab;
|
|
282
|
+
};
|
|
283
|
+
|
|
279
284
|
declare type DetailsModalTab = 'general' | 'conditions' | 'channels' | 'costs';
|
|
280
285
|
|
|
281
286
|
/** Event fired when proposition details are viewed */
|
|
@@ -508,6 +513,45 @@ declare type GeneralClassNames = {
|
|
|
508
513
|
base?: string;
|
|
509
514
|
} & SectionClassNames;
|
|
510
515
|
|
|
516
|
+
/**
|
|
517
|
+
* ClassNames for styling different parts of the `HandsetCreditSelector` component
|
|
518
|
+
*/
|
|
519
|
+
declare type HandsetCreditSelectorClassNames = {
|
|
520
|
+
/** Root container */
|
|
521
|
+
base?: string;
|
|
522
|
+
/** Info text about the handset price */
|
|
523
|
+
handsetPriceInfo?: string;
|
|
524
|
+
/** Row containing the one-time and monthly fee display */
|
|
525
|
+
priceRow?: string;
|
|
526
|
+
/** One-time fee label */
|
|
527
|
+
oneTimeLabel?: string;
|
|
528
|
+
/** One-time fee value */
|
|
529
|
+
oneTimeValue?: string;
|
|
530
|
+
/** Monthly fee label */
|
|
531
|
+
monthlyLabel?: string;
|
|
532
|
+
/** Monthly fee value */
|
|
533
|
+
monthlyValue?: string;
|
|
534
|
+
/** Row containing the slider and buttons */
|
|
535
|
+
sliderRow?: string;
|
|
536
|
+
/** Decrement button */
|
|
537
|
+
decrementButton?: string;
|
|
538
|
+
/** Increment button */
|
|
539
|
+
incrementButton?: string;
|
|
540
|
+
/** Slider component class styling slots - matches HeroUI Slider classNames */
|
|
541
|
+
slider?: {
|
|
542
|
+
/** Represents individual steps or intervals on the Slider */
|
|
543
|
+
step?: string;
|
|
544
|
+
/** The base bar of the Slider, along which the thumb moves */
|
|
545
|
+
track?: string;
|
|
546
|
+
/** A visual representation of the selected value */
|
|
547
|
+
filler?: string;
|
|
548
|
+
/** The interactive element that users drag along the track */
|
|
549
|
+
thumb?: string;
|
|
550
|
+
};
|
|
551
|
+
/** Credit check info text */
|
|
552
|
+
creditCheckText?: string;
|
|
553
|
+
};
|
|
554
|
+
|
|
511
555
|
/**
|
|
512
556
|
* ClassNames for styling the `Label` component within `PropositionCard`
|
|
513
557
|
*/
|
|
@@ -1160,6 +1204,26 @@ declare type ProductCardPropositionFragment = {
|
|
|
1160
1204
|
|
|
1161
1205
|
export declare type ProductCategory = 'sim-only-proposition' | 'fixed-proposition' | 'smartphone-proposition' | 'smartphone-proposition-extended';
|
|
1162
1206
|
|
|
1207
|
+
/** ClassNames for styling the `ProductHeader` component */
|
|
1208
|
+
declare type ProductHeaderClassNames = {
|
|
1209
|
+
/** Wrapper container for the product header */
|
|
1210
|
+
base?: string;
|
|
1211
|
+
/** Product image (smartphone) – wrapper and img */
|
|
1212
|
+
productImage?: {
|
|
1213
|
+
wrapper?: string;
|
|
1214
|
+
img?: string;
|
|
1215
|
+
};
|
|
1216
|
+
/** Provider image (fixed/sim-only) – wrapper and img */
|
|
1217
|
+
providerImage?: {
|
|
1218
|
+
wrapper?: string;
|
|
1219
|
+
img?: string;
|
|
1220
|
+
};
|
|
1221
|
+
/** Stock status indicator – see ProductStockStatus */
|
|
1222
|
+
productStockStatus?: NonNullable<MainImageClassNames['phoneImage']>['stockIndicator'];
|
|
1223
|
+
/** Proposition header class styling slots */
|
|
1224
|
+
propositionHeader?: PropositionHeaderClassNames;
|
|
1225
|
+
};
|
|
1226
|
+
|
|
1163
1227
|
export declare function ProductResults({ classNames, initialSelectedFilters, initialProfile, onProfileChange, onError, onAction, ...props }: ProductResultsProps): JSX.Element;
|
|
1164
1228
|
|
|
1165
1229
|
/**
|
|
@@ -1538,6 +1602,38 @@ declare type PropositionOverviewClassNames = {
|
|
|
1538
1602
|
creditInfo?: CreditInfoClassNames_2;
|
|
1539
1603
|
};
|
|
1540
1604
|
|
|
1605
|
+
export declare function PropositionSelector({ propositionKey, classNames, initialProfile, onProfileChange, onError, ...props }: PropositionSelectorProps): JSX.Element;
|
|
1606
|
+
|
|
1607
|
+
export declare type PropositionSelectorClassNames = {
|
|
1608
|
+
base?: string;
|
|
1609
|
+
/** HandsetCreditSelector component class styling slots */
|
|
1610
|
+
handsetCreditSelector?: HandsetCreditSelectorClassNames;
|
|
1611
|
+
/** ProductHeader class styling slots (base, productImage, providerImage, productStockStatus, propositionHeader) */
|
|
1612
|
+
productHeader?: ProductHeaderClassNames;
|
|
1613
|
+
};
|
|
1614
|
+
|
|
1615
|
+
export declare type PropositionSelectorProps = {
|
|
1616
|
+
/** Initial proposition key
|
|
1617
|
+
* @example
|
|
1618
|
+
* '1412-10116|1413-10646|plv-398' */
|
|
1619
|
+
propositionKey: string;
|
|
1620
|
+
/** Class slots for styling */
|
|
1621
|
+
classNames?: PropositionSelectorClassNames;
|
|
1622
|
+
/** Initial user profile */
|
|
1623
|
+
initialProfile?: Partial<Profile>;
|
|
1624
|
+
/** Target for the click-out URL on mobiel.nl
|
|
1625
|
+
* @default 'cart' */
|
|
1626
|
+
clickOutTarget?: 'cart' | 'checkout';
|
|
1627
|
+
/** Callback function to handle profile changes */
|
|
1628
|
+
onProfileChange?: (profile: Partial<Profile>) => void;
|
|
1629
|
+
/** Callback function to add search params for the click-out URL */
|
|
1630
|
+
addClickoutSearchParams?: (searchParams: URLSearchParams) => URLSearchParams;
|
|
1631
|
+
/** Callback function called when an error occurs */
|
|
1632
|
+
onError?: (error: Error) => void;
|
|
1633
|
+
/** Callback function to handle return click */
|
|
1634
|
+
onReturnClick?: () => void;
|
|
1635
|
+
};
|
|
1636
|
+
|
|
1541
1637
|
export declare type ProviderOption = {
|
|
1542
1638
|
slug: string;
|
|
1543
1639
|
name: string;
|
|
@@ -2175,6 +2271,7 @@ export declare type Translations = {
|
|
|
2175
2271
|
showMore: string;
|
|
2176
2272
|
};
|
|
2177
2273
|
handsetCreditSelector: {
|
|
2274
|
+
handsetPriceInfo: string;
|
|
2178
2275
|
oneTime: string;
|
|
2179
2276
|
monthly: string;
|
|
2180
2277
|
decrease: string;
|