@aurodesignsystem-dev/auro-formkit 0.0.0-pr1506.0 → 0.0.0-pr1506.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 (56) hide show
  1. package/components/checkbox/demo/customize.html +1 -2
  2. package/components/checkbox/demo/customize.min.js +1 -1
  3. package/components/checkbox/demo/getting-started.min.js +1 -1
  4. package/components/checkbox/demo/index.min.js +1 -1
  5. package/components/checkbox/dist/index.js +1 -1
  6. package/components/checkbox/dist/registered.js +1 -1
  7. package/components/combobox/demo/customize.html +1 -2
  8. package/components/combobox/demo/customize.md +108 -132
  9. package/components/combobox/demo/customize.min.js +26 -130
  10. package/components/combobox/demo/getting-started.min.js +26 -130
  11. package/components/combobox/demo/index.min.js +26 -130
  12. package/components/combobox/dist/index.js +26 -130
  13. package/components/combobox/dist/registered.js +26 -130
  14. package/components/counter/demo/customize.min.js +2 -2
  15. package/components/counter/demo/index.min.js +2 -2
  16. package/components/counter/dist/index.js +2 -2
  17. package/components/counter/dist/registered.js +2 -2
  18. package/components/datepicker/demo/customize.min.js +12 -124
  19. package/components/datepicker/demo/index.min.js +12 -124
  20. package/components/datepicker/dist/index.js +12 -124
  21. package/components/datepicker/dist/registered.js +12 -124
  22. package/components/dropdown/demo/customize.min.js +1 -1
  23. package/components/dropdown/demo/getting-started.min.js +1 -1
  24. package/components/dropdown/demo/index.min.js +1 -1
  25. package/components/dropdown/dist/index.js +1 -1
  26. package/components/dropdown/dist/registered.js +1 -1
  27. package/components/form/demo/customize.html +6 -6
  28. package/components/form/demo/customize.js +19 -0
  29. package/components/form/demo/customize.md +203 -51
  30. package/components/form/demo/customize.min.js +489 -419
  31. package/components/form/demo/getting-started.min.js +417 -419
  32. package/components/form/demo/index.min.js +417 -419
  33. package/components/form/demo/registerDemoDeps.min.js +54 -382
  34. package/components/form/dist/auro-form.d.ts +122 -4
  35. package/components/form/dist/index.js +363 -37
  36. package/components/form/dist/registered.js +363 -37
  37. package/components/input/demo/customize.html +1 -2
  38. package/components/input/demo/customize.min.js +10 -122
  39. package/components/input/demo/getting-started.min.js +10 -122
  40. package/components/input/demo/index.min.js +10 -122
  41. package/components/input/dist/base-input.d.ts +1 -49
  42. package/components/input/dist/index.js +10 -122
  43. package/components/input/dist/registered.js +10 -122
  44. package/components/radio/demo/customize.min.js +1 -1
  45. package/components/radio/demo/getting-started.min.js +1 -1
  46. package/components/radio/demo/index.min.js +1 -1
  47. package/components/radio/dist/index.js +1 -1
  48. package/components/radio/dist/registered.js +1 -1
  49. package/components/select/demo/customize.html +1 -2
  50. package/components/select/demo/customize.min.js +2 -2
  51. package/components/select/demo/getting-started.min.js +2 -2
  52. package/components/select/demo/index.min.js +2 -2
  53. package/components/select/dist/index.js +2 -2
  54. package/components/select/dist/registered.js +2 -2
  55. package/custom-elements.json +123 -266
  56. package/package.json +1 -1
@@ -10513,6 +10513,46 @@
10513
10513
  },
10514
10514
  "privacy": "private"
10515
10515
  },
10516
+ {
10517
+ "kind": "method",
10518
+ "name": "_isDisabled",
10519
+ "parameters": [
10520
+ {
10521
+ "name": "element",
10522
+ "description": "The element to check.",
10523
+ "type": {
10524
+ "text": "HTMLElement | undefined | null"
10525
+ }
10526
+ }
10527
+ ],
10528
+ "description": "Whether a given element is currently disabled. Disabled controls are excluded\nfrom submission, validity, and initial-state checks per the HTML spec\n(section 4.10.19.2 \"Enabling and disabling form controls\":\nhttps://www.w3.org/TR/2011/WD-html5-20110113/association-of-controls-and-forms.html).\n\nImplementation note: we deliberately read only the attribute. Every Auro\nform element in `formElementTags` declares `disabled` with `reflect: true`,\nso the attribute and property stay in sync. Reading the attribute also\nlets the MutationObserver in `connectedCallback` (which is filtered to\n`['disabled', 'name']`) be the single source of truth for re-renders.\nIf a future form-element type ships without attribute reflection, expand\nthis helper to also read `element.disabled`.",
10529
+ "return": {
10530
+ "type": {
10531
+ "text": "boolean"
10532
+ }
10533
+ },
10534
+ "privacy": "private"
10535
+ },
10536
+ {
10537
+ "kind": "method",
10538
+ "name": "_isNameDisabled",
10539
+ "parameters": [
10540
+ {
10541
+ "name": "name",
10542
+ "description": "The `name` attribute used to register the element.",
10543
+ "type": {
10544
+ "text": "string"
10545
+ }
10546
+ }
10547
+ ],
10548
+ "description": "Whether the tracked form element registered under `name` is currently disabled.\nSee `_isDisabled` for the HTML-spec rationale behind excluding disabled\ncontrols from form state.\n\nReads a cached flag on `formState[name]` populated by `_addElementToState`\nat registration and refreshed by `_handleAttributeMutations` whenever the\nelement's `disabled` attribute toggles. The cache is fed by the same\n`hasAttribute('disabled')` read as `_isDisabled`, so the \"future form-element\ntype without attribute reflection\" caveat documented there applies here too.",
10549
+ "return": {
10550
+ "type": {
10551
+ "text": "boolean"
10552
+ }
10553
+ },
10554
+ "privacy": "private"
10555
+ },
10516
10556
  {
10517
10557
  "kind": "method",
10518
10558
  "name": "_eventIsValidFormEvent",
@@ -10594,10 +10634,52 @@
10594
10634
  "privacy": "private",
10595
10635
  "readonly": true
10596
10636
  },
10637
+ {
10638
+ "kind": "method",
10639
+ "name": "_isFormValid",
10640
+ "description": "Raw constraint-validation check. Returns `true` when no enabled field\nhas a validity error. Unlike the public `validity` getter, this does\nNOT gate on `isInitialState` — callers that need to make a decision\nbased on the actual constraint state (submit-button enablement, the\ninternal `submit()` gate) read this so a pre-filled valid form is\ncorrectly recognized as submittable at first render.",
10641
+ "return": {
10642
+ "type": {
10643
+ "text": "boolean"
10644
+ }
10645
+ },
10646
+ "privacy": "private"
10647
+ },
10648
+ {
10649
+ "kind": "method",
10650
+ "name": "_hasResetableState",
10651
+ "description": "Whether the reset button should be enabled. True when the form has\ndiverged from its initial state (so the user can always return to\ndefaults — even if the dirty value lives behind a now-disabled field),\nOR when any non-disabled field has a current value or captured initial\nvalue (covers pre-filled forms and user-cleared-back-to-empty cases).",
10652
+ "return": {
10653
+ "type": {
10654
+ "text": "boolean"
10655
+ }
10656
+ },
10657
+ "privacy": "private"
10658
+ },
10659
+ {
10660
+ "kind": "method",
10661
+ "name": "_normalizeEmpty",
10662
+ "parameters": [
10663
+ {
10664
+ "name": "value",
10665
+ "description": "Value to normalize.",
10666
+ "type": {
10667
+ "text": "*"
10668
+ }
10669
+ }
10670
+ ],
10671
+ "description": "Collapse empty representations to a single canonical `null`.\n\n`_addElementToState` captures `null` for a field that mounts without a\n`value` attribute (`element.value || element.getAttribute('value')` is\nfalsy → resolves to `null`), but `sharedInputListener` later stores the\nraw `event.target.value` — which is `''` for a user-cleared text input.\nWithout this normalization, backspacing back to empty would taint the\nform forever (`'' !== null`) and Reset would stay enabled with nothing\nto actually reset.\n\n`''`, `undefined`, and `[]` all collapse to `null`. The empty-array case\ncovers checkbox-group, radio-group, and multiselect, where `[]` means\n\"no selection\" — semantically the same as `null`/`''`. Genuine values\n— including `0`, `false`, non-empty strings, and non-empty arrays —\npass through unchanged so number, boolean, and populated multi-value\nfields still compare correctly.",
10672
+ "return": {
10673
+ "type": {
10674
+ "text": "*"
10675
+ }
10676
+ },
10677
+ "privacy": "private"
10678
+ },
10597
10679
  {
10598
10680
  "kind": "method",
10599
10681
  "name": "_calculateValidity",
10600
- "description": "Infer validity status based on current formState.",
10682
+ "description": "Infer validity status based on current formState.\n\nValidity stays `null` while the form is in its initial state — this is\nthe \"stay quiet until the user interacts\" UX contract that consumers\ndepend on to delay error indicators. Code that needs the raw\nconstraint-validation result regardless of interaction (e.g.,\nsubmit-button enablement) should call `_isFormValid()` directly.",
10601
10683
  "privacy": "private"
10602
10684
  },
10603
10685
  {
@@ -10614,7 +10696,7 @@
10614
10696
  {
10615
10697
  "kind": "method",
10616
10698
  "name": "_setInitialState",
10617
- "description": "Determines whether the form is in its initial (untouched) state and updates `_isInitialState` accordingly.",
10699
+ "description": "Determines whether the form is in its initial (untouched) state.\n\nA field is tainted if either:\n - its value differs from the value captured on first render, OR\n - its validity is failing (anything other than `null` or `'valid'`).\n\nValidity acts as a backup signal: it catches users who interact with a\nfield without changing its value (e.g., focusing and blurring a required\nfield). We skip `null` (not yet validated) and `'valid'` (the default\nafter Auro's auto-validation on mount) because neither proves the user\ntouched anything.",
10618
10700
  "return": {
10619
10701
  "type": {
10620
10702
  "text": "void"
@@ -10774,6 +10856,26 @@
10774
10856
  },
10775
10857
  "privacy": "private"
10776
10858
  },
10859
+ {
10860
+ "kind": "method",
10861
+ "name": "_handleAttributeMutations",
10862
+ "parameters": [
10863
+ {
10864
+ "name": "mutations",
10865
+ "description": "The batched mutation records.",
10866
+ "type": {
10867
+ "text": "MutationRecord[]"
10868
+ }
10869
+ }
10870
+ ],
10871
+ "description": "Handle batched MutationObserver records for `disabled` and `name`\nattribute changes on tracked form elements. A `name` change invalidates\nthe formState keying — we resolve it by re-initializing state. A `disabled`\nchange simply needs a re-render (so `value` / `validity` getters re-evaluate)\nand a refresh of the submit/reset button enablement.",
10872
+ "return": {
10873
+ "type": {
10874
+ "text": "void"
10875
+ }
10876
+ },
10877
+ "privacy": "private"
10878
+ },
10777
10879
  {
10778
10880
  "kind": "method",
10779
10881
  "name": "mutationEventListener",
@@ -10867,6 +10969,25 @@
10867
10969
  },
10868
10970
  "privacy": "private",
10869
10971
  "default": "[]"
10972
+ },
10973
+ {
10974
+ "kind": "field",
10975
+ "name": "_initialValues",
10976
+ "type": {
10977
+ "text": "Record<string, string | number | boolean | string[] | null | undefined>"
10978
+ },
10979
+ "description": "Captured initial (default) value per field `name`. Populated on first\nsight of each name in `_addElementToState` and preserved across\nsubsequent `initializeState` cycles (slot change, rename, reset) so\n`_setInitialState` can detect user edits as `current !== initial`,\nmatching HTML's `dirtyValueFlag` semantics.",
10980
+ "privacy": "private",
10981
+ "default": "{}"
10982
+ },
10983
+ {
10984
+ "kind": "field",
10985
+ "name": "_attributeObserver",
10986
+ "type": {
10987
+ "text": "MutationObserver | null"
10988
+ },
10989
+ "privacy": "private",
10990
+ "default": "null"
10870
10991
  }
10871
10992
  ],
10872
10993
  "events": [
@@ -11716,61 +11837,6 @@
11716
11837
  "module": "components/input/src/base-input.js"
11717
11838
  }
11718
11839
  },
11719
- {
11720
- "kind": "method",
11721
- "name": "_computeDateObjectFallback",
11722
- "parameters": [
11723
- {
11724
- "name": "dateStr",
11725
- "description": "ISO date string from `value`/`min`/`max`.",
11726
- "type": {
11727
- "text": "string|undefined"
11728
- }
11729
- }
11730
- ],
11731
- "description": "Parses a date string into a Date object when the corresponding `_*Object`\nfield hasn't been synced yet by `updated()`. Returns undefined when the\ninput type/format isn't a full date or the string is not a valid date.\n\nWhy this exists: a parent (datepicker) can call `inputN.validate()` from\ninside its own `updated()` before this input's `updated()` has run\n`syncDateValues()` — so `_valueObject`/`_maxObject` are still `undefined`\nand range checks would otherwise silently no-op (flipping the result to\n`valid` or `patternMismatch`).",
11732
- "privacy": "private",
11733
- "return": {
11734
- "type": {
11735
- "text": "Date|undefined"
11736
- }
11737
- },
11738
- "inheritedFrom": {
11739
- "name": "BaseInput",
11740
- "module": "components/input/src/base-input.js"
11741
- }
11742
- },
11743
- {
11744
- "kind": "method",
11745
- "name": "setDateObjectProperty",
11746
- "parameters": [
11747
- {
11748
- "name": "propertyName",
11749
- "description": "Public object property name.",
11750
- "type": {
11751
- "text": "'valueObject'|'minObject'|'maxObject'"
11752
- }
11753
- },
11754
- {
11755
- "name": "propertyValue",
11756
- "description": "Value to assign.",
11757
- "type": {
11758
- "text": "Date|undefined"
11759
- }
11760
- }
11761
- ],
11762
- "description": "Internal setter for readonly date object properties.",
11763
- "privacy": "private",
11764
- "return": {
11765
- "type": {
11766
- "text": "void"
11767
- }
11768
- },
11769
- "inheritedFrom": {
11770
- "name": "BaseInput",
11771
- "module": "components/input/src/base-input.js"
11772
- }
11773
- },
11774
11840
  {
11775
11841
  "kind": "method",
11776
11842
  "name": "patchInputEvent",
@@ -11824,70 +11890,6 @@
11824
11890
  "module": "components/input/src/base-input.js"
11825
11891
  }
11826
11892
  },
11827
- {
11828
- "kind": "method",
11829
- "name": "syncDateValues",
11830
- "parameters": [
11831
- {
11832
- "name": "changedProperties",
11833
- "default": "undefined",
11834
- "description": "Optional map of changed properties used to limit which values are synchronized.",
11835
- "optional": true,
11836
- "type": {
11837
- "text": "Map<string, unknown>|undefined"
11838
- }
11839
- }
11840
- ],
11841
- "description": "Synchronizes the ISO string values and Date object representations for date-related properties.\nThis keeps the model and display values aligned when either side changes.\n\nWhen a full date format is in use, this method updates `value`, `min`, and `max` from their corresponding\nDate objects or vice versa, based on which properties have changed. It only runs when the current configuration\nrepresents a full year/month/day date format.",
11842
- "return": {
11843
- "type": {
11844
- "text": "void"
11845
- }
11846
- },
11847
- "privacy": "private",
11848
- "inheritedFrom": {
11849
- "name": "BaseInput",
11850
- "module": "components/input/src/base-input.js"
11851
- }
11852
- },
11853
- {
11854
- "kind": "method",
11855
- "name": "syncSingleDateValue",
11856
- "parameters": [
11857
- {
11858
- "name": "changedProperties",
11859
- "description": "Map of changed properties from Lit.",
11860
- "type": {
11861
- "text": "Map<string, unknown>|undefined"
11862
- }
11863
- },
11864
- {
11865
- "name": "objectProperty",
11866
- "description": "Date object property name.",
11867
- "type": {
11868
- "text": "string"
11869
- }
11870
- },
11871
- {
11872
- "name": "valueProperty",
11873
- "description": "ISO string property name.",
11874
- "type": {
11875
- "text": "string"
11876
- }
11877
- }
11878
- ],
11879
- "description": "Synchronizes one date object/string property pair.",
11880
- "privacy": "private",
11881
- "return": {
11882
- "type": {
11883
- "text": "void"
11884
- }
11885
- },
11886
- "inheritedFrom": {
11887
- "name": "BaseInput",
11888
- "module": "components/input/src/base-input.js"
11889
- }
11890
- },
11891
11893
  {
11892
11894
  "kind": "method",
11893
11895
  "name": "configureAutoFormatting",
@@ -12263,15 +12265,6 @@
12263
12265
  "module": "components/input/src/base-input.js"
12264
12266
  }
12265
12267
  },
12266
- {
12267
- "kind": "field",
12268
- "name": "_maxObject",
12269
- "default": "undefined",
12270
- "inheritedFrom": {
12271
- "name": "BaseInput",
12272
- "module": "components/input/src/base-input.js"
12273
- }
12274
- },
12275
12268
  {
12276
12269
  "kind": "field",
12277
12270
  "name": "maxLength",
@@ -12303,15 +12296,6 @@
12303
12296
  "module": "components/input/src/base-input.js"
12304
12297
  }
12305
12298
  },
12306
- {
12307
- "kind": "field",
12308
- "name": "_minObject",
12309
- "default": "undefined",
12310
- "inheritedFrom": {
12311
- "name": "BaseInput",
12312
- "module": "components/input/src/base-input.js"
12313
- }
12314
- },
12315
12299
  {
12316
12300
  "kind": "field",
12317
12301
  "name": "minLength",
@@ -12420,15 +12404,6 @@
12420
12404
  "module": "components/input/src/base-input.js"
12421
12405
  }
12422
12406
  },
12423
- {
12424
- "kind": "field",
12425
- "name": "_valueObject",
12426
- "default": "undefined",
12427
- "inheritedFrom": {
12428
- "name": "BaseInput",
12429
- "module": "components/input/src/base-input.js"
12430
- }
12431
- },
12432
12407
  {
12433
12408
  "kind": "field",
12434
12409
  "name": "a11yRole",
@@ -13827,53 +13802,6 @@
13827
13802
  },
13828
13803
  "readonly": true
13829
13804
  },
13830
- {
13831
- "kind": "method",
13832
- "name": "_computeDateObjectFallback",
13833
- "parameters": [
13834
- {
13835
- "name": "dateStr",
13836
- "description": "ISO date string from `value`/`min`/`max`.",
13837
- "type": {
13838
- "text": "string|undefined"
13839
- }
13840
- }
13841
- ],
13842
- "description": "Parses a date string into a Date object when the corresponding `_*Object`\nfield hasn't been synced yet by `updated()`. Returns undefined when the\ninput type/format isn't a full date or the string is not a valid date.\n\nWhy this exists: a parent (datepicker) can call `inputN.validate()` from\ninside its own `updated()` before this input's `updated()` has run\n`syncDateValues()` — so `_valueObject`/`_maxObject` are still `undefined`\nand range checks would otherwise silently no-op (flipping the result to\n`valid` or `patternMismatch`).",
13843
- "privacy": "private",
13844
- "return": {
13845
- "type": {
13846
- "text": "Date|undefined"
13847
- }
13848
- }
13849
- },
13850
- {
13851
- "kind": "method",
13852
- "name": "setDateObjectProperty",
13853
- "parameters": [
13854
- {
13855
- "name": "propertyName",
13856
- "description": "Public object property name.",
13857
- "type": {
13858
- "text": "'valueObject'|'minObject'|'maxObject'"
13859
- }
13860
- },
13861
- {
13862
- "name": "propertyValue",
13863
- "description": "Value to assign.",
13864
- "type": {
13865
- "text": "Date|undefined"
13866
- }
13867
- }
13868
- ],
13869
- "description": "Internal setter for readonly date object properties.",
13870
- "privacy": "private",
13871
- "return": {
13872
- "type": {
13873
- "text": "void"
13874
- }
13875
- }
13876
- },
13877
13805
  {
13878
13806
  "kind": "method",
13879
13807
  "name": "patchInputEvent",
@@ -13915,62 +13843,6 @@
13915
13843
  }
13916
13844
  }
13917
13845
  },
13918
- {
13919
- "kind": "method",
13920
- "name": "syncDateValues",
13921
- "parameters": [
13922
- {
13923
- "name": "changedProperties",
13924
- "default": "undefined",
13925
- "description": "Optional map of changed properties used to limit which values are synchronized.",
13926
- "optional": true,
13927
- "type": {
13928
- "text": "Map<string, unknown>|undefined"
13929
- }
13930
- }
13931
- ],
13932
- "description": "Synchronizes the ISO string values and Date object representations for date-related properties.\nThis keeps the model and display values aligned when either side changes.\n\nWhen a full date format is in use, this method updates `value`, `min`, and `max` from their corresponding\nDate objects or vice versa, based on which properties have changed. It only runs when the current configuration\nrepresents a full year/month/day date format.",
13933
- "return": {
13934
- "type": {
13935
- "text": "void"
13936
- }
13937
- },
13938
- "privacy": "private"
13939
- },
13940
- {
13941
- "kind": "method",
13942
- "name": "syncSingleDateValue",
13943
- "parameters": [
13944
- {
13945
- "name": "changedProperties",
13946
- "description": "Map of changed properties from Lit.",
13947
- "type": {
13948
- "text": "Map<string, unknown>|undefined"
13949
- }
13950
- },
13951
- {
13952
- "name": "objectProperty",
13953
- "description": "Date object property name.",
13954
- "type": {
13955
- "text": "string"
13956
- }
13957
- },
13958
- {
13959
- "name": "valueProperty",
13960
- "description": "ISO string property name.",
13961
- "type": {
13962
- "text": "string"
13963
- }
13964
- }
13965
- ],
13966
- "description": "Synchronizes one date object/string property pair.",
13967
- "privacy": "private",
13968
- "return": {
13969
- "type": {
13970
- "text": "void"
13971
- }
13972
- }
13973
- },
13974
13846
  {
13975
13847
  "kind": "method",
13976
13848
  "name": "configureAutoFormatting",
@@ -14258,11 +14130,6 @@
14258
14130
  "default": "undefined",
14259
14131
  "attribute": "max"
14260
14132
  },
14261
- {
14262
- "kind": "field",
14263
- "name": "_maxObject",
14264
- "default": "undefined"
14265
- },
14266
14133
  {
14267
14134
  "kind": "field",
14268
14135
  "name": "maxLength",
@@ -14286,11 +14153,6 @@
14286
14153
  "default": "undefined",
14287
14154
  "attribute": "min"
14288
14155
  },
14289
- {
14290
- "kind": "field",
14291
- "name": "_minObject",
14292
- "default": "undefined"
14293
- },
14294
14156
  {
14295
14157
  "kind": "field",
14296
14158
  "name": "minLength",
@@ -14383,11 +14245,6 @@
14383
14245
  "default": "undefined",
14384
14246
  "attribute": "value"
14385
14247
  },
14386
- {
14387
- "kind": "field",
14388
- "name": "_valueObject",
14389
- "default": "undefined"
14390
- },
14391
14248
  {
14392
14249
  "kind": "field",
14393
14250
  "name": "a11yRole",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurodesignsystem-dev/auro-formkit",
3
- "version": "0.0.0-pr1506.0",
3
+ "version": "0.0.0-pr1506.2",
4
4
  "description": "A collection of web components used to build forms.",
5
5
  "homepage": "https://github.com/AlaskaAirlines/auro-formkit#readme",
6
6
  "bugs": {