@allxsmith/bestax-bulma 5.42.1 → 5.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PinInput.js","sources":["../../../src/form/PinInput.tsx"],"sourcesContent":["import React, {\n forwardRef,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport {\n classNames,\n prefixedClassNames,\n usePrefixedClassNames,\n} from '../helpers/classNames';\nimport { useClassPrefix } from '../helpers/Config';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { useClientLayoutEffect } from '../helpers/useClientLayoutEffect';\nimport { getActiveElementInTree } from '../helpers/shadowDom';\nimport {\n useInsideField,\n useInsideControl,\n rendersOwnField,\n rendersOwnControl,\n} from './FormContext';\nimport { Field } from './Field';\nimport { Control } from './Control';\nimport { FormFieldProps } from './fieldProps';\nimport { useAutoLabelId } from './useAutoLabelId';\n\n/**\n * What a PinInput takes: `'number'` keeps digits only, and `'alphanumeric'`\n * keeps the letters A to Z, in either case, and digits. A digit from any\n * script, such as an Arabic-Indic `٣` or a Persian `۳`, is kept as its ASCII\n * digit, `3`.\n */\nexport type PinInputType = 'number' | 'alphanumeric';\n\n/**\n * Props for the PinInput component.\n * Inside an existing `Control` it renders no `Control` of its own. Inside an\n * outer `Field`, or a `Control` with no `Field` around it, it renders no\n * `Field` of its own either. The exception is `label`, `message`, `horizontal`\n * or `fieldClassName` in that bare `Control`: it keeps a `Field` for them,\n * nested in the `.control`, and warns in development. Wrap the `Control` in a\n * `Field` instead, and set the `label`, `horizontal` and class name on that\n * `Field`.\n * Every other prop goes to the `<input>` that holds the code, except\n * `className` and the helper props, which go to the row of boxes.\n * @extraProp {string} [name] - Form field name, on the input, so a form submits the code under it.\n * @extraProp {string} [autoComplete=\"one-time-code\"] - Lets the browser offer a code it received by text message, and tells a password manager this is a one-time code.\n * @extraProp {string} [inputMode] - The keyboard a phone shows: `\"numeric\"` with `type=\"number\"`, `\"text\"` with `type=\"alphanumeric\"`.\n * @extraProp {string} [pattern] - Exactly `length` of what `type` takes, `[0-9]{6}` by default, so a form with `required` won't submit a partial code. Any non-empty partial code fails it, `required` or not.\n * @extraProp {string} [className] - Additional CSS classes for the row of boxes.\n * @extraProp {React.Ref<HTMLInputElement>} [ref] - Ref forwarded to the input that holds the code.\n */\nexport interface PinInputProps\n extends\n Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n | 'color'\n | 'size'\n | 'type'\n | 'value'\n | 'defaultValue'\n | 'onChange'\n | 'maxLength'\n >,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'>,\n FormFieldProps {\n /** Field label. Automatically associated with the input that holds the code via `htmlFor`, so a screen reader announces one field under this name. Uses your `id` when provided, otherwise a generated one. Dropped inside an outer `Field`, whose own label associates instead when that `Field` generates a target id (not `grouped`/`hasAddons`, no explicit `labelProps.htmlFor`) and you set no `id` here. */\n label?: React.ReactNode;\n /** Props for the label element. An explicit `htmlFor` here overrides the automatic association (no id is generated then). */\n labelProps?: React.LabelHTMLAttributes<HTMLLabelElement> & {\n [key: string]: unknown;\n };\n /** Applied to the input that holds the code (the labellable control), not the row of boxes. */\n id?: string;\n /** How many characters the code has. Each gets a box, and it is the input's `maxLength`. */\n length?: number;\n /** The code (controlled). Only its first `length` characters are shown and submitted. */\n value?: string;\n /** The code to start with (uncontrolled). Only its first `length` characters are kept. */\n defaultValue?: string;\n /**\n * What the code takes. A digit from any script, such as an Arabic-Indic or\n * a Persian one, goes in as its ASCII digit, so the code reaches\n * `onChange`, `onComplete` and the form as `0` to `9`. Anything else typed\n * or pasted is dropped, and the caret stays where it was. The input stays a\n * text field either way, so a code keeps its leading zeros.\n */\n type?: PinInputType;\n /**\n * Shows a dot in each filled box in place of its character, and makes the\n * input a password field, so a screen reader doesn't read the code out\n * either.\n */\n isMasked?: boolean;\n /** Bulma color for the boxes, the colors an `Input` takes. */\n color?:\n | 'primary'\n | 'link'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger'\n | 'black'\n | 'dark'\n | 'light'\n | 'white';\n /** Size of the boxes. */\n size?: 'small' | 'medium' | 'large';\n /** Round boxes. */\n isRounded?: boolean;\n /** Whether the input is disabled. */\n disabled?: boolean;\n /**\n * Called with the code each time it changes. A paste replaces the whole\n * code with what was pasted, kept to what `type` takes and cut to `length`,\n * and a paste with nothing the code takes changes nothing.\n */\n onChange?: (value: string) => void;\n /**\n * Called with the code when a change makes it `length` characters long,\n * such as typing the last character, a paste or autofill. It fires once for\n * each change that fills the last box with a new code, and never on a\n * render. A `value` you set yourself doesn't call it.\n */\n onComplete?: (value: string) => void;\n}\n\ntype Selection = readonly [start: number, end: number];\n\n/** What a masked box shows for its character, a filled circle. */\nconst MASK = '\\u25CF';\n\n/**\n * `text` with each decimal digit, in any script, turned into its ASCII digit:\n * `١٢٣` and `۱۲۳` become `123`. Unicode assigns decimal digits in runs of ten,\n * from 0 to 9, so a digit's value is how far it is from the start of its run,\n * modulo ten for runs that sit next to each other.\n */\nconst toAsciiDigits = (text: string) =>\n text.replace(/\\p{Nd}/gu, digit => {\n const point = digit.codePointAt(0)!;\n let start = point;\n while (/\\p{Nd}/u.test(String.fromCodePoint(start - 1))) start--;\n return String((point - start) % 10);\n });\n\n/**\n * The `PinInput` component is a field for a short code, such as a one-time\n * code or a PIN, drawn as a row of boxes with one character in each.\n *\n * The code lives in one real `<input>` that lies over the boxes, so it is\n * one field to a screen reader, and paste, autofill from a text message and\n * password managers work on it as they do on any input. The boxes draw what\n * it holds, and the box at the caret, or every box in a selection, shows\n * Bulma's focus look.\n *\n * @function\n * @param {PinInputProps} props - Props for the PinInput component.\n * @returns {JSX.Element} The rendered code field.\n *\n * @example\n * <PinInput\n * label=\"Verification code\"\n * value={code}\n * onChange={setCode}\n * onComplete={verify}\n * />\n */\nexport const PinInput = forwardRef<HTMLInputElement, PinInputProps>(\n (\n {\n // Field props\n label,\n labelSize,\n labelProps,\n horizontal,\n message,\n messageColor,\n fieldClassName,\n length = 6,\n value: controlledValue,\n defaultValue = '',\n type = 'number',\n isMasked = false,\n color,\n size,\n isRounded = false,\n disabled = false,\n onChange,\n onComplete,\n onPaste,\n onFocus,\n onBlur,\n className,\n ...props\n },\n ref\n ) => {\n const insideField = useInsideField();\n const insideControl = useInsideControl();\n const ownField = rendersOwnField('PinInput', {\n insideField,\n insideControl,\n label,\n message,\n horizontal,\n fieldClassName,\n });\n const ownControl = rendersOwnControl('PinInput', { insideControl });\n const { controlId, fieldLabelProps } = useAutoLabelId({\n label,\n id: props.id,\n labelProps,\n rendersLabel: ownField,\n });\n const { bulmaHelperClasses, rest } = useBulmaClasses(props);\n const classPrefix = useClassPrefix();\n\n const [internalValue, setInternalValue] = useState(defaultValue);\n // Cut to `length`, so the boxes, the input and the form all hold the same\n // code.\n const code = (\n controlledValue !== undefined ? controlledValue : internalValue\n ).slice(0, length);\n\n const allowed = type === 'alphanumeric' ? '[0-9A-Za-z]' : '[0-9]';\n /** The characters of `text` the code takes, digits in ASCII, cut to `length`. */\n const keep = (text: string) =>\n (toAsciiDigits(text).match(new RegExp(allowed, 'g')) ?? [])\n .join('')\n .slice(0, length);\n\n const commit = (next: string) => {\n if (next === code) return;\n if (controlledValue === undefined) setInternalValue(next);\n onChange?.(next);\n if (next.length === length) onComplete?.(next);\n };\n\n const inputRef = useRef<HTMLInputElement | null>(null);\n const setRefs = useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node;\n if (typeof ref === 'function') return ref(node);\n if (ref) ref.current = node;\n },\n [ref]\n );\n\n // The input's selection while it has focus, which the boxes draw.\n const [selection, setSelection] = useState<Selection | null>(null);\n const follow = useCallback(() => {\n const input = inputRef.current!;\n const next: Selection | null =\n getActiveElementInTree(input) === input\n ? [input.selectionStart!, input.selectionEnd!]\n : null;\n setSelection(prev =>\n prev?.[0] === next?.[0] && prev?.[1] === next?.[1] ? prev : next\n );\n }, []);\n // A new code moves the caret, and so can a value set from outside.\n useClientLayoutEffect(follow, [code, follow]);\n // React's `onSelect` never fires inside a shadow root, so the boxes\n // follow the browser's own `selectionchange`. A caret that moves fires it\n // at the input, and it bubbles to the document, but in a shadow root some\n // browsers fire it at the document alone and others at the input alone,\n // so both are followed.\n useEffect(() => {\n const input = inputRef.current!;\n const doc = input.ownerDocument;\n input.addEventListener('selectionchange', follow);\n doc.addEventListener('selectionchange', follow);\n return () => {\n input.removeEventListener('selectionchange', follow);\n doc.removeEventListener('selectionchange', follow);\n };\n }, [follow]);\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const input = e.target;\n const typed = input.value;\n const next = keep(typed);\n if (next !== typed) {\n // Drop what the code doesn't take before React sees the value, so\n // the caret stays where it was rather than jumping to the end.\n const caret = keep(typed.slice(0, input.selectionStart!)).length;\n input.value = next;\n input.setSelectionRange(caret, caret);\n }\n commit(next);\n };\n\n // The browser cuts a paste to `maxLength` before anything else sees it,\n // so a code pasted as \"123 456\" would lose its last digit. What the code\n // takes is kept first, and it replaces the whole code, since what you\n // paste into a code field is the code.\n const handlePaste = (e: React.ClipboardEvent<HTMLInputElement>) => {\n onPaste?.(e);\n if (e.defaultPrevented) return;\n e.preventDefault();\n const pasted = keep(e.clipboardData.getData('text'));\n if (pasted && !e.currentTarget.readOnly) commit(pasted);\n };\n\n const rootClass = classNames(\n usePrefixedClassNames('pin-input'),\n bulmaHelperClasses,\n className\n );\n const fieldClass = usePrefixedClassNames('pin-input-field');\n const helpClass = usePrefixedClassNames('help', {\n [`is-${messageColor}`]: !!messageColor,\n });\n\n // The boxes the selection covers: the one at a caret, or every selected\n // one. A caret after the last character marks the last box.\n const [start, end] = selection ?? [-1, -1];\n const first = Math.min(start, length - 1);\n const last = Math.max(first + 1, Math.min(end, length));\n const boxes = Array.from({ length }, (_, i) => {\n const char = code[i];\n const active = i >= first && i < last;\n return (\n <div\n key={i}\n aria-hidden=\"true\"\n className={prefixedClassNames(classPrefix, 'input', 'pin-input-box', {\n [`is-${color}`]: !!color,\n [`is-${size}`]: !!size,\n 'is-rounded': isRounded,\n 'is-focused': active,\n 'has-caret': active && start === end && !char,\n 'is-disabled': disabled,\n })}\n >\n {char && (isMasked ? MASK : char)}\n </div>\n );\n });\n\n // Left to right on a right-to-left page too: a code is written that way,\n // so its first character stays in the first box on the left, and the\n // arrow keys move the caret the way the boxes run.\n let content = (\n <div className={rootClass} dir=\"ltr\">\n <input\n ref={setRefs}\n className={fieldClass}\n type={isMasked ? 'password' : 'text'}\n inputMode={type === 'alphanumeric' ? 'text' : 'numeric'}\n autoComplete=\"one-time-code\"\n autoCorrect=\"off\"\n spellCheck={false}\n // A partial code fails constraint validation. `minLength` would\n // say so only after a keystroke, never after a paste or a filtered\n // character, which set the value from script.\n pattern={`${allowed}{${length}}`}\n {...rest}\n value={code}\n maxLength={length}\n disabled={disabled}\n onChange={handleChange}\n onPaste={handlePaste}\n onFocus={e => {\n follow();\n onFocus?.(e);\n }}\n onBlur={e => {\n setSelection(null);\n onBlur?.(e);\n }}\n // After the spread: an undefined `id` key in rest would wipe it.\n id={controlId}\n />\n {boxes}\n </div>\n );\n\n if (ownControl) {\n content = <Control>{content}</Control>;\n }\n\n const messageEl = message ? <p className={helpClass}>{message}</p> : null;\n\n if (ownField) {\n return (\n <Field\n label={label}\n labelSize={labelSize}\n labelProps={fieldLabelProps}\n horizontal={horizontal}\n className={fieldClassName}\n >\n {content}\n {messageEl}\n </Field>\n );\n }\n\n return (\n <>\n {content}\n {messageEl}\n </>\n );\n }\n);\n\nPinInput.displayName = 'PinInput';\n\nexport default PinInput;\n"],"names":["_jsx","_jsxs","_Fragment"],"mappings":";;;;;;;;;;;;;AAkIA;AACA,MAAM,IAAI,GAAG,QAAQ;AAErB;;;;;AAKG;AACH,MAAM,aAAa,GAAG,CAAC,IAAY,KACjC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,IAAG;IAC/B,MAAM,KAAK,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,CAAE;IAC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