playbook_ui 15.1.0.pre.alpha.PLAY2425textinputaccessibility10907 → 15.1.0.pre.alpha.PLAY2468phonenuminputvalidation10803

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.
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "15.1.0"
5
- VERSION = "15.1.0.pre.alpha.PLAY2425textinputaccessibility10907"
5
+ VERSION = "15.1.0.pre.alpha.PLAY2468phonenuminputvalidation10803"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 15.1.0.pre.alpha.PLAY2425textinputaccessibility10907
4
+ version: 15.1.0.pre.alpha.PLAY2468phonenuminputvalidation10803
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-09-30 00:00:00.000000000 Z
12
+ date: 2025-09-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -3175,7 +3175,6 @@ files:
3175
3175
  - app/pb_kits/playbook/pb_text_input/docs/_text_input_custom.jsx
3176
3176
  - app/pb_kits/playbook/pb_text_input/docs/_text_input_default.html.erb
3177
3177
  - app/pb_kits/playbook/pb_text_input/docs/_text_input_default.jsx
3178
- - app/pb_kits/playbook/pb_text_input/docs/_text_input_default.md
3179
3178
  - app/pb_kits/playbook/pb_text_input/docs/_text_input_default_swift.md
3180
3179
  - app/pb_kits/playbook/pb_text_input/docs/_text_input_disabled.html.erb
3181
3180
  - app/pb_kits/playbook/pb_text_input/docs/_text_input_disabled.jsx
@@ -3703,13 +3702,13 @@ files:
3703
3702
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3704
3703
  - app/pb_kits/playbook/utilities/text.ts
3705
3704
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3706
- - dist/chunks/_line_graph-BnK1i7QI.js
3707
- - dist/chunks/_typeahead-pbS3fEzb.js
3708
- - dist/chunks/_weekday_stacked-x-syST1P.js
3705
+ - dist/chunks/_line_graph-Bkn-wx30.js
3706
+ - dist/chunks/_typeahead-DkRYiut7.js
3707
+ - dist/chunks/_weekday_stacked-BUjWQnqn.js
3709
3708
  - dist/chunks/componentRegistry-DzmmLR2x.js
3710
3709
  - dist/chunks/lazysizes-B7xYodB-.js
3711
3710
  - dist/chunks/lib-QZuu1ltS.js
3712
- - dist/chunks/pb_form_validation-CleM960_.js
3711
+ - dist/chunks/pb_form_validation-B4uRmBwC.js
3713
3712
  - dist/chunks/vendor.js
3714
3713
  - dist/menu.yml
3715
3714
  - dist/playbook-doc.js
@@ -1 +0,0 @@
1
- Add an `id` to your Text Input so that clicking the label will move focus directly to the input.
@@ -1 +0,0 @@
1
- import{P as PbEnhancedElement,d as debounce}from"./lib-QZuu1ltS.js";const KIT_SELECTOR='[class^="pb_"][class*="_kit"]';const ERROR_MESSAGE_SELECTOR=".pb_body_kit_negative";const FORM_SELECTOR='form[data-pb-form-validation="true"]';const REQUIRED_FIELDS_SELECTOR="input[required],textarea[required],select[required]";const FIELD_EVENTS=["change","valid","invalid"];class PbFormValidation extends PbEnhancedElement{static get selector(){return FORM_SELECTOR}connect(){this.formValidationFields.forEach((field=>{FIELD_EVENTS.forEach((e=>{field.addEventListener(e,debounce((event=>{this.validateFormField(event)}),250),false)}))}))}validateFormField(event){event.preventDefault();const{target:target}=event;target.setCustomValidity("");const isValid=event.target.validity.valid;if(isValid){this.clearError(target)}else{this.showValidationMessage(target)}}showValidationMessage(target){const{parentElement:parentElement}=target;this.clearError(target);parentElement.closest(KIT_SELECTOR).classList.add("error");const errorMessageContainer=this.errorMessageContainer;if(target.dataset.message)target.setCustomValidity(target.dataset.message);errorMessageContainer.innerHTML=target.validationMessage;parentElement.appendChild(errorMessageContainer)}clearError(target){const{parentElement:parentElement}=target;parentElement.closest(KIT_SELECTOR).classList.remove("error");const errorMessageContainer=parentElement.querySelector(ERROR_MESSAGE_SELECTOR);if(errorMessageContainer)errorMessageContainer.remove()}get errorMessageContainer(){const errorContainer=document.createElement("div");const kitClassName=ERROR_MESSAGE_SELECTOR.replace(/\./,"");errorContainer.classList.add(kitClassName);return errorContainer}get formValidationFields(){return this._formValidationFields=this._formValidationFields||this.element.querySelectorAll(REQUIRED_FIELDS_SELECTOR)}}window.PbFormValidation=PbFormValidation;