@mobielnl/elements 0.12.11 → 0.12.12

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/index.d.ts CHANGED
@@ -23,6 +23,13 @@ declare const addressSchema: z.ZodObject<{
23
23
  city: z.ZodString;
24
24
  }, z.core.$strip>;
25
25
 
26
+ /** Event fired when the add-to-cart CTA is clicked */
27
+ export declare type AddToCartEvent = {
28
+ type: 'add_to_cart';
29
+ /** The full proposition data */
30
+ proposition: ProductCardPropositionFragment;
31
+ };
32
+
26
33
  declare type AverageSectionClassNames = {
27
34
  /** Container for the average per month section */
28
35
  container?: string;
@@ -81,6 +88,84 @@ export declare type Block = {
81
88
  amount: number;
82
89
  };
83
90
 
91
+ /**
92
+ * ClassNames for styling different parts of the `BundleModal` component
93
+ */
94
+ declare type BundleModalClassNames = {
95
+ /** The backdrop slot, it is displayed behind the modal */
96
+ backdrop?: string;
97
+ /** The wrapper slot of the modal. It wraps the base and the backdrop slots */
98
+ wrapper?: string;
99
+ /** The main slot of the modal content */
100
+ base?: string;
101
+ /** The header of the modal, it is displayed at the top of the modal */
102
+ header?: string;
103
+ /** The body of the modal, it is displayed in the middle of the modal */
104
+ body?: string;
105
+ /** The footer of the modal, it is displayed at the bottom of the modal */
106
+ footer?: string;
107
+ /** The close button (X) of the modal in top-right corner */
108
+ closeButton?: string;
109
+ };
110
+
111
+ /**
112
+ * ClassNames for styling different parts of the `BundleSelector` component
113
+ */
114
+ declare type BundleSelectorClassNames = {
115
+ /** Root container wrapping all bundle sections */
116
+ base?: string;
117
+ /** Container wrapping the contract term heading and radio group */
118
+ contractTermGroup?: string;
119
+ /** Contract term section heading */
120
+ contractTermLabel?: string;
121
+ /** Contract term radio group class styling slots - see type `RadioGroupClassNames` */
122
+ contractTermRadioGroup?: RadioGroupClassNames;
123
+ /** Container wrapping each bundle type set heading and its radio/checkbox group */
124
+ bundleTypeSetGroup?: string;
125
+ /** Bundle type set section heading */
126
+ bundleTypeSetLabel?: string;
127
+ /** Bundle type set radio group class styling slots (used when `multiSelect` is false) - see type `RadioGroupClassNames` */
128
+ bundleTypeSetRadioGroup?: RadioGroupClassNames;
129
+ /** Bundle type set checkbox group class styling slots (used when `multiSelect` is true) - see type `CheckboxGroupClassNames` */
130
+ bundleTypeSetCheckboxGroup?: CheckboxGroupClassNames;
131
+ };
132
+
133
+ /**
134
+ * ClassNames for styling different parts of the `Carousel` component
135
+ */
136
+ declare type CarouselClassNames = {
137
+ /** Root container */
138
+ base?: string;
139
+ /** Image */
140
+ image?: string;
141
+ /** Image wrapper */
142
+ imageWrapper?: string;
143
+ /** Thumbnail Card area */
144
+ thumbnailCard?: string;
145
+ /** Thumbnail Image */
146
+ thumbnailImage?: string;
147
+ /** Counter for hidden amount of thumbnails */
148
+ counter?: string;
149
+ /** Modal class names */
150
+ modal?: CarouselModalClassNames;
151
+ };
152
+
153
+ /**
154
+ * ClassNames for styling different parts of the `Carousel` component
155
+ */
156
+ declare type CarouselModalClassNames = {
157
+ /** Image */
158
+ image?: string;
159
+ /** Image wrapper */
160
+ imageWrapper?: string;
161
+ /** Thumbnail Card area */
162
+ thumbnailCard?: string;
163
+ /** Thumbnail Image */
164
+ thumbnailImage?: string;
165
+ /** Modal class names */
166
+ modal?: ModalClassNames_6;
167
+ };
168
+
84
169
  declare type ChannelsClassNames = {
85
170
  /** The base slot of the channels section, it is the container of the channels section */
86
171
  base?: string;
@@ -96,6 +181,32 @@ declare type ChannelsClassNames = {
96
181
  hdIcon?: string;
97
182
  };
98
183
 
184
+ declare type CheckboxGroupClassNames = {
185
+ /** Checkbox group root wrapper, it wraps the label and the wrapper */
186
+ base?: string;
187
+ /** Checkbox group wrapper, it wraps all checkboxes */
188
+ wrapper?: string;
189
+ /** Checkbox group label, it is placed before the wrapper */
190
+ label?: string;
191
+ /** The description of the checkbox group */
192
+ description?: string;
193
+ /** The error message of the checkbox group */
194
+ errorMessage?: string;
195
+ /** Individual checkboxes located within `checkboxGroup` */
196
+ checkbox?: {
197
+ /** Checkbox wrapper, it handles alignment, placement, and general appearance */
198
+ base?: string;
199
+ /** An inner container that includes styles for relative positioning, flex properties, overflow handling and managing hover and selected states */
200
+ wrapper?: string;
201
+ /** The hidden input element that is used to handle the checkbox state */
202
+ hiddenInput?: string;
203
+ /** Icon within the checkbox, controlling size, visibility, and changes when checked */
204
+ icon?: string;
205
+ /** The text associated with the checkbox */
206
+ label?: string;
207
+ };
208
+ };
209
+
99
210
  declare type CombiDealModalClassNames = {
100
211
  /** Modal dialog class styling slots - see type `ModalClassNames` */
101
212
  modal?: ModalClassNames_3;
@@ -713,6 +824,23 @@ declare type ModalClassNames_5 = {
713
824
  closeButton?: string;
714
825
  };
715
826
 
827
+ declare type ModalClassNames_6 = {
828
+ /** The backdrop slot, it is displayed behind the modal */
829
+ backdrop?: string;
830
+ /** The wrapper slot of the modal. It wraps the base and the backdrop slots */
831
+ wrapper?: string;
832
+ /** The main slot of the modal content */
833
+ base?: string;
834
+ /** The header of the modal, it is displayed at the top of the modal */
835
+ header?: string;
836
+ /** The body of the modal, it is displayed in the middle of the modal */
837
+ body?: string;
838
+ /** The footer of the modal, it is displayed at the bottom of the modal */
839
+ footer?: string;
840
+ /** The close button (X) of the modal in top-right corner */
841
+ closeButton?: string;
842
+ };
843
+
716
844
  declare type MonthlyFeeClassNames = {
717
845
  /** Container for the monthly fee row */
718
846
  container?: string;
@@ -993,6 +1121,37 @@ declare type PricingClassNames = {
993
1121
  averagePriceValue?: string;
994
1122
  };
995
1123
 
1124
+ /**
1125
+ * ClassNames for styling the `Pricing` component within `PropositionCard`
1126
+ */
1127
+ declare type PricingClassNames_2 = {
1128
+ /** Wrapper container for the pricing section */
1129
+ wrapper?: string;
1130
+ /** Promotion text for monthly fee
1131
+ * @example "12 mnd van 10,- voor:" */
1132
+ promotionText?: string;
1133
+ /** Wrapper container for the monthly fee */
1134
+ monthlyFeeWrapper?: string;
1135
+ /** Monthly fee value text (price per month)
1136
+ * @example "10,-" */
1137
+ monthlyFeeValue?: string;
1138
+ /** Monthly fee label text
1139
+ /* @example "/ maand" */
1140
+ monthlyFeeLabel?: string;
1141
+ /** Product price text (one-time fee for phone)
1142
+ *
1143
+ * Only visible for Smartphone Propositions
1144
+ * @example "+ 100,- eenmalig" */
1145
+ oneTimeFee?: string;
1146
+ /** Wrapper container for the average price */
1147
+ averagePriceWrapper?: string;
1148
+ /** Average price Icon */
1149
+ averagePriceIcon?: string;
1150
+ /** Average price value text (TCO per month)
1151
+ * @example "gem. 54,- / maand" */
1152
+ averagePriceValue?: string;
1153
+ };
1154
+
996
1155
  declare type ProductCardPropositionFragment = {
997
1156
  __typename?: 'Proposition';
998
1157
  key: string;
@@ -1222,6 +1381,10 @@ declare type ProductHeaderClassNames = {
1222
1381
  productStockStatus?: NonNullable<MainImageClassNames['phoneImage']>['stockIndicator'];
1223
1382
  /** Proposition header class styling slots */
1224
1383
  propositionHeader?: PropositionHeaderClassNames;
1384
+ /** Carousel class styling slots (smartphone product images) - see type `CarouselClassNames` */
1385
+ carousel?: CarouselClassNames;
1386
+ /** PromotionList class styling slots (special promotions in header) - see type `PromotionListClassNames` */
1387
+ promotionList?: PromotionListClassNames;
1225
1388
  };
1226
1389
 
1227
1390
  export declare function ProductResults({ classNames, initialSelectedFilters, initialProfile, onProfileChange, onError, onAction, ...props }: ProductResultsProps): JSX.Element;
@@ -1602,14 +1765,63 @@ declare type PropositionOverviewClassNames = {
1602
1765
  creditInfo?: CreditInfoClassNames_2;
1603
1766
  };
1604
1767
 
1605
- export declare function PropositionSelector({ propositionKey, classNames, initialProfile, onProfileChange, onError, ...props }: PropositionSelectorProps): JSX.Element;
1768
+ export declare function PropositionSelector({ propositionKey, classNames, initialProfile, onProfileChange, onError, onAction, ...props }: PropositionSelectorProps): JSX.Element;
1606
1769
 
1770
+ /**
1771
+ * ClassNames for styling different parts of the `PropositionSelector` component
1772
+ */
1607
1773
  export declare type PropositionSelectorClassNames = {
1774
+ /** Wrapper container for the entire proposition selector */
1608
1775
  base?: string;
1609
- /** HandsetCreditSelector component class styling slots */
1776
+ /** HandsetCreditSelector component class styling slots - see type `HandsetCreditSelectorClassNames` */
1610
1777
  handsetCreditSelector?: HandsetCreditSelectorClassNames;
1611
- /** ProductHeader class styling slots (base, productImage, providerImage, productStockStatus, propositionHeader) */
1778
+ /** ProductHeader class styling slots - see type `ProductHeaderClassNames` */
1612
1779
  productHeader?: ProductHeaderClassNames;
1780
+ /** StickySummary component class styling slots - see type `StickySummaryClassNames` */
1781
+ stickySummary?: StickySummaryClassNames;
1782
+ /** CostOverview component class styling slots (sticky sidebar card) - see type `CostOverviewClassNames` */
1783
+ costOverview?: CostOverviewClassNames;
1784
+ /** PromotionList component class styling slots (benefits section) - see type `PromotionListClassNames` */
1785
+ promotionList?: PromotionListClassNames;
1786
+ /** PropositionSpecifications class styling slots (bundle info section) */
1787
+ propositionSpecifications?: {
1788
+ /** Wrapper container for the specifications */
1789
+ wrapper?: string;
1790
+ /** Specification item */
1791
+ item?: string;
1792
+ /** Specification icon */
1793
+ icon?: string;
1794
+ };
1795
+ /** VersionSelect component class styling slots (smartphone product version selector) - see type `VersionSelectClassNames` */
1796
+ versionSelect?: VersionSelectClassNames;
1797
+ /** Extra costs section root container class */
1798
+ extraCosts?: string;
1799
+ /** Sidebar card containing the cost overview, CTA button and extra costs */
1800
+ sidebarCard?: {
1801
+ /** The Card wrapper element */
1802
+ base?: string;
1803
+ /** The "Totale kosten overzicht" title heading */
1804
+ title?: string;
1805
+ /** The add-to-cart CTA button */
1806
+ ctaButton?: string;
1807
+ };
1808
+ /** BundleSelector component class styling slots - see type `BundleSelectorClassNames` */
1809
+ bundleSelector?: BundleSelectorClassNames;
1810
+ /** BundleModal component class styling slots - see type `BundleModalClassNames` */
1811
+ bundleModal?: BundleModalClassNames;
1812
+ /** Profile buttons component class styling slots - see type `SelectorClassNames` */
1813
+ profileButton?: SelectorClassNames;
1814
+ /** Profile banner component class styling slots - see type `ProfileBannerClassNames` */
1815
+ profileBanner?: ProfileBannerClassNames;
1816
+ /** Error alert class styling slots - see type `ErrorAlertClassNames` */
1817
+ errorAlert?: ErrorAlertClassNames;
1818
+ /** Proposition results class styling slots (shared sub-keys with ProductResultsClassNames.results) */
1819
+ results?: {
1820
+ /** Details modal class styling slots - see type `DetailsModalClassNames` */
1821
+ detailsModal?: DetailsModalClassNames;
1822
+ /** Credit info class styling slots - see type `CreditInfoClassNames` */
1823
+ creditInfo?: CreditInfoClassNames_2;
1824
+ };
1613
1825
  };
1614
1826
 
1615
1827
  export declare type PropositionSelectorProps = {
@@ -1632,6 +1844,30 @@ export declare type PropositionSelectorProps = {
1632
1844
  onError?: (error: Error) => void;
1633
1845
  /** Callback function to handle return click */
1634
1846
  onReturnClick?: () => void;
1847
+ /**
1848
+ * Callback function fired when user actions occur.
1849
+ *
1850
+ * Events:
1851
+ * - `details_viewed`: User opened proposition details modal
1852
+ * - `add_to_cart`: User clicked the add-to-cart CTA
1853
+ * - `profile_changed`: User profile changed (includes from/to values)
1854
+ *
1855
+ * @example
1856
+ * onAction={(event) => {
1857
+ * switch(event.type) {
1858
+ * case 'details_viewed':
1859
+ * console.log(event.proposition, event.tab)
1860
+ * break
1861
+ * case 'add_to_cart':
1862
+ * console.log(event.proposition)
1863
+ * break
1864
+ * case 'profile_changed':
1865
+ * console.log(event.from, event.to)
1866
+ * break
1867
+ * }
1868
+ * }}
1869
+ */
1870
+ onAction?: (event: SelectorActionEvent) => void;
1635
1871
  };
1636
1872
 
1637
1873
  export declare type ProviderOption = {
@@ -1679,6 +1915,39 @@ declare type RadioFilterClassNames = {
1679
1915
  };
1680
1916
  };
1681
1917
 
1918
+ /**
1919
+ * ClassNames for styling different parts of the `RadioGroup` component
1920
+ */
1921
+ declare type RadioGroupClassNames = {
1922
+ /** Radio group root wrapper, it wraps the label and the wrapper */
1923
+ base?: string;
1924
+ /** Radio group wrapper, it wraps all radio items */
1925
+ wrapper?: string;
1926
+ /** Radio group label, it is placed before the wrapper */
1927
+ label?: string;
1928
+ /** Description slot for the radio group */
1929
+ description?: string;
1930
+ /** Error message slot for the radio group */
1931
+ errorMessage?: string;
1932
+ /** Individual radio items */
1933
+ radio?: {
1934
+ /** Radio root wrapper, it wraps all elements */
1935
+ base?: string;
1936
+ /** Radio wrapper, it wraps the control element */
1937
+ wrapper?: string;
1938
+ /** The hidden input element that is used to handle the radio state */
1939
+ hiddenInput?: string;
1940
+ /** Label and description wrapper */
1941
+ labelWrapper?: string;
1942
+ /** The label text associated with the radio */
1943
+ label?: string;
1944
+ /** Control element, it is the circle element */
1945
+ control?: string;
1946
+ /** Description slot for the radio */
1947
+ description?: string;
1948
+ };
1949
+ };
1950
+
1682
1951
  declare type ResultsClassNames = {
1683
1952
  /** Title above top propositions (only shown when `showTopPropositions` is set to `true`)
1684
1953
  * @example "Beste providers voor jou" */
@@ -1779,6 +2048,14 @@ declare type SelectFilterClassNames = {
1779
2048
  collapseLink?: string;
1780
2049
  };
1781
2050
 
2051
+ /**
2052
+ * Union type of all PropositionSelector action events.
2053
+ *
2054
+ * Re-uses `DetailsViewedEvent` and `ProfileChangedEvent` from `ProductResults`
2055
+ * since the shape is identical.
2056
+ */
2057
+ export declare type SelectorActionEvent = AddToCartEvent | DetailsViewedEvent | ProfileChangedEvent;
2058
+
1782
2059
  /**
1783
2060
  * ClassNames for styling different parts of the `Selector` component
1784
2061
  */
@@ -1867,6 +2144,16 @@ declare type SortSelectClassNames = {
1867
2144
  endWrapper?: string;
1868
2145
  };
1869
2146
 
2147
+ /**
2148
+ * ClassNames for styling different parts of the `Sticky` component
2149
+ */
2150
+ declare type StickySummaryClassNames = {
2151
+ /** Container */
2152
+ container?: string;
2153
+ /** Pricing section class styling slots - see type `PricingClassNames` */
2154
+ pricing?: PricingClassNames_2;
2155
+ };
2156
+
1870
2157
  declare type TableClassNames = {
1871
2158
  /** Defines a flexible column layout and relative positioning for the table component */
1872
2159
  base?: string;
@@ -1948,6 +2235,9 @@ export declare type Translations = {
1948
2235
  subscription: string;
1949
2236
  prepaid: string;
1950
2237
  otherProvider: string;
2238
+ question: string;
2239
+ yes: string;
2240
+ no: string;
1951
2241
  };
1952
2242
  combiDeal: {
1953
2243
  title: string;
@@ -1962,6 +2252,7 @@ export declare type Translations = {
1962
2252
  movingOption: string;
1963
2253
  otherProvider: string;
1964
2254
  question: string;
2255
+ questionOtherSubscriptions: string;
1965
2256
  yes: string;
1966
2257
  no: string;
1967
2258
  };
@@ -2281,4 +2572,25 @@ export declare type Translations = {
2281
2572
  };
2282
2573
  };
2283
2574
 
2575
+ declare type VersionSelectClassNames = {
2576
+ description?: string;
2577
+ errorMessage?: string;
2578
+ label?: string;
2579
+ base?: string;
2580
+ cardBody?: string;
2581
+ value?: string;
2582
+ selectorIcon?: string;
2583
+ endContent?: string;
2584
+ trigger?: string;
2585
+ mainWrapper?: string;
2586
+ innerWrapper?: string;
2587
+ spinner?: string;
2588
+ listboxWrapper?: string;
2589
+ listbox?: string;
2590
+ popoverContent?: string;
2591
+ helperWrapper?: string;
2592
+ endWrapper?: string;
2593
+ clearButton?: string;
2594
+ };
2595
+
2284
2596
  export { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mobielnl/elements",
3
- "version": "0.12.11",
3
+ "version": "0.12.12",
4
4
  "description": "Mobiel.nl Elements - React component library for partner websites",
5
5
  "private": false,
6
6
  "type": "module",