@vandeurenglenn/lite-elements 0.3.18

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 (158) hide show
  1. package/exports/banner/banner.d.ts +7 -0
  2. package/exports/banner.js +68 -0
  3. package/exports/bundle/banner.js +37 -0
  4. package/exports/bundle/button.js +144 -0
  5. package/exports/bundle/card.js +140 -0
  6. package/exports/bundle/code.js +35 -0
  7. package/exports/bundle/custom-element-c2e883ba.js +1 -0
  8. package/exports/bundle/demo-elements.js +1 -0
  9. package/exports/bundle/demo-icons.js +16 -0
  10. package/exports/bundle/demo-shell.js +540 -0
  11. package/exports/bundle/demo.js +457 -0
  12. package/exports/bundle/dial.js +1 -0
  13. package/exports/bundle/dialog.js +149 -0
  14. package/exports/bundle/divider.js +21 -0
  15. package/exports/bundle/drawer-button.js +18 -0
  16. package/exports/bundle/drawer-item.js +39 -0
  17. package/exports/bundle/drawer-layout.js +96 -0
  18. package/exports/bundle/drawer.js +56 -0
  19. package/exports/bundle/dropdown-menu.js +59 -0
  20. package/exports/bundle/dropdown.js +26 -0
  21. package/exports/bundle/elements.js +1 -0
  22. package/exports/bundle/elevation.js +56 -0
  23. package/exports/bundle/hour-field.js +1 -0
  24. package/exports/bundle/icon-button.js +13 -0
  25. package/exports/bundle/icon-set.js +5 -0
  26. package/exports/bundle/icon.js +16 -0
  27. package/exports/bundle/index-3c006227.js +1 -0
  28. package/exports/bundle/index.html +590 -0
  29. package/exports/bundle/input.js +6 -0
  30. package/exports/bundle/it-d4d177bf.js +1 -0
  31. package/exports/bundle/list-item.js +43 -0
  32. package/exports/bundle/list.js +1 -0
  33. package/exports/bundle/menu.js +13 -0
  34. package/exports/bundle/menu2.js +1 -0
  35. package/exports/bundle/minute-field.js +5 -0
  36. package/exports/bundle/pages.js +43 -0
  37. package/exports/bundle/pane.js +96 -0
  38. package/exports/bundle/property-58e28172.js +11 -0
  39. package/exports/bundle/query-73dacde5.js +1 -0
  40. package/exports/bundle/rail.js +58 -0
  41. package/exports/bundle/root.js +8 -0
  42. package/exports/bundle/scroll-mixin.js +1 -0
  43. package/exports/bundle/section.js +11 -0
  44. package/exports/bundle/section2.js +25 -0
  45. package/exports/bundle/select-mixin.js +1 -0
  46. package/exports/bundle/selector-mixin.js +1 -0
  47. package/exports/bundle/selector.js +31 -0
  48. package/exports/bundle/supporting-pane.js +47 -0
  49. package/exports/bundle/tab.js +22 -0
  50. package/exports/bundle/tabs.js +51 -0
  51. package/exports/bundle/text-field.js +10 -0
  52. package/exports/bundle/theme.js +1 -0
  53. package/exports/bundle/themes/default/colors.module.css +180 -0
  54. package/exports/bundle/themes/default/missing/motion.css +4 -0
  55. package/exports/bundle/themes/default/missing/shape.css +13 -0
  56. package/exports/bundle/themes/default/missing/theme.dark.css +5 -0
  57. package/exports/bundle/themes/default/missing/theme.light.css +5 -0
  58. package/exports/bundle/themes/default/missing/tokens.css +9 -0
  59. package/exports/bundle/themes/default/theme.css +10 -0
  60. package/exports/bundle/themes/default/theme.dark.css +33 -0
  61. package/exports/bundle/themes/default/theme.light.css +33 -0
  62. package/exports/bundle/themes/default/tokens.css +256 -0
  63. package/exports/bundle/themes/default/typography.module.css +150 -0
  64. package/exports/bundle/time-picker.js +21 -0
  65. package/exports/bundle/title.js +1 -0
  66. package/exports/bundle/toggle-button.js +4 -0
  67. package/exports/bundle/toggle.js +5 -0
  68. package/exports/bundle/top-app-bar-e6e33a9e.js +114 -0
  69. package/exports/bundle/top-app-bar.js +1 -0
  70. package/exports/bundle/types.js +1 -0
  71. package/exports/bundle/typography.js +156 -0
  72. package/exports/button.js +227 -0
  73. package/exports/card/card.d.ts +13 -0
  74. package/exports/card.js +187 -0
  75. package/exports/code.js +77 -0
  76. package/exports/demo-elements.d.ts +9 -0
  77. package/exports/demo-elements.js +10 -0
  78. package/exports/demo-icons.js +48 -0
  79. package/exports/demo-shell.js +648 -0
  80. package/exports/demo.js +524 -0
  81. package/exports/dial.js +1 -0
  82. package/exports/dialog.js +256 -0
  83. package/exports/divider/divider.d.ts +17 -0
  84. package/exports/divider.js +54 -0
  85. package/exports/drawer/drawer-button.d.ts +9 -0
  86. package/exports/drawer/drawer-layout.d.ts +19 -0
  87. package/exports/drawer/drawer.d.ts +13 -0
  88. package/exports/drawer-button.js +83 -0
  89. package/exports/drawer-item.js +69 -0
  90. package/exports/drawer-layout.js +209 -0
  91. package/exports/drawer.js +140 -0
  92. package/exports/dropdown-menu.js +172 -0
  93. package/exports/dropdown.js +68 -0
  94. package/exports/elements.d.ts +63 -0
  95. package/exports/elements.js +41 -0
  96. package/exports/elevation/elevation.d.ts +11 -0
  97. package/exports/elevation.js +97 -0
  98. package/exports/hour-field.js +1 -0
  99. package/exports/icon-button.js +59 -0
  100. package/exports/icon-set.js +52 -0
  101. package/exports/icon.js +103 -0
  102. package/exports/input.js +36 -0
  103. package/exports/list/list.d.ts +1 -0
  104. package/exports/list-item.js +127 -0
  105. package/exports/list.js +1 -0
  106. package/exports/menu.js +68 -0
  107. package/exports/menu2.js +1 -0
  108. package/exports/minute-field.js +36 -0
  109. package/exports/mixins/scroll-mixin.d.ts +13 -0
  110. package/exports/mixins/select-mixin.d.ts +32 -0
  111. package/exports/mixins/selector-mixin.d.ts +8 -0
  112. package/exports/pages.js +88 -0
  113. package/exports/pane/pane.d.ts +14 -0
  114. package/exports/pane.js +182 -0
  115. package/exports/rail/rail.d.ts +9 -0
  116. package/exports/rail.js +124 -0
  117. package/exports/root.js +39 -0
  118. package/exports/scroll-mixin.js +36 -0
  119. package/exports/section.js +54 -0
  120. package/exports/section2.js +58 -0
  121. package/exports/select-mixin.js +139 -0
  122. package/exports/selector-mixin.js +43 -0
  123. package/exports/selector.js +63 -0
  124. package/exports/supporting-pane/supporting-pane.d.ts +12 -0
  125. package/exports/supporting-pane.js +133 -0
  126. package/exports/tab.js +47 -0
  127. package/exports/tabs/menu.d.ts +1 -0
  128. package/exports/tabs/tab.d.ts +4 -0
  129. package/exports/tabs/tabs.d.ts +5 -0
  130. package/exports/tabs.js +80 -0
  131. package/exports/text-field.js +88 -0
  132. package/exports/theme/theme.d.ts +15 -0
  133. package/exports/theme.js +123 -0
  134. package/exports/themes/default/colors.module.css +180 -0
  135. package/exports/themes/default/missing/motion.css +4 -0
  136. package/exports/themes/default/missing/shape.css +13 -0
  137. package/exports/themes/default/missing/theme.dark.css +5 -0
  138. package/exports/themes/default/missing/theme.light.css +5 -0
  139. package/exports/themes/default/missing/tokens.css +9 -0
  140. package/exports/themes/default/theme.css +10 -0
  141. package/exports/themes/default/theme.dark.css +33 -0
  142. package/exports/themes/default/theme.light.css +33 -0
  143. package/exports/themes/default/tokens.css +256 -0
  144. package/exports/themes/default/typography.module.css +150 -0
  145. package/exports/time-picker/dial.d.ts +1 -0
  146. package/exports/time-picker/hour-field.d.ts +1 -0
  147. package/exports/time-picker.js +52 -0
  148. package/exports/title.js +1 -0
  149. package/exports/toggle/toggle-button.d.ts +13 -0
  150. package/exports/toggle-button.js +63 -0
  151. package/exports/toggle.js +78 -0
  152. package/exports/top-app-bar.js +143 -0
  153. package/exports/tslib.es6-d3ba6528.js +57 -0
  154. package/exports/types.d.ts +18 -0
  155. package/exports/types.js +1 -0
  156. package/exports/typography/title.d.ts +1 -0
  157. package/exports/typography.js +206 -0
  158. package/package.json +256 -0
@@ -0,0 +1,150 @@
1
+ .display-large{
2
+ font-family: var(--md-sys-typescale-display-large-font-family-name);
3
+ font-style: var(--md-sys-typescale-display-large-font-family-style);
4
+ font-weight: var(--md-sys-typescale-display-large-font-weight);
5
+ font-size: var(--md-sys-typescale-display-large-font-size);
6
+ letter-spacing: var(--md-sys-typescale-display-large-tracking);
7
+ line-height: var(--md-sys-typescale-display-large-height);
8
+ text-transform: var(--md-sys-typescale-display-large-text-transform);
9
+ text-decoration: var(--md-sys-typescale-display-large-text-decoration);
10
+ }
11
+ .display-medium{
12
+ font-family: var(--md-sys-typescale-display-medium-font-family-name);
13
+ font-style: var(--md-sys-typescale-display-medium-font-family-style);
14
+ font-weight: var(--md-sys-typescale-display-medium-font-weight);
15
+ font-size: var(--md-sys-typescale-display-medium-font-size);
16
+ letter-spacing: var(--md-sys-typescale-display-medium-tracking);
17
+ line-height: var(--md-sys-typescale-display-medium-height);
18
+ text-transform: var(--md-sys-typescale-display-medium-text-transform);
19
+ text-decoration: var(--md-sys-typescale-display-medium-text-decoration);
20
+ }
21
+ .display-small{
22
+ font-family: var(--md-sys-typescale-display-small-font-family-name);
23
+ font-style: var(--md-sys-typescale-display-small-font-family-style);
24
+ font-weight: var(--md-sys-typescale-display-small-font-weight);
25
+ font-size: var(--md-sys-typescale-display-small-font-size);
26
+ letter-spacing: var(--md-sys-typescale-display-small-tracking);
27
+ line-height: var(--md-sys-typescale-display-small-height);
28
+ text-transform: var(--md-sys-typescale-display-small-text-transform);
29
+ text-decoration: var(--md-sys-typescale-display-small-text-decoration);
30
+ }
31
+ .headline-large{
32
+ font-family: var(--md-sys-typescale-headline-large-font-family-name);
33
+ font-style: var(--md-sys-typescale-headline-large-font-family-style);
34
+ font-weight: var(--md-sys-typescale-headline-large-font-weight);
35
+ font-size: var(--md-sys-typescale-headline-large-font-size);
36
+ letter-spacing: var(--md-sys-typescale-headline-large-tracking);
37
+ line-height: var(--md-sys-typescale-headline-large-height);
38
+ text-transform: var(--md-sys-typescale-headline-large-text-transform);
39
+ text-decoration: var(--md-sys-typescale-headline-large-text-decoration);
40
+ }
41
+ .headline-medium{
42
+ font-family: var(--md-sys-typescale-headline-medium-font-family-name);
43
+ font-style: var(--md-sys-typescale-headline-medium-font-family-style);
44
+ font-weight: var(--md-sys-typescale-headline-medium-font-weight);
45
+ font-size: var(--md-sys-typescale-headline-medium-font-size);
46
+ letter-spacing: var(--md-sys-typescale-headline-medium-tracking);
47
+ line-height: var(--md-sys-typescale-headline-medium-height);
48
+ text-transform: var(--md-sys-typescale-headline-medium-text-transform);
49
+ text-decoration: var(--md-sys-typescale-headline-medium-text-decoration);
50
+ }
51
+ .headline-small{
52
+ font-family: var(--md-sys-typescale-headline-small-font-family-name);
53
+ font-style: var(--md-sys-typescale-headline-small-font-family-style);
54
+ font-weight: var(--md-sys-typescale-headline-small-font-weight);
55
+ font-size: var(--md-sys-typescale-headline-small-font-size);
56
+ letter-spacing: var(--md-sys-typescale-headline-small-tracking);
57
+ line-height: var(--md-sys-typescale-headline-small-height);
58
+ text-transform: var(--md-sys-typescale-headline-small-text-transform);
59
+ text-decoration: var(--md-sys-typescale-headline-small-text-decoration);
60
+ }
61
+ .body-large{
62
+ font-family: var(--md-sys-typescale-body-large-font-family-name);
63
+ font-style: var(--md-sys-typescale-body-large-font-family-style);
64
+ font-weight: var(--md-sys-typescale-body-large-font-weight);
65
+ font-size: var(--md-sys-typescale-body-large-font-size);
66
+ letter-spacing: var(--md-sys-typescale-body-large-tracking);
67
+ line-height: var(--md-sys-typescale-body-large-height);
68
+ text-transform: var(--md-sys-typescale-body-large-text-transform);
69
+ text-decoration: var(--md-sys-typescale-body-large-text-decoration);
70
+ }
71
+ .body-medium{
72
+ font-family: var(--md-sys-typescale-body-medium-font-family-name);
73
+ font-style: var(--md-sys-typescale-body-medium-font-family-style);
74
+ font-weight: var(--md-sys-typescale-body-medium-font-weight);
75
+ font-size: var(--md-sys-typescale-body-medium-font-size);
76
+ letter-spacing: var(--md-sys-typescale-body-medium-tracking);
77
+ line-height: var(--md-sys-typescale-body-medium-height);
78
+ text-transform: var(--md-sys-typescale-body-medium-text-transform);
79
+ text-decoration: var(--md-sys-typescale-body-medium-text-decoration);
80
+ }
81
+ .body-small{
82
+ font-family: var(--md-sys-typescale-body-small-font-family-name);
83
+ font-style: var(--md-sys-typescale-body-small-font-family-style);
84
+ font-weight: var(--md-sys-typescale-body-small-font-weight);
85
+ font-size: var(--md-sys-typescale-body-small-font-size);
86
+ letter-spacing: var(--md-sys-typescale-body-small-tracking);
87
+ line-height: var(--md-sys-typescale-body-small-height);
88
+ text-transform: var(--md-sys-typescale-body-small-text-transform);
89
+ text-decoration: var(--md-sys-typescale-body-small-text-decoration);
90
+ }
91
+ .label-large{
92
+ font-family: var(--md-sys-typescale-label-large-font-family-name);
93
+ font-style: var(--md-sys-typescale-label-large-font-family-style);
94
+ font-weight: var(--md-sys-typescale-label-large-font-weight);
95
+ font-size: var(--md-sys-typescale-label-large-font-size);
96
+ letter-spacing: var(--md-sys-typescale-label-large-tracking);
97
+ line-height: var(--md-sys-typescale-label-large-height);
98
+ text-transform: var(--md-sys-typescale-label-large-text-transform);
99
+ text-decoration: var(--md-sys-typescale-label-large-text-decoration);
100
+ }
101
+ .label-medium{
102
+ font-family: var(--md-sys-typescale-label-medium-font-family-name);
103
+ font-style: var(--md-sys-typescale-label-medium-font-family-style);
104
+ font-weight: var(--md-sys-typescale-label-medium-font-weight);
105
+ font-size: var(--md-sys-typescale-label-medium-font-size);
106
+ letter-spacing: var(--md-sys-typescale-label-medium-tracking);
107
+ line-height: var(--md-sys-typescale-label-medium-height);
108
+ text-transform: var(--md-sys-typescale-label-medium-text-transform);
109
+ text-decoration: var(--md-sys-typescale-label-medium-text-decoration);
110
+ }
111
+ .label-small{
112
+ font-family: var(--md-sys-typescale-label-small-font-family-name);
113
+ font-style: var(--md-sys-typescale-label-small-font-family-style);
114
+ font-weight: var(--md-sys-typescale-label-small-font-weight);
115
+ font-size: var(--md-sys-typescale-label-small-font-size);
116
+ letter-spacing: var(--md-sys-typescale-label-small-tracking);
117
+ line-height: var(--md-sys-typescale-label-small-height);
118
+ text-transform: var(--md-sys-typescale-label-small-text-transform);
119
+ text-decoration: var(--md-sys-typescale-label-small-text-decoration);
120
+ }
121
+ .title-large{
122
+ font-family: var(--md-sys-typescale-title-large-font-family-name);
123
+ font-style: var(--md-sys-typescale-title-large-font-family-style);
124
+ font-weight: var(--md-sys-typescale-title-large-font-weight);
125
+ font-size: var(--md-sys-typescale-title-large-font-size);
126
+ letter-spacing: var(--md-sys-typescale-title-large-tracking);
127
+ line-height: var(--md-sys-typescale-title-large-height);
128
+ text-transform: var(--md-sys-typescale-title-large-text-transform);
129
+ text-decoration: var(--md-sys-typescale-title-large-text-decoration);
130
+ }
131
+ .title-medium{
132
+ font-family: var(--md-sys-typescale-title-medium-font-family-name);
133
+ font-style: var(--md-sys-typescale-title-medium-font-family-style);
134
+ font-weight: var(--md-sys-typescale-title-medium-font-weight);
135
+ font-size: var(--md-sys-typescale-title-medium-font-size);
136
+ letter-spacing: var(--md-sys-typescale-title-medium-tracking);
137
+ line-height: var(--md-sys-typescale-title-medium-height);
138
+ text-transform: var(--md-sys-typescale-title-medium-text-transform);
139
+ text-decoration: var(--md-sys-typescale-title-medium-text-decoration);
140
+ }
141
+ .title-small{
142
+ font-family: var(--md-sys-typescale-title-small-font-family-name);
143
+ font-style: var(--md-sys-typescale-title-small-font-family-style);
144
+ font-weight: var(--md-sys-typescale-title-small-font-weight);
145
+ font-size: var(--md-sys-typescale-title-small-font-size);
146
+ letter-spacing: var(--md-sys-typescale-title-small-tracking);
147
+ line-height: var(--md-sys-typescale-title-small-height);
148
+ text-transform: var(--md-sys-typescale-title-small-text-transform);
149
+ text-decoration: var(--md-sys-typescale-title-small-text-decoration);
150
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,52 @@
1
+ import { _ as __esDecorate, a as __runInitializers } from './tslib.es6-d3ba6528.js';
2
+ import { customElement, css, html, LiteElement } from '@vandeurenglenn/lite';
3
+ import './input.js';
4
+
5
+ let CustomTimePicker = (() => {
6
+ let _classDecorators = [customElement('custom-time-picker')];
7
+ let _classDescriptor;
8
+ let _classExtraInitializers = [];
9
+ let _classThis;
10
+ let _classSuper = LiteElement;
11
+ (class extends _classSuper {
12
+ static { _classThis = this; }
13
+ static {
14
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
15
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
16
+ _classThis = _classDescriptor.value;
17
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
18
+ }
19
+ static styles = [
20
+ css `
21
+ :host {
22
+ display: block;
23
+ }
24
+ `
25
+ ];
26
+ render() {
27
+ return html `
28
+ <time-picker-input></time-picker-input>
29
+ <div class="am-pm">
30
+ <span class="flex"></span>
31
+ <div class="am">am</div>
32
+ <span class="flex-2"></span>
33
+ <div class="pm">pm</div>
34
+ <span class="flex"></span>
35
+ </div>
36
+ <time-picker-hour-plate></time-picker-hour-plate>
37
+ <time-picker-minutes-plate></time-picker-minutes-plate>
38
+ <div class="actions">
39
+ <button class="cancel">cancel</button>
40
+ <span class="flex"></span>
41
+ <button class="ok">ok</button>
42
+ </div>
43
+ `;
44
+ }
45
+ static {
46
+ __runInitializers(_classThis, _classExtraInitializers);
47
+ }
48
+ });
49
+ return _classThis;
50
+ })();
51
+
52
+ export { CustomTimePicker };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,13 @@
1
+ import { LiteElement } from '@vandeurenglenn/lite';
2
+ import '../button/button.js';
3
+ import './toggle.js';
4
+ export declare class CustomToggleButton extends LiteElement {
5
+ accessor active: number;
6
+ accessor togglers: string[];
7
+ private get _toggle();
8
+ private _click;
9
+ connectedCallback(): void;
10
+ disconnectedCallback(): void;
11
+ private _onactive;
12
+ render(): import("lit-html").TemplateResult<1>;
13
+ }
@@ -0,0 +1,63 @@
1
+ import { _ as __esDecorate, a as __runInitializers } from './tslib.es6-d3ba6528.js';
2
+ import { customElement, property, html, LiteElement } from '@vandeurenglenn/lite';
3
+ import './button.js';
4
+ import './toggle.js';
5
+ import './elevation.js';
6
+
7
+ let CustomToggleButton = (() => {
8
+ let _classDecorators = [customElement('custom-toggle-button')];
9
+ let _classDescriptor;
10
+ let _classExtraInitializers = [];
11
+ let _classThis;
12
+ let _classSuper = LiteElement;
13
+ let _active_decorators;
14
+ let _active_initializers = [];
15
+ let _active_extraInitializers = [];
16
+ let _togglers_decorators;
17
+ let _togglers_initializers = [];
18
+ let _togglers_extraInitializers = [];
19
+ (class extends _classSuper {
20
+ static { _classThis = this; }
21
+ static {
22
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
23
+ _active_decorators = [property({ type: Number })];
24
+ _togglers_decorators = [property({ type: Array })];
25
+ __esDecorate(this, null, _active_decorators, { kind: "accessor", name: "active", static: false, private: false, access: { has: obj => "active" in obj, get: obj => obj.active, set: (obj, value) => { obj.active = value; } }, metadata: _metadata }, _active_initializers, _active_extraInitializers);
26
+ __esDecorate(this, null, _togglers_decorators, { kind: "accessor", name: "togglers", static: false, private: false, access: { has: obj => "togglers" in obj, get: obj => obj.togglers, set: (obj, value) => { obj.togglers = value; } }, metadata: _metadata }, _togglers_initializers, _togglers_extraInitializers);
27
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
28
+ _classThis = _classDescriptor.value;
29
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
30
+ __runInitializers(_classThis, _classExtraInitializers);
31
+ }
32
+ #active_accessor_storage = __runInitializers(this, _active_initializers, 0);
33
+ get active() { return this.#active_accessor_storage; }
34
+ set active(value) { this.#active_accessor_storage = value; }
35
+ #togglers_accessor_storage = (__runInitializers(this, _active_extraInitializers), __runInitializers(this, _togglers_initializers, void 0));
36
+ get togglers() { return this.#togglers_accessor_storage; }
37
+ set togglers(value) { this.#togglers_accessor_storage = value; }
38
+ get _toggle() {
39
+ return this.shadowRoot.querySelector('custom-toggle');
40
+ }
41
+ _click = (__runInitializers(this, _togglers_extraInitializers), () => {
42
+ this._toggle.next();
43
+ });
44
+ connectedCallback() {
45
+ this.addEventListener('click', this._click);
46
+ }
47
+ disconnectedCallback() {
48
+ this.removeEventListener('click', this._click);
49
+ }
50
+ _onactive = (event) => {
51
+ this.dispatchEvent(new CustomEvent('active', { detail: event.detail }));
52
+ };
53
+ render() {
54
+ return html ` <custom-button>
55
+ <custom-toggle slot="icon" .active=${this.active} @active=${this._onactive} .togglers=${this.togglers}>
56
+ </custom-toggle>
57
+ </custom-button>`;
58
+ }
59
+ });
60
+ return _classThis;
61
+ })();
62
+
63
+ export { CustomToggleButton };
@@ -0,0 +1,78 @@
1
+ import { _ as __esDecorate, a as __runInitializers } from './tslib.es6-d3ba6528.js';
2
+ import { customElement, property, css, html, LiteElement } from '@vandeurenglenn/lite';
3
+
4
+ let CustomToggle = (() => {
5
+ let _classDecorators = [customElement('custom-toggle')];
6
+ let _classDescriptor;
7
+ let _classExtraInitializers = [];
8
+ let _classThis;
9
+ let _classSuper = LiteElement;
10
+ let _active_decorators;
11
+ let _active_initializers = [];
12
+ let _active_extraInitializers = [];
13
+ let _togglers_decorators;
14
+ let _togglers_initializers = [];
15
+ let _togglers_extraInitializers = [];
16
+ let _icon_decorators;
17
+ let _icon_initializers = [];
18
+ let _icon_extraInitializers = [];
19
+ (class extends _classSuper {
20
+ static { _classThis = this; }
21
+ static {
22
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
23
+ _active_decorators = [property({ type: Number })];
24
+ _togglers_decorators = [property({ type: Array })];
25
+ _icon_decorators = [property()];
26
+ __esDecorate(this, null, _active_decorators, { kind: "accessor", name: "active", static: false, private: false, access: { has: obj => "active" in obj, get: obj => obj.active, set: (obj, value) => { obj.active = value; } }, metadata: _metadata }, _active_initializers, _active_extraInitializers);
27
+ __esDecorate(this, null, _togglers_decorators, { kind: "accessor", name: "togglers", static: false, private: false, access: { has: obj => "togglers" in obj, get: obj => obj.togglers, set: (obj, value) => { obj.togglers = value; } }, metadata: _metadata }, _togglers_initializers, _togglers_extraInitializers);
28
+ __esDecorate(this, null, _icon_decorators, { kind: "accessor", name: "icon", static: false, private: false, access: { has: obj => "icon" in obj, get: obj => obj.icon, set: (obj, value) => { obj.icon = value; } }, metadata: _metadata }, _icon_initializers, _icon_extraInitializers);
29
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
30
+ _classThis = _classDescriptor.value;
31
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
32
+ }
33
+ #active_accessor_storage = __runInitializers(this, _active_initializers, 0);
34
+ get active() { return this.#active_accessor_storage; }
35
+ set active(value) { this.#active_accessor_storage = value; }
36
+ #togglers_accessor_storage = (__runInitializers(this, _active_extraInitializers), __runInitializers(this, _togglers_initializers, void 0));
37
+ get togglers() { return this.#togglers_accessor_storage; }
38
+ set togglers(value) { this.#togglers_accessor_storage = value; }
39
+ #icon_accessor_storage = (__runInitializers(this, _togglers_extraInitializers), __runInitializers(this, _icon_initializers, void 0));
40
+ get icon() { return this.#icon_accessor_storage; }
41
+ set icon(value) { this.#icon_accessor_storage = value; }
42
+ restartOnEnd = (__runInitializers(this, _icon_extraInitializers), true);
43
+ onChange(propertyKey, value) {
44
+ if (propertyKey === 'active') {
45
+ this.dispatchEvent(new CustomEvent('active', { detail: this.active }));
46
+ }
47
+ if ((propertyKey === 'active' && this.togglers) || (propertyKey === 'togglers' && this.active !== undefined)) {
48
+ this.icon = this.togglers[this.active];
49
+ }
50
+ }
51
+ async next() {
52
+ if (this.active < this.togglers.length - 1)
53
+ this.active += 1;
54
+ else if (this.restartOnEnd)
55
+ this.active = 0;
56
+ }
57
+ previous() {
58
+ if (this.active !== 0)
59
+ this.active -= 1;
60
+ }
61
+ static styles = [
62
+ css `
63
+ :host {
64
+ display: contents;
65
+ }
66
+ `
67
+ ];
68
+ render() {
69
+ return html `<custom-icon .icon=${this.icon}></custom-icon>`;
70
+ }
71
+ static {
72
+ __runInitializers(_classThis, _classExtraInitializers);
73
+ }
74
+ });
75
+ return _classThis;
76
+ })();
77
+
78
+ export { CustomToggle };
@@ -0,0 +1,143 @@
1
+ import { _ as __esDecorate, a as __runInitializers } from './tslib.es6-d3ba6528.js';
2
+ import { customElement, property, css, html, LiteElement } from '@vandeurenglenn/lite';
3
+ import '@vandeurenglenn/flex-elements/it.js';
4
+ import '@vandeurenglenn/flex-elements/row.js';
5
+
6
+ let CustomTopAppBar = (() => {
7
+ let _classDecorators = [customElement('custom-top-app-bar')];
8
+ let _classDescriptor;
9
+ let _classExtraInitializers = [];
10
+ let _classThis;
11
+ let _classSuper = LiteElement;
12
+ let _type_decorators;
13
+ let _type_initializers = [];
14
+ let _type_extraInitializers = [];
15
+ let _scrolling_decorators;
16
+ let _scrolling_initializers = [];
17
+ let _scrolling_extraInitializers = [];
18
+ (class extends _classSuper {
19
+ static { _classThis = this; }
20
+ static {
21
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
22
+ _type_decorators = [property({ type: String, reflect: true })];
23
+ _scrolling_decorators = [property({ type: Boolean, reflect: true })];
24
+ __esDecorate(this, null, _type_decorators, { kind: "accessor", name: "type", static: false, private: false, access: { has: obj => "type" in obj, get: obj => obj.type, set: (obj, value) => { obj.type = value; } }, metadata: _metadata }, _type_initializers, _type_extraInitializers);
25
+ __esDecorate(this, null, _scrolling_decorators, { kind: "accessor", name: "scrolling", static: false, private: false, access: { has: obj => "scrolling" in obj, get: obj => obj.scrolling, set: (obj, value) => { obj.scrolling = value; } }, metadata: _metadata }, _scrolling_initializers, _scrolling_extraInitializers);
26
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
27
+ _classThis = _classDescriptor.value;
28
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
29
+ }
30
+ #type_accessor_storage = __runInitializers(this, _type_initializers, 'center-aligned');
31
+ get type() { return this.#type_accessor_storage; }
32
+ set type(value) { this.#type_accessor_storage = value; }
33
+ #scrolling_accessor_storage = (__runInitializers(this, _type_extraInitializers), __runInitializers(this, _scrolling_initializers, void 0));
34
+ get scrolling() { return this.#scrolling_accessor_storage; }
35
+ set scrolling(value) { this.#scrolling_accessor_storage = value; }
36
+ static styles = [
37
+ css `
38
+ :host {
39
+ display: flex;
40
+ flex-direction: column;
41
+ width: calc(100% - 2px);
42
+ background-color: var(--md-sys-color-surface);
43
+ color: var(--md-sys-color-on-surface);
44
+ box-sizing: border-box;
45
+ }
46
+
47
+ .container {
48
+ padding: 20px 12px 24px 12px;
49
+ box-sizing: border-box;
50
+ position: relative;
51
+ height: 64px;
52
+ }
53
+
54
+ :host([type='center-aligned']) .container,
55
+ :host([type='small']) .container {
56
+ justify-content: center;
57
+ }
58
+
59
+ :host(:not([type='center-aligned'])) ::slotted([name='title']) {
60
+ padding-left: 16px;
61
+ }
62
+
63
+ :host(:not([type='large'])) ::slotted([name='title']) {
64
+ padding-bottom: 28px;
65
+ }
66
+
67
+ :host([type='medium']) .container {
68
+ height: 112px;
69
+ }
70
+ :host([type='large']) .container {
71
+ height: 152px;
72
+ }
73
+
74
+ :host([type='center-aligned']) slot[name='title']::slotted(*) {
75
+ position: absolute;
76
+ left: 50%;
77
+ top: 50%;
78
+ transform: translate(-50%, -50%);
79
+ }
80
+
81
+ :host(:not([type='center-aligned'])) slot[name='title']::slotted(*) {
82
+ padding-left: 6px;
83
+ }
84
+
85
+ :host([scrolling]) {
86
+ --md-elevation-level: 2;
87
+ padding: 0 16px;
88
+ }
89
+
90
+ flex-row {
91
+ width: 100%;
92
+ align-items: center;
93
+ }
94
+
95
+ custom-elevation {
96
+ border-radius: var(--md-sys-shape-corner-large);
97
+ }
98
+ `
99
+ ];
100
+ connectedCallback() {
101
+ document.addEventListener('custom-scroll', ({ detail }) => {
102
+ this.scrolling = detail.scrolling;
103
+ });
104
+ }
105
+ render() {
106
+ return html `
107
+ <flex-column class="container">
108
+ <custom-elevation></custom-elevation>
109
+ <flex-row>
110
+ <slot name="start"></slot>
111
+ ${this.type === 'center-aligned' || this.type === 'small'
112
+ ? html `
113
+ <custom-typography>
114
+ <slot name="title"></slot>
115
+ </custom-typography>
116
+ `
117
+ : ''}
118
+ <flex-it></flex-it>
119
+ <slot name="end"></slot>
120
+ </flex-row>
121
+ ${this.type === 'medium' || this.type === 'large'
122
+ ? html `
123
+ <flex-it></flex-it>
124
+ <custom-typography type="headline" size="small">
125
+ <slot name="title"></slot>
126
+ </custom-typography>
127
+ `
128
+ : ''}
129
+ </flex-column>
130
+ `;
131
+ }
132
+ constructor() {
133
+ super(...arguments);
134
+ __runInitializers(this, _scrolling_extraInitializers);
135
+ }
136
+ static {
137
+ __runInitializers(_classThis, _classExtraInitializers);
138
+ }
139
+ });
140
+ return _classThis;
141
+ })();
142
+
143
+ export { CustomTopAppBar };
@@ -0,0 +1,57 @@
1
+ /******************************************************************************
2
+ Copyright (c) Microsoft Corporation.
3
+
4
+ Permission to use, copy, modify, and/or distribute this software for any
5
+ purpose with or without fee is hereby granted.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
+ PERFORMANCE OF THIS SOFTWARE.
14
+ ***************************************************************************** */
15
+ /* global Reflect, Promise, SuppressedError, Symbol */
16
+
17
+
18
+ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
19
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
20
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
21
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
22
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
23
+ var _, done = false;
24
+ for (var i = decorators.length - 1; i >= 0; i--) {
25
+ var context = {};
26
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
27
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
28
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
29
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
30
+ if (kind === "accessor") {
31
+ if (result === void 0) continue;
32
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
33
+ if (_ = accept(result.get)) descriptor.get = _;
34
+ if (_ = accept(result.set)) descriptor.set = _;
35
+ if (_ = accept(result.init)) initializers.unshift(_);
36
+ }
37
+ else if (_ = accept(result)) {
38
+ if (kind === "field") initializers.unshift(_);
39
+ else descriptor[key] = _;
40
+ }
41
+ }
42
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
43
+ done = true;
44
+ }
45
+ function __runInitializers(thisArg, initializers, value) {
46
+ var useValue = arguments.length > 2;
47
+ for (var i = 0; i < initializers.length; i++) {
48
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
49
+ }
50
+ return useValue ? value : void 0;
51
+ }
52
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
53
+ var e = new Error(message);
54
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
55
+ };
56
+
57
+ export { __esDecorate as _, __runInitializers as a };
@@ -0,0 +1,18 @@
1
+ export declare type propertyTypes = String | Array<any> | Object | Boolean | Number | Uint8Array;
2
+ export declare type propertyConfig = {
3
+ observer?: Function;
4
+ type: propertyTypes;
5
+ attribute?: boolean;
6
+ reflect?: boolean;
7
+ renders?: boolean;
8
+ attributeName?: string;
9
+ value?: any;
10
+ };
11
+ export declare type attributeConfig = {
12
+ name: string;
13
+ type: propertyTypes;
14
+ };
15
+ export declare type propertiesConfig = {
16
+ [index: string]: propertyConfig;
17
+ };
18
+ export declare type ButtonType = 'elevated' | 'filled' | 'text' | 'tonal' | 'outlined';
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+ export {};