@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,205 +1,5 @@
1
- import { css as h, html as u } from "lit";
2
- import { property as l, customElement as p, queryAssignedElements as y } from "lit/decorators.js";
3
- import { M as m } from "../../chunks/base-component-DQTjlEVL.js";
4
- import { M as f } from "../../chunks/form-associated-fKbeX_2P.js";
5
- import "../../internal/ripple/ripple.js";
6
- import "../../chunks/focus-ring-Dl-XoEKK.js";
7
- const v = h`
8
- :host {
9
- display: inline-flex;
10
- align-items: center;
11
- vertical-align: middle;
12
- cursor: pointer;
13
- outline: none;
14
- -webkit-tap-highlight-color: transparent;
15
- user-select: none;
16
- gap: 8px;
17
- font-family: var(--md-sys-typescale-font-family, inherit);
18
- font-size: var(--md-sys-typescale-body-large-size, 16px);
19
- color: var(--md-sys-color-on-surface, #1D1B20);
20
- }
21
-
22
- :host([disabled]) {
23
- cursor: not-allowed;
24
- color: rgba(29, 27, 32, 0.38);
25
- pointer-events: none;
26
- }
27
-
28
- .container {
29
- position: relative;
30
- display: inline-flex;
31
- align-items: center;
32
- justify-content: center;
33
- width: 40px;
34
- height: 40px;
35
- border-radius: 50%;
36
- }
37
-
38
- .outer-circle {
39
- position: relative;
40
- display: inline-flex;
41
- align-items: center;
42
- justify-content: center;
43
- width: 20px;
44
- height: 20px;
45
- box-sizing: border-box;
46
- border: 2px solid var(--md-sys-color-on-surface-variant, #49454F);
47
- border-radius: 50%;
48
- background-color: transparent;
49
- transition: border-color 150ms cubic-bezier(0.2, 0, 0, 1);
50
- }
51
-
52
- :host([checked]) .outer-circle {
53
- border-color: var(--md-sys-color-primary, #6750A4);
54
- }
55
-
56
- :host([disabled]) .outer-circle {
57
- border-color: rgba(29, 27, 32, 0.38);
58
- }
59
-
60
- .inner-circle {
61
- width: 10px;
62
- height: 10px;
63
- border-radius: 50%;
64
- background-color: var(--md-sys-color-primary, #6750A4);
65
- transform: scale(0);
66
- transition: transform 150ms cubic-bezier(0.2, 0, 0, 1);
67
- }
68
-
69
- :host([checked]) .inner-circle {
70
- transform: scale(1);
71
- }
72
-
73
- :host([disabled][checked]) .inner-circle {
74
- background-color: rgba(29, 27, 32, 0.38);
75
- }
76
- `, b = h`
77
- :host {
78
- display: flex;
79
- flex-direction: column;
80
- gap: 8px;
81
- }
82
-
83
- :host([row]) {
84
- flex-direction: row;
85
- align-items: center;
86
- gap: 16px;
87
- }
88
- `;
89
- var g = Object.defineProperty, k = Object.getOwnPropertyDescriptor, o = (e, t, i, r) => {
90
- for (var s = r > 1 ? void 0 : r ? k(t, i) : t, d = e.length - 1, c; d >= 0; d--)
91
- (c = e[d]) && (s = (r ? c(t, i, s) : c(s)) || s);
92
- return r && s && g(t, i, s), s;
93
- };
94
- let a = class extends f {
95
- constructor() {
96
- super(...arguments), this.checked = !1, this.value = "on", this.handleClick = (e) => {
97
- this.disabled || this.checked || (e.preventDefault(), this.select());
98
- }, this.handleKeyDown = (e) => {
99
- this.disabled || (e.key === " " || e.key === "Enter") && (e.preventDefault(), this.select());
100
- };
101
- }
102
- connectedCallback() {
103
- super.connectedCallback(), this.tabIndex = this.disabled ? -1 : this.checked ? 0 : -1, this.addEventListener("click", this.handleClick), this.addEventListener("keydown", this.handleKeyDown), this.updateFormValue();
104
- }
105
- disconnectedCallback() {
106
- super.disconnectedCallback(), this.removeEventListener("click", this.handleClick), this.removeEventListener("keydown", this.handleKeyDown);
107
- }
108
- updated(e) {
109
- super.updated(e), (e.has("checked") || e.has("value")) && (this.tabIndex = this.disabled ? -1 : this.checked ? 0 : -1, this.updateFormValue());
110
- }
111
- formResetCallback() {
112
- this.checked = !1, this.updateFormValue();
113
- }
114
- updateFormValue() {
115
- this.setFormValue(this.checked ? this.value : null), this.required && !this.checked ? this.setValidity({ valueMissing: !0 }, "Please select one of these options") : this.setValidity({});
116
- }
117
- select() {
118
- this.checked = !0, this.updateFormValue(), this.emitEvent("change", { checked: !0, value: this.value }), this.emitEvent("input", { checked: !0, value: this.value }), this.name && this.getRootNode().querySelectorAll(`md-radio[name="${this.name}"]`).forEach((i) => {
119
- i !== this && i.checked && (i.checked = !1, i.tabIndex = -1);
120
- });
121
- }
122
- render() {
123
- return u`
124
- <div class="container">
125
- <md-ripple ?disabled=${this.disabled} unbounded></md-ripple>
126
- <md-focus-ring></md-focus-ring>
127
- <div class="outer-circle">
128
- <div class="inner-circle"></div>
129
- </div>
130
- </div>
131
- <slot></slot>
132
- `;
133
- }
134
- };
135
- a.styles = [f.styles, v];
136
- o([
137
- l({ type: Boolean, reflect: !0 })
138
- ], a.prototype, "checked", 2);
139
- o([
140
- l({ type: String })
141
- ], a.prototype, "value", 2);
142
- a = o([
143
- p("md-radio")
144
- ], a);
145
- let n = class extends m {
146
- constructor() {
147
- super(...arguments), this.name = "", this.value = "", this.row = !1, this.handleSlotChange = () => {
148
- this.syncRadios();
149
- }, this.handleChange = (e) => {
150
- const t = e.target;
151
- t && t.checked && (this.value = t.value, this.emitEvent("group-change", { value: this.value }));
152
- }, this.handleKeyDown = (e) => {
153
- const t = this.radios.filter((s) => !s.disabled);
154
- if (t.length === 0) return;
155
- const i = t.findIndex((s) => s === document.activeElement || s.shadowRoot?.activeElement);
156
- let r = -1;
157
- if (e.key === "ArrowDown" || e.key === "ArrowRight" ? (e.preventDefault(), r = i < t.length - 1 ? i + 1 : 0) : (e.key === "ArrowUp" || e.key === "ArrowLeft") && (e.preventDefault(), r = i > 0 ? i - 1 : t.length - 1), r !== -1) {
158
- const s = t[r];
159
- s && (s.select(), s.focus());
160
- }
161
- };
162
- }
163
- connectedCallback() {
164
- super.connectedCallback(), this.addEventListener("change", this.handleChange), this.addEventListener("keydown", this.handleKeyDown);
165
- }
166
- disconnectedCallback() {
167
- super.disconnectedCallback(), this.removeEventListener("change", this.handleChange), this.removeEventListener("keydown", this.handleKeyDown);
168
- }
169
- updated(e) {
170
- super.updated(e), (e.has("name") || e.has("value")) && this.syncRadios();
171
- }
172
- syncRadios() {
173
- let e = !1;
174
- if (this.radios.forEach((t) => {
175
- this.name && !t.name && (t.name = this.name), this.value && t.value === this.value && (t.checked = !0, e = !0);
176
- }), !e && this.radios.length > 0) {
177
- const t = this.radios.find((i) => !i.disabled);
178
- t && (t.tabIndex = 0);
179
- }
180
- }
181
- render() {
182
- return u`<slot @slotchange=${this.handleSlotChange}></slot>`;
183
- }
184
- };
185
- n.styles = [m.styles, b];
186
- o([
187
- l({ type: String })
188
- ], n.prototype, "name", 2);
189
- o([
190
- l({ type: String })
191
- ], n.prototype, "value", 2);
192
- o([
193
- l({ type: Boolean, reflect: !0 })
194
- ], n.prototype, "row", 2);
195
- o([
196
- y({ selector: "md-radio" })
197
- ], n.prototype, "radios", 2);
198
- n = o([
199
- p("md-radio-group")
200
- ], n);
1
+ import { n as a, t as d } from "../../chunks/radio-Bily78NT.js";
201
2
  export {
202
- a as MdRadio,
203
- n as MdRadioGroup
3
+ d as MdRadio,
4
+ a as MdRadioGroup
204
5
  };
205
- //# sourceMappingURL=radio.js.map
@@ -0,0 +1,2 @@
1
+ export declare const searchBarStyles: import('lit').CSSResult;
2
+ //# sourceMappingURL=search-bar.css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-bar.css.d.ts","sourceRoot":"","sources":["../../../src/components/search-bar/search-bar.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,yBAwZ3B,CAAC"}
@@ -0,0 +1,81 @@
1
+ import { MdFormAssociatedElement } from '../../internal/form-associated.js';
2
+ export interface SearchSuggestion {
3
+ id?: string;
4
+ label: string;
5
+ value?: string;
6
+ supportingText?: string;
7
+ trailingSupportingText?: string;
8
+ icon?: string;
9
+ [key: string]: unknown;
10
+ }
11
+ export declare class MdSearchBar extends MdFormAssociatedElement {
12
+ static styles: import('lit').CSSResultGroup[];
13
+ value: string;
14
+ placeholder: string;
15
+ active: boolean;
16
+ suggestions: Array<string | SearchSuggestion>;
17
+ leadingIcon: string;
18
+ activeLeadingIcon: string;
19
+ trailingIcon: string;
20
+ showBackButton: boolean;
21
+ showClearButton: boolean;
22
+ responsive: boolean;
23
+ collapseOnMobile: boolean;
24
+ fullscreen: boolean;
25
+ autoDeactivateOnSelect: boolean;
26
+ private highlightedIndex;
27
+ private inputElement?;
28
+ connectedCallback(): void;
29
+ willUpdate(changedProperties: Map<string, unknown>): void;
30
+ formResetCallback(): void;
31
+ /**
32
+ * Focuses the search input field.
33
+ */
34
+ focus(): void;
35
+ /**
36
+ * Opens / activates the search view.
37
+ */
38
+ show(): void;
39
+ /**
40
+ * Alias for show()
41
+ */
42
+ open(): void;
43
+ /**
44
+ * Closes / deactivates the search view.
45
+ */
46
+ close(): void;
47
+ /**
48
+ * Alias for close()
49
+ */
50
+ collapse(): void;
51
+ /**
52
+ * Toggles the active state of the search bar.
53
+ */
54
+ toggle(): void;
55
+ /**
56
+ * Clears the current search input.
57
+ */
58
+ clear(): void;
59
+ private handleFocus;
60
+ private handleInput;
61
+ private handleChange;
62
+ private handleKeyDown;
63
+ private handleTriggerClick;
64
+ private handleTriggerKeyDown;
65
+ private handleTrailingTriggerClick;
66
+ private handleBackClick;
67
+ private handleScrimClick;
68
+ private handleClearClick;
69
+ private selectSuggestion;
70
+ private renderSuggestionItem;
71
+ render(): import('lit-html').TemplateResult<1>;
72
+ }
73
+ export declare class MdSearch extends MdSearchBar {
74
+ }
75
+ declare global {
76
+ interface HTMLElementTagNameMap {
77
+ 'md-search-bar': MdSearchBar;
78
+ 'md-search': MdSearch;
79
+ }
80
+ }
81
+ //# sourceMappingURL=search-bar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-bar.d.ts","sourceRoot":"","sources":["../../../src/components/search-bar/search-bar.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,iBAAiB,CAAC;AAGzB,MAAM,WAAW,gBAAgB;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,qBACa,WAAY,SAAQ,uBAAuB;IACtD,OAAgB,MAAM,iCAAqD;IAG3E,KAAK,SAAM;IAGX,WAAW,SAAY;IAGvB,MAAM,UAAS;IAGf,WAAW,EAAE,KAAK,CAAC,MAAM,GAAG,gBAAgB,CAAC,CAAM;IAGnD,WAAW,SAAY;IAGvB,iBAAiB,SAAgB;IAGjC,YAAY,SAAM;IAGlB,cAAc,UAAQ;IAGtB,eAAe,UAAQ;IAGvB,UAAU,UAAQ;IAGlB,gBAAgB,UAAQ;IAGxB,UAAU,UAAS;IAGnB,sBAAsB,UAAQ;IAG9B,OAAO,CAAC,gBAAgB,CAAM;IAG9B,OAAO,CAAC,YAAY,CAAC,CAAmB;IAE/B,iBAAiB;IAQjB,UAAU,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAiBlD,iBAAiB;IAO1B;;OAEG;IACM,KAAK;IAId;;OAEG;IACH,IAAI;IAUJ;;OAEG;IACH,IAAI;IAIJ;;OAEG;IACH,KAAK;IAQL;;OAEG;IACH,QAAQ;IAIR;;OAEG;IACH,MAAM;IAQN;;OAEG;IACH,KAAK;IAUL,OAAO,CAAC,WAAW,CAKjB;IAEF,OAAO,CAAC,WAAW,CAOjB;IAEF,OAAO,CAAC,YAAY,CAElB;IAEF,OAAO,CAAC,aAAa,CAyCnB;IAEF,OAAO,CAAC,kBAAkB,CAGxB;IAEF,OAAO,CAAC,oBAAoB,CAK1B;IAEF,OAAO,CAAC,0BAA0B,CAMhC;IAEF,OAAO,CAAC,eAAe,CAGrB;IAEF,OAAO,CAAC,gBAAgB,CAEtB;IAEF,OAAO,CAAC,gBAAgB,CAGtB;IAEF,OAAO,CAAC,gBAAgB;IAexB,OAAO,CAAC,oBAAoB;IA2BnB,MAAM;CA6HhB;AAED,qBACa,QAAS,SAAQ,WAAW;CAAG;AAE5C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,WAAW,CAAC;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
@@ -0,0 +1,5 @@
1
+ import { n as a, t as e } from "../../chunks/search-bar-TXnqJ-gd.js";
2
+ export {
3
+ e as MdSearch,
4
+ a as MdSearchBar
5
+ };
@@ -1,164 +1,4 @@
1
- import { css as h, nothing as m, html as p } from "lit";
2
- import { property as o, customElement as u } from "lit/decorators.js";
3
- import { M as d } from "../../chunks/base-component-DQTjlEVL.js";
4
- import "../icon/icon.js";
5
- const b = h`
6
- :host {
7
- display: block;
8
- position: fixed;
9
- bottom: 24px;
10
- left: 50%;
11
- transform: translateX(-50%) translateY(100px);
12
- opacity: 0;
13
- pointer-events: none;
14
- z-index: 2000;
15
- transition: transform 250ms cubic-bezier(0.2, 0, 0, 1),
16
- opacity 250ms cubic-bezier(0.2, 0, 0, 1);
17
- }
18
-
19
- :host([open]) {
20
- transform: translateX(-50%) translateY(0);
21
- opacity: 1;
22
- pointer-events: auto;
23
- }
24
-
25
- .snackbar {
26
- display: flex;
27
- align-items: center;
28
- min-width: 288px;
29
- max-width: 568px;
30
- min-height: 48px;
31
- padding: 8px 16px;
32
- box-sizing: border-box;
33
- border-radius: var(--md-sys-shape-corner-extra-small, 4px);
34
- background-color: var(--md-sys-color-inverse-surface, #313033);
35
- color: var(--md-sys-color-inverse-on-surface, #F4EFF4);
36
- box-shadow: var(--md-sys-elevation-level3, 0px 1px 3px 0px rgba(0,0,0,0.30));
37
- font-family: var(--md-sys-typescale-font-family, inherit);
38
- font-size: var(--md-sys-typescale-body-medium-size, 14px);
39
- line-height: 20px;
40
- gap: 12px;
41
- }
42
-
43
- .message {
44
- flex: 1;
45
- }
46
-
47
- .actions {
48
- display: flex;
49
- align-items: center;
50
- gap: 8px;
51
- }
52
-
53
- .action-btn {
54
- background: transparent;
55
- border: none;
56
- color: var(--md-sys-color-inverse-primary, #D0BCFF);
57
- font-family: inherit;
58
- font-size: var(--md-sys-typescale-label-large-size, 14px);
59
- font-weight: 500;
60
- cursor: pointer;
61
- padding: 0 8px;
62
- height: 36px;
63
- border-radius: var(--md-sys-shape-corner-extra-small, 4px);
64
- outline: none;
65
- }
66
-
67
- .action-btn:hover {
68
- background-color: rgba(208, 188, 255, 0.08);
69
- }
70
-
71
- .close-btn {
72
- display: inline-flex;
73
- align-items: center;
74
- justify-content: center;
75
- background: transparent;
76
- border: none;
77
- color: var(--md-sys-color-inverse-on-surface, #F4EFF4);
78
- cursor: pointer;
79
- padding: 4px;
80
- border-radius: 50%;
81
- outline: none;
82
- }
83
-
84
- .close-btn:hover {
85
- background-color: rgba(255, 255, 255, 0.08);
86
- }
87
- `;
88
- var x = Object.defineProperty, y = Object.getOwnPropertyDescriptor, s = (i, r, n, a) => {
89
- for (var t = a > 1 ? void 0 : a ? y(r, n) : r, l = i.length - 1, c; l >= 0; l--)
90
- (c = i[l]) && (t = (a ? c(r, n, t) : c(t)) || t);
91
- return a && t && x(r, n, t), t;
92
- };
93
- let e = class extends d {
94
- constructor() {
95
- super(...arguments), this.open = !1, this.message = "", this.actionText = "", this.closeable = !1, this.timeoutMs = 4e3, this.timerId = null, this.handleAction = () => {
96
- this.emitEvent("action"), this.close();
97
- }, this.handleClose = () => {
98
- this.close();
99
- };
100
- }
101
- updated(i) {
102
- super.updated(i), i.has("open") && (this.open ? this.startTimer() : this.clearTimer());
103
- }
104
- show() {
105
- this.open = !0;
106
- }
107
- close() {
108
- this.open = !1, this.emitEvent("close");
109
- }
110
- startTimer() {
111
- this.clearTimer(), this.timeoutMs > 0 && (this.timerId = window.setTimeout(() => {
112
- this.close();
113
- }, this.timeoutMs));
114
- }
115
- clearTimer() {
116
- this.timerId !== null && (clearTimeout(this.timerId), this.timerId = null);
117
- }
118
- render() {
119
- return p`
120
- <div class="snackbar" role="status" aria-live="polite">
121
- <div class="message">
122
- <slot>${this.message}</slot>
123
- </div>
124
-
125
- <div class="actions">
126
- ${this.actionText ? p`
127
- <button class="action-btn" @click=${this.handleAction}>
128
- ${this.actionText}
129
- </button>
130
- ` : m}
131
-
132
- ${this.closeable ? p`
133
- <button class="close-btn" aria-label="Dismiss" @click=${this.handleClose}>
134
- <md-icon name="close" size="18"></md-icon>
135
- </button>
136
- ` : m}
137
- </div>
138
- </div>
139
- `;
140
- }
141
- };
142
- e.styles = [d.styles, b];
143
- s([
144
- o({ type: Boolean, reflect: !0 })
145
- ], e.prototype, "open", 2);
146
- s([
147
- o({ type: String })
148
- ], e.prototype, "message", 2);
149
- s([
150
- o({ type: String, attribute: "action-text" })
151
- ], e.prototype, "actionText", 2);
152
- s([
153
- o({ type: Boolean, reflect: !0 })
154
- ], e.prototype, "closeable", 2);
155
- s([
156
- o({ type: Number, attribute: "timeout-ms" })
157
- ], e.prototype, "timeoutMs", 2);
158
- e = s([
159
- u("md-snackbar")
160
- ], e);
1
+ import { t as a } from "../../chunks/snackbar-Wsz3BzEY.js";
161
2
  export {
162
- e as MdSnackbar
3
+ a as MdSnackbar
163
4
  };
164
- //# sourceMappingURL=snackbar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch.css.d.ts","sourceRoot":"","sources":["../../../src/components/switch/switch.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,yBAkGxB,CAAC"}
1
+ {"version":3,"file":"switch.css.d.ts","sourceRoot":"","sources":["../../../src/components/switch/switch.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,yBAyHxB,CAAC"}
@@ -1,171 +1,4 @@
1
- import { css as u, html as a } from "lit";
2
- import { property as d, customElement as p } from "lit/decorators.js";
3
- import { M as h } from "../../chunks/form-associated-fKbeX_2P.js";
4
- import "../../internal/ripple/ripple.js";
5
- import "../../chunks/focus-ring-Dl-XoEKK.js";
6
- import "../icon/icon.js";
7
- const m = u`
8
- :host {
9
- display: inline-flex;
10
- align-items: center;
11
- vertical-align: middle;
12
- cursor: pointer;
13
- outline: none;
14
- -webkit-tap-highlight-color: transparent;
15
- user-select: none;
16
- gap: 12px;
17
- font-family: var(--md-sys-typescale-font-family, inherit);
18
- font-size: var(--md-sys-typescale-body-large-size, 16px);
19
- color: var(--md-sys-color-on-surface, #1D1B20);
20
- }
21
-
22
- :host([disabled]) {
23
- cursor: not-allowed;
24
- color: rgba(29, 27, 32, 0.38);
25
- pointer-events: none;
26
- }
27
-
28
- .switch {
29
- position: relative;
30
- display: inline-flex;
31
- align-items: center;
32
- width: 52px;
33
- height: 32px;
34
- box-sizing: border-box;
35
- border-radius: var(--md-sys-shape-corner-full, 9999px);
36
- border: 2px solid var(--md-sys-color-outline, #79747E);
37
- background-color: var(--md-sys-color-surface-container-highest, #E6E0E9);
38
- transition: background-color 200ms cubic-bezier(0.2, 0, 0, 1),
39
- border-color 200ms cubic-bezier(0.2, 0, 0, 1);
40
- }
41
-
42
- :host([selected]) .switch {
43
- background-color: var(--md-sys-color-primary, #6750A4);
44
- border-color: var(--md-sys-color-primary, #6750A4);
45
- }
46
-
47
- :host([disabled]) .switch {
48
- background-color: rgba(29, 27, 32, 0.12);
49
- border-color: rgba(29, 27, 32, 0.12);
50
- }
51
-
52
- .thumb-container {
53
- position: absolute;
54
- left: 4px;
55
- width: 20px;
56
- height: 20px;
57
- display: flex;
58
- align-items: center;
59
- justify-content: center;
60
- transition: transform 200ms cubic-bezier(0.2, 0, 0, 1);
61
- }
62
-
63
- :host([selected]) .thumb-container {
64
- transform: translateX(20px);
65
- }
66
-
67
- .thumb {
68
- width: 16px;
69
- height: 16px;
70
- border-radius: 50%;
71
- background-color: var(--md-sys-color-outline, #79747E);
72
- display: flex;
73
- align-items: center;
74
- justify-content: center;
75
- transition: width 200ms cubic-bezier(0.2, 0, 0, 1),
76
- height 200ms cubic-bezier(0.2, 0, 0, 1),
77
- background-color 200ms cubic-bezier(0.2, 0, 0, 1);
78
- }
79
-
80
- :host([selected]) .thumb {
81
- width: 24px;
82
- height: 24px;
83
- background-color: var(--md-sys-color-on-primary, #FFFFFF);
84
- }
85
-
86
- :host([disabled]) .thumb {
87
- background-color: rgba(29, 27, 32, 0.38);
88
- }
89
-
90
- .icon {
91
- font-size: 16px;
92
- color: var(--md-sys-color-on-primary-container, #21005D);
93
- opacity: 0;
94
- transition: opacity 150ms ease;
95
- }
96
-
97
- :host([selected]) .icon.check {
98
- opacity: 1;
99
- }
100
-
101
- :host([icons]:not([selected])) .icon.cross {
102
- opacity: 1;
103
- color: var(--md-sys-color-surface-container-highest, #E6E0E9);
104
- }
105
- `;
106
- var b = Object.defineProperty, y = Object.getOwnPropertyDescriptor, r = (e, i, l, o) => {
107
- for (var t = o > 1 ? void 0 : o ? y(i, l) : i, c = e.length - 1, n; c >= 0; c--)
108
- (n = e[c]) && (t = (o ? n(i, l, t) : n(t)) || t);
109
- return o && t && b(i, l, t), t;
110
- };
111
- let s = class extends h {
112
- constructor() {
113
- super(...arguments), this.selected = !1, this.icons = !1, this.value = "on", this.handleClick = (e) => {
114
- this.disabled || (e.preventDefault(), this.toggle());
115
- }, this.handleKeyDown = (e) => {
116
- this.disabled || (e.key === " " || e.key === "Enter") && (e.preventDefault(), this.toggle());
117
- };
118
- }
119
- connectedCallback() {
120
- super.connectedCallback(), this.tabIndex = this.disabled ? -1 : 0, this.addEventListener("click", this.handleClick), this.addEventListener("keydown", this.handleKeyDown), this.updateFormValue();
121
- }
122
- disconnectedCallback() {
123
- super.disconnectedCallback(), this.removeEventListener("click", this.handleClick), this.removeEventListener("keydown", this.handleKeyDown);
124
- }
125
- updated(e) {
126
- super.updated(e), (e.has("selected") || e.has("value")) && this.updateFormValue();
127
- }
128
- formResetCallback() {
129
- this.selected = !1, this.updateFormValue();
130
- }
131
- updateFormValue() {
132
- this.setFormValue(this.selected ? this.value : null), this.required && !this.selected ? this.setValidity({ valueMissing: !0 }, "Please toggle this switch") : this.setValidity({});
133
- }
134
- toggle() {
135
- this.selected = !this.selected, this.updateFormValue(), this.emitEvent("change", { selected: this.selected }), this.emitEvent("input", { selected: this.selected });
136
- }
137
- render() {
138
- return a`
139
- <div class="switch">
140
- <div class="thumb-container">
141
- <md-ripple ?disabled=${this.disabled} unbounded></md-ripple>
142
- <md-focus-ring></md-focus-ring>
143
- <div class="thumb">
144
- ${this.icons ? a`
145
- <md-icon class="icon check" size="14">check</md-icon>
146
- <md-icon class="icon cross" size="14">close</md-icon>
147
- ` : a`<slot name="icon"></slot>`}
148
- </div>
149
- </div>
150
- </div>
151
- <slot></slot>
152
- `;
153
- }
154
- };
155
- s.styles = [h.styles, m];
156
- r([
157
- d({ type: Boolean, reflect: !0 })
158
- ], s.prototype, "selected", 2);
159
- r([
160
- d({ type: Boolean, reflect: !0 })
161
- ], s.prototype, "icons", 2);
162
- r([
163
- d({ type: String })
164
- ], s.prototype, "value", 2);
165
- s = r([
166
- p("md-switch")
167
- ], s);
1
+ import { t as o } from "../../chunks/switch-DdukrvXb.js";
168
2
  export {
169
- s as MdSwitch
3
+ o as MdSwitch
170
4
  };
171
- //# sourceMappingURL=switch.js.map
@@ -0,0 +1,8 @@
1
+ export declare const tableStyles: import('lit').CSSResult;
2
+ export declare const tableHeadStyles: import('lit').CSSResult;
3
+ export declare const tableBodyStyles: import('lit').CSSResult;
4
+ export declare const tableRowStyles: import('lit').CSSResult;
5
+ export declare const tableHeaderCellStyles: import('lit').CSSResult;
6
+ export declare const tableCellStyles: import('lit').CSSResult;
7
+ export declare const tablePaginationStyles: import('lit').CSSResult;
8
+ //# sourceMappingURL=table.css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.css.d.ts","sourceRoot":"","sources":["../../../src/components/table/table.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,yBA+DvB,CAAC;AAEF,eAAO,MAAM,eAAe,yBAa3B,CAAC;AAEF,eAAO,MAAM,eAAe,yBAI3B,CAAC;AAEF,eAAO,MAAM,cAAc,yBAyC1B,CAAC;AAEF,eAAO,MAAM,qBAAqB,yBA6EjC,CAAC;AAEF,eAAO,MAAM,eAAe,yBAoC3B,CAAC;AAEF,eAAO,MAAM,qBAAqB,yBA6CjC,CAAC"}