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.
Files changed (84) hide show
  1. package/.claude/settings.local.json +14 -0
  2. package/components/alert/index.scss +5 -0
  3. package/components/appbar/index.scss +12 -0
  4. package/components/badge/index.scss +2 -0
  5. package/components/bottomsheet/index.scss +9 -0
  6. package/components/button/index.scss +106 -92
  7. package/components/card/index.scss +30 -0
  8. package/components/checkbox/index.scss +17 -0
  9. package/components/datepicker/index.scss +13 -0
  10. package/components/dialog/index.scss +16 -0
  11. package/components/iconbutton/index.scss +18 -0
  12. package/components/list/index.scss +32 -5
  13. package/components/menu/index.scss +18 -0
  14. package/components/navigationrail/index.scss +17 -0
  15. package/components/progressindicator/README.md +88 -0
  16. package/components/progressindicator/index.scss +225 -0
  17. package/components/progressindicator/index.ts +77 -0
  18. package/components/radio/index.scss +13 -0
  19. package/components/select/index.scss +8 -0
  20. package/components/shape/README.md +103 -0
  21. package/components/shape/_paths.generated.scss +64 -0
  22. package/components/shape/index.scss +66 -0
  23. package/components/shape/master.scss +28 -0
  24. package/components/sidesheet/index.scss +11 -0
  25. package/components/slider/index.scss +13 -0
  26. package/components/snackbar/index.scss +12 -0
  27. package/components/stepper/index.scss +2 -0
  28. package/components/switch/index.scss +9 -0
  29. package/components/textfield/index.scss +9 -0
  30. package/components/timepicker/index.scss +16 -0
  31. package/dist/alert.css +1 -1
  32. package/dist/appbar.css +1 -1
  33. package/dist/badge.css +1 -1
  34. package/dist/bottomsheet.css +1 -1
  35. package/dist/button.css +1 -1
  36. package/dist/card.css +1 -1
  37. package/dist/checkbox.css +1 -1
  38. package/dist/components/progressindicator/index.d.ts +6 -0
  39. package/dist/datepicker.css +1 -1
  40. package/dist/dialog.css +1 -1
  41. package/dist/foundations/form/index.js +1 -0
  42. package/dist/iconbutton.css +1 -1
  43. package/dist/layout.css +1 -1
  44. package/dist/list.css +1 -1
  45. package/dist/menu.css +1 -1
  46. package/dist/micl.css +1 -1
  47. package/dist/micl.js +1 -1
  48. package/dist/navigationrail.css +1 -1
  49. package/dist/progressindicator.css +1 -0
  50. package/dist/progressindicator.js +1 -0
  51. package/dist/radio.css +1 -1
  52. package/dist/select.css +1 -1
  53. package/dist/shape.css +1 -0
  54. package/dist/shape.js +1 -0
  55. package/dist/sidesheet.css +1 -1
  56. package/dist/slider.css +1 -1
  57. package/dist/snackbar.css +1 -1
  58. package/dist/stepper.css +1 -1
  59. package/dist/switch.css +1 -1
  60. package/dist/textfield.css +1 -1
  61. package/dist/timepicker.css +1 -1
  62. package/docs/datepicker.html +21 -21
  63. package/docs/index.html +1 -0
  64. package/docs/micl.css +1 -1
  65. package/docs/micl.js +1 -1
  66. package/docs/progressindicator.html +288 -0
  67. package/docs/shape.css +1 -0
  68. package/docs/shape.js +1 -0
  69. package/docs/shapes.html +86 -21
  70. package/foundations/layout/README.md +1 -1
  71. package/foundations/layout/index.scss +3 -0
  72. package/micl.ts +2 -0
  73. package/package.json +4 -2
  74. package/styles/README.md +86 -8
  75. package/styles/elevation.scss +46 -13
  76. package/styles/motion.scss +51 -47
  77. package/styles/shapes.scss +38 -104
  78. package/styles/statelayer.scss +88 -41
  79. package/styles/typography.scss +120 -322
  80. package/styles.scss +10 -6
  81. package/tools/shapes/check.mjs +42 -0
  82. package/tools/shapes/generate.mjs +834 -0
  83. package/webpack.config.js +16 -1
  84. 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.