material-inspired-component-library 8.0.0 → 8.0.4
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/.claude/settings.local.json +14 -0
- package/components/alert/index.scss +5 -0
- package/components/appbar/index.scss +12 -0
- package/components/badge/index.scss +2 -0
- package/components/bottomsheet/index.scss +9 -0
- package/components/button/index.scss +106 -92
- package/components/card/index.scss +30 -0
- package/components/checkbox/index.scss +17 -0
- package/components/datepicker/index.scss +13 -0
- package/components/dialog/index.scss +16 -0
- package/components/iconbutton/index.scss +18 -0
- package/components/list/index.scss +32 -5
- package/components/menu/index.scss +18 -0
- package/components/navigationrail/index.scss +17 -0
- package/components/progressindicator/README.md +88 -0
- package/components/progressindicator/index.scss +225 -0
- package/components/progressindicator/index.ts +77 -0
- package/components/radio/index.scss +13 -0
- package/components/select/index.scss +8 -0
- package/components/shape/README.md +103 -0
- package/components/shape/_paths.generated.scss +64 -0
- package/components/shape/index.scss +66 -0
- package/components/shape/master.scss +28 -0
- package/components/sidesheet/index.scss +11 -0
- package/components/slider/index.scss +13 -0
- package/components/snackbar/index.scss +12 -0
- package/components/stepper/index.scss +2 -0
- package/components/switch/index.scss +9 -0
- package/components/textfield/index.scss +9 -0
- package/components/timepicker/index.scss +16 -0
- package/dist/alert.css +1 -1
- package/dist/appbar.css +1 -1
- package/dist/badge.css +1 -1
- package/dist/bottomsheet.css +1 -1
- package/dist/button.css +1 -1
- package/dist/card.css +1 -1
- package/dist/checkbox.css +1 -1
- package/dist/components/progressindicator/index.d.ts +6 -0
- package/dist/datepicker.css +1 -1
- package/dist/dialog.css +1 -1
- package/dist/foundations/form/index.js +1 -0
- package/dist/iconbutton.css +1 -1
- package/dist/layout.css +1 -1
- package/dist/list.css +1 -1
- package/dist/menu.css +1 -1
- package/dist/micl.css +1 -1
- package/dist/micl.js +1 -1
- package/dist/navigationrail.css +1 -1
- package/dist/progressindicator.css +1 -0
- package/dist/progressindicator.js +1 -0
- package/dist/radio.css +1 -1
- package/dist/select.css +1 -1
- package/dist/shape.css +1 -0
- package/dist/shape.js +1 -0
- package/dist/sidesheet.css +1 -1
- package/dist/slider.css +1 -1
- package/dist/snackbar.css +1 -1
- package/dist/stepper.css +1 -1
- package/dist/switch.css +1 -1
- package/dist/textfield.css +1 -1
- package/dist/timepicker.css +1 -1
- package/docs/datepicker.html +21 -21
- package/docs/index.html +1 -0
- package/docs/micl.css +1 -1
- package/docs/micl.js +1 -1
- package/docs/progressindicator.html +288 -0
- package/docs/shape.css +1 -0
- package/docs/shape.js +1 -0
- package/docs/shapes.html +86 -21
- package/foundations/layout/README.md +1 -1
- package/foundations/layout/index.scss +3 -0
- package/micl.ts +2 -0
- package/package.json +4 -2
- package/styles/README.md +86 -8
- package/styles/elevation.scss +46 -13
- package/styles/motion.scss +51 -47
- package/styles/shapes.scss +38 -104
- package/styles/statelayer.scss +88 -41
- package/styles/typography.scss +120 -322
- package/styles.scss +10 -6
- package/tools/shapes/check.mjs +42 -0
- package/tools/shapes/generate.mjs +834 -0
- package/webpack.config.js +16 -1
- package/CLAUDE.md +0 -42
package/webpack.config.js
CHANGED
|
@@ -7,15 +7,29 @@ const docsDir = path.resolve(__dirname, 'docs');
|
|
|
7
7
|
|
|
8
8
|
const scssFiles = glob.sync('{./foundations/**/*.scss,./components/**/*.scss}');
|
|
9
9
|
const scssEntries = scssFiles.reduce((entries, filePath) => {
|
|
10
|
+
// The shape gallery has two SCSS files: index.scss (the partial that
|
|
11
|
+
// consumers @use to opt into individual shapes) and master.scss (the
|
|
12
|
+
// dist-bundle entry that installs all shapes). Only the latter should
|
|
13
|
+
// be compiled as a webpack entry.
|
|
14
|
+
const normalized = filePath.replace(/\\/g, '/');
|
|
15
|
+
if (normalized.endsWith('components/shape/index.scss')) return entries;
|
|
10
16
|
const componentName = path.dirname(filePath).split('\\').pop();
|
|
11
17
|
entries[componentName] = './' + filePath;
|
|
12
18
|
return entries;
|
|
13
19
|
}, {});
|
|
14
20
|
|
|
21
|
+
const tsEntries = glob.sync('./foundations/**/*.ts').reduce((entries, filePath) => {
|
|
22
|
+
const normalized = filePath.replace(/\\/g, '/').replace(/^\.\//, '');
|
|
23
|
+
if (normalized.endsWith('.d.ts')) return entries;
|
|
24
|
+
entries[normalized.replace(/\.ts$/, '')] = './' + normalized;
|
|
25
|
+
return entries;
|
|
26
|
+
}, {});
|
|
27
|
+
|
|
15
28
|
module.exports = [{
|
|
16
29
|
mode: 'production',
|
|
17
30
|
entry: {
|
|
18
31
|
...scssEntries,
|
|
32
|
+
...tsEntries,
|
|
19
33
|
micl: ['./styles.scss', './micl.ts']
|
|
20
34
|
},
|
|
21
35
|
resolve: {
|
|
@@ -53,7 +67,8 @@ module.exports = [{
|
|
|
53
67
|
}, {
|
|
54
68
|
mode: 'production',
|
|
55
69
|
entry: {
|
|
56
|
-
micl: ['./styles.scss', './micl.ts']
|
|
70
|
+
micl: ['./styles.scss', './micl.ts'],
|
|
71
|
+
shape: './components/shape/master.scss'
|
|
57
72
|
},
|
|
58
73
|
resolve: {
|
|
59
74
|
extensions: ['.ts', '.tsx', '.js']
|
package/CLAUDE.md
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md
|
|
2
|
-
|
|
3
|
-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
-
|
|
5
|
-
## Project Overview
|
|
6
|
-
|
|
7
|
-
MICL is a Material Design 3 UI component library written in TypeScript and Sass. It compiles to a UMD bundle (`dist/micl.js`) and a CSS file (`dist/micl.css`) with zero runtime dependencies.
|
|
8
|
-
|
|
9
|
-
## Commands
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npm run build # Compiles TypeScript + Sass via webpack, outputs to /dist/ and /docs/
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
There is no test suite, linter script, or dev server configured.
|
|
16
|
-
|
|
17
|
-
## Architecture
|
|
18
|
-
|
|
19
|
-
### Entry Points
|
|
20
|
-
|
|
21
|
-
- **`micl.ts`** — Main orchestrator. Initializes components lazily via a `MutationObserver` that watches for DOM insertions/removals. Handles event delegation for `input`, `change`, and `keydown` events, applies the ripple effect, and sets scrollbar CSS custom properties.
|
|
22
|
-
- **`styles.scss`** — Master stylesheet that imports all component and foundation Sass partials.
|
|
23
|
-
|
|
24
|
-
### Component Structure
|
|
25
|
-
|
|
26
|
-
Each component lives in `components/<name>/` and exports:
|
|
27
|
-
- A CSS selector string (e.g., `buttonSelector = 'button.micl-button--toggle'`)
|
|
28
|
-
- A handler object with `initialize(element)` / `cleanup(element)` methods and optional event handlers (`input`, `change`, `keydown`, `command`)
|
|
29
|
-
|
|
30
|
-
`micl.ts` imports every component handler, maps selectors to handlers, and drives the lifecycle using the MutationObserver + event delegation pattern.
|
|
31
|
-
|
|
32
|
-
### Styling System
|
|
33
|
-
|
|
34
|
-
- Sass uses `@use` (not `@import`); partials are namespaced.
|
|
35
|
-
- Theming is done entirely via CSS custom properties with `--md-sys-*` prefixes.
|
|
36
|
-
- `themes/` contains 11 colour themes, each with light, dark, and high-contrast variants.
|
|
37
|
-
- `styles/` contains Material Design tokens: typography, shapes, elevation, motion, state layers.
|
|
38
|
-
- `foundations/` contains the responsive layout system (breakpoints: compact ≤599 px, medium 600–839 px, expanded 840–1199 px, large 1200–1599 px, extra-large ≥1600 px).
|
|
39
|
-
|
|
40
|
-
### Build
|
|
41
|
-
|
|
42
|
-
`webpack.config.js` produces two identical outputs: one to `/dist/` (npm distribution) and one to `/docs/` (live demo). TypeScript target is ES2022 with strict mode and declaration-file generation enabled.
|