@bookjane2/bookjane-design-library 9.0.2 → 9.0.4

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 (23) hide show
  1. package/lib/components/BKJPhoneNumberInput/BKJPhoneNumberInput.d.ts.map +1 -1
  2. package/lib/components/BKJPhoneNumberInput/BKJPhoneNumberInput.js +15 -2
  3. package/lib/components/BKJPhoneNumberInput/BKJPhoneNumberInput.js.map +1 -1
  4. package/lib/components/BKJPhoneNumberInput/BKJPhoneNumberInput.stories.d.ts +9 -2
  5. package/lib/components/BKJPhoneNumberInput/BKJPhoneNumberInput.stories.d.ts.map +1 -1
  6. package/lib/components/BKJPhoneNumberInput/BKJPhoneNumberInput.stories.js +20 -3
  7. package/lib/components/BKJPhoneNumberInput/BKJPhoneNumberInput.stories.js.map +1 -1
  8. package/lib/components/BKJPhoneNumberInput/BKJPhoneNumberInput.test.js +120 -5
  9. package/lib/components/BKJPhoneNumberInput/BKJPhoneNumberInput.test.js.map +1 -1
  10. package/lib/components/BKJTextInput/BKJTextInput.d.ts.map +1 -1
  11. package/lib/components/BKJTextInput/BKJTextInput.js +6 -3
  12. package/lib/components/BKJTextInput/BKJTextInput.js.map +1 -1
  13. package/lib/components/BKJTextInput/BKJTextInput.stories.d.ts +8 -1
  14. package/lib/components/BKJTextInput/BKJTextInput.stories.d.ts.map +1 -1
  15. package/lib/components/BKJTextInput/BKJTextInput.stories.js +32 -0
  16. package/lib/components/BKJTextInput/BKJTextInput.stories.js.map +1 -1
  17. package/lib/components/BKJTextInput/BKJTextInput.test.d.ts +2 -0
  18. package/lib/components/BKJTextInput/BKJTextInput.test.d.ts.map +1 -0
  19. package/lib/components/BKJTextInput/BKJTextInput.test.js +112 -0
  20. package/lib/components/BKJTextInput/BKJTextInput.test.js.map +1 -0
  21. package/lib/locales/en/en_US.json +3 -0
  22. package/lib/locales/fr/fr-CA.json +3 -0
  23. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"BKJPhoneNumberInput.d.ts","sourceRoot":"","sources":["../../../src/components/BKJPhoneNumberInput/BKJPhoneNumberInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,eAAO,MAAM,mBAAmB,8gMAoF/B,CAAC"}
1
+ {"version":3,"file":"BKJPhoneNumberInput.d.ts","sourceRoot":"","sources":["../../../src/components/BKJPhoneNumberInput/BKJPhoneNumberInput.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AASxE,eAAO,MAAM,mBAAmB,8gMA0F/B,CAAC"}
@@ -1,9 +1,22 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import IMask from 'imask';
3
+ import i18next from 'i18next';
3
4
  import { forwardRef, useCallback, useRef, useState } from 'react';
4
5
  import { BKJTextInput } from '../BKJTextInput/index.js';
6
+ const resolveDefaultPhoneFormatDescription = (maxLength) => {
7
+ if (!maxLength)
8
+ return undefined;
9
+ if (maxLength <= 10)
10
+ return i18next.t('PHONE_FORMAT_10_DIGIT');
11
+ if (maxLength === 11)
12
+ return i18next.t('PHONE_FORMAT_11_DIGIT');
13
+ return i18next.t('PHONE_FORMAT_12_DIGIT');
14
+ };
5
15
  export const BKJPhoneNumberInput = forwardRef((props, ref) => {
6
- const { onChange, value = '', name, maxLength, ...rest } = props;
16
+ const { onChange, value = '', name, maxLength, type, inputMode, description, ...rest } = props;
17
+ const effectiveType = type ?? 'tel';
18
+ const effectiveInputMode = inputMode ?? 'tel';
19
+ const effectiveDescription = description ?? resolveDefaultPhoneFormatDescription(maxLength);
7
20
  const inputRef = useRef(null);
8
21
  let mask = '';
9
22
  if (maxLength) {
@@ -58,6 +71,6 @@ export const BKJPhoneNumberInput = forwardRef((props, ref) => {
58
71
  ref.current = node;
59
72
  }
60
73
  }, [ref]);
61
- return (_jsx(BKJTextInput, { ...rest, name: name, ref: setRefs, value: displayValue, onChange: handleChange }));
74
+ return (_jsx(BKJTextInput, { ...rest, type: effectiveType, inputMode: effectiveInputMode, description: effectiveDescription, name: name, ref: setRefs, value: displayValue, onChange: handleChange }));
62
75
  });
63
76
  //# sourceMappingURL=BKJPhoneNumberInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BKJPhoneNumberInput.js","sourceRoot":"","sources":["../../../src/components/BKJPhoneNumberInput/BKJPhoneNumberInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C,MAAM,CAAC,MAAM,mBAAmB,GAAG,UAAU,CAC3C,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACb,MAAM,EAAE,QAAQ,EAAE,KAAK,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IACjE,MAAM,QAAQ,GAAG,MAAM,CAA0B,IAAI,CAAC,CAAC;IACvD,IAAI,IAAI,GAAW,EAAE,CAAC;IACtB,IAAI,SAAS,EAAE,CAAC;QACd,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,SAAS,IAAI,EAAE;gBAClB,IAAI,GAAG,mBAAmB,CAAC;gBAC3B,MAAM;YACR,KAAK,SAAS,KAAK,EAAE;gBACnB,IAAI,GAAG,kBAAkB,CAAC;gBAC1B,MAAM;YACR;gBACE,IAAI,GAAG,gBAAgB,CAAC;QAC5B,CAAC;IACH,CAAC;IAED,MAAM,iBAAiB,GAAG,KAAK,CAAC,UAAU,CAAC;QACzC,IAAI,EAAE,IAAI;KACX,CAAC,CAAC;IACH,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,iBAAiB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,C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YAAY,OACP,IAAI,EACR,IAAI,EAAE,aAAa,EACnB,SAAS,EAAE,kBAAkB,EAC7B,WAAW,EAAE,oBAAoB,EACjC,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,YAAY,GACtB,CACH,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
1
  import { IBKJPhoneNumberInputProps } from './BKJPhoneNumberInput.types.js';
3
2
  declare const setup: {
4
3
  title: string;
5
- component: React.ForwardRefExoticComponent<Pick<IBKJPhoneNumberInputProps, "target" | "name" | "value" | "label" | "checked" | "cite" | "data" | "form" | "slot" | "span" | "style" | "summary" | "title" | "id" | "selected" | "disabled" | "variant" | "type" | "start" | "hidden" | "color" | "content" | "size" | "default" | "wrap" | "open" | "multiple" | "width" | "css" | "isOpen" | "overrides" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "muted" | "nonce" | "noValidate" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "leftIconProps" | "rightIconProps" | "labelProps" | "fieldSetProps" | "description" | "isRequired" | "error" | "openBorderLocation" | "useFocusBorder"> & React.RefAttributes<HTMLInputElement>>;
4
+ component: import("react").ForwardRefExoticComponent<Pick<IBKJPhoneNumberInputProps, "target" | "name" | "value" | "label" | "checked" | "cite" | "data" | "form" | "slot" | "span" | "style" | "summary" | "title" | "id" | "selected" | "disabled" | "variant" | "type" | "start" | "hidden" | "color" | "content" | "size" | "default" | "wrap" | "open" | "multiple" | "width" | "css" | "isOpen" | "overrides" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "muted" | "nonce" | "noValidate" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "leftIconProps" | "rightIconProps" | "labelProps" | "fieldSetProps" | "description" | "isRequired" | "error" | "openBorderLocation" | "useFocusBorder"> & import("react").RefAttributes<HTMLInputElement>>;
6
5
  argTypes: {
7
6
  label: {
8
7
  name: string;
@@ -22,6 +21,12 @@ declare const setup: {
22
21
  disabled: {
23
22
  name: string;
24
23
  };
24
+ description: {
25
+ name: string;
26
+ control: {
27
+ type: string;
28
+ };
29
+ };
25
30
  value: {
26
31
  table: {
27
32
  disable: boolean;
@@ -30,5 +35,7 @@ declare const setup: {
30
35
  };
31
36
  };
32
37
  export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, IBKJPhoneNumberInputProps>;
38
+ export declare const WithError: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, IBKJPhoneNumberInputProps>;
39
+ export declare const WithCustomDescription: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, IBKJPhoneNumberInputProps>;
33
40
  export default setup;
34
41
  //# sourceMappingURL=BKJPhoneNumberInput.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BKJPhoneNumberInput.stories.d.ts","sourceRoot":"","sources":["../../../src/components/BKJPhoneNumberInput/BKJPhoneNumberInput.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAGrD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BV,CAAC;AAaF,eAAO,MAAM,OAAO,qHAAoB,CAAC;AAUzC,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"BKJPhoneNumberInput.stories.d.ts","sourceRoot":"","sources":["../../../src/components/BKJPhoneNumberInput/BKJPhoneNumberInput.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCV,CAAC;AAaF,eAAO,MAAM,OAAO,qHAAoB,CAAC;AAQzC,eAAO,MAAM,SAAS,qHAAoB,CAAC;AAO3C,eAAO,MAAM,qBAAqB,qHAAoB,CAAC;AAOvD,eAAe,KAAK,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import React, { useCallback, useState } from 'react';
2
+ import { useCallback, useState } from 'react';
3
3
  import { BKJPhoneNumberInput } from './BKJPhoneNumberInput.js';
4
4
  const setup = {
5
5
  title: 'Input Elements/BKJPhoneNumberInput',
@@ -23,6 +23,12 @@ const setup = {
23
23
  disabled: {
24
24
  name: 'Disabled',
25
25
  },
26
+ description: {
27
+ name: 'Description',
28
+ control: {
29
+ type: 'text',
30
+ },
31
+ },
26
32
  value: {
27
33
  table: {
28
34
  disable: true,
@@ -31,7 +37,7 @@ const setup = {
31
37
  },
32
38
  };
33
39
  const Template = (args) => {
34
- const [value, setValue] = useState('96969696921112222222222222');
40
+ const [value, setValue] = useState('');
35
41
  const updateValue = useCallback((e) => {
36
42
  setValue(e.target.value);
37
43
  }, []);
@@ -42,8 +48,19 @@ Default.args = {
42
48
  label: 'Phone Number',
43
49
  required: false,
44
50
  placeholder: '',
45
- ref: React.createRef(),
46
51
  name: 'phone',
47
52
  };
53
+ export const WithError = Template.bind({});
54
+ WithError.args = {
55
+ ...Default.args,
56
+ name: 'phone-error',
57
+ error: 'Please enter a valid 10-digit phone number',
58
+ };
59
+ export const WithCustomDescription = Template.bind({});
60
+ WithCustomDescription.args = {
61
+ ...Default.args,
62
+ name: 'phone-custom-desc',
63
+ description: 'Include your area code',
64
+ };
48
65
  export default setup;
49
66
  //# sourceMappingURL=BKJPhoneNumberInput.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BKJPhoneNumberInput.stories.js","sourceRoot":"","sources":["../../../src/components/BKJPhoneNumberInput/BKJPhoneNumberInput.stories.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,MAAM,KAAK,GAAG;IACZ,KAAK,EAAE,oCAAoC;IAC3C,SAAS,EAAE,mBAAmB;IAC9B,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,IAAI,EAAE,YAAY;SACnB;QACD,KAAK,EAAE;YACL,IAAI,EAAE,eAAe;YACrB,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;aACb;SACF;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,gBAAgB;SACvB;QACD,WAAW,EAAE;YACX,IAAI,EAAE,aAAa;SACpB;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,UAAU;SACjB;QACD,KAAK,EAAE;YACL,KAAK,EAAE;gBACL,OAAO,EAAE,IAAI;aACd;SACF;KACF;CACF,CAAC;AAEF,MAAM,QAAQ,GAAuC,CAAC,IAAI,EAAE,EAAE;IAC5D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,4BAA4B,CAAC,CAAC;IACjE,MAAM,WAAW,GAAG,WAAW,CAAC,CAAC,CAAkB,EAAE,EAAE;QACrD,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,KAAC,mBAAmB,OAAK,IAAI,EAAE,KAAK,EAAE,KAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,GAAI,CAC7F,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAEzC,OAAO,CAAC,IAAI,GAAG;IACb,KAAK,EAAE,cAAc;IACrB,QAAQ,EAAE,KAAK;IACf,WAAW,EAAE,EAAE;IACf,GAAG,EAAE,KAAK,CAAC,SAAS,EAAE;IACtB,IAAI,EAAE,OAAO;CACd,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"BKJPhoneNumberInput.stories.js","sourceRoot":"","sources":["../../../src/components/BKJPhoneNumberInput/BKJPhoneNumberInput.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,MAAM,KAAK,GAAG;IACZ,KAAK,EAAE,oCAAoC;IAC3C,SAAS,EAAE,mBAAmB;IAC9B,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,IAAI,EAAE,YAAY;SACnB;QACD,KAAK,EAAE;YACL,IAAI,EAAE,eAAe;YACrB,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;aACb;SACF;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,gBAAgB;SACvB;QACD,WAAW,EAAE;YACX,IAAI,EAAE,aAAa;SACpB;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,UAAU;SACjB;QACD,WAAW,EAAE;YACX,IAAI,EAAE,aAAa;YACnB,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;aACb;SACF;QACD,KAAK,EAAE;YACL,KAAK,EAAE;gBACL,OAAO,EAAE,IAAI;aACd;SACF;KACF;CACF,CAAC;AAEF,MAAM,QAAQ,GAAuC,CAAC,IAAI,EAAE,EAAE;IAC5D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACvC,MAAM,WAAW,GAAG,WAAW,CAAC,CAAC,CAAkB,EAAE,EAAE;QACrD,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,KAAC,mBAAmB,OAAK,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,GAAI,CACtF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzC,OAAO,CAAC,IAAI,GAAG;IACb,KAAK,EAAE,cAAc;IACrB,QAAQ,EAAE,KAAK;IACf,WAAW,EAAE,EAAE;IACf,IAAI,EAAE,OAAO;CACd,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,GAAG;IACf,GAAG,OAAO,CAAC,IAAI;IACf,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,4CAA4C;CACpD,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvD,qBAAqB,CAAC,IAAI,GAAG;IAC3B,GAAG,OAAO,CAAC,IAAI;IACf,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,wBAAwB;CACtC,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1,10 +1,8 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { render, screen, fireEvent } from '@testing-library/react';
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { screen, fireEvent } from '@testing-library/react';
3
3
  import { BKJPhoneNumberInput } from './BKJPhoneNumberInput.js';
4
4
  import { BKJThemeProvider } from '../../providers/BKJThemeProvider/index.js';
5
- const renderWithTheme = (component) => {
6
- return render(_jsx(BKJThemeProvider, { children: component }));
7
- };
5
+ import { renderAndCheckA11y, renderWithTheme } from '../../test-utils/index.js';
8
6
  describe('BKJPhoneNumberInput', () => {
9
7
  it('renders the input element', () => {
10
8
  const handleChange = jest.fn();
@@ -53,5 +51,122 @@ describe('BKJPhoneNumberInput', () => {
53
51
  fireEvent.change(input, { target: { value: '12345678901' } });
54
52
  expect(input).toHaveValue('(123) 456-7890-1');
55
53
  });
54
+ describe('Type and input mode', () => {
55
+ it('sets type="tel" and inputMode="tel" by default', () => {
56
+ renderWithTheme(_jsx(BKJPhoneNumberInput, { name: "phone", onChange: jest.fn(), maxLength: 10, label: "Phone" }));
57
+ const input = screen.getByRole('textbox');
58
+ expect(input.getAttribute('type')).toBe('tel');
59
+ expect(input.getAttribute('inputmode')).toBe('tel');
60
+ });
61
+ it('consumer-supplied type overrides the default', () => {
62
+ renderWithTheme(_jsx(BKJPhoneNumberInput, { name: "phone", onChange: jest.fn(), maxLength: 10, label: "Phone", type: "text" }));
63
+ const input = screen.getByRole('textbox');
64
+ expect(input.getAttribute('type')).toBe('text');
65
+ expect(input.getAttribute('inputmode')).toBe('tel');
66
+ });
67
+ it('consumer-supplied inputMode overrides the default', () => {
68
+ renderWithTheme(_jsx(BKJPhoneNumberInput, { name: "phone", onChange: jest.fn(), maxLength: 10, label: "Phone", inputMode: "numeric" }));
69
+ const input = screen.getByRole('textbox');
70
+ expect(input.getAttribute('type')).toBe('tel');
71
+ expect(input.getAttribute('inputmode')).toBe('numeric');
72
+ });
73
+ });
74
+ describe('Format description', () => {
75
+ it('emits the 10-digit default description when maxLength is 10', () => {
76
+ renderWithTheme(_jsx(BKJPhoneNumberInput, { name: "phone", onChange: jest.fn(), maxLength: 10, label: "Phone" }));
77
+ expect(screen.getByText('Enter a 10-digit phone number, for example (416) 555-1234')).toBeInTheDocument();
78
+ });
79
+ it('emits the 11-digit default description when maxLength is 11', () => {
80
+ renderWithTheme(_jsx(BKJPhoneNumberInput, { name: "phone", onChange: jest.fn(), maxLength: 11, label: "Phone" }));
81
+ expect(screen.getByText('Enter an 11-digit phone number, for example 1 (416) 555-1234')).toBeInTheDocument();
82
+ });
83
+ it('emits the 12-digit default description when maxLength is 12 or greater', () => {
84
+ const { unmount } = renderWithTheme(_jsx(BKJPhoneNumberInput, { name: "phone", onChange: jest.fn(), maxLength: 12, label: "Phone" }));
85
+ expect(screen.getByText('Enter a 12-digit phone number, for example 01 (416) 555-1234')).toBeInTheDocument();
86
+ unmount();
87
+ renderWithTheme(_jsx(BKJPhoneNumberInput, { name: "phone", onChange: jest.fn(), maxLength: 15, label: "Phone" }));
88
+ expect(screen.getByText('Enter a 12-digit phone number, for example 01 (416) 555-1234')).toBeInTheDocument();
89
+ });
90
+ it('emits no description when maxLength is not set', () => {
91
+ renderWithTheme(_jsx(BKJPhoneNumberInput, { name: "phone", onChange: jest.fn(), label: "Phone" }));
92
+ expect(screen.queryByText(/phone number/i)).toBeNull();
93
+ });
94
+ it('consumer-supplied description replaces the default', () => {
95
+ renderWithTheme(_jsx(BKJPhoneNumberInput, { name: "phone", onChange: jest.fn(), maxLength: 10, label: "Phone", description: "Include your area code" }));
96
+ expect(screen.getByText('Include your area code')).toBeInTheDocument();
97
+ expect(screen.queryByText(/10-digit phone number/)).toBeNull();
98
+ });
99
+ });
100
+ describe('Error linking', () => {
101
+ // NOTE: BKJTextInput currently forwards `error` to `useTextField`'s `errorMessage` but does
102
+ // NOT pass `validationState: 'invalid'`, so `aria-invalid` is not set today. FR-004's
103
+ // "preserve the mechanism BKJTextInput uses" means asserting against the description-id
104
+ // linkage that BKJTextInput actually emits. When WEB-4809 adds `validationState`, these
105
+ // tests should be tightened to also assert `aria-invalid="true"`.
106
+ it('renders the error text and links it to the input via aria-describedby when error prop is provided', () => {
107
+ renderWithTheme(_jsx(BKJPhoneNumberInput, { name: "phone", onChange: jest.fn(), maxLength: 10, label: "Phone", error: "Please enter a valid 10-digit phone number" }));
108
+ const input = screen.getByRole('textbox');
109
+ const errorEl = screen.getByText('Please enter a valid 10-digit phone number');
110
+ const describedBy = input.getAttribute('aria-describedby') ?? '';
111
+ const ids = describedBy.split(/\s+/).filter(Boolean);
112
+ expect(errorEl).toBeInTheDocument();
113
+ expect(ids).toContain(errorEl.id);
114
+ });
115
+ it('includes both description and error ids in aria-describedby when a consumer description and an error are both provided', () => {
116
+ renderWithTheme(_jsx(BKJPhoneNumberInput, { name: "phone", onChange: jest.fn(), maxLength: 10, label: "Phone", description: "Include your area code", error: "Please enter a valid 10-digit phone number" }));
117
+ const input = screen.getByRole('textbox');
118
+ const describedBy = input.getAttribute('aria-describedby') ?? '';
119
+ const ids = describedBy.split(/\s+/).filter(Boolean);
120
+ expect(ids.length).toBeGreaterThanOrEqual(2);
121
+ ids.forEach((id) => {
122
+ expect(document.getElementById(id)).not.toBeNull();
123
+ });
124
+ expect(screen.getByText('Include your area code')).toBeInTheDocument();
125
+ expect(screen.getByText('Please enter a valid 10-digit phone number')).toBeInTheDocument();
126
+ });
127
+ it('removes the error text from the DOM when error prop is cleared on re-render', () => {
128
+ // Wrapper-level assertion only: error forwarding clears correctly and the default
129
+ // description reappears (or remains) after the error is removed. The stricter
130
+ // aria-describedby-cleanup assertion (no stale id left pointing at a removed element)
131
+ // is out of scope for WEB-4810 — BKJTextInput today leaves a dangling reference
132
+ // because it does not pass `validationState` to useTextField. WEB-4809 owns that fix.
133
+ const { rerender } = renderWithTheme(_jsx(BKJPhoneNumberInput, { name: "phone", onChange: jest.fn(), maxLength: 10, label: "Phone", error: "Please enter a valid 10-digit phone number" }));
134
+ expect(screen.getByText('Please enter a valid 10-digit phone number')).toBeInTheDocument();
135
+ rerender(_jsx(BKJThemeProvider, { children: _jsx(BKJPhoneNumberInput, { name: "phone", onChange: jest.fn(), maxLength: 10, label: "Phone" }) }));
136
+ expect(screen.queryByText('Please enter a valid 10-digit phone number')).toBeNull();
137
+ expect(screen.getByText('Enter a 10-digit phone number, for example (416) 555-1234')).toBeInTheDocument();
138
+ });
139
+ });
140
+ describe('Accessibility', () => {
141
+ it('should have no accessibility violations on labelled default', async () => {
142
+ const { renderResult, axeResults } = await renderAndCheckA11y(_jsx(BKJPhoneNumberInput, { name: "phone", label: "Phone Number", maxLength: 10, onChange: jest.fn() }));
143
+ expect(axeResults).toHaveNoViolations();
144
+ // FR-002: the `label` prop is the accessible name. `getByLabelText` returns the input
145
+ // only if the label-for-input association is in place, which covers the "accessible
146
+ // name equals label prop" assertion without requiring jest-dom >= 5.14's
147
+ // `toHaveAccessibleName` matcher.
148
+ expect(renderResult.getByLabelText('Phone Number')).toBe(renderResult.getByRole('textbox'));
149
+ });
150
+ it('should have no accessibility violations with error', async () => {
151
+ const { axeResults } = await renderAndCheckA11y(_jsx(BKJPhoneNumberInput, { name: "phone", label: "Phone Number", maxLength: 10, onChange: jest.fn(), error: "Please enter a valid 10-digit phone number" }));
152
+ expect(axeResults).toHaveNoViolations();
153
+ });
154
+ it('should have no accessibility violations with custom description', async () => {
155
+ const { axeResults } = await renderAndCheckA11y(_jsx(BKJPhoneNumberInput, { name: "phone", label: "Phone Number", maxLength: 10, onChange: jest.fn(), description: "Include your area code" }));
156
+ expect(axeResults).toHaveNoViolations();
157
+ });
158
+ it('should have no accessibility violations when disabled', async () => {
159
+ const { axeResults } = await renderAndCheckA11y(_jsx(BKJPhoneNumberInput, { name: "phone", label: "Phone Number", maxLength: 10, onChange: jest.fn(), disabled: true }));
160
+ expect(axeResults).toHaveNoViolations();
161
+ });
162
+ it('preserves consumer-supplied aria-describedby passed via rest-spread', () => {
163
+ renderWithTheme(_jsxs(_Fragment, { children: [_jsx("span", { id: "consumer-help", children: "Custom external hint" }), _jsx(BKJPhoneNumberInput, { name: "phone", label: "Phone Number", maxLength: 10, onChange: jest.fn(), "aria-describedby": "consumer-help" })] }));
164
+ const input = screen.getByRole('textbox');
165
+ const describedBy = input.getAttribute('aria-describedby') ?? '';
166
+ const ids = describedBy.split(/\s+/).filter(Boolean);
167
+ expect(ids).toContain('consumer-help');
168
+ expect(document.getElementById('consumer-help')).not.toBeNull();
169
+ });
170
+ });
56
171
  });
57
172
  //# sourceMappingURL=BKJPhoneNumberInput.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BKJPhoneNumberInput.test.js","sourceRoot":"","sources":["../../../src/components/BKJPhoneNumberInput/BKJPhoneNumberInput.test.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,MAAM,eAAe,GAAG,CAAC,SAAoB,EAAE,EAAE;IAC/C,OAAO,MAAM,CAAC,KAAC,gBAAgB,cAAE,SAAS,GAAoB,CAAC,CAAC;AAClE,CAAC,CAAC;AAEF,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,EAAE,CAAC,2BAA2B,EAAE,GAAG,EAAE;QACnC,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QAC/B,eAAe,CAAC,KAAC,mBAAmB,IAAC,IAAI,EAAC,OAAO,EAAC,QAAQ,EAAE,YAAY,GAAI,CAAC,CAAC;QAE9E,MAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAC1C,MAAM,CAAC,KAAK,CAAC,CAAC,iBAAiB,EAAE,CAAC;IACpC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;QAC5C,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QAC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W,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAErD,MAAM,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;YACvC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QAClE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"BKJTextInput.d.ts","sourceRoot":"","sources":["../../../src/components/BKJTextInput/BKJTextInput.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,eAAO,MAAM,YAAY,ugMA+MvB,CAAC"}
1
+ {"version":3,"file":"BKJTextInput.d.ts","sourceRoot":"","sources":["../../../src/components/BKJTextInput/BKJTextInput.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,eAAO,MAAM,YAAY,ugMAgNvB,CAAC"}
@@ -11,6 +11,7 @@ import i18next from 'i18next';
11
11
  export const BKJTextInput = forwardRef((props, ref) => {
12
12
  const { overrides = [], variant = 'RoundEdges', leftIconProps, rightIconProps, labelProps: __labelProps__, fieldSetProps = {}, name, className, required: isRequired, disabled: isDisabled, label, value, autoFocus, description, openBorderLocation, error, onChange, onBeforeInput, onBlur, onCompositionEnd, onCompositionStart, onCompositionUpdate, onCopy, onCut, onFocus, onInput, onKeyDown, onKeyUp, onPaste, onSelect, autoComplete = 'off', css, useFocusBorder = true, } = props;
13
13
  let innerRef = useRef({});
14
+ const hasStringyError = isFormValidationErrorDisplayed(error) && !isBoolean(error);
14
15
  const { labelProps, inputProps, descriptionProps, errorMessageProps } = useTextField({
15
16
  isRequired,
16
17
  isDisabled,
@@ -19,7 +20,8 @@ export const BKJTextInput = forwardRef((props, ref) => {
19
20
  value,
20
21
  autoFocus,
21
22
  description,
22
- errorMessage: error,
23
+ errorMessage: hasStringyError ? error : undefined,
24
+ validationState: isFormValidationErrorDisplayed(error) ? 'invalid' : 'valid',
23
25
  onBeforeInput,
24
26
  onBlur: onBlur,
25
27
  onChange: onChange,
@@ -75,7 +77,8 @@ export const BKJTextInput = forwardRef((props, ref) => {
75
77
  }, error: error, ref: mergeRefs([innerRef, ref]), variant: variant, elementType: "Input", style: { ...getInputCSS }, autoComplete: autoComplete, hasLeftIcon: !!leftIconProps, hasRightIcon: !!rightIconProps }), !!rightIconProps && (_jsx(BKJTextInputIconWrapper, { ...rightIconProps, padding: `0 ${rightIconFontSize / 3}px 0 0`, style: {
76
78
  right: 0,
77
79
  cursor: `${!!rightIconProps?.onClick ? 'pointer' : 'default'}`,
78
- }, ref: rightIconRef, onClick: rightIconProps?.onClick, css: rightIconProps?.css, className: rightIconProps?.className, children: _jsx(BKJIcon, { iconName: rightIconProps.iconName, fontSize: rightIconProps?.fontSize }) }))] }), props.description && (_jsx(BKJTextInputDescription, { ...descriptionProps, children: props.description })), isFormValidationErrorDisplayed(error) && (_jsx(Fragment, { children: error && Array.isArray(error) ? (error.length &&
79
- error.map((err, i) => (_jsx(BKJTextInputErrorMessage, { ...errorMessageProps, children: err }, `${err}-${i}`)))) : (_jsx(BKJTextInputErrorMessage, { ...errorMessageProps, children: error })) }))] }));
80
+ }, ref: rightIconRef, onClick: rightIconProps?.onClick, css: rightIconProps?.css, className: rightIconProps?.className, children: _jsx(BKJIcon, { iconName: rightIconProps.iconName, fontSize: rightIconProps?.fontSize }) }))] }), props.description && (_jsx(BKJTextInputDescription, { ...descriptionProps, children: props.description })), hasStringyError && (_jsx(BKJTextInputErrorMessage, { ...errorMessageProps, children: Array.isArray(error)
81
+ ? error.map((err, i) => (_jsxs(Fragment, { children: [i > 0 && _jsx("br", {}), err] }, `${err}-${i}`)))
82
+ : error }))] }));
80
83
  });
81
84
  //# sourceMappingURL=BKJTextInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BKJTextInput.js","sourceRoot":"","sources":["../../../src/components/BKJTextInput/BKJTextInput.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,8BAA8B,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAClG,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,4BAA4B,EAC5B,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAuC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IAC1F,MAAM,EACJ,SAAS,GAAG,EAAE,EACd,OAAO,GAAG,YAAY,EACtB,aAAa,EACb,cAAc,EACd,UAAU,EAAE,cAAc,EAC1B,aAAa,GAAG,EAAE,EAClB,IAAI,EACJ,SAAS,EACT,QAAQ,EAAE,UAAU,EACpB,QAAQ,EAAE,UAAU,EACpB,KAAK,EACL,KAAK,EACL,SAAS,EACT,WAAW,EACX,kBAAkB,EAClB,KAAK,EACL,QAAQ,EACR,aAAa,EACb,MAAM,EACN,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,MAAM,EACN,KAAK,EACL,OAAO,EACP,OAAO,EACP,SAAS,EACT,OAAO,EACP,OAAO,EACP,QAAQ,EACR,YAAY,GAAG,KAA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from './BKJTextInput.types.js';
1
2
  declare const setup: {
2
3
  title: string;
3
- component: import("react").ForwardRefExoticComponent<Pick<import("./BKJTextInput.types.js").IBKJTextInputProps, "target" | "name" | "value" | "label" | "checked" | "cite" | "data" | "form" | "slot" | "span" | "style" | "summary" | "title" | "id" | "selected" | "disabled" | "variant" | "type" | "start" | "hidden" | "color" | "content" | "size" | "default" | "wrap" | "open" | "multiple" | "width" | "css" | "isOpen" | "overrides" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "muted" | "nonce" | "noValidate" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "leftIconProps" | "rightIconProps" | "labelProps" | "fieldSetProps" | "description" | "isRequired" | "error" | "openBorderLocation" | "useFocusBorder"> & import("react").RefAttributes<HTMLInputElement>>;
4
+ component: import("react").ForwardRefExoticComponent<Pick<IBKJTextInputProps, "target" | "name" | "value" | "label" | "checked" | "cite" | "data" | "form" | "slot" | "span" | "style" | "summary" | "title" | "id" | "selected" | "disabled" | "variant" | "type" | "start" | "hidden" | "color" | "content" | "size" | "default" | "wrap" | "open" | "multiple" | "width" | "css" | "isOpen" | "overrides" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "muted" | "nonce" | "noValidate" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "leftIconProps" | "rightIconProps" | "labelProps" | "fieldSetProps" | "description" | "isRequired" | "error" | "openBorderLocation" | "useFocusBorder"> & import("react").RefAttributes<HTMLInputElement>>;
4
5
  argTypes: {
5
6
  variant: {
6
7
  name: string;
@@ -68,5 +69,11 @@ declare const setup: {
68
69
  };
69
70
  };
70
71
  export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@storybook/react").Args>;
72
+ export declare const Required: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, IBKJTextInputProps>;
73
+ export declare const WithDescription: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, IBKJTextInputProps>;
74
+ export declare const ErrorString: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, IBKJTextInputProps>;
75
+ export declare const ErrorArray: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, IBKJTextInputProps>;
76
+ export declare const Disabled: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, IBKJTextInputProps>;
77
+ export declare const LabellessAriaLabel: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, IBKJTextInputProps>;
71
78
  export default setup;
72
79
  //# sourceMappingURL=BKJTextInput.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BKJTextInput.stories.d.ts","sourceRoot":"","sources":["../../../src/components/BKJTextInput/BKJTextInput.stories.tsx"],"names":[],"mappings":"AASA,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoEV,CAAC;AAuDF,eAAO,MAAM,OAAO,2HAAoB,CAAC;AAWzC,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"BKJTextInput.stories.d.ts","sourceRoot":"","sources":["../../../src/components/BKJTextInput/BKJTextInput.stories.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoEV,CAAC;AAuDF,eAAO,MAAM,OAAO,2HAAoB,CAAC;AAezC,eAAO,MAAM,QAAQ,8GAA0B,CAAC;AAGhD,eAAO,MAAM,eAAe,8GAA0B,CAAC;AAQvD,eAAO,MAAM,WAAW,8GAA0B,CAAC;AAQnD,eAAO,MAAM,UAAU,8GAA0B,CAAC;AAQlD,eAAO,MAAM,QAAQ,8GAA0B,CAAC;AAGhD,eAAO,MAAM,kBAAkB,8GAA0B,CAAC;AAO1D,eAAe,KAAK,CAAC"}
@@ -118,5 +118,37 @@ Default.args = {
118
118
  // onClickLeftIcon: undefined,
119
119
  // onClickRightIcon: undefined,
120
120
  };
121
+ const SimpleTemplate = (args) => (_jsx(BKJTextInput, { ...args, onChange: () => { } }));
122
+ export const Required = SimpleTemplate.bind({});
123
+ Required.args = { name: 'email', label: 'Email', required: true, variant: 'RoundEdges' };
124
+ export const WithDescription = SimpleTemplate.bind({});
125
+ WithDescription.args = {
126
+ name: 'email',
127
+ label: 'Email',
128
+ description: 'We will never share.',
129
+ variant: 'RoundEdges',
130
+ };
131
+ export const ErrorString = SimpleTemplate.bind({});
132
+ ErrorString.args = {
133
+ name: 'email',
134
+ label: 'Email',
135
+ error: 'Invalid email',
136
+ variant: 'RoundEdges',
137
+ };
138
+ export const ErrorArray = SimpleTemplate.bind({});
139
+ ErrorArray.args = {
140
+ name: 'email',
141
+ label: 'Email',
142
+ error: ['Must contain @', 'Domain must exist'],
143
+ variant: 'RoundEdges',
144
+ };
145
+ export const Disabled = SimpleTemplate.bind({});
146
+ Disabled.args = { name: 'email', label: 'Email', disabled: true, variant: 'RoundEdges' };
147
+ export const LabellessAriaLabel = SimpleTemplate.bind({});
148
+ LabellessAriaLabel.args = {
149
+ name: 'email',
150
+ 'aria-label': 'Email',
151
+ variant: 'RoundEdges',
152
+ };
121
153
  export default setup;
122
154
  //# sourceMappingURL=BKJTextInput.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BKJTextInput.stories.js","sourceRoot":"","sources":["../../../src/components/BKJTextInput/BKJTextInput.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC;AACjC,OAAO,EAAkC,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,KAAK,GAAG;IACZ,KAAK,EAAE,6BAA6B;IACpC,SAAS,EAAE,YAAY;IACvB,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC;YACvC,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;aACf;SACF;QACD,KAAK,EAAE;YACL,IAAI,EAAE,aAAa;SACpB;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,mBAAmB;SAC1B;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,8BAA8B;SACrC;QACD,KAAK,EAAE;YACL,IAAI,EAAE,aAAa;SACpB;QACD,KAAK,EAAE;YACL,IAAI,EAAE,eAAe;SACtB;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,cAAc;SACrB;QACD,WAAW,EAAE;YACX,IAAI,EAAE,wBAAwB;SAC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AAC,GAAG,CAAC;wBAAE,QAAQ,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;gBAC3E,CAAC;gBACD,OAAO,QAAQ,CAAC;YAClB,CAAC;YACD,iEAAiE;YACjE,yDAAyD;YACzD,wBAAwB;YACxB,2BAA2B;YAC3B,4EAA4E;YAC5E,MAAM;YACN,qBAAqB;YACrB,KAAK;SACN;QACD,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC;KACnB,CAAC,CAAC;IACH,MAAM,SAAS,GAAG,GAAG,CAAA;GACpB,CAAC;IACF,OAAO,CACL,gBAAM,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,QAAQ,aACjD,KAAC,YAAY,IACX,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAC,YAAY,EACpB,IAAI,EAAC,OAAO,EACZ,KAAK,EAAC,OAAO,EACb,aAAa,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,EACrC,WAAW,EAAC,0BAA0B,EACtC,YAAY,EAAC,KAAK,EAClB,QAAQ,QACR,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,EAC3B,GAAG,EAAE,SAAgB,GACrB,EACF,KAAC,SAAS,IAAC,OAAO,EAAC,YAAY,EAAC,QAAQ,EAAE,UAAU,sBAExC,IACP,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAEzC,OAAO,CAAC,IAAI,GAAG;AACb,iBAAiB;AACjB,8BAA8B;AAC9B,yBAAyB;AACzB,+CAA+C;AAC/C,8BAA8B;AAC9B,+BAA+B;CAChC,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"BKJTextInput.stories.js","sourceRoot":"","sources":["../../../src/components/BKJTextInput/BKJTextInput.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAA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ACvD,eAAe,CAAC,IAAI,GAAG;IACrB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,sBAAsB;IACnC,OAAO,EAAE,YAAY;CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACnD,WAAW,CAAC,IAAI,GAAG;IACjB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,eAAe;IACtB,OAAO,EAAE,YAAY;CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAClD,UAAU,CAAC,IAAI,GAAG;IAChB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,CAAC,gBAAgB,EAAE,mBAAmB,CAAC;IAC9C,OAAO,EAAE,YAAY;CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChD,QAAQ,CAAC,IAAI,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;AAEzF,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1D,kBAAkB,CAAC,IAAI,GAAG;IACxB,IAAI,EAAE,OAAO;IACb,YAAY,EAAE,OAAO;IACrB,OAAO,EAAE,YAAY;CACtB,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=BKJTextInput.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BKJTextInput.test.d.ts","sourceRoot":"","sources":["../../../src/components/BKJTextInput/BKJTextInput.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,112 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { fireEvent, screen } from '@testing-library/react';
3
+ import { renderAndCheckA11y, renderWithTheme } from '../../test-utils/index.js';
4
+ import { BKJThemeProvider } from '../../providers/BKJThemeProvider/index.js';
5
+ import { BKJTextInput } from './BKJTextInput.js';
6
+ const noop = () => { };
7
+ describe('BKJTextInput', () => {
8
+ describe('Keyboard', () => {
9
+ it('native input is focusable when not disabled', () => {
10
+ renderWithTheme(_jsx(BKJTextInput, { name: "email", label: "Email", onChange: noop }));
11
+ const input = screen.getByRole('textbox', { name: 'Email' });
12
+ input.focus();
13
+ expect(input).toHaveFocus();
14
+ expect(input.tabIndex).toBeGreaterThanOrEqual(0);
15
+ });
16
+ it('typing updates the value and fires onChange', () => {
17
+ let capturedValue;
18
+ const onChange = jest.fn((e) => {
19
+ capturedValue = e.target.value;
20
+ });
21
+ renderWithTheme(_jsx(BKJTextInput, { name: "email", label: "Email", onChange: onChange }));
22
+ const input = screen.getByRole('textbox', { name: 'Email' });
23
+ fireEvent.change(input, { target: { value: 'a' } });
24
+ expect(onChange).toHaveBeenCalledTimes(1);
25
+ expect(capturedValue).toBe('a');
26
+ });
27
+ it('disabled input cannot receive focus', () => {
28
+ renderWithTheme(_jsx(BKJTextInput, { name: "email", label: "Email", disabled: true, onChange: noop }));
29
+ const input = screen.getByRole('textbox', { name: 'Email' });
30
+ expect(input).toBeDisabled();
31
+ input.focus();
32
+ expect(input).not.toHaveFocus();
33
+ });
34
+ });
35
+ describe('Accessibility', () => {
36
+ it('default (labelled) has no a11y violations', async () => {
37
+ const { axeResults } = await renderAndCheckA11y(_jsx(BKJTextInput, { name: "email", label: "Email", onChange: noop }));
38
+ expect(axeResults).toHaveNoViolations();
39
+ });
40
+ it('required has no a11y violations', async () => {
41
+ const { axeResults } = await renderAndCheckA11y(_jsx(BKJTextInput, { name: "email", label: "Email", required: true, onChange: noop }));
42
+ expect(axeResults).toHaveNoViolations();
43
+ });
44
+ it('with description has no a11y violations', async () => {
45
+ const { axeResults } = await renderAndCheckA11y(_jsx(BKJTextInput, { name: "email", label: "Email", description: "We will never share.", onChange: noop }));
46
+ expect(axeResults).toHaveNoViolations();
47
+ });
48
+ it('with string error has no a11y violations', async () => {
49
+ const { axeResults } = await renderAndCheckA11y(_jsx(BKJTextInput, { name: "email", label: "Email", error: "Invalid email", onChange: noop }));
50
+ expect(axeResults).toHaveNoViolations();
51
+ });
52
+ it('with array of errors has no a11y violations', async () => {
53
+ const { axeResults } = await renderAndCheckA11y(_jsx(BKJTextInput, { name: "email", label: "Email", error: ['Must contain @', 'Domain must exist'], onChange: noop }));
54
+ expect(axeResults).toHaveNoViolations();
55
+ });
56
+ it('with description and error has no a11y violations', async () => {
57
+ const { axeResults } = await renderAndCheckA11y(_jsx(BKJTextInput, { name: "email", label: "Email", description: "We will never share.", error: "Invalid email", onChange: noop }));
58
+ expect(axeResults).toHaveNoViolations();
59
+ });
60
+ it('label-less with rest-spread aria-label has no a11y violations', async () => {
61
+ const { axeResults } = await renderAndCheckA11y(_jsx(BKJTextInput, { name: "email", "aria-label": "Email", onChange: noop }));
62
+ expect(axeResults).toHaveNoViolations();
63
+ });
64
+ it('renders a single error element when error is an array of strings', () => {
65
+ const { container } = renderWithTheme(_jsx(BKJTextInput, { name: "email", label: "Email", error: ['Must contain @', 'Domain must exist'], onChange: noop }));
66
+ const input = screen.getByRole('textbox', { name: 'Email' });
67
+ const describedBy = input.getAttribute('aria-describedby');
68
+ expect(describedBy).toBeTruthy();
69
+ const errorIds = (describedBy ?? '').split(/\s+/).filter(Boolean);
70
+ errorIds.forEach((id) => {
71
+ const matches = container.querySelectorAll(`[id="${id}"]`);
72
+ expect(matches.length).toBe(1);
73
+ });
74
+ });
75
+ it('does not render an error element when error is boolean true', () => {
76
+ renderWithTheme(_jsx(BKJTextInput, { name: "email", label: "Email", error: true, onChange: noop }));
77
+ const input = screen.getByRole('textbox', { name: 'Email' });
78
+ expect(input).toHaveAttribute('aria-invalid', 'true');
79
+ const describedBy = input.getAttribute('aria-describedby');
80
+ if (describedBy) {
81
+ const referenced = describedBy
82
+ .split(/\s+/)
83
+ .filter(Boolean)
84
+ .map((id) => document.getElementById(id))
85
+ .filter((el) => el !== null);
86
+ referenced.forEach((el) => {
87
+ expect(el.textContent?.trim().length ?? 0).toBeGreaterThan(0);
88
+ });
89
+ }
90
+ });
91
+ });
92
+ describe('State transitions', () => {
93
+ it('clears aria-invalid and error linkage when string error is cleared', () => {
94
+ const { rerender } = renderWithTheme(_jsx(BKJTextInput, { name: "email", label: "Email", error: "Invalid email", onChange: noop }));
95
+ const inputWithError = screen.getByRole('textbox', { name: 'Email' });
96
+ expect(inputWithError).toHaveAttribute('aria-invalid', 'true');
97
+ const describedByWithError = inputWithError.getAttribute('aria-describedby');
98
+ expect(describedByWithError).toBeTruthy();
99
+ rerender(_jsx(BKJThemeProvider, { children: _jsx(BKJTextInput, { name: "email", label: "Email", onChange: noop }) }));
100
+ const inputCleared = screen.getByRole('textbox', { name: 'Email' });
101
+ expect(inputCleared).not.toHaveAttribute('aria-invalid', 'true');
102
+ const describedByCleared = inputCleared.getAttribute('aria-describedby');
103
+ if (describedByCleared) {
104
+ const referencedIds = describedByCleared.split(/\s+/).filter(Boolean);
105
+ referencedIds.forEach((id) => {
106
+ expect(document.getElementById(id)).not.toBeNull();
107
+ });
108
+ }
109
+ });
110
+ });
111
+ });
112
+ //# sourceMappingURL=BKJTextInput.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BKJTextInput.test.js","sourceRoot":"","sources":["../../../src/components/BKJTextInput/BKJTextInput.test.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,M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_FILL_OUT_THIS_FIELD": "Please fill out this field",
6
+ "PHONE_FORMAT_10_DIGIT": "Enter a 10-digit phone number, for example (416) 555-1234",
7
+ "PHONE_FORMAT_11_DIGIT": "Enter an 11-digit phone number, for example 1 (416) 555-1234",
8
+ "PHONE_FORMAT_12_DIGIT": "Enter a 12-digit phone number, for example 01 (416) 555-1234",
6
9
  "NO_RESULTS": "No Results",
7
10
  "SELECT_ALL": "Select All"
8
11
  }
@@ -3,6 +3,9 @@
3
3
  "SELECT_A_FILE": "Sélectionner un fichier",
4
4
  "REPLACE": "Remplacer",
5
5
  "PLEASE_FILL_OUT_THIS_FIELD": "Veuillez remplir ce champ",
6
+ "PHONE_FORMAT_10_DIGIT": "[FTM] Enter a 10-digit phone number, for example (416) 555-1234",
7
+ "PHONE_FORMAT_11_DIGIT": "[FTM] Enter an 11-digit phone number, for example 1 (416) 555-1234",
8
+ "PHONE_FORMAT_12_DIGIT": "[FTM] Enter a 12-digit phone number, for example 01 (416) 555-1234",
6
9
  "NO_RESULTS": "Aucun résultat",
7
10
  "SELECT_ALL": "[FTM] Select All"
8
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bookjane2/bookjane-design-library",
3
- "version": "9.0.2",
3
+ "version": "9.0.4",
4
4
  "main": "./lib/index.js",
5
5
  "typings": "./lib/index.d.ts",
6
6
  "engines": {