@aurodesignsystem-dev/auro-formkit 0.0.0-pr1452.2 → 0.0.0-pr1452.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.
Files changed (72) hide show
  1. package/components/checkbox/demo/api.html +5 -24
  2. package/components/checkbox/demo/index.min.js +1 -1
  3. package/components/checkbox/dist/index.js +1 -1
  4. package/components/checkbox/dist/registered.js +1 -1
  5. package/components/combobox/demo/api.html +4 -22
  6. package/components/combobox/demo/index.min.js +15 -1
  7. package/components/combobox/demo/registered.min.js +3 -3
  8. package/components/combobox/dist/index.js +3 -3
  9. package/components/combobox/dist/registered.js +3 -3
  10. package/components/counter/demo/api.html +6 -27
  11. package/components/counter/demo/index.min.js +8392 -1
  12. package/components/counter/dist/index.js +240 -13
  13. package/components/counter/dist/registered.js +1 -1
  14. package/components/datepicker/demo/api.html +5 -27
  15. package/components/datepicker/demo/index.min.js +24612 -1
  16. package/components/datepicker/demo/readme.html +2 -10
  17. package/components/datepicker/dist/index.js +3 -3
  18. package/components/datepicker/dist/registered.js +3 -3
  19. package/components/dropdown/demo/api.html +6 -29
  20. package/components/dropdown/demo/index.min.js +5097 -1
  21. package/components/dropdown/dist/index.js +1 -1
  22. package/components/dropdown/dist/registered.js +1 -1
  23. package/components/form/demo/api.html +6 -25
  24. package/components/form/demo/index.min.js +716 -2
  25. package/components/form/demo/registerDemoDeps.min.js +257 -257
  26. package/components/input/demo/accessibility.md +1 -1
  27. package/components/input/demo/api.html +18 -26
  28. package/components/input/demo/auro-input.min.js +1 -1
  29. package/components/input/demo/readme.html +2 -10
  30. package/components/input/dist/index.js +1 -1
  31. package/components/input/dist/registered.js +1 -1
  32. package/components/menu/demo/api.html +6 -28
  33. package/components/menu/demo/index.min.js +2287 -1
  34. package/components/radio/demo/api.html +8 -26
  35. package/components/radio/demo/index.min.js +1 -1
  36. package/components/radio/dist/index.js +1 -1
  37. package/components/radio/dist/registered.js +1 -1
  38. package/components/select/demo/api.html +6 -40
  39. package/components/select/demo/getting-started.min.js +31 -1
  40. package/components/select/demo/registered.min.js +2 -2
  41. package/components/select/dist/index.js +2 -2
  42. package/components/select/dist/registered.js +2 -2
  43. package/custom-elements.json +1444 -1444
  44. package/package.json +1 -1
  45. package/components/checkbox/demo/api.js +0 -17
  46. package/components/checkbox/demo/api.min.js +0 -26
  47. package/components/combobox/demo/api.js +0 -39
  48. package/components/combobox/demo/api.min.js +0 -106
  49. package/components/combobox/demo/swap-value.min.js +0 -16
  50. package/components/counter/demo/api.js +0 -24
  51. package/components/counter/demo/api.min.js +0 -52
  52. package/components/counter/demo/auro-counter-group.min.js +0 -8394
  53. package/components/datepicker/demo/api.js +0 -37
  54. package/components/datepicker/demo/api.min.js +0 -300
  55. package/components/datepicker/demo/auro-datepicker.min.js +0 -24614
  56. package/components/dropdown/demo/api.js +0 -26
  57. package/components/dropdown/demo/api.min.js +0 -109
  58. package/components/dropdown/demo/auro-dropdown.min.js +0 -5099
  59. package/components/form/demo/api.js +0 -5
  60. package/components/form/demo/api.min.js +0 -8
  61. package/components/form/demo/auro-form.min.js +0 -718
  62. package/components/form/demo/autocomplete.html +0 -31
  63. package/components/input/demo/api.js +0 -8
  64. package/components/input/demo/api.min.js +0 -9
  65. package/components/menu/demo/api.js +0 -29
  66. package/components/menu/demo/api.min.js +0 -121
  67. package/components/menu/demo/auro-menuoption.min.js +0 -2289
  68. package/components/radio/demo/api.js +0 -19
  69. package/components/radio/demo/api.min.js +0 -44
  70. package/components/select/demo/api.js +0 -39
  71. package/components/select/demo/api.min.js +0 -83
  72. package/components/select/demo/update-active-option.min.js +0 -32
@@ -1,19 +0,0 @@
1
- import { resetStateExample } from "../apiExamples/reset-state";
2
- import { dynamicExample } from "../apiExamples/dynamic";
3
- import './index.js';
4
-
5
- export function initExamples(initCount) {
6
- initCount = initCount || 0;
7
-
8
- try {
9
- resetStateExample();
10
- dynamicExample();
11
- } catch (error) {
12
- if (initCount <= 20) {
13
- // setTimeout handles issue where content is sometimes loaded after the functions get called
14
- setTimeout(() => {
15
- initExamples(initCount + 1);
16
- }, 100);
17
- }
18
- }
19
- }
@@ -1,44 +0,0 @@
1
- import './index.min.js';
2
-
3
- function resetStateExample() {
4
- const elem = document.querySelector('#resetStateExample');
5
-
6
- document.querySelector('#resetStateBtn').addEventListener('click', () => {
7
- elem.reset();
8
- });
9
- }
10
-
11
- function dynamicExample() {
12
- const values = ['Yes', 'No', 'Maybe'];
13
- const radioGroup = document.getElementById('dynamicExample');
14
-
15
- for (let i = 0; i < values.length; i++) {
16
- const radio = document.createElement('auro-radio');
17
-
18
- radio.id = `dynamicRadio${i}`;
19
- radio.label = values[i];
20
- radio.name = 'radioDemo';
21
- radio.value = values[i];
22
- radio.textContent = values[i];
23
-
24
- radioGroup.appendChild(radio);
25
- }
26
- }
27
-
28
- function initExamples(initCount) {
29
- initCount = initCount || 0;
30
-
31
- try {
32
- resetStateExample();
33
- dynamicExample();
34
- } catch (error) {
35
- if (initCount <= 20) {
36
- // setTimeout handles issue where content is sometimes loaded after the functions get called
37
- setTimeout(() => {
38
- initExamples(initCount + 1);
39
- }, 100);
40
- }
41
- }
42
- }
43
-
44
- export { initExamples };
@@ -1,39 +0,0 @@
1
- import { customErrorValidityExample } from "../apiExamples/custom-error-validity";
2
- import { valueExample } from "../apiExamples/value";
3
- import { valueExtractionExample } from "../apiExamples/value-extraction";
4
- import { valueAlertExample } from "../apiExamples/value-alert";
5
- import { inDialogExample } from '../apiExamples/in-dialog';
6
- import { inDrawerExample } from '../apiExamples/in-drawer';
7
- import { resetStateExample } from "../apiExamples/reset-state";
8
- import { updateActiveOptionExample } from "../apiExamples/update-active-option.js";
9
- // import { auroMenuLoadingExample } from "../apiExamples/loading";
10
-
11
- /* eslint-disable jsdoc/require-jsdoc, no-magic-numbers, no-param-reassign */
12
- import { AuroSelect } from '../src/auro-select.js';
13
- import '../../menu/src/registered.js';
14
-
15
- AuroSelect.register(); // registering to `auro-select`
16
-
17
- export function initExamples(initCount) {
18
- initCount = initCount || 0;
19
-
20
- try {
21
- // javascript example function calls to be added here upon creation to test examples
22
- customErrorValidityExample();
23
- valueExample();
24
- valueExtractionExample();
25
- valueAlertExample();
26
- inDialogExample();
27
- inDrawerExample();
28
- resetStateExample();
29
- updateActiveOptionExample();
30
- // auroMenuLoadingExample();
31
- } catch (err) {
32
- if (initCount <= 20) {
33
- // setTimeout handles issue where content is sometimes loaded after the functions get called
34
- setTimeout(() => {
35
- initExamples(initCount + 1);
36
- }, 100);
37
- }
38
- }
39
- }
@@ -1,83 +0,0 @@
1
- import { v as valueExample, r as resetStateExample, u as updateActiveOptionExample } from './update-active-option.min.js';
2
- import { A as AuroSelect } from './registered.min.js';
3
-
4
- function customErrorValidityExample(elem) {
5
- const customErrorValidityExample = document.querySelector('#primaryError');
6
-
7
- customErrorValidityExample.addEventListener('auroSelect-valueSet', () => {
8
- if (+customErrorValidityExample.value > 2) {
9
- customErrorValidityExample.setAttribute('error', 'Quantity Exceeded');
10
- } else if (customErrorValidityExample.hasAttribute('error')) {
11
- customErrorValidityExample.removeAttribute('error');
12
- }
13
- });
14
- }
15
-
16
- function valueExtractionExample() {
17
- const valueExtractionExample = document.querySelector('#valueExtraction');
18
- const valueExtractionBtn = document.querySelector('#valueExtractionBtn');
19
-
20
- valueExtractionBtn.addEventListener('click', () => {
21
- console.warn('Value selected:', valueExtractionExample.value);
22
- console.warn('Option selected:', valueExtractionExample.optionSelected);
23
-
24
- alert(`Value selected: ${valueExtractionExample.value}`);
25
- });
26
- }
27
-
28
- function valueAlertExample() {
29
- const select = document.querySelector('#valueAlert');
30
- const menu = document.querySelector('#valueAlertMenu');
31
-
32
- menu.addEventListener('auroMenu-selectedOption', () => {
33
- console.warn('Select value changed to:', select.value);
34
- console.warn('Select optionSelected changed to:', select.optionSelected);
35
- });
36
- }
37
-
38
- function inDialogExample() {
39
- document.querySelector("#select-dialog-opener").addEventListener("click", () => {
40
- const dialog = document.querySelector("#select-dialog");
41
- dialog.open = true;
42
- });
43
- }
44
-
45
- function inDrawerExample() {
46
- document.querySelector("#select-drawer-opener").addEventListener("click", () => {
47
- const drawer = document.querySelector("#select-drawer");
48
-
49
- if (drawer.hasAttribute('open')) {
50
- drawer.removeAttribute('open');
51
- } else {
52
- drawer.setAttribute('open', true);
53
- }
54
- });
55
- }
56
-
57
- AuroSelect.register(); // registering to `auro-select`
58
-
59
- function initExamples(initCount) {
60
- initCount = initCount || 0;
61
-
62
- try {
63
- // javascript example function calls to be added here upon creation to test examples
64
- customErrorValidityExample();
65
- valueExample();
66
- valueExtractionExample();
67
- valueAlertExample();
68
- inDialogExample();
69
- inDrawerExample();
70
- resetStateExample();
71
- updateActiveOptionExample();
72
- // auroMenuLoadingExample();
73
- } catch (err) {
74
- if (initCount <= 20) {
75
- // setTimeout handles issue where content is sometimes loaded after the functions get called
76
- setTimeout(() => {
77
- initExamples(initCount + 1);
78
- }, 100);
79
- }
80
- }
81
- }
82
-
83
- export { initExamples };
@@ -1,32 +0,0 @@
1
- function valueExample() {
2
- const valueExample = document.querySelector('#valueExample');
3
-
4
- document.querySelector('#validValueExampleBtn').addEventListener('click', () => {
5
- valueExample.value = '["arrival", "prefer alaska"]';
6
- });
7
-
8
- document.querySelector('#invalidValueExampleBtn').addEventListener('click', () => {
9
- valueExample.value = '["flight course"]';
10
- });
11
- }
12
-
13
- function resetStateExample() {
14
- const elem = document.querySelector('#resetStateExample');
15
-
16
- document.querySelector('#resetStateBtn').addEventListener('click', () => {
17
- elem.reset();
18
- });
19
- }
20
-
21
- function updateActiveOptionExample() {
22
- const select = document.getElementById('updateActiveOptionExample');
23
- const dropdown = select.dropdown;
24
-
25
- dropdown.addEventListener('auroDropdown-toggled', () => {
26
- if (dropdown.isPopoverVisible) {
27
- select.updateActiveOption(2); // Set the active option to the third item (index 2)
28
- }
29
- });
30
- }
31
-
32
- export { resetStateExample as r, updateActiveOptionExample as u, valueExample as v };