@bookjane2/bookjane-design-library 9.0.3 → 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.
@@ -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,I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,GAAG,EAAE,CAAC;YACf,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;QACrB,CAAC;IACH,CAAC,EACD,CAAC,GAAG,CAAC,CACN,CAAC;IAEF,OAAO,CACL,KAAC,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,WAA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AC;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,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SAAS,CAAC,SAAS,CAAC,CAAC;YAC1C,MAAM,WAAW,GAAG,KAAK,CAAC,YAAY,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;YACjE,MAAM,GAAG,GAAG,WAAW,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"}
@@ -3,6 +3,9 @@
3
3
  "SELECT_A_FILE": "Select a File",
4
4
  "REPLACE": "Replace",
5
5
  "PLEASE_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.3",
3
+ "version": "9.0.4",
4
4
  "main": "./lib/index.js",
5
5
  "typings": "./lib/index.d.ts",
6
6
  "engines": {