@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/README.md
CHANGED
|
@@ -31,7 +31,7 @@ import "@mobielnl/elements/style.css"; // can also be imported in (global) CSS f
|
|
|
31
31
|
export default function Example() {
|
|
32
32
|
return (
|
|
33
33
|
<ElementsRoot>
|
|
34
|
-
<ProductResults
|
|
34
|
+
<ProductResults />
|
|
35
35
|
</ElementsRoot>
|
|
36
36
|
);
|
|
37
37
|
}
|
|
@@ -52,7 +52,7 @@ You can customize component styling using the `classNames` prop.
|
|
|
52
52
|
```tsx
|
|
53
53
|
import { ProductResults, type ProductResultsClassNames } from "@mobielnl/elements";
|
|
54
54
|
|
|
55
|
-
const
|
|
55
|
+
const productResultsClassNames: ProductResultsClassNames = {
|
|
56
56
|
propositionCard: {
|
|
57
57
|
title: "text-5xl font-extrabold text-secondary",
|
|
58
58
|
pricingSection: {
|
|
@@ -62,7 +62,7 @@ const customClassNames: ProductResultsClassNames = {
|
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
export default function Example() {
|
|
65
|
-
return <ProductResults
|
|
65
|
+
return <ProductResults classNames={productResultsClassNames} />;
|
|
66
66
|
}
|
|
67
67
|
```
|
|
68
68
|
|
|
@@ -96,10 +96,19 @@ export default function Example() {
|
|
|
96
96
|
<!-- MobielNL UMD bundle attaches global `Elements` -->
|
|
97
97
|
<script src="../dist/elements.umd.cjs"></script>
|
|
98
98
|
|
|
99
|
-
<!-- Render MobielNL
|
|
99
|
+
<!-- Render MobielNL ProductResults -->
|
|
100
100
|
<script>
|
|
101
|
+
const productResultsClassNames = {
|
|
102
|
+
propositionCard: {
|
|
103
|
+
title: "text-5xl font-extrabold text-secondary",
|
|
104
|
+
pricingSection: {
|
|
105
|
+
monthlyFeeValue: "text-red-500",
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
|
|
101
110
|
ReactDOM.createRoot(document.getElementById("mobielnl-product-results")).render(
|
|
102
|
-
React.createElement(Elements.ProductResults, {
|
|
111
|
+
React.createElement(Elements.ProductResults, { classNames: productResultsClassNames })
|
|
103
112
|
);
|
|
104
113
|
</script>
|
|
105
114
|
</body>
|
|
@@ -135,134 +144,137 @@ Our compiled stylesheet uses HeroUI-compatible CSS custom properties.
|
|
|
135
144
|
|
|
136
145
|
```css
|
|
137
146
|
.mobielnl-elements {
|
|
138
|
-
--
|
|
139
|
-
--
|
|
140
|
-
|
|
141
|
-
/* Default */
|
|
142
|
-
--
|
|
143
|
-
--
|
|
144
|
-
--
|
|
145
|
-
--
|
|
146
|
-
--
|
|
147
|
-
--
|
|
148
|
-
--
|
|
149
|
-
--
|
|
150
|
-
--
|
|
151
|
-
--
|
|
152
|
-
--
|
|
153
|
-
--
|
|
154
|
-
|
|
155
|
-
/* Primary */
|
|
156
|
-
--
|
|
157
|
-
--
|
|
158
|
-
--
|
|
159
|
-
--
|
|
160
|
-
--
|
|
161
|
-
--
|
|
162
|
-
--
|
|
163
|
-
--
|
|
164
|
-
--
|
|
165
|
-
--
|
|
166
|
-
--
|
|
167
|
-
--
|
|
168
|
-
|
|
169
|
-
/* Secondary */
|
|
170
|
-
--
|
|
171
|
-
--
|
|
172
|
-
--
|
|
173
|
-
--
|
|
174
|
-
--
|
|
175
|
-
--
|
|
176
|
-
--
|
|
177
|
-
--
|
|
178
|
-
--
|
|
179
|
-
--
|
|
180
|
-
--
|
|
181
|
-
--
|
|
147
|
+
--mobielnl-background: 0 0% 100%;
|
|
148
|
+
--mobielnl-foreground: 232 68% 21%;
|
|
149
|
+
|
|
150
|
+
/* Default (Neutral) */
|
|
151
|
+
--mobielnl-default-50: 0 0% 98%;
|
|
152
|
+
--mobielnl-default-100: 0 0% 96%;
|
|
153
|
+
--mobielnl-default-200: 0 0% 89%;
|
|
154
|
+
--mobielnl-default-300: 0 0% 82%;
|
|
155
|
+
--mobielnl-default-400: 0 0% 65%;
|
|
156
|
+
--mobielnl-default-500: 0 0% 52%;
|
|
157
|
+
--mobielnl-default-600: 0 0% 44%;
|
|
158
|
+
--mobielnl-default-700: 0 0% 34%;
|
|
159
|
+
--mobielnl-default-800: 0 0% 25%;
|
|
160
|
+
--mobielnl-default-900: 0 0% 13%;
|
|
161
|
+
--mobielnl-default: 0 0% 52%;
|
|
162
|
+
--mobielnl-default-foreground: 232 68% 21%;
|
|
163
|
+
|
|
164
|
+
/* Primary (Blue) */
|
|
165
|
+
--mobielnl-primary-50: 219 68% 95%;
|
|
166
|
+
--mobielnl-primary-100: 218 71% 93%;
|
|
167
|
+
--mobielnl-primary-200: 213 97% 87%;
|
|
168
|
+
--mobielnl-primary-300: 212 96% 78%;
|
|
169
|
+
--mobielnl-primary-400: 213 95% 68%;
|
|
170
|
+
--mobielnl-primary-500: 218 89% 61%;
|
|
171
|
+
--mobielnl-primary-600: 223 72% 49%;
|
|
172
|
+
--mobielnl-primary-700: 228 70% 38%;
|
|
173
|
+
--mobielnl-primary-800: 231 69% 33%;
|
|
174
|
+
--mobielnl-primary-900: 232 68% 21%;
|
|
175
|
+
--mobielnl-primary: 231 69% 33%;
|
|
176
|
+
--mobielnl-primary-foreground: 0 0% 100%;
|
|
177
|
+
|
|
178
|
+
/* Secondary (Orange) */
|
|
179
|
+
--mobielnl-secondary-50: 37 100% 96%;
|
|
180
|
+
--mobielnl-secondary-100: 39 100% 92%;
|
|
181
|
+
--mobielnl-secondary-200: 36 100% 83%;
|
|
182
|
+
--mobielnl-secondary-300: 35 100% 72%;
|
|
183
|
+
--mobielnl-secondary-400: 31 99% 61%;
|
|
184
|
+
--mobielnl-secondary-500: 29 98% 51%;
|
|
185
|
+
--mobielnl-secondary-600: 25 93% 48%;
|
|
186
|
+
--mobielnl-secondary-700: 22 91% 40%;
|
|
187
|
+
--mobielnl-secondary-800: 19 81% 34%;
|
|
188
|
+
--mobielnl-secondary-900: 21 82% 27%;
|
|
189
|
+
--mobielnl-secondary: 27 97% 49%;
|
|
190
|
+
--mobielnl-secondary-foreground: 0 0% 100%;
|
|
182
191
|
|
|
183
192
|
/* Success */
|
|
184
|
-
--
|
|
185
|
-
--
|
|
186
|
-
--
|
|
187
|
-
--
|
|
188
|
-
--
|
|
189
|
-
--
|
|
190
|
-
--
|
|
191
|
-
--
|
|
192
|
-
--
|
|
193
|
-
--
|
|
194
|
-
--
|
|
195
|
-
--
|
|
193
|
+
--mobielnl-success-50: 92 60% 95%;
|
|
194
|
+
--mobielnl-success-100: 93 60% 89%;
|
|
195
|
+
--mobielnl-success-200: 93 58% 80%;
|
|
196
|
+
--mobielnl-success-300: 94 56% 67%;
|
|
197
|
+
--mobielnl-success-400: 95 52% 55%;
|
|
198
|
+
--mobielnl-success-500: 96 53% 42%;
|
|
199
|
+
--mobielnl-success-600: 97 56% 35%;
|
|
200
|
+
--mobielnl-success-700: 98 51% 27%;
|
|
201
|
+
--mobielnl-success-800: 99 45% 23%;
|
|
202
|
+
--mobielnl-success-900: 100 40% 20%;
|
|
203
|
+
--mobielnl-success: 97 56% 35%;
|
|
204
|
+
--mobielnl-success-foreground: 0 0% 100%;
|
|
196
205
|
|
|
197
206
|
/* Warning */
|
|
198
|
-
--
|
|
199
|
-
--
|
|
200
|
-
--
|
|
201
|
-
--
|
|
202
|
-
--
|
|
203
|
-
--
|
|
204
|
-
--
|
|
205
|
-
--
|
|
206
|
-
--
|
|
207
|
-
--
|
|
208
|
-
--
|
|
209
|
-
--
|
|
207
|
+
--mobielnl-warning-50: 54 100% 96%;
|
|
208
|
+
--mobielnl-warning-100: 55 93% 89%;
|
|
209
|
+
--mobielnl-warning-200: 55 95% 77%;
|
|
210
|
+
--mobielnl-warning-300: 53 94% 65%;
|
|
211
|
+
--mobielnl-warning-400: 50 94% 56%;
|
|
212
|
+
--mobielnl-warning-500: 44 90% 53%;
|
|
213
|
+
--mobielnl-warning-600: 39 93% 44%;
|
|
214
|
+
--mobielnl-warning-700: 33 88% 37%;
|
|
215
|
+
--mobielnl-warning-800: 29 80% 31%;
|
|
216
|
+
--mobielnl-warning-900: 28 76% 26%;
|
|
217
|
+
--mobielnl-warning: 39 93% 44%;
|
|
218
|
+
--mobielnl-warning-foreground: 0 0% 100%;
|
|
210
219
|
|
|
211
220
|
/* Danger */
|
|
212
|
-
--
|
|
213
|
-
--
|
|
214
|
-
--
|
|
215
|
-
--
|
|
216
|
-
--
|
|
217
|
-
--
|
|
218
|
-
--
|
|
219
|
-
--
|
|
220
|
-
--
|
|
221
|
-
--
|
|
222
|
-
--
|
|
223
|
-
--
|
|
221
|
+
--mobielnl-danger-50: 0 71% 97%;
|
|
222
|
+
--mobielnl-danger-100: 0 80% 94%;
|
|
223
|
+
--mobielnl-danger-200: 0 85% 89%;
|
|
224
|
+
--mobielnl-danger-300: 0 83% 82%;
|
|
225
|
+
--mobielnl-danger-400: 0 80% 71%;
|
|
226
|
+
--mobielnl-danger-500: 0 74% 60%;
|
|
227
|
+
--mobielnl-danger-600: 0 63% 51%;
|
|
228
|
+
--mobielnl-danger-700: 0 65% 42%;
|
|
229
|
+
--mobielnl-danger-800: 0 62% 35%;
|
|
230
|
+
--mobielnl-danger-900: 0 55% 31%;
|
|
231
|
+
--mobielnl-danger: 0 63% 51%;
|
|
232
|
+
--mobielnl-danger-foreground: 0 0% 100%;
|
|
224
233
|
|
|
225
234
|
/* Content */
|
|
226
|
-
--
|
|
227
|
-
--
|
|
228
|
-
--
|
|
229
|
-
--
|
|
230
|
-
--
|
|
231
|
-
--
|
|
232
|
-
--
|
|
233
|
-
--
|
|
235
|
+
--mobielnl-content1: 0 0% 100%;
|
|
236
|
+
--mobielnl-content1-foreground: 232 68% 21%;
|
|
237
|
+
--mobielnl-content2: 230 75% 98%;
|
|
238
|
+
--mobielnl-content2-foreground: 232 68% 21%;
|
|
239
|
+
--mobielnl-content3: 220 67% 96%;
|
|
240
|
+
--mobielnl-content3-foreground: 232 68% 21%;
|
|
241
|
+
--mobielnl-content4: 219 68% 95%;
|
|
242
|
+
--mobielnl-content4-foreground: 232 68% 21%;
|
|
234
243
|
|
|
235
244
|
/* Radius */
|
|
236
|
-
--
|
|
237
|
-
--
|
|
238
|
-
--
|
|
245
|
+
--mobielnl-radius-small: 8px;
|
|
246
|
+
--mobielnl-radius-medium: 12px;
|
|
247
|
+
--mobielnl-radius-large: 16px;
|
|
239
248
|
|
|
240
249
|
/* Border Width */
|
|
241
|
-
--
|
|
242
|
-
--
|
|
243
|
-
--
|
|
250
|
+
--mobielnl-border-width-small: 1px;
|
|
251
|
+
--mobielnl-border-width-medium: 2px;
|
|
252
|
+
--mobielnl-border-width-large: 3px;
|
|
244
253
|
|
|
245
254
|
/* Box Shadow */
|
|
246
|
-
--
|
|
247
|
-
0px 0px
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
255
|
+
--mobielnl-box-shadow-small:
|
|
256
|
+
0px 0px 5px 0px rgb(0 0 0 / 0.02), 0px 2px 10px 0px rgb(0 0 0 / 0.06), 0px 0px 1px 0px
|
|
257
|
+
rgb(0 0 0 / 0.3);
|
|
258
|
+
--mobielnl-box-shadow-medium:
|
|
259
|
+
0px 0px 15px 0px rgb(0 0 0 / 0.03), 0px 2px 30px 0px rgb(0 0 0 / 0.08), 0px 0px 1px 0px
|
|
260
|
+
rgb(0 0 0 / 0.3);
|
|
261
|
+
--mobielnl-box-shadow-large:
|
|
262
|
+
0px 0px 30px 0px rgb(0 0 0 / 0.04), 0px 30px 60px 0px rgb(0 0 0 / 0.12), 0px 0px 1px 0px
|
|
263
|
+
rgb(0 0 0 / 0.3);
|
|
252
264
|
|
|
253
265
|
/* Other */
|
|
254
|
-
--
|
|
255
|
-
--
|
|
256
|
-
--
|
|
257
|
-
--
|
|
258
|
-
--
|
|
266
|
+
--mobielnl-hover-opacity: 0.8;
|
|
267
|
+
--mobielnl-focus: 222 84% 54%;
|
|
268
|
+
--mobielnl-disabled-opacity: 0.5;
|
|
269
|
+
--mobielnl-divider: 218 18% 39%;
|
|
270
|
+
--mobielnl-overlay: 0 0% 0%;
|
|
259
271
|
}
|
|
260
272
|
|
|
261
273
|
/* Optional: dark theme overrides on the wrapper */
|
|
262
274
|
[data-theme="dark"].mobielnl-elements,
|
|
263
275
|
.mobielnl-elements[data-theme="dark"] {
|
|
264
|
-
--
|
|
265
|
-
--
|
|
276
|
+
--mobielnl-background: 0 0% 0%;
|
|
277
|
+
--mobielnl-foreground: 0 0% 94%;
|
|
266
278
|
}
|
|
267
279
|
```
|
|
268
280
|
|