@mindvalley/design-system 3.4.2 → 4.0.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 +90 -2
- package/dist/b2b.d.ts +45 -45
- package/dist/b2b.d.ts.map +1 -1
- package/dist/b2b.js +1 -1
- package/dist/b2b.js.map +1 -1
- package/dist/helpers/casing.d.ts.map +1 -1
- package/dist/helpers/casing.js +21 -23
- package/dist/helpers/dimens.d.ts +1 -0
- package/dist/helpers/dimens.d.ts.map +1 -1
- package/dist/helpers/dimens.js +11 -2
- package/dist/helpers/regex.d.ts.map +1 -1
- package/dist/index.d.ts +98 -83
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/tailwind/plugins/tokens/b2b/typography.d.ts.map +1 -1
- package/dist/tailwind/plugins/tokens/b2b/typography.js +25 -26
- package/dist/tailwind/plugins/tokens/mindvalley/typography.d.ts.map +1 -1
- package/dist/tailwind/plugins/tokens/mindvalley/typography.js +60 -67
- package/dist/tailwind/plugins/typography.d.ts.map +1 -1
- package/dist/tailwind/plugins/typography.js +25 -15
- package/dist/typography/b2b/fonts.css +19 -0
- package/dist/typography/b2b/fonts.d.ts +8 -0
- package/dist/typography/b2b/fonts.js +30 -0
- package/dist/typography/mindvalley/fonts.css +43 -0
- package/dist/typography/mindvalley/fonts.d.ts +8 -0
- package/dist/typography/mindvalley/fonts.js +54 -0
- package/docs/USAGE.md +121 -76
- package/docs/typography-fonts.md +552 -0
- package/docs/typography-token-pipeline-b2b.md +156 -0
- package/package.json +17 -3
- package/docs/token-validation.md +0 -298
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,102 @@
|
|
|
1
|
-
## [
|
|
1
|
+
## [4.0.1](https://github.com/mindvalley/mv-design-system/compare/v4.0.0...v4.0.1) (2026-01-05)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* Patched b2b back colors to how they were in v3.4.2 ([#142](https://github.com/mindvalley/mv-design-system/issues/142)) ([1d03f74](https://github.com/mindvalley/mv-design-system/commit/1d03f745d908aa762669b9066b7702eabd849141))
|
|
7
7
|
|
|
8
8
|
# Changelog
|
|
9
9
|
|
|
10
10
|
All notable changes to this project will be documented in this file.
|
|
11
11
|
|
|
12
|
+
# [4.0.0](https://github.com/mindvalley/mv-design-system/compare/v3.4.2...v4.0.0) (2025-11-20)
|
|
13
|
+
|
|
14
|
+
### ✨ Features
|
|
15
|
+
|
|
16
|
+
* **Typography Font Loading**: New utility to generate `@font-face` CSS declarations for typography tokens
|
|
17
|
+
* Automatic font-face generation for both Mindvalley and B2B brands
|
|
18
|
+
* Outputs CSS, JS, and TypeScript declaration files
|
|
19
|
+
* Maps Sharp Grotesk fonts to Fastly CDN URLs
|
|
20
|
+
* See [Typography Font Loading Guide](./docs/typography-fonts.md) for usage
|
|
21
|
+
* New exports: `@mindvalley/design-system/typography/mindvalley/fonts.css` and `/b2b/fonts.css`
|
|
22
|
+
|
|
23
|
+
### 📝 Typography Changes
|
|
24
|
+
|
|
25
|
+
#### Mindvalley Brand
|
|
26
|
+
|
|
27
|
+
**New Typography Tokens:**
|
|
28
|
+
|
|
29
|
+
| Token | Font Family | Size | Letter Spacing | Line Height | Weight |
|
|
30
|
+
|-------|-------------|------|----------------|-------------|--------|
|
|
31
|
+
| `body-italic` | Sharp Grotesk Cyr Book Itl 19 | 16px | 0.35px | 24px | 400 |
|
|
32
|
+
| `body-large-italic` | Sharp Grotesk Cyr Book Itl 19 | 20px | 0.25px | 30px | 400 |
|
|
33
|
+
| `body-small-italic` | Sharp Grotesk Cyr Book Itl 19 | 14px | 0.35px | 20px | 400 |
|
|
34
|
+
| `body-xs-italic` | Sharp Grotesk Cyr Book 19 | 12px | 0.35px | 16px | 400 |
|
|
35
|
+
| `body-xs` | Sharp Grotesk Cyr Book 19 | 12px | 0.35px | 16px | 400 |
|
|
36
|
+
| `body-large-bold` | Sharp Grotesk Cyr Medium 19 | 20px | 0.25px | 30px | 500 |
|
|
37
|
+
|
|
38
|
+
**Font Family Corrections:**
|
|
39
|
+
|
|
40
|
+
| Token | Before | After |
|
|
41
|
+
|-------|--------|-------|
|
|
42
|
+
| All `title-bold-*` variants | Sharp Grotesk Cyr Semibold **21** | Sharp Grotesk Cyr Semibold **20** |
|
|
43
|
+
| `body-bold` | Sharp Grotesk Cyr Semibold 20 | Sharp Grotesk Cyr Medium 19 |
|
|
44
|
+
| `body-small-bold` | Sharp Grotesk Cyr Semibold 20 | Sharp Grotesk Cyr Medium 19 |
|
|
45
|
+
|
|
46
|
+
**Line Height Updates:**
|
|
47
|
+
|
|
48
|
+
| Token | Before | After | Notes |
|
|
49
|
+
|-------|--------|-------|-------|
|
|
50
|
+
| `title-2-mobile` | 38px | 40px | Increased spacing |
|
|
51
|
+
| `title-4-desktop` | 34px | 36px | Increased spacing |
|
|
52
|
+
| `title-bold-6` through `title-bold-11` | Various | 0px | Browser-calculated (mobile & desktop) |
|
|
53
|
+
|
|
54
|
+
**Token Consolidation:**
|
|
55
|
+
|
|
56
|
+
* `title-7`, `title-8`, `title-9`, `title-10`, `title-11`: Merged from separate mobile/desktop variants into single responsive tokens
|
|
57
|
+
|
|
58
|
+
#### B2B Brand
|
|
59
|
+
|
|
60
|
+
**Line Height Updates:**
|
|
61
|
+
|
|
62
|
+
| Token | Before | After | Notes |
|
|
63
|
+
|-------|--------|-------|-------|
|
|
64
|
+
| `heading-1` through `heading-5` | Various | 0px | Browser-calculated (mobile & desktop) |
|
|
65
|
+
| `display-3-mobile` | 58px | 56px | Reduced spacing |
|
|
66
|
+
|
|
67
|
+
**Token Consolidation:**
|
|
68
|
+
|
|
69
|
+
* `heading-9`, `heading-10`: Merged from separate mobile/desktop variants into single responsive tokens
|
|
70
|
+
|
|
71
|
+
**Font Weight Addition:**
|
|
72
|
+
|
|
73
|
+
* All B2B typography tokens now include explicit `fontWeight: 500`
|
|
74
|
+
|
|
75
|
+
### 🔧 Code Quality
|
|
76
|
+
|
|
77
|
+
* **TypeScript**: Comprehensive type improvements throughout the codebase
|
|
78
|
+
* Proper interfaces for typography tokens (no more `any` types)
|
|
79
|
+
* Enhanced Zod schema validation
|
|
80
|
+
* Better type safety for Style Dictionary v5 APIs
|
|
81
|
+
* **Testing**: All 386 tests passing with updated expectations for opacity suffixes
|
|
82
|
+
* **Formatting**: Applied Biome 2.3.4 formatting across all files
|
|
83
|
+
|
|
84
|
+
### 📚 Documentation
|
|
85
|
+
|
|
86
|
+
* Added comprehensive [Typography Font Loading Guide](./docs/typography-fonts.md) with framework examples (Next.js, Vite, Vue, Phoenix, etc.)
|
|
87
|
+
* Updated USAGE.md with new font loading instructions
|
|
88
|
+
|
|
89
|
+
### 📦 Package Updates
|
|
90
|
+
|
|
91
|
+
* Updated `@biomejs/biome` to 2.3.4
|
|
92
|
+
* Enhanced package.json exports for typography font files
|
|
93
|
+
|
|
94
|
+
## [3.4.2](https://github.com/mindvalley/mv-design-system/compare/v3.4.1...v3.4.2) (2025-10-22)
|
|
95
|
+
|
|
96
|
+
### Bug Fixes
|
|
97
|
+
|
|
98
|
+
* Disable npm provenance for private repository ([#138](https://github.com/mindvalley/mv-design-system/issues/138)) ([df21279](https://github.com/mindvalley/mv-design-system/commit/df212796ce7bfaa60dcc8792649112b977a99456))
|
|
99
|
+
|
|
12
100
|
# [3.4.0](https://github.com/mindvalley/mv-design-system/compare/v3.3.4...v3.4.0) (2025-09-03)
|
|
13
101
|
|
|
14
102
|
### Bug Fixes
|
package/dist/b2b.d.ts
CHANGED
|
@@ -4,57 +4,27 @@ export interface ColorTokens {
|
|
|
4
4
|
export declare const colors: ColorTokens;
|
|
5
5
|
declare const _default: {
|
|
6
6
|
colors: {
|
|
7
|
-
"red-50": string;
|
|
8
|
-
"red-100": string;
|
|
9
|
-
"red-200": string;
|
|
10
|
-
"red-300": string;
|
|
11
|
-
"red-400": string;
|
|
12
|
-
"red-500": string;
|
|
13
|
-
"red-600": string;
|
|
14
|
-
"red-700": string;
|
|
15
|
-
"red-800": string;
|
|
16
|
-
"red-900": string;
|
|
17
|
-
"teal-50": string;
|
|
18
|
-
"teal-100": string;
|
|
19
|
-
"teal-200": string;
|
|
20
|
-
"teal-300": string;
|
|
21
|
-
"teal-400": string;
|
|
22
|
-
"teal-500": string;
|
|
23
|
-
"teal-600": string;
|
|
24
|
-
"teal-700": string;
|
|
25
|
-
"teal-800": string;
|
|
26
|
-
"teal-900": string;
|
|
27
|
-
"red-18a": string;
|
|
28
|
-
"red-12a": string;
|
|
29
|
-
"red-8a": string;
|
|
30
|
-
"red-4a": string;
|
|
31
|
-
"brown-90a": string;
|
|
32
|
-
"red-28a": string;
|
|
33
|
-
"dark-brown-12a": string;
|
|
34
|
-
"dark-brown-80a": string;
|
|
35
|
-
"brown-24a": string;
|
|
36
7
|
"brown-12a": string;
|
|
8
|
+
"brown-24a": string;
|
|
37
9
|
"brown-8a": string;
|
|
10
|
+
"brown-90a": string;
|
|
11
|
+
"dark-brown-12a": string;
|
|
38
12
|
"dark-brown-24a": string;
|
|
39
|
-
"dark-brown-8a": string;
|
|
40
13
|
"dark-brown-4a": string;
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"purple-28a": string;
|
|
44
|
-
"purple-18a": string;
|
|
14
|
+
"dark-brown-8a": string;
|
|
15
|
+
"dark-brown-80a": string;
|
|
45
16
|
"purple-12a": string;
|
|
46
|
-
"purple-
|
|
17
|
+
"purple-18a": string;
|
|
18
|
+
"purple-28a": string;
|
|
47
19
|
"purple-4a": string;
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"brown-800": string;
|
|
57
|
-
"brown-900": string;
|
|
20
|
+
"purple-70a": string;
|
|
21
|
+
"purple-8a": string;
|
|
22
|
+
"red-12a": string;
|
|
23
|
+
"red-18a": string;
|
|
24
|
+
"red-28a": string;
|
|
25
|
+
"red-4a": string;
|
|
26
|
+
"red-70a": string;
|
|
27
|
+
"red-8a": string;
|
|
58
28
|
"blue-50": string;
|
|
59
29
|
"blue-100": string;
|
|
60
30
|
"blue-200": string;
|
|
@@ -65,6 +35,16 @@ declare const _default: {
|
|
|
65
35
|
"blue-700": string;
|
|
66
36
|
"blue-800": string;
|
|
67
37
|
"blue-900": string;
|
|
38
|
+
"brown-50": string;
|
|
39
|
+
"brown-100": string;
|
|
40
|
+
"brown-200": string;
|
|
41
|
+
"brown-300": string;
|
|
42
|
+
"brown-400": string;
|
|
43
|
+
"brown-500": string;
|
|
44
|
+
"brown-600": string;
|
|
45
|
+
"brown-700": string;
|
|
46
|
+
"brown-800": string;
|
|
47
|
+
"brown-900": string;
|
|
68
48
|
"purple-50": string;
|
|
69
49
|
"purple-100": string;
|
|
70
50
|
"purple-200": string;
|
|
@@ -75,6 +55,26 @@ declare const _default: {
|
|
|
75
55
|
"purple-700": string;
|
|
76
56
|
"purple-800": string;
|
|
77
57
|
"purple-900": string;
|
|
58
|
+
"red-50": string;
|
|
59
|
+
"red-100": string;
|
|
60
|
+
"red-200": string;
|
|
61
|
+
"red-300": string;
|
|
62
|
+
"red-400": string;
|
|
63
|
+
"red-500": string;
|
|
64
|
+
"red-600": string;
|
|
65
|
+
"red-700": string;
|
|
66
|
+
"red-800": string;
|
|
67
|
+
"red-900": string;
|
|
68
|
+
"teal-50": string;
|
|
69
|
+
"teal-100": string;
|
|
70
|
+
"teal-200": string;
|
|
71
|
+
"teal-300": string;
|
|
72
|
+
"teal-400": string;
|
|
73
|
+
"teal-500": string;
|
|
74
|
+
"teal-600": string;
|
|
75
|
+
"teal-700": string;
|
|
76
|
+
"teal-800": string;
|
|
77
|
+
"teal-900": string;
|
|
78
78
|
};
|
|
79
79
|
};
|
|
80
80
|
export default _default;
|
package/dist/b2b.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"b2b.d.ts","sourceRoot":"","sources":["../src/b2b.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,WAAW;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"b2b.d.ts","sourceRoot":"","sources":["../src/b2b.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,WAAW;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CACtB;AAMD,eAAO,MAAM,MAAM,EAAmB,WAAW,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGjD,wBAEC"}
|
package/dist/b2b.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.mvDesignSystem=r():e.mvDesignSystem=r()}(this,()=>(()=>{var e={875:e=>{e.exports={"
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.mvDesignSystem=r():e.mvDesignSystem=r()}(this,(()=>(()=>{var e={875:e=>{e.exports={"brown-12a":"rgba(249, 248, 244, 0.12)","brown-24a":"rgba(249, 248, 244, 0.24)","brown-8a":"rgba(249, 248, 244, 0.08)","brown-90a":"rgba(249, 248, 244, 0.9)","dark-brown-12a":"rgba(135, 121, 111, 0.12)","dark-brown-24a":"rgba(135, 121, 111, 0.24)","dark-brown-4a":"rgba(135, 121, 111, 0.04)","dark-brown-8a":"rgba(135, 121, 111, 0.08)","dark-brown-80a":"rgba(135, 121, 111, 0.8)","purple-12a":"rgba(158, 148, 241, 0.12)","purple-18a":"rgba(158, 148, 241, 0.18)","purple-28a":"rgba(158, 148, 241, 0.28)","purple-4a":"rgba(158, 148, 241, 0.04)","purple-70a":"rgba(158, 148, 241, 0.7)","purple-8a":"rgba(158, 148, 241, 0.08)","red-12a":"rgba(255, 109, 92, 0.12)","red-18a":"rgba(255, 109, 92, 0.18)","red-28a":"rgba(255, 109, 92, 0.28)","red-4a":"rgba(255, 109, 92, 0.04)","red-70a":"rgba(255, 109, 92, 0.7)","red-8a":"rgba(255, 109, 92, 0.08)","blue-50":"#f0f6fe","blue-100":"#dce9fd","blue-200":"#c2dafb","blue-300":"#98c3f8","blue-400":"#67a3f3","blue-500":"#4380ee","blue-600":"#3165e3","blue-700":"#204bb4","blue-800":"#192e75","blue-900":"#121f54","brown-50":"#f9f8f4","brown-100":"#f3efe9","brown-200":"#ede6de","brown-300":"#d4c5ba","brown-400":"#ae9f95","brown-500":"#87796f","brown-600":"#6f635c","brown-700":"#574e48","brown-800":"#3f3835","brown-900":"#272221","purple-50":"#f5f4fe","purple-100":"#ecebfc","purple-200":"#dad9fb","purple-300":"#bfbbf7","purple-400":"#9e94f1","purple-500":"#7e68ea","purple-600":"#664bdd","purple-700":"#4d2dab","purple-800":"#40268c","purple-900":"#26175e","red-50":"#fff2f1","red-100":"#ffe4e2","red-200":"#ffada7","red-300":"#ff8d82","red-400":"#ff6d5c","red-500":"#e85546","red-600":"#d03c2f","red-700":"#a83126","red-800":"#782b24","red-900":"#41120e","teal-50":"#f1fcfb","teal-100":"#d1f6f3","teal-200":"#a3ece8","teal-300":"#6ddbda","teal-400":"#3cbcbe","teal-500":"#25a4a7","teal-600":"#1b8186","teal-700":"#1a6367","teal-800":"#194448","teal-900":"#09252a"}}},r={};function a(b){var f=r[b];if(void 0!==f)return f.exports;var d=r[b]={exports:{}};return e[b](d,d.exports,a),d.exports}var b={};return(()=>{"use strict";var e=b;Object.defineProperty(e,"__esModule",{value:!0}),e.colors=void 0;const r=a(875);e.colors=r,e.default={colors:r}})(),b})()));
|
|
2
2
|
//# sourceMappingURL=b2b.js.map
|
package/dist/b2b.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"b2b.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAwB,eAAID,IAE5BD,EAAqB,eAAIC,GAC1B,CATD,CASGK,
|
|
1
|
+
{"version":3,"file":"b2b.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAwB,eAAID,IAE5BD,EAAqB,eAAIC,GAC1B,CATD,CASGK,MAAM,I,qBCLTH,EAAOD,QAAU,CACf,YAAa,4BACb,YAAa,4BACb,WAAY,4BACZ,YAAa,2BACb,iBAAkB,4BAClB,iBAAkB,4BAClB,gBAAiB,4BACjB,gBAAiB,4BACjB,iBAAkB,2BAClB,aAAc,4BACd,aAAc,4BACd,aAAc,4BACd,YAAa,4BACb,aAAc,2BACd,YAAa,4BACb,UAAW,2BACX,UAAW,2BACX,UAAW,2BACX,SAAU,2BACV,UAAW,0BACX,SAAU,2BACV,UAAW,UACX,WAAY,UACZ,WAAY,UACZ,WAAY,UACZ,WAAY,UACZ,WAAY,UACZ,WAAY,UACZ,WAAY,UACZ,WAAY,UACZ,WAAY,UACZ,WAAY,UACZ,YAAa,UACb,YAAa,UACb,YAAa,UACb,YAAa,UACb,YAAa,UACb,YAAa,UACb,YAAa,UACb,YAAa,UACb,YAAa,UACb,YAAa,UACb,aAAc,UACd,aAAc,UACd,aAAc,UACd,aAAc,UACd,aAAc,UACd,aAAc,UACd,aAAc,UACd,aAAc,UACd,aAAc,UACd,SAAU,UACV,UAAW,UACX,UAAW,UACX,UAAW,UACX,UAAW,UACX,UAAW,UACX,UAAW,UACX,UAAW,UACX,UAAW,UACX,UAAW,UACX,UAAW,UACX,WAAY,UACZ,WAAY,UACZ,WAAY,UACZ,WAAY,UACZ,WAAY,UACZ,WAAY,UACZ,WAAY,UACZ,WAAY,UACZ,WAAY,U,GC1EVK,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaR,QAGrB,IAAIC,EAASI,EAAyBE,GAAY,CAGjDP,QAAS,CAAC,GAOX,OAHAU,EAAoBH,GAAUN,EAAQA,EAAOD,QAASM,GAG/CL,EAAOD,OACf,C,0CCrBAW,OAAOC,eAAeZ,EAAS,aAAc,CAAEa,OAAO,IACtDb,EAAQc,YAAS,EAEjB,MAAMC,EAAe,EAAQ,KAE7Bf,EAAQc,OAASC,EAEjBf,EAAA,QAAkB,CACdc,OAAQC,E","sources":["webpack://mvDesignSystem/webpack/universalModuleDefinition","webpack://mvDesignSystem/./src/build/js/b2b/colors.js","webpack://mvDesignSystem/webpack/bootstrap","webpack://mvDesignSystem/./src/b2b.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"mvDesignSystem\"] = factory();\n\telse\n\t\troot[\"mvDesignSystem\"] = factory();\n})(this, () => {\nreturn ","/**\n * Do not edit directly, this file was auto-generated.\n */\n\nmodule.exports = {\n \"brown-12a\": \"rgba(249, 248, 244, 0.12)\",\n \"brown-24a\": \"rgba(249, 248, 244, 0.24)\",\n \"brown-8a\": \"rgba(249, 248, 244, 0.08)\",\n \"brown-90a\": \"rgba(249, 248, 244, 0.9)\",\n \"dark-brown-12a\": \"rgba(135, 121, 111, 0.12)\",\n \"dark-brown-24a\": \"rgba(135, 121, 111, 0.24)\",\n \"dark-brown-4a\": \"rgba(135, 121, 111, 0.04)\",\n \"dark-brown-8a\": \"rgba(135, 121, 111, 0.08)\",\n \"dark-brown-80a\": \"rgba(135, 121, 111, 0.8)\",\n \"purple-12a\": \"rgba(158, 148, 241, 0.12)\",\n \"purple-18a\": \"rgba(158, 148, 241, 0.18)\",\n \"purple-28a\": \"rgba(158, 148, 241, 0.28)\",\n \"purple-4a\": \"rgba(158, 148, 241, 0.04)\",\n \"purple-70a\": \"rgba(158, 148, 241, 0.7)\",\n \"purple-8a\": \"rgba(158, 148, 241, 0.08)\",\n \"red-12a\": \"rgba(255, 109, 92, 0.12)\",\n \"red-18a\": \"rgba(255, 109, 92, 0.18)\",\n \"red-28a\": \"rgba(255, 109, 92, 0.28)\",\n \"red-4a\": \"rgba(255, 109, 92, 0.04)\",\n \"red-70a\": \"rgba(255, 109, 92, 0.7)\",\n \"red-8a\": \"rgba(255, 109, 92, 0.08)\",\n \"blue-50\": \"#f0f6fe\",\n \"blue-100\": \"#dce9fd\",\n \"blue-200\": \"#c2dafb\",\n \"blue-300\": \"#98c3f8\",\n \"blue-400\": \"#67a3f3\",\n \"blue-500\": \"#4380ee\",\n \"blue-600\": \"#3165e3\",\n \"blue-700\": \"#204bb4\",\n \"blue-800\": \"#192e75\",\n \"blue-900\": \"#121f54\",\n \"brown-50\": \"#f9f8f4\",\n \"brown-100\": \"#f3efe9\",\n \"brown-200\": \"#ede6de\",\n \"brown-300\": \"#d4c5ba\",\n \"brown-400\": \"#ae9f95\",\n \"brown-500\": \"#87796f\",\n \"brown-600\": \"#6f635c\",\n \"brown-700\": \"#574e48\",\n \"brown-800\": \"#3f3835\",\n \"brown-900\": \"#272221\",\n \"purple-50\": \"#f5f4fe\",\n \"purple-100\": \"#ecebfc\",\n \"purple-200\": \"#dad9fb\",\n \"purple-300\": \"#bfbbf7\",\n \"purple-400\": \"#9e94f1\",\n \"purple-500\": \"#7e68ea\",\n \"purple-600\": \"#664bdd\",\n \"purple-700\": \"#4d2dab\",\n \"purple-800\": \"#40268c\",\n \"purple-900\": \"#26175e\",\n \"red-50\": \"#fff2f1\",\n \"red-100\": \"#ffe4e2\",\n \"red-200\": \"#ffada7\",\n \"red-300\": \"#ff8d82\",\n \"red-400\": \"#ff6d5c\",\n \"red-500\": \"#e85546\",\n \"red-600\": \"#d03c2f\",\n \"red-700\": \"#a83126\",\n \"red-800\": \"#782b24\",\n \"red-900\": \"#41120e\",\n \"teal-50\": \"#f1fcfb\",\n \"teal-100\": \"#d1f6f3\",\n \"teal-200\": \"#a3ece8\",\n \"teal-300\": \"#6ddbda\",\n \"teal-400\": \"#3cbcbe\",\n \"teal-500\": \"#25a4a7\",\n \"teal-600\": \"#1b8186\",\n \"teal-700\": \"#1a6367\",\n \"teal-800\": \"#194448\",\n \"teal-900\": \"#09252a\",\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.colors = void 0;\n// Import colors from CommonJS module\nconst colorsModule = require(\"./build/js/b2b/colors\");\n// Re-export colors with proper typing\nexports.colors = colorsModule;\n// Default export for CommonJS compatibility\nexports.default = {\n colors: colorsModule,\n};\n"],"names":["root","factory","exports","module","define","amd","this","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","Object","defineProperty","value","colors","colorsModule"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"casing.d.ts","sourceRoot":"","sources":["../../src/helpers/casing.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO;;;;;;CAMV,
|
|
1
|
+
{"version":3,"file":"casing.d.ts","sourceRoot":"","sources":["../../src/helpers/casing.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO;;;;;;CAMV,CAAA;AAEV,wBAAgB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,CAK/D;AAED,wBAAgB,WAAW,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,CAKlE;AAED,wBAAgB,WAAW,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,CAKlE;AAED,wBAAgB,WAAW,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,CAelE;AAED,wBAAgB,YAAY,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,CAKnE"}
|
package/dist/helpers/casing.js
CHANGED
|
@@ -8,39 +8,39 @@ exports.toCamelCase = toCamelCase;
|
|
|
8
8
|
exports.toPascalCase = toPascalCase;
|
|
9
9
|
const regex_1 = require("./regex");
|
|
10
10
|
exports.CASINGS = {
|
|
11
|
-
snakeCase:
|
|
12
|
-
camelCase:
|
|
13
|
-
pascalCase:
|
|
14
|
-
kebabCase:
|
|
15
|
-
noCase:
|
|
11
|
+
snakeCase: 'snakeCase',
|
|
12
|
+
camelCase: 'camelCase',
|
|
13
|
+
pascalCase: 'pascalCase',
|
|
14
|
+
kebabCase: 'kebabCase',
|
|
15
|
+
noCase: 'noCase',
|
|
16
16
|
};
|
|
17
17
|
function toNoCase(input) {
|
|
18
18
|
const words = toWordsList(input);
|
|
19
19
|
if (words.length === 0)
|
|
20
|
-
return
|
|
21
|
-
return words.join(
|
|
20
|
+
return '';
|
|
21
|
+
return words.join('').toLowerCase();
|
|
22
22
|
}
|
|
23
23
|
function toKebabCase(input) {
|
|
24
24
|
const words = toWordsList(input);
|
|
25
25
|
if (words.length === 0)
|
|
26
|
-
return
|
|
27
|
-
return words.map((x) => x.toLowerCase()).join(
|
|
26
|
+
return '';
|
|
27
|
+
return words.map((x) => x.toLowerCase()).join('-');
|
|
28
28
|
}
|
|
29
29
|
function toSnakeCase(input) {
|
|
30
30
|
const words = toWordsList(input);
|
|
31
31
|
if (words.length === 0)
|
|
32
|
-
return
|
|
33
|
-
return words.map((x) => x.toLowerCase()).join(
|
|
32
|
+
return '';
|
|
33
|
+
return words.map((x) => x.toLowerCase()).join('_');
|
|
34
34
|
}
|
|
35
35
|
function toCamelCase(input) {
|
|
36
36
|
const words = toWordsList(input);
|
|
37
37
|
if (words.length === 0)
|
|
38
|
-
return
|
|
39
|
-
let result =
|
|
38
|
+
return '';
|
|
39
|
+
let result = '';
|
|
40
40
|
for (let i = 0, len = words.length; i < len; i++) {
|
|
41
|
-
|
|
41
|
+
const currentStr = words[i];
|
|
42
42
|
let tempStr = currentStr.toLowerCase();
|
|
43
|
-
if (i
|
|
43
|
+
if (i !== 0) {
|
|
44
44
|
tempStr = tempStr[0].toUpperCase() + tempStr.substring(1);
|
|
45
45
|
}
|
|
46
46
|
result += tempStr;
|
|
@@ -50,27 +50,25 @@ function toCamelCase(input) {
|
|
|
50
50
|
function toPascalCase(input) {
|
|
51
51
|
const words = toWordsList(input);
|
|
52
52
|
if (words.length === 0)
|
|
53
|
-
return
|
|
54
|
-
return words
|
|
55
|
-
.map((x) => x.charAt(0).toUpperCase() + x.slice(1).toLowerCase())
|
|
56
|
-
.join("");
|
|
53
|
+
return '';
|
|
54
|
+
return words.map((x) => x.charAt(0).toUpperCase() + x.slice(1).toLowerCase()).join('');
|
|
57
55
|
}
|
|
58
56
|
function convertToString(input) {
|
|
59
57
|
if (input != null && input !== undefined) {
|
|
60
58
|
switch (typeof input) {
|
|
61
|
-
case
|
|
59
|
+
case 'string':
|
|
62
60
|
return input.trim();
|
|
63
|
-
case
|
|
61
|
+
case 'number':
|
|
64
62
|
return Math.abs(input).toString().trim();
|
|
65
63
|
default:
|
|
66
64
|
return String(input).trim();
|
|
67
65
|
}
|
|
68
66
|
}
|
|
69
|
-
return
|
|
67
|
+
return '';
|
|
70
68
|
}
|
|
71
69
|
function toWordsList(input) {
|
|
72
70
|
const stringToTest = convertToString(input);
|
|
73
|
-
if (stringToTest ===
|
|
71
|
+
if (stringToTest === '')
|
|
74
72
|
return [];
|
|
75
73
|
return stringToTest.match(regex_1.MATCH_WORDS_REGEX) || [];
|
|
76
74
|
}
|
package/dist/helpers/dimens.d.ts
CHANGED
|
@@ -3,5 +3,6 @@ interface StrPxToRemOptions {
|
|
|
3
3
|
decimalPlaces?: number;
|
|
4
4
|
}
|
|
5
5
|
export declare function strPxToRemStr(sizeInPx: string, { baseFontSize, decimalPlaces }?: StrPxToRemOptions): string;
|
|
6
|
+
export declare function lineHeightToRem(lineHeightInPx: string, options?: StrPxToRemOptions): string;
|
|
6
7
|
export {};
|
|
7
8
|
//# sourceMappingURL=dimens.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dimens.d.ts","sourceRoot":"","sources":["../../src/helpers/dimens.ts"],"names":[],"mappings":"AAAA,UAAU,iBAAiB;IACzB,YAAY,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"dimens.d.ts","sourceRoot":"","sources":["../../src/helpers/dimens.ts"],"names":[],"mappings":"AAAA,UAAU,iBAAiB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAWD,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,EAChB,EAAE,YAAiB,EAAE,aAAa,EAAE,GAAE,iBAAsB,GAC3D,MAAM,CAIR;AAWD,wBAAgB,eAAe,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,GAAG,MAAM,CAS/F"}
|
package/dist/helpers/dimens.js
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.strPxToRemStr = strPxToRemStr;
|
|
4
|
+
exports.lineHeightToRem = lineHeightToRem;
|
|
4
5
|
function strPxToRemStr(sizeInPx, { baseFontSize = 16, decimalPlaces } = {}) {
|
|
5
|
-
const result = Number(sizeInPx.replace(/px/g,
|
|
6
|
-
return decimalPlaces ? result.toFixed(decimalPlaces)
|
|
6
|
+
const result = Number(sizeInPx.replace(/px/g, '')) / baseFontSize;
|
|
7
|
+
return decimalPlaces ? `${result.toFixed(decimalPlaces)}rem` : `${result}rem`;
|
|
8
|
+
}
|
|
9
|
+
function lineHeightToRem(lineHeightInPx, options = {}) {
|
|
10
|
+
const valueWithUnit = lineHeightInPx.includes('px') ? lineHeightInPx : `${lineHeightInPx}px`;
|
|
11
|
+
const numericValue = Number(valueWithUnit.replace(/px/g, ''));
|
|
12
|
+
if (numericValue === 0) {
|
|
13
|
+
return 'normal';
|
|
14
|
+
}
|
|
15
|
+
return strPxToRemStr(valueWithUnit, options);
|
|
7
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regex.d.ts","sourceRoot":"","sources":["../../src/helpers/regex.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"regex.d.ts","sourceRoot":"","sources":["../../src/helpers/regex.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,QAC+E,CAAA"}
|