material-inspired-component-library 7.0.2 → 8.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.
Files changed (104) hide show
  1. package/.claude/settings.local.json +14 -0
  2. package/CLAUDE.md +53 -0
  3. package/README.md +6 -0
  4. package/components/accordion/README.md +6 -3
  5. package/components/alert/index.scss +5 -0
  6. package/components/appbar/index.scss +12 -0
  7. package/components/badge/index.scss +2 -0
  8. package/components/bottomsheet/index.scss +9 -0
  9. package/components/button/index.scss +33 -6
  10. package/components/card/README.md +4 -0
  11. package/components/card/index.scss +182 -150
  12. package/components/checkbox/index.scss +28 -6
  13. package/components/datepicker/index.scss +13 -0
  14. package/components/datepicker/index.ts +9 -9
  15. package/components/dialog/index.scss +21 -6
  16. package/components/iconbutton/index.scss +28 -6
  17. package/components/list/README.md +191 -32
  18. package/components/list/index.scss +281 -190
  19. package/components/list/index.ts +100 -100
  20. package/components/menu/README.md +199 -10
  21. package/components/menu/index.scss +242 -47
  22. package/components/menu/index.ts +74 -37
  23. package/components/navigationrail/index.scss +91 -68
  24. package/components/progressindicator/README.md +88 -0
  25. package/components/progressindicator/index.scss +225 -0
  26. package/components/progressindicator/index.ts +77 -0
  27. package/components/radio/index.scss +24 -6
  28. package/components/select/README.md +42 -5
  29. package/components/select/index.scss +45 -79
  30. package/components/shape/README.md +103 -0
  31. package/components/shape/_paths.generated.scss +64 -0
  32. package/components/shape/index.scss +66 -0
  33. package/components/shape/master.scss +28 -0
  34. package/components/sidesheet/index.scss +11 -0
  35. package/components/slider/index.scss +13 -0
  36. package/components/snackbar/index.scss +12 -0
  37. package/components/stepper/index.scss +3 -5
  38. package/components/switch/index.scss +9 -0
  39. package/components/textfield/index.scss +10 -1
  40. package/components/textfield/index.ts +2 -2
  41. package/components/timepicker/index.scss +16 -0
  42. package/dist/alert.css +1 -1
  43. package/dist/appbar.css +1 -1
  44. package/dist/badge.css +1 -1
  45. package/dist/bottomsheet.css +1 -1
  46. package/dist/button.css +1 -1
  47. package/dist/card.css +1 -1
  48. package/dist/checkbox.css +1 -1
  49. package/dist/components/list/index.d.ts +2 -2
  50. package/dist/components/progressindicator/index.d.ts +6 -0
  51. package/dist/datepicker.css +1 -1
  52. package/dist/dialog.css +1 -1
  53. package/dist/divider.css +1 -1
  54. package/dist/foundations/form/index.js +1 -0
  55. package/dist/foundations.css +1 -1
  56. package/dist/iconbutton.css +1 -1
  57. package/dist/layout.css +1 -1
  58. package/dist/list.css +1 -1
  59. package/dist/menu.css +1 -1
  60. package/dist/micl.css +1 -1
  61. package/dist/micl.js +1 -1
  62. package/dist/navigationrail.css +1 -1
  63. package/dist/progressindicator.css +1 -0
  64. package/dist/progressindicator.js +1 -0
  65. package/dist/radio.css +1 -1
  66. package/dist/select.css +1 -1
  67. package/dist/shape.css +1 -0
  68. package/dist/shape.js +1 -0
  69. package/dist/sidesheet.css +1 -1
  70. package/dist/slider.css +1 -1
  71. package/dist/snackbar.css +1 -1
  72. package/dist/stepper.css +1 -1
  73. package/dist/switch.css +1 -1
  74. package/dist/textfield.css +1 -1
  75. package/dist/timepicker.css +1 -1
  76. package/docs/accordion.html +24 -24
  77. package/docs/bottomsheet.html +1 -4
  78. package/docs/datepicker.html +21 -21
  79. package/docs/dialog.html +1 -1
  80. package/docs/index.html +5 -4
  81. package/docs/list.html +38 -22
  82. package/docs/menu.html +246 -41
  83. package/docs/micl.css +1 -1
  84. package/docs/micl.js +1 -1
  85. package/docs/progressindicator.html +288 -0
  86. package/docs/select.html +68 -19
  87. package/docs/shape.css +1 -0
  88. package/docs/shape.js +1 -0
  89. package/docs/shapes.html +150 -0
  90. package/foundations/index.scss +0 -1
  91. package/foundations/layout/README.md +1 -1
  92. package/foundations/layout/index.scss +3 -0
  93. package/micl.ts +8 -1
  94. package/package.json +6 -4
  95. package/styles/README.md +90 -12
  96. package/styles/elevation.scss +46 -13
  97. package/styles/motion.scss +51 -47
  98. package/styles/shapes.scss +41 -26
  99. package/styles/statelayer.scss +93 -36
  100. package/styles/typography.scss +120 -322
  101. package/styles.scss +10 -6
  102. package/tools/shapes/check.mjs +42 -0
  103. package/tools/shapes/generate.mjs +834 -0
  104. package/webpack.config.js +16 -1
@@ -0,0 +1,14 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(node *)",
5
+ "WebSearch",
6
+ "Bash(npm run *)",
7
+ "WebFetch(domain:raw.githubusercontent.com)",
8
+ "WebFetch(domain:android.googlesource.com)",
9
+ "WebFetch(domain:m3.material.io)",
10
+ "WebFetch(domain:github.com)",
11
+ "Bash(xargs grep -l \"body\\\\|html\")"
12
+ ]
13
+ }
14
+ }
package/CLAUDE.md ADDED
@@ -0,0 +1,53 @@
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 (M3 Expressive) UI component library written in Sass and TypeScript.
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-comp-*` 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
+ ### Coding
41
+
42
+ - The amount of TypeScript code should be minimized. Necessary functionality should be solved using SCSS only.
43
+ – The SCSS code can be verbose, but the compiled CSS code must be as small as possible.
44
+
45
+ ### Documentation
46
+
47
+ - Component documentation is stored with the SCSS and JavaScript files. Always check if the documentation is up to date with regards to the implementation.
48
+
49
+ ### Build
50
+
51
+ `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.
52
+
53
+ The library compiles to a UMD bundle (`dist/micl.js`) and a CSS file (`dist/micl.css`) with zero runtime dependencies. In addition, a CSS and JavaScript pair of compiled files is created, so that a consumer may load only a subset of components.
package/README.md CHANGED
@@ -124,6 +124,12 @@ The library currently consists of the following components:
124
124
 
125
125
  ## Change Log ↪️
126
126
 
127
+ ### 8.0.0 (05.05.2026)
128
+ - **BREAKING**: Renamed many CSS custom properties from --md-sys- to --md-comp-.
129
+ - **List, Menu, Accordion, Select**: Aligned with latest MD3 spec.
130
+ - **Ripple**: Now starts on pointer-down.
131
+ - **Text field**: Outlined version uses CSS variable instead of inherited background.
132
+
127
133
  ### 7.0.0 (08.03.2026)
128
134
  - **BREAKING**: Use `<a>` instead of `<label>` inside Navigation rail.
129
135
  - **BREAKING**: Use `inert` for disabled cards instead of `micl-card--disabled`.
@@ -68,9 +68,9 @@ To ensure that only one accordion item within a group can be open at a time, add
68
68
  </div>
69
69
  </div>
70
70
  </details>
71
- <hr class="micl-divider">
71
+ <hr class="micl-divider-inset">
72
72
  <details name="mygroup">
73
- <summary class="micl-list-item-two" tabindex="-1">
73
+ <summary class="micl-list-item-two">
74
74
  <span class="micl-list-item__text">
75
75
  <span class="micl-list-item__headline">Country</span>
76
76
  <span class="micl-list-item__supporting-text">The country of residence.</span>
@@ -110,6 +110,9 @@ Use a [Divider component](../divider/README.md) to separate neighbouring accordi
110
110
 
111
111
  Since the Accordion is based on the List component, you can use the same utility classes for content structure and styling. Refer to the [List component documentation](../list/README.md) for details on how to add icons, avatars, images, and other features to your accordion items.
112
112
 
113
+ ## Keyboard
114
+ Each `<summary>` is a tab stop in document order — `Tab` and `Shift+Tab` move focus through the accordion headers. While focus is on a header, `Enter` or `Space` toggles the panel open or closed. As an optional enhancement, `ArrowDown` and `ArrowUp` move focus to the next or previous header in the same group; focus wraps around at the ends.
115
+
113
116
  ## Customizations
114
117
  You can customize the appearance of the Accordion component by overriding its own global CSS variables and those from the List component. These variables are declared on the `:root` pseudo-class and can be changed on any appropriate parent element to affect its child accordions.
115
118
 
@@ -131,4 +134,4 @@ You can customize the appearance of the Accordion component by overriding its ow
131
134
  ```
132
135
 
133
136
  ## Compatibility
134
- The Card component uses the `interpolate-size` CSS property to smoothly open and close the detail area of a Details disclosure element, which might not be supported in your browser. Please check [Browser compatibility](https://developer.mozilla.org/en-US/docs/Web/CSS/interpolate-size#browser_compatibility) for details.
137
+ The Accordion component uses the `interpolate-size` CSS property to smoothly open and close the detail area of a Details disclosure element, which might not be supported in your browser. Please check [Browser compatibility](https://developer.mozilla.org/en-US/docs/Web/CSS/interpolate-size#browser_compatibility) for details.
@@ -23,6 +23,11 @@
23
23
  @use '../../styles/shapes';
24
24
  @use '../../styles/typography';
25
25
 
26
+ @include shapes.corner('small');
27
+
28
+ @include typography.scale('title-medium');
29
+ @include typography.scale('body-medium');
30
+
26
31
  :root {
27
32
  --md-sys-alert-padding: 16px;
28
33
  --md-sys-alert-space: 16px;
@@ -26,6 +26,18 @@
26
26
  @use '../../styles/statelayer';
27
27
  @use '../../styles/typography';
28
28
 
29
+ @include elevation.level(0);
30
+ @include elevation.level(2);
31
+
32
+ @include shapes.corner('none');
33
+
34
+ @include typography.scale('display-small');
35
+ @include typography.scale('headline-medium');
36
+ @include typography.scale('title-large');
37
+ @include typography.scale('title-medium');
38
+ @include typography.scale('title-small');
39
+ @include typography.scale('label-medium');
40
+
29
41
  @mixin appbar-sticky() {
30
42
  position: sticky;
31
43
  inset: unset;
@@ -22,6 +22,8 @@
22
22
  @use '../../foundations';
23
23
  @use '../../styles/typography';
24
24
 
25
+ @include typography.scale('label-small');
26
+
25
27
  :root {
26
28
  --md-sys-badge-small-size: 6px;
27
29
  --md-sys-badge-large-size: 16px;
@@ -25,6 +25,15 @@
25
25
  @use '../../styles/shapes';
26
26
  @use '../../styles/statelayer';
27
27
 
28
+ @include elevation.level(1);
29
+
30
+ @include shapes.corner('extra-large');
31
+ @include shapes.corner('small');
32
+
33
+ @include statelayer.token('focus-indicator-thickness');
34
+ @include statelayer.token('focus-indicator-outer-offset');
35
+ @include statelayer.token('backdrop-opacity');
36
+
28
37
  dialog.micl-bottomsheet {
29
38
  --md-sys-bottomsheet-height: max-content;
30
39
  --md-sys-bottomsheet-margin: 56px;
@@ -26,6 +26,29 @@
26
26
  @use '../../styles/statelayer';
27
27
  @use '../../styles/typography';
28
28
 
29
+ @include elevation.level(0);
30
+ @include elevation.level(1);
31
+
32
+ @include shapes.corner('small');
33
+ @include shapes.corner('medium');
34
+ @include shapes.corner('large');
35
+ @include shapes.corner('extra-large');
36
+
37
+ @include statelayer.token('hover-state-layer-opacity');
38
+ @include statelayer.token('focus-state-layer-opacity');
39
+ @include statelayer.token('pressed-state-layer-opacity');
40
+ @include statelayer.token('disabled-state-layer-opacity');
41
+ @include statelayer.token('focus-indicator-thickness');
42
+ @include statelayer.token('ripple-opacity-factor');
43
+ @include statelayer.token('ripple-duration');
44
+ @include statelayer.property;
45
+ @include statelayer.keyframes;
46
+
47
+ @include typography.scale('headline-large');
48
+ @include typography.scale('headline-small');
49
+ @include typography.scale('title-medium');
50
+ @include typography.scale('label-large');
51
+
29
52
  button.micl-button-text-xs,
30
53
  a.micl-button-text-xs,
31
54
  button.micl-button-text-s,
@@ -69,15 +92,20 @@ button.micl-button-outlined-xl {
69
92
  border: none;
70
93
  border-radius: calc(var(--micl-height) / 2);
71
94
  background-image:
72
- radial-gradient(circle at var(--micl-x, center) var(--micl-y, center), transparent 0%, rgb(from var(--statelayer-color) r g b / var(--statelayer-opacity)) 10%, transparent 10%),
95
+ radial-gradient(
96
+ circle at var(--micl-x, center) var(--micl-y, center),
97
+ transparent 0%,
98
+ rgb(from var(--statelayer-color) r g b / calc(var(--statelayer-opacity) * var(--md-sys-state-ripple-opacity-factor))) 10%,
99
+ transparent 10%
100
+ ),
73
101
  linear-gradient(rgb(from var(--statelayer-color) r g b / var(--statelayer-opacity)));
74
102
  background-repeat: no-repeat;
75
- background-size: 10000%, 100%;
103
+ background-size: 0%, 100%;
76
104
  -webkit-tap-highlight-color: transparent;
77
105
  cursor: pointer;
78
106
  transition:
79
107
  border-radius var(--md-sys-button-motion-duration) var(--md-sys-button-motion-effects),
80
- background-size 3000ms,
108
+ background-size 0ms,
81
109
  --statelayer-opacity var(--md-sys-button-motion-duration) linear;
82
110
 
83
111
  &:disabled {
@@ -91,9 +119,8 @@ button.micl-button-outlined-xl {
91
119
  outline: var(--md-sys-state-focus-indicator-thickness, 3px) solid var(--md-sys-color-secondary);
92
120
  outline-offset: 3px;
93
121
  }
94
- &:active {
95
- background-size: 0%, 100%;
96
- transition: background-size 0ms;
122
+ &.micl-rippling {
123
+ animation: micl-ripple var(--md-sys-state-ripple-duration) motion.$md-sys-motion-easing-standard;
97
124
  }
98
125
  }
99
126
  .micl-button__icon {
@@ -126,6 +126,7 @@ The Card component supports the following CSS variables, as defined in the [Mate
126
126
  --md-comp-elevated-card-container-shape
127
127
  --md-comp-elevated-card-disabled-container-elevation
128
128
  --md-comp-elevated-card-disabled-container-color
129
+ --md-comp-elevated-card-disabled-container-opacity
129
130
  --md-comp-elevated-card-hover-container-elevation
130
131
  --md-comp-elevated-card-hover-state-layer-color
131
132
  --md-comp-elevated-card-hover-state-layer-opacity
@@ -146,6 +147,7 @@ The Card component supports the following CSS variables, as defined in the [Mate
146
147
  --md-comp-filled-card-container-shape
147
148
  --md-comp-filled-card-disabled-container-elevation
148
149
  --md-comp-filled-card-disabled-container-color
150
+ --md-comp-filled-card-disabled-container-opacity
149
151
  --md-comp-filled-card-hover-container-elevation
150
152
  --md-comp-filled-card-hover-state-layer-color
151
153
  --md-comp-filled-card-hover-state-layer-opacity
@@ -166,7 +168,9 @@ The Card component supports the following CSS variables, as defined in the [Mate
166
168
  --md-comp-outlined-card-container-shape
167
169
  --md-comp-outlined-card-outline-width
168
170
  --md-comp-outlined-card-outline-color
171
+ --md-comp-outlined-card-disabled-container-color
169
172
  --md-comp-outlined-card-disabled-container-elevation
173
+ --md-comp-outlined-card-disabled-container-opacity
170
174
  --md-comp-outlined-card-disabled-outline-color
171
175
  --md-comp-outlined-card-disabled-outline-opacity
172
176
  --md-comp-outlined-card-hover-container-elevation