@allxsmith/bestax-bulma 5.67.6 → 5.67.8

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 (55) hide show
  1. package/dist/bestax.css +1 -1
  2. package/dist/bestax.css.map +1 -1
  3. package/dist/esm/form/ColorInput.js.map +1 -1
  4. package/dist/esm/form/ColorInputBase.js +6 -3
  5. package/dist/esm/form/ColorInputBase.js.map +1 -1
  6. package/dist/esm/form/DateInputBase.js +6 -3
  7. package/dist/esm/form/DateInputBase.js.map +1 -1
  8. package/dist/esm/form/DateRangeInputBase.js +9 -5
  9. package/dist/esm/form/DateRangeInputBase.js.map +1 -1
  10. package/dist/esm/form/DateTimeInputBase.js +6 -3
  11. package/dist/esm/form/DateTimeInputBase.js.map +1 -1
  12. package/dist/esm/form/PasswordInput.js.map +1 -1
  13. package/dist/esm/form/PasswordInputBase.js +7 -5
  14. package/dist/esm/form/PasswordInputBase.js.map +1 -1
  15. package/dist/esm/form/TimeInputBase.js +6 -3
  16. package/dist/esm/form/TimeInputBase.js.map +1 -1
  17. package/dist/esm/helpers/useFieldHelperClasses.js +60 -0
  18. package/dist/esm/helpers/useFieldHelperClasses.js.map +1 -0
  19. package/dist/extras.css +1 -1
  20. package/dist/extras.css.map +1 -1
  21. package/dist/index.cjs +88 -16
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/types/form/ColorInput.d.ts +4 -1
  24. package/dist/types/form/ColorInputBase.d.ts +4 -1
  25. package/dist/types/form/DateInputBase.d.ts +7 -0
  26. package/dist/types/form/DateRangeInputBase.d.ts +7 -0
  27. package/dist/types/form/DateTimeInputBase.d.ts +7 -0
  28. package/dist/types/form/PasswordInput.d.ts +3 -1
  29. package/dist/types/form/PasswordInputBase.d.ts +3 -1
  30. package/dist/types/form/TimeInputBase.d.ts +7 -0
  31. package/dist/types/helpers/useFieldHelperClasses.d.ts +26 -0
  32. package/dist/types-cjs/form/ColorInput.d.ts +4 -1
  33. package/dist/types-cjs/form/ColorInputBase.d.ts +4 -1
  34. package/dist/types-cjs/form/DateInputBase.d.ts +7 -0
  35. package/dist/types-cjs/form/DateRangeInputBase.d.ts +7 -0
  36. package/dist/types-cjs/form/DateTimeInputBase.d.ts +7 -0
  37. package/dist/types-cjs/form/PasswordInput.d.ts +3 -1
  38. package/dist/types-cjs/form/PasswordInputBase.d.ts +3 -1
  39. package/dist/types-cjs/form/TimeInputBase.d.ts +7 -0
  40. package/dist/types-cjs/helpers/useFieldHelperClasses.d.ts +26 -0
  41. package/dist/versions/bestax-no-dark-mode.css +1 -1
  42. package/dist/versions/bestax-no-dark-mode.css.map +1 -1
  43. package/dist/versions/bestax-no-helpers-prefixed.css +1 -1
  44. package/dist/versions/bestax-no-helpers-prefixed.css.map +1 -1
  45. package/dist/versions/bestax-no-helpers.css +1 -1
  46. package/dist/versions/bestax-no-helpers.css.map +1 -1
  47. package/dist/versions/bestax-prefixed.css +1 -1
  48. package/dist/versions/bestax-prefixed.css.map +1 -1
  49. package/package.json +1 -1
  50. package/src/scss/components/_carousel.scss +3 -2
  51. package/src/scss/components/_sidebar.scss +5 -2
  52. package/src/scss/components/_steps.scss +4 -2
  53. package/src/scss/components/_tabs.scss +25 -17
  54. package/src/scss/form/_field.scss +16 -1
  55. package/src/scss/form/_timeinput.scss +2 -0
@@ -5,7 +5,7 @@ import { forwardRef, useState, useRef, useCallback, useEffect } from 'react';
5
5
  import { flushSync } from 'react-dom';
6
6
  import { usePrefixedClassNames, classNames } from '../helpers/classNames.js';
7
7
  import { warnOnce } from '../helpers/devWarnings.js';
8
- import { useBulmaClasses } from '../helpers/useBulmaClasses.js';
8
+ import { useFieldHelperClasses } from '../helpers/useFieldHelperClasses.js';
9
9
  import { useClientLayoutEffect } from '../helpers/useClientLayoutEffect.js';
10
10
  import { useLatestRef } from '../helpers/useLatestRef.js';
11
11
  import { InputBase } from './InputBase.js';
@@ -41,9 +41,11 @@ const checkLabelInName = (name, word) => {
41
41
  const PasswordInputBase = forwardRef((props, ref) => {
42
42
  const { visible: visibleProp, defaultVisible = false, onVisibleChange, variant = 'icon', labels, autoComplete = 'current-password', spellCheck = false, autoCorrect = 'off', autoCapitalize = 'none', disabled: disabledProp, color, className, style, ...others } = props;
43
43
  // Helper props, `className` and `style` go on the container, so a margin,
44
- // a width or a display moves the field and its toggle together. `color`
45
- // stays with the input, whose border it colors.
46
- const { bulmaHelperClasses, rest } = useBulmaClasses(others);
44
+ // a width or a display moves the field and its toggle together. The
45
+ // background and text helpers go on the input, since Bulma's `.input` sets
46
+ // its own background and font. `color` stays with the input, whose border
47
+ // it colors.
48
+ const { backgroundClasses, textClasses, otherClasses, rest } = useFieldHelperClasses(others);
47
49
  const disabled = useFieldsetDisabled(disabledProp);
48
50
  // The toggle gives way to the loading spinner of a Control this sits in,
49
51
  // which takes its slot, and the field hides the password meanwhile, as
@@ -167,7 +169,7 @@ const PasswordInputBase = forwardRef((props, ref) => {
167
169
  // the name follows them and there's no state to report.
168
170
  const toggleName = isText && visible ? hidePassword : showPassword;
169
171
  const glyph = visible ? jsx(EyeOffIcon, {}) : jsx(EyeIcon, {});
170
- return (jsxs("div", { className: classNames(containerClass, bulmaHelperClasses, className), style: style, children: [jsx(InputBase, { ref: combinedRef, autoComplete: autoComplete, spellCheck: spellCheck, autoCorrect: autoCorrect, autoCapitalize: autoCapitalize, disabled: disabled, color: color, ...rest, type: visible && !controlLoading ? 'text' : 'password' }), !controlLoading && (jsx("button", { ref: setToggle, type: "button", className: toggleClass, "aria-label": toggleName, "aria-pressed": isText ? undefined : visible, disabled: disabled,
172
+ return (jsxs("div", { className: classNames(containerClass, otherClasses, className), style: style, children: [jsx(InputBase, { ref: combinedRef, autoComplete: autoComplete, spellCheck: spellCheck, autoCorrect: autoCorrect, autoCapitalize: autoCapitalize, disabled: disabled, color: color, className: classNames(textClasses, backgroundClasses), ...rest, type: visible && !controlLoading ? 'text' : 'password' }), !controlLoading && (jsx("button", { ref: setToggle, type: "button", className: toggleClass, "aria-label": toggleName, "aria-pressed": isText ? undefined : visible, disabled: disabled,
171
173
  // A pointer press leaves focus, and the caret, in the input.
172
174
  onMouseDown: event => event.preventDefault(), onClick: () => setVisible(!visible), children: isText ? (visible ? hide : show) : glyph }))] }));
173
175
  });
@@ -1 +1 @@
1
- {"version":3,"file":"PasswordInputBase.js","sources":["../../../src/form/PasswordInputBase.tsx"],"sourcesContent":["import { forwardRef, useCallback, useEffect, useRef, useState } from 'react';\nimport { flushSync } from 'react-dom';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { warnOnce } from '../helpers/devWarnings';\nimport { useBulmaClasses } from '../helpers/useBulmaClasses';\nimport { useClientLayoutEffect } from '../helpers/useClientLayoutEffect';\nimport { useLatestRef } from '../helpers/useLatestRef';\nimport { InputBase, InputBaseProps } from './InputBase';\nimport { useControlLoading } from './controlLoading';\nimport { useFieldsetDisabled } from './FormContext';\n\n/** How PasswordInput's visibility toggle draws itself. */\nexport type PasswordInputVariant = 'icon' | 'text';\n\n/** The strings PasswordInput's toggle shows and announces, for translating. */\nexport interface PasswordInputLabels {\n /**\n * The toggle's name. With the `icon` variant it's the name in both states,\n * and `aria-pressed` says whether the password shows. With `text`, it's the\n * name while the password is hidden, and it has to contain `show`, the word\n * on the button.\n * @defaultValue 'Show password'\n */\n showPassword?: string;\n /**\n * The `text` variant's name while the password shows. It has to contain\n * `hide`.\n * @defaultValue 'Hide password'\n */\n hidePassword?: string;\n /**\n * The `text` variant's word while the password is hidden.\n * @defaultValue 'Show'\n */\n show?: string;\n /**\n * The `text` variant's word while the password shows.\n * @defaultValue 'Hide'\n */\n hide?: string;\n}\n\n/**\n * Props for PasswordInputBase, the input and its toggle without a Field or a\n * Control.\n *\n * @helperProps Helper props go on the `.password-input-container` `<div>`, with\n * `className` and `style`, so they move and size the field and its toggle\n * together. The other attributes go on the `<input>`.\n * @extraProp {string} [autoComplete=\"current-password\"] - Tells the browser and password managers this is an existing password. Pass `\"new-password\"` where the user makes one up, on a sign-up or change-password form.\n * @extraProp {boolean} [spellCheck=false] - Off, so a browser's spellcheck never sees the password once it shows.\n * @extraProp {string} [autoCorrect=\"off\"] - Off, so a phone's keyboard doesn't change what's typed.\n * @extraProp {string} [autoCapitalize=\"none\"] - Off, so a phone's keyboard doesn't capitalize the first letter.\n * @extraProp {string} [value] - The password, controlled. React writes a controlled input's value into its `value` attribute, as it does on any input, so the password sits in the page's markup. Uncontrolled, read with `FormData`, the field never puts what's typed there.\n * @extraProp {React.Ref<HTMLInputElement>} [ref] - Ref forwarded to the `<input>`.\n */\nexport interface PasswordInputBaseProps extends Omit<InputBaseProps, 'type'> {\n /**\n * Whether the password shows, when you hold the state. Setting it makes\n * the visibility controlled: the toggle only calls `onVisibleChange`, and\n * so does hiding again on its own. Apply that `false` and the field is a\n * password field by the time the form reads it; keep `visible` true and\n * the field stays shown.\n */\n visible?: boolean;\n /**\n * Whether the password shows at first, when the input holds its own state.\n * @defaultValue false\n */\n defaultVisible?: boolean;\n /**\n * Called with the new visibility on each toggle, and with `false` when the\n * form submits or resets, or the page is left, which it also is on the way\n * into the back-forward cache. React renders those hides at once, a state\n * update you make here included, so the form reads a password field. One\n * that fires while React is rendering or committing, which includes your\n * `useEffect` and `useLayoutEffect` callbacks, such as a `requestSubmit()`\n * from an effect, can't render there, and lands just after the form is\n * read: hide the password first, or submit from an event handler.\n */\n onVisibleChange?: (visible: boolean) => void;\n /**\n * How the toggle draws itself: an eye icon with a fixed name and\n * `aria-pressed`, or the words \"Show\" and \"Hide\" with a name that follows\n * them.\n * @defaultValue 'icon'\n */\n variant?: PasswordInputVariant;\n /** Translations for the toggle. */\n labels?: PasswordInputLabels;\n}\n\n/** An eye, drawn while the password is hidden. */\nconst EyeIcon = () => (\n <svg viewBox=\"0 0 16 16\" width=\"1.25em\" height=\"1.25em\" aria-hidden=\"true\">\n <g\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M1.5 8s2.5-4.5 6.5-4.5 6.5 4.5 6.5 4.5-2.5 4.5-6.5 4.5S1.5 8 1.5 8z\" />\n <circle cx=\"8\" cy=\"8\" r=\"2\" />\n </g>\n </svg>\n);\n\n/** The eye crossed out, drawn while the password shows. */\nconst EyeOffIcon = () => (\n <svg viewBox=\"0 0 16 16\" width=\"1.25em\" height=\"1.25em\" aria-hidden=\"true\">\n <g\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M1.5 8s2.5-4.5 6.5-4.5 6.5 4.5 6.5 4.5-2.5 4.5-6.5 4.5S1.5 8 1.5 8z\" />\n <circle cx=\"8\" cy=\"8\" r=\"2\" />\n <path d=\"M2.5 2.5l11 11\" />\n </g>\n </svg>\n);\n\n/**\n * Warns in development when the `text` toggle's name doesn't contain the\n * word on it, which a voice control user says to press it.\n */\nconst checkLabelInName = (name: string, word: string) => {\n if (name.toLocaleLowerCase().includes(word.toLocaleLowerCase())) return;\n warnOnce(\n `PasswordInput:label-in-name:${name}:${word}`,\n `[bestax-bulma] A PasswordInput with variant=\"text\" is named ` +\n `\"${name}\" while its button says \"${word}\". A voice control user ` +\n `says the word they see, so the name has to contain it (WCAG 2.5.3, ` +\n `Label in Name). Set labels so each name contains its word.`\n );\n};\n\n/**\n * The raw PasswordInput: a password field with a button inside it that shows what was typed, without Field/Control wrapping.\n *\n * Use `PasswordInput` for the convenience wrapper.\n *\n * @function\n * @param {PasswordInputBaseProps} props - Props for PasswordInputBase.\n * @param {React.Ref<HTMLInputElement>} ref - Forwarded ref to the `<input>`.\n * @returns {JSX.Element} The input and its toggle, in a container.\n */\nexport const PasswordInputBase = forwardRef<\n HTMLInputElement,\n PasswordInputBaseProps\n>((props, ref) => {\n const {\n visible: visibleProp,\n defaultVisible = false,\n onVisibleChange,\n variant = 'icon',\n labels,\n autoComplete = 'current-password',\n spellCheck = false,\n autoCorrect = 'off',\n autoCapitalize = 'none',\n disabled: disabledProp,\n color,\n className,\n style,\n ...others\n } = props;\n // Helper props, `className` and `style` go on the container, so a margin,\n // a width or a display moves the field and its toggle together. `color`\n // stays with the input, whose border it colors.\n const { bulmaHelperClasses, rest } = useBulmaClasses(others);\n const disabled = useFieldsetDisabled(disabledProp);\n // The toggle gives way to the loading spinner of a Control this sits in,\n // which takes its slot, and the field hides the password meanwhile, as\n // there's no button to hide it with.\n const controlLoading = useControlLoading();\n const isText = variant === 'text';\n\n const showPassword = labels?.showPassword || 'Show password';\n const hidePassword = labels?.hidePassword || 'Hide password';\n const show = labels?.show || 'Show';\n const hide = labels?.hide || 'Hide';\n if (isText) {\n checkLabelInName(showPassword, show);\n checkLabelInName(hidePassword, hide);\n }\n\n const isControlled = visibleProp !== undefined;\n const [internalVisible, setInternalVisible] = useState(defaultVisible);\n const visible = isControlled ? visibleProp : internalVisible;\n // Whether the field shows now: as last reported, until `visible` changes.\n // Two hide events before React renders, as from an effect, or a caller\n // holding `visible` that keeps it `true`, report `false` once.\n const shownRef = useRef(visible);\n useClientLayoutEffect(() => {\n shownRef.current = visible;\n }, [visible]);\n const setVisible = (next: boolean) => {\n shownRef.current = next;\n if (!isControlled) setInternalVisible(next);\n onVisibleChange?.(next);\n };\n\n const inputRef = useRef<HTMLInputElement | null>(null);\n // A caller's callback ref may return a cleanup, as React 19 allows. It's\n // held here and run on detach in place of a call with `null`, on React 18\n // as well, since this ref is the one React calls.\n const refCleanup = useRef<(() => void) | null>(null);\n const combinedRef = useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node;\n if (typeof ref === 'function') {\n if (node === null) {\n const cleanup = refCleanup.current;\n refCleanup.current = null;\n if (cleanup) cleanup();\n else ref(null);\n return;\n }\n const cleanup: unknown = ref(node);\n refCleanup.current =\n typeof cleanup === 'function' ? (cleanup as () => void) : null;\n } else if (ref) {\n ref.current = node;\n }\n },\n [ref]\n );\n\n // A toggle with focus that leaves while the input stays, as it does when a\n // Control starts loading, hands focus to the input rather than dropping it\n // to the page. React lets go of the toggle before it takes it out of the\n // page, so the toggle still has focus here; when the whole field unmounts,\n // React has let go of the input first.\n const toggleRef = useRef<HTMLButtonElement | null>(null);\n const setToggle = useCallback((node: HTMLButtonElement | null) => {\n // React lets go only of a toggle it handed over, so there is one.\n const leaving = toggleRef.current as HTMLButtonElement;\n toggleRef.current = node;\n if (node) return;\n const root = leaving.getRootNode() as Document | ShadowRoot;\n if (root.activeElement === leaving) inputRef.current?.focus();\n }, []);\n\n // Hides the password again: reports `false`, and sets its own state when it\n // holds it. Inside `flushSync`, React renders that, a caller's own state\n // update included, before the listener returns, so the browser reads the\n // form, or saves the page's form state, from a password field. The\n // component never sets the field's type itself, so a caller holding\n // `visible` that keeps it `true` keeps the field shown. The one catch: an\n // event fired while React is rendering or committing, which includes\n // `useEffect` and `useLayoutEffect` callbacks (a `requestSubmit()` from\n // an effect), can't flush there, so React warns in development and the\n // hide lands after the form is read. Only the listeners below call it,\n // while the input is mounted.\n const hideRef = useLatestRef(() => {\n if (!shownRef.current) return;\n // eslint-disable-next-line @eslint-react/dom-no-flush-sync -- the form is read, or the page saved, before React would render this on its own\n flushSync(() => setVisible(false));\n });\n\n // When the form it belongs to submits or resets: whichever form that is\n // when it happens, so a form mounted after the field, or mounted again,\n // counts. Neither event leaves a shadow root, so it listens on the field's\n // own root, the document or the shadow root it renders in, and in the\n // capture phase, before any listener on the form.\n useEffect(() => {\n const input = inputRef.current as HTMLInputElement;\n const root = input.getRootNode();\n const onFormEvent = (event: Event) => {\n if (event.target === input.form) hideRef.current();\n };\n root.addEventListener('submit', onFormEvent, true);\n root.addEventListener('reset', onFormEvent, true);\n return () => {\n root.removeEventListener('submit', onFormEvent, true);\n root.removeEventListener('reset', onFormEvent, true);\n };\n }, [hideRef]);\n\n // When the page is left, so the history the browser keeps of the form\n // holds a password field rather than text. It fires on the way into the\n // back-forward cache too, so a page coming back from there is hidden.\n useEffect(() => {\n const onPageHide = () => hideRef.current();\n window.addEventListener('pagehide', onPageHide);\n return () => window.removeEventListener('pagehide', onPageHide);\n }, [hideRef]);\n\n const containerClass = usePrefixedClassNames('password-input-container', {\n 'is-text': isText,\n });\n const toggleClass = usePrefixedClassNames('password-input-toggle');\n\n // The icon keeps one name and reports its state; the words change, so\n // the name follows them and there's no state to report.\n const toggleName = isText && visible ? hidePassword : showPassword;\n const glyph = visible ? <EyeOffIcon /> : <EyeIcon />;\n\n return (\n <div\n className={classNames(containerClass, bulmaHelperClasses, className)}\n style={style}\n >\n <InputBase\n ref={combinedRef}\n autoComplete={autoComplete}\n spellCheck={spellCheck}\n autoCorrect={autoCorrect}\n autoCapitalize={autoCapitalize}\n disabled={disabled}\n color={color}\n {...rest}\n type={visible && !controlLoading ? 'text' : 'password'}\n />\n {!controlLoading && (\n <button\n ref={setToggle}\n type=\"button\"\n className={toggleClass}\n aria-label={toggleName}\n aria-pressed={isText ? undefined : visible}\n disabled={disabled}\n // A pointer press leaves focus, and the caret, in the input.\n onMouseDown={event => event.preventDefault()}\n onClick={() => setVisible(!visible)}\n >\n {isText ? (visible ? hide : show) : glyph}\n </button>\n )}\n </div>\n );\n});\n\nPasswordInputBase.displayName = 'PasswordInputBase';\n\nexport default PasswordInputBase;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;AA4FA;AACA,MAAM,OAAO,GAAG,OACdA,GAAA,CAAA,KAAA,EAAA,EAAK,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,QAAQ,EAAC,MAAM,EAAC,QAAQ,EAAA,aAAA,EAAa,MAAM,EAAA,QAAA,EACxEC,IAAA,CAAA,GAAA,EAAA,EACE,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EAAA,QAAA,EAAA,CAEtBD,GAAA,CAAA,MAAA,EAAA,EAAM,CAAC,EAAC,qEAAqE,GAAG,EAChFA,GAAA,CAA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IAAI,KAAK,GAClC,CACV,CAAA,EAAA,CACG;AAEV,CAAC;AAED,iBAAiB,CAAC,WAAW,GAAG,mBAAmB;;"}
1
+ {"version":3,"file":"PasswordInputBase.js","sources":["../../../src/form/PasswordInputBase.tsx"],"sourcesContent":["import { forwardRef, useCallback, useEffect, useRef, useState } from 'react';\nimport { flushSync } from 'react-dom';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { warnOnce } from '../helpers/devWarnings';\nimport { useFieldHelperClasses } from '../helpers/useFieldHelperClasses';\nimport { useClientLayoutEffect } from '../helpers/useClientLayoutEffect';\nimport { useLatestRef } from '../helpers/useLatestRef';\nimport { InputBase, InputBaseProps } from './InputBase';\nimport { useControlLoading } from './controlLoading';\nimport { useFieldsetDisabled } from './FormContext';\n\n/** How PasswordInput's visibility toggle draws itself. */\nexport type PasswordInputVariant = 'icon' | 'text';\n\n/** The strings PasswordInput's toggle shows and announces, for translating. */\nexport interface PasswordInputLabels {\n /**\n * The toggle's name. With the `icon` variant it's the name in both states,\n * and `aria-pressed` says whether the password shows. With `text`, it's the\n * name while the password is hidden, and it has to contain `show`, the word\n * on the button.\n * @defaultValue 'Show password'\n */\n showPassword?: string;\n /**\n * The `text` variant's name while the password shows. It has to contain\n * `hide`.\n * @defaultValue 'Hide password'\n */\n hidePassword?: string;\n /**\n * The `text` variant's word while the password is hidden.\n * @defaultValue 'Show'\n */\n show?: string;\n /**\n * The `text` variant's word while the password shows.\n * @defaultValue 'Hide'\n */\n hide?: string;\n}\n\n/**\n * Props for PasswordInputBase, the input and its toggle without a Field or a\n * Control.\n *\n * @helperProps Helper props go on the `.password-input-container` `<div>`, with\n * `className` and `style`, so they move and size the field and its toggle\n * together, except that the background and text helpers go on the\n * `<input>`, since Bulma's `.input` sets its own background and font. The\n * other attributes go on the `<input>` too.\n * @extraProp {string} [autoComplete=\"current-password\"] - Tells the browser and password managers this is an existing password. Pass `\"new-password\"` where the user makes one up, on a sign-up or change-password form.\n * @extraProp {boolean} [spellCheck=false] - Off, so a browser's spellcheck never sees the password once it shows.\n * @extraProp {string} [autoCorrect=\"off\"] - Off, so a phone's keyboard doesn't change what's typed.\n * @extraProp {string} [autoCapitalize=\"none\"] - Off, so a phone's keyboard doesn't capitalize the first letter.\n * @extraProp {string} [value] - The password, controlled. React writes a controlled input's value into its `value` attribute, as it does on any input, so the password sits in the page's markup. Uncontrolled, read with `FormData`, the field never puts what's typed there.\n * @extraProp {React.Ref<HTMLInputElement>} [ref] - Ref forwarded to the `<input>`.\n */\nexport interface PasswordInputBaseProps extends Omit<InputBaseProps, 'type'> {\n /**\n * Whether the password shows, when you hold the state. Setting it makes\n * the visibility controlled: the toggle only calls `onVisibleChange`, and\n * so does hiding again on its own. Apply that `false` and the field is a\n * password field by the time the form reads it; keep `visible` true and\n * the field stays shown.\n */\n visible?: boolean;\n /**\n * Whether the password shows at first, when the input holds its own state.\n * @defaultValue false\n */\n defaultVisible?: boolean;\n /**\n * Called with the new visibility on each toggle, and with `false` when the\n * form submits or resets, or the page is left, which it also is on the way\n * into the back-forward cache. React renders those hides at once, a state\n * update you make here included, so the form reads a password field. One\n * that fires while React is rendering or committing, which includes your\n * `useEffect` and `useLayoutEffect` callbacks, such as a `requestSubmit()`\n * from an effect, can't render there, and lands just after the form is\n * read: hide the password first, or submit from an event handler.\n */\n onVisibleChange?: (visible: boolean) => void;\n /**\n * How the toggle draws itself: an eye icon with a fixed name and\n * `aria-pressed`, or the words \"Show\" and \"Hide\" with a name that follows\n * them.\n * @defaultValue 'icon'\n */\n variant?: PasswordInputVariant;\n /** Translations for the toggle. */\n labels?: PasswordInputLabels;\n}\n\n/** An eye, drawn while the password is hidden. */\nconst EyeIcon = () => (\n <svg viewBox=\"0 0 16 16\" width=\"1.25em\" height=\"1.25em\" aria-hidden=\"true\">\n <g\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M1.5 8s2.5-4.5 6.5-4.5 6.5 4.5 6.5 4.5-2.5 4.5-6.5 4.5S1.5 8 1.5 8z\" />\n <circle cx=\"8\" cy=\"8\" r=\"2\" />\n </g>\n </svg>\n);\n\n/** The eye crossed out, drawn while the password shows. */\nconst EyeOffIcon = () => (\n <svg viewBox=\"0 0 16 16\" width=\"1.25em\" height=\"1.25em\" aria-hidden=\"true\">\n <g\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M1.5 8s2.5-4.5 6.5-4.5 6.5 4.5 6.5 4.5-2.5 4.5-6.5 4.5S1.5 8 1.5 8z\" />\n <circle cx=\"8\" cy=\"8\" r=\"2\" />\n <path d=\"M2.5 2.5l11 11\" />\n </g>\n </svg>\n);\n\n/**\n * Warns in development when the `text` toggle's name doesn't contain the\n * word on it, which a voice control user says to press it.\n */\nconst checkLabelInName = (name: string, word: string) => {\n if (name.toLocaleLowerCase().includes(word.toLocaleLowerCase())) return;\n warnOnce(\n `PasswordInput:label-in-name:${name}:${word}`,\n `[bestax-bulma] A PasswordInput with variant=\"text\" is named ` +\n `\"${name}\" while its button says \"${word}\". A voice control user ` +\n `says the word they see, so the name has to contain it (WCAG 2.5.3, ` +\n `Label in Name). Set labels so each name contains its word.`\n );\n};\n\n/**\n * The raw PasswordInput: a password field with a button inside it that shows what was typed, without Field/Control wrapping.\n *\n * Use `PasswordInput` for the convenience wrapper.\n *\n * @function\n * @param {PasswordInputBaseProps} props - Props for PasswordInputBase.\n * @param {React.Ref<HTMLInputElement>} ref - Forwarded ref to the `<input>`.\n * @returns {JSX.Element} The input and its toggle, in a container.\n */\nexport const PasswordInputBase = forwardRef<\n HTMLInputElement,\n PasswordInputBaseProps\n>((props, ref) => {\n const {\n visible: visibleProp,\n defaultVisible = false,\n onVisibleChange,\n variant = 'icon',\n labels,\n autoComplete = 'current-password',\n spellCheck = false,\n autoCorrect = 'off',\n autoCapitalize = 'none',\n disabled: disabledProp,\n color,\n className,\n style,\n ...others\n } = props;\n // Helper props, `className` and `style` go on the container, so a margin,\n // a width or a display moves the field and its toggle together. The\n // background and text helpers go on the input, since Bulma's `.input` sets\n // its own background and font. `color` stays with the input, whose border\n // it colors.\n const { backgroundClasses, textClasses, otherClasses, rest } =\n useFieldHelperClasses(others);\n const disabled = useFieldsetDisabled(disabledProp);\n // The toggle gives way to the loading spinner of a Control this sits in,\n // which takes its slot, and the field hides the password meanwhile, as\n // there's no button to hide it with.\n const controlLoading = useControlLoading();\n const isText = variant === 'text';\n\n const showPassword = labels?.showPassword || 'Show password';\n const hidePassword = labels?.hidePassword || 'Hide password';\n const show = labels?.show || 'Show';\n const hide = labels?.hide || 'Hide';\n if (isText) {\n checkLabelInName(showPassword, show);\n checkLabelInName(hidePassword, hide);\n }\n\n const isControlled = visibleProp !== undefined;\n const [internalVisible, setInternalVisible] = useState(defaultVisible);\n const visible = isControlled ? visibleProp : internalVisible;\n // Whether the field shows now: as last reported, until `visible` changes.\n // Two hide events before React renders, as from an effect, or a caller\n // holding `visible` that keeps it `true`, report `false` once.\n const shownRef = useRef(visible);\n useClientLayoutEffect(() => {\n shownRef.current = visible;\n }, [visible]);\n const setVisible = (next: boolean) => {\n shownRef.current = next;\n if (!isControlled) setInternalVisible(next);\n onVisibleChange?.(next);\n };\n\n const inputRef = useRef<HTMLInputElement | null>(null);\n // A caller's callback ref may return a cleanup, as React 19 allows. It's\n // held here and run on detach in place of a call with `null`, on React 18\n // as well, since this ref is the one React calls.\n const refCleanup = useRef<(() => void) | null>(null);\n const combinedRef = useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node;\n if (typeof ref === 'function') {\n if (node === null) {\n const cleanup = refCleanup.current;\n refCleanup.current = null;\n if (cleanup) cleanup();\n else ref(null);\n return;\n }\n const cleanup: unknown = ref(node);\n refCleanup.current =\n typeof cleanup === 'function' ? (cleanup as () => void) : null;\n } else if (ref) {\n ref.current = node;\n }\n },\n [ref]\n );\n\n // A toggle with focus that leaves while the input stays, as it does when a\n // Control starts loading, hands focus to the input rather than dropping it\n // to the page. React lets go of the toggle before it takes it out of the\n // page, so the toggle still has focus here; when the whole field unmounts,\n // React has let go of the input first.\n const toggleRef = useRef<HTMLButtonElement | null>(null);\n const setToggle = useCallback((node: HTMLButtonElement | null) => {\n // React lets go only of a toggle it handed over, so there is one.\n const leaving = toggleRef.current as HTMLButtonElement;\n toggleRef.current = node;\n if (node) return;\n const root = leaving.getRootNode() as Document | ShadowRoot;\n if (root.activeElement === leaving) inputRef.current?.focus();\n }, []);\n\n // Hides the password again: reports `false`, and sets its own state when it\n // holds it. Inside `flushSync`, React renders that, a caller's own state\n // update included, before the listener returns, so the browser reads the\n // form, or saves the page's form state, from a password field. The\n // component never sets the field's type itself, so a caller holding\n // `visible` that keeps it `true` keeps the field shown. The one catch: an\n // event fired while React is rendering or committing, which includes\n // `useEffect` and `useLayoutEffect` callbacks (a `requestSubmit()` from\n // an effect), can't flush there, so React warns in development and the\n // hide lands after the form is read. Only the listeners below call it,\n // while the input is mounted.\n const hideRef = useLatestRef(() => {\n if (!shownRef.current) return;\n // eslint-disable-next-line @eslint-react/dom-no-flush-sync -- the form is read, or the page saved, before React would render this on its own\n flushSync(() => setVisible(false));\n });\n\n // When the form it belongs to submits or resets: whichever form that is\n // when it happens, so a form mounted after the field, or mounted again,\n // counts. Neither event leaves a shadow root, so it listens on the field's\n // own root, the document or the shadow root it renders in, and in the\n // capture phase, before any listener on the form.\n useEffect(() => {\n const input = inputRef.current as HTMLInputElement;\n const root = input.getRootNode();\n const onFormEvent = (event: Event) => {\n if (event.target === input.form) hideRef.current();\n };\n root.addEventListener('submit', onFormEvent, true);\n root.addEventListener('reset', onFormEvent, true);\n return () => {\n root.removeEventListener('submit', onFormEvent, true);\n root.removeEventListener('reset', onFormEvent, true);\n };\n }, [hideRef]);\n\n // When the page is left, so the history the browser keeps of the form\n // holds a password field rather than text. It fires on the way into the\n // back-forward cache too, so a page coming back from there is hidden.\n useEffect(() => {\n const onPageHide = () => hideRef.current();\n window.addEventListener('pagehide', onPageHide);\n return () => window.removeEventListener('pagehide', onPageHide);\n }, [hideRef]);\n\n const containerClass = usePrefixedClassNames('password-input-container', {\n 'is-text': isText,\n });\n const toggleClass = usePrefixedClassNames('password-input-toggle');\n\n // The icon keeps one name and reports its state; the words change, so\n // the name follows them and there's no state to report.\n const toggleName = isText && visible ? hidePassword : showPassword;\n const glyph = visible ? <EyeOffIcon /> : <EyeIcon />;\n\n return (\n <div\n className={classNames(containerClass, otherClasses, className)}\n style={style}\n >\n <InputBase\n ref={combinedRef}\n autoComplete={autoComplete}\n spellCheck={spellCheck}\n autoCorrect={autoCorrect}\n autoCapitalize={autoCapitalize}\n disabled={disabled}\n color={color}\n className={classNames(textClasses, backgroundClasses)}\n {...rest}\n type={visible && !controlLoading ? 'text' : 'password'}\n />\n {!controlLoading && (\n <button\n ref={setToggle}\n type=\"button\"\n className={toggleClass}\n aria-label={toggleName}\n aria-pressed={isText ? undefined : visible}\n disabled={disabled}\n // A pointer press leaves focus, and the caret, in the input.\n onMouseDown={event => event.preventDefault()}\n onClick={() => setVisible(!visible)}\n >\n {isText ? (visible ? hide : show) : glyph}\n </button>\n )}\n </div>\n );\n});\n\nPasswordInputBase.displayName = 'PasswordInputBase';\n\nexport default PasswordInputBase;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;AA8FA;AACA,MAAM,OAAO,GAAG,OACdA,GAAA,CAAA,KAAA,EAAA,EAAK,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,QAAQ,EAAC,MAAM,EAAC,QAAQ,EAAA,aAAA,EAAa,MAAM,EAAA,QAAA,EACxEC,IAAA,CAAA,GAAA,EAAA,EACE,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EAAA,QAAA,EAAA,CAEtBD,GAAA,CAAA,MA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EAAE,KAAK,IAAI,KAAK,CAAC,cAAc,EAAE,EAC5C,OAAO,EAAE,MAAM,UAAU,CAAC,CAAC,OAAO,CAAC,EAAA,QAAA,EAElC,MAAM,IAAI,OAAO,GAAG,IAAI,GAAG,IAAI,IAAI,KAAK,GAClC,CACV,CAAA,EAAA,CACG;AAEV,CAAC;AAED,iBAAiB,CAAC,WAAW,GAAG,mBAAmB;;"}
@@ -3,7 +3,7 @@
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
4
  import { forwardRef, useState, useRef, useId, useCallback, useEffect, useMemo } from 'react';
5
5
  import { usePrefixedClassNames, classNames } from '../helpers/classNames.js';
6
- import { useBulmaClasses } from '../helpers/useBulmaClasses.js';
6
+ import { useFieldHelperClasses } from '../helpers/useFieldHelperClasses.js';
7
7
  import { mergeLabels } from './_pickerInternals/pickerTypes.js';
8
8
  import { hourCycleFromFormat, formatTime, DEFAULT_TIME_FORMAT_12, DEFAULT_TIME_FORMAT_24, parseTime } from './_pickerInternals/formatters.js';
9
9
  import { floorMin, setTimeOfDay, isWithin, snapTimeToIncrement } from './_pickerInternals/dateUtils.js';
@@ -93,7 +93,10 @@ const TimeInputBase = forwardRef((props, ref) => {
93
93
  const valueAtOpenRef = useRef(null);
94
94
  const reactId = useId();
95
95
  const popoverId = id ? `${id}-popover` : `picker-${reactId}`;
96
- const { bulmaHelperClasses, rest: cleanRest } = useBulmaClasses(rest);
96
+ // The field takes the background and text helpers, since Bulma's `.input`
97
+ // sets its own background and font. The container keeps the rest, and the
98
+ // text helpers too where a popover inside it takes them.
99
+ const { bulmaHelperClasses, backgroundClasses, textClasses, otherClasses, rest: cleanRest, } = useFieldHelperClasses(rest);
97
100
  const { shouldUseNative, isSmallViewport } = useNativeMobilePicker({
98
101
  force: mobileNative === 'auto' ? undefined : mobileNative,
99
102
  });
@@ -253,7 +256,7 @@ const TimeInputBase = forwardRef((props, ref) => {
253
256
  if (inline) {
254
257
  return (jsxs("div", { ...localeScope.rootAttrs, ...cleanRest, ref: containerRef, className: classNames(containerClass, bulmaHelperClasses, className), children: [panel, name && (jsx("input", { type: "hidden", name: name, form: form, value: value ? toIsoTime(value, enableSeconds) : '', required: required }))] }));
255
258
  }
256
- return (jsxs("div", { ref: containerRef, className: classNames(containerClass, bulmaHelperClasses, className), ...localeScope.rootAttrs, ...cleanRest, children: [jsx("input", { ref: combinedRef, type: "text", role: "combobox", "aria-haspopup": "dialog", "aria-expanded": open, "aria-controls": popoverId, autoComplete: "off", className: inputClass, value: text, placeholder: placeholder, disabled: disabled, readOnly: inputReadOnlyAttr, name: name, form: form, required: required, id: id, ...inputHandlers }), popover && triggerIcon && (jsx("button", { type: "button", className: triggerClass, onClick: () => {
259
+ return (jsxs("div", { ref: containerRef, className: classNames(containerClass, otherClasses, textClasses, className), ...localeScope.rootAttrs, ...cleanRest, children: [jsx("input", { ref: combinedRef, type: "text", role: "combobox", "aria-haspopup": "dialog", "aria-expanded": open, "aria-controls": popoverId, autoComplete: "off", className: classNames(inputClass, textClasses, backgroundClasses), value: text, placeholder: placeholder, disabled: disabled, readOnly: inputReadOnlyAttr, name: name, form: form, required: required, id: id, ...inputHandlers }), popover && triggerIcon && (jsx("button", { type: "button", className: triggerClass, onClick: () => {
257
260
  if (canOpen)
258
261
  setOpen(!open);
259
262
  }, disabled: !canOpen, "aria-label": t.chooseTime, "aria-haspopup": "dialog", "aria-controls": popoverId, "aria-expanded": open, tabIndex: canOpen ? 0 : -1, children: jsx(Icon, { name: triggerIconName, size: size }) })), popover && (jsx(PickerPopover, { localeScope: localeScope.panel, isOpen: open, onClose: () => setOpen(false), anchorRef: containerRef, position: position, appendToBody: appendToBody, ariaLabel: t.chooseTime, id: popoverId, restoreFocusRef: inputRef, children: panel }))] }));
@@ -1 +1 @@
1
- {"version":3,"file":"TimeInputBase.js","sources":["../../../src/form/TimeInputBase.tsx"],"sourcesContent":["import React, {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport {\n PickerPosition,\n HourFormat,\n PickerLabels,\n mergeLabels,\n} from './_pickerInternals/pickerTypes';\nimport {\n formatTime,\n hourCycleFromFormat,\n parseTime,\n DateFormatOption,\n DEFAULT_TIME_FORMAT_24,\n DEFAULT_TIME_FORMAT_12,\n} from './_pickerInternals/formatters';\nimport {\n setTimeOfDay,\n floorMin,\n isWithin,\n snapTimeToIncrement,\n} from './_pickerInternals/dateUtils';\nimport { TimeWheels } from './_pickerInternals/TimeWheels';\nimport { PickerPopover } from './_pickerInternals/PickerPopover';\nimport { useNativeMobilePicker } from './_pickerInternals/useNativeMobilePicker';\nimport { useSegmentedEntry } from './_pickerInternals/useSegmentedEntry';\nimport {\n usePickerLocale,\n usePickerLocaleScope,\n} from './_pickerInternals/useLocaleDefaults';\nimport { useControlLoading } from './controlLoading';\nimport { useFieldLabelTarget, useFieldsetDisabled } from './FormContext';\nimport { Icon } from '../elements/Icon';\nimport { Buttons } from '../elements/Buttons';\n\nconst toIsoTime = (d: Date, withSeconds: boolean): string => {\n const hh = String(d.getHours()).padStart(2, '0');\n const mm = String(d.getMinutes()).padStart(2, '0');\n if (!withSeconds) return `${hh}:${mm}`;\n const ss = String(d.getSeconds()).padStart(2, '0');\n return `${hh}:${mm}:${ss}`;\n};\n\nconst fromIsoTime = (s: string): Date | null => {\n // The HTML time value may carry fractional seconds (the spec allows them\n // and some engines normalize to `:ss.sss`); accept and drop.\n const m = /^(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d{1,3})?)?$/.exec(s);\n if (!m) return null;\n const today = new Date();\n return new Date(\n today.getFullYear(),\n today.getMonth(),\n today.getDate(),\n Number(m[1]),\n Number(m[2]),\n m[3] ? Number(m[3]) : 0,\n 0\n );\n};\n\n/**\n * Props for the raw TimeInput base. Use the higher-level `TimeInput` for\n * Field/Control composition; `TimeInputBase` is the input + popover only.\n */\nexport interface TimeInputBaseProps\n extends\n Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n | 'value'\n | 'defaultValue'\n | 'onChange'\n | 'size'\n | 'color'\n | 'min'\n | 'max'\n | 'type'\n | 'popover'\n >,\n Omit<BulmaClassesProps, 'color'> {\n /** Controlled selected time (date portion is preserved). */\n value?: Date | null;\n /** Initial value for uncontrolled usage. */\n defaultValue?: Date | null;\n /** Fired when the value changes. */\n onChange?: (d: Date | null) => void;\n /** Fired when the popover opens. */\n onOpen?: () => void;\n /** Fired when the popover closes. */\n onClose?: () => void;\n /**\n * Earliest selectable time. A `min` before year 1 is raised to midnight on\n * 1 January of year 1, and a `value` dated before then is out of range, so\n * the wheels and typing change nothing on it, as in the date pickers.\n */\n min?: Date;\n /** Latest selectable time. */\n max?: Date;\n /** Disable the input. */\n disabled?: boolean;\n /**\n * Make the input read-only. An `inline` picker's wheels keep their tab\n * stops and carry `aria-readonly`, but no key, scroll, drag or click turns\n * them, so the time can't change.\n */\n readOnly?: boolean;\n /** Placeholder text for the input. */\n placeholder?: string;\n /**\n * Token format string or `Intl.DateTimeFormat` options.\n * @defaultValue (see below)\n */\n format?: DateFormatOption;\n /**\n * Custom parser. Enter and leaving the field call it only if the user\n * changed the text, so focus passing through commits nothing and the value\n * keeps what the format leaves out, such as seconds and the date.\n */\n parse?: (s: string) => Date | null;\n /**\n * BCP-47 locale tag for Intl formatting. Unset, it is the `locale` of a\n * `LocaleProvider` around the picker, and with neither, `Intl` uses the\n * runtime's own locale.\n */\n locale?: string;\n /** Render the spinner inline (no popover). */\n inline?: boolean;\n /** Use `<input type=\"time\">` on coarse-pointer + small-viewport devices. */\n mobileNative?: boolean | 'auto';\n /** Allow segmented keyboard typing in the input (type the time directly, auto-advancing across segments). `false` makes the field picker-only. */\n editable?: boolean;\n /** Whether the spinner popover exists. `false` makes the field input-only (segmented typing, no popover). */\n popover?: boolean;\n /**\n * Open the popover when the input is focused. Focus that a closing popover\n * hands back to the input leaves it closed. Dismissing it commits nothing:\n * an empty field stays empty, and leaving afterwards commits only what was\n * typed since. With it off, the launcher or Alt+ArrowDown opens it.\n */\n openOnFocus?: boolean;\n /** Close the popover after a time is selected (off by default). */\n closeOnSelect?: boolean;\n /**\n * Where the popover opens against the field. Left out, it opens below and\n * lines up with the field's start edge, which is its right edge when the\n * picker reads right to left. A corner you pass stays physical, so\n * `bottom-left` lines up the left edges either way.\n * @defaultValue 'bottom-left'\n */\n position?: PickerPosition;\n /**\n * Render the popover through a portal, into the `portalContainer` a\n * `ConfigProvider` sets, else the `Modal`, `Dialog` or `Command.Dialog` it's\n * in, else `document.body`. On a narrow screen\n * an in-place popover spans the bottom of the viewport, while a portaled\n * one stays on its `position` corner.\n */\n appendToBody?: boolean;\n /**\n * Bulma color modifier for the input, also carried by the wheels, where it\n * colors the selection band. A focused wheel's keyboard focus ring is drawn\n * inside the band in the color's `-invert`, like the selected value, so it\n * shows on the fill. Unset, the wheels use\n * `--bulma-timeinput-wheel-selected-bg`, which defaults to `primary`.\n */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Size variant. */\n size?: 'small' | 'medium' | 'large';\n /** Render the input with rounded corners. */\n isRounded?: boolean;\n /** Hour format. `'12'` adds an AM/PM column to the wheels. */\n hourFormat?: HourFormat;\n /** Show a seconds column. Note: iOS Safari's native time picker UI does not include a seconds wheel; pass `mobileNative={false}` if you need one on iOS. */\n enableSeconds?: boolean;\n /** Hour step for the spinner. */\n incrementHours?: number;\n /** Minute step. Combine with `min`/`max` for slot-style pickers. */\n incrementMinutes?: number;\n /** Second step. Default `1`. */\n incrementSeconds?: number;\n /** Predicate returning `true` for times that should be skipped. Blocked times are also rejected during manual typing. */\n unselectableTimes?: (d: Date) => boolean;\n /** Decorative left icon glyph for the wrapping `Control` (shown by default). Set `''` to hide. */\n iconLeftName?: string;\n /**\n * Show a clickable launcher button on the right that toggles the popover.\n * Hidden by default while a `Control` it sits in shows its `isLoading`\n * spinner, which shares that right edge.\n * @defaultValue true\n */\n triggerIcon?: boolean;\n /** Glyph for the right launcher button. */\n triggerIconName?: string;\n /**\n * Optional translatable string overrides. In a 12-hour picker, `ampm`\n * names the AM/PM column, `'AM/PM'` by default.\n */\n labels?: PickerLabels;\n /** Play a short audible click on each wheel-item crossing. Substitute for haptic feedback on iOS Safari (which has no web haptic API as of May 2026); on Android, `navigator.vibrate(5)` fires automatically regardless. */\n audioTick?: boolean;\n /** Auto-route platform-appropriate feedback: vibrate on Android (already happening), audio thunk on iOS (where vibrate is unavailable). One switch instead of platform-sniffing on the consumer side. `audioTick={true}` always wins. */\n haptics?: boolean;\n}\n\n/**\n * Raw TimeInput — input + popover spinner without Field/Control wrapping.\n * Use `TimeInput` for the convenience wrapper.\n *\n * @function\n * @param {TimeInputBaseProps} props\n * @returns {JSX.Element}\n */\nexport const TimeInputBase = forwardRef<HTMLInputElement, TimeInputBaseProps>(\n (props, ref) => {\n const {\n value: controlledValue,\n defaultValue,\n onChange,\n onOpen,\n onClose,\n min,\n max,\n disabled: disabledProp,\n readOnly,\n placeholder,\n format,\n parse,\n locale: localeProp,\n inline = false,\n mobileNative = 'auto',\n editable = true,\n popover = true,\n openOnFocus = true,\n closeOnSelect = false,\n position,\n appendToBody = false,\n color,\n size,\n isRounded,\n hourFormat = '24',\n enableSeconds = false,\n incrementHours = 1,\n incrementMinutes = 1,\n incrementSeconds = 1,\n unselectableTimes,\n className,\n name,\n form,\n required,\n id: idProp,\n onFocus,\n onClick,\n onKeyDown,\n onBlur,\n iconLeftName: _iconLeftName,\n triggerIcon: triggerIconProp,\n triggerIconName = 'chevron-down',\n labels,\n audioTick = false,\n haptics = false,\n ...rest\n } = props;\n // A LocaleProvider around the picker sets its default locale.\n const locale = usePickerLocale(localeProp);\n // Its own language and direction, which its root and a portaled panel\n // carry inside a provider.\n const localeScope = usePickerLocaleScope(localeProp, props.dir);\n const disabled = useFieldsetDisabled(disabledProp);\n // Inside a labeled Field the input takes the id the label points at\n // when the caller set none, as InputBase does, and the popover's ids\n // follow it. Inline there is no input to name, so nothing takes the\n // Field's id or builds on it.\n const id = useFieldLabelTarget(idProp, !inline);\n // The launcher gives way to the loading spinner of a Control this sits in.\n const controlLoading = useControlLoading();\n const triggerIcon = triggerIconProp ?? !controlLoading;\n\n // Platform-appropriate feedback routing: when `haptics` is opted in and\n // the runtime has no Vibration API (notably iOS Safari), enable the\n // audio thunk so the user still gets *some* tactile cue. When vibrate\n // is available (Android Chrome etc.), the existing unconditional\n // `navigator.vibrate(5)` carries the haptic — no audio added unless\n // the consumer explicitly set `audioTick`. `audioTick` always wins.\n const hasVibrate =\n typeof navigator !== 'undefined' &&\n typeof navigator.vibrate === 'function';\n const effectiveAudioTick = audioTick || (haptics && !hasVibrate);\n const t = mergeLabels(labels);\n\n const isControlled = controlledValue !== undefined;\n const [internalValue, setInternalValue] = useState<Date | null>(\n defaultValue ?? null\n );\n const value = isControlled ? (controlledValue ?? null) : internalValue;\n\n const defaultFormat: DateFormatOption =\n format ??\n (hourFormat === '12'\n ? enableSeconds\n ? 'hh:mm:ss A'\n : DEFAULT_TIME_FORMAT_12\n : enableSeconds\n ? 'HH:mm:ss'\n : DEFAULT_TIME_FORMAT_24);\n\n // The displayed format is the source of truth for the hour cycle: an\n // explicit 12-hour `format` must drive a 12-hour wheel even when\n // `hourFormat` was left at its default. Fall back to the raw prop only when\n // the cycle can't be read from the format (an Intl-options object, or no\n // hour token).\n const effectiveHourFormat =\n hourCycleFromFormat(defaultFormat) ?? hourFormat;\n\n const [open, setOpenState] = useState(false);\n const [text, setText] = useState<string>(\n value ? formatTime(value, defaultFormat, locale) : ''\n );\n\n const inputRef = useRef<HTMLInputElement>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n // Snapshot of value at the moment the popover opens, used by Cancel.\n const valueAtOpenRef = useRef<Date | null>(null);\n const reactId = useId();\n const popoverId = id ? `${id}-popover` : `picker-${reactId}`;\n\n const { bulmaHelperClasses, rest: cleanRest } = useBulmaClasses(rest);\n\n const { shouldUseNative, isSmallViewport } = useNativeMobilePicker({\n force: mobileNative === 'auto' ? undefined : mobileNative,\n });\n const useNative = !inline && shouldUseNative;\n const wheelItemHeight = isSmallViewport ? 40 : 32;\n\n const inputClass = usePrefixedClassNames('input', {\n [`is-${color}`]: !!color,\n [`is-${size}`]: !!size,\n 'is-rounded': isRounded,\n });\n const containerClass = usePrefixedClassNames('timeinput-container');\n const triggerClass = usePrefixedClassNames('timeinput-trigger');\n const panelClass = usePrefixedClassNames('timeinput-panel');\n const footerClass = usePrefixedClassNames('timeinput-footer');\n const footerButton = usePrefixedClassNames('button', 'is-small');\n const footerOkClass = usePrefixedClassNames(\n 'button',\n 'is-small',\n 'timeinput-footer-ok'\n );\n const mobileFooterClass = usePrefixedClassNames('timeinput-footer-mobile');\n const mobileFooterResetClass = usePrefixedClassNames(\n 'timeinput-footer-reset'\n );\n const mobileFooterDoneClass = usePrefixedClassNames(\n 'timeinput-footer-done'\n );\n\n // What the latest request asked for, so a second request in the same\n // event sees it before React renders. The callbacks fire here rather than\n // in a state updater, which StrictMode calls twice, and after the state\n // is set, so a request a callback makes is the one that lands last.\n const requestedOpenRef = useRef(false);\n const setOpen = useCallback(\n (next: boolean) => {\n if (requestedOpenRef.current === next) return;\n requestedOpenRef.current = next;\n setOpenState(next);\n if (next) {\n valueAtOpenRef.current = value;\n onOpen?.();\n } else {\n onClose?.();\n }\n },\n [onOpen, onClose, value]\n );\n\n useEffect(() => {\n setText(value ? formatTime(value, defaultFormat, locale) : '');\n }, [value, defaultFormat, locale]);\n\n // A value's date before year 1 is out of range, as in the date pickers.\n const lowerBound = useMemo(() => floorMin(min), [min]);\n\n const commitValue = useCallback(\n (next: Date | null) => {\n if (!isControlled) setInternalValue(next);\n onChange?.(next);\n },\n [isControlled, onChange]\n );\n\n // An empty field starts from today, at the whole minute or second the\n // wheels show.\n const handleSpinnerChange = useCallback(\n (parts: { hours: number; minutes: number; seconds?: number }) => {\n // The wheels start nothing while read-only. This catches a drag or a\n // fling already under way when `readOnly` turns on.\n if (readOnly) return;\n const next = value\n ? setTimeOfDay(value, parts)\n : setTimeOfDay(new Date(), {\n ...parts,\n seconds: parts.seconds ?? 0,\n milliseconds: 0,\n });\n if (!isWithin(next, lowerBound, max)) return;\n commitValue(next);\n },\n [readOnly, value, lowerBound, max, commitValue]\n );\n\n const tryParse = useCallback(\n (s: string): Date | null => {\n const trimmed = s.trim();\n if (!trimmed) return null;\n const fmt = typeof format === 'string' ? format : undefined;\n return parse\n ? parse(trimmed)\n : parseTime(\n trimmed,\n fmt ??\n (typeof defaultFormat === 'string'\n ? defaultFormat\n : DEFAULT_TIME_FORMAT_24)\n );\n },\n [parse, format, defaultFormat]\n );\n\n // The Date the user edits when starting without a current value. Noon so\n // the 12h / 24h hour calculations are unambiguous.\n const makeBaseDate = useCallback((): Date => {\n const d = new Date();\n d.setHours(12, 0, 0, 0);\n return d;\n }, []);\n\n const inputReadOnlyAttr = !!readOnly || !editable;\n const canOpen = !!popover && !disabled && !readOnly;\n\n const { inputHandlers } = useSegmentedEntry({\n format: defaultFormat,\n value,\n commitValue,\n formatFn: formatTime,\n tryParse,\n text,\n setText,\n makeBaseDate,\n locale,\n min: lowerBound,\n max,\n isBlocked: unselectableTimes,\n disabled,\n readOnly,\n editable,\n popover,\n openOnFocus,\n closeOnSelect,\n isOpen: open,\n setOpen,\n inputRef,\n containerRef,\n onFocus,\n onClick,\n onKeyDown,\n onBlur,\n });\n\n const combinedRef = useCallback(\n (node: HTMLInputElement | null) => {\n (inputRef as React.MutableRefObject<HTMLInputElement | null>).current =\n node;\n if (typeof ref === 'function') ref(node);\n else if (ref)\n (ref as React.MutableRefObject<HTMLInputElement | null>).current =\n node;\n },\n [ref]\n );\n\n if (useNative) {\n const nativeStep = enableSeconds\n ? incrementSeconds\n : incrementMinutes * 60;\n return (\n <input\n {...localeScope.rootAttrs}\n {...cleanRest}\n ref={combinedRef}\n type=\"time\"\n step={nativeStep}\n className={classNames(inputClass, bulmaHelperClasses, className)}\n value={value ? toIsoTime(value, enableSeconds) : ''}\n onChange={e => {\n const parsed = e.target.value ? fromIsoTime(e.target.value) : null;\n commitValue(parsed);\n }}\n min={min ? toIsoTime(min, enableSeconds) : undefined}\n max={max ? toIsoTime(max, enableSeconds) : undefined}\n disabled={disabled}\n readOnly={readOnly}\n placeholder={placeholder}\n name={name}\n form={form}\n required={required}\n id={id}\n />\n );\n }\n\n const spinnerValue = {\n hours: value?.getHours() ?? 0,\n minutes: value?.getMinutes() ?? 0,\n seconds: enableSeconds ? (value?.getSeconds() ?? 0) : undefined,\n };\n\n const panel = (\n <div className={panelClass}>\n <TimeWheels\n value={spinnerValue}\n onChange={handleSpinnerChange}\n hourFormat={effectiveHourFormat}\n enableSeconds={enableSeconds}\n incrementHours={incrementHours}\n incrementMinutes={incrementMinutes}\n incrementSeconds={incrementSeconds}\n unselectableTimes={unselectableTimes}\n color={color}\n size={size}\n disabled={disabled}\n readOnly={readOnly}\n // The popover panel takes `popoverId`, so the wheels inside it take\n // one of their own. Inline there is no panel, and the wheels keep\n // the id they released with.\n id={inline ? popoverId : `${popoverId}-time`}\n labels={labels}\n itemHeight={wheelItemHeight}\n audioTick={effectiveAudioTick}\n onCommit={() => setOpen(false)}\n />\n {/* Footer is popover-only. Desktop gets the OK / Now / Cancel triad;\n mobile drops to an iOS-style \"Reset / ✓\" pair to match the OS\n picker's footer affordances and free up vertical space on small\n screens. */}\n {!inline && !isSmallViewport && (\n <Buttons className={footerClass} hasAddons>\n <button\n type=\"button\"\n className={footerOkClass}\n onClick={() => setOpen(false)}\n >\n {t.ok}\n </button>\n <button\n type=\"button\"\n className={footerButton}\n onClick={() => {\n commitValue(\n snapTimeToIncrement(new Date(), {\n incrementHours,\n incrementMinutes,\n incrementSeconds,\n enableSeconds,\n })\n );\n setOpen(false);\n }}\n >\n {t.now}\n </button>\n <button\n type=\"button\"\n className={footerButton}\n onClick={() => {\n commitValue(valueAtOpenRef.current);\n setOpen(false);\n }}\n >\n {t.cancel}\n </button>\n </Buttons>\n )}\n {!inline && isSmallViewport && (\n <div className={mobileFooterClass}>\n <button\n type=\"button\"\n className={mobileFooterResetClass}\n onClick={() => {\n commitValue(valueAtOpenRef.current);\n setOpen(false);\n }}\n >\n {t.reset}\n </button>\n <button\n type=\"button\"\n className={mobileFooterDoneClass}\n aria-label={t.done}\n onClick={() => setOpen(false)}\n >\n <svg\n width=\"22\"\n height=\"22\"\n viewBox=\"0 0 22 22\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M5 11l4 4 8-8\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </button>\n </div>\n )}\n </div>\n );\n\n if (inline) {\n return (\n <div\n {...localeScope.rootAttrs}\n {...cleanRest}\n ref={containerRef}\n className={classNames(containerClass, bulmaHelperClasses, className)}\n >\n {panel}\n {name && (\n <input\n type=\"hidden\"\n name={name}\n form={form}\n value={value ? toIsoTime(value, enableSeconds) : ''}\n required={required}\n />\n )}\n </div>\n );\n }\n\n return (\n <div\n ref={containerRef}\n className={classNames(containerClass, bulmaHelperClasses, className)}\n {...localeScope.rootAttrs}\n {...cleanRest}\n >\n <input\n ref={combinedRef}\n type=\"text\"\n role=\"combobox\"\n aria-haspopup=\"dialog\"\n aria-expanded={open}\n aria-controls={popoverId}\n autoComplete=\"off\"\n className={inputClass}\n value={text}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={inputReadOnlyAttr}\n name={name}\n form={form}\n required={required}\n id={id}\n {...inputHandlers}\n />\n {popover && triggerIcon && (\n <button\n type=\"button\"\n className={triggerClass}\n onClick={() => {\n if (canOpen) setOpen(!open);\n }}\n disabled={!canOpen}\n aria-label={t.chooseTime}\n aria-haspopup=\"dialog\"\n aria-controls={popoverId}\n aria-expanded={open}\n tabIndex={canOpen ? 0 : -1}\n >\n <Icon name={triggerIconName} size={size} />\n </button>\n )}\n {popover && (\n <PickerPopover\n localeScope={localeScope.panel}\n isOpen={open}\n onClose={() => setOpen(false)}\n anchorRef={containerRef}\n position={position}\n appendToBody={appendToBody}\n ariaLabel={t.chooseTime}\n id={popoverId}\n restoreFocusRef={inputRef}\n >\n {panel}\n </PickerPopover>\n )}\n </div>\n );\n }\n);\n\nTimeInputBase.displayName = 'TimeInputBase';\n\nexport default TimeInputBase;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;AA4CA,MAAM,SAAS,GAAG,CAAC,CAAO,EAAE,WAAoB,KAAY;AAC1D,IAAA,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;AAChD,IAAA,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;AAClD,IAAA,IAAI,CAAC,WAAW;AAAE,QAAA,OAAO,CAAA,EAAG,EAAE,CAAA,CAAA,EAAI,EAAE,EAAE;AACtC,IAAA,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;AAClD,IAAA,OAAO,GAAG,EAAE,CAAA,CAAA,EAAI,EAAE,CAAA,CAAA,EAAI,EAAE,EAAE;AAC5B,CAAC;AAED,MAAM,WAAW,GAAG,CAAC,CAAS,KAAiB;;;IAG7C,MAAM,CAAC,GAAG,8CAA8C,CAAC,IAAI,CAAC,CAAC,CAAC;AAChE,IAAA,IAAI,CAAC,CAAC;AAAE,QAAA,OAAO,IAAI;AACnB,IAAA,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE;IACxB,OAAO,IAAI,IAAI,CACb,KAAK,CAAC,WAAW,EAAE,EACnB,KAAK,CAAC,QAAQ,EAAE,EAChB,KAAK,CAAC,OAAO,EAAE,EACf,MAAM,CAAC,CAAC,CAAC,CAAC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E,QAAQ,EAAA,QAAA,EAExB,KAAK,EAAA,CACQ,CACjB,CAAA,EAAA,CACG;AAEV,CAAC;AAGH,aAAa,CAAC,WAAW,GAAG,eAAe;;"}
1
+ {"version":3,"file":"TimeInputBase.js","sources":["../../../src/form/TimeInputBase.tsx"],"sourcesContent":["import React, {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { useFieldHelperClasses } from '../helpers/useFieldHelperClasses';\nimport {\n PickerPosition,\n HourFormat,\n PickerLabels,\n mergeLabels,\n} from './_pickerInternals/pickerTypes';\nimport {\n formatTime,\n hourCycleFromFormat,\n parseTime,\n DateFormatOption,\n DEFAULT_TIME_FORMAT_24,\n DEFAULT_TIME_FORMAT_12,\n} from './_pickerInternals/formatters';\nimport {\n setTimeOfDay,\n floorMin,\n isWithin,\n snapTimeToIncrement,\n} from './_pickerInternals/dateUtils';\nimport { TimeWheels } from './_pickerInternals/TimeWheels';\nimport { PickerPopover } from './_pickerInternals/PickerPopover';\nimport { useNativeMobilePicker } from './_pickerInternals/useNativeMobilePicker';\nimport { useSegmentedEntry } from './_pickerInternals/useSegmentedEntry';\nimport {\n usePickerLocale,\n usePickerLocaleScope,\n} from './_pickerInternals/useLocaleDefaults';\nimport { useControlLoading } from './controlLoading';\nimport { useFieldLabelTarget, useFieldsetDisabled } from './FormContext';\nimport { Icon } from '../elements/Icon';\nimport { Buttons } from '../elements/Buttons';\n\nconst toIsoTime = (d: Date, withSeconds: boolean): string => {\n const hh = String(d.getHours()).padStart(2, '0');\n const mm = String(d.getMinutes()).padStart(2, '0');\n if (!withSeconds) return `${hh}:${mm}`;\n const ss = String(d.getSeconds()).padStart(2, '0');\n return `${hh}:${mm}:${ss}`;\n};\n\nconst fromIsoTime = (s: string): Date | null => {\n // The HTML time value may carry fractional seconds (the spec allows them\n // and some engines normalize to `:ss.sss`); accept and drop.\n const m = /^(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d{1,3})?)?$/.exec(s);\n if (!m) return null;\n const today = new Date();\n return new Date(\n today.getFullYear(),\n today.getMonth(),\n today.getDate(),\n Number(m[1]),\n Number(m[2]),\n m[3] ? Number(m[3]) : 0,\n 0\n );\n};\n\n/**\n * Props for the raw TimeInput base. Use the higher-level `TimeInput` for\n * Field/Control composition; `TimeInputBase` is the input + popover only.\n *\n * @helperProps Helper props go on the `.timeinput-container` `<div>`, with\n * `className` and the other attributes, except that the background helpers\n * go on the `<input>`, and the text helpers on both, since Bulma's `.input`\n * sets its own background and font, and the popover inside the `<div>`\n * takes the text ones. Inline they all go on the `<div>`, and on the native\n * mobile input, on the `<input>`.\n */\nexport interface TimeInputBaseProps\n extends\n Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n | 'value'\n | 'defaultValue'\n | 'onChange'\n | 'size'\n | 'color'\n | 'min'\n | 'max'\n | 'type'\n | 'popover'\n >,\n Omit<BulmaClassesProps, 'color'> {\n /** Controlled selected time (date portion is preserved). */\n value?: Date | null;\n /** Initial value for uncontrolled usage. */\n defaultValue?: Date | null;\n /** Fired when the value changes. */\n onChange?: (d: Date | null) => void;\n /** Fired when the popover opens. */\n onOpen?: () => void;\n /** Fired when the popover closes. */\n onClose?: () => void;\n /**\n * Earliest selectable time. A `min` before year 1 is raised to midnight on\n * 1 January of year 1, and a `value` dated before then is out of range, so\n * the wheels and typing change nothing on it, as in the date pickers.\n */\n min?: Date;\n /** Latest selectable time. */\n max?: Date;\n /** Disable the input. */\n disabled?: boolean;\n /**\n * Make the input read-only. An `inline` picker's wheels keep their tab\n * stops and carry `aria-readonly`, but no key, scroll, drag or click turns\n * them, so the time can't change.\n */\n readOnly?: boolean;\n /** Placeholder text for the input. */\n placeholder?: string;\n /**\n * Token format string or `Intl.DateTimeFormat` options.\n * @defaultValue (see below)\n */\n format?: DateFormatOption;\n /**\n * Custom parser. Enter and leaving the field call it only if the user\n * changed the text, so focus passing through commits nothing and the value\n * keeps what the format leaves out, such as seconds and the date.\n */\n parse?: (s: string) => Date | null;\n /**\n * BCP-47 locale tag for Intl formatting. Unset, it is the `locale` of a\n * `LocaleProvider` around the picker, and with neither, `Intl` uses the\n * runtime's own locale.\n */\n locale?: string;\n /** Render the spinner inline (no popover). */\n inline?: boolean;\n /** Use `<input type=\"time\">` on coarse-pointer + small-viewport devices. */\n mobileNative?: boolean | 'auto';\n /** Allow segmented keyboard typing in the input (type the time directly, auto-advancing across segments). `false` makes the field picker-only. */\n editable?: boolean;\n /** Whether the spinner popover exists. `false` makes the field input-only (segmented typing, no popover). */\n popover?: boolean;\n /**\n * Open the popover when the input is focused. Focus that a closing popover\n * hands back to the input leaves it closed. Dismissing it commits nothing:\n * an empty field stays empty, and leaving afterwards commits only what was\n * typed since. With it off, the launcher or Alt+ArrowDown opens it.\n */\n openOnFocus?: boolean;\n /** Close the popover after a time is selected (off by default). */\n closeOnSelect?: boolean;\n /**\n * Where the popover opens against the field. Left out, it opens below and\n * lines up with the field's start edge, which is its right edge when the\n * picker reads right to left. A corner you pass stays physical, so\n * `bottom-left` lines up the left edges either way.\n * @defaultValue 'bottom-left'\n */\n position?: PickerPosition;\n /**\n * Render the popover through a portal, into the `portalContainer` a\n * `ConfigProvider` sets, else the `Modal`, `Dialog` or `Command.Dialog` it's\n * in, else `document.body`. On a narrow screen\n * an in-place popover spans the bottom of the viewport, while a portaled\n * one stays on its `position` corner.\n */\n appendToBody?: boolean;\n /**\n * Bulma color modifier for the input, also carried by the wheels, where it\n * colors the selection band. A focused wheel's keyboard focus ring is drawn\n * inside the band in the color's `-invert`, like the selected value, so it\n * shows on the fill. Unset, the wheels use\n * `--bulma-timeinput-wheel-selected-bg`, which defaults to `primary`.\n */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Size variant. */\n size?: 'small' | 'medium' | 'large';\n /** Render the input with rounded corners. */\n isRounded?: boolean;\n /** Hour format. `'12'` adds an AM/PM column to the wheels. */\n hourFormat?: HourFormat;\n /** Show a seconds column. Note: iOS Safari's native time picker UI does not include a seconds wheel; pass `mobileNative={false}` if you need one on iOS. */\n enableSeconds?: boolean;\n /** Hour step for the spinner. */\n incrementHours?: number;\n /** Minute step. Combine with `min`/`max` for slot-style pickers. */\n incrementMinutes?: number;\n /** Second step. Default `1`. */\n incrementSeconds?: number;\n /** Predicate returning `true` for times that should be skipped. Blocked times are also rejected during manual typing. */\n unselectableTimes?: (d: Date) => boolean;\n /** Decorative left icon glyph for the wrapping `Control` (shown by default). Set `''` to hide. */\n iconLeftName?: string;\n /**\n * Show a clickable launcher button on the right that toggles the popover.\n * Hidden by default while a `Control` it sits in shows its `isLoading`\n * spinner, which shares that right edge.\n * @defaultValue true\n */\n triggerIcon?: boolean;\n /** Glyph for the right launcher button. */\n triggerIconName?: string;\n /**\n * Optional translatable string overrides. In a 12-hour picker, `ampm`\n * names the AM/PM column, `'AM/PM'` by default.\n */\n labels?: PickerLabels;\n /** Play a short audible click on each wheel-item crossing. Substitute for haptic feedback on iOS Safari (which has no web haptic API as of May 2026); on Android, `navigator.vibrate(5)` fires automatically regardless. */\n audioTick?: boolean;\n /** Auto-route platform-appropriate feedback: vibrate on Android (already happening), audio thunk on iOS (where vibrate is unavailable). One switch instead of platform-sniffing on the consumer side. `audioTick={true}` always wins. */\n haptics?: boolean;\n}\n\n/**\n * Raw TimeInput — input + popover spinner without Field/Control wrapping.\n * Use `TimeInput` for the convenience wrapper.\n *\n * @function\n * @param {TimeInputBaseProps} props\n * @returns {JSX.Element}\n */\nexport const TimeInputBase = forwardRef<HTMLInputElement, TimeInputBaseProps>(\n (props, ref) => {\n const {\n value: controlledValue,\n defaultValue,\n onChange,\n onOpen,\n onClose,\n min,\n max,\n disabled: disabledProp,\n readOnly,\n placeholder,\n format,\n parse,\n locale: localeProp,\n inline = false,\n mobileNative = 'auto',\n editable = true,\n popover = true,\n openOnFocus = true,\n closeOnSelect = false,\n position,\n appendToBody = false,\n color,\n size,\n isRounded,\n hourFormat = '24',\n enableSeconds = false,\n incrementHours = 1,\n incrementMinutes = 1,\n incrementSeconds = 1,\n unselectableTimes,\n className,\n name,\n form,\n required,\n id: idProp,\n onFocus,\n onClick,\n onKeyDown,\n onBlur,\n iconLeftName: _iconLeftName,\n triggerIcon: triggerIconProp,\n triggerIconName = 'chevron-down',\n labels,\n audioTick = false,\n haptics = false,\n ...rest\n } = props;\n // A LocaleProvider around the picker sets its default locale.\n const locale = usePickerLocale(localeProp);\n // Its own language and direction, which its root and a portaled panel\n // carry inside a provider.\n const localeScope = usePickerLocaleScope(localeProp, props.dir);\n const disabled = useFieldsetDisabled(disabledProp);\n // Inside a labeled Field the input takes the id the label points at\n // when the caller set none, as InputBase does, and the popover's ids\n // follow it. Inline there is no input to name, so nothing takes the\n // Field's id or builds on it.\n const id = useFieldLabelTarget(idProp, !inline);\n // The launcher gives way to the loading spinner of a Control this sits in.\n const controlLoading = useControlLoading();\n const triggerIcon = triggerIconProp ?? !controlLoading;\n\n // Platform-appropriate feedback routing: when `haptics` is opted in and\n // the runtime has no Vibration API (notably iOS Safari), enable the\n // audio thunk so the user still gets *some* tactile cue. When vibrate\n // is available (Android Chrome etc.), the existing unconditional\n // `navigator.vibrate(5)` carries the haptic — no audio added unless\n // the consumer explicitly set `audioTick`. `audioTick` always wins.\n const hasVibrate =\n typeof navigator !== 'undefined' &&\n typeof navigator.vibrate === 'function';\n const effectiveAudioTick = audioTick || (haptics && !hasVibrate);\n const t = mergeLabels(labels);\n\n const isControlled = controlledValue !== undefined;\n const [internalValue, setInternalValue] = useState<Date | null>(\n defaultValue ?? null\n );\n const value = isControlled ? (controlledValue ?? null) : internalValue;\n\n const defaultFormat: DateFormatOption =\n format ??\n (hourFormat === '12'\n ? enableSeconds\n ? 'hh:mm:ss A'\n : DEFAULT_TIME_FORMAT_12\n : enableSeconds\n ? 'HH:mm:ss'\n : DEFAULT_TIME_FORMAT_24);\n\n // The displayed format is the source of truth for the hour cycle: an\n // explicit 12-hour `format` must drive a 12-hour wheel even when\n // `hourFormat` was left at its default. Fall back to the raw prop only when\n // the cycle can't be read from the format (an Intl-options object, or no\n // hour token).\n const effectiveHourFormat =\n hourCycleFromFormat(defaultFormat) ?? hourFormat;\n\n const [open, setOpenState] = useState(false);\n const [text, setText] = useState<string>(\n value ? formatTime(value, defaultFormat, locale) : ''\n );\n\n const inputRef = useRef<HTMLInputElement>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n // Snapshot of value at the moment the popover opens, used by Cancel.\n const valueAtOpenRef = useRef<Date | null>(null);\n const reactId = useId();\n const popoverId = id ? `${id}-popover` : `picker-${reactId}`;\n\n // The field takes the background and text helpers, since Bulma's `.input`\n // sets its own background and font. The container keeps the rest, and the\n // text helpers too where a popover inside it takes them.\n const {\n bulmaHelperClasses,\n backgroundClasses,\n textClasses,\n otherClasses,\n rest: cleanRest,\n } = useFieldHelperClasses(rest);\n\n const { shouldUseNative, isSmallViewport } = useNativeMobilePicker({\n force: mobileNative === 'auto' ? undefined : mobileNative,\n });\n const useNative = !inline && shouldUseNative;\n const wheelItemHeight = isSmallViewport ? 40 : 32;\n\n const inputClass = usePrefixedClassNames('input', {\n [`is-${color}`]: !!color,\n [`is-${size}`]: !!size,\n 'is-rounded': isRounded,\n });\n const containerClass = usePrefixedClassNames('timeinput-container');\n const triggerClass = usePrefixedClassNames('timeinput-trigger');\n const panelClass = usePrefixedClassNames('timeinput-panel');\n const footerClass = usePrefixedClassNames('timeinput-footer');\n const footerButton = usePrefixedClassNames('button', 'is-small');\n const footerOkClass = usePrefixedClassNames(\n 'button',\n 'is-small',\n 'timeinput-footer-ok'\n );\n const mobileFooterClass = usePrefixedClassNames('timeinput-footer-mobile');\n const mobileFooterResetClass = usePrefixedClassNames(\n 'timeinput-footer-reset'\n );\n const mobileFooterDoneClass = usePrefixedClassNames(\n 'timeinput-footer-done'\n );\n\n // What the latest request asked for, so a second request in the same\n // event sees it before React renders. The callbacks fire here rather than\n // in a state updater, which StrictMode calls twice, and after the state\n // is set, so a request a callback makes is the one that lands last.\n const requestedOpenRef = useRef(false);\n const setOpen = useCallback(\n (next: boolean) => {\n if (requestedOpenRef.current === next) return;\n requestedOpenRef.current = next;\n setOpenState(next);\n if (next) {\n valueAtOpenRef.current = value;\n onOpen?.();\n } else {\n onClose?.();\n }\n },\n [onOpen, onClose, value]\n );\n\n useEffect(() => {\n setText(value ? formatTime(value, defaultFormat, locale) : '');\n }, [value, defaultFormat, locale]);\n\n // A value's date before year 1 is out of range, as in the date pickers.\n const lowerBound = useMemo(() => floorMin(min), [min]);\n\n const commitValue = useCallback(\n (next: Date | null) => {\n if (!isControlled) setInternalValue(next);\n onChange?.(next);\n },\n [isControlled, onChange]\n );\n\n // An empty field starts from today, at the whole minute or second the\n // wheels show.\n const handleSpinnerChange = useCallback(\n (parts: { hours: number; minutes: number; seconds?: number }) => {\n // The wheels start nothing while read-only. This catches a drag or a\n // fling already under way when `readOnly` turns on.\n if (readOnly) return;\n const next = value\n ? setTimeOfDay(value, parts)\n : setTimeOfDay(new Date(), {\n ...parts,\n seconds: parts.seconds ?? 0,\n milliseconds: 0,\n });\n if (!isWithin(next, lowerBound, max)) return;\n commitValue(next);\n },\n [readOnly, value, lowerBound, max, commitValue]\n );\n\n const tryParse = useCallback(\n (s: string): Date | null => {\n const trimmed = s.trim();\n if (!trimmed) return null;\n const fmt = typeof format === 'string' ? format : undefined;\n return parse\n ? parse(trimmed)\n : parseTime(\n trimmed,\n fmt ??\n (typeof defaultFormat === 'string'\n ? defaultFormat\n : DEFAULT_TIME_FORMAT_24)\n );\n },\n [parse, format, defaultFormat]\n );\n\n // The Date the user edits when starting without a current value. Noon so\n // the 12h / 24h hour calculations are unambiguous.\n const makeBaseDate = useCallback((): Date => {\n const d = new Date();\n d.setHours(12, 0, 0, 0);\n return d;\n }, []);\n\n const inputReadOnlyAttr = !!readOnly || !editable;\n const canOpen = !!popover && !disabled && !readOnly;\n\n const { inputHandlers } = useSegmentedEntry({\n format: defaultFormat,\n value,\n commitValue,\n formatFn: formatTime,\n tryParse,\n text,\n setText,\n makeBaseDate,\n locale,\n min: lowerBound,\n max,\n isBlocked: unselectableTimes,\n disabled,\n readOnly,\n editable,\n popover,\n openOnFocus,\n closeOnSelect,\n isOpen: open,\n setOpen,\n inputRef,\n containerRef,\n onFocus,\n onClick,\n onKeyDown,\n onBlur,\n });\n\n const combinedRef = useCallback(\n (node: HTMLInputElement | null) => {\n (inputRef as React.MutableRefObject<HTMLInputElement | null>).current =\n node;\n if (typeof ref === 'function') ref(node);\n else if (ref)\n (ref as React.MutableRefObject<HTMLInputElement | null>).current =\n node;\n },\n [ref]\n );\n\n if (useNative) {\n const nativeStep = enableSeconds\n ? incrementSeconds\n : incrementMinutes * 60;\n return (\n <input\n {...localeScope.rootAttrs}\n {...cleanRest}\n ref={combinedRef}\n type=\"time\"\n step={nativeStep}\n className={classNames(inputClass, bulmaHelperClasses, className)}\n value={value ? toIsoTime(value, enableSeconds) : ''}\n onChange={e => {\n const parsed = e.target.value ? fromIsoTime(e.target.value) : null;\n commitValue(parsed);\n }}\n min={min ? toIsoTime(min, enableSeconds) : undefined}\n max={max ? toIsoTime(max, enableSeconds) : undefined}\n disabled={disabled}\n readOnly={readOnly}\n placeholder={placeholder}\n name={name}\n form={form}\n required={required}\n id={id}\n />\n );\n }\n\n const spinnerValue = {\n hours: value?.getHours() ?? 0,\n minutes: value?.getMinutes() ?? 0,\n seconds: enableSeconds ? (value?.getSeconds() ?? 0) : undefined,\n };\n\n const panel = (\n <div className={panelClass}>\n <TimeWheels\n value={spinnerValue}\n onChange={handleSpinnerChange}\n hourFormat={effectiveHourFormat}\n enableSeconds={enableSeconds}\n incrementHours={incrementHours}\n incrementMinutes={incrementMinutes}\n incrementSeconds={incrementSeconds}\n unselectableTimes={unselectableTimes}\n color={color}\n size={size}\n disabled={disabled}\n readOnly={readOnly}\n // The popover panel takes `popoverId`, so the wheels inside it take\n // one of their own. Inline there is no panel, and the wheels keep\n // the id they released with.\n id={inline ? popoverId : `${popoverId}-time`}\n labels={labels}\n itemHeight={wheelItemHeight}\n audioTick={effectiveAudioTick}\n onCommit={() => setOpen(false)}\n />\n {/* Footer is popover-only. Desktop gets the OK / Now / Cancel triad;\n mobile drops to an iOS-style \"Reset / ✓\" pair to match the OS\n picker's footer affordances and free up vertical space on small\n screens. */}\n {!inline && !isSmallViewport && (\n <Buttons className={footerClass} hasAddons>\n <button\n type=\"button\"\n className={footerOkClass}\n onClick={() => setOpen(false)}\n >\n {t.ok}\n </button>\n <button\n type=\"button\"\n className={footerButton}\n onClick={() => {\n commitValue(\n snapTimeToIncrement(new Date(), {\n incrementHours,\n incrementMinutes,\n incrementSeconds,\n enableSeconds,\n })\n );\n setOpen(false);\n }}\n >\n {t.now}\n </button>\n <button\n type=\"button\"\n className={footerButton}\n onClick={() => {\n commitValue(valueAtOpenRef.current);\n setOpen(false);\n }}\n >\n {t.cancel}\n </button>\n </Buttons>\n )}\n {!inline && isSmallViewport && (\n <div className={mobileFooterClass}>\n <button\n type=\"button\"\n className={mobileFooterResetClass}\n onClick={() => {\n commitValue(valueAtOpenRef.current);\n setOpen(false);\n }}\n >\n {t.reset}\n </button>\n <button\n type=\"button\"\n className={mobileFooterDoneClass}\n aria-label={t.done}\n onClick={() => setOpen(false)}\n >\n <svg\n width=\"22\"\n height=\"22\"\n viewBox=\"0 0 22 22\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M5 11l4 4 8-8\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </button>\n </div>\n )}\n </div>\n );\n\n if (inline) {\n return (\n <div\n {...localeScope.rootAttrs}\n {...cleanRest}\n ref={containerRef}\n className={classNames(containerClass, bulmaHelperClasses, className)}\n >\n {panel}\n {name && (\n <input\n type=\"hidden\"\n name={name}\n form={form}\n value={value ? toIsoTime(value, enableSeconds) : ''}\n required={required}\n />\n )}\n </div>\n );\n }\n\n return (\n <div\n ref={containerRef}\n className={classNames(\n containerClass,\n otherClasses,\n textClasses,\n className\n )}\n {...localeScope.rootAttrs}\n {...cleanRest}\n >\n <input\n ref={combinedRef}\n type=\"text\"\n role=\"combobox\"\n aria-haspopup=\"dialog\"\n aria-expanded={open}\n aria-controls={popoverId}\n autoComplete=\"off\"\n className={classNames(inputClass, textClasses, backgroundClasses)}\n value={text}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={inputReadOnlyAttr}\n name={name}\n form={form}\n required={required}\n id={id}\n {...inputHandlers}\n />\n {popover && triggerIcon && (\n <button\n type=\"button\"\n className={triggerClass}\n onClick={() => {\n if (canOpen) setOpen(!open);\n }}\n disabled={!canOpen}\n aria-label={t.chooseTime}\n aria-haspopup=\"dialog\"\n aria-controls={popoverId}\n aria-expanded={open}\n tabIndex={canOpen ? 0 : -1}\n >\n <Icon name={triggerIconName} size={size} />\n </button>\n )}\n {popover && (\n <PickerPopover\n localeScope={localeScope.panel}\n isOpen={open}\n onClose={() => setOpen(false)}\n anchorRef={containerRef}\n position={position}\n appendToBody={appendToBody}\n ariaLabel={t.chooseTime}\n id={popoverId}\n restoreFocusRef={inputRef}\n >\n {panel}\n </PickerPopover>\n )}\n </div>\n );\n }\n);\n\nTimeInputBase.displayName = 'TimeInputBase';\n\nexport default TimeInputBase;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;AA6CA,MAAM,SAAS,GAAG,CAAC,CAAO,EAAE,WAAoB,KAAY;AAC1D,IAAA,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;AAChD,IAAA,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;AAClD,IAAA,IAAI,CAAC,WAAW;AAAE,QAA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AI,WAAW,KACrBA,GAAA,CAAA,QAAA,EAAA,EACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,YAAY,EACvB,OAAO,EAAE,MAAK;AACZ,oBAAA,IAAI,OAAO;AAAE,wBAAA,OAAO,CAAC,CAAC,IAAI,CAAC;gBAC7B,CAAC,EACD,QAAQ,EAAE,CAAC,OAAO,EAAA,YAAA,EACN,CAAC,CAAC,UAAU,EAAA,eAAA,EACV,QAAQ,mBACP,SAAS,EAAA,eAAA,EACT,IAAI,EACnB,QAAQ,EAAE,OAAO,GAAG,CAAC,GAAG,EAAE,EAAA,QAAA,EAE1BA,GAAA,CAAC,IAAI,EAAA,EAAC,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,EAAA,CAAI,GACpC,CACV,EACA,OAAO,KACNA,GAAA,CAAC,aAAa,EAAA,EACZ,WAAW,EAAE,WAAW,CAAC,KAAK,EAC9B,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,MAAM,OAAO,CAAC,KAAK,CAAC,EAC7B,SAAS,EAAE,YAAY,EACvB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,CAAC,CAAC,UAAU,EACvB,EAAE,EAAE,SAAS,EACb,eAAe,EAAE,QAAQ,EAAA,QAAA,EAExB,KAAK,EAAA,CACQ,CACjB,CAAA,EAAA,CACG;AAEV,CAAC;AAGH,aAAa,CAAC,WAAW,GAAG,eAAe;;"}
@@ -0,0 +1,60 @@
1
+ /* @allxsmith/bestax-bulma — AI agents: see AGENTS.md in the package root, or https://bestax.io/llms.txt */
2
+ import { classNames } from './classNames.js';
3
+ import { useBulmaClasses } from './useBulmaClasses.js';
4
+
5
+ /**
6
+ * Splits the helper props of a field drawn by an `.input` inside a wrapper
7
+ * of the component's own, such as a picker's container, into the classes
8
+ * each element needs.
9
+ *
10
+ * Bulma's `.input` sets its own background, font weight, alignment, case
11
+ * and family, so the background and text helpers style nothing in the field
12
+ * from the wrapper. They come back apart from the rest, for the component to
13
+ * put on the field and its inputs. The text helpers can stay on the wrapper
14
+ * as well, where something inside it, such as a popover, takes them.
15
+ *
16
+ * @function useFieldHelperClasses
17
+ * @param props - The component's remaining props, helper props among them.
18
+ * @returns `backgroundClasses` and `textClasses` from the background and
19
+ * text helpers, `otherClasses` from the rest, `bulmaHelperClasses` from all
20
+ * of them, for an element that takes them all, and `rest`, the props that
21
+ * aren't helper props.
22
+ */
23
+ const useFieldHelperClasses = (props) => {
24
+ const { backgroundColor, backgroundColorShade, textSize, textAlign, textTransform, textWeight, fontFamily, textSizeMobile, textSizeTablet, textSizeDesktop, textSizeWidescreen, textSizeFullhd, textAlignMobile, textAlignTablet, textAlignDesktop, textAlignWidescreen, textAlignFullhd, ...others } = props;
25
+ const { bulmaHelperClasses: backgroundClasses } = useBulmaClasses({
26
+ backgroundColor,
27
+ backgroundColorShade,
28
+ });
29
+ // `viewport` suffixes the text classes and the display classes alike, so
30
+ // both take it.
31
+ const { bulmaHelperClasses: textClasses } = useBulmaClasses({
32
+ textSize,
33
+ textAlign,
34
+ textTransform,
35
+ textWeight,
36
+ fontFamily,
37
+ textSizeMobile,
38
+ textSizeTablet,
39
+ textSizeDesktop,
40
+ textSizeWidescreen,
41
+ textSizeFullhd,
42
+ textAlignMobile,
43
+ textAlignTablet,
44
+ textAlignDesktop,
45
+ textAlignWidescreen,
46
+ textAlignFullhd,
47
+ viewport: props.viewport,
48
+ });
49
+ const { bulmaHelperClasses: otherClasses, rest } = useBulmaClasses(others);
50
+ return {
51
+ bulmaHelperClasses: classNames(otherClasses, textClasses, backgroundClasses),
52
+ backgroundClasses,
53
+ textClasses,
54
+ otherClasses,
55
+ rest: rest,
56
+ };
57
+ };
58
+
59
+ export { useFieldHelperClasses };
60
+ //# sourceMappingURL=useFieldHelperClasses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFieldHelperClasses.js","sources":["../../../src/helpers/useFieldHelperClasses.ts"],"sourcesContent":["import { classNames } from './classNames';\nimport { useBulmaClasses, BulmaClassesProps } from './useBulmaClasses';\n\n/**\n * Splits the helper props of a field drawn by an `.input` inside a wrapper\n * of the component's own, such as a picker's container, into the classes\n * each element needs.\n *\n * Bulma's `.input` sets its own background, font weight, alignment, case\n * and family, so the background and text helpers style nothing in the field\n * from the wrapper. They come back apart from the rest, for the component to\n * put on the field and its inputs. The text helpers can stay on the wrapper\n * as well, where something inside it, such as a popover, takes them.\n *\n * @function useFieldHelperClasses\n * @param props - The component's remaining props, helper props among them.\n * @returns `backgroundClasses` and `textClasses` from the background and\n * text helpers, `otherClasses` from the rest, `bulmaHelperClasses` from all\n * of them, for an element that takes them all, and `rest`, the props that\n * aren't helper props.\n */\nexport const useFieldHelperClasses = <T extends object>(\n props: BulmaClassesProps & T\n): {\n bulmaHelperClasses: string;\n backgroundClasses: string;\n textClasses: string;\n otherClasses: string;\n rest: Omit<T, keyof BulmaClassesProps>;\n} => {\n const {\n backgroundColor,\n backgroundColorShade,\n textSize,\n textAlign,\n textTransform,\n textWeight,\n fontFamily,\n textSizeMobile,\n textSizeTablet,\n textSizeDesktop,\n textSizeWidescreen,\n textSizeFullhd,\n textAlignMobile,\n textAlignTablet,\n textAlignDesktop,\n textAlignWidescreen,\n textAlignFullhd,\n ...others\n } = props;\n const { bulmaHelperClasses: backgroundClasses } = useBulmaClasses({\n backgroundColor,\n backgroundColorShade,\n });\n // `viewport` suffixes the text classes and the display classes alike, so\n // both take it.\n const { bulmaHelperClasses: textClasses } = useBulmaClasses({\n textSize,\n textAlign,\n textTransform,\n textWeight,\n fontFamily,\n textSizeMobile,\n textSizeTablet,\n textSizeDesktop,\n textSizeWidescreen,\n textSizeFullhd,\n textAlignMobile,\n textAlignTablet,\n textAlignDesktop,\n textAlignWidescreen,\n textAlignFullhd,\n viewport: props.viewport,\n });\n const { bulmaHelperClasses: otherClasses, rest } = useBulmaClasses(others);\n return {\n bulmaHelperClasses: classNames(\n otherClasses,\n textClasses,\n backgroundClasses\n ),\n backgroundClasses,\n textClasses,\n otherClasses,\n rest: rest as Omit<T, keyof BulmaClassesProps>,\n };\n};\n"],"names":[],"mappings":";;;;AAGA;;;;;;;;;;;;;;;;;AAiBG;AACI,MAAM,qBAAqB,GAAG,CACnC,KAA4B,KAO1B;AACF,IAAA,MAAM,EACJ,eAAe,EACf,oBAAoB,EACpB,QAAQ,EACR,SAAS,EACT,aAAa,EACb,UAAU,EACV,UAAU,EACV,cAAc,EACd,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,GAAG,MAAM,EACV,GAAG,KAAK;AACT,IAAA,MAAM,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,GAAG,eAAe,CAAC;QAChE,eAAe;QACf,oBAAoB;AACrB,KAAA,CAAC;;;AAGF,IAAA,MAAM,EAAE,kBAAkB,EAAE,WAAW,EAAE,GAAG,eAAe,CAAC;QAC1D,QAAQ;QACR,SAAS;QACT,aAAa;QACb,UAAU;QACV,UAAU;QACV,cAAc;QACd,cAAc;QACd,eAAe;QACf,kBAAkB;QAClB,cAAc;QACd,eAAe;QACf,eAAe;QACf,gBAAgB;QAChB,mBAAmB;QACnB,eAAe;QACf,QAAQ,EAAE,KAAK,CAAC,QAAQ;AACzB,KAAA,CAAC;AACF,IAAA,MAAM,EAAE,kBAAkB,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,eAAe,CAAC,MAAM,CAAC;IAC1E,OAAO;QACL,kBAAkB,EAAE,UAAU,CAC5B,YAAY,EACZ,WAAW,EACX,iBAAiB,CAClB;QACD,iBAAiB;QACjB,WAAW;QACX,YAAY;AACZ,QAAA,IAAI,EAAE,IAAwC;KAC/C;AACH;;"}