@mobielnl/elements 0.0.1 → 0.0.3
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 +37 -6
- package/dist/elements.css +1 -1
- package/dist/elements.js +1 -1
- package/dist/elements.umd.cjs +44 -44
- package/dist/{index-C-wKqSMk.js → index-CreNKZHw.js} +1 -1
- package/dist/{index-CSe9vMR8.js → index-DD6DvdOQ.js} +3469 -3338
- package/dist/index.d.ts +155 -11
- package/package.json +16 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
import { CardProps } from '@heroui/card';
|
|
2
|
-
import { default as default_2 } from 'react';
|
|
3
1
|
import { JSX } from 'react/jsx-runtime';
|
|
4
2
|
import { ReactNode } from 'react';
|
|
5
3
|
|
|
6
|
-
export declare
|
|
4
|
+
export declare type ElementsClassNames = {
|
|
5
|
+
root?: string;
|
|
6
|
+
productResults?: ProductResultsClassNames;
|
|
7
|
+
propositionCard?: PropositionCardClassNames;
|
|
8
|
+
filterSidebar?: FilterSidebarClassNames;
|
|
9
|
+
rangeFilter?: RangeFilterClassNames;
|
|
10
|
+
selectFilter?: SelectFilterClassNames;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export declare function ElementsRoot({ children, classNames }: ElementsRootProps): JSX.Element;
|
|
7
14
|
|
|
8
15
|
export declare type ElementsRootProps = {
|
|
9
16
|
children: ReactNode;
|
|
17
|
+
classNames?: ElementsClassNames;
|
|
10
18
|
};
|
|
11
19
|
|
|
12
20
|
declare type FilterOption = {
|
|
@@ -20,7 +28,15 @@ declare type FilterOption = {
|
|
|
20
28
|
unit?: string;
|
|
21
29
|
};
|
|
22
30
|
|
|
23
|
-
export declare function FilterSidebar({ filters, activeFilters, onFilterChange, onClearAll, className, }: FilterSidebarProps): JSX.Element;
|
|
31
|
+
export declare function FilterSidebar({ filters, activeFilters, onFilterChange, onClearAll, className, classNames, }: FilterSidebarProps): JSX.Element;
|
|
32
|
+
|
|
33
|
+
export declare type FilterSidebarClassNames = {
|
|
34
|
+
base?: string;
|
|
35
|
+
clearButton?: string;
|
|
36
|
+
filterGroup?: string;
|
|
37
|
+
filterLabel?: string;
|
|
38
|
+
filtersContainer?: string;
|
|
39
|
+
};
|
|
24
40
|
|
|
25
41
|
export declare type FilterSidebarProps = {
|
|
26
42
|
filters: FilterOption[];
|
|
@@ -28,6 +44,7 @@ export declare type FilterSidebarProps = {
|
|
|
28
44
|
onFilterChange: (filter: FilterValue) => void;
|
|
29
45
|
onClearAll: () => void;
|
|
30
46
|
className?: string;
|
|
47
|
+
classNames?: FilterSidebarClassNames;
|
|
31
48
|
};
|
|
32
49
|
|
|
33
50
|
declare type FilterValue = {
|
|
@@ -35,16 +52,109 @@ declare type FilterValue = {
|
|
|
35
52
|
value: string | number | [number, number] | string[];
|
|
36
53
|
};
|
|
37
54
|
|
|
38
|
-
export declare
|
|
55
|
+
export declare type FooterInfoClassNames = {
|
|
56
|
+
base?: string;
|
|
57
|
+
averagePrice?: string;
|
|
58
|
+
deviceDiscount?: string;
|
|
59
|
+
};
|
|
39
60
|
|
|
40
|
-
declare type
|
|
61
|
+
export declare type FooterInfoProps = {
|
|
62
|
+
deviceDiscount?: number;
|
|
63
|
+
tcoPerMonth?: number;
|
|
64
|
+
classNames?: FooterInfoClassNames;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export declare type PricingSectionClassNames = {
|
|
68
|
+
base?: string;
|
|
69
|
+
productPrice?: string;
|
|
70
|
+
monthlyFee?: string;
|
|
71
|
+
monthlyFeeValue?: string;
|
|
72
|
+
monthlyFeeLabel?: string;
|
|
73
|
+
promotionText?: string;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export declare type PricingSectionProps = {
|
|
77
|
+
monthlyFeePromotionText?: string;
|
|
78
|
+
monthlyFee: string;
|
|
79
|
+
productPrice?: number;
|
|
80
|
+
classNames?: PricingSectionClassNames;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export declare function ProductResults({ filterOptions, limit, classNames, }: ProductResultsProps): JSX.Element;
|
|
84
|
+
|
|
85
|
+
export declare type ProductResultsClassNames = {
|
|
86
|
+
base?: string;
|
|
87
|
+
filterSidebarWrapper?: string;
|
|
88
|
+
filterSidebar?: FilterSidebarClassNames;
|
|
89
|
+
resultsGrid?: string;
|
|
90
|
+
propositionCard?: PropositionCardClassNames;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export declare type ProductResultsProps = {
|
|
41
94
|
filterOptions?: FilterOption[];
|
|
42
95
|
limit?: number;
|
|
96
|
+
classNames?: ProductResultsClassNames;
|
|
43
97
|
};
|
|
44
98
|
|
|
45
|
-
export declare
|
|
99
|
+
export declare type ProductSectionClassNames = {
|
|
100
|
+
base?: string;
|
|
101
|
+
image?: string;
|
|
102
|
+
title?: string;
|
|
103
|
+
subtitle?: string;
|
|
104
|
+
stockStatus?: string;
|
|
105
|
+
reviewScore?: string;
|
|
106
|
+
reviewCount?: string;
|
|
107
|
+
specifications?: string;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export declare type ProductSectionProps = {
|
|
111
|
+
title: string;
|
|
112
|
+
subtitle: string;
|
|
113
|
+
imageUrl: string;
|
|
114
|
+
imageAlt: string;
|
|
115
|
+
specifications?: ProductSpecification[];
|
|
116
|
+
stockStatus?: string;
|
|
117
|
+
reviewCount?: number;
|
|
118
|
+
reviewScore?: number;
|
|
119
|
+
classNames?: ProductSectionClassNames;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
declare interface ProductSpecification {
|
|
123
|
+
title: string;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export declare type PromotionsListClassNames = {
|
|
127
|
+
base?: string;
|
|
128
|
+
item?: string;
|
|
129
|
+
icon?: string;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
export declare type PromotionsListProps = {
|
|
133
|
+
promotions: string[];
|
|
134
|
+
className?: string;
|
|
135
|
+
classNames?: PromotionsListClassNames;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
export declare function PropositionCard({ className, href, productTitle, productSubtitle, productImageUrl, productImageAlt, propositionTitle, propositionSubtitle, propositionImageUrl, propositionImageAlt, propositionSpecifications, monthlyFee, tcoPerMonth, specialPromotions, modificationPromotions, monthlyFeePromotionText, deliveryText, urgentText, productSpecifications, productStockStatus, productReviewCount, productReviewScore, productPrice, deviceDiscount, classNames, ...props }: PropositionCardProps): JSX.Element;
|
|
139
|
+
|
|
140
|
+
export declare type PropositionCardClassNames = {
|
|
141
|
+
card?: string;
|
|
142
|
+
header?: string;
|
|
143
|
+
body?: string;
|
|
144
|
+
footer?: string;
|
|
145
|
+
productSection?: ProductSectionClassNames;
|
|
146
|
+
propositionHeader?: PropositionHeaderClassNames;
|
|
147
|
+
pricingSection?: PricingSectionClassNames;
|
|
148
|
+
promotionsList?: PromotionsListClassNames;
|
|
149
|
+
footerInfo?: FooterInfoClassNames;
|
|
150
|
+
specifications?: string;
|
|
151
|
+
urgentChip?: string;
|
|
152
|
+
deliveryText?: string;
|
|
153
|
+
button?: string;
|
|
154
|
+
};
|
|
46
155
|
|
|
47
156
|
export declare type PropositionCardProps = {
|
|
157
|
+
className?: string;
|
|
48
158
|
href: string;
|
|
49
159
|
productTitle?: string;
|
|
50
160
|
productSubtitle?: string;
|
|
@@ -63,7 +173,7 @@ export declare type PropositionCardProps = {
|
|
|
63
173
|
propositionImageAlt: string;
|
|
64
174
|
propositionSpecifications?: {
|
|
65
175
|
title: string;
|
|
66
|
-
icon:
|
|
176
|
+
icon: ReactNode;
|
|
67
177
|
}[];
|
|
68
178
|
monthlyFee: string;
|
|
69
179
|
tcoPerMonth: string;
|
|
@@ -73,9 +183,33 @@ export declare type PropositionCardProps = {
|
|
|
73
183
|
deviceDiscount?: number;
|
|
74
184
|
deliveryText?: string;
|
|
75
185
|
urgentText?: string;
|
|
76
|
-
|
|
186
|
+
classNames?: PropositionCardClassNames;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
export declare type PropositionHeaderClassNames = {
|
|
190
|
+
base?: string;
|
|
191
|
+
image?: string;
|
|
192
|
+
title?: string;
|
|
193
|
+
subtitle?: string;
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
export declare type PropositionHeaderProps = {
|
|
197
|
+
title: string;
|
|
198
|
+
subtitle: string;
|
|
199
|
+
imageUrl: string;
|
|
200
|
+
imageAlt: string;
|
|
201
|
+
hasProduct: boolean;
|
|
202
|
+
classNames?: PropositionHeaderClassNames;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
export declare function RangeFilter({ min, max, step, unit, value, onChange, classNames, }: RangeFilterProps): JSX.Element;
|
|
77
206
|
|
|
78
|
-
export declare
|
|
207
|
+
export declare type RangeFilterClassNames = {
|
|
208
|
+
base?: string;
|
|
209
|
+
slider?: string;
|
|
210
|
+
label?: string;
|
|
211
|
+
marks?: string;
|
|
212
|
+
};
|
|
79
213
|
|
|
80
214
|
export declare type RangeFilterProps = {
|
|
81
215
|
id: string;
|
|
@@ -85,15 +219,25 @@ export declare type RangeFilterProps = {
|
|
|
85
219
|
unit?: string;
|
|
86
220
|
value?: [number, number];
|
|
87
221
|
onChange: (value: [number, number]) => void;
|
|
222
|
+
classNames?: RangeFilterClassNames;
|
|
88
223
|
};
|
|
89
224
|
|
|
90
|
-
export declare function SelectFilter({ options, values, onChange }: SelectFilterProps): JSX.Element;
|
|
225
|
+
export declare function SelectFilter({ options, values, onChange, classNames, }: SelectFilterProps): JSX.Element;
|
|
226
|
+
|
|
227
|
+
export declare type SelectFilterClassNames = {
|
|
228
|
+
base?: string;
|
|
229
|
+
checkbox?: string;
|
|
230
|
+
label?: string;
|
|
231
|
+
wrapper?: string;
|
|
232
|
+
icon?: string;
|
|
233
|
+
};
|
|
91
234
|
|
|
92
235
|
export declare type SelectFilterProps = {
|
|
93
236
|
id: string;
|
|
94
237
|
options: string[];
|
|
95
238
|
values?: string[];
|
|
96
239
|
onChange: (values: string[]) => void;
|
|
240
|
+
classNames?: SelectFilterClassNames;
|
|
97
241
|
};
|
|
98
242
|
|
|
99
243
|
export { }
|
package/package.json
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mobielnl/elements",
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "Mobiel.nl Elements - React component library for partner websites",
|
|
3
5
|
"private": false,
|
|
4
|
-
"version": "0.0.1",
|
|
5
6
|
"type": "module",
|
|
7
|
+
"homepage": "https://elements.mobiel.nl",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"mobiel.nl",
|
|
10
|
+
"mobielnl",
|
|
11
|
+
"websend",
|
|
12
|
+
"elements"
|
|
13
|
+
],
|
|
6
14
|
"files": [
|
|
7
15
|
"dist"
|
|
8
16
|
],
|
|
@@ -15,15 +23,20 @@
|
|
|
15
23
|
},
|
|
16
24
|
"exports": {
|
|
17
25
|
".": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
18
27
|
"import": "./dist/elements.js",
|
|
19
28
|
"require": "./dist/elements.umd.cjs",
|
|
20
29
|
"default": "./dist/elements.js"
|
|
21
30
|
},
|
|
22
|
-
"./style.css": "./dist/elements.css"
|
|
31
|
+
"./style.css": "./dist/elements.css",
|
|
32
|
+
"./package.json": "./package.json"
|
|
23
33
|
},
|
|
24
34
|
"sideEffects": [
|
|
25
35
|
"**/*.css"
|
|
26
36
|
],
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=18"
|
|
39
|
+
},
|
|
27
40
|
"peerDependencies": {
|
|
28
41
|
"react": ">=18",
|
|
29
42
|
"react-dom": ">=18"
|
|
@@ -67,7 +80,7 @@
|
|
|
67
80
|
"swr": "^2.3.2",
|
|
68
81
|
"tailwindcss": "^4.1.11",
|
|
69
82
|
"typescript": "~5.8.3",
|
|
70
|
-
"vite": "
|
|
83
|
+
"vite": "7.1.5",
|
|
71
84
|
"vite-plugin-dts": "^4.5.0",
|
|
72
85
|
"vitest": "^3.2.4"
|
|
73
86
|
},
|