playbook-ui 14.1.0 → 14.2.0
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.
- package/dist/.vite/manifest.json +30 -30
- package/dist/chunks/_typeahead-Cq7RLPBA.js +22 -0
- package/dist/chunks/_weekday_stacked-Cykj5kLZ.js +45 -0
- package/dist/chunks/lazysizes-B7xYodB-.js +1 -0
- package/dist/chunks/{lib-BE0Z3F7x.js → lib-DErGXNy3.js} +2 -2
- package/dist/chunks/{pb_form_validation-TzZQ0Flx.js → pb_form_validation-BC6kh7Hu.js} +1 -1
- package/dist/chunks/vendor.js +1 -1
- package/dist/pb_icon/_icon.d.ts +1 -1
- package/dist/pb_text_input/_text_input.d.ts +8 -0
- package/dist/playbook-doc.js +1 -1
- package/dist/playbook-rails-react-bindings.js +1 -1
- package/dist/playbook-rails.js +1 -1
- package/dist/playbook.css +1 -1
- package/dist/playbook.js +1 -1
- package/dist/tokens/container.scss +21 -0
- package/dist/utilities/globalProps.d.ts +4 -1
- package/package.json +2 -2
- package/dist/chunks/_typeahead-D6PRvP-1.js +0 -22
- package/dist/chunks/_weekday_stacked-DbdEuIzh.js +0 -45
- package/dist/chunks/lazysizes-DHz07jlL.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as PbEnhancedElement,d as debounce}from"./lib-
|
|
1
|
+
import{P as PbEnhancedElement,d as debounce}from"./lib-DErGXNy3.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;
|
package/dist/chunks/vendor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./_weekday_stacked-
|
|
1
|
+
import"./_weekday_stacked-Cykj5kLZ.js";import"./lazysizes-B7xYodB-.js";import"./_typeahead-Cq7RLPBA.js";import"./lib-DErGXNy3.js";import"react/jsx-runtime";import"react";import"react-dom";import"react-trix";import"trix";import"react-is";
|
package/dist/pb_icon/_icon.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ declare type IconProps = {
|
|
|
16
16
|
};
|
|
17
17
|
fixedWidth?: boolean;
|
|
18
18
|
flip?: "horizontal" | "vertical" | "both" | "none";
|
|
19
|
-
icon
|
|
19
|
+
icon?: string | ReactSVGElement;
|
|
20
20
|
htmlOptions?: {
|
|
21
21
|
[key: string]: string | number | boolean | (() => void);
|
|
22
22
|
};
|
|
@@ -68,6 +68,8 @@ declare const _default: React.ForwardRefExoticComponent<(Pick<{
|
|
|
68
68
|
margin?: "none" | import("../types").Sizes | "auto" | "initial" | "inherit";
|
|
69
69
|
break?: string;
|
|
70
70
|
default?: string;
|
|
71
|
+
} & {
|
|
72
|
+
minWidth?: import("../types").Sizes;
|
|
71
73
|
} & {
|
|
72
74
|
maxWidth?: import("../types").Sizes;
|
|
73
75
|
} & {
|
|
@@ -191,6 +193,8 @@ declare const _default: React.ForwardRefExoticComponent<(Pick<{
|
|
|
191
193
|
margin?: "none" | import("../types").Sizes | "auto" | "initial" | "inherit";
|
|
192
194
|
break?: string;
|
|
193
195
|
default?: string;
|
|
196
|
+
} & {
|
|
197
|
+
minWidth?: import("../types").Sizes;
|
|
194
198
|
} & {
|
|
195
199
|
maxWidth?: import("../types").Sizes;
|
|
196
200
|
} & {
|
|
@@ -312,6 +316,8 @@ declare const _default: React.ForwardRefExoticComponent<(Pick<{
|
|
|
312
316
|
margin?: "none" | import("../types").Sizes | "auto" | "initial" | "inherit";
|
|
313
317
|
break?: string;
|
|
314
318
|
default?: string;
|
|
319
|
+
} & {
|
|
320
|
+
minWidth?: import("../types").Sizes;
|
|
315
321
|
} & {
|
|
316
322
|
maxWidth?: import("../types").Sizes;
|
|
317
323
|
} & {
|
|
@@ -433,6 +439,8 @@ declare const _default: React.ForwardRefExoticComponent<(Pick<{
|
|
|
433
439
|
margin?: "none" | import("../types").Sizes | "auto" | "initial" | "inherit";
|
|
434
440
|
break?: string;
|
|
435
441
|
default?: string;
|
|
442
|
+
} & {
|
|
443
|
+
minWidth?: import("../types").Sizes;
|
|
436
444
|
} & {
|
|
437
445
|
maxWidth?: import("../types").Sizes;
|
|
438
446
|
} & {
|