@vollowx/seele 0.13.4 → 0.13.6

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 (147) hide show
  1. package/custom-elements.json +1256 -115
  2. package/package.json +22 -14
  3. package/src/all.d.ts +34 -0
  4. package/src/all.js +1 -0
  5. package/src/base/autocomplete.d.ts +56 -0
  6. package/src/base/autocomplete.js +82 -87
  7. package/src/base/button.d.ts +13 -0
  8. package/src/base/button.js +26 -22
  9. package/src/base/checkbox.d.ts +18 -0
  10. package/src/base/checkbox.js +39 -34
  11. package/src/base/controllers/list-controller.d.ts +37 -0
  12. package/src/base/controllers/list-controller.js +23 -15
  13. package/src/base/controllers/popover-controller.d.ts +35 -0
  14. package/src/base/controllers/popover-controller.js +37 -29
  15. package/src/base/dialog.d.ts +20 -0
  16. package/src/base/dialog.js +11 -9
  17. package/src/base/field.d.ts +3 -0
  18. package/src/base/input.d.ts +44 -0
  19. package/src/base/input.js +57 -65
  20. package/src/base/item.d.ts +7 -0
  21. package/src/base/item.js +2 -1
  22. package/src/base/list-item.d.ts +15 -0
  23. package/src/base/list-item.js +22 -22
  24. package/src/base/list.d.ts +54 -0
  25. package/src/base/list.js +69 -55
  26. package/src/base/menu-item.d.ts +6 -0
  27. package/src/base/menu-item.js +4 -3
  28. package/src/base/menu.d.ts +76 -0
  29. package/src/base/menu.js +135 -143
  30. package/src/base/mixins/attachable.d.ts +9 -0
  31. package/src/base/mixins/attachable.js +22 -18
  32. package/src/base/mixins/focus-delegated.d.ts +5 -0
  33. package/src/base/mixins/focus-delegated.js +6 -8
  34. package/src/base/mixins/form-associated.d.ts +15 -0
  35. package/src/base/mixins/form-associated.js +11 -18
  36. package/src/base/mixins/internals-attached.d.ts +6 -0
  37. package/src/base/mixins/internals-attached.js +1 -1
  38. package/src/base/option.d.ts +9 -0
  39. package/src/base/option.js +7 -8
  40. package/src/base/radio.d.ts +13 -0
  41. package/src/base/radio.js +169 -0
  42. package/src/base/select.d.ts +116 -0
  43. package/src/base/select.js +130 -128
  44. package/src/base/slider.d.ts +75 -0
  45. package/src/base/slider.js +115 -118
  46. package/src/base/tab-panel.d.ts +9 -0
  47. package/src/base/tab-panel.js +11 -11
  48. package/src/base/tab.d.ts +18 -0
  49. package/src/base/tab.js +25 -24
  50. package/src/base/tabs.d.ts +19 -0
  51. package/src/base/tabs.js +84 -81
  52. package/src/base/toggle-button.d.ts +47 -0
  53. package/src/base/toggle-button.js +57 -53
  54. package/src/base/tooltip.d.ts +37 -0
  55. package/src/base/tooltip.js +70 -65
  56. package/src/core/decorators.d.ts +2 -0
  57. package/src/core/decorators.js +5 -4
  58. package/src/core/focus-visible.d.ts +2 -0
  59. package/src/core/focus-visible.js +4 -4
  60. package/src/core/shared.d.ts +1 -0
  61. package/src/core/unique-id.d.ts +4 -0
  62. package/src/core/unique-id.js +2 -1
  63. package/src/m3/autocomplete/autocomplete.d.ts +8 -0
  64. package/src/m3/autocomplete/autocomplete.js +10 -10
  65. package/src/m3/badge/badge.d.ts +12 -0
  66. package/src/m3/badge/badge.js +24 -37
  67. package/src/m3/button/common-button-toggle.d.ts +31 -0
  68. package/src/m3/button/common-button-toggle.js +44 -41
  69. package/src/m3/button/common-button.d.ts +29 -0
  70. package/src/m3/button/common-button.js +40 -40
  71. package/src/m3/button/icon-button-toggle.d.ts +24 -0
  72. package/src/m3/button/icon-button-toggle.js +35 -32
  73. package/src/m3/button/icon-button.d.ts +23 -0
  74. package/src/m3/button/icon-button.js +33 -31
  75. package/src/m3/button-group/connected-button-group.d.ts +19 -0
  76. package/src/m3/button-group/connected-button-group.js +30 -28
  77. package/src/m3/button-group/standard-button-group.d.ts +24 -0
  78. package/src/m3/button-group/standard-button-group.js +72 -66
  79. package/src/m3/checkbox/checkbox.d.ts +25 -0
  80. package/src/m3/checkbox/checkbox.js +24 -22
  81. package/src/m3/dialog/dialog-spring.d.ts +45 -0
  82. package/src/m3/dialog/dialog-spring.js +83 -86
  83. package/src/m3/dialog/dialog.d.ts +46 -0
  84. package/src/m3/dialog/dialog.js +90 -117
  85. package/src/m3/divider/divider.d.ts +13 -0
  86. package/src/m3/divider/divider.js +20 -33
  87. package/src/m3/fab/fab.d.ts +23 -0
  88. package/src/m3/fab/fab.js +24 -23
  89. package/src/m3/field/field.d.ts +28 -0
  90. package/src/m3/field/field.js +40 -55
  91. package/src/m3/field/filled-field.d.ts +11 -0
  92. package/src/m3/field/filled-field.js +7 -11
  93. package/src/m3/field/outlined-field.d.ts +11 -0
  94. package/src/m3/field/outlined-field.js +8 -12
  95. package/src/m3/focus-ring/focus-ring.d.ts +32 -0
  96. package/src/m3/focus-ring/focus-ring.js +38 -23
  97. package/src/m3/item/item.d.ts +31 -0
  98. package/src/m3/item/item.js +32 -17
  99. package/src/m3/list/list-item.d.ts +22 -0
  100. package/src/m3/list/list-item.js +18 -16
  101. package/src/m3/list/list.d.ts +15 -0
  102. package/src/m3/list/list.js +16 -15
  103. package/src/m3/loading-indicator/loading-indicator.d.ts +26 -0
  104. package/src/m3/loading-indicator/loading-indicator.js +113 -161
  105. package/src/m3/menu/menu-item.d.ts +15 -0
  106. package/src/m3/menu/menu-item.js +10 -4
  107. package/src/m3/menu/menu.d.ts +22 -0
  108. package/src/m3/menu/menu.js +20 -18
  109. package/src/m3/radio/radio-styles.css.js +2 -0
  110. package/src/m3/radio/radio.d.ts +17 -0
  111. package/src/m3/radio/radio.js +33 -0
  112. package/src/m3/ripple/ripple.d.ts +43 -0
  113. package/src/m3/ripple/ripple.js +82 -89
  114. package/src/m3/select/filled-select.d.ts +16 -0
  115. package/src/m3/select/filled-select.js +12 -10
  116. package/src/m3/select/option.d.ts +15 -0
  117. package/src/m3/select/option.js +10 -4
  118. package/src/m3/select/outlined-select.d.ts +16 -0
  119. package/src/m3/select/outlined-select.js +12 -10
  120. package/src/m3/select/select.d.ts +13 -0
  121. package/src/m3/select/select.js +16 -16
  122. package/src/m3/slider/slider.d.ts +20 -0
  123. package/src/m3/slider/slider.js +32 -26
  124. package/src/m3/switch/switch.d.ts +27 -0
  125. package/src/m3/switch/switch.js +62 -53
  126. package/src/m3/system/motion.d.ts +12 -0
  127. package/src/m3/system/motion.js +16 -9
  128. package/src/m3/tab/tab-panel.d.ts +9 -0
  129. package/src/m3/tab/tab-panel.js +6 -9
  130. package/src/m3/tab/tab.d.ts +19 -0
  131. package/src/m3/tab/tab.js +14 -12
  132. package/src/m3/tab/tabs.d.ts +25 -0
  133. package/src/m3/tab/tabs.js +34 -30
  134. package/src/m3/text-field/filled-text-field.d.ts +13 -0
  135. package/src/m3/text-field/filled-text-field.js +15 -20
  136. package/src/m3/text-field/outlined-text-field.d.ts +13 -0
  137. package/src/m3/text-field/outlined-text-field.js +15 -20
  138. package/src/m3/toolbar/toolbar.d.ts +26 -0
  139. package/src/m3/toolbar/toolbar.js +28 -25
  140. package/src/m3/tooltip/tooltip.d.ts +19 -0
  141. package/src/m3/tooltip/tooltip.js +15 -14
  142. package/src/win98/button/button.d.ts +13 -0
  143. package/src/win98/button/button.js +13 -11
  144. package/src/win98/button/radio.d.ts +3 -0
  145. package/src/win98/button/radio.js +9 -0
  146. package/src/win98/radio/radio.d.ts +3 -0
  147. package/src/win98/radio/radio.js +9 -0
@@ -0,0 +1,23 @@
1
+ import { Button } from '../../base/button.js';
2
+ import '../focus-ring/focus-ring.js';
3
+ import '../ripple/ripple.js';
4
+ /**
5
+ * @tag md-fab
6
+ *
7
+ * @csspart icon
8
+ * @csspart label
9
+ *
10
+ * @slot - icon
11
+ * @slot label - label
12
+ */
13
+ export declare class M3Fab extends Button {
14
+ size: 's' | 'm' | 'l';
15
+ color: 'surface' | 'primary-container' | 'secondary-container' | 'tertiary-container' | 'primary' | 'secondary' | 'tertiary';
16
+ static styles: any[];
17
+ render(): import("lit-html").TemplateResult<1>;
18
+ }
19
+ declare global {
20
+ interface HTMLElementTagNameMap {
21
+ 'md-fab': M3Fab;
22
+ }
23
+ }
package/src/m3/fab/fab.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate";
1
+ import { __decorate } from "tslib";
2
2
  import { html } from 'lit';
3
3
  import { customElement, property } from 'lit/decorators.js';
4
4
  import { Button } from '../../base/button.js';
@@ -6,32 +6,33 @@ import '../focus-ring/focus-ring.js';
6
6
  import '../ripple/ripple.js';
7
7
  import { fabStyles } from './fab-styles.css.js';
8
8
  import { targetStyles } from '../target-styles.css.js';
9
- export class M3Fab extends Button {
10
- static{
11
- this.styles = [
12
- ...super.styles,
13
- targetStyles,
14
- fabStyles
15
- ];
9
+ /**
10
+ * @tag md-fab
11
+ *
12
+ * @csspart icon
13
+ * @csspart label
14
+ *
15
+ * @slot - icon
16
+ * @slot label - label
17
+ */
18
+ let M3Fab = class M3Fab extends Button {
19
+ constructor() {
20
+ super(...arguments);
21
+ this.size = 's'; // s for default
22
+ this.color = 'primary';
16
23
  }
24
+ static { this.styles = [...super.styles, targetStyles, fabStyles]; }
17
25
  render() {
18
- return html`<md-focus-ring></md-focus-ring><md-ripple></md-ripple><span part="target"></span><slot part="icon" aria-hidden="true"></slot><slot part="label" name="label"></slot>`;
26
+ return html `<md-focus-ring></md-focus-ring><md-ripple></md-ripple><span part="target"></span><slot part="icon" aria-hidden="true"></slot><slot part="label" name="label"></slot>`;
19
27
  }
20
- constructor(...args){
21
- super(...args), this.size = 's' // s for default
22
- , this.color = 'primary';
23
- }
24
- }
25
- _ts_decorate([
26
- property({
27
- reflect: true
28
- })
28
+ };
29
+ __decorate([
30
+ property({ reflect: true })
29
31
  ], M3Fab.prototype, "size", void 0);
30
- _ts_decorate([
31
- property({
32
- reflect: true
33
- })
32
+ __decorate([
33
+ property({ reflect: true })
34
34
  ], M3Fab.prototype, "color", void 0);
35
- M3Fab = _ts_decorate([
35
+ M3Fab = __decorate([
36
36
  customElement('md-fab')
37
37
  ], M3Fab);
38
+ export { M3Fab };
@@ -0,0 +1,28 @@
1
+ import { PropertyValues, TemplateResult } from 'lit';
2
+ import { Field } from '../../base/field.js';
3
+ /**
4
+ * @fires {Event} change - Fired when the selected value has changed.
5
+ * @fires {Event} input - Fired when the selected value has changed.
6
+ */
7
+ export declare abstract class M3Field extends Field {
8
+ label: string;
9
+ supportingText: string;
10
+ disabled: boolean;
11
+ error: boolean;
12
+ focused: boolean;
13
+ populated: boolean;
14
+ hasLabel: boolean;
15
+ hasStart: boolean;
16
+ hasEnd: boolean;
17
+ static styles: any[];
18
+ render(): TemplateResult<1>;
19
+ /**
20
+ * Should be implemented by subclasses.
21
+ */
22
+ protected abstract renderContainerContent(): TemplateResult;
23
+ protected renderSupportingText(): "" | TemplateResult<1>;
24
+ protected renderStart(): TemplateResult<1>;
25
+ protected renderEnd(): TemplateResult<1>;
26
+ update(changedProperties: PropertyValues): void;
27
+ protected handleSlotChange(e: Event): void;
28
+ }
@@ -1,4 +1,4 @@
1
- import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate";
1
+ import { __decorate } from "tslib";
2
2
  import { html } from 'lit';
3
3
  import { property, state } from 'lit/decorators.js';
4
4
  import { Field } from '../../base/field.js';
@@ -6,26 +6,35 @@ import { fieldStyles } from './field-styles.css.js';
6
6
  /**
7
7
  * @fires {Event} change - Fired when the selected value has changed.
8
8
  * @fires {Event} input - Fired when the selected value has changed.
9
- */ export class M3Field extends Field {
10
- static{
11
- this.styles = [
12
- fieldStyles
13
- ];
9
+ */
10
+ export class M3Field extends Field {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.label = '';
14
+ this.supportingText = '';
15
+ this.disabled = false;
16
+ this.error = false;
17
+ this.focused = false;
18
+ this.populated = false;
19
+ this.hasLabel = false;
20
+ this.hasStart = false;
21
+ this.hasEnd = false;
14
22
  }
23
+ static { this.styles = [fieldStyles]; }
15
24
  render() {
16
- return html`<div class="container">${this.renderContainerContent()}</div>${this.renderSupportingText()}`;
25
+ return html `<div class="container">${this.renderContainerContent()}</div>${this.renderSupportingText()}`;
17
26
  }
18
27
  renderSupportingText() {
19
28
  if (!this.supportingText) {
20
29
  return '';
21
30
  }
22
- return html`<div class="supporting-text">${this.supportingText}</div>`;
31
+ return html `<div class="supporting-text">${this.supportingText}</div>`;
23
32
  }
24
33
  renderStart() {
25
- return html`<slot name="start" class="start" ?hidden="${!this.hasStart}" @slotchange="${this.handleSlotChange}"></slot>`;
34
+ return html `<slot name="start" class="start" ?hidden="${!this.hasStart}" @slotchange="${this.handleSlotChange}"></slot>`;
26
35
  }
27
36
  renderEnd() {
28
- return html`<slot name="end" class="end" ?hidden="${!this.hasEnd}" @slotchange="${this.handleSlotChange}"></slot>`;
37
+ return html `<slot name="end" class="end" ?hidden="${!this.hasEnd}" @slotchange="${this.handleSlotChange}"></slot>`;
29
38
  }
30
39
  update(changedProperties) {
31
40
  if (changedProperties.has('label')) {
@@ -35,61 +44,37 @@ import { fieldStyles } from './field-styles.css.js';
35
44
  }
36
45
  handleSlotChange(e) {
37
46
  const slot = e.target;
38
- const hasContent = slot.assignedNodes({
39
- flatten: true
40
- }).length > 0;
41
- if (slot.name === 'start') this.hasStart = hasContent;
42
- if (slot.name === 'end') this.hasEnd = hasContent;
43
- }
44
- constructor(...args){
45
- super(...args), this.label = '', this.supportingText = '', this.disabled = false, this.error = false, this.focused = false, this.populated = false, this.hasLabel = false, this.hasStart = false, this.hasEnd = false;
47
+ const hasContent = slot.assignedNodes({ flatten: true }).length > 0;
48
+ if (slot.name === 'start')
49
+ this.hasStart = hasContent;
50
+ if (slot.name === 'end')
51
+ this.hasEnd = hasContent;
46
52
  }
47
53
  }
48
- _ts_decorate([
49
- property({
50
- type: String,
51
- reflect: true
52
- })
54
+ __decorate([
55
+ property({ type: String, reflect: true })
53
56
  ], M3Field.prototype, "label", void 0);
54
- _ts_decorate([
55
- property({
56
- type: String,
57
- reflect: true
58
- })
57
+ __decorate([
58
+ property({ type: String, reflect: true })
59
59
  ], M3Field.prototype, "supportingText", void 0);
60
- _ts_decorate([
61
- property({
62
- type: Boolean,
63
- reflect: true
64
- })
60
+ __decorate([
61
+ property({ type: Boolean, reflect: true })
65
62
  ], M3Field.prototype, "disabled", void 0);
66
- _ts_decorate([
67
- property({
68
- type: Boolean,
69
- reflect: true
70
- })
63
+ __decorate([
64
+ property({ type: Boolean, reflect: true })
71
65
  ], M3Field.prototype, "error", void 0);
72
- _ts_decorate([
73
- property({
74
- type: Boolean,
75
- reflect: true
76
- })
66
+ __decorate([
67
+ property({ type: Boolean, reflect: true })
77
68
  ], M3Field.prototype, "focused", void 0);
78
- _ts_decorate([
79
- property({
80
- type: Boolean,
81
- reflect: true
82
- })
69
+ __decorate([
70
+ property({ type: Boolean, reflect: true })
83
71
  ], M3Field.prototype, "populated", void 0);
84
- _ts_decorate([
85
- property({
86
- type: Boolean,
87
- reflect: true
88
- })
72
+ __decorate([
73
+ property({ type: Boolean, reflect: true })
89
74
  ], M3Field.prototype, "hasLabel", void 0);
90
- _ts_decorate([
75
+ __decorate([
91
76
  state()
92
77
  ], M3Field.prototype, "hasStart", void 0);
93
- _ts_decorate([
78
+ __decorate([
94
79
  state()
95
80
  ], M3Field.prototype, "hasEnd", void 0);
@@ -0,0 +1,11 @@
1
+ import { M3Field } from './field.js';
2
+ import '../ripple/ripple.js';
3
+ export declare class M3FilledField extends M3Field {
4
+ static styles: any[];
5
+ protected renderContainerContent(): import("lit-html").TemplateResult<1>;
6
+ }
7
+ declare global {
8
+ interface HTMLElementTagNameMap {
9
+ 'md-filled-field': M3FilledField;
10
+ }
11
+ }
@@ -1,20 +1,16 @@
1
- import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate";
1
+ import { __decorate } from "tslib";
2
2
  import { html } from 'lit';
3
3
  import { customElement } from 'lit/decorators.js';
4
4
  import { M3Field } from './field.js';
5
5
  import '../ripple/ripple.js';
6
6
  import { filledFieldStyles } from './filled-field-styles.css.js';
7
- export class M3FilledField extends M3Field {
8
- static{
9
- this.styles = [
10
- ...super.styles,
11
- filledFieldStyles
12
- ];
13
- }
7
+ let M3FilledField = class M3FilledField extends M3Field {
8
+ static { this.styles = [...super.styles, filledFieldStyles]; }
14
9
  renderContainerContent() {
15
- return html`<md-ripple clickbehavior="none" enterbehavior="none" spacebehavior="none"></md-ripple>${this.renderStart()}<div class="middle"><span class="label">${this.label}</span><div class="input-wrapper"><slot></slot></div></div>${this.renderEnd()}`;
10
+ return html `<md-ripple clickbehavior="none" enterbehavior="none" spacebehavior="none"></md-ripple>${this.renderStart()}<div class="middle"><span class="label">${this.label}</span><div class="input-wrapper"><slot></slot></div></div>${this.renderEnd()}`;
16
11
  }
17
- }
18
- M3FilledField = _ts_decorate([
12
+ };
13
+ M3FilledField = __decorate([
19
14
  customElement('md-filled-field')
20
15
  ], M3FilledField);
16
+ export { M3FilledField };
@@ -0,0 +1,11 @@
1
+ import { M3Field } from './field.js';
2
+ export declare class M3OutlinedField extends M3Field {
3
+ static styles: any[];
4
+ protected renderContainerContent(): import("lit-html").TemplateResult<1>;
5
+ protected renderOutline(): import("lit-html").TemplateResult<1>;
6
+ }
7
+ declare global {
8
+ interface HTMLElementTagNameMap {
9
+ 'md-outlined-field': M3OutlinedField;
10
+ }
11
+ }
@@ -1,22 +1,18 @@
1
- import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate";
1
+ import { __decorate } from "tslib";
2
2
  import { html } from 'lit';
3
3
  import { customElement } from 'lit/decorators.js';
4
4
  import { M3Field } from './field.js';
5
5
  import { outlinedFieldStyles } from './outlined-field-styles.css.js';
6
- export class M3OutlinedField extends M3Field {
7
- static{
8
- this.styles = [
9
- ...super.styles,
10
- outlinedFieldStyles
11
- ];
12
- }
6
+ let M3OutlinedField = class M3OutlinedField extends M3Field {
7
+ static { this.styles = [...super.styles, outlinedFieldStyles]; }
13
8
  renderContainerContent() {
14
- return html`${this.renderOutline()} ${this.renderStart()}<div class="middle"><div class="input-wrapper"><slot></slot></div></div>${this.renderEnd()}`;
9
+ return html `${this.renderOutline()} ${this.renderStart()}<div class="middle"><div class="input-wrapper"><slot></slot></div></div>${this.renderEnd()}`;
15
10
  }
16
11
  renderOutline() {
17
- return html`<div class="outline"><div class="outline-start"></div><div class="outline-notch"><span class="label">${this.label}</span></div><div class="outline-end"></div></div>`;
12
+ return html `<div class="outline"><div class="outline-start"></div><div class="outline-notch"><span class="label">${this.label}</span></div><div class="outline-end"></div></div>`;
18
13
  }
19
- }
20
- M3OutlinedField = _ts_decorate([
14
+ };
15
+ M3OutlinedField = __decorate([
21
16
  customElement('md-outlined-field')
22
17
  ], M3OutlinedField);
18
+ export { M3OutlinedField };
@@ -0,0 +1,32 @@
1
+ import { LitElement } from 'lit';
2
+ declare const M3FocusRing_base: Constructor<import("../../base/mixins/attachable.js").AttachableInterface> & Constructor<import("../../base/mixins/internals-attached.js").InternalsAttachedInterface> & typeof LitElement;
3
+ /**
4
+ * @tag md-focus-ring
5
+ *
6
+ * @cssprop --md-focus-ring-active-width
7
+ * @cssprop --md-focus-ring-color
8
+ * @cssprop --md-focus-ring-duration
9
+ * @cssprop --md-focus-ring-inward-offset
10
+ * @cssprop --md-focus-ring-outward-offset
11
+ * @cssprop --md-focus-ring-shape
12
+ * @cssprop --md-focus-ring-shape-end-end
13
+ * @cssprop --md-focus-ring-shape-end-start
14
+ * @cssprop --md-focus-ring-shape-start-end
15
+ * @cssprop --md-focus-ring-shape-start-start
16
+ * @cssprop --md-focus-ring-width
17
+ */
18
+ export declare class M3FocusRing extends M3FocusRing_base {
19
+ #private;
20
+ inward: boolean;
21
+ static styles: any[];
22
+ constructor();
23
+ visualFocus(): void;
24
+ visualBlur(): void;
25
+ handleControlChange(prev?: HTMLElement | null, next?: HTMLElement | null): void;
26
+ }
27
+ declare global {
28
+ interface HTMLElementTagNameMap {
29
+ 'md-focus-ring': M3FocusRing;
30
+ }
31
+ }
32
+ export {};
@@ -1,24 +1,41 @@
1
- import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate";
1
+ import { __decorate } from "tslib";
2
2
  import { LitElement } from 'lit';
3
3
  import { property } from 'lit/decorators.js';
4
4
  import { customElement } from '../../core/decorators.js';
5
5
  import { focusVisible } from '../../core/focus-visible.js';
6
6
  import { Attachable } from '../../base/mixins/attachable.js';
7
- import { InternalsAttached, internals } from '../../base/mixins/internals-attached.js';
7
+ import { InternalsAttached, internals, } from '../../base/mixins/internals-attached.js';
8
8
  import { focusRingStyles } from './focus-ring-styles.css.js';
9
- export class M3FocusRing extends Attachable(InternalsAttached(LitElement)) {
10
- static{
11
- this.styles = [
12
- focusRingStyles
13
- ];
14
- }
15
- constructor(){
16
- super(), this.inward = false, this.#handleFocusIn = ()=>{
17
- if (focusVisible) this[internals].states.add('visible');
18
- else this[internals].states.delete('visible');
19
- }, this.#handleFocusOut = ()=>{
9
+ /**
10
+ * @tag md-focus-ring
11
+ *
12
+ * @cssprop --md-focus-ring-active-width
13
+ * @cssprop --md-focus-ring-color
14
+ * @cssprop --md-focus-ring-duration
15
+ * @cssprop --md-focus-ring-inward-offset
16
+ * @cssprop --md-focus-ring-outward-offset
17
+ * @cssprop --md-focus-ring-shape
18
+ * @cssprop --md-focus-ring-shape-end-end
19
+ * @cssprop --md-focus-ring-shape-end-start
20
+ * @cssprop --md-focus-ring-shape-start-end
21
+ * @cssprop --md-focus-ring-shape-start-start
22
+ * @cssprop --md-focus-ring-width
23
+ */
24
+ let M3FocusRing = class M3FocusRing extends Attachable(InternalsAttached(LitElement)) {
25
+ static { this.styles = [focusRingStyles]; }
26
+ constructor() {
27
+ super();
28
+ this.inward = false;
29
+ this.#handleFocusIn = () => {
30
+ if (focusVisible)
31
+ this[internals].states.add('visible');
32
+ else
33
+ this[internals].states.delete('visible');
34
+ };
35
+ this.#handleFocusOut = () => {
20
36
  this[internals].states.delete('visible');
21
- }, this.#handlePointerDown = ()=>{
37
+ };
38
+ this.#handlePointerDown = () => {
22
39
  this[internals].states.delete('visible');
23
40
  };
24
41
  this[internals].ariaHidden = 'true';
@@ -36,20 +53,18 @@ export class M3FocusRing extends Attachable(InternalsAttached(LitElement)) {
36
53
  const eventHandlers = {
37
54
  focusin: this.#handleFocusIn,
38
55
  focusout: this.#handleFocusOut,
39
- pointerdown: this.#handlePointerDown
56
+ pointerdown: this.#handlePointerDown,
40
57
  };
41
- Object.keys(eventHandlers).forEach((eventName)=>{
58
+ Object.keys(eventHandlers).forEach((eventName) => {
42
59
  prev?.removeEventListener(eventName, eventHandlers[eventName]);
43
60
  next?.addEventListener(eventName, eventHandlers[eventName]);
44
61
  });
45
62
  }
46
- }
47
- _ts_decorate([
48
- property({
49
- type: Boolean,
50
- reflect: true
51
- })
63
+ };
64
+ __decorate([
65
+ property({ type: Boolean, reflect: true })
52
66
  ], M3FocusRing.prototype, "inward", void 0);
53
- M3FocusRing = _ts_decorate([
67
+ M3FocusRing = __decorate([
54
68
  customElement('md-focus-ring', false)
55
69
  ], M3FocusRing);
70
+ export { M3FocusRing };
@@ -0,0 +1,31 @@
1
+ import { Item } from '../../base/item.js';
2
+ /**
3
+ * @tag md-item
4
+ *
5
+ * @csspart container
6
+ * @csspart start
7
+ * @csspart text
8
+ * @csspart overline
9
+ * @csspart headline
10
+ * @csspart supporting-text
11
+ * @csspart trailing-supporting-text
12
+ * @csspart end
13
+ *
14
+ * @slot container - container element
15
+ * @slot start - start content
16
+ * @slot overline - overline text
17
+ * @slot headline - headline text
18
+ * @slot supporting-text - supporting text
19
+ * @slot trailing-supporting-text - trailing supporting text
20
+ * @slot end - end content
21
+ */
22
+ export declare class M3Item extends Item {
23
+ multiline: boolean;
24
+ static styles: any[];
25
+ render(): import("lit-html").TemplateResult<1>;
26
+ }
27
+ declare global {
28
+ interface HTMLElementTagNameMap {
29
+ 'md-item': M3Item;
30
+ }
31
+ }
@@ -1,27 +1,42 @@
1
- import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate";
1
+ import { __decorate } from "tslib";
2
2
  import { html } from 'lit';
3
3
  import { customElement, property } from 'lit/decorators.js';
4
4
  import { Item } from '../../base/item.js';
5
5
  import { itemStyles } from './item-styles.css.js';
6
- export class M3Item extends Item {
7
- static{
8
- this.styles = [
9
- itemStyles
10
- ];
6
+ /**
7
+ * @tag md-item
8
+ *
9
+ * @csspart container
10
+ * @csspart start
11
+ * @csspart text
12
+ * @csspart overline
13
+ * @csspart headline
14
+ * @csspart supporting-text
15
+ * @csspart trailing-supporting-text
16
+ * @csspart end
17
+ *
18
+ * @slot container - container element
19
+ * @slot start - start content
20
+ * @slot overline - overline text
21
+ * @slot headline - headline text
22
+ * @slot supporting-text - supporting text
23
+ * @slot trailing-supporting-text - trailing supporting text
24
+ * @slot end - end content
25
+ */
26
+ let M3Item = class M3Item extends Item {
27
+ constructor() {
28
+ super(...arguments);
29
+ this.multiline = false;
11
30
  }
31
+ static { this.styles = [itemStyles]; }
12
32
  render() {
13
- return html`<slot name="container"></slot><slot name="start"></slot><div class="text"><slot name="overline"></slot><slot class="default-slot"></slot><slot name="headline"></slot><slot name="supporting-text"></slot></div><slot name="trailing-supporting-text"></slot><slot name="end"></slot>`;
33
+ return html `<slot name="container"></slot><slot name="start"></slot><div class="text"><slot name="overline"></slot><slot class="default-slot"></slot><slot name="headline"></slot><slot name="supporting-text"></slot></div><slot name="trailing-supporting-text"></slot><slot name="end"></slot>`;
14
34
  }
15
- constructor(...args){
16
- super(...args), this.multiline = false;
17
- }
18
- }
19
- _ts_decorate([
20
- property({
21
- type: Boolean,
22
- reflect: true
23
- })
35
+ };
36
+ __decorate([
37
+ property({ type: Boolean, reflect: true })
24
38
  ], M3Item.prototype, "multiline", void 0);
25
- M3Item = _ts_decorate([
39
+ M3Item = __decorate([
26
40
  customElement('md-item')
27
41
  ], M3Item);
42
+ export { M3Item };
@@ -0,0 +1,22 @@
1
+ import { ListItem } from '../../base/list-item.js';
2
+ import '../item/item.js';
3
+ import { M3Ripple } from '../ripple/ripple.js';
4
+ import { M3FocusRing } from '../focus-ring/focus-ring.js';
5
+ /**
6
+ * @tag md-list-item
7
+ *
8
+ * @slot - contents in md-item
9
+ */
10
+ export declare class M3ListItem extends ListItem {
11
+ ripple: M3Ripple;
12
+ focusRing: M3FocusRing;
13
+ static styles: any[];
14
+ render(): import("lit-html").TemplateResult<1>;
15
+ constructor();
16
+ protected updated(changed: Map<string, any>): void;
17
+ }
18
+ declare global {
19
+ interface HTMLElementTagNameMap {
20
+ 'md-list-item': M3ListItem;
21
+ }
22
+ }
@@ -1,22 +1,22 @@
1
- import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate";
1
+ import { __decorate } from "tslib";
2
2
  import { html } from 'lit';
3
3
  import { customElement, query } from 'lit/decorators.js';
4
4
  import { ListItem } from '../../base/list-item.js';
5
5
  import '../item/item.js';
6
6
  import { listItemStyles } from './list-item-styles.css.js';
7
- export class M3ListItem extends ListItem {
8
- static{
9
- this.styles = [
10
- ...super.styles,
11
- listItemStyles
12
- ];
13
- }
7
+ /**
8
+ * @tag md-list-item
9
+ *
10
+ * @slot - contents in md-item
11
+ */
12
+ let M3ListItem = class M3ListItem extends ListItem {
13
+ static { this.styles = [...super.styles, listItemStyles]; }
14
14
  render() {
15
- return html`<md-item><div slot="container"><md-focus-ring inward></md-focus-ring><md-ripple></md-ripple></div><slot slot="start" name="start"></slot><slot slot="overline" name="overline"></slot><slot></slot><slot slot="headline" name="headline"></slot><slot slot="supporting-text" name="supporting-text"></slot><slot slot="trailing-supporting-text" name="trailing-supporting-text"></slot><slot slot="end" name="end"></slot></md-item>`;
15
+ return html `<md-item><div slot="container"><md-focus-ring inward></md-focus-ring><md-ripple></md-ripple></div><slot slot="start" name="start"></slot><slot slot="overline" name="overline"></slot><slot></slot><slot slot="headline" name="headline"></slot><slot slot="supporting-text" name="supporting-text"></slot><slot slot="trailing-supporting-text" name="trailing-supporting-text"></slot><slot slot="end" name="end"></slot></md-item>`;
16
16
  }
17
- constructor(){
17
+ constructor() {
18
18
  super();
19
- this.updateComplete.then(()=>{
19
+ this.updateComplete.then(() => {
20
20
  this.ripple.$control = this;
21
21
  this.focusRing.$control = this;
22
22
  });
@@ -26,18 +26,20 @@ export class M3ListItem extends ListItem {
26
26
  if (changed.has('focused')) {
27
27
  if (this.focused) {
28
28
  this.focusRing.visualFocus();
29
- } else {
29
+ }
30
+ else {
30
31
  this.focusRing.visualBlur();
31
32
  }
32
33
  }
33
34
  }
34
- }
35
- _ts_decorate([
35
+ };
36
+ __decorate([
36
37
  query('md-ripple')
37
38
  ], M3ListItem.prototype, "ripple", void 0);
38
- _ts_decorate([
39
+ __decorate([
39
40
  query('md-focus-ring')
40
41
  ], M3ListItem.prototype, "focusRing", void 0);
41
- M3ListItem = _ts_decorate([
42
+ M3ListItem = __decorate([
42
43
  customElement('md-list-item')
43
44
  ], M3ListItem);
45
+ export { M3ListItem };
@@ -0,0 +1,15 @@
1
+ import { List } from '../../base/list.js';
2
+ /**
3
+ * @tag md-list
4
+ *
5
+ * TODO: Use listController
6
+ */
7
+ export declare class M3List extends List {
8
+ color: 'standard' | 'segmented';
9
+ static styles: any[];
10
+ }
11
+ declare global {
12
+ interface HTMLElementTagNameMap {
13
+ 'md-list': M3List;
14
+ }
15
+ }