@moodlehq/design-system 1.0.0 → 2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moodlehq/design-system",
3
- "version": "1.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "The Moodle Design System",
5
5
  "files": [
6
6
  "/dist",
@@ -10,8 +10,7 @@
10
10
  "exports": {
11
11
  ".": {
12
12
  "types": "./dist/index.d.ts",
13
- "import": "./dist/index.es.js",
14
- "require": "./dist/index.cjs.js"
13
+ "import": "./dist/index.js"
15
14
  },
16
15
  "./css": {
17
16
  "default": "./dist/index.css"
@@ -21,13 +20,17 @@
21
20
  },
22
21
  "./tokens/scss": {
23
22
  "default": "./tokens/scss/_index.scss"
23
+ },
24
+ "./tokens/scss/legacy": {
25
+ "default": "./tokens/scss/_index.legacy.scss"
24
26
  }
25
27
  },
26
28
  "type": "module",
27
29
  "dependencies": {
28
- "bootstrap": "^5.3.8",
30
+ "bootstrap": "^5.3.8"
31
+ },
32
+ "peerDependencies": {
29
33
  "react": "^19.2.4",
30
- "react-bootstrap": "^2.10.10",
31
34
  "react-dom": "^19.2.4"
32
35
  },
33
36
  "devDependencies": {
@@ -61,7 +64,7 @@
61
64
  "eslint-plugin-react-hooks": "^7.0.1",
62
65
  "eslint-plugin-react-refresh": "^0.5.0",
63
66
  "eslint-plugin-storybook": "^10.1.2",
64
- "fast-check": "^3.23.2",
67
+ "fast-check": "^4.5.3",
65
68
  "globals": "^17.1.0",
66
69
  "husky": "^9.1.7",
67
70
  "jsdom": "^28.0.0",
@@ -69,9 +72,10 @@
69
72
  "playwright": "^1.57.0",
70
73
  "prettier": "^3.7.3",
71
74
  "prettier-plugin-organize-imports": "^4.3.0",
72
- "react-bootstrap": "^2.10.10",
75
+ "react": "^19.2.4",
73
76
  "react-docgen": "^8.0.2",
74
77
  "react-docgen-typescript": "^2.4.0",
78
+ "react-dom": "^19.2.4",
75
79
  "sass": "^1.94.2",
76
80
  "storybook": "^10.0.5",
77
81
  "style-dictionary": "^5.1.1",
@@ -9,4 +9,3 @@
9
9
  @import "./sizes.css";
10
10
  @import "./spacing.css";
11
11
  @import "./typography.css";
12
- @import "./fonts.css"
@@ -126,32 +126,23 @@
126
126
  --mds-scale-1800: 50rem;
127
127
  --mds-typography-font-family-monospace: Menlo;
128
128
  --mds-typography-font-family-sans-serif: Roboto;
129
- --mds-typography-font-size-base-0: 0rem;
130
- --mds-typography-font-size-base-1: 1rem;
131
- --mds-typography-font-size-base-2: 2rem;
132
- --mds-typography-font-size-base-0-875: 0.875rem;
133
- --mds-typography-font-size-base-1-25: 1.25rem;
134
- --mds-typography-font-size-base-1-5: 1.5rem;
135
- --mds-typography-font-size-base-1-75: 1.75rem;
136
- --mds-typography-font-size-base-2-5: 2.5rem;
137
- --mds-typography-font-weight-italic-black-900: Black Italic;
138
- --mds-typography-font-weight-italic-bold-700: Bold Italic;
139
- --mds-typography-font-weight-italic-extrabold-800: Extra bold Italic;
140
- --mds-typography-font-weight-italic-extralight-200: Extra light Italic;
141
- --mds-typography-font-weight-italic-light-300: Light Italic;
142
- --mds-typography-font-weight-italic-medium-500: Medium Italic;
143
- --mds-typography-font-weight-italic-regular-400: Italic;
144
- --mds-typography-font-weight-italic-semibold-600: Semi Bold Italic;
145
- --mds-typography-font-weight-italic-thin-100: Thin Italic;
146
- --mds-typography-font-weight-normal-black-900: Black;
147
- --mds-typography-font-weight-normal-bold-700: Bold;
148
- --mds-typography-font-weight-normal-extrabold-800: Extrabold;
149
- --mds-typography-font-weight-normal-extralight-200: Extra light;
150
- --mds-typography-font-weight-normal-light-300: Light;
151
- --mds-typography-font-weight-normal-medium-500: Medium;
152
- --mds-typography-font-weight-normal-regular-400: Regular;
153
- --mds-typography-font-weight-normal-semibold-600: Semibold;
154
- --mds-typography-font-weight-normal-thin-100: Thin;
129
+ --mds-typography-font-size-0: 0rem;
130
+ --mds-typography-font-size-1: 1rem;
131
+ --mds-typography-font-size-2: 2rem;
132
+ --mds-typography-font-size-0-875: 0.875rem;
133
+ --mds-typography-font-size-1-25: 1.25rem;
134
+ --mds-typography-font-size-1-5: 1.5rem;
135
+ --mds-typography-font-size-1-75: 1.75rem;
136
+ --mds-typography-font-size-2-5: 2.5rem;
137
+ --mds-typography-font-weight-black: 900;
138
+ --mds-typography-font-weight-bold: 700;
139
+ --mds-typography-font-weight-extrabold: 800;
140
+ --mds-typography-font-weight-extralight: 200;
141
+ --mds-typography-font-weight-light: 300;
142
+ --mds-typography-font-weight-medium: 500;
143
+ --mds-typography-font-weight-regular: 400;
144
+ --mds-typography-font-weight-semibold: 600;
145
+ --mds-typography-font-weight-thin: 100;
155
146
  --mds-typography-letter-spacing-none: 0rem; /** Default, no tracking */
156
147
  --mds-typography-line-height-displays-d1: 6rem;
157
148
  --mds-typography-line-height-displays-d2: 5.4rem;
@@ -3,9 +3,9 @@
3
3
  */
4
4
 
5
5
  :root {
6
- --mds-color-lg: rgba(0, 0, 0, 0.18);
7
- --mds-color-md: rgba(0, 0, 0, 0.15);
8
- --mds-color-sm: rgba(0, 0, 0, 0.07);
6
+ --mds-color-lg: rgba(0, 0, 0, 0.2);
7
+ --mds-color-md: rgba(0, 0, 0, 0.2);
8
+ --mds-color-sm: rgba(0, 0, 0, 0.1);
9
9
  --mds-blur-lg: var(--mds-scale-1200);
10
10
  --mds-blur-md: var(--mds-scale-600);
11
11
  --mds-blur-sm: var(--mds-scale-100);
@@ -11,25 +11,20 @@
11
11
  --mds-font-size-displays-4: var(--mds-scale-1300); /** Display style, medium-large. */
12
12
  --mds-font-size-displays-5: var(--mds-scale-1200); /** Display style, medium. */
13
13
  --mds-font-size-displays-6: var(--mds-scale-1100); /** Display style, smaller display. */
14
- --mds-font-size-headings-1: var(--mds-typography-font-size-base-2-5); /** Font size for H1 headings. */
15
- --mds-font-size-headings-2: var(--mds-typography-font-size-base-2); /** Font size for H2 headings. */
16
- --mds-font-size-headings-3: var(--mds-typography-font-size-base-1-75); /** Font size for H3 headings. */
17
- --mds-font-size-headings-4: var(--mds-typography-font-size-base-1-5); /** Font size for H4 headings. */
18
- --mds-font-size-headings-5: var(--mds-typography-font-size-base-1-25); /** Font size for H5 headings. */
19
- --mds-font-size-headings-6: var(--mds-typography-font-size-base-1); /** Font size for H6 headings. */
20
- --mds-font-size-paragraph-default: var(--mds-typography-font-size-base-1); /** Base size for body text. */
21
- --mds-font-size-paragraph-lead: var(--mds-typography-font-size-base-1-25); /** Slightly larger body text, for lead paragraphs. */
22
- --mds-font-size-paragraph-small: var(--mds-typography-font-size-base-0-875); /** Reduced size for secondary text. */
23
- --mds-font-weight-italic-bold: var(--mds-typography-font-weight-italic-bold-700);
24
- --mds-font-weight-italic-light: var(--mds-typography-font-weight-italic-light-300);
25
- --mds-font-weight-italic-medium: var(--mds-typography-font-weight-italic-medium-500);
26
- --mds-font-weight-italic-regular: var(--mds-typography-font-weight-italic-regular-400);
27
- --mds-font-weight-italic-semibold: var(--mds-typography-font-weight-italic-semibold-600);
28
- --mds-font-weight-normal-bold: var(--mds-typography-font-weight-normal-bold-700);
29
- --mds-font-weight-normal-light: var(--mds-typography-font-weight-normal-light-300);
30
- --mds-font-weight-normal-medium: var(--mds-typography-font-weight-normal-medium-500);
31
- --mds-font-weight-normal-regular: var(--mds-typography-font-weight-normal-regular-400);
32
- --mds-font-weight-normal-semibold: var(--mds-typography-font-weight-normal-semibold-600);
14
+ --mds-font-size-headings-1: var(--mds-typography-font-size-2-5); /** Font size for H1 headings. */
15
+ --mds-font-size-headings-2: var(--mds-typography-font-size-2); /** Font size for H2 headings. */
16
+ --mds-font-size-headings-3: var(--mds-typography-font-size-1-75); /** Font size for H3 headings. */
17
+ --mds-font-size-headings-4: var(--mds-typography-font-size-1-5); /** Font size for H4 headings. */
18
+ --mds-font-size-headings-5: var(--mds-typography-font-size-1-25); /** Font size for H5 headings. */
19
+ --mds-font-size-headings-6: var(--mds-typography-font-size-1); /** Font size for H6 headings. */
20
+ --mds-font-size-paragraph-default: var(--mds-typography-font-size-1); /** Base size for body text. */
21
+ --mds-font-size-paragraph-lead: var(--mds-typography-font-size-1-25); /** Slightly larger body text, for lead paragraphs. */
22
+ --mds-font-size-paragraph-small: var(--mds-typography-font-size-0-875); /** Reduced size for secondary text. */
23
+ --mds-font-weight-bold: var(--mds-typography-font-weight-bold);
24
+ --mds-font-weight-light: var(--mds-typography-font-weight-light);
25
+ --mds-font-weight-medium: var(--mds-typography-font-weight-medium);
26
+ --mds-font-weight-regular: var(--mds-typography-font-weight-regular);
27
+ --mds-font-weight-semibold: var(--mds-typography-font-weight-semibold);
33
28
  --mds-letter-spacing-default: var(--mds-typography-letter-spacing-none); /** Standard tracking for all texts. */
34
29
  --mds-line-height-displays-1: var(--mds-typography-line-height-displays-d1);
35
30
  --mds-line-height-displays-2: var(--mds-typography-line-height-displays-d2);
@@ -1,15 +1,15 @@
1
1
 
2
2
  // THIS FILE IS AUTO-GENERATED BY STYLE DICTIONARY — DO NOT EDIT DIRECTLY.
3
3
 
4
- $mds-border-radius-lg: 0.5rem;
5
- $mds-border-radius-md: 0.375rem;
6
- $mds-border-radius-none: 0rem;
7
- $mds-border-radius-pill: 50rem;
8
- $mds-border-radius-sm: 0.25rem;
9
- $mds-border-radius-xl: 1rem;
10
- $mds-border-radius-xxl: 2rem;
11
- $mds-stroke-weight-lg: 0.1875rem;
12
- $mds-stroke-weight-md: 0.125rem;
13
- $mds-stroke-weight-sm: 0.0625rem;
14
- $mds-stroke-weight-xl: 0.25rem;
15
- $mds-stroke-weight-xxl: 0.3125rem;
4
+ $mds-border-radius-lg: 0.5rem !default;
5
+ $mds-border-radius-md: 0.375rem !default;
6
+ $mds-border-radius-none: 0rem !default;
7
+ $mds-border-radius-pill: 50rem !default;
8
+ $mds-border-radius-sm: 0.25rem !default;
9
+ $mds-border-radius-xl: 1rem !default;
10
+ $mds-border-radius-xxl: 2rem !default;
11
+ $mds-stroke-weight-lg: 0.1875rem !default;
12
+ $mds-stroke-weight-md: 0.125rem !default;
13
+ $mds-stroke-weight-sm: 0.0625rem !default;
14
+ $mds-stroke-weight-xl: 0.25rem !default;
15
+ $mds-stroke-weight-xxl: 0.3125rem !default;
@@ -1,65 +1,65 @@
1
1
 
2
2
  // THIS FILE IS AUTO-GENERATED BY STYLE DICTIONARY — DO NOT EDIT DIRECTLY.
3
3
 
4
- $mds-bg-feedback-danger-default: #ca3120;
5
- $mds-bg-feedback-danger-subtle: #f4d6d2;
6
- $mds-bg-feedback-info-default: #008196;
7
- $mds-bg-feedback-info-subtle: #cce6ea;
8
- $mds-bg-feedback-primary-default: #0f6cbf;
9
- $mds-bg-feedback-primary-subtle: #cfe2f2;
10
- $mds-bg-feedback-secondary-subtle: #f8f9fa;
11
- $mds-bg-feedback-success-default: #357a32;
12
- $mds-bg-feedback-success-subtle: #d7e4d6;
13
- $mds-bg-feedback-warning-default: #f0ad4e;
14
- $mds-bg-feedback-warning-subtle: #fcefdc;
15
- $mds-bg-interactive-danger-active: #791d13;
16
- $mds-bg-interactive-danger-default: #ca3120;
17
- $mds-bg-interactive-danger-disabled: #df8379;
18
- $mds-bg-interactive-danger-hover: #a2271a;
19
- $mds-bg-interactive-primary-active: #094173;
20
- $mds-bg-interactive-primary-default: #0f6cbf;
21
- $mds-bg-interactive-primary-disabled: #6fa7d9;
22
- $mds-bg-interactive-primary-hover: #0c5699;
23
- $mds-bg-interactive-secondary-active: #ced4da;
24
- $mds-bg-interactive-secondary-default: #ced4da;
25
- $mds-bg-interactive-secondary-disabled: #e9ecef;
26
- $mds-bg-interactive-secondary-hover: #dee2e6;
27
- $mds-bg-surface-default: #ffffff;
28
- $mds-bg-surface-strong: #e9ecef;
29
- $mds-bg-surface-subtle: #f8f9fa;
30
- $mds-border-default: #dee2e6;
31
- $mds-border-feedback-danger: #eaada6;
32
- $mds-border-feedback-info: #99cdd5;
33
- $mds-border-feedback-primary: #9fc4e5;
34
- $mds-border-feedback-secondary: #e9ecef;
35
- $mds-border-feedback-success: #aecaad;
36
- $mds-border-feedback-warning: #f9deb8;
37
- $mds-border-interactive-danger-active: #a2271a;
38
- $mds-border-interactive-danger-default: #ca3120;
39
- $mds-border-interactive-danger-disabled: #df8379;
40
- $mds-border-interactive-danger-hover: #ca3120;
41
- $mds-border-interactive-primary-active: #0c5699;
42
- $mds-border-interactive-primary-default: #0f6cbf;
43
- $mds-border-interactive-primary-disabled: #6fa7d9;
44
- $mds-border-interactive-primary-hover: #0f6cbf;
45
- $mds-border-interactive-secondary-active: #495057;
46
- $mds-border-interactive-secondary-default: #6a737b;
47
- $mds-border-interactive-secondary-disabled: #8f959e;
48
- $mds-border-interactive-secondary-hover: #6a737b;
49
- $mds-border-subtle: #e9ecef;
50
- $mds-border-translucent: rgba(0, 0, 0, 0);
51
- $mds-focus-default: #0f6cbf;
52
- $mds-text-danger: #ca3120;
53
- $mds-text-default: #1d2125;
54
- $mds-text-emphasis: #000000;
55
- $mds-text-feedback-danger: #51140d;
56
- $mds-text-feedback-info: #00343c;
57
- $mds-text-feedback-primary: #062b4c;
58
- $mds-text-feedback-secondary: #343a40;
59
- $mds-text-feedback-success: #153114;
60
- $mds-text-feedback-warning: #60451f;
61
- $mds-text-inverse: #f8f9fa;
62
- $mds-text-link-primary-default: #0f6cbf;
63
- $mds-text-link-primary-hover: #0c5699;
64
- $mds-text-muted: #6a737b;
65
- $mds-text-subtle: #495057;
4
+ $mds-bg-feedback-danger-default: #ca3120 !default;
5
+ $mds-bg-feedback-danger-subtle: #f4d6d2 !default;
6
+ $mds-bg-feedback-info-default: #008196 !default;
7
+ $mds-bg-feedback-info-subtle: #cce6ea !default;
8
+ $mds-bg-feedback-primary-default: #0f6cbf !default;
9
+ $mds-bg-feedback-primary-subtle: #cfe2f2 !default;
10
+ $mds-bg-feedback-secondary-subtle: #f8f9fa !default;
11
+ $mds-bg-feedback-success-default: #357a32 !default;
12
+ $mds-bg-feedback-success-subtle: #d7e4d6 !default;
13
+ $mds-bg-feedback-warning-default: #f0ad4e !default;
14
+ $mds-bg-feedback-warning-subtle: #fcefdc !default;
15
+ $mds-bg-interactive-danger-active: #791d13 !default;
16
+ $mds-bg-interactive-danger-default: #ca3120 !default;
17
+ $mds-bg-interactive-danger-disabled: #df8379 !default;
18
+ $mds-bg-interactive-danger-hover: #a2271a !default;
19
+ $mds-bg-interactive-primary-active: #094173 !default;
20
+ $mds-bg-interactive-primary-default: #0f6cbf !default;
21
+ $mds-bg-interactive-primary-disabled: #6fa7d9 !default;
22
+ $mds-bg-interactive-primary-hover: #0c5699 !default;
23
+ $mds-bg-interactive-secondary-active: #ced4da !default;
24
+ $mds-bg-interactive-secondary-default: #ced4da !default;
25
+ $mds-bg-interactive-secondary-disabled: #e9ecef !default;
26
+ $mds-bg-interactive-secondary-hover: #dee2e6 !default;
27
+ $mds-bg-surface-default: #ffffff !default;
28
+ $mds-bg-surface-strong: #e9ecef !default;
29
+ $mds-bg-surface-subtle: #f8f9fa !default;
30
+ $mds-border-default: #dee2e6 !default;
31
+ $mds-border-feedback-danger: #eaada6 !default;
32
+ $mds-border-feedback-info: #99cdd5 !default;
33
+ $mds-border-feedback-primary: #9fc4e5 !default;
34
+ $mds-border-feedback-secondary: #e9ecef !default;
35
+ $mds-border-feedback-success: #aecaad !default;
36
+ $mds-border-feedback-warning: #f9deb8 !default;
37
+ $mds-border-interactive-danger-active: #a2271a !default;
38
+ $mds-border-interactive-danger-default: #ca3120 !default;
39
+ $mds-border-interactive-danger-disabled: #df8379 !default;
40
+ $mds-border-interactive-danger-hover: #ca3120 !default;
41
+ $mds-border-interactive-primary-active: #0c5699 !default;
42
+ $mds-border-interactive-primary-default: #0f6cbf !default;
43
+ $mds-border-interactive-primary-disabled: #6fa7d9 !default;
44
+ $mds-border-interactive-primary-hover: #0f6cbf !default;
45
+ $mds-border-interactive-secondary-active: #495057 !default;
46
+ $mds-border-interactive-secondary-default: #6a737b !default;
47
+ $mds-border-interactive-secondary-disabled: #8f959e !default;
48
+ $mds-border-interactive-secondary-hover: #6a737b !default;
49
+ $mds-border-subtle: #e9ecef !default;
50
+ $mds-border-translucent: rgba(0, 0, 0, 0) !default;
51
+ $mds-focus-default: #0f6cbf !default;
52
+ $mds-text-danger: #ca3120 !default;
53
+ $mds-text-default: #1d2125 !default;
54
+ $mds-text-emphasis: #000000 !default;
55
+ $mds-text-feedback-danger: #51140d !default;
56
+ $mds-text-feedback-info: #00343c !default;
57
+ $mds-text-feedback-primary: #062b4c !default;
58
+ $mds-text-feedback-secondary: #343a40 !default;
59
+ $mds-text-feedback-success: #153114 !default;
60
+ $mds-text-feedback-warning: #60451f !default;
61
+ $mds-text-inverse: #f8f9fa !default;
62
+ $mds-text-link-primary-default: #0f6cbf !default;
63
+ $mds-text-link-primary-hover: #0c5699 !default;
64
+ $mds-text-muted: #6a737b !default;
65
+ $mds-text-subtle: #495057 !default;
@@ -0,0 +1,11 @@
1
+
2
+ // THIS FILE IS AUTO-GENERATED BY STYLE DICTIONARY — DO NOT EDIT DIRECTLY.
3
+ // Tags: [MDS_LEGACY_SCSSPHP_COMPAT]
4
+
5
+ @import "_borders.scss";
6
+ @import "_colors.scss";
7
+ @import "_primitives.scss";
8
+ @import "_shadows.scss";
9
+ @import "_sizes.scss";
10
+ @import "_spacing.scss";
11
+ @import "_typography.scss";
@@ -8,4 +8,3 @@
8
8
  @forward "sizes";
9
9
  @forward "spacing";
10
10
  @forward "typography";
11
- @forward "fonts";