@mindvalley/design-system 3.1.2 → 3.2.1
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/CHANGELOG.md +143 -5
- package/dist/b2b.js +2 -0
- package/dist/b2b.js.map +1 -0
- package/dist/helpers/casing.js +1 -1
- package/dist/icons/categories/wordmark-body-portugese.svg +1 -8
- package/dist/icons/categories/wordmark-career-portugese.svg +1 -8
- package/dist/icons/categories/wordmark-entrepreneurship-portugese.svg +1 -8
- package/dist/icons/categories/wordmark-mind-portugese.svg +1 -8
- package/dist/icons/categories/wordmark-parenting-portugese.svg +1 -8
- package/dist/icons/categories/wordmark-partner-programs-portugese.svg +1 -6
- package/dist/icons/categories/wordmark-relationships-portugese.svg +1 -8
- package/dist/icons/categories/wordmark-soul-portugese.svg +1 -8
- package/dist/icons/sprites/categories.svg +1 -1
- package/dist/icons/sprites/ui-icons.svg +1 -1
- package/dist/icons/ui-icons/android.svg +10 -0
- package/dist/icons/ui-icons/apple.svg +10 -0
- package/dist/icons/ui-icons/calendar-reminder-filled.svg +6 -0
- package/dist/icons/ui-icons/calendar-reminder-outlined.svg +12 -0
- package/dist/icons/ui-icons/message-request-filled.svg +3 -0
- package/dist/icons/ui-icons/message-request-outlined.svg +3 -0
- package/dist/icons/ui-icons/messenger.svg +3 -0
- package/dist/icons/ui-icons/playlist-filled.svg +5 -0
- package/dist/icons/ui-icons/playlist-outlined.svg +5 -0
- package/dist/icons/ui-icons/pods-filled.svg +3 -0
- package/dist/icons/ui-icons/pods-outlined.svg +3 -0
- package/dist/icons/ui-icons/share-arrow-filled.svg +3 -0
- package/dist/icons/ui-icons/share-arrow-outlined.svg +3 -0
- package/dist/icons/ui-icons/shorts.svg +5 -0
- package/dist/icons/ui-icons/shuffle-filled.svg +2 -3
- package/dist/icons/ui-icons/shuffle-outlined.svg +2 -2
- package/dist/icons/ui-icons/sliders-2-filled.svg +5 -0
- package/dist/icons/ui-icons/sliders-2-outlined.svg +5 -0
- package/dist/icons/ui-icons/telegram.svg +3 -0
- package/dist/icons/ui-icons/type-size-filled.svg +6 -0
- package/dist/icons/ui-icons/type-size-outlined.svg +6 -0
- package/dist/icons/ui-icons/unmute-filled.svg +1 -3
- package/dist/icons/ui-icons/unmute-outlined.svg +1 -3
- package/dist/icons/ui-icons/whatsapp.svg +3 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/tailwind/plugins/tokens/mindvalley/typography.js +1 -0
- package/dist/tailwind/plugins/typography.js +1 -1
- package/dist/wordmarks/sprites/topics.svg +1 -1
- package/dist/wordmarks/sprites/trainers.svg +1 -1
- package/dist/wordmarks/topics/coming-soon-becoming-irresistibly-sexy.svg +5 -0
- package/dist/wordmarks/topics/coming-soon-develop-your-supplement-routine.svg +5 -0
- package/dist/wordmarks/topics/coming-soon-gain-financial-freedom.svg +5 -0
- package/dist/wordmarks/topics/coming-soon-gut-health.svg +5 -0
- package/dist/wordmarks/topics/coming-soon-release-your-past-craft-a-new-future.svg +5 -0
- package/dist/wordmarks/topics/coming-soon-the-champion-mindset.svg +5 -0
- package/dist/wordmarks/topics/coming-soon-the-stage-effect.svg +5 -0
- package/dist/wordmarks/trainers/donna-eden-david-feinstein-left.svg +1 -1
- package/dist/wordmarks/trainers/dr-laura-berman-left.svg +10 -0
- package/dist/wordmarks/trainers/dr-laura-berman.svg +10 -0
- package/dist/wordmarks/trainers/dr-srikumar-rao-left.svg +10 -0
- package/dist/wordmarks/trainers/dr-srikumar-rao.svg +1 -1
- package/dist/wordmarks/trainers/florencia-andres-left.svg +1 -1
- package/dist/wordmarks/trainers/jeffrey-perlman.svg +1 -1
- package/dist/wordmarks/trainers/jimmy-naraine.svg +1 -1
- package/dist/wordmarks/trainers/john-lee-left.svg +10 -0
- package/dist/wordmarks/trainers/john-lee.svg +10 -0
- package/dist/wordmarks/trainers/left-anodea-judith.svg +10 -0
- package/dist/wordmarks/trainers/left-antwone-stigall.svg +10 -0
- package/dist/wordmarks/trainers/marisa-peer-left.svg +1 -1
- package/dist/wordmarks/trainers/marisha-lakhiani-left.svg +10 -0
- package/dist/wordmarks/trainers/marisha-lakhiani.svg +10 -0
- package/dist/wordmarks/trainers/nuseir-yassin.svg +10 -0
- package/docs/USAGE.md +101 -4
- package/docs/icons/brand-icons.md +1 -1
- package/docs/icons/categories.md +9 -9
- package/docs/icons/ui-icons.md +355 -121
- package/docs/wordmarks/topics.md +92 -1
- package/docs/wordmarks/trainers.md +128 -37
- package/package.json +6 -1
- package/dist/tailwind/plugins/tokens/typography.js +0 -1
package/docs/USAGE.md
CHANGED
|
@@ -52,6 +52,28 @@ If you use TailwindCSS in your project, using the colors is a simple two-step pr
|
|
|
52
52
|
}
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
+
For other brands eg B2B, you can access and combine colors from the core mindvalley brand
|
|
56
|
+
and override the redefined colors using the b2b specific colors.
|
|
57
|
+
|
|
58
|
+
```js
|
|
59
|
+
const { colors } = require('@mindvalley/design-system');
|
|
60
|
+
const { colors: b2bColors } = require('@mindvalley/design-system/b2b');
|
|
61
|
+
|
|
62
|
+
module.exports = {
|
|
63
|
+
theme: {
|
|
64
|
+
colors: {
|
|
65
|
+
...color,
|
|
66
|
+
...b2bColors
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Why the override?
|
|
73
|
+
Both brands share color names, but their hues and shades are distinct. For instance, the reds, blues, teals, and purples in b2b differ. Therefore, the override is necessary to guarantee that a developer working on b2b receives the specific shades of colors associated with b2b.
|
|
74
|
+
|
|
75
|
+
Here is full list of [b2b colors](https://www.figma.com/file/1EPj7v5H5JhP2d0v2h8QeC/B2B-Foundations?type=design&node-id=1-395&mode=design&t=SY5HTy1zbFO5p80n-0)
|
|
76
|
+
|
|
55
77
|
#### Gradients
|
|
56
78
|
|
|
57
79
|
For gradient you can use the following tailwindCSS gradients:
|
|
@@ -161,7 +183,7 @@ Let's say that you are trying to codify a button from a Figma design, and you wa
|
|
|
161
183
|
|
|
162
184
|
*Note that*
|
|
163
185
|
|
|
164
|
-
- The typography plugin by default, generates Kebab cased class names, such as `title-bold-1`. However, you can customize the class name casing by passing a `casing` option to the plugin. Supported casing options include `snakeCase`, `camelCase`, and `
|
|
186
|
+
- The typography plugin by default, generates Kebab cased class names, such as `title-bold-1`. However, you can customize the class name casing by passing a `casing` option to the plugin. Supported casing options include `snakeCase`, `camelCase`, `pascalCase`, and `noCase`.
|
|
165
187
|
|
|
166
188
|
Here is how to pass the casing:
|
|
167
189
|
|
|
@@ -169,17 +191,17 @@ Here is how to pass the casing:
|
|
|
169
191
|
module.exports = {
|
|
170
192
|
...
|
|
171
193
|
plugins: [
|
|
172
|
-
require('@mindvalley/design-system/dist/tailwind/plugins/typography.js')({ casing: "
|
|
194
|
+
require('@mindvalley/design-system/dist/tailwind/plugins/typography.js')({ casing: "noCase" }),
|
|
173
195
|
],
|
|
174
196
|
...
|
|
175
197
|
}
|
|
176
198
|
```
|
|
177
199
|
|
|
178
200
|
Output:
|
|
179
|
-
When using `
|
|
201
|
+
When using `noCase`, the generated CSS class will look like this:
|
|
180
202
|
|
|
181
203
|
```css
|
|
182
|
-
.
|
|
204
|
+
.titlebold8 {
|
|
183
205
|
...
|
|
184
206
|
}
|
|
185
207
|
```
|
|
@@ -221,6 +243,81 @@ Since the typography classes are responsive, you don't need to add media queries
|
|
|
221
243
|
}
|
|
222
244
|
```
|
|
223
245
|
|
|
246
|
+
#### Configuring the brand
|
|
247
|
+
The Mindvalley design system also supports multiple brands, including the core Mindvalley brand and a B2B (business-to-business) brand. Each brand has its own set of typography tokens that can be used to ensure consistency across different projects and platforms.
|
|
248
|
+
|
|
249
|
+
To configure the typography for a specific brand within your TailwindCSS setup, you will need to adjust your `tailwind.config.js` file to include the brand-specific typography tokens.
|
|
250
|
+
|
|
251
|
+
Here's how you can configure the brand:
|
|
252
|
+
1. In your `tailwind.config.js` file, require and configure the typography plugin with the brand option.
|
|
253
|
+
|
|
254
|
+
For the core Mindvalley brand:
|
|
255
|
+
|
|
256
|
+
```js
|
|
257
|
+
module.exports = {
|
|
258
|
+
// ...
|
|
259
|
+
plugins: [
|
|
260
|
+
require('@mindvalley/design-system/dist/tailwind/plugins/typography.js')({
|
|
261
|
+
brands: ['mindvalley']
|
|
262
|
+
}),
|
|
263
|
+
],
|
|
264
|
+
// ...
|
|
265
|
+
}
|
|
266
|
+
```
|
|
267
|
+
This is the same as the default config and ends up rendering typography classes for Mindvalley's core
|
|
268
|
+
design. You can omit this if you are working with just the normal Mindvalley brand.
|
|
269
|
+
|
|
270
|
+
For the B2B brand:
|
|
271
|
+
|
|
272
|
+
```js
|
|
273
|
+
module.exports = {
|
|
274
|
+
// ...
|
|
275
|
+
plugins: [
|
|
276
|
+
require('@mindvalley/design-system/dist/tailwind/plugins/typography.js')({
|
|
277
|
+
brands: ['mindvalley', 'b2b']
|
|
278
|
+
}),
|
|
279
|
+
],
|
|
280
|
+
// ...
|
|
281
|
+
}
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
This configuration will generate the necessary CSS classes for typography based on the tokens defined for each brand.
|
|
285
|
+
You can then use these classes in your HTML or JSX files to apply the correct typography styles for the brand
|
|
286
|
+
you are working on.
|
|
287
|
+
|
|
288
|
+
Note: B2b brand builds on top of the core brand typography with an additional specific typography style. As such we have to have both options added to the brands config list for both to be included.
|
|
289
|
+
|
|
290
|
+
Browse [B2B foundations figma file](https://www.figma.com/file/1EPj7v5H5JhP2d0v2h8QeC/B2B-Foundations?type=design&node-id=139-11&mode=design&t=SY5HTy1zbFO5p80n-0) to see the specific typography.
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
#### Configuring the Prefix
|
|
294
|
+
|
|
295
|
+
To customize the class names further, you can prepend a prefix to all typography class names generated by the plugin. This is particularly useful for specific naming conventions.
|
|
296
|
+
|
|
297
|
+
Here is how to pass the prefix:
|
|
298
|
+
|
|
299
|
+
```js
|
|
300
|
+
module.exports = {
|
|
301
|
+
...
|
|
302
|
+
plugins: [
|
|
303
|
+
require('@mindvalley/design-system/dist/tailwind/plugins/typography.js')({
|
|
304
|
+
prefix: "mv-type--", // Your desired prefix
|
|
305
|
+
// other options...
|
|
306
|
+
}),
|
|
307
|
+
],
|
|
308
|
+
...
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
Output:
|
|
312
|
+
When using `mv-type--`, the generated CSS class will look like this:
|
|
313
|
+
|
|
314
|
+
```css
|
|
315
|
+
.mv-type--title-bold-3 {
|
|
316
|
+
...
|
|
317
|
+
}
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
|
|
224
321
|
#### Configuring the breakpoint
|
|
225
322
|
|
|
226
323
|
By default, the plugin uses the `lg` breakpoint from the [screen size configuration](https://tailwindcss.com/docs/screens) in your Tailwind configuration. If you have a different configuration or naming convention for your Tailwind breakpoints, you can specify the identifier of the desired breakpoint using the `breakingPoint` option in the plugin configuration.
|