@vollowx/seele 0.13.5 → 0.13.7

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 (145) 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/base/autocomplete.d.ts +57 -0
  5. package/src/base/autocomplete.js +80 -98
  6. package/src/base/button.d.ts +13 -0
  7. package/src/base/button.js +21 -19
  8. package/src/base/checkbox.d.ts +18 -0
  9. package/src/base/checkbox.js +39 -34
  10. package/src/base/controllers/list-controller.d.ts +37 -0
  11. package/src/base/controllers/list-controller.js +23 -15
  12. package/src/base/controllers/popover-controller.d.ts +35 -0
  13. package/src/base/controllers/popover-controller.js +37 -29
  14. package/src/base/dialog.d.ts +20 -0
  15. package/src/base/dialog.js +11 -9
  16. package/src/base/field.d.ts +3 -0
  17. package/src/base/input.d.ts +44 -0
  18. package/src/base/input.js +57 -65
  19. package/src/base/item.d.ts +7 -0
  20. package/src/base/item.js +2 -1
  21. package/src/base/list-item.d.ts +15 -0
  22. package/src/base/list-item.js +22 -22
  23. package/src/base/list.d.ts +54 -0
  24. package/src/base/list.js +69 -55
  25. package/src/base/menu-item.d.ts +6 -0
  26. package/src/base/menu-item.js +4 -3
  27. package/src/base/menu.d.ts +78 -0
  28. package/src/base/menu.js +137 -143
  29. package/src/base/mixins/attachable.d.ts +9 -0
  30. package/src/base/mixins/attachable.js +22 -18
  31. package/src/base/mixins/focus-delegated.d.ts +5 -0
  32. package/src/base/mixins/focus-delegated.js +6 -8
  33. package/src/base/mixins/form-associated.d.ts +15 -0
  34. package/src/base/mixins/form-associated.js +11 -18
  35. package/src/base/mixins/internals-attached.d.ts +6 -0
  36. package/src/base/mixins/internals-attached.js +1 -1
  37. package/src/base/option.d.ts +9 -0
  38. package/src/base/option.js +7 -8
  39. package/src/base/radio.d.ts +13 -0
  40. package/src/base/radio.js +49 -42
  41. package/src/base/select.d.ts +116 -0
  42. package/src/base/select.js +130 -128
  43. package/src/base/slider.d.ts +75 -0
  44. package/src/base/slider.js +115 -118
  45. package/src/base/tab-panel.d.ts +9 -0
  46. package/src/base/tab-panel.js +11 -11
  47. package/src/base/tab.d.ts +18 -0
  48. package/src/base/tab.js +25 -24
  49. package/src/base/tabs.d.ts +19 -0
  50. package/src/base/tabs.js +84 -81
  51. package/src/base/toggle-button.d.ts +47 -0
  52. package/src/base/toggle-button.js +56 -52
  53. package/src/base/tooltip.d.ts +37 -0
  54. package/src/base/tooltip.js +70 -65
  55. package/src/core/decorators.d.ts +2 -0
  56. package/src/core/decorators.js +4 -3
  57. package/src/core/ensure-ready.d.ts +1 -0
  58. package/src/core/ensure-ready.js +15 -0
  59. package/src/core/focus-visible.d.ts +2 -0
  60. package/src/core/focus-visible.js +4 -4
  61. package/src/core/shared.d.ts +1 -0
  62. package/src/core/unique-id.d.ts +4 -0
  63. package/src/core/unique-id.js +2 -1
  64. package/src/m3/autocomplete/autocomplete.d.ts +9 -0
  65. package/src/m3/autocomplete/autocomplete.js +11 -10
  66. package/src/m3/badge/badge.d.ts +13 -0
  67. package/src/m3/badge/badge.js +28 -37
  68. package/src/m3/button/common-button-toggle.d.ts +31 -0
  69. package/src/m3/button/common-button-toggle.js +44 -41
  70. package/src/m3/button/common-button.d.ts +29 -0
  71. package/src/m3/button/common-button.js +40 -40
  72. package/src/m3/button/icon-button-toggle.d.ts +24 -0
  73. package/src/m3/button/icon-button-toggle.js +35 -32
  74. package/src/m3/button/icon-button.d.ts +23 -0
  75. package/src/m3/button/icon-button.js +33 -31
  76. package/src/m3/button-group/connected-button-group.d.ts +19 -0
  77. package/src/m3/button-group/connected-button-group.js +26 -24
  78. package/src/m3/button-group/standard-button-group.d.ts +24 -0
  79. package/src/m3/button-group/standard-button-group.js +71 -65
  80. package/src/m3/checkbox/checkbox.d.ts +25 -0
  81. package/src/m3/checkbox/checkbox.js +23 -22
  82. package/src/m3/dialog/dialog.d.ts +46 -0
  83. package/src/m3/dialog/dialog.js +90 -117
  84. package/src/m3/divider/divider.d.ts +13 -0
  85. package/src/m3/divider/divider.js +20 -33
  86. package/src/m3/fab/fab.d.ts +23 -0
  87. package/src/m3/fab/fab.js +24 -23
  88. package/src/m3/field/field.d.ts +28 -0
  89. package/src/m3/field/field.js +40 -55
  90. package/src/m3/field/filled-field.d.ts +11 -0
  91. package/src/m3/field/filled-field.js +7 -11
  92. package/src/m3/field/outlined-field.d.ts +11 -0
  93. package/src/m3/field/outlined-field.js +8 -12
  94. package/src/m3/focus-ring/focus-ring.d.ts +32 -0
  95. package/src/m3/focus-ring/focus-ring.js +38 -23
  96. package/src/m3/item/item.d.ts +31 -0
  97. package/src/m3/item/item.js +32 -17
  98. package/src/m3/list/list-item.d.ts +24 -0
  99. package/src/m3/list/list-item.js +20 -16
  100. package/src/m3/list/list.d.ts +15 -0
  101. package/src/m3/list/list.js +16 -15
  102. package/src/m3/loading-indicator/loading-indicator.d.ts +26 -0
  103. package/src/m3/loading-indicator/loading-indicator.js +113 -161
  104. package/src/m3/menu/menu-item.d.ts +15 -0
  105. package/src/m3/menu/menu-item.js +10 -4
  106. package/src/m3/menu/menu.d.ts +22 -0
  107. package/src/m3/menu/menu.js +20 -18
  108. package/src/m3/radio/radio-styles.css.js +1 -1
  109. package/src/m3/radio/radio.d.ts +17 -0
  110. package/src/m3/radio/radio.js +22 -11
  111. package/src/m3/ripple/ripple.d.ts +43 -0
  112. package/src/m3/ripple/ripple.js +82 -89
  113. package/src/m3/select/filled-select.d.ts +16 -0
  114. package/src/m3/select/filled-select.js +12 -10
  115. package/src/m3/select/option.d.ts +15 -0
  116. package/src/m3/select/option.js +10 -4
  117. package/src/m3/select/outlined-select.d.ts +16 -0
  118. package/src/m3/select/outlined-select.js +12 -10
  119. package/src/m3/select/select.d.ts +14 -0
  120. package/src/m3/select/select.js +17 -16
  121. package/src/m3/slider/slider.d.ts +20 -0
  122. package/src/m3/slider/slider.js +32 -26
  123. package/src/m3/switch/switch.d.ts +27 -0
  124. package/src/m3/switch/switch.js +62 -53
  125. package/src/m3/system/motion.d.ts +12 -0
  126. package/src/m3/system/motion.js +16 -9
  127. package/src/m3/tab/tab-panel.d.ts +9 -0
  128. package/src/m3/tab/tab-panel.js +6 -9
  129. package/src/m3/tab/tab.d.ts +19 -0
  130. package/src/m3/tab/tab.js +14 -12
  131. package/src/m3/tab/tabs.d.ts +25 -0
  132. package/src/m3/tab/tabs.js +34 -30
  133. package/src/m3/text-field/filled-text-field.d.ts +13 -0
  134. package/src/m3/text-field/filled-text-field.js +15 -20
  135. package/src/m3/text-field/outlined-text-field.d.ts +13 -0
  136. package/src/m3/text-field/outlined-text-field.js +15 -20
  137. package/src/m3/toolbar/toolbar.d.ts +26 -0
  138. package/src/m3/toolbar/toolbar.js +28 -25
  139. package/src/m3/tooltip/tooltip.d.ts +19 -0
  140. package/src/m3/tooltip/tooltip.js +15 -14
  141. package/src/win98/button/button.d.ts +13 -0
  142. package/src/win98/button/button.js +13 -11
  143. package/src/m3/dialog/dialog-spring.js +0 -179
  144. package/src/win98/button/radio.js +0 -8
  145. package/src/win98/radio/radio.js +0 -8
@@ -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';
@@ -7,42 +7,44 @@ import '../ripple/ripple.js';
7
7
  import { targetStyles } from '../target-styles.css.js';
8
8
  import { sharedButtonStyles } from './shared-button-styles.css.js';
9
9
  import { iconButtonStyles } from './icon-button-styles.css.js';
10
- export class M3IconButton extends Button {
11
- static{
12
- this.styles = [
13
- ...super.styles,
14
- targetStyles,
15
- sharedButtonStyles,
16
- iconButtonStyles
17
- ];
10
+ /**
11
+ * @tag md-icon-button
12
+ *
13
+ * @csspart icon
14
+ *
15
+ * @slot - icon
16
+ */
17
+ let M3IconButton = class M3IconButton extends Button {
18
+ constructor() {
19
+ super(...arguments);
20
+ this.size = 's';
21
+ this.color = 'primary';
22
+ this.variant = 'text';
23
+ this.width = 'standard';
18
24
  }
25
+ static { this.styles = [
26
+ ...super.styles,
27
+ targetStyles,
28
+ sharedButtonStyles,
29
+ iconButtonStyles,
30
+ ]; }
19
31
  render() {
20
- return html`<md-focus-ring></md-focus-ring><md-ripple></md-ripple><span part="target"></span><slot part="icon"></slot>`;
32
+ return html `<md-focus-ring></md-focus-ring><md-ripple></md-ripple><span part="target"></span><slot part="icon"></slot>`;
21
33
  }
22
- constructor(...args){
23
- super(...args), this.size = 's', this.color = 'primary', this.variant = 'text', this.width = 'standard';
24
- }
25
- }
26
- _ts_decorate([
27
- property({
28
- reflect: true
29
- })
34
+ };
35
+ __decorate([
36
+ property({ reflect: true })
30
37
  ], M3IconButton.prototype, "size", void 0);
31
- _ts_decorate([
32
- property({
33
- reflect: true
34
- })
38
+ __decorate([
39
+ property({ reflect: true })
35
40
  ], M3IconButton.prototype, "color", void 0);
36
- _ts_decorate([
37
- property({
38
- reflect: true
39
- })
41
+ __decorate([
42
+ property({ reflect: true })
40
43
  ], M3IconButton.prototype, "variant", void 0);
41
- _ts_decorate([
42
- property({
43
- reflect: true
44
- })
44
+ __decorate([
45
+ property({ reflect: true })
45
46
  ], M3IconButton.prototype, "width", void 0);
46
- M3IconButton = _ts_decorate([
47
+ M3IconButton = __decorate([
47
48
  customElement('md-icon-button')
48
49
  ], M3IconButton);
50
+ export { M3IconButton };
@@ -0,0 +1,19 @@
1
+ import { LitElement } from 'lit';
2
+ import type { ToggleButton } from '../../base/toggle-button.js';
3
+ /**
4
+ * @tag md-connected-button-group
5
+ *
6
+ * @slot - toggle buttons
7
+ */
8
+ export declare class M3ConnectedButtonGroup extends LitElement {
9
+ #private;
10
+ multiple: boolean;
11
+ $buttons: Array<ToggleButton>;
12
+ static styles: any[];
13
+ render(): import("lit-html").TemplateResult<1>;
14
+ }
15
+ declare global {
16
+ interface HTMLElementTagNameMap {
17
+ 'md-connected-button-group': M3ConnectedButtonGroup;
18
+ }
19
+ }
@@ -1,37 +1,39 @@
1
- import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate";
1
+ import { __decorate } from "tslib";
2
2
  import { LitElement, html } from 'lit';
3
3
  import { property, queryAssignedElements } from 'lit/decorators.js';
4
4
  import { customElement } from '../../core/decorators.js';
5
5
  import { connectedButtonGroupStyles } from './connected-button-group-styles.css.js';
6
- export class M3ConnectedButtonGroup extends LitElement {
7
- static{
8
- this.styles = [
9
- connectedButtonGroupStyles
10
- ];
6
+ /**
7
+ * @tag md-connected-button-group
8
+ *
9
+ * @slot - toggle buttons
10
+ */
11
+ let M3ConnectedButtonGroup = class M3ConnectedButtonGroup extends LitElement {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.multiple = false;
15
+ this.#handleChange = (e) => {
16
+ this.$buttons.forEach((btn, _) => {
17
+ if (btn !== e.target && !this.multiple)
18
+ // NOTE: there will not be an event dispatched and user should listen on
19
+ // the button group directly.
20
+ btn.checked = false;
21
+ });
22
+ };
11
23
  }
24
+ static { this.styles = [connectedButtonGroupStyles]; }
12
25
  render() {
13
- return html`<slot @change="${this.#handleChange}"></slot>`;
26
+ return html `<slot @change="${this.#handleChange}"></slot>`;
14
27
  }
15
28
  #handleChange;
16
- constructor(...args){
17
- super(...args), this.multiple = false, this.#handleChange = (e)=>{
18
- console.log('Boom!', e);
19
- this.$buttons.forEach((btn, _)=>{
20
- if (btn !== e.target && !this.multiple) // NOTE: there will not be an event dispatched and user should listen on
21
- // the button group directly.
22
- btn.checked = false;
23
- });
24
- };
25
- }
26
- }
27
- _ts_decorate([
28
- property({
29
- type: Boolean
30
- })
29
+ };
30
+ __decorate([
31
+ property({ type: Boolean })
31
32
  ], M3ConnectedButtonGroup.prototype, "multiple", void 0);
32
- _ts_decorate([
33
+ __decorate([
33
34
  queryAssignedElements()
34
35
  ], M3ConnectedButtonGroup.prototype, "$buttons", void 0);
35
- M3ConnectedButtonGroup = _ts_decorate([
36
+ M3ConnectedButtonGroup = __decorate([
36
37
  customElement('md-connected-button-group')
37
38
  ], M3ConnectedButtonGroup);
39
+ export { M3ConnectedButtonGroup };
@@ -0,0 +1,24 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * @tag md-button-group
4
+ *
5
+ * @slot - buttons
6
+ */
7
+ export declare class M3StandardButtonGroup extends LitElement {
8
+ #private;
9
+ size: 'xs' | 's' | '';
10
+ $buttons: Array<HTMLElement>;
11
+ static styles: any[];
12
+ render(): import("lit-html").TemplateResult<1>;
13
+ connectedCallback(): void;
14
+ disconnectedCallback(): void;
15
+ /**
16
+ * Passing no element resets all shape changes
17
+ */
18
+ updateLayout(target?: HTMLElement | null): void;
19
+ }
20
+ declare global {
21
+ interface HTMLElementTagNameMap {
22
+ 'md-button-group': M3StandardButtonGroup;
23
+ }
24
+ }
@@ -1,4 +1,4 @@
1
- import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate";
1
+ import { __decorate } from "tslib";
2
2
  import { LitElement, html } from 'lit';
3
3
  import { property, queryAssignedElements } from 'lit/decorators.js';
4
4
  import { customElement } from '../../core/decorators.js';
@@ -6,46 +6,76 @@ import { getSpring } from '../system/motion.js';
6
6
  import { standardButtonGroupStyles } from './standard-button-group-styles.css.js';
7
7
  const EXPAND_FACTOR = 1.15;
8
8
  const shapeAnimation = Symbol('shapeAnimation');
9
- export class M3StandardButtonGroup extends LitElement {
10
- static{
11
- this.styles = [
12
- standardButtonGroupStyles
13
- ];
9
+ /**
10
+ * @tag md-button-group
11
+ *
12
+ * @slot - buttons
13
+ */
14
+ let M3StandardButtonGroup = class M3StandardButtonGroup extends LitElement {
15
+ constructor() {
16
+ super(...arguments);
17
+ this.size = '';
18
+ this.#activeIndex = -1;
19
+ this.#baseWidths = [];
20
+ this.#handleSlotChange = () => {
21
+ this.#resizeObserver.disconnect();
22
+ this.$buttons.forEach((btn, i) => {
23
+ this.#baseWidths[i] = btn.getBoundingClientRect().width;
24
+ this.#resizeObserver.observe(btn);
25
+ });
26
+ };
27
+ this.#handlePointerDown = (e) => {
28
+ if (this === e.target)
29
+ return;
30
+ this.updateLayout(e.target);
31
+ };
32
+ this.#handleKeyDown = (e) => {
33
+ if (e.key !== ' ' && e.key !== 'Enter')
34
+ return;
35
+ this.updateLayout(e.target);
36
+ };
37
+ this.#reset = (e) => {
38
+ if (e && e.type === 'keyup' && e.key !== ' ' && e.key !== 'Enter')
39
+ return;
40
+ if (this.#activeIndex !== -1) {
41
+ this.#activeIndex = -1;
42
+ this.updateLayout();
43
+ }
44
+ };
14
45
  }
46
+ static { this.styles = [standardButtonGroupStyles]; }
15
47
  render() {
16
- return html`<slot @slotchange="${this.#handleSlotChange}"></slot>`;
48
+ return html `<slot @slotchange="${this.#handleSlotChange}"></slot>`;
17
49
  }
18
50
  connectedCallback() {
19
51
  super.connectedCallback();
20
52
  this.addEventListener('pointerdown', this.#handlePointerDown);
21
- this.addEventListener('keydown', this.#handleKeyDown, {
22
- capture: true
23
- });
53
+ this.addEventListener('keydown', this.#handleKeyDown, { capture: true });
24
54
  window.addEventListener('pointerup', this.#reset);
25
55
  window.addEventListener('pointercancel', this.#reset);
26
- window.addEventListener('keyup', this.#reset, {
27
- capture: true
28
- });
29
- this.#resizeObserver = new ResizeObserver((entries)=>{
30
- if (this.#activeIndex !== -1) return; // Skip if animating
31
- entries.forEach((entry)=>{
56
+ window.addEventListener('keyup', this.#reset, { capture: true });
57
+ this.#resizeObserver = new ResizeObserver((entries) => {
58
+ if (this.#activeIndex !== -1)
59
+ return; // Skip if animating
60
+ entries.forEach((entry) => {
32
61
  const target = entry.target;
33
62
  const index = this.$buttons.indexOf(target);
34
63
  if (index !== -1) {
35
64
  const currentWidth = target.style.width;
36
65
  target.style.width = '';
37
66
  this.#baseWidths[index] = entry.target.getBoundingClientRect().width;
38
- if (currentWidth) target.style.width = currentWidth;
67
+ if (currentWidth)
68
+ target.style.width = currentWidth;
39
69
  }
40
70
  });
41
71
  });
72
+ queueMicrotask(this.#handleSlotChange);
73
+ // Which is not called on a SSR'd element
42
74
  }
43
75
  disconnectedCallback() {
44
76
  window.removeEventListener('pointerup', this.#reset);
45
77
  window.removeEventListener('pointercancel', this.#reset);
46
- window.removeEventListener('keyup', this.#reset, {
47
- capture: true
48
- });
78
+ window.removeEventListener('keyup', this.#reset, { capture: true });
49
79
  this.#resizeObserver.disconnect();
50
80
  super.disconnectedCallback();
51
81
  }
@@ -57,38 +87,36 @@ export class M3StandardButtonGroup extends LitElement {
57
87
  #handleKeyDown;
58
88
  #reset;
59
89
  /**
60
- * Passing no element resets all shape changes
61
- */ updateLayout(target = null) {
90
+ * Passing no element resets all shape changes
91
+ */
92
+ updateLayout(target = null) {
62
93
  const pressedIndex = target ? this.$buttons.indexOf(target) : -1;
63
94
  this.#activeIndex = pressedIndex;
64
95
  const pressedBaseWidth = pressedIndex !== -1 ? this.#baseWidths[pressedIndex] : 0;
65
96
  const expansionDelta = pressedBaseWidth * (EXPAND_FACTOR - 1);
66
97
  const isPressedAtEdge = pressedIndex === 0 || pressedIndex === this.$buttons.length - 1;
67
- this.$buttons.forEach((btn, i)=>{
98
+ this.$buttons.forEach((btn, i) => {
68
99
  const currentWidth = btn.getBoundingClientRect().width;
69
100
  let targetWidth = this.#baseWidths[i];
70
101
  if (pressedIndex !== -1) {
71
102
  if (i === pressedIndex) {
72
103
  targetWidth = pressedBaseWidth * EXPAND_FACTOR;
73
- } else if (Math.abs(i - pressedIndex) === 1) {
74
- if (isPressedAtEdge) targetWidth = this.#baseWidths[i] - expansionDelta;
75
- else targetWidth = this.#baseWidths[i] - expansionDelta / 2;
104
+ }
105
+ else if (Math.abs(i - pressedIndex) === 1) {
106
+ if (isPressedAtEdge)
107
+ targetWidth = this.#baseWidths[i] - expansionDelta;
108
+ else
109
+ targetWidth = this.#baseWidths[i] - expansionDelta / 2;
76
110
  }
77
111
  }
78
112
  const spring = getSpring(this, 'spatial', 'fast');
79
- if (btn[shapeAnimation]) btn[shapeAnimation].cancel();
80
- btn[shapeAnimation] = btn.animate([
81
- {
82
- width: `${currentWidth}px`
83
- },
84
- {
85
- width: `${targetWidth}px`
86
- }
87
- ], {
113
+ if (btn[shapeAnimation])
114
+ btn[shapeAnimation].cancel();
115
+ btn[shapeAnimation] = btn.animate([{ width: `${currentWidth}px` }, { width: `${targetWidth}px` }], {
88
116
  ...spring,
89
- fill: 'forwards'
117
+ fill: 'forwards',
90
118
  });
91
- btn[shapeAnimation].onfinish = ()=>{
119
+ btn[shapeAnimation].onfinish = () => {
92
120
  if (pressedIndex === -1) {
93
121
  btn.style.width = '';
94
122
  btn[shapeAnimation].cancel();
@@ -96,36 +124,14 @@ export class M3StandardButtonGroup extends LitElement {
96
124
  };
97
125
  });
98
126
  }
99
- constructor(...args){
100
- super(...args), this.size = '', this.#activeIndex = -1, this.#baseWidths = [], this.#handleSlotChange = ()=>{
101
- this.#resizeObserver.disconnect();
102
- this.$buttons.forEach((btn, i)=>{
103
- this.#baseWidths[i] = btn.getBoundingClientRect().width;
104
- this.#resizeObserver.observe(btn);
105
- });
106
- }, this.#handlePointerDown = (e)=>{
107
- if (this === e.target) return;
108
- this.updateLayout(e.target);
109
- }, this.#handleKeyDown = (e)=>{
110
- if (e.key !== ' ' && e.key !== 'Enter') return;
111
- this.updateLayout(e.target);
112
- }, this.#reset = (e)=>{
113
- if (e && e.type === 'keyup' && e.key !== ' ' && e.key !== 'Enter') return;
114
- if (this.#activeIndex !== -1) {
115
- this.#activeIndex = -1;
116
- this.updateLayout();
117
- }
118
- };
119
- }
120
- }
121
- _ts_decorate([
122
- property({
123
- reflect: true
124
- })
127
+ };
128
+ __decorate([
129
+ property({ reflect: true })
125
130
  ], M3StandardButtonGroup.prototype, "size", void 0);
126
- _ts_decorate([
131
+ __decorate([
127
132
  queryAssignedElements()
128
133
  ], M3StandardButtonGroup.prototype, "$buttons", void 0);
129
- M3StandardButtonGroup = _ts_decorate([
134
+ M3StandardButtonGroup = __decorate([
130
135
  customElement('md-button-group')
131
136
  ], M3StandardButtonGroup);
137
+ export { M3StandardButtonGroup };
@@ -0,0 +1,25 @@
1
+ import { Checkbox } from '../../base/checkbox.js';
2
+ import '../focus-ring/focus-ring.js';
3
+ import '../ripple/ripple.js';
4
+ import type { M3Ripple } from '../ripple/ripple.js';
5
+ /**
6
+ * @tag md-checkbox
7
+ *
8
+ * @csspart icon
9
+ * @csspart mark
10
+ * @csspart mark-short
11
+ * @csspart mark-long
12
+ */
13
+ export declare class M3Checkbox extends Checkbox {
14
+ error: boolean;
15
+ $ripple: M3Ripple;
16
+ static styles: any[];
17
+ render(): import("lit-html").TemplateResult<1>;
18
+ renderIcon(): import("lit-html").TemplateResult<1>;
19
+ connectedCallback(): void;
20
+ }
21
+ declare global {
22
+ interface HTMLElementTagNameMap {
23
+ 'md-checkbox': M3Checkbox;
24
+ }
25
+ }
@@ -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, query } from 'lit/decorators.js';
4
4
  import { Checkbox } from '../../base/checkbox.js';
@@ -6,40 +6,41 @@ import '../focus-ring/focus-ring.js';
6
6
  import '../ripple/ripple.js';
7
7
  import { checkboxStyles } from './checkbox-styles.css.js';
8
8
  import { targetStyles } from '../target-styles.css.js';
9
- export class M3Checkbox extends Checkbox {
10
- static{
11
- this.styles = [
12
- ...super.styles,
13
- targetStyles,
14
- checkboxStyles
15
- ];
9
+ /**
10
+ * @tag md-checkbox
11
+ *
12
+ * @csspart icon
13
+ * @csspart mark
14
+ * @csspart mark-short
15
+ * @csspart mark-long
16
+ */
17
+ let M3Checkbox = class M3Checkbox extends Checkbox {
18
+ constructor() {
19
+ super(...arguments);
20
+ this.error = false;
16
21
  }
22
+ static { this.styles = [...super.styles, targetStyles, checkboxStyles]; }
17
23
  render() {
18
- return html`<md-focus-ring></md-focus-ring><md-ripple enterbehavior="none"></md-ripple><span part="target"></span> ${this.renderIcon()}`;
24
+ return html `<md-focus-ring></md-focus-ring><md-ripple enterbehavior="none"></md-ripple><span part="target"></span> ${this.renderIcon()}`;
19
25
  }
20
26
  renderIcon() {
21
- return html`<svg part="icon" viewBox="0 0 18 18" aria-hidden="true"><rect part="mark mark-short"></rect><rect part="mark mark-long"></rect></svg>`;
27
+ return html `<svg part="icon" viewBox="0 0 18 18" aria-hidden="true"><rect part="mark mark-short"></rect><rect part="mark mark-long"></rect></svg>`;
22
28
  }
23
29
  connectedCallback() {
24
30
  super.connectedCallback();
25
31
  // SSR'd <md-checkbox> components don't have their labels set up on time
26
- this.updateComplete.then(()=>{
32
+ this.updateComplete.then(() => {
27
33
  this.$ripple.attach(this, true);
28
34
  });
29
35
  }
30
- constructor(...args){
31
- super(...args), this.error = false;
32
- }
33
- }
34
- _ts_decorate([
35
- property({
36
- type: Boolean,
37
- reflect: true
38
- })
36
+ };
37
+ __decorate([
38
+ property({ type: Boolean, reflect: true })
39
39
  ], M3Checkbox.prototype, "error", void 0);
40
- _ts_decorate([
40
+ __decorate([
41
41
  query('md-ripple')
42
42
  ], M3Checkbox.prototype, "$ripple", void 0);
43
- M3Checkbox = _ts_decorate([
43
+ M3Checkbox = __decorate([
44
44
  customElement('md-checkbox')
45
45
  ], M3Checkbox);
46
+ export { M3Checkbox };
@@ -0,0 +1,46 @@
1
+ import { Dialog } from '../../base/dialog.js';
2
+ /**
3
+ * TODO: test if form actions `cancel` and other things related work - no,
4
+ * event listener needed
5
+ *
6
+ * @tag md-dialog
7
+ *
8
+ * @csspart container
9
+ * @csspart headline
10
+ * @csspart content
11
+ * @csspart actions
12
+ *
13
+ * @slot icon
14
+ * @slot headline
15
+ * @slot - content
16
+ * @slot actions
17
+ */
18
+ export declare class M3Dialog extends Dialog {
19
+ #private;
20
+ _config: {
21
+ openEase: string;
22
+ closeEase: string;
23
+ vertSlide: number;
24
+ openDur: number;
25
+ closeDur: number;
26
+ bodyFadeInDur: number;
27
+ bodyFadeOutDur: number;
28
+ };
29
+ private hasIcon;
30
+ $container: HTMLDivElement;
31
+ $body: HTMLDivElement;
32
+ $icon: HTMLSlotElement;
33
+ $actions: HTMLDivElement;
34
+ $actionsPlaceholder: HTMLDivElement;
35
+ $scrim: HTMLDivElement;
36
+ static styles: any[];
37
+ render(): import("lit-html").TemplateResult<1>;
38
+ connectedCallback(): void;
39
+ show(): void;
40
+ close(): void;
41
+ }
42
+ declare global {
43
+ interface HTMLElementTagNameMap {
44
+ 'md-dialog': M3Dialog;
45
+ }
46
+ }