@aurodesignsystem-dev/auro-formkit 0.0.0-pr1483.1 → 0.0.0-pr1483.11

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 (54) hide show
  1. package/components/checkbox/demo/customize.min.js +1 -1
  2. package/components/checkbox/demo/getting-started.min.js +1 -1
  3. package/components/checkbox/demo/index.min.js +1 -1
  4. package/components/checkbox/dist/index.js +1 -1
  5. package/components/checkbox/dist/registered.js +1 -1
  6. package/components/combobox/demo/customize.min.js +5 -5
  7. package/components/combobox/demo/getting-started.min.js +5 -5
  8. package/components/combobox/demo/index.min.js +5 -5
  9. package/components/combobox/demo/keyboard-behavior.md +68 -8
  10. package/components/combobox/dist/index.js +5 -5
  11. package/components/combobox/dist/registered.js +5 -5
  12. package/components/counter/demo/customize.min.js +2 -2
  13. package/components/counter/demo/index.min.js +2 -2
  14. package/components/counter/dist/index.js +1 -1
  15. package/components/counter/dist/registered.js +1 -1
  16. package/components/datepicker/demo/api.md +52 -51
  17. package/components/datepicker/demo/customize.md +61 -15
  18. package/components/datepicker/demo/index.md +23 -0
  19. package/components/datepicker/demo/index.min.js +5096 -1044
  20. package/components/datepicker/dist/index.js +4590 -538
  21. package/components/datepicker/dist/registered.js +4590 -538
  22. package/components/datepicker/dist/src/auro-calendar-cell.d.ts +3 -1
  23. package/components/datepicker/dist/src/auro-calendar-month.d.ts +23 -0
  24. package/components/datepicker/dist/src/auro-calendar.d.ts +15 -0
  25. package/components/datepicker/dist/src/auro-datepicker.d.ts +63 -21
  26. package/components/datepicker/dist/src/utilities.d.ts +0 -20
  27. package/components/datepicker/dist/src/utilitiesCalendar.d.ts +0 -1
  28. package/components/dropdown/demo/customize.min.js +1 -1
  29. package/components/dropdown/demo/getting-started.min.js +1 -1
  30. package/components/dropdown/demo/index.min.js +1 -1
  31. package/components/dropdown/dist/index.js +1 -1
  32. package/components/dropdown/dist/registered.js +1 -1
  33. package/components/form/demo/customize.min.js +5187 -1133
  34. package/components/form/demo/getting-started.min.js +5187 -1133
  35. package/components/form/demo/index.min.js +5187 -1133
  36. package/components/form/demo/registerDemoDeps.min.js +5187 -1133
  37. package/components/input/demo/customize.md +1 -0
  38. package/components/input/demo/customize.min.js +1 -1
  39. package/components/input/demo/getting-started.md +10 -1
  40. package/components/input/demo/getting-started.min.js +1 -1
  41. package/components/input/demo/index.min.js +1 -1
  42. package/components/input/dist/index.js +1 -1
  43. package/components/input/dist/registered.js +1 -1
  44. package/components/radio/demo/index.min.js +1 -1
  45. package/components/radio/dist/index.js +1 -1
  46. package/components/radio/dist/registered.js +1 -1
  47. package/components/select/demo/customize.min.js +20 -18
  48. package/components/select/demo/getting-started.min.js +20 -18
  49. package/components/select/demo/index.min.js +20 -18
  50. package/components/select/demo/keyboard-behavior.md +54 -8
  51. package/components/select/dist/index.js +20 -18
  52. package/components/select/dist/registered.js +20 -18
  53. package/custom-elements.json +145 -117
  54. package/package.json +3 -3
@@ -19,7 +19,8 @@
19
19
  <auro-anchorlink fluid href="#customValidation" class="level2 body-xs">Custom Validation</auro-anchorlink>
20
20
  <auro-anchorlink fluid href="#noValidate" class="level2 body-xs">No Validation</auro-anchorlink>
21
21
  <auro-anchorlink fluid href="#minMaxDate" class="level2 body-xs">Min/Max Date</auro-anchorlink>
22
- <auro-anchorlink fluid href="#localization" class="level2 body-xs">Localization</auro-anchorlink>
22
+ <auro-anchorlink fluid href="#regionalDate" class="level2 body-xs">Regional Date</auro-anchorlink>
23
+ <auro-anchorlink fluid href="#monthNames" class="level2 body-xs">Month Names</auro-anchorlink>
23
24
  </auro-nav>
24
25
  </nav>
25
26
  <div class="mainContent">
@@ -694,27 +695,72 @@
694
695
  <!-- AURO-GENERATED-CONTENT:END -->
695
696
  </auro-accordion>
696
697
  <auro-header level="3" id="localization">Localization</auro-header>
697
- <p>Use the <code>centralDate</code>, locale, and related attributes to configure the datepicker for different regions and languages.</p>
698
+ <auro-header level="4" id="regionalDate">Regional Date</auro-header>
699
+ <p>When the <code>locale</code> attribute is set, the component automatically derives the correct date format for that region — no need to set <code>format</code> manually. For example, <code>locale="en-US"</code> produces <code>mm/dd/yyyy</code>, <code>locale="de-DE"</code> produces <code>dd.mm.yyyy</code>, and <code>locale="ja-JP"</code> produces <code>yyyy/mm/dd</code>.</p>
700
+ <p>If <code>format</code> is explicitly set alongside <code>locale</code>, <code>format</code> always wins. Use this when a specific format is required regardless of region.</p>
701
+ <p>If no <code>locale</code> attribute is set on the element, the component walks up the DOM looking for the nearest ancestor with a <code>data-locale</code> attribute and uses that value. If none is found, it defaults to <code>en-US</code>.</p>
702
+ <auro-header level="4" id="monthNames">Month Names</auro-header>
703
+ <p>The <code>monthNames</code> attribute accepts an array of 12 month name strings displayed in the calendar header. When <code>monthNames</code> is <strong>not</strong> set, the component automatically derives localized month names from the active <code>locale</code> (falling back to <code>en-US</code> if no locale is set).</p>
704
+ <p>Use <code>monthNames</code> only when you need to override the locale-derived names — for example, to supply translated names that differ from the browser's built-in <code>Intl</code> output, or to support a locale the browser does not recognize.</p>
705
+ <pre><code>// Override month names (all 12 required, starting with January)
706
+ datepicker.monthNames = [
707
+ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
708
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
709
+ ];</code></pre>
698
710
  <div class="exampleWrapper">
699
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/localization.html) -->
700
- <!-- The below content is automatically added from ./../apiExamples/localization.html -->
701
- <auro-datepicker format="yyyy/mm/dd" id="localizationExample">
702
- <span slot="bib.fullscreen.headline">Localization Headline</span>
703
- <span slot="fromLabel">Choose a date</span>
704
- <span slot="bib.fullscreen.fromLabel">Choose a date</span>
711
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/locale.html) -->
712
+ <!-- The below content is automatically added from ./../apiExamples/locale.html -->
713
+ <div data-locale="de-DE">
714
+ <auro-datepicker locale="en-US">
715
+ <span slot="fromLabel">en-US Date</span>
716
+ <span slot="helpText">Help Text</span>
717
+ </auro-datepicker>
718
+ <auro-datepicker locale="de-DE">
719
+ <span slot="fromLabel">de-DE Date</span>
720
+ <span slot="helpText">Help Text</span>
721
+ </auro-datepicker>
722
+ <auro-datepicker locale="zh-CN">
723
+ <span slot="fromLabel">zh-CN Date</span>
724
+ <span slot="helpText">Help Text</span>
725
+ </auro-datepicker>
726
+ <auro-datepicker>
727
+ <span slot="fromLabel">Nearest `data-locale` attribute format (`de-DE` in this case)</span>
728
+ <span slot="helpText">Help Text</span>
729
+ </auro-datepicker>
730
+ <auro-datepicker locale="ja-JP" format="mm/dd/yyyy">
731
+ <span slot="fromLabel">ja-JP locale with explicit mm/dd/yyyy format</span>
732
+ <span slot="helpText">Help Text</span>
705
733
  </auro-datepicker>
734
+ </div>
706
735
  <!-- AURO-GENERATED-CONTENT:END -->
707
736
  </div>
708
737
  <auro-accordion alignRight>
709
738
  <span slot="trigger">See code</span>
710
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/localization.html) -->
711
- <!-- The below code snippet is automatically added from ./../apiExamples/localization.html -->
739
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/locale.html) -->
740
+ <!-- The below code snippet is automatically added from ./../apiExamples/locale.html -->
712
741
 
713
- <pre class="language-html"><code class="language-html">&lt;auro-datepicker format="yyyy/mm/dd" id="localizationExample"&gt;
714
- &lt;span slot="bib.fullscreen.headline"&gt;Localization Headline&lt;/span&gt;
715
- &lt;span slot="fromLabel"&gt;Choose a date&lt;/span&gt;
716
- &lt;span slot="bib.fullscreen.fromLabel"&gt;Choose a date&lt;/span&gt;
717
- &lt;/auro-datepicker&gt;</code></pre>
742
+ <pre class="language-html"><code class="language-html">&lt;div data-locale="de-DE"&gt;
743
+ &lt;auro-datepicker locale="en-US"&gt;
744
+ &lt;span slot="fromLabel"&gt;en-US Date&lt;/span&gt;
745
+ &lt;span slot="helpText"&gt;Help Text&lt;/span&gt;
746
+ &lt;/auro-datepicker&gt;
747
+ &lt;auro-datepicker locale="de-DE"&gt;
748
+ &lt;span slot="fromLabel"&gt;de-DE Date&lt;/span&gt;
749
+ &lt;span slot="helpText"&gt;Help Text&lt;/span&gt;
750
+ &lt;/auro-datepicker&gt;
751
+ &lt;auro-datepicker locale="zh-CN"&gt;
752
+ &lt;span slot="fromLabel"&gt;zh-CN Date&lt;/span&gt;
753
+ &lt;span slot="helpText"&gt;Help Text&lt;/span&gt;
754
+ &lt;/auro-datepicker&gt;
755
+ &lt;auro-datepicker&gt;
756
+ &lt;span slot="fromLabel"&gt;Nearest `data-locale` attribute format (`de-DE` in this case)&lt;/span&gt;
757
+ &lt;span slot="helpText"&gt;Help Text&lt;/span&gt;
758
+ &lt;/auro-datepicker&gt;
759
+ &lt;auro-datepicker locale="ja-JP" format="mm/dd/yyyy"&gt;
760
+ &lt;span slot="fromLabel"&gt;ja-JP locale with explicit mm/dd/yyyy format&lt;/span&gt;
761
+ &lt;span slot="helpText"&gt;Help Text&lt;/span&gt;
762
+ &lt;/auro-datepicker&gt;
763
+ &lt;/div&gt;</code></pre>
718
764
  <!-- AURO-GENERATED-CONTENT:END -->
719
765
  </auro-accordion>
720
766
  </section>
@@ -10,6 +10,7 @@
10
10
  <auro-anchorlink fluid href="#selectRange" class="level2 body-xs">Select a Range</auro-anchorlink>
11
11
  <auro-anchorlink fluid href="#presetValue" class="level2 body-xs">Preset Value</auro-anchorlink>
12
12
  <auro-anchorlink fluid href="#skipSelection" class="level2 body-xs">Skip Selection</auro-anchorlink>
13
+ <auro-anchorlink fluid href="#regionalDateFormat" class="level2 body-xs">Regional Date</auro-anchorlink>
13
14
  <auro-anchorlink fluid href="#viewportSize" class="level2 body-xs">Viewport Size</auro-anchorlink>
14
15
  </auro-nav>
15
16
  </nav>
@@ -167,6 +168,28 @@
167
168
  <auro-header level="3" id="skipSelection">Skip selection</auro-header>
168
169
  <p>The datepicker does not force the user to select a date. If no selection is made and the field is not <code>required</code>, the user can move past the datepicker without entering a value.</p>
169
170
  <p>If the field is <code>required</code>, moving focus away without selecting a date triggers validation and renders the <code>valueMissing</code> error state.</p>
171
+ <auro-header level="3" id="regionalDateFormat">Regional date format support</auro-header>
172
+ <p>People around the world write dates differently. A traveler in the United States expects to see <strong>12/25/2025</strong>, while someone in Germany expects <strong>25.12.2025</strong>, and someone in Japan expects <strong>2025/12/25</strong>. Showing the wrong format causes confusion and mistakes.</p>
173
+ <p>When the datepicker knows the user's region via the <code>locale</code> attribute, it automatically displays dates in the format that looks natural to them — no extra setup required.</p>
174
+ <div class="exampleWrapper">
175
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/locale-single.html) -->
176
+ <!-- The below content is automatically added from ./../apiExamples/locale-single.html -->
177
+ <auro-datepicker locale="zh-CN">
178
+ <span slot="fromLabel">zh-CN Date</span>
179
+ <span slot="helpText">Help Text</span>
180
+ </auro-datepicker>
181
+ <!-- AURO-GENERATED-CONTENT:END -->
182
+ </div>
183
+ <auro-accordion alignRight>
184
+ <span slot="trigger">See code</span>
185
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/locale-single.html) -->
186
+ <!-- The below code snippet is automatically added from ./../apiExamples/locale-single.html -->
187
+ <pre class="language-html"><code class="language-html">&lt;auro-datepicker locale="zh-CN"&gt;
188
+ &lt;span slot="fromLabel"&gt;zh-CN Date&lt;/span&gt;
189
+ &lt;span slot="helpText"&gt;Help Text&lt;/span&gt;
190
+ &lt;/auro-datepicker&gt;</code></pre>
191
+ <!-- AURO-GENERATED-CONTENT:END -->
192
+ </auro-accordion>
170
193
  <auro-header level="3" id="viewportSize">Viewport size</auro-header>
171
194
  <p>The datepicker automatically adapts its presentation based on viewport size. On larger screens, the calendar opens in a floating popover anchored to the trigger. On smaller screens, the calendar opens in a fullscreen dialog.</p>
172
195
  <p>The breakpoint at which the fullscreen behavior activates is controlled by the <code>fullscreenBreakpoint</code> attribute. The default value is <code>sm</code>. Supported values are <code>xs</code>, <code>sm</code>, <code>md</code>, <code>lg</code>, <code>xl</code>, and <code>disabled</code>.</p>