@auticlabs/bulut 1.3.2 → 1.3.4

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.
@@ -1,31 +1,31 @@
1
- (() => {
2
- const output = document.querySelector('[data-form-output]');
3
-
4
- const serializeForm = (form) => {
5
- const data = new FormData(form);
6
- const entries = [];
7
-
8
- for (const [key, value] of data.entries()) {
9
- entries.push(`${key}: ${value}`);
10
- }
11
-
12
- return entries.join(' | ');
13
- };
14
-
15
- document.querySelectorAll('form[data-capture]').forEach((form) => {
16
- form.addEventListener('submit', (event) => {
17
- event.preventDefault();
18
- if (!output) return;
19
-
20
- const summary = serializeForm(form);
21
- output.textContent = summary || 'Form submitted without visible values.';
22
- });
23
- });
24
-
25
- document.querySelectorAll('[data-toggle-pressed]').forEach((button) => {
26
- button.addEventListener('click', () => {
27
- const isPressed = button.getAttribute('aria-pressed') === 'true';
28
- button.setAttribute('aria-pressed', String(!isPressed));
29
- });
30
- });
31
- })();
1
+ (() => {
2
+ const output = document.querySelector('[data-form-output]');
3
+
4
+ const serializeForm = (form) => {
5
+ const data = new FormData(form);
6
+ const entries = [];
7
+
8
+ for (const [key, value] of data.entries()) {
9
+ entries.push(`${key}: ${value}`);
10
+ }
11
+
12
+ return entries.join(' | ');
13
+ };
14
+
15
+ document.querySelectorAll('form[data-capture]').forEach((form) => {
16
+ form.addEventListener('submit', (event) => {
17
+ event.preventDefault();
18
+ if (!output) return;
19
+
20
+ const summary = serializeForm(form);
21
+ output.textContent = summary || 'Form submitted without visible values.';
22
+ });
23
+ });
24
+
25
+ document.querySelectorAll('[data-toggle-pressed]').forEach((button) => {
26
+ button.addEventListener('click', () => {
27
+ const isPressed = button.getAttribute('aria-pressed') === 'true';
28
+ button.setAttribute('aria-pressed', String(!isPressed));
29
+ });
30
+ });
31
+ })();