@redvars/peacock 3.3.3 → 3.5.0

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 (280) hide show
  1. package/dist/IndividualComponent-DUINtMGK.js +67 -0
  2. package/dist/IndividualComponent-DUINtMGK.js.map +1 -0
  3. package/dist/assets/images/empty-state/no-document.svg +11 -12
  4. package/dist/assets/images/empty-state/page.svg +15 -9
  5. package/dist/assets/styles.css +1 -1
  6. package/dist/assets/styles.css.map +1 -1
  7. package/dist/banner.js +202 -0
  8. package/dist/banner.js.map +1 -0
  9. package/dist/bottom-sheet.js +238 -0
  10. package/dist/bottom-sheet.js.map +1 -0
  11. package/dist/{button-ClzS8JLq.js → button-DMN1dPAg.js} +358 -218
  12. package/dist/button-DMN1dPAg.js.map +1 -0
  13. package/dist/button-group-CX9CUUXk.js +435 -0
  14. package/dist/button-group-CX9CUUXk.js.map +1 -0
  15. package/dist/button-group.js +11 -6
  16. package/dist/button-group.js.map +1 -1
  17. package/dist/button.js +10 -5
  18. package/dist/button.js.map +1 -1
  19. package/dist/card-content.js +29 -0
  20. package/dist/card-content.js.map +1 -0
  21. package/dist/card.js +428 -44
  22. package/dist/card.js.map +1 -1
  23. package/dist/{chart-bar-DbnXQgvS.js → chart-bar-cn6rrna-.js} +2 -2
  24. package/dist/{chart-bar-DbnXQgvS.js.map → chart-bar-cn6rrna-.js.map} +1 -1
  25. package/dist/chart-bar.js +5 -4
  26. package/dist/chart-bar.js.map +1 -1
  27. package/dist/chart-doughnut.js +2 -1
  28. package/dist/chart-doughnut.js.map +1 -1
  29. package/dist/chart-pie.js +2 -1
  30. package/dist/chart-pie.js.map +1 -1
  31. package/dist/chart-stacked-bar.js +5 -4
  32. package/dist/chart-stacked-bar.js.map +1 -1
  33. package/dist/{class-map-59YGWLnx.js → class-map-YU7g0o3B.js} +4 -10
  34. package/dist/class-map-YU7g0o3B.js.map +1 -0
  35. package/dist/clock.js +2 -1
  36. package/dist/clock.js.map +1 -1
  37. package/dist/code-editor.js +8 -6
  38. package/dist/code-editor.js.map +1 -1
  39. package/dist/code-highlighter.js +6 -4
  40. package/dist/code-highlighter.js.map +1 -1
  41. package/dist/custom-elements-jsdocs.json +6270 -5026
  42. package/dist/custom-elements.json +5763 -2049
  43. package/dist/directive-ZPhl09Yt.js +9 -0
  44. package/dist/directive-ZPhl09Yt.js.map +1 -0
  45. package/dist/dispatch-event-utils-CuEqjlPT.js +127 -0
  46. package/dist/dispatch-event-utils-CuEqjlPT.js.map +1 -0
  47. package/dist/fab-C5Nzxk0E.js +497 -0
  48. package/dist/fab-C5Nzxk0E.js.map +1 -0
  49. package/dist/fab.js +11 -0
  50. package/dist/fab.js.map +1 -0
  51. package/dist/index.js +24 -12
  52. package/dist/index.js.map +1 -1
  53. package/dist/{observe-theme-change-pALI5fmV.js → is-dark-mode-DicqGkCJ.js} +8 -3
  54. package/dist/is-dark-mode-DicqGkCJ.js.map +1 -0
  55. package/dist/notification.js +417 -0
  56. package/dist/notification.js.map +1 -0
  57. package/dist/number-counter.js +4 -3
  58. package/dist/number-counter.js.map +1 -1
  59. package/dist/observe-slot-change-BGJfgg2E.js +31 -0
  60. package/dist/observe-slot-change-BGJfgg2E.js.map +1 -0
  61. package/dist/peacock-loader.js +59 -10
  62. package/dist/peacock-loader.js.map +1 -1
  63. package/dist/property-1psGvXOq.js +10 -0
  64. package/dist/property-1psGvXOq.js.map +1 -0
  65. package/dist/search.js +452 -0
  66. package/dist/search.js.map +1 -0
  67. package/dist/{radio-b70_Ie9n.js → select-4pl4XBj7.js} +2439 -521
  68. package/dist/select-4pl4XBj7.js.map +1 -0
  69. package/dist/side-sheet.js +186 -0
  70. package/dist/side-sheet.js.map +1 -0
  71. package/dist/spread-B5cgadZl.js +32 -0
  72. package/dist/spread-B5cgadZl.js.map +1 -0
  73. package/dist/src/__base_element/BaseHyperlink.d.ts +20 -0
  74. package/dist/src/__utils/cache-fetch.d.ts +1 -0
  75. package/dist/src/__utils/is-dark-mode.d.ts +1 -0
  76. package/dist/src/__utils/is-in-viewport.d.ts +1 -0
  77. package/dist/src/__utils/observe-slot-change.d.ts +1 -0
  78. package/dist/src/__utils/sanitize-svg.d.ts +1 -0
  79. package/dist/src/__utils/throttle.d.ts +4 -0
  80. package/dist/src/accordion/accordion-item.d.ts +33 -9
  81. package/dist/src/accordion/accordion.d.ts +21 -5
  82. package/dist/src/banner/banner.d.ts +47 -0
  83. package/dist/src/banner/index.d.ts +1 -0
  84. package/dist/src/bottom-sheet/bottom-sheet.d.ts +42 -0
  85. package/dist/src/bottom-sheet/index.d.ts +1 -0
  86. package/dist/src/button/BaseButton.d.ts +7 -13
  87. package/dist/src/button/button/button.d.ts +4 -0
  88. package/dist/src/button/button-group/button-group.d.ts +32 -3
  89. package/dist/src/button/icon-button/icon-button.d.ts +4 -0
  90. package/dist/src/card/card-content.d.ts +15 -0
  91. package/dist/src/card/card.d.ts +37 -3
  92. package/dist/src/card/index.d.ts +1 -0
  93. package/dist/src/container/container.d.ts +1 -1
  94. package/dist/src/empty-state/empty-state.d.ts +1 -1
  95. package/dist/src/fab/fab.d.ts +111 -0
  96. package/dist/src/fab/index.d.ts +1 -0
  97. package/dist/src/focus-ring/focus-ring.d.ts +4 -1
  98. package/dist/src/index.d.ts +11 -1
  99. package/dist/src/link/link.d.ts +3 -10
  100. package/dist/src/menu/menu/menu.d.ts +4 -2
  101. package/dist/src/menu/menu-item/menu-item.d.ts +0 -1
  102. package/dist/src/menu/sub-menu/sub-menu.d.ts +1 -0
  103. package/dist/src/notification/index.d.ts +1 -0
  104. package/dist/src/notification/notification.d.ts +69 -0
  105. package/dist/src/pagination/pagination.d.ts +8 -1
  106. package/dist/src/ripple/ripple.d.ts +19 -3
  107. package/dist/src/search/index.d.ts +1 -0
  108. package/dist/src/search/search.d.ts +76 -0
  109. package/dist/src/segmented-button/index.d.ts +2 -0
  110. package/dist/src/segmented-button/segmented-button-group.d.ts +46 -0
  111. package/dist/src/segmented-button/segmented-button.d.ts +65 -0
  112. package/dist/src/select/index.d.ts +3 -0
  113. package/dist/src/select/option.d.ts +55 -0
  114. package/dist/src/select/select.d.ts +114 -0
  115. package/dist/src/side-sheet/index.d.ts +1 -0
  116. package/dist/src/side-sheet/side-sheet.d.ts +41 -0
  117. package/dist/src/slider/slider.d.ts +4 -0
  118. package/dist/src/snackbar/snackbar.d.ts +14 -1
  119. package/dist/src/tabs/tab-group.d.ts +0 -1
  120. package/dist/src/tabs/tab.d.ts +8 -2
  121. package/dist/src/tabs/tabs.d.ts +13 -1
  122. package/dist/src/toolbar/index.d.ts +1 -0
  123. package/dist/src/toolbar/toolbar.d.ts +86 -0
  124. package/dist/state-DwbEjqVk.js +10 -0
  125. package/dist/state-DwbEjqVk.js.map +1 -0
  126. package/dist/{style-map-DcB52w-l.js → style-map-DVmWOuYy.js} +3 -3
  127. package/dist/{style-map-DcB52w-l.js.map → style-map-DVmWOuYy.js.map} +1 -1
  128. package/dist/test/search.test.d.ts +1 -0
  129. package/dist/test/toolbar.test.d.ts +1 -0
  130. package/dist/throttle-C7ZAPqtu.js +24 -0
  131. package/dist/throttle-C7ZAPqtu.js.map +1 -0
  132. package/dist/toolbar.js +306 -0
  133. package/dist/toolbar.js.map +1 -0
  134. package/dist/tsconfig.tsbuildinfo +1 -1
  135. package/dist/{unsafe-html-C2r3PyzF.js → unsafe-html-BsGUjx94.js} +3 -3
  136. package/dist/{unsafe-html-C2r3PyzF.js.map → unsafe-html-BsGUjx94.js.map} +1 -1
  137. package/package.json +1 -1
  138. package/readme.md +2 -2
  139. package/scss/styles.scss +4 -0
  140. package/src/__base_element/BaseHyperlink.ts +42 -0
  141. package/src/__base_element/README.md +19 -0
  142. package/src/__utils/cache-fetch.ts +65 -0
  143. package/src/{utils → __utils}/dispatch-event-utils.ts +1 -0
  144. package/src/__utils/is-dark-mode.ts +3 -0
  145. package/src/__utils/is-in-viewport.ts +6 -0
  146. package/src/__utils/observe-slot-change.ts +38 -0
  147. package/src/__utils/sanitize-svg.ts +27 -0
  148. package/src/__utils/throttle.ts +27 -0
  149. package/src/accordion/accordion-item.scss +136 -65
  150. package/src/accordion/accordion-item.ts +117 -44
  151. package/src/accordion/accordion.scss +24 -5
  152. package/src/accordion/accordion.ts +29 -23
  153. package/src/accordion/demo/index.html +74 -35
  154. package/src/banner/banner.scss +87 -0
  155. package/src/banner/banner.ts +107 -0
  156. package/src/banner/index.ts +1 -0
  157. package/src/bottom-sheet/bottom-sheet.scss +88 -0
  158. package/src/bottom-sheet/bottom-sheet.ts +135 -0
  159. package/src/bottom-sheet/index.ts +1 -0
  160. package/src/button/BaseButton.ts +26 -30
  161. package/src/button/button/button-colors.scss +90 -19
  162. package/src/button/button/button-sizes.scss +39 -19
  163. package/src/button/button/button.scss +117 -116
  164. package/src/button/button/button.ts +29 -6
  165. package/src/button/button-group/button-group.scss +25 -22
  166. package/src/button/button-group/button-group.ts +122 -5
  167. package/src/button/icon-button/icon-button-sizes.scss +35 -15
  168. package/src/button/icon-button/icon-button.ts +25 -12
  169. package/src/card/card-colors.scss +10 -0
  170. package/src/card/card-content.ts +26 -0
  171. package/src/card/card.scss +221 -41
  172. package/src/card/card.ts +251 -8
  173. package/src/card/index.ts +1 -0
  174. package/src/chart-bar/chart-bar.ts +1 -1
  175. package/src/chart-bar/chart-stacked-bar.ts +3 -1
  176. package/src/chart-doughnut/chart-doughnut.ts +1 -1
  177. package/src/chart-pie/chart-pie.ts +1 -1
  178. package/src/checkbox/checkbox.ts +1 -1
  179. package/src/clock/clock.ts +1 -1
  180. package/src/code-editor/code-editor.ts +5 -5
  181. package/src/code-highlighter/code-highlighter.ts +2 -2
  182. package/src/container/container.ts +1 -1
  183. package/src/date-picker/date-picker.ts +5 -2
  184. package/src/divider/divider.ts +3 -1
  185. package/src/empty-state/empty-state.scss +9 -3
  186. package/src/empty-state/empty-state.ts +2 -2
  187. package/src/fab/fab-colors.scss +49 -0
  188. package/src/fab/fab-sizes.scss +47 -0
  189. package/src/fab/fab.scss +137 -0
  190. package/src/fab/fab.ts +285 -0
  191. package/src/fab/index.ts +1 -0
  192. package/src/field/field.ts +3 -1
  193. package/src/focus-ring/focus-ring.ts +37 -19
  194. package/src/icon/datasource.ts +1 -1
  195. package/src/icon/icon.ts +3 -1
  196. package/src/image/image.ts +3 -2
  197. package/src/index.ts +12 -1
  198. package/src/input/input.ts +5 -2
  199. package/src/link/link.ts +2 -15
  200. package/src/menu/menu/menu.scss +31 -3
  201. package/src/menu/menu/menu.ts +30 -6
  202. package/src/menu/menu-item/menu-item.scss +1 -0
  203. package/src/menu/menu-item/menu-item.ts +1 -9
  204. package/src/menu/sub-menu/sub-menu.ts +1 -0
  205. package/src/notification/index.ts +1 -0
  206. package/src/notification/notification.scss +201 -0
  207. package/src/notification/notification.ts +206 -0
  208. package/src/number-counter/number-counter.ts +3 -1
  209. package/src/number-field/number-field.ts +4 -2
  210. package/src/pagination/pagination.scss +33 -24
  211. package/src/pagination/pagination.ts +113 -60
  212. package/src/peacock-loader.ts +48 -0
  213. package/src/radio/radio.ts +3 -1
  214. package/src/ripple/ripple.ts +19 -3
  215. package/src/search/index.ts +1 -0
  216. package/src/search/search-colors.scss +14 -0
  217. package/src/search/search.scss +204 -0
  218. package/src/search/search.ts +240 -0
  219. package/src/segmented-button/index.ts +2 -0
  220. package/src/segmented-button/segmented-button-group.scss +21 -0
  221. package/src/segmented-button/segmented-button-group.ts +110 -0
  222. package/src/segmented-button/segmented-button.scss +115 -0
  223. package/src/segmented-button/segmented-button.ts +175 -0
  224. package/src/select/index.ts +3 -0
  225. package/src/select/option.ts +109 -0
  226. package/src/select/select.scss +125 -0
  227. package/src/select/select.ts +520 -0
  228. package/src/side-sheet/index.ts +1 -0
  229. package/src/side-sheet/side-sheet.scss +79 -0
  230. package/src/side-sheet/side-sheet.ts +100 -0
  231. package/src/slider/slider.scss +19 -1
  232. package/src/slider/slider.ts +30 -19
  233. package/src/snackbar/snackbar.scss +62 -31
  234. package/src/snackbar/snackbar.ts +92 -12
  235. package/src/switch/switch.ts +3 -1
  236. package/src/table/table.ts +3 -1
  237. package/src/tabs/demo/index.html +90 -0
  238. package/src/tabs/tab-group.ts +0 -3
  239. package/src/tabs/tab.scss +237 -25
  240. package/src/tabs/tab.ts +91 -14
  241. package/src/tabs/tabs.scss +37 -3
  242. package/src/tabs/tabs.ts +118 -2
  243. package/src/textarea/textarea.ts +4 -2
  244. package/src/time-picker/time-picker.ts +4 -2
  245. package/src/toolbar/index.ts +1 -0
  246. package/src/toolbar/toolbar-colors.scss +16 -0
  247. package/src/toolbar/toolbar.scss +165 -0
  248. package/src/toolbar/toolbar.ts +137 -0
  249. package/dist/IndividualComponent-Dt5xirYG.js +0 -73
  250. package/dist/IndividualComponent-Dt5xirYG.js.map +0 -1
  251. package/dist/button-ClzS8JLq.js.map +0 -1
  252. package/dist/button-group-BMS5WvaF.js +0 -292
  253. package/dist/button-group-BMS5WvaF.js.map +0 -1
  254. package/dist/chart-donut.js +0 -309
  255. package/dist/chart-donut.js.map +0 -1
  256. package/dist/class-map-59YGWLnx.js.map +0 -1
  257. package/dist/directive-Cuw6h7YA.js +0 -9
  258. package/dist/directive-Cuw6h7YA.js.map +0 -1
  259. package/dist/dispatch-event-utils-B4odODQf.js +0 -277
  260. package/dist/dispatch-event-utils-B4odODQf.js.map +0 -1
  261. package/dist/observe-theme-change-pALI5fmV.js.map +0 -1
  262. package/dist/radio-b70_Ie9n.js.map +0 -1
  263. package/dist/src/chart-donut/chart-donut.d.ts +0 -53
  264. package/dist/src/chart-donut/index.d.ts +0 -1
  265. package/dist/src/styleMixins.css.d.ts +0 -9
  266. package/dist/src/utils.d.ts +0 -9
  267. package/src/chart-donut/chart-donut.scss +0 -37
  268. package/src/chart-donut/chart-donut.ts +0 -287
  269. package/src/chart-donut/demo/index.html +0 -51
  270. package/src/chart-donut/index.ts +0 -1
  271. package/src/styleMixins.css.ts +0 -55
  272. package/src/utils.ts +0 -193
  273. /package/dist/src/{spread.d.ts → __directive/spread.d.ts} +0 -0
  274. /package/dist/src/{utils → __utils}/copy-to-clipboard.d.ts +0 -0
  275. /package/dist/src/{utils → __utils}/dispatch-event-utils.d.ts +0 -0
  276. /package/dist/src/{utils → __utils}/observe-theme-change.d.ts +0 -0
  277. /package/dist/test/{card.test.d.ts → banner.test.d.ts} +0 -0
  278. /package/src/{spread.ts → __directive/spread.ts} +0 -0
  279. /package/src/{utils → __utils}/copy-to-clipboard.ts +0 -0
  280. /package/src/{utils → __utils}/observe-theme-change.ts +0 -0
package/src/tabs/tabs.ts CHANGED
@@ -15,7 +15,7 @@ import { Tab } from './tab.js';
15
15
  * @example
16
16
  * ```html
17
17
  * <wc-tabs>
18
- * <wc-tab>Tab 1</wc-tab>
18
+ * <wc-tab active>Tab 1</wc-tab>
19
19
  * <wc-tab>Tab 2</wc-tab>
20
20
  * </wc-tabs>
21
21
  * ```
@@ -26,18 +26,131 @@ export class Tabs extends LitElement {
26
26
 
27
27
  static Tab = Tab;
28
28
 
29
+ @property({ reflect: true })
30
+ variant: 'primary' | 'secondary' | 'contained' | 'filled' = 'primary';
31
+
29
32
  @property({ type: Boolean }) managed = false;
30
33
 
34
+ private __mutationObserver?: MutationObserver;
35
+
36
+ private __lastActiveTab?: Tab;
37
+
31
38
  connectedCallback() {
32
39
  super.connectedCallback();
33
40
  this.addEventListener('click', this.__handleTabClick);
34
41
  }
35
42
 
43
+ firstUpdated() {
44
+ this.__mutationObserver = new MutationObserver(() => {
45
+ this.__syncIndicatorsFromActiveState();
46
+ });
47
+
48
+ this.__mutationObserver.observe(this, {
49
+ subtree: true,
50
+ childList: true,
51
+ attributes: true,
52
+ attributeFilter: ['active', 'disabled'],
53
+ });
54
+
55
+ this.__lastActiveTab = this.__getActiveTab();
56
+ }
57
+
58
+ updated(changedProperties: Map<string, unknown>) {
59
+ if (changedProperties.has('variant')) {
60
+ this.__lastActiveTab = this.__getActiveTab();
61
+ }
62
+ }
63
+
36
64
  disconnectedCallback() {
65
+ this.__mutationObserver?.disconnect();
66
+
37
67
  this.removeEventListener('click', this.__handleTabClick);
38
68
  super.disconnectedCallback();
39
69
  }
40
70
 
71
+ private __getTabs() {
72
+ return Array.from(this.querySelectorAll('wc-tab')) as Tab[];
73
+ }
74
+
75
+ private __getActiveTab() {
76
+ return this.__getTabs().find(tab => tab.active && !tab.disabled);
77
+ }
78
+
79
+ private static __getTabIndicator(tab?: Tab) {
80
+ if (!tab?.shadowRoot) return undefined;
81
+ return tab.shadowRoot.querySelector('.indicator') as HTMLElement | null;
82
+ }
83
+
84
+ private static __getTabBackground(tab?: Tab) {
85
+ if (!tab?.shadowRoot) return undefined;
86
+ return tab.shadowRoot.querySelector('.background') as HTMLElement | null;
87
+ }
88
+
89
+ private __getAnimationElements(previousTab?: Tab, nextTab?: Tab) {
90
+ if (this.variant === 'primary' || this.variant === 'secondary') {
91
+ return {
92
+ previous: Tabs.__getTabIndicator(previousTab),
93
+ next: Tabs.__getTabIndicator(nextTab),
94
+ };
95
+ }
96
+
97
+ if (this.variant === 'filled' || this.variant === 'contained') {
98
+ return {
99
+ previous: Tabs.__getTabBackground(previousTab),
100
+ next: Tabs.__getTabBackground(nextTab),
101
+ };
102
+ }
103
+
104
+ return {
105
+ previous: undefined,
106
+ next: undefined,
107
+ };
108
+ }
109
+
110
+ private __animateIndicatorTransition(previousTab?: Tab, nextTab?: Tab) {
111
+ if (!previousTab || !nextTab || previousTab === nextTab) return;
112
+
113
+ const { previous: previousAnimationElement, next: nextAnimationElement } =
114
+ this.__getAnimationElements(previousTab, nextTab);
115
+ if (!previousAnimationElement || !nextAnimationElement) return;
116
+
117
+ const previousRect = previousTab.getBoundingClientRect();
118
+ const nextRect = nextTab.getBoundingClientRect();
119
+
120
+ const incomingOffset = previousRect.left - nextRect.left;
121
+ const outgoingOffset = nextRect.left - previousRect.left;
122
+ const incomingScale = previousRect.width / nextRect.width;
123
+ const outgoingScale = nextRect.width / previousRect.width;
124
+
125
+ nextAnimationElement.style.transition = 'none';
126
+ nextAnimationElement.style.opacity = '0';
127
+ nextAnimationElement.style.transform = `translateX(${incomingOffset}px) scaleX(${incomingScale})`;
128
+
129
+ previousAnimationElement.style.transition = 'none';
130
+ previousAnimationElement.style.opacity = '1';
131
+ previousAnimationElement.style.transform = 'translateX(0) scaleX(1)';
132
+
133
+ requestAnimationFrame(() => {
134
+ nextAnimationElement.style.transition = '';
135
+ previousAnimationElement.style.transition = '';
136
+
137
+ nextAnimationElement.style.opacity = '1';
138
+ nextAnimationElement.style.transform = 'translateX(0) scaleX(1)';
139
+
140
+ previousAnimationElement.style.opacity = '0';
141
+ previousAnimationElement.style.transform = `translateX(${outgoingOffset}px) scaleX(${outgoingScale})`;
142
+ });
143
+ }
144
+
145
+ private __syncIndicatorsFromActiveState() {
146
+ const activeTab = this.__getActiveTab();
147
+ if (this.__lastActiveTab && activeTab && this.__lastActiveTab !== activeTab) {
148
+ this.__animateIndicatorTransition(this.__lastActiveTab, activeTab);
149
+ }
150
+
151
+ this.__lastActiveTab = activeTab;
152
+ }
153
+
41
154
  private __handleTabClick = (event: Event) => {
42
155
  if (this.managed) return;
43
156
 
@@ -49,7 +162,8 @@ export class Tabs extends LitElement {
49
162
 
50
163
  if (!clickedTab) return;
51
164
 
52
- const tabs = Array.from(this.querySelectorAll('wc-tab')) as Tab[];
165
+ const previousActiveTab = this.__getActiveTab();
166
+ const tabs = this.__getTabs();
53
167
  let clickedIndex = -1;
54
168
  for (let index = 0; index < tabs.length; index += 1) {
55
169
  const tab = tabs[index];
@@ -57,6 +171,8 @@ export class Tabs extends LitElement {
57
171
  if (tab === clickedTab) clickedIndex = index;
58
172
  }
59
173
  (clickedTab as Tab).active = true;
174
+ this.__animateIndicatorTransition(previousActiveTab, clickedTab);
175
+ this.__lastActiveTab = clickedTab;
60
176
 
61
177
  this.dispatchEvent(new CustomEvent('tab-click', {
62
178
  bubbles: true,
@@ -1,9 +1,11 @@
1
1
  import { html } from 'lit';
2
2
  import { property, query, state } from 'lit/decorators.js';
3
- import { redispatchEvent } from 'src/utils/dispatch-event-utils.js';
3
+
4
+ import { redispatchEvent } from '@/__utils/dispatch-event-utils.js';
5
+ import { spread } from '@/__directive/spread.js';
6
+
4
7
  import BaseInput from '../input/BaseInput.js';
5
8
  import styles from './textarea.scss';
6
- import { spread } from '../spread.js';
7
9
 
8
10
  /**
9
11
  * @label Textarea
@@ -1,9 +1,11 @@
1
1
  import { html } from 'lit';
2
2
  import { property, query, state } from 'lit/decorators.js';
3
- import { redispatchEvent } from 'src/utils/dispatch-event-utils.js';
3
+
4
+ import { redispatchEvent } from '@/__utils/dispatch-event-utils.js';
5
+ import { spread } from '@/__directive/spread.js';
6
+
4
7
  import BaseInput from '../input/BaseInput.js';
5
8
  import styles from './time-picker.scss';
6
- import { spread } from '../spread.js';
7
9
 
8
10
  /**
9
11
  * @label Time Picker
@@ -0,0 +1 @@
1
+ export { Toolbar } from './toolbar.js';
@@ -0,0 +1,16 @@
1
+ :host {
2
+ /* Docked toolbar */
3
+ --toolbar-container-color: var(--color-surface-container);
4
+ --toolbar-title-color: var(--color-on-surface);
5
+ --toolbar-icon-color: var(--color-on-surface-variant);
6
+
7
+ /* Internal aliases used by styles */
8
+ --_toolbar-container-color: var(--toolbar-container-color);
9
+ --_toolbar-title-color: var(--toolbar-title-color);
10
+ --_toolbar-icon-color: var(--toolbar-icon-color);
11
+ }
12
+
13
+ /* Floating variant uses surface-container-high for a visible pill */
14
+ :host([variant='floating']) {
15
+ --toolbar-container-color: var(--color-surface-container-high);
16
+ }
@@ -0,0 +1,165 @@
1
+ @use '../../scss/mixin';
2
+
3
+ @include mixin.base-styles;
4
+
5
+ :host {
6
+ display: block;
7
+ --toolbar-container-shape: var(--shape-corner-full);
8
+ --toolbar-docked-container-shape: var(--shape-corner-extra-large) var(--shape-corner-extra-large) var(--shape-corner-none) var(--shape-corner-none);
9
+ --toolbar-height: 5rem; /* 80dp - small/default docked */
10
+ --toolbar-padding-inline: 0.75rem;
11
+ --toolbar-gap: 0.5rem;
12
+ --toolbar-shadow: none;
13
+ }
14
+
15
+ /* ---- Shared toolbar base ---- */
16
+
17
+ .toolbar {
18
+ position: relative;
19
+ display: flex;
20
+ align-items: center;
21
+ gap: var(--toolbar-gap);
22
+ padding-inline: var(--toolbar-padding-inline);
23
+ min-height: var(--toolbar-height);
24
+ width: 100%;
25
+ box-sizing: border-box;
26
+ color: var(--_toolbar-title-color);
27
+ --icon-color: var(--_toolbar-icon-color);
28
+ box-shadow: var(--toolbar-shadow);
29
+ }
30
+
31
+ .toolbar-content {
32
+ position: relative;
33
+ z-index: 1;
34
+ display: flex;
35
+ align-items: center;
36
+ min-width: 0;
37
+ }
38
+
39
+ .background {
40
+ position: absolute;
41
+ inset: 0;
42
+ background-color: var(--_toolbar-container-color);
43
+ pointer-events: none;
44
+ z-index: 0;
45
+ }
46
+
47
+ /* ---- Docked variant ---- */
48
+
49
+ .toolbar.variant-docked {
50
+ width: 100%;
51
+ padding-inline: var(--toolbar-padding-inline);
52
+ padding-block-start: 0.5rem;
53
+ padding-block-end: calc(0.5rem + env(safe-area-inset-bottom, 0px));
54
+
55
+ .background {
56
+ border-radius: var(--toolbar-docked-container-shape);
57
+ }
58
+
59
+ .toolbar-content {
60
+ width: 100%;
61
+ justify-content: space-between;
62
+ gap: var(--toolbar-gap);
63
+ overflow-x: auto;
64
+ overflow-y: hidden;
65
+ scrollbar-width: none;
66
+
67
+ &::-webkit-scrollbar {
68
+ display: none;
69
+ }
70
+ }
71
+
72
+ ::slotted(*) {
73
+ position: relative;
74
+ z-index: 1;
75
+ flex-shrink: 0;
76
+ }
77
+
78
+ ::slotted(wc-icon-button) {
79
+ --button-container-shape: var(--shape-corner-full);
80
+ --button-container-shape-variant: round;
81
+ }
82
+
83
+ /* Size variants */
84
+ &.size-small {
85
+ --toolbar-height: 5rem;
86
+ }
87
+
88
+ &.size-medium {
89
+ --toolbar-height: 6rem;
90
+ }
91
+
92
+ &.size-large {
93
+ --toolbar-height: 7rem;
94
+ }
95
+
96
+ &.elevated {
97
+ --toolbar-shadow: var(--elevation-shadow-level-3, 0 4px 8px rgba(0, 0, 0, 0.15));
98
+ }
99
+ }
100
+
101
+ /* ---- Floating variant ---- */
102
+
103
+ .toolbar.variant-floating {
104
+ --toolbar-container-shape: var(--shape-corner-full);
105
+
106
+ border-radius: var(--toolbar-container-shape);
107
+ width: auto;
108
+ display: inline-flex;
109
+ padding: 0.75rem;
110
+ gap: 0.5rem;
111
+
112
+ .elevation {
113
+ --elevation-level: 3;
114
+ --elevation-container-shape: var(--toolbar-container-shape);
115
+ --elevation-container-shape-variant: round;
116
+ }
117
+
118
+ .background {
119
+ border-radius: var(--toolbar-container-shape);
120
+ }
121
+
122
+ .toolbar-content {
123
+ width: auto;
124
+ gap: 0.5rem;
125
+ }
126
+
127
+ ::slotted(*) {
128
+ position: relative;
129
+ z-index: 1;
130
+ }
131
+
132
+ ::slotted(wc-icon-button) {
133
+ --button-container-shape: var(--shape-corner-full);
134
+ --button-container-shape-variant: round;
135
+ }
136
+
137
+ &.orientation-horizontal {
138
+ min-height: auto;
139
+ padding-block: 0.5rem;
140
+ padding-inline: 0.75rem;
141
+
142
+ .toolbar-content {
143
+ flex-direction: row;
144
+ align-items: center;
145
+ }
146
+ }
147
+
148
+ &.orientation-vertical {
149
+ min-height: auto;
150
+ width: auto;
151
+ padding-block: 0.75rem;
152
+ padding-inline: 0.5rem;
153
+
154
+ .toolbar-content {
155
+ flex-direction: column;
156
+ align-items: center;
157
+ }
158
+ }
159
+
160
+ &.elevated {
161
+ .elevation {
162
+ --elevation-level: 4;
163
+ }
164
+ }
165
+ }
@@ -0,0 +1,137 @@
1
+ import { LitElement, html } from 'lit';
2
+ import { property } from 'lit/decorators.js';
3
+ import { classMap } from 'lit/directives/class-map.js';
4
+ import IndividualComponent from '@/IndividualComponent.js';
5
+ import styles from './toolbar.scss';
6
+ import colorStyles from './toolbar-colors.scss';
7
+
8
+ /**
9
+ * @label Toolbar
10
+ * @tag wc-toolbar
11
+ * @rawTag toolbar
12
+ *
13
+ * @summary A Material 3 toolbar / app bar for navigation and actions.
14
+ * @overview
15
+ * <p>The toolbar component implements the Material 3 app bar pattern. It supports a
16
+ * docked (attached) variant for bottom-panel navigation and a floating (detached pill-shaped)
17
+ * variant. The floating variant supports both horizontal and vertical orientations.</p>
18
+ *
19
+ * <p>Render toolbar actions directly as children of the component. The docked variant is
20
+ * optimized for a horizontal action row, while the floating variant supports both horizontal
21
+ * and vertical layouts.</p>
22
+ *
23
+ * @cssprop --toolbar-container-color - Background color of the toolbar.
24
+ * @cssprop --toolbar-container-shape - Border radius of the toolbar. Relevant for the floating variant.
25
+ * @cssprop --toolbar-height - Height of the toolbar (docked horizontal / floating horizontal).
26
+ * @cssprop --toolbar-padding-inline - Inline padding of the toolbar.
27
+ * @cssprop --toolbar-gap - Gap between toolbar sections.
28
+ * @cssprop --toolbar-icon-color - Color of icon slots.
29
+ * @cssprop --toolbar-title-color - Color of the title (default slot) text.
30
+ * @cssprop --toolbar-shadow - Box-shadow of the toolbar.
31
+ *
32
+ * @example
33
+ * ```html
34
+ * <!-- Docked toolbar -->
35
+ * <wc-toolbar>
36
+ * <wc-icon-button variant="text" name="home"></wc-icon-button>
37
+ * <wc-icon-button variant="tonal" name="search"></wc-icon-button>
38
+ * <wc-icon-button variant="text" name="favorite"></wc-icon-button>
39
+ * <wc-icon-button variant="text" name="account_circle"></wc-icon-button>
40
+ * </wc-toolbar>
41
+ * ```
42
+ *
43
+ * @example
44
+ * ```html
45
+ * <!-- Floating horizontal toolbar -->
46
+ * <wc-toolbar variant="floating" orientation="horizontal">
47
+ * <wc-icon-button variant="tonal" name="home"></wc-icon-button>
48
+ * <wc-icon-button variant="text" name="search"></wc-icon-button>
49
+ * <wc-icon-button variant="text" name="favorite"></wc-icon-button>
50
+ * </wc-toolbar>
51
+ * ```
52
+ *
53
+ * @example
54
+ * ```html
55
+ * <!-- Floating vertical toolbar -->
56
+ * <wc-toolbar variant="floating" orientation="vertical">
57
+ * <wc-icon-button variant="tonal" name="home"></wc-icon-button>
58
+ * <wc-icon-button variant="text" name="search"></wc-icon-button>
59
+ * <wc-icon-button variant="text" name="favorite"></wc-icon-button>
60
+ * </wc-toolbar>
61
+ * ```
62
+ * @tags display navigation
63
+ */
64
+ @IndividualComponent
65
+ export class Toolbar extends LitElement {
66
+ static styles = [styles, colorStyles];
67
+
68
+ /**
69
+ * Visual and layout variant of the toolbar.
70
+ * - `"docked"`: A full-width bar attached to the edge of the screen (default).
71
+ * - `"floating"`: A detached pill-shaped toolbar that floats over content.
72
+ */
73
+ @property({ type: String, reflect: true })
74
+ variant: 'docked' | 'floating' = 'docked';
75
+
76
+ /**
77
+ * Orientation of the toolbar content.
78
+ * - `"horizontal"`: Items are laid out left to right (default).
79
+ * - `"vertical"`: Items are stacked top to bottom. Primarily useful for the floating variant.
80
+ */
81
+ @property({ type: String, reflect: true })
82
+ orientation: 'horizontal' | 'vertical' = 'horizontal';
83
+
84
+ /**
85
+ * Size of the docked toolbar.
86
+ * - `"small"`: 80dp height (default).
87
+ * - `"medium"`: 96dp height.
88
+ * - `"large"`: 112dp height.
89
+ */
90
+ @property({ type: String, reflect: true })
91
+ size: 'small' | 'medium' | 'large' = 'small';
92
+
93
+ /**
94
+ * Whether the toolbar is visually elevated (adds a shadow).
95
+ */
96
+ @property({ type: Boolean, reflect: true })
97
+ elevated: boolean = false;
98
+
99
+ override render() {
100
+ const cssClasses = {
101
+ toolbar: true,
102
+ [`variant-${this.variant}`]: true,
103
+ [`orientation-${this.orientation}`]: true,
104
+ [`size-${this.size}`]: true,
105
+ elevated: this.elevated,
106
+ };
107
+
108
+ if (this.variant === 'floating') {
109
+ return Toolbar.__renderFloating(cssClasses);
110
+ }
111
+
112
+ return Toolbar.__renderDocked(cssClasses);
113
+ }
114
+
115
+ private static __renderDocked(cssClasses: Record<string, boolean>) {
116
+ return html`
117
+ <div class=${classMap(cssClasses)} role="toolbar">
118
+ <div class="background"></div>
119
+ <div class="toolbar-content">
120
+ <slot></slot>
121
+ </div>
122
+ </div>
123
+ `;
124
+ }
125
+
126
+ private static __renderFloating(cssClasses: Record<string, boolean>) {
127
+ return html`
128
+ <div class=${classMap(cssClasses)} role="toolbar">
129
+ <wc-elevation class="elevation"></wc-elevation>
130
+ <div class="background"></div>
131
+ <div class="toolbar-content">
132
+ <slot></slot>
133
+ </div>
134
+ </div>
135
+ `;
136
+ }
137
+ }
@@ -1,73 +0,0 @@
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, Iterator */
16
-
17
-
18
- function __decorate(decorators, target, key, desc) {
19
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
22
- return c > 3 && r && Object.defineProperty(target, key, r), r;
23
- }
24
-
25
- function __classPrivateFieldGet(receiver, state, kind, f) {
26
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
27
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
28
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
29
- }
30
-
31
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
32
- var e = new Error(message);
33
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
34
- };
35
-
36
- /**
37
- * @license
38
- * Copyright 2019 Google LLC
39
- * SPDX-License-Identifier: BSD-3-Clause
40
- */
41
- const t$1=globalThis,e$2=t$1.ShadowRoot&&(void 0===t$1.ShadyCSS||t$1.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$2=Symbol(),o$4=new WeakMap;let n$3 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$2)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$2&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$4.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$4.set(s,t));}return t}toString(){return this.cssText}};const r$3=t=>new n$3("string"==typeof t?t:t+"",void 0,s$2),i$3=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,s,o)=>e+(t=>{if(true===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1],t[0]);return new n$3(o,t,s$2)},S$1=(s,o)=>{if(e$2)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement("style"),n=t$1.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2=e$2?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$3(e)})(t):t;
42
-
43
- /**
44
- * @license
45
- * Copyright 2017 Google LLC
46
- * SPDX-License-Identifier: BSD-3-Clause
47
- */const{is:i$2,defineProperty:e$1,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$2,getOwnPropertySymbols:o$3,getPrototypeOf:n$2}=Object,a$1=globalThis,c$1=a$1.trustedTypes,l$1=c$1?c$1.emptyScript:"",p$1=a$1.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$1={toAttribute(t,s){switch(s){case Boolean:t=t?l$1:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$2(t,s),b$1={attribute:true,type:String,converter:u$1,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$1.litPropertyMetadata??=new WeakMap;let y$1 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b$1){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$1(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b$1}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$2(t),...o$3(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach(t=>t.hostConnected?.());}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.());}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$1).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$1;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null;}}requestUpdate(t,s,i,e=false,h){if(void 0!==t){const r=this.constructor;if(false===e&&(h=this[t]),i??=r.getPropertyOptions(t),!((i.hasChanged??f$1)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM();}updated(t){}firstUpdated(t){}};y$1.elementStyles=[],y$1.shadowRootOptions={mode:"open"},y$1[d$1("elementProperties")]=new Map,y$1[d$1("finalized")]=new Map,p$1?.({ReactiveElement:y$1}),(a$1.reactiveElementVersions??=[]).push("2.1.2");
48
-
49
- /**
50
- * @license
51
- * Copyright 2017 Google LLC
52
- * SPDX-License-Identifier: BSD-3-Clause
53
- */
54
- const t=globalThis,i$1=t=>t,s$1=t.trustedTypes,e=s$1?s$1.createPolicy("lit-html",{createHTML:t=>t}):void 0,h="$lit$",o$2=`lit$${Math.random().toFixed(9).slice(2)}$`,n$1="?"+o$2,r$1=`<${n$1}>`,l=document,c=()=>l.createComment(""),a=t=>null===t||"object"!=typeof t&&"function"!=typeof t,u=Array.isArray,d=t=>u(t)||"function"==typeof t?.[Symbol.iterator],f="[ \t\n\f\r]",v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g=/'/g,$=/"/g,y=/^(?:script|style|textarea|title)$/i,x=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b=x(1),w=x(2),E=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),C=new WeakMap,P=l.createTreeWalker(l,129);function V(t,i){if(!u(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==e?e.createHTML(i):i}const N=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?"<svg>":3===i?"<math>":"",c=v;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===v?"!--"===u[1]?c=_:void 0!==u[1]?c=m:void 0!==u[2]?(y.test(u[2])&&(n=RegExp("</"+u[2],"g")),c=p):void 0!==u[3]&&(c=p):c===p?">"===u[0]?(c=n??v,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?p:'"'===u[3]?$:g):c===$||c===g?c=p:c===_||c===m?c=v:(c=p,n=void 0);const x=c===p&&t[i+1].startsWith("/>")?" ":"";l+=c===v?s+r$1:d>=0?(e.push(a),s.slice(0,d)+h+s.slice(d)+o$2+x):s+o$2+(-2===d?i:x);}return [V(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),e]};class S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N(t,i);if(this.el=S.createElement(f,e),P.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=P.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(h)){const i=v[a++],s=r.getAttribute(t).split(o$2),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:"."===e[1]?I:"?"===e[1]?L:"@"===e[1]?z:H}),r.removeAttribute(t);}else t.startsWith(o$2)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(y.test(r.tagName)){const t=r.textContent.split(o$2),i=t.length-1;if(i>0){r.textContent=s$1?s$1.emptyScript:"";for(let s=0;s<i;s++)r.append(t[s],c()),P.nextNode(),d.push({type:2,index:++l});r.append(t[i],c());}}}else if(8===r.nodeType)if(r.data===n$1)d.push({type:2,index:l});else {let t=-1;for(;-1!==(t=r.data.indexOf(o$2,t+1));)d.push({type:7,index:l}),t+=o$2.length-1;}l++;}}static createElement(t,i){const s=l.createElement("template");return s.innerHTML=t,s}}function M(t,i,s=t,e){if(i===E)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=a(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=M(t,h._$AS(t,i.values),h,e)),i}class R{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??l).importNode(i,true);P.currentNode=e;let h=P.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z(h,this,t)),this._$AV.push(i),r=s[++n];}o!==r?.index&&(h=P.nextNode(),o++);}return P.currentNode=l,e}p(t){let i=0;for(const s of this._$AV) void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}}class k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M(this,t,i),a(t)?t===A||null==t||""===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==E&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):d(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==A&&a(this._$AH)?this._$AA.nextSibling.data=t:this.T(l.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=S.createElement(V(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new R(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new S(t)),i}k(t){u(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new k(this.O(c()),this.O(c()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(false,true,s);t!==this._$AB;){const s=i$1(t).nextSibling;i$1(t).remove(),t=s;}}setConnected(t){ void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(void 0===h)t=M(this,t,i,0),o=!a(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M(this,e[s+n],i,n),r===E&&(r=this._$AH[n]),o||=!a(r)||r!==this._$AH[n],r===A?t=A:t!==A&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}}class I extends H{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===A?void 0:t;}}class L extends H{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A);}}class z extends H{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=M(this,t,i,0)??A)===E)return;const s=this._$AH,e=t===A&&s!==A||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A&&(s===A||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}}class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t);}}const B=t.litHtmlPolyfillSupport;B?.(S,k),(t.litHtmlVersions??=[]).push("3.3.2");const D=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new k(i.insertBefore(c(),t),t,void 0,s??{});}return h._$AI(t),h};
55
-
56
- /**
57
- * @license
58
- * Copyright 2017 Google LLC
59
- * SPDX-License-Identifier: BSD-3-Clause
60
- */const s=globalThis;class i extends y$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=D(r,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return E}}i._$litElement$=true,i["finalized"]=true,s.litElementHydrateSupport?.({LitElement:i});const o$1=s.litElementPolyfillSupport;o$1?.({LitElement:i});(s.litElementVersions??=[]).push("4.2.2");
61
-
62
- /**
63
- * @license
64
- * Copyright 2017 Google LLC
65
- * SPDX-License-Identifier: BSD-3-Clause
66
- */const o={attribute:true,type:String,converter:u$1,reflect:false,hasChanged:f$1},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),"setter"===n&&((t=Object.create(t)).wrapped=true),s.set(r.name,t),"accessor"===n){const{name:o}=r;return {set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t,true,r);},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if("setter"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t,true,r);}}throw Error("Unsupported decorator location: "+n)};function n(t){return (e,o)=>"object"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}
67
-
68
- // Class decorator
69
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
70
- function IndividualComponent(constructor) { }
71
-
72
- export { A, E, IndividualComponent as I, __decorate as _, i$3 as a, b, __classPrivateFieldGet as c, i, n, w };
73
- //# sourceMappingURL=IndividualComponent-Dt5xirYG.js.map