@aurodesignsystem/auro-formkit 5.9.1 → 5.9.2

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 (127) hide show
  1. package/CHANGELOG.md +16 -4
  2. package/components/checkbox/README.md +62 -62
  3. package/components/checkbox/demo/api.js +1 -1
  4. package/components/checkbox/demo/api.md +127 -84
  5. package/components/checkbox/demo/api.min.js +125 -42
  6. package/components/checkbox/demo/index.md +9 -281
  7. package/components/checkbox/demo/index.min.js +125 -42
  8. package/components/checkbox/demo/readme.html +3 -4
  9. package/components/checkbox/demo/readme.md +62 -62
  10. package/components/checkbox/dist/auro-checkbox-group.d.ts +7 -8
  11. package/components/checkbox/dist/auro-checkbox.d.ts +74 -20
  12. package/components/checkbox/dist/index.js +125 -42
  13. package/components/checkbox/dist/registered.js +125 -42
  14. package/components/combobox/README.md +76 -74
  15. package/components/combobox/demo/api.html +1 -0
  16. package/components/combobox/demo/api.js +11 -12
  17. package/components/combobox/demo/api.md +1302 -875
  18. package/components/combobox/demo/api.min.js +348 -420
  19. package/components/combobox/demo/index.html +1 -7
  20. package/components/combobox/demo/index.js +0 -19
  21. package/components/combobox/demo/index.md +43 -723
  22. package/components/combobox/demo/index.min.js +301 -230
  23. package/components/combobox/demo/readme.html +3 -4
  24. package/components/combobox/demo/readme.md +76 -74
  25. package/components/combobox/dist/auro-combobox.d.ts +39 -40
  26. package/components/combobox/dist/index.js +159 -143
  27. package/components/combobox/dist/registered.js +159 -143
  28. package/components/counter/README.md +81 -66
  29. package/components/counter/demo/api.html +1 -2
  30. package/components/counter/demo/api.js +2 -2
  31. package/components/counter/demo/api.md +777 -259
  32. package/components/counter/demo/api.min.js +84 -112
  33. package/components/counter/demo/index.html +0 -2
  34. package/components/counter/demo/index.md +20 -329
  35. package/components/counter/demo/index.min.js +82 -93
  36. package/components/counter/demo/readme.html +3 -4
  37. package/components/counter/demo/readme.md +81 -66
  38. package/components/counter/dist/auro-counter-group.d.ts +21 -36
  39. package/components/counter/dist/auro-counter-wrapper.d.ts +1 -6
  40. package/components/counter/dist/auro-counter.d.ts +5 -8
  41. package/components/counter/dist/index.js +82 -93
  42. package/components/counter/dist/registered.js +82 -93
  43. package/components/datepicker/README.md +57 -61
  44. package/components/datepicker/demo/api.js +8 -8
  45. package/components/datepicker/demo/api.md +720 -561
  46. package/components/datepicker/demo/api.min.js +427 -2424
  47. package/components/datepicker/demo/index.md +65 -117
  48. package/components/datepicker/demo/index.min.js +427 -2424
  49. package/components/datepicker/demo/readme.html +3 -4
  50. package/components/datepicker/demo/readme.md +57 -61
  51. package/components/datepicker/dist/auro-calendar.d.ts +60 -34
  52. package/components/datepicker/dist/auro-datepicker.d.ts +31 -31
  53. package/components/datepicker/dist/index.js +256 -2253
  54. package/components/datepicker/dist/popoverVersion.d.ts +1 -1
  55. package/components/datepicker/dist/registered.js +256 -2253
  56. package/components/dropdown/README.md +78 -62
  57. package/components/dropdown/demo/api.js +4 -4
  58. package/components/dropdown/demo/api.md +520 -478
  59. package/components/dropdown/demo/api.min.js +48 -39
  60. package/components/dropdown/demo/index.md +65 -119
  61. package/components/dropdown/demo/index.min.js +38 -29
  62. package/components/dropdown/demo/readme.html +3 -4
  63. package/components/dropdown/demo/readme.md +78 -62
  64. package/components/dropdown/dist/auro-dropdown.d.ts +42 -33
  65. package/components/dropdown/dist/index.js +38 -29
  66. package/components/dropdown/dist/registered.js +38 -29
  67. package/components/form/README.md +16 -58
  68. package/components/form/demo/api.md +16 -21
  69. package/components/form/demo/api.min.js +13 -8
  70. package/components/form/demo/index.md +38 -39
  71. package/components/form/demo/index.min.js +13 -8
  72. package/components/form/demo/readme.md +16 -58
  73. package/components/form/dist/auro-form.d.ts +15 -3
  74. package/components/form/dist/index.js +13 -8
  75. package/components/form/dist/registered.js +13 -8
  76. package/components/input/README.md +55 -60
  77. package/components/input/demo/api.js +3 -5
  78. package/components/input/demo/api.md +558 -537
  79. package/components/input/demo/api.min.js +100 -113
  80. package/components/input/demo/index.js +0 -1
  81. package/components/input/demo/index.md +90 -203
  82. package/components/input/demo/index.min.js +85 -97
  83. package/components/input/demo/readme.html +3 -4
  84. package/components/input/demo/readme.md +55 -60
  85. package/components/input/dist/auro-input.d.ts +6 -5
  86. package/components/input/dist/base-input.d.ts +67 -68
  87. package/components/input/dist/index.js +85 -80
  88. package/components/input/dist/registered.js +85 -80
  89. package/components/menu/README.md +61 -61
  90. package/components/menu/demo/api.js +6 -8
  91. package/components/menu/demo/api.md +520 -572
  92. package/components/menu/demo/api.min.js +176 -92
  93. package/components/menu/demo/index.js +0 -5
  94. package/components/menu/demo/index.md +36 -119
  95. package/components/menu/demo/index.min.js +141 -96
  96. package/components/menu/demo/readme.html +3 -4
  97. package/components/menu/demo/readme.md +61 -61
  98. package/components/menu/dist/auro-menu.d.ts +70 -37
  99. package/components/menu/dist/auro-menuoption.d.ts +36 -11
  100. package/components/menu/dist/index.js +141 -45
  101. package/components/menu/dist/registered.js +141 -45
  102. package/components/radio/README.md +61 -57
  103. package/components/radio/demo/api.js +2 -2
  104. package/components/radio/demo/api.md +241 -170
  105. package/components/radio/demo/api.min.js +154 -77
  106. package/components/radio/demo/index.md +22 -99
  107. package/components/radio/demo/index.min.js +145 -68
  108. package/components/radio/demo/readme.html +3 -4
  109. package/components/radio/demo/readme.md +61 -57
  110. package/components/radio/dist/auro-radio-group.d.ts +67 -35
  111. package/components/radio/dist/auro-radio.d.ts +56 -33
  112. package/components/radio/dist/index.js +145 -68
  113. package/components/radio/dist/registered.js +145 -68
  114. package/components/select/README.md +68 -65
  115. package/components/select/demo/api.html +1 -0
  116. package/components/select/demo/api.js +7 -7
  117. package/components/select/demo/api.md +1305 -625
  118. package/components/select/demo/api.min.js +300 -199
  119. package/components/select/demo/index.html +0 -2
  120. package/components/select/demo/index.md +25 -833
  121. package/components/select/demo/index.min.js +299 -167
  122. package/components/select/demo/readme.html +3 -4
  123. package/components/select/demo/readme.md +68 -65
  124. package/components/select/dist/auro-select.d.ts +99 -90
  125. package/components/select/dist/index.js +158 -122
  126. package/components/select/dist/registered.js +158 -122
  127. package/package.json +3 -3
@@ -298,12 +298,9 @@ function dispatchMenuEvent(element, eventName, detail = null) {
298
298
 
299
299
 
300
300
  /**
301
- * The auro-menu element provides users a way to define a menu option.
301
+ * The `auro-menuoption` element provides users a way to define a menu option.
302
+ * @customElement auro-menuoption
302
303
  *
303
- * @attr {String} value - Specifies the value to be sent to a server.
304
- * @attr {String} noCheckmark - When true, selected option will not show the checkmark.
305
- * @attr {Boolean} disabled - When true specifies that the menuoption is disabled.
306
- * @attr {Boolean} selected - Specifies that an option is selected.
307
304
  * @event auroMenuOption-mouseover - Notifies that this option has been hovered over.
308
305
  * @slot - Specifies text for an option, but is not the value.
309
306
  */
@@ -311,7 +308,7 @@ class AuroMenuOption extends AuroElement {
311
308
 
312
309
  /**
313
310
  * This will register this element with the browser.
314
- * @param {string} [name="auro-menuoption"] - The name of element that you want to register to.
311
+ * @param {string} [name="auro-menuoption"] - The name of the element that you want to register.
315
312
  *
316
313
  * @example
317
314
  * AuroMenuOption.register("custom-menuoption") // this will register this element to <custom-menuoption/>
@@ -375,38 +372,81 @@ class AuroMenuOption extends AuroElement {
375
372
  static get properties() {
376
373
  return {
377
374
  ...super.properties,
375
+
376
+ /**
377
+ * When true, disables the menu option.
378
+ */
378
379
  disabled: {
379
380
  type: Boolean,
380
381
  reflect: true
381
382
  },
383
+
384
+ /**
385
+ * @private
386
+ */
382
387
  event: {
383
388
  type: String,
384
389
  reflect: true
385
390
  },
391
+
392
+ /**
393
+ * @private
394
+ */
395
+ layout: {
396
+ type: String
397
+ },
398
+
399
+ /**
400
+ * Allows users to set a unique key for the menu option for specified option selection. If no key is provided, the value property will be used.
401
+ */
386
402
  key: {
387
403
  type: String,
388
404
  reflect: true
389
405
  },
406
+
407
+ /**
408
+ * @private
409
+ */
390
410
  menuService: {
391
411
  type: Object,
392
412
  state: true
393
413
  },
414
+
415
+ /**
416
+ * @private
417
+ */
394
418
  matchWord: {
395
419
  type: String,
396
420
  state: true
397
421
  },
422
+
423
+ /**
424
+ * @private
425
+ */
398
426
  noCheckmark: {
399
427
  type: Boolean,
400
428
  reflect: true
401
429
  },
430
+
431
+ /**
432
+ * Specifies that an option is selected.
433
+ */
402
434
  selected: {
403
435
  type: Boolean,
404
436
  reflect: true
405
437
  },
438
+
439
+ /**
440
+ * Specifies the tab index of the menu option.
441
+ */
406
442
  tabIndex: {
407
443
  type: Number,
408
444
  reflect: true
409
445
  },
446
+
447
+ /**
448
+ * Specifies the value to be sent to a server.
449
+ */
410
450
  value: {
411
451
  type: String,
412
452
  reflect: true
@@ -1357,19 +1397,9 @@ const MenuContext = createContext('menu-context');
1357
1397
 
1358
1398
 
1359
1399
  /**
1360
- * The auro-menu element provides users a way to select from a list of options.
1361
- * @attr {HTMLElement|Array<HTMLElement>} optionSelected - An array of currently selected menu options, type `HTMLElement` by default. In multi-select mode, `optionSelected` is an array of HTML elements.
1362
- * @attr {object} optionactive - Specifies the current active menuOption.
1363
- * @attr {string} matchword - Specifies a string used to highlight matched string parts in options.
1364
- * @attr {boolean} disabled - When true, the entire menu and all options are disabled;
1365
- * @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
1366
- * @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
1367
- * @attr {boolean} multiselect - When true, the selected option can be multiple options.
1368
- * @attr {boolean} selectAllMatchingOptions - When true, selects all options that match the provided value/key when setting value and multiselect is enabled.
1369
- * @attr {string} value - The value of the selected option. In multi-select mode, this is a JSON stringified array of selected option values.
1370
- * @prop {string} size - Sets the size of the menu. Accepted values are 'sm' and 'md'. Default is 'sm'.
1371
- * @prop {string} shape - Sets the shape of the menu options. Accepted values are 'box' and 'round'. Default is 'box'.
1372
- * @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
1400
+ * The `auro-menu` element provides users a way to select from a list of options.
1401
+ * @customElement auro-menu
1402
+ *
1373
1403
  * @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
1374
1404
  * @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
1375
1405
  * @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Notifies when the loading attribute is changed.
@@ -1460,58 +1490,87 @@ class AuroMenu extends AuroElement {
1460
1490
  type: Boolean,
1461
1491
  reflect: true,
1462
1492
  },
1463
- noCheckmark: {
1464
- type: Boolean,
1465
- reflect: true,
1466
- attribute: 'nocheckmark'
1467
- },
1493
+
1494
+ /**
1495
+ * When true, the entire menu and all options are disabled.
1496
+ */
1468
1497
  disabled: {
1469
1498
  type: Boolean,
1470
1499
  reflect: true
1471
1500
  },
1501
+
1502
+ /**
1503
+ * Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
1504
+ */
1505
+ hasLoadingPlaceholder: {
1506
+ type: Boolean
1507
+ },
1508
+
1509
+ /**
1510
+ * @private
1511
+ */
1512
+ layout: {
1513
+ type: String
1514
+ },
1515
+
1516
+ /**
1517
+ * Indent level for submenus.
1518
+ * @private
1519
+ */
1520
+ level: {
1521
+ type: Number,
1522
+ reflect: false,
1523
+ attribute: false
1524
+ },
1525
+
1526
+ /**
1527
+ * When true, displays a loading state using the loadingIcon and loadingText slots if provided.
1528
+ */
1472
1529
  loading: {
1473
1530
  type: Boolean,
1474
1531
  reflect: true
1475
1532
  },
1476
- optionSelected: {
1477
- // Allow HTMLElement, HTMLElement[] arrays and undefined
1478
- type: Object
1479
- },
1480
- optionActive: {
1481
- type: Object,
1482
- attribute: 'optionactive'
1483
- },
1533
+
1534
+ /**
1535
+ * Specifies a string used to highlight matched string parts in options.
1536
+ */
1484
1537
  matchWord: {
1485
1538
  type: String,
1486
1539
  attribute: 'matchword'
1487
1540
  },
1541
+
1542
+ /**
1543
+ * When true, the selected option can be multiple options.
1544
+ */
1488
1545
  multiSelect: {
1489
1546
  type: Boolean,
1490
1547
  reflect: true,
1491
1548
  attribute: 'multiselect'
1492
1549
  },
1493
- selectAllMatchingOptions: {
1550
+
1551
+ /**
1552
+ * When true, selected option will not show the checkmark.
1553
+ */
1554
+ noCheckmark: {
1494
1555
  type: Boolean,
1495
1556
  reflect: true,
1557
+ attribute: 'nocheckmark'
1496
1558
  },
1497
1559
 
1498
1560
  /**
1499
- * Value selected for the component.
1561
+ * Specifies the current active menuOption.
1500
1562
  */
1501
- value: {
1502
- type: String,
1503
- reflect: true,
1504
- attribute: 'value'
1563
+ optionActive: {
1564
+ type: Object,
1565
+ attribute: 'optionactive'
1505
1566
  },
1506
1567
 
1507
1568
  /**
1508
- * Indent level for submenus.
1509
- * @private
1569
+ * An array of currently selected menu options, type `HTMLElement` by default. In multi-select mode, `optionSelected` is an array of HTML elements.
1510
1570
  */
1511
- level: {
1512
- type: Number,
1513
- reflect: false,
1514
- attribute: false
1571
+ optionSelected: {
1572
+ // Allow HTMLElement, HTMLElement[] arrays and undefined
1573
+ type: Object
1515
1574
  },
1516
1575
 
1517
1576
  /**
@@ -1522,6 +1581,43 @@ class AuroMenu extends AuroElement {
1522
1581
  type: Array,
1523
1582
  reflect: false,
1524
1583
  attribute: false
1584
+ },
1585
+
1586
+ /**
1587
+ * Sets the size of the menu.
1588
+ * @type {'sm' | 'md'}
1589
+ * @default 'sm'
1590
+ */
1591
+ size: {
1592
+ type: String,
1593
+ reflect: true
1594
+ },
1595
+
1596
+ /**
1597
+ * When true, selects all options that match the provided value/key when setting value and multiselect is enabled.
1598
+ */
1599
+ selectAllMatchingOptions: {
1600
+ type: Boolean,
1601
+ reflect: true,
1602
+ },
1603
+
1604
+ /**
1605
+ * Sets the shape of the menu.
1606
+ * @type {'box' | 'round'}
1607
+ * @default 'box'
1608
+ */
1609
+ shape: {
1610
+ type: String,
1611
+ reflect: true
1612
+ },
1613
+
1614
+ /**
1615
+ * The value of the selected option. In multi-select mode, this is a JSON stringified array of selected option values.
1616
+ */
1617
+ value: {
1618
+ type: String,
1619
+ reflect: true,
1620
+ attribute: 'value'
1525
1621
  }
1526
1622
  };
1527
1623
  }
@@ -1567,7 +1663,7 @@ class AuroMenu extends AuroElement {
1567
1663
 
1568
1664
  /**
1569
1665
  * This will register this element with the browser.
1570
- * @param {string} [name="auro-menu"] - The name of element that you want to register to.
1666
+ * @param {string} [name="auro-menu"] - The name of the element that you want to register.
1571
1667
  *
1572
1668
  * @example
1573
1669
  * AuroMenu.register("custom-menu") // this will register this element to <custom-menu/>
@@ -18,6 +18,7 @@ The following sections are editable by making changes to the following files:
18
18
  -->
19
19
 
20
20
  # Radio
21
+
21
22
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
22
23
  <!-- The below content is automatically added from ./docs/partials/description.md -->
23
24
  `<auro-radio>` is a [HTML custom element](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) that is rendered as a small circle, which is filled or highlighted when selected. Only one `<auro-radio>` component in a given `<auro-radio-group>` can be selected at the same time.
@@ -27,7 +28,19 @@ The following sections are editable by making changes to the following files:
27
28
  <!-- AURO-GENERATED-CONTENT This file is to be used for any additional content that should be included in the README.md which is specific to this component. -->
28
29
  <!-- AURO-GENERATED-CONTENT:END -->
29
30
 
31
+ ## Radio Use Cases
32
+
33
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
34
+ <!-- The below content is automatically added from ./docs/partials/useCases.md -->
35
+ The `<auro-radio>` element is designed to be a single component for the use of creating an input `type="radio"` with an associated `<label>` that meets all use case and accessibility standards.
36
+
37
+ The following examples illustrate fully functional `<auro-radio>` elements wrapped with the `<auro-radio-group>` element. The `<auro-radio-group>` element is REQUIRED in order to mantain the relationship between individual `<auro-radio>` elements for functional radio button actions.
38
+
39
+ **Note**: The `<auro-radio>` element is only for to for use as a set of two or more `<auro-radio>` elements within an `<auro-radio-group>` element.
40
+ <!-- AURO-GENERATED-CONTENT:END -->
41
+
30
42
  ## Getting Started
43
+
31
44
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/componentInstall.md) -->
32
45
  <!-- The below content is automatically added from ../../docs/templates/componentInstall.md -->
33
46
 
@@ -40,30 +53,7 @@ $ npm i @aurodesignsystem/auro-formkit
40
53
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/gettingStarted.md) -->
41
54
  <!-- The below content is automatically added from ../../docs/templates/gettingStarted.md -->
42
55
 
43
- ### Import Options
44
-
45
- #### Automatic Registration
46
-
47
- For automatic registration, simply import the component:
48
-
49
- ```javascript
50
- // Registers <auro-radio> automatically
51
- import '@aurodesignsystem/auro-formkit/auro-radio';
52
- ```
53
-
54
- #### Custom Registration
55
-
56
- To protect from versioning conflicts with other instances of the component being loaded, it is recommended to use our static `AuroRadio.register('custom-radio')` method on the component class and pass in a unique name.
57
-
58
- ```javascript
59
- // Import the class only
60
- import { AuroRadio } from '@aurodesignsystem/auro-formkit/auro-radio/class';
61
-
62
- // Register with a custom name if desired
63
- AuroRadio.register('custom-radio');
64
- ```
65
-
66
- #### TypeScript Module Resolution
56
+ ### TypeScript Module Resolution
67
57
 
68
58
  When using TypeScript set `moduleResolution` to `bundler`, add the following to your `tsconfig.json`:
69
59
 
@@ -76,25 +66,10 @@ When using TypeScript set `moduleResolution` to `bundler`, add the following to
76
66
  ```
77
67
 
78
68
  This configuration enables proper module resolution for the component's TypeScript files.
79
- <!-- AURO-GENERATED-CONTENT:END -->
80
- **Reference component in HTML**
81
-
82
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
83
- <!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
84
-
85
- ```html
86
- <auro-radio id="basicRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
87
- ```
88
- <!-- AURO-GENERATED-CONTENT:END -->
89
-
90
- ### Design Token CSS Custom Property dependency
91
-
92
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/development/designTokens.md) -->
93
- The use of any Auro custom element has a dependency on the [Auro Design Tokens](https://auro.alaskaair.com/getting-started/developers/design-tokens).
94
-
95
69
  <!-- AURO-GENERATED-CONTENT:END -->
96
70
 
97
71
  ## Install from CDN
72
+
98
73
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/bundleInstallDescription.md) -->
99
74
  <!-- The below content is automatically added from ../../docs/templates/bundleInstallDescription.md -->
100
75
  In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
@@ -104,23 +79,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
104
79
  ```
105
80
  <!-- AURO-GENERATED-CONTENT:END -->
106
81
 
107
- ## UI development browser support
108
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/browserSupport.md) -->
109
- For the most up to date information on [UI development browser support](https://auro.alaskaair.com/support/browsersSupport)
110
-
111
- <!-- AURO-GENERATED-CONTENT:END -->
112
-
113
- ## auro-radio use cases
114
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
115
- <!-- The below content is automatically added from ./docs/partials/useCases.md -->
116
- The `<auro-radio>` element is designed to be a single component for the use of creating an input `type="radio"` with an associated `<label>` that meets all use case and accessibility standards.
117
-
118
- The following examples illustrate fully functional `<auro-radio>` elements wrapped with the `<auro-radio-group>` element. The `<auro-radio-group>` element is REQUIRED in order to mantain the relationship between individual `<auro-radio>` elements for functional radio button actions.
119
-
120
- **Note**: The `<auro-radio>` element is only for to for use as a set of two or more `<auro-radio>` elements within an `<auro-radio-group>` element.
121
- <!-- AURO-GENERATED-CONTENT:END -->
122
-
123
- ## Formkit development
82
+ ## Formkit Development
124
83
 
125
84
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/partials/developmentDescription.md) -->
126
85
  <!-- The below content is automatically added from ../../docs/partials/developmentDescription.md -->
@@ -134,4 +93,49 @@ To only develop a single component, use the `--filter` flag:
134
93
  ```shell
135
94
  npx turbo dev --filter=@aurodesignsystem/auro-input
136
95
  ```
96
+ <!-- AURO-GENERATED-CONTENT:END -->
97
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
98
+ <!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
99
+
100
+ ## Custom Component Registration for Version Management
101
+
102
+ There are two key parts to every Auro component: the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom element definition. The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
103
+
104
+ When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
105
+
106
+ However, if you need to load multiple versions of the same component on a single page (for example, when two projects depend on different versions), you can manually register the class under a custom element name to avoid conflicts.
107
+
108
+ You can do this by importing only the component class and using the `register(name)` method with a unique name:
109
+
110
+ ```js
111
+ // Import the class only
112
+ import { AuroRadio, AuroRadioGroup } from '@aurodesignsystem/auro-formkit/auro-radio/class';
113
+
114
+ // Register with a custom name if desired
115
+ AuroRadio.register('custom-radio');
116
+ AuroRadioGroup.register('custom-radio-group');
117
+ ```
118
+
119
+ This will create a new custom element `<custom-radio>` and `<custom-radio-group>` that behaves exactly like `<auro-radio>` and `<auro-radio-group>`, allowing both to coexist on the same page without interfering with each other.
120
+
121
+ <div class="exampleWrapper exampleWrapper--flex">
122
+ <custom-radio-group>
123
+ <span slot="legend">Form label goes here</span>
124
+ <custom-radio id="customRadio1" label="Yes" name="radioDemo" value="yes"></custom-radio>
125
+ <custom-radio id="customRadio2" label="No" name="radioDemo" value="no"></custom-radio>
126
+ <custom-radio id="customRadio3" label="Maybe" name="radioDemo" value="maybe"></custom-radio>
127
+ </custom-radio-group>
128
+ </div>
129
+ <auro-accordion alignRight>
130
+ <span slot="trigger">See code</span>
131
+
132
+ ```html
133
+ <custom-radio-group>
134
+ <span slot="legend">Form label goes here</span>
135
+ <custom-radio id="customRadio1" label="Yes" name="radioDemo" value="yes"></custom-radio>
136
+ <custom-radio id="customRadio2" label="No" name="radioDemo" value="no"></custom-radio>
137
+ <custom-radio id="customRadio3" label="Maybe" name="radioDemo" value="maybe"></custom-radio>
138
+ </custom-radio-group>
139
+ ```
140
+ </auro-accordion>
137
141
  <!-- AURO-GENERATED-CONTENT:END -->
@@ -1,13 +1,13 @@
1
+ import { resetStateExample } from "../apiExamples/reset-state";
1
2
  import { dynamicExample } from "../apiExamples/dynamic";
2
- import { resetStateExample } from "../apiExamples/resetState";
3
3
  import './index.js';
4
4
 
5
5
  export function initExamples(initCount) {
6
6
  initCount = initCount || 0;
7
7
 
8
8
  try {
9
- dynamicExample();
10
9
  resetStateExample();
10
+ dynamicExample();
11
11
  } catch (error) {
12
12
  if (initCount <= 20) {
13
13
  // setTimeout handles issue where content is sometimes loaded after the functions get called