@francofantomius/material-components 0.1.0 → 1.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 (166) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/README.md +550 -90
  3. package/custom-elements.json +21010 -2354
  4. package/dist/chunks/badge-G4EjcMoy.js +89 -0
  5. package/dist/chunks/badge-G4EjcMoy.js.map +1 -0
  6. package/dist/chunks/button-B4TSZ7Sl.js +250 -0
  7. package/dist/chunks/button-B4TSZ7Sl.js.map +1 -0
  8. package/dist/chunks/card-DVffdPpv.js +163 -0
  9. package/dist/chunks/card-DVffdPpv.js.map +1 -0
  10. package/dist/chunks/checkbox-BqlboAHd.js +194 -0
  11. package/dist/chunks/checkbox-BqlboAHd.js.map +1 -0
  12. package/dist/chunks/chip-CI1ZINnr.js +169 -0
  13. package/dist/chunks/chip-CI1ZINnr.js.map +1 -0
  14. package/dist/chunks/code-C5UFBkCh.js +1830 -0
  15. package/dist/chunks/code-C5UFBkCh.js.map +1 -0
  16. package/dist/chunks/decorate-DXuynaiA.js +39 -0
  17. package/dist/chunks/decorate-DXuynaiA.js.map +1 -0
  18. package/dist/chunks/dialog-DGVEE5m_.js +158 -0
  19. package/dist/chunks/dialog-DGVEE5m_.js.map +1 -0
  20. package/dist/chunks/divider-DNepwoZv.js +82 -0
  21. package/dist/chunks/divider-DNepwoZv.js.map +1 -0
  22. package/dist/chunks/fab-C9j3WBHE.js +150 -0
  23. package/dist/chunks/fab-C9j3WBHE.js.map +1 -0
  24. package/dist/chunks/focus-ring-CuiJuM-y.js +71 -0
  25. package/dist/chunks/focus-ring-CuiJuM-y.js.map +1 -0
  26. package/dist/chunks/{form-associated-fKbeX_2P.js → form-associated-Cty_ZaS9.js} +26 -27
  27. package/dist/chunks/form-associated-Cty_ZaS9.js.map +1 -0
  28. package/dist/chunks/icon-DrNqcNEL.js +62 -0
  29. package/dist/chunks/icon-DrNqcNEL.js.map +1 -0
  30. package/dist/chunks/icon-button-BdSc7eot.js +188 -0
  31. package/dist/chunks/icon-button-BdSc7eot.js.map +1 -0
  32. package/dist/chunks/list-D8olR7oZ.js +204 -0
  33. package/dist/chunks/list-D8olR7oZ.js.map +1 -0
  34. package/dist/chunks/navigation-drawer-CKl44Ef5.js +531 -0
  35. package/dist/chunks/navigation-drawer-CKl44Ef5.js.map +1 -0
  36. package/dist/chunks/player-C4ydiIpr.js +1582 -0
  37. package/dist/chunks/player-C4ydiIpr.js.map +1 -0
  38. package/dist/chunks/progress-LQmLMDjX.js +266 -0
  39. package/dist/chunks/progress-LQmLMDjX.js.map +1 -0
  40. package/dist/chunks/radio-Bily78NT.js +205 -0
  41. package/dist/chunks/radio-Bily78NT.js.map +1 -0
  42. package/dist/chunks/ripple-squbKHhj.js +135 -0
  43. package/dist/chunks/ripple-squbKHhj.js.map +1 -0
  44. package/dist/chunks/search-bar-TXnqJ-gd.js +698 -0
  45. package/dist/chunks/search-bar-TXnqJ-gd.js.map +1 -0
  46. package/dist/chunks/snackbar-Wsz3BzEY.js +161 -0
  47. package/dist/chunks/snackbar-Wsz3BzEY.js.map +1 -0
  48. package/dist/chunks/switch-DdukrvXb.js +190 -0
  49. package/dist/chunks/switch-DdukrvXb.js.map +1 -0
  50. package/dist/chunks/table-aRTYzDyE.js +773 -0
  51. package/dist/chunks/table-aRTYzDyE.js.map +1 -0
  52. package/dist/chunks/tabs-BfOtoeir.js +191 -0
  53. package/dist/chunks/tabs-BfOtoeir.js.map +1 -0
  54. package/dist/chunks/text-field-hN6-2HQy.js +338 -0
  55. package/dist/chunks/text-field-hN6-2HQy.js.map +1 -0
  56. package/dist/chunks/top-app-bar-Dgbp6CFv.js +228 -0
  57. package/dist/chunks/top-app-bar-Dgbp6CFv.js.map +1 -0
  58. package/dist/components/account-menu/account-menu.css.d.ts +3 -0
  59. package/dist/components/account-menu/account-menu.css.d.ts.map +1 -0
  60. package/dist/components/account-menu/account-menu.d.ts +111 -0
  61. package/dist/components/account-menu/account-menu.d.ts.map +1 -0
  62. package/dist/components/app-drawer/app-drawer.css.d.ts +3 -0
  63. package/dist/components/app-drawer/app-drawer.css.d.ts.map +1 -0
  64. package/dist/components/app-drawer/app-drawer.d.ts +173 -0
  65. package/dist/components/app-drawer/app-drawer.d.ts.map +1 -0
  66. package/dist/components/badge/badge.js +2 -91
  67. package/dist/components/button/button.js +2 -261
  68. package/dist/components/card/card.js +2 -167
  69. package/dist/components/checkbox/checkbox.css.d.ts.map +1 -1
  70. package/dist/components/checkbox/checkbox.js +2 -186
  71. package/dist/components/chip/chip.js +3 -172
  72. package/dist/components/code/code.css.d.ts +2 -0
  73. package/dist/components/code/code.css.d.ts.map +1 -0
  74. package/dist/components/code/code.d.ts +106 -0
  75. package/dist/components/code/code.d.ts.map +1 -0
  76. package/dist/components/code/code.js +5 -0
  77. package/dist/components/code/highlighter.d.ts +8 -0
  78. package/dist/components/code/highlighter.d.ts.map +1 -0
  79. package/dist/components/code/linter.d.ts +44 -0
  80. package/dist/components/code/linter.d.ts.map +1 -0
  81. package/dist/components/dialog/dialog.js +2 -165
  82. package/dist/components/divider/divider.js +2 -79
  83. package/dist/components/fab/fab.js +2 -153
  84. package/dist/components/icon/icon.js +2 -68
  85. package/dist/components/icon-button/icon-button.css.d.ts.map +1 -1
  86. package/dist/components/icon-button/icon-button.js +1 -189
  87. package/dist/components/list/list.css.d.ts.map +1 -1
  88. package/dist/components/list/list.d.ts.map +1 -1
  89. package/dist/components/list/list.js +3 -188
  90. package/dist/components/navigation-drawer/navigation-drawer.css.d.ts +3 -0
  91. package/dist/components/navigation-drawer/navigation-drawer.css.d.ts.map +1 -0
  92. package/dist/components/navigation-drawer/navigation-drawer.d.ts +76 -0
  93. package/dist/components/navigation-drawer/navigation-drawer.d.ts.map +1 -0
  94. package/dist/components/navigation-drawer/navigation-drawer.js +8 -0
  95. package/dist/components/player/player.css.d.ts +2 -0
  96. package/dist/components/player/player.css.d.ts.map +1 -0
  97. package/dist/components/player/player.d.ts +99 -0
  98. package/dist/components/player/player.d.ts.map +1 -0
  99. package/dist/components/player/player.js +7 -0
  100. package/dist/components/progress/progress.css.d.ts.map +1 -1
  101. package/dist/components/progress/progress.d.ts +2 -0
  102. package/dist/components/progress/progress.d.ts.map +1 -1
  103. package/dist/components/progress/progress.js +3 -181
  104. package/dist/components/radio/radio.css.d.ts.map +1 -1
  105. package/dist/components/radio/radio.js +3 -203
  106. package/dist/components/search-bar/search-bar.css.d.ts +2 -0
  107. package/dist/components/search-bar/search-bar.css.d.ts.map +1 -0
  108. package/dist/components/search-bar/search-bar.d.ts +81 -0
  109. package/dist/components/search-bar/search-bar.d.ts.map +1 -0
  110. package/dist/components/search-bar/search-bar.js +5 -0
  111. package/dist/components/snackbar/snackbar.js +2 -162
  112. package/dist/components/switch/switch.css.d.ts.map +1 -1
  113. package/dist/components/switch/switch.js +2 -169
  114. package/dist/components/table/table.css.d.ts +8 -0
  115. package/dist/components/table/table.css.d.ts.map +1 -0
  116. package/dist/components/table/table.d.ts +158 -0
  117. package/dist/components/table/table.d.ts.map +1 -0
  118. package/dist/components/table/table.js +13 -0
  119. package/dist/components/tabs/tabs.js +3 -198
  120. package/dist/components/text-field/text-field.css.d.ts.map +1 -1
  121. package/dist/components/text-field/text-field.d.ts +1 -1
  122. package/dist/components/text-field/text-field.d.ts.map +1 -1
  123. package/dist/components/text-field/text-field.js +2 -325
  124. package/dist/components/top-app-bar/top-app-bar.css.d.ts +2 -0
  125. package/dist/components/top-app-bar/top-app-bar.css.d.ts.map +1 -0
  126. package/dist/components/top-app-bar/top-app-bar.d.ts +29 -0
  127. package/dist/components/top-app-bar/top-app-bar.d.ts.map +1 -0
  128. package/dist/components/top-app-bar/top-app-bar.js +5 -0
  129. package/dist/index.d.ts +8 -0
  130. package/dist/index.d.ts.map +1 -1
  131. package/dist/index.js +2264 -58
  132. package/dist/index.js.map +1 -1
  133. package/dist/internal/focus-ring/focus-ring.d.ts.map +1 -1
  134. package/dist/internal/focus-ring/focus-ring.js +4 -0
  135. package/dist/internal/ripple/ripple.css.d.ts.map +1 -1
  136. package/dist/internal/ripple/ripple.d.ts +0 -3
  137. package/dist/internal/ripple/ripple.d.ts.map +1 -1
  138. package/dist/internal/ripple/ripple.js +2 -142
  139. package/dist/tokens/index.js +336 -11
  140. package/dist/tokens/index.js.map +1 -1
  141. package/package.json +118 -12
  142. package/dist/chunks/base-component-DQTjlEVL.js +0 -34
  143. package/dist/chunks/base-component-DQTjlEVL.js.map +0 -1
  144. package/dist/chunks/focus-ring-Dl-XoEKK.js +0 -71
  145. package/dist/chunks/focus-ring-Dl-XoEKK.js.map +0 -1
  146. package/dist/chunks/form-associated-fKbeX_2P.js.map +0 -1
  147. package/dist/chunks/theme.css-DV3DRha-.js +0 -263
  148. package/dist/chunks/theme.css-DV3DRha-.js.map +0 -1
  149. package/dist/components/badge/badge.js.map +0 -1
  150. package/dist/components/button/button.js.map +0 -1
  151. package/dist/components/card/card.js.map +0 -1
  152. package/dist/components/checkbox/checkbox.js.map +0 -1
  153. package/dist/components/chip/chip.js.map +0 -1
  154. package/dist/components/dialog/dialog.js.map +0 -1
  155. package/dist/components/divider/divider.js.map +0 -1
  156. package/dist/components/fab/fab.js.map +0 -1
  157. package/dist/components/icon/icon.js.map +0 -1
  158. package/dist/components/icon-button/icon-button.js.map +0 -1
  159. package/dist/components/list/list.js.map +0 -1
  160. package/dist/components/progress/progress.js.map +0 -1
  161. package/dist/components/radio/radio.js.map +0 -1
  162. package/dist/components/snackbar/snackbar.js.map +0 -1
  163. package/dist/components/switch/switch.js.map +0 -1
  164. package/dist/components/tabs/tabs.js.map +0 -1
  165. package/dist/components/text-field/text-field.js.map +0 -1
  166. package/dist/internal/ripple/ripple.js.map +0 -1
@@ -1,188 +1,4 @@
1
- import { css as h, html as p } from "lit";
2
- import { property as n, query as m, customElement as u } from "lit/decorators.js";
3
- import { M as c } from "../../chunks/form-associated-fKbeX_2P.js";
4
- import "../../internal/ripple/ripple.js";
5
- import "../../chunks/focus-ring-Dl-XoEKK.js";
6
- const b = h`
7
- :host {
8
- display: inline-flex;
9
- align-items: center;
10
- vertical-align: middle;
11
- cursor: pointer;
12
- outline: none;
13
- -webkit-tap-highlight-color: transparent;
14
- user-select: none;
15
- gap: 8px;
16
- font-family: var(--md-sys-typescale-font-family, inherit);
17
- font-size: var(--md-sys-typescale-body-large-size, 16px);
18
- color: var(--md-sys-color-on-surface, #1D1B20);
19
- }
20
-
21
- :host([disabled]) {
22
- cursor: not-allowed;
23
- color: rgba(29, 27, 32, 0.38);
24
- pointer-events: none;
25
- }
26
-
27
- .container {
28
- position: relative;
29
- display: inline-flex;
30
- align-items: center;
31
- justify-content: center;
32
- width: 40px;
33
- height: 40px;
34
- border-radius: 50%;
35
- }
36
-
37
- .box {
38
- position: relative;
39
- display: inline-flex;
40
- align-items: center;
41
- justify-content: center;
42
- width: 18px;
43
- height: 18px;
44
- box-sizing: border-box;
45
- border: 2px solid var(--md-sys-color-on-surface-variant, #49454F);
46
- border-radius: var(--md-sys-shape-corner-extra-small, 2px);
47
- background-color: transparent;
48
- transition: background-color 150ms cubic-bezier(0.2, 0, 0, 1),
49
- border-color 150ms cubic-bezier(0.2, 0, 0, 1);
50
- }
51
-
52
- :host([checked]) .box,
53
- :host([indeterminate]) .box {
54
- background-color: var(--md-sys-color-primary, #6750A4);
55
- border-color: var(--md-sys-color-primary, #6750A4);
56
- }
57
-
58
- :host([error]) .box {
59
- border-color: var(--md-sys-color-error, #B3261E);
60
- }
61
-
62
- :host([error][checked]) .box,
63
- :host([error][indeterminate]) .box {
64
- background-color: var(--md-sys-color-error, #B3261E);
65
- border-color: var(--md-sys-color-error, #B3261E);
66
- }
67
-
68
- :host([disabled]) .box {
69
- border-color: rgba(29, 27, 32, 0.38);
70
- }
71
-
72
- :host([disabled][checked]) .box,
73
- :host([disabled][indeterminate]) .box {
74
- background-color: rgba(29, 27, 32, 0.38);
75
- border-color: transparent;
76
- }
77
-
78
- .mark {
79
- position: absolute;
80
- width: 14px;
81
- height: 14px;
82
- fill: none;
83
- stroke: var(--md-sys-color-on-primary, #FFFFFF);
84
- stroke-width: 2.5;
85
- stroke-linecap: round;
86
- stroke-linejoin: round;
87
- opacity: 0;
88
- transition: opacity 150ms ease;
89
- }
90
-
91
- :host([checked]) .mark.check {
92
- opacity: 1;
93
- }
94
-
95
- :host([indeterminate]) .mark.dash {
96
- opacity: 1;
97
- }
98
-
99
- input {
100
- position: absolute;
101
- opacity: 0;
102
- width: 0;
103
- height: 0;
104
- pointer-events: none;
105
- }
106
- `;
107
- var y = Object.defineProperty, k = Object.getOwnPropertyDescriptor, i = (e, o, a, s) => {
108
- for (var r = s > 1 ? void 0 : s ? k(o, a) : o, l = e.length - 1, d; l >= 0; l--)
109
- (d = e[l]) && (r = (s ? d(o, a, r) : d(r)) || r);
110
- return s && r && y(o, a, r), r;
111
- };
112
- let t = class extends c {
113
- constructor() {
114
- super(...arguments), this.checked = !1, this.indeterminate = !1, this.error = !1, this.value = "on", this.handleClick = (e) => {
115
- this.disabled || (e.preventDefault(), this.toggle());
116
- }, this.handleKeyDown = (e) => {
117
- this.disabled || (e.key === " " || e.key === "Enter") && (e.preventDefault(), this.toggle());
118
- };
119
- }
120
- connectedCallback() {
121
- super.connectedCallback(), this.tabIndex = this.disabled ? -1 : 0, this.addEventListener("click", this.handleClick), this.addEventListener("keydown", this.handleKeyDown), this.updateFormValue();
122
- }
123
- disconnectedCallback() {
124
- super.disconnectedCallback(), this.removeEventListener("click", this.handleClick), this.removeEventListener("keydown", this.handleKeyDown);
125
- }
126
- updated(e) {
127
- super.updated(e), (e.has("checked") || e.has("indeterminate") || e.has("value")) && this.updateFormValue();
128
- }
129
- formResetCallback() {
130
- this.checked = !1, this.indeterminate = !1, this.updateFormValue();
131
- }
132
- updateFormValue() {
133
- this.setFormValue(this.checked ? this.value : null), this.required && !this.checked ? this.setValidity({ valueMissing: !0 }, "Please check this box if you want to proceed") : this.setValidity({});
134
- }
135
- toggle() {
136
- this.indeterminate ? (this.indeterminate = !1, this.checked = !0) : this.checked = !this.checked, this.updateFormValue(), this.emitEvent("change", { checked: this.checked, indeterminate: this.indeterminate }), this.emitEvent("input", { checked: this.checked, indeterminate: this.indeterminate });
137
- }
138
- render() {
139
- return p`
140
- <div class="container">
141
- <md-ripple ?disabled=${this.disabled} unbounded></md-ripple>
142
- <md-focus-ring></md-focus-ring>
143
- <div class="box">
144
- <!-- Checkmark SVG -->
145
- <svg class="mark check" viewBox="0 0 18 18">
146
- <polyline points="3.5,9.5 7,13 14.5,5.5"></polyline>
147
- </svg>
148
- <!-- Indeterminate Dash SVG -->
149
- <svg class="mark dash" viewBox="0 0 18 18">
150
- <line x1="3.5" y1="9" x2="14.5" y2="9"></line>
151
- </svg>
152
- </div>
153
- <input
154
- type="checkbox"
155
- .checked=${this.checked}
156
- .indeterminate=${this.indeterminate}
157
- ?disabled=${this.disabled}
158
- tabindex="-1"
159
- aria-hidden="true"
160
- />
161
- </div>
162
- <slot></slot>
163
- `;
164
- }
165
- };
166
- t.styles = [c.styles, b];
167
- i([
168
- n({ type: Boolean, reflect: !0 })
169
- ], t.prototype, "checked", 2);
170
- i([
171
- n({ type: Boolean, reflect: !0 })
172
- ], t.prototype, "indeterminate", 2);
173
- i([
174
- n({ type: Boolean, reflect: !0 })
175
- ], t.prototype, "error", 2);
176
- i([
177
- n({ type: String })
178
- ], t.prototype, "value", 2);
179
- i([
180
- m("input")
181
- ], t.prototype, "inputElement", 2);
182
- t = i([
183
- u("md-checkbox")
184
- ], t);
1
+ import { t as r } from "../../chunks/checkbox-BqlboAHd.js";
185
2
  export {
186
- t as MdCheckbox
3
+ r as MdCheckbox
187
4
  };
188
- //# sourceMappingURL=checkbox.js.map
@@ -1,174 +1,5 @@
1
- import { css as b, nothing as m, html as i } from "lit";
2
- import { property as o, customElement as v } from "lit/decorators.js";
3
- import { M as a } from "../../chunks/base-component-DQTjlEVL.js";
4
- import "../../internal/ripple/ripple.js";
5
- import "../../chunks/focus-ring-Dl-XoEKK.js";
6
- import "../icon/icon.js";
7
- const y = b`
8
- :host {
9
- display: inline-flex;
10
- outline: none;
11
- vertical-align: middle;
12
- -webkit-tap-highlight-color: transparent;
13
- }
14
-
15
- :host([disabled]) {
16
- pointer-events: none;
17
- opacity: 0.38;
18
- }
19
-
20
- .chip {
21
- position: relative;
22
- display: inline-flex;
23
- align-items: center;
24
- box-sizing: border-box;
25
- height: 32px;
26
- padding: 0 12px;
27
- border-radius: var(--md-sys-shape-corner-small, 8px);
28
- border: 1px solid var(--md-sys-color-outline, #79747E);
29
- background-color: transparent;
30
- color: var(--md-sys-color-on-surface, #1D1B20);
31
- font-family: var(--md-sys-typescale-font-family, inherit);
32
- font-size: var(--md-sys-typescale-label-large-size, 14px);
33
- font-weight: 500;
34
- line-height: 20px;
35
- letter-spacing: 0.1px;
36
- cursor: pointer;
37
- user-select: none;
38
- outline: none;
39
- gap: 8px;
40
- transition: background-color 150ms cubic-bezier(0.2, 0, 0, 1),
41
- border-color 150ms cubic-bezier(0.2, 0, 0, 1),
42
- box-shadow 150ms cubic-bezier(0.2, 0, 0, 1);
43
- overflow: hidden;
44
- }
45
-
46
- :host([selected]) .chip {
47
- background-color: var(--md-sys-color-secondary-container, #E8DEF8);
48
- color: var(--md-sys-color-on-secondary-container, #1D192B);
49
- border-color: transparent;
50
- }
51
-
52
- :host([variant="elevated"]) .chip {
53
- background-color: var(--md-sys-color-surface-container-low, #F7F2FA);
54
- border: none;
55
- box-shadow: var(--md-sys-elevation-level1, 0px 1px 3px 1px rgba(0,0,0,0.15));
56
- }
57
-
58
- .icon {
59
- display: inline-flex;
60
- align-items: center;
61
- color: var(--md-sys-color-primary, #6750A4);
62
- }
63
-
64
- .remove-btn {
65
- display: inline-flex;
66
- align-items: center;
67
- justify-content: center;
68
- width: 18px;
69
- height: 18px;
70
- padding: 0;
71
- border: none;
72
- border-radius: 50%;
73
- background: transparent;
74
- color: var(--md-sys-color-on-surface-variant, #49454F);
75
- cursor: pointer;
76
- margin-left: 2px;
77
- }
78
-
79
- .remove-btn:hover {
80
- background-color: rgba(29, 27, 32, 0.12);
81
- }
82
- `, u = b`
83
- :host {
84
- display: flex;
85
- flex-wrap: wrap;
86
- align-items: center;
87
- gap: 8px;
88
- }
89
- `;
90
- var f = Object.defineProperty, g = Object.getOwnPropertyDescriptor, t = (s, n, c, l) => {
91
- for (var r = l > 1 ? void 0 : l ? g(n, c) : n, d = s.length - 1, p; d >= 0; d--)
92
- (p = s[d]) && (r = (l ? p(n, c, r) : p(r)) || r);
93
- return l && r && f(n, c, r), r;
94
- };
95
- let e = class extends a {
96
- constructor() {
97
- super(...arguments), this.variant = "assist", this.label = "", this.icon = "", this.selected = !1, this.removable = !1, this.disabled = !1, this.handleClick = (s) => {
98
- this.disabled || this.variant === "filter" && (this.selected = !this.selected, this.emitEvent("change", { selected: this.selected }));
99
- }, this.handleRemove = (s) => {
100
- s.stopPropagation(), this.emitEvent("remove");
101
- };
102
- }
103
- connectedCallback() {
104
- super.connectedCallback(), this.addEventListener("click", this.handleClick);
105
- }
106
- disconnectedCallback() {
107
- super.disconnectedCallback(), this.removeEventListener("click", this.handleClick);
108
- }
109
- render() {
110
- return i`
111
- <div class="chip" tabindex=${this.disabled ? "-1" : "0"}>
112
- <md-ripple ?disabled=${this.disabled}></md-ripple>
113
- <md-focus-ring></md-focus-ring>
114
-
115
- <span class="icon">
116
- ${this.variant === "filter" && this.selected ? i`<md-icon name="check" size="18"></md-icon>` : i`
117
- <slot name="icon">
118
- ${this.icon ? i`<md-icon name=${this.icon} size="18"></md-icon>` : m}
119
- </slot>
120
- `}
121
- </span>
122
-
123
- <slot>${this.label}</slot>
124
-
125
- ${this.removable || this.variant === "input" ? i`
126
- <button
127
- class="remove-btn"
128
- aria-label="Remove"
129
- @click=${this.handleRemove}
130
- tabindex="-1"
131
- >
132
- <md-icon name="close" size="16"></md-icon>
133
- </button>
134
- ` : m}
135
- </div>
136
- `;
137
- }
138
- };
139
- e.styles = [a.styles, y];
140
- t([
141
- o({ type: String, reflect: !0 })
142
- ], e.prototype, "variant", 2);
143
- t([
144
- o({ type: String })
145
- ], e.prototype, "label", 2);
146
- t([
147
- o({ type: String })
148
- ], e.prototype, "icon", 2);
149
- t([
150
- o({ type: Boolean, reflect: !0 })
151
- ], e.prototype, "selected", 2);
152
- t([
153
- o({ type: Boolean, reflect: !0 })
154
- ], e.prototype, "removable", 2);
155
- t([
156
- o({ type: Boolean, reflect: !0 })
157
- ], e.prototype, "disabled", 2);
158
- e = t([
159
- v("md-chip")
160
- ], e);
161
- let h = class extends a {
162
- render() {
163
- return i`<slot></slot>`;
164
- }
165
- };
166
- h.styles = [a.styles, u];
167
- h = t([
168
- v("md-chip-set")
169
- ], h);
1
+ import { n as t, t as i } from "../../chunks/chip-CI1ZINnr.js";
170
2
  export {
171
- e as MdChip,
172
- h as MdChipSet
3
+ i as MdChip,
4
+ t as MdChipSet
173
5
  };
174
- //# sourceMappingURL=chip.js.map
@@ -0,0 +1,2 @@
1
+ export declare const codeStyles: import('lit').CSSResult;
2
+ //# sourceMappingURL=code.css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code.css.d.ts","sourceRoot":"","sources":["../../../src/components/code/code.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,yBAyatB,CAAC"}
@@ -0,0 +1,106 @@
1
+ import { PropertyValues } from 'lit';
2
+ import { MdBaseElement } from '../../internal/base-component.js';
3
+ import { LintDiagnostic } from './linter.js';
4
+ export type { LintDiagnostic };
5
+ export declare class MdCode extends MdBaseElement {
6
+ static styles: import('lit').CSSResultGroup[];
7
+ /**
8
+ * Raw source code string. If not provided, falls back to slot/textContent.
9
+ */
10
+ code: string;
11
+ /**
12
+ * Language identifier (e.g. 'javascript', 'typescript', 'html', 'css', 'json', 'python', 'bash', 'sql').
13
+ */
14
+ language: string;
15
+ /**
16
+ * Alias for language.
17
+ */
18
+ lang: string;
19
+ /**
20
+ * Optional filename or label to display in the header bar.
21
+ */
22
+ label: string;
23
+ /**
24
+ * Alias for label (filename).
25
+ */
26
+ filename: string;
27
+ /**
28
+ * When true, automatically lints the code for syntax issues and displays diagnostics.
29
+ */
30
+ lint: boolean;
31
+ /**
32
+ * Custom / external diagnostic issues to display.
33
+ */
34
+ diagnostics: LintDiagnostic[];
35
+ /**
36
+ * Whether to show the lint issues summary bar at the bottom.
37
+ */
38
+ showLintSummary: boolean;
39
+ /**
40
+ * Whether to render line numbers in a gutter.
41
+ */
42
+ lineNumbers: boolean;
43
+ /**
44
+ * Line numbers to highlight, e.g. "1, 3-5, 8".
45
+ */
46
+ highlightLines: string;
47
+ /**
48
+ * Whether the code is copyable via the copy button.
49
+ */
50
+ copyable: boolean;
51
+ /**
52
+ * When true, hides the copy button.
53
+ */
54
+ hideCopyButton: boolean;
55
+ /**
56
+ * When true, wraps long lines instead of scrolling horizontally.
57
+ */
58
+ wrapLines: boolean;
59
+ /**
60
+ * Maximum height for the code scroll container (e.g. "300px").
61
+ */
62
+ maxHeight: string;
63
+ private isCopied;
64
+ private isIssuesExpanded;
65
+ private internalCode;
66
+ private activeDiagnostics;
67
+ private copyTimeout;
68
+ connectedCallback(): void;
69
+ disconnectedCallback(): void;
70
+ willUpdate(changedProperties: PropertyValues): void;
71
+ private extractCodeContent;
72
+ /**
73
+ * Strips common leading indentation from multi-line template strings.
74
+ */
75
+ private normalizeIndentation;
76
+ /**
77
+ * Performs linting and combines internal and external diagnostics.
78
+ */
79
+ runLint(): LintDiagnostic[];
80
+ /**
81
+ * Active effective language.
82
+ */
83
+ get effectiveLanguage(): string;
84
+ /**
85
+ * Effective filename / label.
86
+ */
87
+ get effectiveLabel(): string;
88
+ /**
89
+ * Copies the current unhighlighted code to clipboard.
90
+ */
91
+ copy(): Promise<boolean>;
92
+ private parseHighlightedLines;
93
+ private handleSlotChange;
94
+ private toggleIssuesList;
95
+ private scrollToLine;
96
+ render(): import('lit-html').TemplateResult<1>;
97
+ }
98
+ export declare class MdCodeBlock extends MdCode {
99
+ }
100
+ declare global {
101
+ interface HTMLElementTagNameMap {
102
+ 'md-code': MdCode;
103
+ 'md-code-block': MdCodeBlock;
104
+ }
105
+ }
106
+ //# sourceMappingURL=code.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../../src/components/code/code.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAE,MAAM,KAAK,CAAC;AAGpD,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAGjE,OAAO,EAAY,cAAc,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,iBAAiB,CAAC;AAEzB,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,qBACa,MAAO,SAAQ,aAAa;IACvC,OAAgB,MAAM,iCAAsC;IAE5D;;OAEG;IAEH,IAAI,SAAM;IAEV;;OAEG;IAEH,QAAQ,SAAe;IAEvB;;OAEG;IAEM,IAAI,SAAM;IAEnB;;OAEG;IAEH,KAAK,SAAM;IAEX;;OAEG;IAEH,QAAQ,SAAM;IAEd;;OAEG;IAEH,IAAI,UAAS;IAEb;;OAEG;IAEH,WAAW,EAAE,cAAc,EAAE,CAAM;IAEnC;;OAEG;IASH,eAAe,UAAQ;IAEvB;;OAEG;IAEH,WAAW,UAAS;IAEpB;;OAEG;IAEH,cAAc,SAAM;IAEpB;;OAEG;IASH,QAAQ,UAAQ;IAEhB;;OAEG;IAEH,cAAc,UAAS;IAEvB;;OAEG;IAEH,SAAS,UAAS;IAElB;;OAEG;IAEH,SAAS,SAAM;IAGf,OAAO,CAAC,QAAQ,CAAS;IAGzB,OAAO,CAAC,gBAAgB,CAAS;IAGjC,OAAO,CAAC,YAAY,CAAM;IAG1B,OAAO,CAAC,iBAAiB,CAAwB;IAEjD,OAAO,CAAC,WAAW,CAA8C;IAExD,iBAAiB;IAKjB,oBAAoB;IAQpB,UAAU,CAAC,iBAAiB,EAAE,cAAc;IASrD,OAAO,CAAC,kBAAkB;IAO1B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAe5B;;OAEG;IACI,OAAO,IAAI,cAAc,EAAE;IAsBlC;;OAEG;IACH,IAAI,iBAAiB,IAAI,MAAM,CAE9B;IAED;;OAEG;IACH,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED;;OAEG;IACU,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;IAiCrC,OAAO,CAAC,qBAAqB;IAsB7B,OAAO,CAAC,gBAAgB,CAKtB;IAEF,OAAO,CAAC,gBAAgB,CAEtB;IAEF,OAAO,CAAC,YAAY;IAOX,MAAM;CA8KhB;AAGD,qBACa,WAAY,SAAQ,MAAM;CAAG;AAE1C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,MAAM,CAAC;QAClB,eAAe,EAAE,WAAW,CAAC;KAC9B;CACF"}
@@ -0,0 +1,5 @@
1
+ import { n as d, t as e } from "../../chunks/code-C5UFBkCh.js";
2
+ export {
3
+ e as MdCode,
4
+ d as MdCodeBlock
5
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Lightweight, robust syntax highlighter for common programming and markup languages.
3
+ */
4
+ /**
5
+ * Main syntax highlight dispatcher.
6
+ */
7
+ export declare function highlightCode(code: string, language: string): string;
8
+ //# sourceMappingURL=highlighter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"highlighter.d.ts","sourceRoot":"","sources":["../../../src/components/code/highlighter.ts"],"names":[],"mappings":"AAAA;;GAEG;AA+pBH;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAoCpE"}
@@ -0,0 +1,44 @@
1
+ export interface LintDiagnostic {
2
+ line: number;
3
+ column?: number;
4
+ message: string;
5
+ severity?: 'error' | 'warning' | 'info';
6
+ rule?: string;
7
+ }
8
+ /**
9
+ * Lints JSON code and returns diagnostics for syntax errors, trailing commas, unquoted keys, etc.
10
+ */
11
+ export declare function lintJson(code: string): LintDiagnostic[];
12
+ /**
13
+ * Lints JavaScript and TypeScript code for common syntax issues.
14
+ */
15
+ export declare function lintJavaScript(code: string): LintDiagnostic[];
16
+ /**
17
+ * Lints HTML/XML code for unclosed or mismatched tags and attribute errors.
18
+ */
19
+ export declare function lintHtml(code: string): LintDiagnostic[];
20
+ /**
21
+ * Lints CSS code for unclosed braces, missing colons, and malformed declarations.
22
+ */
23
+ export declare function lintCss(code: string): LintDiagnostic[];
24
+ /**
25
+ * Lints Python code for indentation consistency, missing colons, and bracket balance.
26
+ */
27
+ export declare function lintPython(code: string): LintDiagnostic[];
28
+ /**
29
+ * Lints Bash/Shell code for unclosed quotes, missing control block terminators (fi, done, esac).
30
+ */
31
+ export declare function lintBash(code: string): LintDiagnostic[];
32
+ /**
33
+ * Lints YAML code for tab indentation and syntax anomalies.
34
+ */
35
+ export declare function lintYaml(code: string): LintDiagnostic[];
36
+ /**
37
+ * Lints Markdown code for broken links and unclosed code blocks.
38
+ */
39
+ export declare function lintMarkdown(code: string): LintDiagnostic[];
40
+ /**
41
+ * Master lint function for any supported language.
42
+ */
43
+ export declare function lintCode(code: string, language: string): LintDiagnostic[];
44
+ //# sourceMappingURL=linter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linter.d.ts","sourceRoot":"","sources":["../../../src/components/code/linter.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,EAAE,CAsGvD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,EAAE,CAgK7D;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,EAAE,CAyEvD;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,EAAE,CA4EtD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,EAAE,CAqGzD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,EAAE,CAqEvD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,EAAE,CAiCvD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,EAAE,CAgC3D;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,cAAc,EAAE,CAwCzE"}