@muibook/components 1.1.4 → 1.2.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.
@@ -8,6 +8,7 @@ import "./globe/index.js";
8
8
  import "./grid/index.js";
9
9
  import "./info/index.js";
10
10
  import "./left-arrow/index.js";
11
+ import "./left-sidebar/index.js";
11
12
  import "./left-chevron/index.js";
12
13
  import "./menu/index.js";
13
14
  import "./message/index.js";
@@ -0,0 +1,55 @@
1
+ class r extends HTMLElement {
2
+ static get observedAttributes() {
3
+ return ["size", "color"];
4
+ }
5
+ constructor() {
6
+ super(), this.attachShadow({ mode: "open" });
7
+ }
8
+ connectedCallback() {
9
+ this.render();
10
+ }
11
+ attributeChangedCallback(e, t, i) {
12
+ (e === "size" || e === "color") && t !== i && this.render();
13
+ }
14
+ render() {
15
+ const e = this.getAttribute("size") || "small", t = this.getAttribute("color"), c = t && {
16
+ default: "var(--icon-color-default)",
17
+ inverted: "var(--icon-color-inverted)"
18
+ }[t] || t || "var(--icon-color-default)", o = {
19
+ "x-small": "1.6rem",
20
+ small: "2.4rem",
21
+ medium: "3.6rem",
22
+ large: "4.8rem"
23
+ }, s = o[e] ?? o.small;
24
+ this.classList.add("mui-icon"), this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
25
+ `
26
+ <style>
27
+ :host {
28
+ width: ${s};
29
+ height: ${s};
30
+ display: inline-flex;
31
+ align-items: center;
32
+ justify-content: center;
33
+ fill: ${c};
34
+ }
35
+ svg {
36
+ width: 100%;
37
+ display: block;
38
+ fill: inherit;
39
+ }
40
+ </style>
41
+
42
+ <svg
43
+ xmlns="http://www.w3.org/2000/svg"
44
+ viewBox="0 0 36 36"
45
+ >
46
+ <path
47
+ d="M7.671 30.5C4.7 30.5 3 28.838 3 25.91V11.09C3 8.163 4.699 6.5 7.671 6.5H28.33C31.314 6.5 33 8.162 33 11.09v14.82c0 2.928-1.686 4.59-4.671 4.59zm.525-3.803h6.057V10.315H8.196c-.887 0-1.337.394-1.337 1.317V25.38c0 .923.45 1.317 1.337 1.317m19.62-16.382H17.764v16.382h10.054c.874 0 1.324-.394 1.324-1.317V11.632c0-.923-.45-1.317-1.324-1.317m-16.148 4.32H9.47c-.65 0-1.174-.504-1.174-1.095 0-.578.524-1.083 1.174-1.083h2.198c.65 0 1.161.504 1.161 1.083 0 .59-.512 1.095-1.161 1.095m0 3.644H9.47c-.65 0-1.174-.505-1.174-1.084 0-.59.524-1.083 1.174-1.083h2.198c.65 0 1.161.493 1.161 1.083 0 .579-.512 1.084-1.161 1.084m0 3.655H9.47c-.65 0-1.174-.505-1.174-1.096 0-.59.524-1.083 1.174-1.083h2.198c.65 0 1.161.493 1.161 1.084 0 .59-.512 1.095-1.161 1.095"
48
+ ></path>
49
+ </svg>
50
+
51
+
52
+ `);
53
+ }
54
+ }
55
+ customElements.define("mui-icon-left-sidebar", r);
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { PartTypes as Tr, Parts as br, getPartMap as cr } from "./utils/part-map/index.js";
1
+ import { PartTypes as br, Parts as cr, getPartMap as dr } from "./utils/part-map/index.js";
2
2
  import "./components/mui-field/index.js";
3
3
  import "./components/mui-file-upload/index.js";
4
4
  import "./components/mui-addon/index.js";
@@ -31,6 +31,7 @@ import "./components/mui-icons/globe/index.js";
31
31
  import "./components/mui-icons/grid/index.js";
32
32
  import "./components/mui-icons/info/index.js";
33
33
  import "./components/mui-icons/left-arrow/index.js";
34
+ import "./components/mui-icons/left-sidebar/index.js";
34
35
  import "./components/mui-icons/left-chevron/index.js";
35
36
  import "./components/mui-icons/menu/index.js";
36
37
  import "./components/mui-icons/message/index.js";
@@ -67,7 +68,7 @@ import "./components/mui-tabs/tab-bar/index.js";
67
68
  import "./components/mui-carousel/controller/index.js";
68
69
  import "./components/mui-carousel/panel/index.js";
69
70
  export {
70
- Tr as PartTypes,
71
- br as Parts,
72
- cr as getPartMap
71
+ br as PartTypes,
72
+ cr as Parts,
73
+ dr as getPartMap
73
74
  };
@@ -8,6 +8,7 @@ import "./globe";
8
8
  import "./grid";
9
9
  import "./info";
10
10
  import "./left-arrow";
11
+ import "./left-sidebar";
11
12
  import "./left-chevron";
12
13
  import "./menu";
13
14
  import "./message";
@@ -0,0 +1 @@
1
+ export {};
@@ -31,6 +31,7 @@ export * from "./components/mui-icons/globe";
31
31
  export * from "./components/mui-icons/grid";
32
32
  export * from "./components/mui-icons/info";
33
33
  export * from "./components/mui-icons/left-arrow";
34
+ export * from "./components/mui-icons/left-sidebar";
34
35
  export * from "./components/mui-icons/left-chevron";
35
36
  export * from "./components/mui-icons/menu";
36
37
  export * from "./components/mui-icons/message";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@muibook/components",
3
- "version": "1.1.4",
3
+ "version": "1.2.1",
4
4
  "description": "A library of MUI-based design system components.",
5
5
  "author": "Michael Trilford",
6
6
  "homepage": "https://muibook.com",
@@ -159,6 +159,10 @@
159
159
  "import": "./dist/esm/components/mui-icons/left-arrow/index.js",
160
160
  "types": "./dist/types/components/mui-icons/left-arrow/index.d.ts"
161
161
  },
162
+ "./mui-icons/left-sidebar": {
163
+ "import": "./dist/esm/components/mui-icons/left-sidebar/index.js",
164
+ "types": "./dist/types/components/mui-icons/left-sidebar/index.d.ts"
165
+ },
162
166
  "./mui-icons/left-chevron": {
163
167
  "import": "./dist/esm/components/mui-icons/left-chevron/index.js",
164
168
  "types": "./dist/types/components/mui-icons/left-chevron/index.d.ts"