material-inspired-component-library 1.0.3 → 1.1.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 (80) hide show
  1. package/README.md +23 -20
  2. package/components/accordion/README.md +7 -9
  3. package/components/bottomsheet/README.md +7 -9
  4. package/components/bottomsheet/index.scss +3 -0
  5. package/components/button/README.md +7 -9
  6. package/components/button/index.scss +3 -0
  7. package/components/card/README.md +3 -3
  8. package/components/card/index.scss +3 -0
  9. package/components/checkbox/README.md +7 -9
  10. package/components/checkbox/index.scss +2 -0
  11. package/components/dialog/README.md +3 -3
  12. package/components/dialog/index.scss +3 -0
  13. package/components/divider/README.md +3 -3
  14. package/components/iconbutton/README.md +7 -9
  15. package/components/iconbutton/index.scss +3 -0
  16. package/components/list/README.md +7 -9
  17. package/components/list/index.scss +2 -0
  18. package/components/menu/README.md +8 -10
  19. package/components/menu/index.scss +3 -0
  20. package/components/radio/README.md +3 -3
  21. package/components/radio/index.scss +2 -0
  22. package/components/select/README.md +9 -11
  23. package/components/select/index.scss +2 -0
  24. package/components/sidesheet/README.md +3 -3
  25. package/components/sidesheet/index.scss +2 -0
  26. package/components/slider/README.md +7 -9
  27. package/components/slider/index.scss +13 -8
  28. package/components/switch/README.md +3 -3
  29. package/components/switch/index.scss +3 -0
  30. package/components/textfield/README.md +55 -26
  31. package/components/textfield/index.scss +100 -55
  32. package/components/textfield/index.ts +23 -16
  33. package/dist/bottomsheet.css +1 -1
  34. package/dist/bottomsheet.js +1 -0
  35. package/dist/button.css +1 -1
  36. package/dist/button.js +1 -0
  37. package/dist/card.css +1 -1
  38. package/dist/card.js +1 -0
  39. package/dist/checkbox.css +1 -1
  40. package/dist/checkbox.js +1 -0
  41. package/dist/components/bottomsheet/index.d.ts +6 -0
  42. package/dist/components/button/index.d.ts +6 -0
  43. package/dist/components/checkbox/index.d.ts +5 -0
  44. package/dist/components/iconbutton/index.d.ts +6 -0
  45. package/dist/components/list/index.d.ts +5 -0
  46. package/dist/components/menu/index.d.ts +16 -0
  47. package/dist/components/slider/index.d.ts +6 -0
  48. package/dist/components/textfield/index.d.ts +8 -0
  49. package/dist/dialog.css +1 -1
  50. package/dist/dialog.js +1 -0
  51. package/dist/divider.js +1 -0
  52. package/dist/iconbutton.css +1 -1
  53. package/dist/iconbutton.js +1 -0
  54. package/dist/list.css +1 -1
  55. package/dist/list.js +1 -0
  56. package/dist/menu.css +1 -1
  57. package/dist/menu.js +1 -0
  58. package/dist/micl.css +1 -1
  59. package/dist/micl.d.ts +5 -0
  60. package/dist/micl.js +1 -1
  61. package/dist/radio.css +1 -1
  62. package/dist/radio.js +1 -0
  63. package/dist/select.css +1 -1
  64. package/dist/select.js +1 -0
  65. package/dist/sidesheet.css +1 -1
  66. package/dist/sidesheet.js +1 -0
  67. package/dist/slider.css +1 -1
  68. package/dist/slider.js +1 -0
  69. package/dist/switch.css +1 -1
  70. package/dist/switch.js +1 -0
  71. package/dist/textfield.css +1 -1
  72. package/dist/textfield.js +1 -0
  73. package/docs/micl.css +1 -1
  74. package/docs/micl.js +1 -1
  75. package/docs/slider.html +1 -0
  76. package/docs/textfield.html +30 -17
  77. package/{components.ts → micl.ts} +75 -53
  78. package/package.json +5 -3
  79. package/tsconfig.json +11 -5
  80. package/webpack.config.js +7 -4
package/README.md CHANGED
@@ -28,24 +28,29 @@ npm install material-inspired-component-library
28
28
 
29
29
  **Sass/SCSS**
30
30
 
31
- To import the styles for a single component:
31
+ To import the styles for a single component (e.g., the [Card component](components/card/README.md)):
32
32
  ```SCSS
33
- @use "material-inspired-component-library/components/card";
33
+ @use "material-inspired-component-library/dist/card";
34
34
  ```
35
35
  To import all component styles:
36
36
  ```SCSS
37
37
  @use "material-inspired-component-library/styles";
38
38
  ```
39
+ Remember to import your [theme file](themes/README.md) as well:
40
+ ```SCSS
41
+ @use "path/to/mytheme";
42
+ ```
39
43
 
40
44
  **Plain CSS**
41
45
 
42
- Add the main CSS file to your project:
46
+ Copy the main `micl.css` file to your distribution folder and include it in your application. Include your [theme file](themes/README.md) as well:
43
47
  ```HTML
44
- <link rel="stylesheet" href="node_modules/material-inspired-component-library/dist/micl.css">
48
+ <link rel="stylesheet" type="text/css" href="path/to/dist/mytheme.css">
49
+ <link rel="stylesheet" type="text/css" href="path/to/dist/micl.css">
45
50
  ```
46
51
 
47
52
  ### 3. Add the HTML & JavaScript
48
- Here is a simple example of a **Card** component.
53
+ Here is a simple example of a [Card component](components/card/README.md).
49
54
 
50
55
  ```HTML
51
56
  <div class="micl-card-outlined">
@@ -57,27 +62,19 @@ Here is a simple example of a **Card** component.
57
62
  </div>
58
63
  ```
59
64
 
60
- Some components, list the **List**, require a small amount of JavaScript to handle interactive behaviour.
61
-
62
- ```TypeScript
63
- // For components with interactive behaviour
64
- import list from "material-inspired-component-library/components/lists";
65
-
66
- // To import TypeScript for all components
67
- import components from "material-inspired-component-library/components";
68
- ```
69
-
70
- To import all the TypeScript into your project:
71
- ```TypeScript
72
- import components from "material-inspired-component-library/components";
65
+ Some components, like the [List](components/list/README.md), require a small amount of JavaScript to handle interactive behaviour. Because the JavaScript footprint in MICL is so small, you can import the code for all components at once.
66
+ ```JavaScript
67
+ import micl from "material-inspired-component-library/dist/micl";
73
68
  ```
69
+ This will initialize all MICL components, including those that will be added to the DOM later on.
74
70
 
75
71
  **Plain JavaScript**
76
72
 
77
- Add the main JavaScript file to your project:
73
+ Copy the main `micl.js` file to your distribution folder and include it in your application:
78
74
  ```HTML
79
- <script src="node_modules/material-inspired-component-library/dist/micl.js"></script>
75
+ <script src="path/to/dist/micl.js"></script>
80
76
  ```
77
+ This will initialize all MICL components, including those that will be added to the DOM later on.
81
78
 
82
79
  ## Available components ✅
83
80
  The library currently consists of the following components:
@@ -97,3 +94,9 @@ The library currently consists of the following components:
97
94
  - [x] [Slider](components/slider/README.md)
98
95
  - [x] [Switch](components/switch/README.md)
99
96
  - [x] [Text field](components/textfield/README.md)
97
+
98
+ ## Change Log
99
+
100
+ ### 1.1.0 (12.08.2025)
101
+ **Features**
102
+ - **Text field**: Added support for multi-line text fields.
@@ -31,20 +31,18 @@ The Accordion component is an extension of the [**List** component](../list/READ
31
31
  Import the list styles into your project:
32
32
 
33
33
  ```CSS
34
- @use "material-inspired-component-library/components/list";
34
+ @use "material-inspired-component-library/dist/list";
35
35
  ```
36
36
 
37
- ### TypeScript
38
- This component requires a TypeScript module to support keyboard navigation. You can import the specific module or use the main MICL TypeScript library, which handles initialization automatically.
37
+ ### JavaScript
38
+ This component requires JavaScript to support keyboard navigation:
39
39
 
40
- To manually initialize the component:
41
-
42
- ```TypeScript
43
- import miclAccordion from 'material-inspired-component-library/components/list';
44
-
45
- miclAccordion.initialize(document.querySelector('.micl-list'));
40
+ ```JavaScript
41
+ import micl from "material-inspired-component-library/dist/micl";
46
42
  ```
47
43
 
44
+ This will initialize any List component, including those that will be added to the DOM later on.
45
+
48
46
  ### Demo
49
47
  A live example of the [Accordion component](https://henkpb.github.io/micl/accordion.html) is available for you to interact with.
50
48
 
@@ -18,20 +18,18 @@ To create a standard bottom sheet, use the `<dialog>` element with the `popover`
18
18
  Import the bottom sheet styles into your project:
19
19
 
20
20
  ```CSS
21
- @use "material-inspired-component-library/components/bottomsheet";
21
+ @use "material-inspired-component-library/dist/bottomsheet";
22
22
  ```
23
23
 
24
- ### TypeScript
25
- This component requires a TypeScript module to support **modal** and **resizable** bottom sheets. You can import the specific bottom sheet module or use the main MICL TypeScript library, which handles initialization automatically.
24
+ ### JavaScript
25
+ This component requires JavaScript to support **modal** and **resizable** bottom sheets:
26
26
 
27
- To manually initialize the component:
28
-
29
- ```TypeScript
30
- import miclBottomSheet from 'material-inspired-component-library/components/bottomsheet';
31
-
32
- miclBottomSheet.initialize(document.querySelector('.micl-bottomsheet'));
27
+ ```JavaScript
28
+ import micl from "material-inspired-component-library/dist/micl";
33
29
  ```
34
30
 
31
+ This will initialize any Bottom sheet component, including those that will be added to the DOM later on.
32
+
35
33
  ### Demo
36
34
  A live example of the [Bottom sheet component](https://henkpb.github.io/micl/bottomsheet.html) is available for you to interact with.
37
35
 
@@ -19,7 +19,10 @@
19
19
  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
20
  // SOFTWARE.
21
21
 
22
+ @use '../../styles/elevation';
22
23
  @use '../../styles/motion';
24
+ @use '../../styles/shapes';
25
+ @use '../../styles/statelayer';
23
26
 
24
27
  dialog.micl-bottomsheet {
25
28
  --md-sys-bottomsheet-height: max-content;
@@ -14,20 +14,18 @@ To create a basic button, use the `<button>` element with a class that specifies
14
14
  Import the button styles into your project:
15
15
 
16
16
  ```CSS
17
- @use "material-inspired-component-library/components/button";
17
+ @use "material-inspired-component-library/dist/button";
18
18
  ```
19
19
 
20
- ### TypeScript
21
- This component requires a TypeScript module for interactive features like the **ripple effect** and **toggle logic**. You can import the specific button module or use the main MICL TypeScript library, which handles initialization automatically.
20
+ ### JavaScript
21
+ This component requires JavaScript for interactive features like the **ripple effect** and **toggle logic**:
22
22
 
23
- To manually initialize the component:
24
-
25
- ```TypeScript
26
- import miclButton from 'material-inspired-component-library/components/button';
27
-
28
- miclButton.initialize(document.querySelector('.micl-button-text-s'));
23
+ ```JavaScript
24
+ import micl from "material-inspired-component-library/dist/micl";
29
25
  ```
30
26
 
27
+ This will initialize any Button component, including those that will be added to the DOM later on.
28
+
31
29
  ### Demo
32
30
  A live example of the [Button component](https://henkpb.github.io/micl/button.html) is available for you to interact with.
33
31
 
@@ -19,8 +19,11 @@
19
19
  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
20
  // SOFTWARE.
21
21
 
22
+ @use '../../styles/elevation';
22
23
  @use '../../styles/motion';
23
24
  @use '../../styles/ripple';
25
+ @use '../../styles/shapes';
26
+ @use '../../styles/statelayer';
24
27
  @use '../../styles/typography';
25
28
 
26
29
  button.micl-button-text-xs,
@@ -16,11 +16,11 @@ To add a basic card, use a `<div>` element with one of the primary card style cl
16
16
  Import the card styles into your project:
17
17
 
18
18
  ```CSS
19
- @use "material-inspired-component-library/components/card";
19
+ @use "material-inspired-component-library/dist/card";
20
20
  ```
21
21
 
22
- ### TypeScript
23
- No custom TypeScript is required for the core functionality of this component.
22
+ ### JavaScript
23
+ No custom JavaScript is required for the core functionality of this component.
24
24
 
25
25
  ### Demo
26
26
  A live example of the [Card component](https://henkpb.github.io/micl/card.html) is available for you to interact with.
@@ -19,8 +19,11 @@
19
19
  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
20
  // SOFTWARE.
21
21
 
22
+ @use '../../styles/elevation';
22
23
  @use '../../styles/motion';
23
24
  @use '../../styles/ripple';
25
+ @use '../../styles/shapes';
26
+ @use '../../styles/statelayer';
24
27
  @use '../../styles/typography';
25
28
 
26
29
  :root {
@@ -15,20 +15,18 @@ To add a basic checkbox, use the `<input type="checkbox">` element with the `mic
15
15
  Import the checkbox styles into your project:
16
16
 
17
17
  ```CSS
18
- @use "material-inspired-component-library/components/checkbox";
18
+ @use "material-inspired-component-library/dist/checkbox";
19
19
  ```
20
20
 
21
- ### TypeScript
22
- This component requires a TypeScript module to support checking and unchecking using a keyboard. You can import the specific module or use the main MICL TypeScript library, which handles initialization automatically.
21
+ ### JavaScript
22
+ This component requires JavaScript to support checking and unchecking using a keyboard:
23
23
 
24
- To manually initialize the component:
25
-
26
- ```TypeScript
27
- import miclCheckbox from 'material-inspired-component-library/components/checkbox';
28
-
29
- miclCheckbox.initialize(document.querySelector('.micl-checkbox'));
24
+ ```JavaScript
25
+ import micl from "material-inspired-component-library/dist/micl";
30
26
  ```
31
27
 
28
+ This will initialize any Checkbox component, including those that will be added to the DOM later on.
29
+
32
30
  ### Demo
33
31
  A live example of the [Checkbox component](https://henkpb.github.io/micl/checkbox.html) is available for you to interact with.
34
32
 
@@ -21,6 +21,8 @@
21
21
 
22
22
  @use '../../styles/motion';
23
23
  @use '../../styles/ripple';
24
+ @use '../../styles/statelayer';
25
+ @use '../../styles/typography';
24
26
 
25
27
  :root {
26
28
  --md-sys-checkbox-container-size: 18px;
@@ -25,11 +25,11 @@ To create a basic dialog, use the `<dialog>` element with the `micl-dialog` clas
25
25
  Import the dialog styles into your project:
26
26
 
27
27
  ```CSS
28
- @use "material-inspired-component-library/components/dialog";
28
+ @use "material-inspired-component-library/dist/dialog";
29
29
  ```
30
30
 
31
- ### TypeScript
32
- No custom TypeScript is required for the core functionality of this component, as the native popover attribute handles the open/close behavior.
31
+ ### JavaScript
32
+ No custom JavaScript is required for the core functionality of this component, as the native popover attribute handles the open/close behavior.
33
33
 
34
34
  ### Demo
35
35
  A live example of the [Dialog component](https://henkpb.github.io/micl/dialog.html) is available for you to interact with.
@@ -19,7 +19,10 @@
19
19
  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
20
  // SOFTWARE.
21
21
 
22
+ @use '../../styles/elevation';
22
23
  @use '../../styles/motion';
24
+ @use '../../styles/shapes';
25
+ @use '../../styles/statelayer';
23
26
  @use '../../styles/typography';
24
27
 
25
28
  :root {
@@ -14,11 +14,11 @@ To add a basic divider, use the `<hr>` element with the `micl-divider` class:
14
14
  Import the divider styles into your project:
15
15
 
16
16
  ```CSS
17
- @use "material-inspired-component-library/components/divider";
17
+ @use "material-inspired-component-library/dist/divider";
18
18
  ```
19
19
 
20
- ### TypeScript
21
- No custom TypeScript is required for the core functionality of this component.
20
+ ### JavaScript
21
+ No custom JavaScript is required for the core functionality of this component.
22
22
 
23
23
  ### Demo
24
24
  A live example of the [Divider component](https://henkpb.github.io/micl/divider.html) is available for you to interact with.
@@ -16,20 +16,18 @@ To create a basic icon button, use the `<button>` element with a class that spec
16
16
  Import the icon button styles into your project:
17
17
 
18
18
  ```CSS
19
- @use "material-inspired-component-library/components/iconbutton";
19
+ @use "material-inspired-component-library/dist/iconbutton";
20
20
  ```
21
21
 
22
- ### TypeScript
23
- This component requires a TypeScript module for interactive features like the **ripple effect** and **toggle logic**. You can import the specific module and handle initialization manually, or use the main MICL library for automatic initialization.
22
+ ### JavaScript
23
+ This component requires JavaScript for interactive features like the **ripple effect** and **toggle logic**:
24
24
 
25
- To manually initialize the component:
26
-
27
- ```TypeScript
28
- import miclIconButton from 'material-inspired-component-library/components/button';
29
-
30
- miclIconButton.initialize(document.querySelector('.micl-iconbutton-standard-s'));
25
+ ```JavaScript
26
+ import micl from "material-inspired-component-library/dist/micl";
31
27
  ```
32
28
 
29
+ This will initialize any Icon button component, including those that will be added to the DOM later on.
30
+
33
31
  ### Demo
34
32
  A live example of the [Icon button component](https://henkpb.github.io/micl/iconbutton.html) is available for you to interact with.
35
33
 
@@ -19,8 +19,11 @@
19
19
  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
20
  // SOFTWARE.
21
21
 
22
+ @use '../../styles/elevation';
22
23
  @use '../../styles/motion';
23
24
  @use '../../styles/ripple';
25
+ @use '../../styles/shapes';
26
+ @use '../../styles/statelayer';
24
27
 
25
28
  button.micl-iconbutton-standard-xs,
26
29
  button.micl-iconbutton-standard-s,
@@ -24,20 +24,18 @@ To create a basic list, use the `<ul>` element with the `micl-list` class and in
24
24
  Import the list styles into your project:
25
25
 
26
26
  ```CSS
27
- @use "material-inspired-component-library/components/list";
27
+ @use "material-inspired-component-library/dist/list";
28
28
  ```
29
29
 
30
- ### TypeScript
31
- This component requires a TypeScript module to support keyboard navigation. You can import the specific module or use the main MICL TypeScript library, which handles initialization automatically.
30
+ ### JavaScript
31
+ This component requires JavaScript to support keyboard navigation:
32
32
 
33
- To manually initialize the component:
34
-
35
- ```TypeScript
36
- import miclList from 'material-inspired-component-library/components/list';
37
-
38
- miclList.initialize(document.querySelector('.micl-list'));
33
+ ```JavaScript
34
+ import micl from "material-inspired-component-library/dist/micl";
39
35
  ```
40
36
 
37
+ This will initialize any List component, including those that will be added to the DOM later on.
38
+
41
39
  ### Demo
42
40
  A live example of the [List component](https://henkpb.github.io/micl/list.html) is available for you to interact with.
43
41
 
@@ -21,6 +21,8 @@
21
21
 
22
22
  @use '../../styles/motion';
23
23
  @use '../../styles/ripple';
24
+ @use '../../styles/shapes';
25
+ @use '../../styles/statelayer';
24
26
  @use '../../styles/typography';
25
27
 
26
28
  :root {
@@ -24,21 +24,19 @@ The Menu component is an extension of the [List component](../list/README.md). I
24
24
  Import the styles for both the menu and list components into your project:
25
25
 
26
26
  ```CSS
27
- @use "material-inspired-component-library/components/list";
28
- @use "material-inspired-component-library/components/menu";
27
+ @use "material-inspired-component-library/dist/list";
28
+ @use "material-inspired-component-library/dist/menu";
29
29
  ```
30
30
 
31
- ### TypeScript
32
- This component requires the **Menu** TypeScript module for functionality. You can import the specific module and handle initialization manually, or use the main MICL library for automatic initialization.
31
+ ### JavaScript
32
+ This component requires JavaScript for functionality:
33
33
 
34
- To manually initialize the component:
35
-
36
- ```TypeScript
37
- import miclMenu from 'material-inspired-component-library/components/menu';
38
-
39
- miclMenu.initialize(document.querySelector('.micl-menu'));
34
+ ```JavaScript
35
+ import micl from "material-inspired-component-library/dist/micl";
40
36
  ```
41
37
 
38
+ This will initialize any Menu component, including those that will be added to the DOM later on.
39
+
42
40
  ### Demo
43
41
  A live example of the [Menu component](https://henkpb.github.io/micl/menu.html) is available for you to interact with.
44
42
 
@@ -19,8 +19,11 @@
19
19
  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
20
  // SOFTWARE.
21
21
 
22
+ @use '../../styles/elevation';
22
23
  @use '../../styles/motion';
23
24
  @use '../../styles/ripple';
25
+ @use '../../styles/shapes';
26
+ @use '../../styles/statelayer';
24
27
 
25
28
  .micl-menu[popover] {
26
29
  position: absolute;
@@ -15,11 +15,11 @@ To add a basic radio button, use the `<input type="radio">` element with the `mi
15
15
  Import the radio button styles into your project:
16
16
 
17
17
  ```CSS
18
- @use "material-inspired-component-library/components/radio";
18
+ @use "material-inspired-component-library/dist/radio";
19
19
  ```
20
20
 
21
- ### TypeScript
22
- No custom TypeScript is required for the core functionality of this component. However, to enable the ripple effect on interaction, include the Ripple TypeScript in your project.
21
+ ### JavaScript
22
+ No custom JavaScript is required for the core functionality of this component.
23
23
 
24
24
  ### Demo
25
25
  A live example of the [Radio button component](https://henkpb.github.io/micl/radio.html) is available for you to interact with.
@@ -21,6 +21,8 @@
21
21
 
22
22
  @use '../../styles/motion';
23
23
  @use '../../styles/ripple';
24
+ @use '../../styles/shapes';
25
+ @use '../../styles/statelayer';
24
26
 
25
27
  :root {
26
28
  --md-sys-radio-border-width: 2px;
@@ -24,22 +24,20 @@ The Select component is an extension of the [Text field](../textfield/README.md)
24
24
  The Select component relies on styles from the text field and list components. Be sure to import all three styles into your project.
25
25
 
26
26
  ```CSS
27
- @use "material-inspired-component-library/components/list";
28
- @use "material-inspired-component-library/components/textfield";
29
- @use "material-inspired-component-library/components/select";
27
+ @use "material-inspired-component-library/dist/list";
28
+ @use "material-inspired-component-library/dist/textfield";
29
+ @use "material-inspired-component-library/dist/select";
30
30
  ```
31
31
 
32
- ### TypeScript
33
- This component requires the **Text field** TypeScript module for functionality. You can import the specific module and handle initialization manually, or use the main MICL library for automatic initialization.
32
+ ### JavaScript
33
+ This component requires JavaScript for functionality:
34
34
 
35
- To manually initialize the component:
36
-
37
- ```TypeScript
38
- import miclTextField from 'material-inspired-component-library/components/textfield';
39
-
40
- miclTextField.initialize(document.querySelector('.micl-textfield-filled'));
35
+ ```JavaScript
36
+ import micl from "material-inspired-component-library/dist/micl";
41
37
  ```
42
38
 
39
+ This will initialize any Select component, including those that will be added to the DOM later on.
40
+
43
41
  ### Demo
44
42
  A live example of the [Select component](https://henkpb.github.io/micl/select.html) is available for you to interact with.
45
43
 
@@ -19,8 +19,10 @@
19
19
  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
20
  // SOFTWARE.
21
21
 
22
+ @use '../../styles/elevation';
22
23
  @use '../../styles/motion';
23
24
  @use '../../styles/ripple';
25
+ @use '../../styles/shapes';
24
26
  @use '../../styles/statelayer';
25
27
  @use '../../styles/typography';
26
28
 
@@ -27,11 +27,11 @@ To create a standard side sheet, use the `<dialog>` element with the `popover` a
27
27
  Import the side sheet styles into your project:
28
28
 
29
29
  ```CSS
30
- @use "material-inspired-component-library/components/sidesheet";
30
+ @use "material-inspired-component-library/dist/sidesheet";
31
31
  ```
32
32
 
33
- ### TypeScript
34
- No custom TypeScript is required for the core functionality of the side sheet component.
33
+ ### JavaScript
34
+ No custom JavaScript is required for the core functionality of the side sheet component.
35
35
 
36
36
  ### Demo
37
37
  A live example of the [Side sheet component](https://henkpb.github.io/micl/sidesheet.html) is available for you to interact with.
@@ -19,7 +19,9 @@
19
19
  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
20
  // SOFTWARE.
21
21
 
22
+ @use '../../styles/elevation';
22
23
  @use '../../styles/motion';
24
+ @use '../../styles/shapes';
23
25
  @use '../../styles/typography';
24
26
 
25
27
  dialog.micl-sidesheet {
@@ -14,20 +14,18 @@ To add a basic slider, use the `<input type="range">` element with one of the pr
14
14
  Import the slider styles into your project:
15
15
 
16
16
  ```CSS
17
- @use "material-inspired-component-library/components/slider";
17
+ @use "material-inspired-component-library/dist/slider";
18
18
  ```
19
19
 
20
- ### TypeScript
21
- This component requires the **Slider** TypeScript module for functionality. You can import the specific module and handle initialization manually, or use the main MICL library for automatic initialization.
20
+ ### JavaScript
21
+ This component requires JavaScript for functionality:
22
22
 
23
- To manually initialize the component:
24
-
25
- ```TypeScript
26
- import miclSlider from 'material-inspired-component-library/components/slider';
27
-
28
- miclSlider.initialize(document.querySelector('.micl-slider-m'));
23
+ ```JavaScript
24
+ import micl from "material-inspired-component-library/dist/micl";
29
25
  ```
30
26
 
27
+ This will initialize any Slider component, including those that will be added to the DOM later on.
28
+
31
29
  ### Demo
32
30
  A live example of the [Slider component](https://henkpb.github.io/micl/slider.html) is available for you to interact with.
33
31
 
@@ -20,11 +20,14 @@
20
20
  // SOFTWARE.
21
21
 
22
22
  @use '../../styles/motion';
23
+ @use '../../styles/shapes';
24
+ @use '../../styles/statelayer';
23
25
  @use '../../styles/typography';
24
26
 
25
27
  @mixin slider-track() {
26
28
  block-size: var(--md-sys-slider-track-height);
27
29
  border-radius: var(--md-sys-slider-track-radius);
30
+ background-color: inherit;
28
31
  background-image: linear-gradient(
29
32
  var(--md-sys-slider-track-direction),
30
33
  var(--md-sys-color-primary) calc(100% * (var(--md-sys-slider-value) - var(--md-sys-slider-min)) / (var(--md-sys-slider-max) - var(--md-sys-slider-min))),
@@ -48,13 +51,12 @@
48
51
  appearance: none;
49
52
  box-sizing: content-box;
50
53
  position: relative;
51
- inline-size: 4px;
54
+ inline-size: 16px;
52
55
  block-size: var(--md-sys-slider-handle-height);
53
56
  inset: 0;
54
- inset-block-start: calc(-1 * (var(--md-sys-slider-handle-height) + 2 * var(--md-sys-slider-thumb-space) - var(--md-sys-slider-track-height)) / 2);
55
- border: var(--md-sys-slider-thumb-space) solid currentColor;
56
- border-radius: 8px;
57
- background-color: var(--md-sys-color-primary);
57
+ inset-block-start: calc(-1 * (var(--md-sys-slider-handle-height) - var(--md-sys-slider-track-height)) / 2);
58
+ background-color: inherit;
59
+ background-image: linear-gradient(to right,transparent 0px,transparent var(--md-sys-slider-thumb-space), var(--md-sys-color-primary) var(--md-sys-slider-thumb-space),var(--md-sys-color-primary) 10px,transparent 10px, transparent 16px);
58
60
  cursor: pointer;
59
61
  z-index: 2;
60
62
  }
@@ -105,7 +107,7 @@ input[type=range].micl-slider-xl {
105
107
  margin: 0;
106
108
  outline: none;
107
109
  color: var(--md-sys-color-surface-container-low);
108
- background-color: transparent;
110
+ background-color: inherit;
109
111
  accent-color: var(--md-sys-color-primary);
110
112
 
111
113
  &::before {
@@ -145,6 +147,9 @@ input[type=range].micl-slider-xl {
145
147
  z-index: 3;
146
148
  transition: opacity var(--md-sys-motion-duration-long2) motion.$md-sys-motion-easing-emphasized-decelerate;
147
149
  }
150
+ &::-webkit-slider-container {
151
+ background-color: inherit;
152
+ }
148
153
  &::-webkit-slider-runnable-track {
149
154
  @include slider-track;
150
155
  }
@@ -195,12 +200,12 @@ input[type=range].micl-slider-xl {
195
200
  }
196
201
  &:not(:disabled):active {
197
202
  &::-webkit-slider-thumb {
198
- inline-size: 2px;
203
+ background-image: linear-gradient(to right,transparent 0px, transparent calc(var(--md-sys-slider-thumb-space) + 1px), var(--md-sys-color-primary) calc(var(--md-sys-slider-thumb-space) + 1px), var(--md-sys-color-primary) calc(var(--md-sys-slider-thumb-space) + 3px), transparent calc(var(--md-sys-slider-thumb-space) + 3px), transparent calc(2 * var(--md-sys-slider-thumb-space) + 4px));
199
204
  outline: none;
200
205
  cursor: grabbing;
201
206
  }
202
207
  &::-moz-range-thumb {
203
- inline-size: 2px;
208
+ background-image: linear-gradient(to right,transparent 0px, transparent calc(var(--md-sys-slider-thumb-space) + 1px), var(--md-sys-color-primary) calc(var(--md-sys-slider-thumb-space) + 1px), var(--md-sys-color-primary) calc(var(--md-sys-slider-thumb-space) + 3px), transparent calc(var(--md-sys-slider-thumb-space) + 3px), transparent calc(2 * var(--md-sys-slider-thumb-space) + 4px));
204
209
  outline: none;
205
210
  cursor: grabbing;
206
211
  }
@@ -15,11 +15,11 @@ To add a basic switch, use the `<input type="checkbox">` element with the `micl-
15
15
  Import the switch styles into your project:
16
16
 
17
17
  ```CSS
18
- @use "material-inspired-component-library/components/switch";
18
+ @use "material-inspired-component-library/dist/switch";
19
19
  ```
20
20
 
21
- ### TypeScript
22
- No custom TypeScript is required for the core functionality of this component.
21
+ ### JavaScript
22
+ No custom JavaScript is required for the core functionality of this component.
23
23
 
24
24
  ### Demo
25
25
  A live example of the [Switch component](https://henkpb.github.io/micl/switch.html) is available for you to interact with.