@swiftwc/ui 0.0.0-dev.6 → 0.0.0-dev.8

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 (263) hide show
  1. package/README.md +15 -0
  2. package/generated/client/index.d.ts +13 -3
  3. package/generated/client/index.js +228 -158
  4. package/generated/components/bordered-button.d.ts +7 -0
  5. package/generated/components/bordered-button.js +20 -0
  6. package/generated/components/bordered-prominent-button.d.ts +7 -0
  7. package/generated/components/bordered-prominent-button.js +20 -0
  8. package/generated/components/borderless-button.d.ts +4 -4
  9. package/generated/components/borderless-button.js +26 -16
  10. package/generated/components/confirmation-dialog.d.ts +9 -0
  11. package/generated/components/confirmation-dialog.js +102 -0
  12. package/generated/components/date-picker.d.ts +46 -0
  13. package/generated/components/date-picker.js +430 -0
  14. package/generated/components/disclosure-group.d.ts +4 -7
  15. package/generated/components/disclosure-group.js +41 -66
  16. package/generated/components/form-view.d.ts +6 -0
  17. package/generated/components/form-view.js +58 -0
  18. package/generated/components/glass-button.d.ts +6 -0
  19. package/generated/components/glass-button.js +17 -0
  20. package/generated/components/glass-prominent-button.d.ts +6 -0
  21. package/generated/components/glass-prominent-button.js +17 -0
  22. package/generated/components/index.d.ts +34 -10
  23. package/generated/components/index.js +33 -14
  24. package/generated/components/label-view.d.ts +9 -0
  25. package/generated/components/label-view.js +83 -0
  26. package/generated/components/list-view.d.ts +5 -0
  27. package/generated/components/list-view.js +29 -0
  28. package/generated/components/menu-view.d.ts +9 -0
  29. package/generated/components/menu-view.js +133 -0
  30. package/generated/components/navigation-large-title.d.ts +6 -0
  31. package/generated/components/navigation-large-title.js +177 -0
  32. package/generated/components/navigation-split-view.d.ts +4 -2
  33. package/generated/components/navigation-split-view.js +11 -2
  34. package/generated/components/navigation-stack.d.ts +3 -2
  35. package/generated/components/navigation-stack.js +15 -58
  36. package/generated/components/navigation-title.d.ts +8 -0
  37. package/generated/components/navigation-title.js +66 -0
  38. package/generated/components/picker-view.d.ts +27 -0
  39. package/generated/components/picker-view.js +442 -0
  40. package/generated/components/plain-button.d.ts +7 -0
  41. package/generated/components/plain-button.js +20 -0
  42. package/generated/components/screen-view.d.ts +1 -1
  43. package/generated/components/screen-view.js +1 -1
  44. package/generated/components/scroll-view.d.ts +4 -2
  45. package/generated/components/scroll-view.js +169 -62
  46. package/generated/components/section-view.d.ts +9 -0
  47. package/generated/components/section-view.js +81 -0
  48. package/generated/components/sheet-view.d.ts +4 -4
  49. package/generated/components/sheet-view.js +59 -16
  50. package/generated/components/sidebar-toggle.d.ts +1 -1
  51. package/generated/components/sidebar-toggle.js +89 -63
  52. package/generated/components/sidebar-view.d.ts +2 -4
  53. package/generated/components/sidebar-view.js +20 -17
  54. package/generated/components/sticky-container.d.ts +6 -0
  55. package/generated/components/sticky-container.js +22 -0
  56. package/generated/components/tab-bar.d.ts +2 -4
  57. package/generated/components/tab-bar.js +24 -17
  58. package/generated/components/tab-item.d.ts +4 -3
  59. package/generated/components/tab-item.js +114 -29
  60. package/generated/components/tab-view.d.ts +17 -2
  61. package/generated/components/tab-view.js +244 -17
  62. package/generated/components/table-view.d.ts +7 -0
  63. package/generated/components/table-view.js +175 -0
  64. package/generated/components/text-field.d.ts +29 -0
  65. package/generated/components/text-field.js +489 -0
  66. package/generated/components/tool-bar-item-group.d.ts +5 -0
  67. package/generated/components/tool-bar-item-group.js +11 -0
  68. package/generated/components/tool-bar-item.d.ts +5 -0
  69. package/generated/components/tool-bar-item.js +19 -0
  70. package/generated/components/tool-bar.d.ts +7 -0
  71. package/generated/components/tool-bar.js +77 -0
  72. package/generated/components/v-keyboard.d.ts +2 -0
  73. package/generated/components/v-keyboard.js +64 -68
  74. package/generated/components/v-stack.d.ts +5 -0
  75. package/generated/components/v-stack.js +11 -0
  76. package/generated/confirmation-dialog/index.d.ts +1 -0
  77. package/generated/confirmation-dialog/index.js +1 -0
  78. package/generated/css/index.css +7463 -0
  79. package/generated/events/confirmation-dialog.d.ts +9 -0
  80. package/generated/events/date-picker.d.ts +8 -0
  81. package/generated/events/date-picker.js +1 -0
  82. package/generated/events/index.d.ts +7 -0
  83. package/generated/events/index.js +7 -0
  84. package/generated/events/lifecycle-observer.d.ts +10 -0
  85. package/generated/events/lifecycle-observer.js +1 -0
  86. package/generated/events/picker-view.d.ts +8 -0
  87. package/generated/events/picker-view.js +1 -0
  88. package/generated/events/scroll-view.d.ts +10 -0
  89. package/generated/events/scroll-view.js +1 -0
  90. package/generated/events/tab-view.d.ts +24 -0
  91. package/generated/events/tab-view.js +1 -0
  92. package/generated/events/text-field.d.ts +8 -0
  93. package/generated/events/text-field.js +1 -0
  94. package/generated/i18n/index.d.ts +24 -0
  95. package/generated/i18n/index.js +139 -0
  96. package/generated/internal/class/cleanup-registry.d.ts +5 -0
  97. package/generated/internal/class/cleanup-registry.js +38 -0
  98. package/generated/internal/class/css-style-observer.d.ts +8 -0
  99. package/generated/internal/class/css-style-observer.js +25 -0
  100. package/generated/internal/class/form-associated-base.d.ts +20 -0
  101. package/generated/internal/class/form-associated-base.js +93 -0
  102. package/generated/internal/class/mutation-observer-singleton.d.ts +10 -0
  103. package/generated/internal/class/mutation-observer-singleton.js +46 -0
  104. package/generated/internal/class/navigation-path.d.ts +15 -0
  105. package/generated/internal/class/navigation-path.js +84 -0
  106. package/generated/internal/class/navigation-view.d.ts +8 -0
  107. package/generated/internal/class/navigation-view.js +77 -0
  108. package/generated/internal/class/resize-observer-singleton.d.ts +7 -0
  109. package/generated/internal/class/resize-observer-singleton.js +22 -0
  110. package/generated/internal/decorators/custom-element.d.ts +5 -0
  111. package/generated/internal/decorators/custom-element.js +4 -0
  112. package/generated/internal/privateNamespace.d.ts +4 -0
  113. package/generated/internal/privateNamespace.js +1 -0
  114. package/generated/internal/utils/add.d.ts +1 -0
  115. package/generated/internal/utils/add.js +7 -0
  116. package/generated/internal/utils/cash/ancestors.d.ts +1 -0
  117. package/generated/internal/utils/cash/ancestors.js +27 -0
  118. package/generated/internal/utils/cash/index.d.ts +22 -0
  119. package/generated/internal/utils/cash/index.js +23 -0
  120. package/generated/internal/utils/cash/next-all.d.ts +1 -0
  121. package/generated/internal/utils/cash/next-all.js +10 -0
  122. package/generated/internal/utils/cash/next.d.ts +1 -0
  123. package/generated/internal/utils/cash/next.js +9 -0
  124. package/generated/internal/utils/cash/prev-all.d.ts +1 -0
  125. package/generated/internal/utils/cash/prev-all.js +10 -0
  126. package/generated/internal/utils/cash/prev.d.ts +1 -0
  127. package/generated/internal/utils/cash/prev.js +9 -0
  128. package/generated/internal/utils/cash/prop.d.ts +18 -0
  129. package/generated/internal/utils/cash/prop.js +30 -0
  130. package/generated/internal/utils/cash/siblings.d.ts +1 -0
  131. package/generated/internal/utils/cash/siblings.js +10 -0
  132. package/generated/internal/utils/clamp.d.ts +1 -0
  133. package/generated/internal/utils/clamp.js +4 -0
  134. package/generated/internal/utils/compare-big-decimals.d.ts +1 -0
  135. package/generated/internal/utils/compare-big-decimals.js +90 -0
  136. package/generated/internal/utils/debounce.d.ts +1 -0
  137. package/generated/internal/utils/debounce.js +13 -0
  138. package/generated/internal/utils/frame.d.ts +1 -0
  139. package/generated/internal/utils/frame.js +6 -0
  140. package/generated/internal/utils/index.d.ts +16 -1
  141. package/generated/internal/utils/index.js +17 -1
  142. package/generated/internal/utils/kebab-case.d.ts +1 -1
  143. package/generated/internal/utils/list-active.d.ts +7 -0
  144. package/generated/internal/utils/list-active.js +28 -0
  145. package/generated/internal/utils/microtask.d.ts +1 -0
  146. package/generated/internal/utils/microtask.js +3 -0
  147. package/generated/internal/utils/onoff.d.ts +45 -0
  148. package/generated/internal/utils/onoff.js +31 -0
  149. package/generated/internal/utils/set.d.ts +1 -0
  150. package/generated/internal/utils/set.js +7 -0
  151. package/generated/internal/utils/sleep.d.ts +1 -0
  152. package/generated/internal/utils/sleep.js +3 -0
  153. package/generated/internal/utils/slow-hide-show.d.ts +1 -0
  154. package/generated/internal/utils/slow-hide-show.js +16 -0
  155. package/generated/internal/utils/timeout.d.ts +5 -0
  156. package/generated/internal/utils/timeout.js +16 -0
  157. package/generated/internal/utils/touch-glass.d.ts +7 -0
  158. package/generated/internal/utils/touch-glass.js +19 -0
  159. package/generated/lifecycle-observer/index.d.ts +1 -0
  160. package/generated/lifecycle-observer/index.js +1 -0
  161. package/generated/namespace-browser/base.d.ts +36 -0
  162. package/generated/namespace-browser/base.js +92 -0
  163. package/generated/namespace-browser/index.d.ts +7 -0
  164. package/generated/namespace-browser/index.js +1 -0
  165. package/generated/snapshot/index.d.ts +2 -11
  166. package/generated/snapshot/index.js +31 -144
  167. package/package.json +19 -8
  168. package/scss/_components.scss +52 -16
  169. package/scss/_final.scss +1 -0
  170. package/scss/_mixins.scss +2 -171
  171. package/scss/_placeholders.scss +3 -0
  172. package/scss/_transitions.scss +16 -0
  173. package/scss/_utils.scss +9 -0
  174. package/scss/_vars.scss +137 -23
  175. package/scss/base/_layout.scss +31 -15
  176. package/scss/base/_reboot.scss +118 -15
  177. package/scss/base/_root.scss +355 -25
  178. package/scss/colors/_index.scss +624 -70
  179. package/scss/components/_body-view.scss +12 -3
  180. package/scss/components/_bordered-button.scss +22 -0
  181. package/scss/components/_bordered-prominent-button.scss +19 -0
  182. package/scss/components/_borderless-button.scss +11 -6
  183. package/scss/components/_confirmation-dialog.scss +110 -0
  184. package/scss/components/_date-picker.scss +30 -0
  185. package/scss/components/_detail-placeholder.scss +155 -0
  186. package/scss/components/_disclosure-group.scss +100 -52
  187. package/scss/components/_form-view.scss +195 -0
  188. package/scss/components/_full-screen.scss +7 -5
  189. package/scss/components/_glass-button.scss +24 -0
  190. package/scss/components/_glass-prominent-button.scss +24 -0
  191. package/scss/components/_h-divider.scss +13 -0
  192. package/scss/components/_h-stack.scss +39 -0
  193. package/scss/components/_index.scss +224 -7
  194. package/scss/components/_label-view.scss +386 -0
  195. package/scss/components/_labeled-content.scss +9 -0
  196. package/scss/components/_list-view.scss +229 -0
  197. package/scss/components/_menu-view.scss +188 -0
  198. package/scss/components/_navigation-large-title.scss +27 -0
  199. package/scss/components/_navigation-split-view.scss +329 -269
  200. package/scss/components/_navigation-stack.scss +6 -6
  201. package/scss/components/_navigation-title.scss +10 -0
  202. package/scss/components/_picker-view.scss +122 -0
  203. package/scss/components/_plain-button.scss +11 -0
  204. package/scss/components/_scroll-view-proxy.scss +79 -0
  205. package/scss/components/_scroll-view-toolbars.scss +126 -0
  206. package/scss/components/_scroll-view.scss +110 -66
  207. package/scss/components/_section-view.scss +119 -0
  208. package/scss/components/_sheet-view.scss +68 -35
  209. package/scss/components/_sidebar-toggle.scss +90 -27
  210. package/scss/components/_sidebar-view.scss +30 -40
  211. package/scss/components/_sticky-container.scss +42 -0
  212. package/scss/components/_tab-bar.scss +201 -84
  213. package/scss/components/_tab-item.scss +25 -0
  214. package/scss/components/_tab-view.scss +268 -126
  215. package/scss/components/_table-column.scss +52 -0
  216. package/scss/components/_table-row.scss +172 -0
  217. package/scss/components/_table-view.scss +223 -0
  218. package/scss/components/_text-field.scss +37 -0
  219. package/scss/components/_tool-bar-item-group.scss +30 -19
  220. package/scss/components/_tool-bar-item.scss +128 -70
  221. package/scss/components/_tool-bar.scss +107 -64
  222. package/scss/components/_v-divider.scss +13 -0
  223. package/scss/components/_v-flex-stack.scss +29 -0
  224. package/scss/components/_v-keyboard.scss +6 -4
  225. package/scss/components/_v-stack.scss +8 -9
  226. package/scss/final/_touch-glass.scss +67 -0
  227. package/scss/index.scss +6 -2
  228. package/scss/mixins/_dialog.scss +88 -0
  229. package/scss/mixins/_index.scss +405 -0
  230. package/scss/placeholders/_buttons.scss +83 -0
  231. package/scss/placeholders/_lists.scss +589 -0
  232. package/scss/transitions/_bwd.navbar.scss +3 -13
  233. package/scss/transitions/_bwd.scss +4 -20
  234. package/scss/transitions/_confirmation-dialog.scss +19 -0
  235. package/scss/transitions/_dialog.scss +7 -11
  236. package/scss/transitions/_disclosure-group.scss +35 -0
  237. package/scss/transitions/_fwd.navbar.scss +4 -9
  238. package/scss/transitions/_fwd.scss +4 -34
  239. package/scss/transitions/_glass-button.scss +12 -0
  240. package/scss/transitions/_glass-prominent-button.scss +12 -0
  241. package/scss/transitions/_index.scss +35 -143
  242. package/scss/transitions/_menu-view.scss +26 -0
  243. package/scss/transitions/_navigation-split-view.scss +23 -0
  244. package/scss/transitions/_sidebar-view.scss +36 -0
  245. package/scss/transitions/_tab-bar.scss +19 -0
  246. package/scss/utils/_frame.scss +84 -0
  247. package/scss/utils/_index.scss +68 -0
  248. package/scss/utils/_scroll-view.scss +14 -0
  249. package/scss/utils/_spacing.scss +25 -0
  250. package/scss/utils/_stacks.scss +242 -0
  251. package/web-components.html-data/en.json +330 -0
  252. package/generated/components/bottom-bar.d.ts +0 -10
  253. package/generated/components/bottom-bar.js +0 -73
  254. package/generated/components/navigation-bar.d.ts +0 -10
  255. package/generated/components/navigation-bar.js +0 -80
  256. package/generated/internal/class.d.ts +0 -18
  257. package/generated/internal/class.js +0 -18
  258. package/generated/namespace/index.d.ts +0 -6
  259. package/generated/styles.css +0 -1305
  260. package/scss/_dev.scss +0 -68
  261. package/scss/components/_tab-bar-stack.scss +0 -101
  262. package/scss/components/_toolbars.scss +0 -100
  263. /package/generated/{namespace/index.js → events/confirmation-dialog.js} +0 -0
package/README.md ADDED
@@ -0,0 +1,15 @@
1
+ # @swiftwc/ui
2
+
3
+ [README](https://github.com/swiftwc/ui/blob/main/README.md)
4
+
5
+ ## Documentation
6
+
7
+ Visit [swiftwc.github.io/ui/](https://swiftwc.github.io/ui/) to view the documentation.
8
+
9
+ ## Contributing
10
+
11
+ Please read the [contributing guide](https://github.com/swiftwc/ui/blob/main/CONTRIBUTING.md).
12
+
13
+ ## License
14
+
15
+ Licensed under the [MIT license](https://github.com/swiftwc/ui/blob/main/LICENSE.md).
@@ -1,6 +1,16 @@
1
+ import { ConfirmationDialog } from '../confirmation-dialog';
2
+ import { I18n } from '../i18n';
3
+ import { NavigationPath } from '../internal/class/navigation-path';
4
+ import { LifecycleObserver } from '../lifecycle-observer';
5
+ import { type WebComponentCtor } from '../namespace-browser';
1
6
  import { Snapshot } from '../snapshot';
2
- import { type WebComponentCtor } from '../namespace';
3
7
  export declare const polyfills: Map<string, WebComponentCtor>;
4
8
  type TransitionType = 'forwards' | 'backwards' | 'reload';
5
- export declare const startViewTransition: (event: Event, type?: TransitionType, updateCallback?: () => Promise<void>) => Promise<void>;
6
- export { Snapshot };
9
+ type UpdateCallback = () => void | Promise<void>;
10
+ type NavigateOptions = {
11
+ updateCallback?: UpdateCallback;
12
+ tos?: () => NavigationPath[];
13
+ };
14
+ export declare const startViewTransition: (target: HTMLElement, type?: TransitionType, updateCallbackOrOptions?: UpdateCallback | NavigateOptions) => Promise<void>;
15
+ export declare const confirmationDialog: (trigger: HTMLElement, title: string, entries: Array<[string, any]>, controller?: AbortController) => Promise<unknown>;
16
+ export { ConfirmationDialog, I18n, LifecycleObserver, NavigationPath, Snapshot };
@@ -1,70 +1,92 @@
1
1
  import * as Components from '../components';
2
- import { kebabCase } from '../internal/utils';
2
+ import { ConfirmationDialog } from '../confirmation-dialog';
3
+ import { I18n } from '../i18n';
4
+ import { NavigationPath } from '../internal/class/navigation-path';
5
+ import { $, kebabCase, onoff } from '../internal/utils';
6
+ import { LifecycleObserver } from '../lifecycle-observer';
3
7
  import { Snapshot } from '../snapshot';
4
8
  export const polyfills = new Map();
5
- for (const [k, v] of Object.entries(Components)) {
9
+ for (const [k, Ctor] of Object.entries(Components)) {
6
10
  const is = kebabCase(k);
7
- if ('polyfillExtends' in v &&
8
- 'string' === typeof v.polyfillExtends) {
9
- customElements.define(is, v, { extends: v.polyfillExtends });
10
- if (!(document.createElement(v.polyfillExtends, { is }) instanceof v))
11
- polyfills.set(is, v);
11
+ if ('polyfillExtends' in Ctor && 'string' === typeof Ctor.polyfillExtends) {
12
+ if (customElements.get(is))
13
+ continue;
14
+ customElements.define(is, Ctor, { extends: Ctor.polyfillExtends });
15
+ if (!(document.createElement(Ctor.polyfillExtends, { is }) instanceof Ctor))
16
+ polyfills.set(is, Ctor);
12
17
  continue;
13
18
  }
14
- customElements.define(is, v);
19
+ if (!customElements.get(is))
20
+ customElements.define(is, Ctor);
15
21
  }
16
22
  console.debug(polyfills);
17
23
  if (0 < polyfills.size) {
18
- const polyfillTagNamesCache = new Set([...polyfills.values()]
19
- .map((v) => String(v.polyfillExtends ?? '').toUpperCase())
20
- .filter(Boolean)); // ['TAG-NAME1', 'TAG-NAME2', ...]
24
+ const polyfillTagNamesCache = new Set([...polyfills.values()].map((v) => String(v.polyfillExtends ?? '').toUpperCase()).filter(Boolean)); // ['TAG-NAME1', 'TAG-NAME2', ...]
21
25
  const handlers = new WeakMap();
22
- // @ts-expect-error
23
26
  const observe = (el, polyfill) => {
24
27
  if (!Array.isArray(polyfill.observedAttributes))
25
28
  return;
26
29
  if (0 === polyfill?.observedAttributes.length)
27
30
  return;
28
- handlers.set(el, new MutationObserver(polyfill.polyfillAttributeChangedCallback).observe(el, {
31
+ if (!polyfill.polyfillAttributeChangedCallback)
32
+ return;
33
+ const observer = new MutationObserver(polyfill.polyfillAttributeChangedCallback);
34
+ observer.observe(el, {
29
35
  attributes: true,
30
36
  attributeFilter: polyfill.observedAttributes,
31
37
  attributeOldValue: true,
32
- }));
33
- },
34
- // @ts-expect-error
35
- unobserve = (el) => {
38
+ });
39
+ handlers.set(el, observer);
40
+ for (const attributeName of polyfill.observedAttributes)
41
+ if (el.hasAttribute(attributeName)) {
42
+ const entry = {
43
+ attributeName,
44
+ oldValue: null,
45
+ target: el,
46
+ };
47
+ void polyfill.polyfillAttributeChangedCallback([entry]);
48
+ }
49
+ }, unobserve = (el) => {
36
50
  handlers.delete(el);
37
- };
38
- console.debug(polyfillTagNamesCache);
51
+ }, polyfillTagNamesCacheSelector = [...polyfillTagNamesCache.values()].map((v) => `${v}`.toLowerCase()).join(','), flatten = (node) => [node, ...(node.querySelectorAll?.(polyfillTagNamesCacheSelector) ?? [])];
52
+ console.debug(polyfillTagNamesCache, polyfillTagNamesCacheSelector);
39
53
  for (const [is, polyfill] of polyfills)
40
- for (const el of document.querySelectorAll(`${polyfill.polyfillExtends}[is="${is}"]`)) {
54
+ for (const el of document.querySelectorAll(`${polyfill.polyfillExtends}[is="${CSS.escape(is)}"]`)) {
41
55
  polyfill.polyfillConnectedCallback(el);
42
56
  observe(el, polyfill);
43
57
  }
44
58
  // observer callback
45
59
  const observer = new MutationObserver((mutations) => {
46
60
  for (const { addedNodes, removedNodes } of mutations) {
47
- for (const node of addedNodes) {
48
- if (!(node instanceof HTMLElement))
49
- continue;
50
- if (!polyfillTagNamesCache.has(node.tagName))
51
- continue;
52
- const is = node?.getAttribute('is') ?? '';
53
- if (!polyfills.has(is))
61
+ for (const root of addedNodes) {
62
+ if (!(root instanceof HTMLElement))
54
63
  continue;
55
- polyfills.get(is)?.polyfillConnectedCallback(node);
56
- observe(node, polyfills.get(is));
64
+ for (const node of flatten(root)) {
65
+ if (!(node instanceof HTMLElement))
66
+ continue;
67
+ if (!polyfillTagNamesCache.has(node.tagName))
68
+ continue;
69
+ const is = node?.getAttribute('is') ?? '';
70
+ if (!polyfills.has(is))
71
+ continue;
72
+ polyfills.get(is)?.polyfillConnectedCallback(node);
73
+ observe(node, polyfills.get(is));
74
+ }
57
75
  }
58
- for (const node of removedNodes) {
59
- if (!(node instanceof HTMLElement))
76
+ for (const root of removedNodes) {
77
+ if (!(root instanceof HTMLElement))
60
78
  continue;
61
- if (!polyfillTagNamesCache.has(node.tagName))
62
- continue;
63
- const is = node?.getAttribute('is') ?? '';
64
- if (!polyfills.has(is))
65
- continue;
66
- polyfills.get(is)?.polyfillDisconnectedCallback(node);
67
- unobserve(node);
79
+ for (const node of flatten(root)) {
80
+ if (!(node instanceof HTMLElement))
81
+ continue;
82
+ if (!polyfillTagNamesCache.has(node.tagName))
83
+ continue;
84
+ const is = node?.getAttribute('is') ?? '';
85
+ if (!polyfills.has(is))
86
+ continue;
87
+ polyfills.get(is)?.polyfillDisconnectedCallback(node);
88
+ unobserve(node);
89
+ }
68
90
  }
69
91
  }
70
92
  });
@@ -73,151 +95,199 @@ if (0 < polyfills.size) {
73
95
  subtree: true,
74
96
  });
75
97
  }
76
- const cleanup = (lm, dir) => {
77
- let arr = [
78
- Snapshot.config['vt-fwd-class-name'],
79
- 'fwdd',
80
- 'fwn',
81
- 'fwnn',
82
- 'bwd',
83
- 'bwdd',
84
- 'bwn',
85
- 'bwnn',
86
- ];
87
- if (['backwards', 'forwards'].includes(dir ?? ''))
98
+ // SECTION: Safari polyfill
99
+ document.addEventListener('touchstart', () => { }, { passive: true });
100
+ // SECTION: Transitions
101
+ const cleanup = (lm, type) => {
102
+ let arr = [Snapshot.config['vt-fwd-class-name'], 'fwdd', 'fwn', 'fwnn', 'bwd', 'bwdd', 'bwn', 'bwnn'];
103
+ if (['backwards', 'forwards'].includes(type ?? ''))
88
104
  for (let i = arr.length - 1; i >= 0; i--)
89
- if (arr[i].startsWith('backwards' === dir ? 'fw' : 'bw'))
105
+ if (arr[i].startsWith('backwards' === type ? 'fw' : 'bw'))
90
106
  arr.splice(i, 1);
91
- for (const el of [
92
- ...(lm?.querySelectorAll(arr.map((v) => `.${v}`).join(',')) ?? []),
93
- ])
107
+ for (const el of [...(lm?.querySelectorAll(arr.map((v) => `.${v}`).join(',')) ?? [])])
94
108
  el.classList.remove(...arr);
95
109
  };
96
- export const startViewTransition = async (event, type = 'forwards', updateCallback = async () => { }) => {
97
- // const sv =
98
- // (event.target as HTMLElement).closest<Components.ScrollView>(
99
- // 'scroll-view'
100
- // ) ?? undefined,
101
- const from = event.target.closest('scroll-view') ?? undefined;
110
+ export const startViewTransition = async (target, type = 'forwards', updateCallbackOrOptions = async () => { }) => {
111
+ console.debug(`startViewTransition (${type})`, target);
112
+ if (!(target instanceof HTMLElement))
113
+ throw new TypeError("Argument 1 ('target') to client.startViewTransition must be an instance of HTMLElement");
114
+ if (!['forwards', 'backwards', 'reload'].includes(type))
115
+ throw new TypeError("Argument 2 ('type') to client.startViewTransition must be of TransitionType");
116
+ const options = typeof updateCallbackOrOptions === 'function'
117
+ ? {
118
+ updateCallback: updateCallbackOrOptions,
119
+ }
120
+ : (updateCallbackOrOptions ?? {}), updateCallback = options.updateCallback ?? (async () => { });
121
+ await Snapshot.waitReady;
122
+ const from = new NavigationPath(target); //const from = closestBody(target) //event.target as HTMLElement)
102
123
  if ('forwards' === type) {
103
- // const sis = Router.toolbarItems //sv.parentElement.querySelectorAll(`:scope > navigation-bar > toolbar-item,:scope > bottom-bar > toolbar-item`)
104
- // pr = Router.frame //sv.parentElement
105
- // const pt = event.target.closest('navigation-stack,body-view')
106
- // const inte = event.target.closest(".fwd");
107
- // const st = sv.scrollTop
108
- // console.log(333, lm, sv, sis)
109
- // let to
110
- // inject or unhide
111
- // if (pr.tagName === 'NAVIGATION-STACK' && 'more' === pr.getAttribute('is')) {
112
- // to = document.querySelector(`#${event.target.getAttribute('tag')}`)
113
- // to.hidden = false
114
- // } else {
115
124
  await updateCallback(); // updatetheDOMSomehow
116
- // to = sv.nextElementSibling //pr.lastElementChild //sv.nextElementSibling
125
+ // Snapshot.getSnapshot(from)
126
+ // const root = getRootViewController(from)
127
+ // const oldPath = new NavigationPath(from)
128
+ const root = [from, ...from.parents()]
129
+ .map((item) => item.component)
130
+ .filter(Boolean)
131
+ .at(-1);
132
+ // const { toolBarConfig: oldToolbars } = getComputedView(from) // const { toolBarConfig: oldToolbars, slot: oldSLot, page: oldPage } = getComputedView(from) //
133
+ // console.log(88, oldPage, oldPath.page, oldSLot, oldPath.slot, oldToolbars, oldPath.toolBarConfig)
134
+ // const oldToolbars = Snapshot.toolbarItems
135
+ // const { toolBarConfig: oldToolbars, host: oldHost } = getComputedView(from)
136
+ const tos = options.tos?.() ?? [...from.children()].map((item) => item?.hydrate()), //queryBodyAll(oldSLot), //[...oldPath.children()].map((item) => item.body).filter(Boolean),//
137
+ to = tos.at(-1),
138
+ // to = newPath?.body, //tos.slice(-1)?.pop?.(), //Snapshot.leaf, //
139
+ // newHost = newPath?.component, //{ host: newHost } = getComputedView(to),
140
+ newToolbars = tos.flatMap((item) => item.toolBarConfig ?? []).filter((item) => !!item),
141
+ // .map((item) => item.toolBarConfig)
142
+ // .flat()
143
+ // .filter(Boolean), //queryToolbarConfigAll(oldSLot),
144
+ modalViews = tos.map((item) => item.component).filter((item) => !!item && item.matches('dialog')); //[...queryHostAll(oldPage)].filter?.((item) => item?.matches('dialog'))
145
+ // toFrame = Snapshot.leafContainer, //queryHostAll(from).slice(-1)?.pop?.(),
146
+ // toToolbars = Snapshot.leafToolbarItems
147
+ // dialogFrames = [toFrame, ...(Snapshot.leaveFrames ?? [])].filter((item): item is HTMLDialogElement => item instanceof HTMLDialogElement) //[toFrame, ...(Snapshot.leaveFrames ?? [])].filter((item) => item?.matches('dialog'))
148
+ // if ('DIALOG' === newHost?.tagName) {
149
+ // ;(newHost as HTMLDialogElement).showModal()
150
+ // console.debug(`⚡️ view-transition-start (${type})`)
151
+ // await Promise.allSettled(newHost.getAnimations().map(({ finished }) => finished))
152
+ // console.debug(`⚡️ view-transition-end (${type})`)
153
+ // return
117
154
  // }
118
- Snapshot.getSnapshot(from);
119
- const fromToolbars = Snapshot.toolbarItems;
120
- // from = Snapshot.landmark
121
- const to = Snapshot.leaf, toFrame = Snapshot.leafContainer, toToolbars = Snapshot.leafToolbarItems;
122
- if ('DIALOG' === toFrame?.tagName) {
123
- ;
124
- toFrame.showModal();
155
+ // purge
156
+ cleanup(root, 'backwards');
157
+ // prepare old
158
+ from.body?.classList.add(Snapshot.config['vt-fwd-class-name']);
159
+ from.body?.dispatchEvent(new CustomEvent('pageswap', { detail: { page: from.body }, bubbles: true, composed: true }));
160
+ for (const oldToolbar of from.toolBarConfig ?? [])
161
+ oldToolbar.classList.add('fwn'); // prepare navbs
162
+ // prepare new
163
+ const toolbarExclusion = 0 < modalViews.length
164
+ ? (value, index, array) => value.parentElement?.matches('tool-bar:not(dialog tool-bar,body-view ~ tool-bar)')
165
+ : (value, index, array) => value.parentElement?.matches('tool-bar:not(body-view ~ tool-bar)'), bodyExclusion = 0 < modalViews.length
166
+ ? (item) => item.body?.matches('scroll-view:not(dialog scroll-view)')
167
+ : (value, index, array) => value;
168
+ for (const bti of newToolbars?.filter?.(toolbarExclusion) ?? [])
169
+ bti.classList.add('fwnn'); // for (const ti of newToolbars ?? []) ti.classList.add('fwnn') //
170
+ for (const bt of tos?.filter?.(bodyExclusion) ?? []) {
171
+ bt.body?.classList.add('fwdd'); //to?.classList.add('fwdd')
172
+ bt.body?.dispatchEvent(new CustomEvent('pagereveal', { detail: { page: bt.body }, bubbles: true, composed: true }));
173
+ }
174
+ if (0 < modalViews.length) {
175
+ for await (const el of modalViews)
176
+ el.showModal();
177
+ console.debug(`⚡️ view-dialog-transition-start (${type})`);
178
+ await Promise.allSettled(modalViews?.[0].getAnimations().map(({ finished }) => finished));
179
+ console.debug(`⚡️ view-dialog-transition-end (${type})`);
180
+ }
181
+ else {
125
182
  console.debug(`⚡️ view-transition-start (${type})`);
126
- await Promise.allSettled(toFrame.getAnimations().map(({ finished }) => finished));
183
+ await Promise.allSettled([
184
+ ...(from.body?.getAnimations().map(({ finished }) => finished) ?? []),
185
+ ...(to?.body?.getAnimations().map(({ finished }) => finished) ?? []),
186
+ ]);
127
187
  console.debug(`⚡️ view-transition-end (${type})`);
128
- return;
129
188
  }
130
- // purge
131
- cleanup(Snapshot.root, 'backwards');
132
- for (const ti of toToolbars ?? [])
133
- ti.classList.add('fwnn');
134
- to?.classList.add('fwdd');
135
- // prepare principal/leader
136
- from?.classList.add(Snapshot.config['vt-fwd-class-name']);
137
- for (const ti of fromToolbars ?? [])
138
- ti.classList.add('fwn'); // prepare navbs
139
- // sv.inert = true
140
- // if (!document.startViewTransition) {
141
- // startViewTransition(event, false)
142
- // return
143
- // }
144
- // With a transition:
145
- // const transition = document.startViewTransition({
146
- // async update() {},
147
- // types: ['forwards'],
148
- // })
149
- // console.debug(transition)
150
- // await transition.finished
151
- // alert(3)
152
- // return
153
- console.debug(`⚡️ view-transition-start (${type})`);
154
- await Promise.allSettled([
155
- ...(from?.getAnimations().map(({ finished }) => finished) ?? []),
156
- ...(to?.getAnimations().map(({ finished }) => finished) ?? []),
157
- ]);
158
- // await Promise.allSettled(
159
- // from.getAnimations().map(({ finished }) => finished)
160
- // )
161
- console.debug(`⚡️ view-transition-end (${type})`);
162
- // console.log(9, to.querySelectorAll('.fwd'))
163
- // sv2.classList.remove("fwdd");
164
- if (0 <
165
- (toFrame?.querySelectorAll(`.${Snapshot.config?.['vt-fwd-class-name']},.bwd`) ?? []).length)
189
+ if (0 < (to?.component?.querySelectorAll(`.${Snapshot.config?.['vt-fwd-class-name']},.bwd`) ?? []).length)
166
190
  return;
167
- cleanup(Snapshot.root);
191
+ cleanup(root);
168
192
  }
169
193
  else {
170
- Snapshot.getSnapshot(from);
171
- const fromToolbars = Snapshot.toolbarItems,
172
- // from = Snapshot.landmark,
173
- fromFrame = Snapshot.container; //sv.parentElement.querySelectorAll(`:scope > navigation-bar > toolbar-item,:scope > bottom-bar > toolbar-item`)
174
- // fromFrame = Router.frame //sv.parentElement
175
- // const pt = event.target.closest('navigation-stack,body-view')
176
- // const pt = pt0.parentElement.closest('navigation-stack,body-view')
177
- const to = Snapshot.parent, //pr.parentElement.querySelector(`:scope > scroll-view`) //pr.previousElementSibling
178
- // toFrame = Snapshot.parentContainer,
179
- toToolbars = Snapshot.parentToolbarItems; //sv2.parentElement?.querySelectorAll?.( `:scope > navigation-bar > toolbar-item,:scope > bottom-bar > toolbar-item` )
180
- // const st2 = sv2.scrollTop
181
- if ('DIALOG' === fromFrame?.tagName) {
182
- ;
183
- fromFrame.close();
184
- console.debug(`⚡️ view-transition-start (${type})`);
185
- await Promise.allSettled(fromFrame.getAnimations().map(({ finished }) => finished));
186
- console.debug(`⚡️ view-transition-end (${type})`);
187
- if (fromFrame.matches('[open]'))
194
+ // Snapshot.getSnapshot(from)
195
+ // const oldPath = new NavigationPath(from)
196
+ const root = [from, ...from.parents()]
197
+ .map((item) => item.component)
198
+ .filter(Boolean)
199
+ .at(-1); // const root = getRootViewController(from)
200
+ //const { toolBarConfig: oldToolbars, host: oldHost, page: oldPage, slot: oldSlot } = getComputedView(from)
201
+ const froms = [...from.children()].map((item) => item?.hydrate());
202
+ const oldToolbars = froms.flatMap((item) => item.toolBarConfig ?? []).filter((item) => !!item), oldBodies = froms.map((item) => item.body).filter((item) => !!item);
203
+ // console.log(99, queryToolbarConfigAll(oldSlot), oldToolbars)
204
+ // if most-top effect is closing a modal, skip everything
205
+ if ('DIALOG' === from.component?.tagName) {
206
+ from.body?.dispatchEvent(new CustomEvent('pageswap', { detail: { page: from.body }, bubbles: true, composed: true }));
207
+ from.component.close();
208
+ console.debug(`⚡️ view-dialog-transition-start (${type})`);
209
+ await Promise.allSettled(from.component.getAnimations().map(({ finished }) => finished));
210
+ console.debug(`⚡️ view-dialog-transition-end (${type})`);
211
+ if (from.component.matches('[open]'))
188
212
  return;
189
213
  await updateCallback();
190
- return;
214
+ return; // just close modal
191
215
  }
216
+ const to = [...from.parents()].at(0)?.hydrate(); //closestBody(oldPath.component?.parentElement ?? undefined)
217
+ // console.log(99, to)
218
+ if (!to)
219
+ return console.debug('Can not go backwards.'); // nothing to go back to
220
+ const tv = to.body?.closest('tab-view');
221
+ if (tv && to.body?.matches('tab-view>navigation-stack:has(> navigation-stack,> navigation-split-view)>:scope'))
222
+ if ('bottom-bar' !== tv.tabBarPlacement)
223
+ return;
224
+ // const { toolBarConfig: newToolbars } = getComputedView(to.body)
192
225
  // purge
193
- cleanup(Snapshot.root, 'forwards');
194
- // prepare others
195
- for (const ti of toToolbars ?? [])
226
+ cleanup(root, 'forwards');
227
+ // prepare new
228
+ for (const ti of to.toolBarConfig ?? [])
196
229
  ti.classList.add('bwnn');
197
- to?.classList.add('bwdd');
198
- // sv2.style.visibility = "visible";
199
- // prepare leader/principal (tracked)
200
- for (const ti of fromToolbars ?? [])
230
+ to.body?.classList.add('bwdd');
231
+ to.body?.dispatchEvent(new CustomEvent('pagereveal', { detail: { page: to.body }, bubbles: true, composed: true }));
232
+ // prepare old
233
+ const inbetweenModals = froms.map((item) => item.component).filter((item) => !!item && item.matches('dialog[open]')), //queryHostAll(oldPage).filter?.((item) => item.matches('dialog[open]')) ?? [], // FIXME: TEst this, added oldHost too
234
+ toolbarExclusion = 0 < inbetweenModals.length
235
+ ? (value, index, array) => value.parentElement?.matches('tool-bar:not(dialog tool-bar)')
236
+ : (value, index, array) => value, bodyExclusion = 0 < inbetweenModals.length ? (item) => item?.matches('scroll-view:not(dialog scroll-view)') : (item) => item;
237
+ for (const ti of [...(from.toolBarConfig ?? []), ...(oldToolbars?.filter?.(toolbarExclusion) ?? [])])
201
238
  ti.classList.add('bwn');
202
- from?.classList.add('bwd');
203
- // pr.inert = true
239
+ for (const nn of [from.body, ...oldBodies?.filter?.(bodyExclusion)]) {
240
+ nn?.classList.add('bwd'); //from?.classList.add('bwd')
241
+ nn?.dispatchEvent(new CustomEvent('pageswap', { detail: { page: nn }, bubbles: true, composed: true }));
242
+ }
243
+ for (const el of inbetweenModals)
244
+ el.close(); // close old inbetween modals
245
+ // capture trans
204
246
  console.debug(`⚡️ view-transition-start (${type})`);
205
247
  await Promise.allSettled([
206
- ...(from?.getAnimations().map(({ finished }) => finished) ?? []),
207
- ...(to?.getAnimations().map(({ finished }) => finished) ?? []),
248
+ ...(from.body?.getAnimations().map(({ finished }) => finished) ?? []),
249
+ ...(to.body?.getAnimations().map(({ finished }) => finished) ?? []),
208
250
  ]);
209
- // await Promise.allSettled(
210
- // from.getAnimations().map(({ finished }) => finished)
211
- // )
212
- // await Promise.allSettled(to.getAnimations().map(({ finished }) => finished))
213
251
  console.debug(`⚡️ view-transition-end (${type})`);
214
- // console.log(999, sv2.closest('.fwd'))
215
- if (to?.closest(`.bwd,.${Snapshot.config?.['vt-fwd-class-name']}`))
252
+ if (to.body?.closest(`.bwd,.${Snapshot.config?.['vt-fwd-class-name']}`))
216
253
  return;
217
- cleanup(Snapshot.root);
254
+ cleanup(root);
218
255
  // remove or hide
219
256
  await updateCallback();
220
257
  }
221
258
  };
222
- void Snapshot.setOwnConfig();
223
- export { Snapshot };
259
+ export const confirmationDialog = async (trigger, title, entries, controller = new AbortController()) => {
260
+ const newAnchorName = `--confirmation-dialog-${self.crypto.randomUUID()}`;
261
+ const dialog = $(`<dialog is="confirmation-dialog">
262
+ ${entries.map((item, index) => `<button type="button" tabindex="0" value="${index}">
263
+ <label-view title="${item[0]}"></label-view>
264
+ </button>`)}
265
+ </dialog>`);
266
+ $.prop('anchor-name', newAnchorName, trigger, 'important');
267
+ $.prop('position-anchor', newAnchorName, dialog);
268
+ if (title) {
269
+ const label = $(`<label-view></label-view>`);
270
+ label.setAttribute('title', title);
271
+ dialog.insertAdjacentElement('afterbegin', label);
272
+ }
273
+ trigger.closest('body-view')?.insertAdjacentElement('beforeend', dialog); // dialog.showModal()
274
+ return await new Promise((resolve, reject) => {
275
+ const onClose = (evt) => {
276
+ off();
277
+ resolve(evt.detail.returnValue);
278
+ }, off = onoff('return', onClose, ConfirmationDialog, { once: true }).on();
279
+ // const onAbort = () => {
280
+ // cleanup()
281
+ // reject(new DOMException('aborted', 'AbortError'))
282
+ // }
283
+ // const cleanup = () => {
284
+ // ConfirmationDialog.removeEventListener('close', onClose)
285
+ // // controller.signal.removeEventListener('abort', onAbort)
286
+ // }
287
+ // ConfirmationDialog.addEventListener('close', onClose, { once: true })
288
+ // controller.signal.addEventListener('abort', onAbort, { once: true })
289
+ });
290
+ };
291
+ void Snapshot.waitReady; // void Snapshot.setOwnConfig()
292
+ // SECTION
293
+ export { ConfirmationDialog, I18n, LifecycleObserver, NavigationPath, Snapshot };
@@ -0,0 +1,7 @@
1
+ import { ButtonBase } from '../namespace-browser/base';
2
+ export declare class BorderedButton extends ButtonBase {
3
+ #private;
4
+ constructor();
5
+ static polyfillDisconnectedCallback(el: BorderedButton): void;
6
+ static polyfillConnectedCallback(el: BorderedButton): void;
7
+ }
@@ -0,0 +1,20 @@
1
+ import { CleanupRegistry } from '../internal/class/cleanup-registry';
2
+ import { onoff } from '../internal/utils';
3
+ import { ButtonBase } from '../namespace-browser/base';
4
+ export class BorderedButton extends ButtonBase {
5
+ constructor() {
6
+ super();
7
+ }
8
+ static polyfillDisconnectedCallback(el) {
9
+ console.debug(`${BorderedButton.name} ⚡️ disconnect`);
10
+ CleanupRegistry.unregister(el);
11
+ }
12
+ static polyfillConnectedCallback(el) {
13
+ console.debug(`${BorderedButton.name} ⚡️ connect`);
14
+ el.tabIndex = 0;
15
+ CleanupRegistry.register(el, onoff('click', BorderedButton.#handleClick, el).on());
16
+ }
17
+ static #handleClick = async (evt) => {
18
+ //
19
+ };
20
+ }
@@ -0,0 +1,7 @@
1
+ import { ButtonBase } from '../namespace-browser/base';
2
+ export declare class BorderedProminentButton extends ButtonBase {
3
+ #private;
4
+ constructor();
5
+ static polyfillDisconnectedCallback(el: BorderedProminentButton): void;
6
+ static polyfillConnectedCallback(el: BorderedProminentButton): void;
7
+ }
@@ -0,0 +1,20 @@
1
+ import { CleanupRegistry } from '../internal/class/cleanup-registry';
2
+ import { onoff } from '../internal/utils';
3
+ import { ButtonBase } from '../namespace-browser/base';
4
+ export class BorderedProminentButton extends ButtonBase {
5
+ constructor() {
6
+ super();
7
+ }
8
+ static polyfillDisconnectedCallback(el) {
9
+ console.debug(`${BorderedProminentButton.name} ⚡️ disconnect`);
10
+ CleanupRegistry.unregister(el);
11
+ }
12
+ static polyfillConnectedCallback(el) {
13
+ console.debug(`${BorderedProminentButton.name} ⚡️ connect`);
14
+ el.tabIndex = 0;
15
+ CleanupRegistry.register(el, onoff('click', BorderedProminentButton.#handleClick, el).on());
16
+ }
17
+ static #handleClick = async (evt) => {
18
+ //
19
+ };
20
+ }
@@ -1,9 +1,9 @@
1
- import { ButtonBase } from '../internal/class';
1
+ import { ButtonBase } from '../namespace-browser/base';
2
2
  export declare class BorderlessButton extends ButtonBase {
3
+ #private;
4
+ static get observedAttributes(): string[];
3
5
  constructor();
4
- disconnectedCallback(): void;
5
- connectedCallback(): void;
6
6
  static polyfillDisconnectedCallback(el: BorderlessButton): void;
7
7
  static polyfillConnectedCallback(el: BorderlessButton): void;
8
- static handleClick: (event: Event) => Promise<void>;
8
+ static polyfillAttributeChangedCallback([{ attributeName, target, oldValue }]: Pick<MutationRecord, 'attributeName' | 'oldValue' | 'target'>[]): Promise<void>;
9
9
  }
@@ -1,25 +1,35 @@
1
- var _a;
2
- import { ButtonBase } from '../internal/class';
1
+ import { CleanupRegistry } from '../internal/class/cleanup-registry';
2
+ import { onoff } from '../internal/utils';
3
+ import { ButtonBase } from '../namespace-browser/base';
3
4
  export class BorderlessButton extends ButtonBase {
5
+ static get observedAttributes() {
6
+ return ['role'];
7
+ }
4
8
  constructor() {
5
9
  super();
6
10
  }
7
- disconnectedCallback() {
8
- console.debug(`${_a.name} ⚡️ disconnect`);
9
- _a.polyfillDisconnectedCallback(this);
10
- }
11
- connectedCallback() {
12
- console.debug(`${_a.name} ⚡️ connect`);
13
- _a.polyfillConnectedCallback(this);
14
- }
15
11
  static polyfillDisconnectedCallback(el) {
16
- el.removeEventListener('click', _a.handleClick);
12
+ console.debug(`${BorderlessButton.name} ⚡️ disconnect`);
13
+ CleanupRegistry.unregister(el);
17
14
  }
18
15
  static polyfillConnectedCallback(el) {
19
- el.addEventListener('click', _a.handleClick);
16
+ console.debug(`${BorderlessButton.name} ⚡️ connect`);
17
+ el.tabIndex = 0;
18
+ CleanupRegistry.register(el, onoff('click', BorderlessButton.#handleClick, el).on());
19
+ }
20
+ static async polyfillAttributeChangedCallback([{ attributeName, target, oldValue }]) {
21
+ console.debug(`${BorderlessButton.name} ⚡️ attr-change [${attributeName}] ("${oldValue}" → "${target.getAttribute(attributeName ?? '')}")`);
22
+ switch (attributeName) {
23
+ case 'role':
24
+ // let label = this.querySelector(':scope>[slot=label]')
25
+ // if (newValue) {
26
+ // label ??= this.appendChild($(`<label-view slot="label"></label-view>`))
27
+ // label.setAttribute('title', newValue)
28
+ // } else label?.remove()
29
+ break;
30
+ }
20
31
  }
32
+ static #handleClick = async (evt) => {
33
+ // alert(99)
34
+ };
21
35
  }
22
- _a = BorderlessButton;
23
- BorderlessButton.handleClick = async (event) => {
24
- alert(99);
25
- };
@@ -0,0 +1,9 @@
1
+ import { DialogBase } from '../namespace-browser/base';
2
+ export declare class ConfirmationDialog extends DialogBase {
3
+ #private;
4
+ static get observedAttributes(): string[];
5
+ constructor();
6
+ static polyfillDisconnectedCallback(el: ConfirmationDialog): void;
7
+ static polyfillConnectedCallback(el: ConfirmationDialog): void;
8
+ static polyfillAttributeChangedCallback([{ attributeName, target, oldValue }]: Pick<MutationRecord, 'attributeName' | 'oldValue' | 'target'>[]): Promise<void>;
9
+ }