@moodlehq/design-system 4.0.0 → 5.0.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 +16 -6
- package/dist/components/_index.legacy.scss +1893 -0
- package/dist/components/activity-icon/ActivityIcon.d.ts +3 -3
- package/dist/components/activity-icon/ActivityIcon.js +5 -5
- package/dist/components/activity-icon/ActivityIcon.js.map +1 -1
- package/dist/components/activity-icon/index.css +99 -0
- package/dist/components/badge/Badge.d.ts +1 -1
- package/dist/components/badge/{Badge2.js → Badge.js} +1 -2
- package/dist/components/badge/Badge.js.map +1 -0
- package/dist/components/badge/index.css +115 -0
- package/dist/components/badge/index.js +1 -1
- package/dist/components/button/index.css +295 -0
- package/dist/components/checkbox/index.css +181 -0
- package/dist/components/choicebox/Choicebox.d.ts +21 -0
- package/dist/components/choicebox/Choicebox.js +55 -0
- package/dist/components/choicebox/Choicebox.js.map +1 -0
- package/dist/components/choicebox/index.css +364 -0
- package/dist/components/choicebox/index.d.ts +1 -0
- package/dist/components/choicebox/index.js +2 -0
- package/dist/components/close-button/CloseButton.d.ts +1 -1
- package/dist/components/close-button/index.css +47 -0
- package/dist/components/favourite-button/FavouriteButton.d.ts +15 -0
- package/dist/components/favourite-button/FavouriteButton.js +25 -0
- package/dist/components/favourite-button/FavouriteButton.js.map +1 -0
- package/dist/components/favourite-button/index.css +86 -0
- package/dist/components/favourite-button/index.d.ts +2 -0
- package/dist/components/favourite-button/index.js +2 -0
- package/dist/components/index.css +12 -0
- package/dist/components/index.d.ts +12 -0
- package/dist/components/link/Link.d.ts +11 -0
- package/dist/components/link/Link.js +65 -0
- package/dist/components/link/Link.js.map +1 -0
- package/dist/components/link/index.css +122 -0
- package/dist/components/link/index.d.ts +1 -0
- package/dist/components/link/index.js +2 -0
- package/dist/components/nav-pill/NavPill.d.ts +21 -0
- package/dist/components/nav-pill/NavPill.js +54 -0
- package/dist/components/nav-pill/NavPill.js.map +1 -0
- package/dist/components/nav-pill/index.css +96 -0
- package/dist/components/nav-pill/index.d.ts +1 -0
- package/dist/components/nav-pill/index.js +2 -0
- package/dist/components/pagination/Pagination.d.ts +32 -0
- package/dist/components/pagination/Pagination.js +100 -0
- package/dist/components/pagination/Pagination.js.map +1 -0
- package/dist/components/pagination/index.css +139 -0
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/index.js +2 -0
- package/dist/components/pagination/pagination.helpers.d.ts +26 -0
- package/dist/components/pagination/pagination.helpers.js +136 -0
- package/dist/components/pagination/pagination.helpers.js.map +1 -0
- package/dist/components/progress-bar/ProgressBar.d.ts +35 -0
- package/dist/components/progress-bar/ProgressBar.js +86 -0
- package/dist/components/progress-bar/ProgressBar.js.map +1 -0
- package/dist/components/progress-bar/index.css +193 -0
- package/dist/components/progress-bar/index.d.ts +1 -0
- package/dist/components/progress-bar/index.js +2 -0
- package/dist/components/radio/index.css +133 -0
- package/dist/index.css +1101 -150
- package/dist/index.js +8 -2
- package/{tokens → dist/tokens}/css/colors.css +7 -4
- package/{tokens → dist/tokens}/css/primitives.css +1 -1
- package/{tokens → dist/tokens}/scss/_colors.scss +8 -5
- package/{tokens → dist/tokens}/scss/_index_css_vars.scss +3 -0
- package/{tokens → dist/tokens}/scss/_primitives.scss +1 -1
- package/{tokens → dist/tokens}/scss/_typography.scss +1 -1
- package/package.json +16 -7
- package/dist/components/badge/Badge2.js.map +0 -1
- /package/{tokens → dist/tokens}/css/borders.css +0 -0
- /package/{tokens → dist/tokens}/css/breakpoints.css +0 -0
- /package/{tokens → dist/tokens}/css/index.css +0 -0
- /package/{tokens → dist/tokens}/css/shadows.css +0 -0
- /package/{tokens → dist/tokens}/css/sizes.css +0 -0
- /package/{tokens → dist/tokens}/css/spacing.css +0 -0
- /package/{tokens → dist/tokens}/css/typography.css +0 -0
- /package/{tokens → dist/tokens}/scss/_borders.scss +0 -0
- /package/{tokens → dist/tokens}/scss/_breakpoints.scss +0 -0
- /package/{tokens → dist/tokens}/scss/_index.legacy.scss +0 -0
- /package/{tokens → dist/tokens}/scss/_index.scss +0 -0
- /package/{tokens → dist/tokens}/scss/_shadows.scss +0 -0
- /package/{tokens → dist/tokens}/scss/_sizes.scss +0 -0
- /package/{tokens → dist/tokens}/scss/_spacing.scss +0 -0
package/README.md
CHANGED
|
@@ -109,13 +109,13 @@ import { Button } from '@moodlehq/design-system/components/button';
|
|
|
109
109
|
|
|
110
110
|
### Fonts
|
|
111
111
|
|
|
112
|
-
The recommended typeface for Moodle Design System is **[
|
|
112
|
+
The recommended typeface for Moodle Design System is **[Noto Sans](https://fonts.google.com/specimen/Noto+Sans)**. The package does not bundle font files. Provide Noto Sans in your application:
|
|
113
113
|
|
|
114
114
|
**Option 1: Google Fonts CDN**
|
|
115
115
|
|
|
116
116
|
```html
|
|
117
117
|
<link
|
|
118
|
-
href="https://fonts.googleapis.com/css2?family=
|
|
118
|
+
href="https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap"
|
|
119
119
|
rel="stylesheet"
|
|
120
120
|
/>
|
|
121
121
|
```
|
|
@@ -125,15 +125,16 @@ Place font files in your project and add `@font-face` declarations:
|
|
|
125
125
|
|
|
126
126
|
```css
|
|
127
127
|
@font-face {
|
|
128
|
-
font-family: '
|
|
129
|
-
src: url('./fonts/
|
|
128
|
+
font-family: 'Noto Sans';
|
|
129
|
+
src: url('./fonts/NotoSans-VariableFont_wdth,wght.woff2') format('woff2');
|
|
130
130
|
font-weight: 100 900;
|
|
131
131
|
font-style: normal;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
@font-face {
|
|
135
|
-
font-family: '
|
|
136
|
-
src: url('./fonts/
|
|
135
|
+
font-family: 'Noto Sans';
|
|
136
|
+
src: url('./fonts/NotoSans-Italic-VariableFont_wdth,wght.woff2')
|
|
137
|
+
format('woff2');
|
|
137
138
|
font-weight: 100 900;
|
|
138
139
|
font-style: italic;
|
|
139
140
|
}
|
|
@@ -194,6 +195,15 @@ npm run test-unit-coverage
|
|
|
194
195
|
npm run test-storybook
|
|
195
196
|
```
|
|
196
197
|
|
|
198
|
+
#### Generated component index
|
|
199
|
+
|
|
200
|
+
The build now generates a machine-readable component index at `dist/component-index.json`.
|
|
201
|
+
|
|
202
|
+
- Generation command: `npm run build-component-index`
|
|
203
|
+
- Included in full build: `npm run build`
|
|
204
|
+
|
|
205
|
+
Use this JSON for deterministic tooling/agent lookups, while `.github/instructions/component-index.instructions.md` remains the compact instruction-friendly entry point.
|
|
206
|
+
|
|
197
207
|
### Build the Design System
|
|
198
208
|
|
|
199
209
|
To build the design system, run the following commands in your terminal:
|