@allxsmith/bestax-bulma 5.16.0 → 5.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index.cjs.js → index.cjs} +1 -1
- package/dist/index.cjs.map +1 -0
- package/dist/types/columns/Column.d.ts +1 -1
- package/dist/types/columns/Columns.d.ts +3 -3
- package/dist/types/components/Avatar.d.ts +2 -2
- package/dist/types/components/Avatars.d.ts +3 -3
- package/dist/types/components/Badge.d.ts +1 -1
- package/dist/types/components/Breadcrumb.d.ts +1 -1
- package/dist/types/components/Card.d.ts +1 -1
- package/dist/types/components/Carousel.d.ts +1 -1
- package/dist/types/components/Collapse.d.ts +1 -1
- package/dist/types/components/Dialog.d.ts +1 -1
- package/dist/types/components/Dropdown.d.ts +2 -2
- package/dist/types/components/Loading.d.ts +1 -1
- package/dist/types/components/Menu.d.ts +2 -2
- package/dist/types/components/Message.d.ts +1 -1
- package/dist/types/components/Modal.d.ts +1 -1
- package/dist/types/components/Navbar.d.ts +2 -2
- package/dist/types/components/Pagination.d.ts +1 -1
- package/dist/types/components/Panel.d.ts +2 -2
- package/dist/types/components/Reveal.d.ts +2 -2
- package/dist/types/components/Sidebar.d.ts +1 -1
- package/dist/types/components/Steps.d.ts +1 -1
- package/dist/types/components/Tabs.d.ts +1 -1
- package/dist/types/components/Toast.d.ts +1 -1
- package/dist/types/components/Tooltip.d.ts +1 -1
- package/dist/types/elements/Block.d.ts +1 -1
- package/dist/types/elements/Box.d.ts +1 -1
- package/dist/types/elements/Button.d.ts +2 -2
- package/dist/types/elements/Buttons.d.ts +3 -3
- package/dist/types/elements/Code.d.ts +1 -1
- package/dist/types/elements/Content.d.ts +1 -1
- package/dist/types/elements/Delete.d.ts +1 -1
- package/dist/types/elements/Divider.d.ts +1 -1
- package/dist/types/elements/Emphasis.d.ts +1 -1
- package/dist/types/elements/Figure.d.ts +1 -1
- package/dist/types/elements/Icon.d.ts +1 -1
- package/dist/types/elements/IconText.d.ts +2 -2
- package/dist/types/elements/Image.d.ts +1 -1
- package/dist/types/elements/Link.d.ts +2 -2
- package/dist/types/elements/LinkButton.d.ts +2 -2
- package/dist/types/elements/ListItem.d.ts +1 -1
- package/dist/types/elements/Notification.d.ts +1 -1
- package/dist/types/elements/OrderedList.d.ts +2 -2
- package/dist/types/elements/Paragraph.d.ts +1 -1
- package/dist/types/elements/Pre.d.ts +1 -1
- package/dist/types/elements/Progress.d.ts +1 -1
- package/dist/types/elements/Span.d.ts +1 -1
- package/dist/types/elements/Strong.d.ts +1 -1
- package/dist/types/elements/SubTitle.d.ts +1 -1
- package/dist/types/elements/Table.d.ts +7 -7
- package/dist/types/elements/Tag.d.ts +1 -1
- package/dist/types/elements/Tags.d.ts +2 -2
- package/dist/types/elements/Tbody.d.ts +1 -1
- package/dist/types/elements/Td.d.ts +1 -1
- package/dist/types/elements/Tfoot.d.ts +1 -1
- package/dist/types/elements/Th.d.ts +2 -2
- package/dist/types/elements/Thead.d.ts +1 -1
- package/dist/types/elements/Title.d.ts +1 -1
- package/dist/types/elements/Tr.d.ts +2 -2
- package/dist/types/elements/UnorderedList.d.ts +2 -2
- package/dist/types/elements/iconProps.d.ts +1 -1
- package/dist/types/form/Autocomplete.d.ts +2 -2
- package/dist/types/form/Checkbox.d.ts +1 -1
- package/dist/types/form/Checkboxes.d.ts +3 -3
- package/dist/types/form/Control.d.ts +2 -2
- package/dist/types/form/DateInput.d.ts +3 -3
- package/dist/types/form/DateInputBase.d.ts +3 -3
- package/dist/types/form/DateTimeInput.d.ts +3 -3
- package/dist/types/form/DateTimeInputBase.d.ts +3 -3
- package/dist/types/form/Field.d.ts +3 -3
- package/dist/types/form/File.d.ts +2 -2
- package/dist/types/form/Input.d.ts +3 -3
- package/dist/types/form/InputBase.d.ts +1 -1
- package/dist/types/form/Numberinput.d.ts +2 -2
- package/dist/types/form/Radio.d.ts +1 -1
- package/dist/types/form/Radios.d.ts +3 -3
- package/dist/types/form/Rate.d.ts +2 -2
- package/dist/types/form/Select.d.ts +3 -3
- package/dist/types/form/SelectBase.d.ts +1 -1
- package/dist/types/form/Slider.d.ts +2 -2
- package/dist/types/form/Switch.d.ts +1 -1
- package/dist/types/form/Taginput.d.ts +2 -2
- package/dist/types/form/TextArea.d.ts +3 -3
- package/dist/types/form/TextAreaBase.d.ts +1 -1
- package/dist/types/form/TimeInput.d.ts +3 -3
- package/dist/types/form/TimeInputBase.d.ts +3 -3
- package/dist/types/form/_pickerInternals/Calendar.d.ts +1 -1
- package/dist/types/form/_pickerInternals/PickerPopover.d.ts +1 -1
- package/dist/types/form/_pickerInternals/TimeWheels.d.ts +1 -1
- package/dist/types/form/_pickerInternals/dateUtils.d.ts +1 -1
- package/dist/types/form/_pickerInternals/useSegmentedEntry.d.ts +2 -2
- package/dist/types/form/useAutoLabelId.d.ts +1 -1
- package/dist/types/grid/Cell.d.ts +1 -1
- package/dist/types/grid/Grid.d.ts +2 -2
- package/dist/types/helpers/Theme.d.ts +1 -1
- package/dist/types/helpers/useBulmaClasses.d.ts +14 -14
- package/dist/types/helpers/useColorClasses.d.ts +1 -1
- package/dist/types/helpers/useFlexboxClasses.d.ts +1 -1
- package/dist/types/helpers/useOtherClasses.d.ts +1 -1
- package/dist/types/helpers/useSpacingClasses.d.ts +1 -1
- package/dist/types/helpers/useTypographyClasses.d.ts +1 -1
- package/dist/types/helpers/useVisibilityClasses.d.ts +1 -1
- package/dist/types/index.d.ts +113 -113
- package/dist/types/layout/Container.d.ts +1 -1
- package/dist/types/layout/Footer.d.ts +1 -1
- package/dist/types/layout/Hero.d.ts +1 -1
- package/dist/types/layout/Level.d.ts +2 -2
- package/dist/types/layout/Media.d.ts +1 -1
- package/dist/types/layout/Section.d.ts +1 -1
- package/dist/types/skill-examples/ProfileCard.d.ts +1 -1
- package/package.json +3 -3
- package/dist/index.cjs.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/helpers/Config.tsx","../src/helpers/classNames.ts","../src/helpers/bulmaClassHelpers.ts","../src/helpers/useColorClasses.tsx","../src/helpers/useSpacingClasses.tsx","../src/helpers/useTypographyClasses.tsx","../src/helpers/useVisibilityClasses.tsx","../src/helpers/useFlexboxClasses.tsx","../src/helpers/useOtherClasses.tsx","../src/helpers/useBulmaClasses.tsx","../src/columns/Column.tsx","../src/helpers/withSubComponents.ts","../src/columns/Columns.tsx","../src/helpers/polymorphic.ts","../src/components/Avatar.tsx","../src/components/Avatars.tsx","../src/components/Badge.tsx","../src/components/Breadcrumb.tsx","../src/helpers/mergeBulmaStyles.ts","../src/components/Card.tsx","../src/helpers/anchorAttrs.ts","../src/components/Dropdown.tsx","../src/components/Menu.tsx","../src/components/Message.tsx","../src/helpers/scrollLock.ts","../src/helpers/portal.ts","../src/helpers/useIsHydrated.ts","../src/components/Modal.tsx","../src/components/Navbar.tsx","../src/helpers/colorDeprecations.ts","../src/components/Pagination.tsx","../src/elements/Icon.tsx","../src/components/Panel.tsx","../src/components/Tabs.tsx","../src/components/Loading.tsx","../src/components/Collapse.tsx","../src/components/Tooltip.tsx","../src/components/Steps.tsx","../src/components/Sidebar.tsx","../src/components/Toast.tsx","../src/components/Dialog.tsx","../src/elements/Button.tsx","../src/components/Carousel.tsx","../src/components/Reveal.tsx","../src/elements/Block.tsx","../src/elements/Box.tsx","../src/elements/LinkButton.tsx","../src/elements/Buttons.tsx","../src/elements/Code.tsx","../src/elements/Content.tsx","../src/elements/Delete.tsx","../src/elements/Divider.tsx","../src/elements/Emphasis.tsx","../src/elements/Figure.tsx","../src/elements/iconProps.ts","../src/elements/IconText.tsx","../src/elements/Image.tsx","../src/elements/Link.tsx","../src/elements/ListItem.tsx","../src/elements/Notification.tsx","../src/elements/OrderedList.tsx","../src/elements/Paragraph.tsx","../src/elements/Pre.tsx","../src/elements/Progress.tsx","../src/elements/Skeleton.tsx","../src/elements/Span.tsx","../src/elements/Strong.tsx","../src/elements/SubTitle.tsx","../src/elements/Thead.tsx","../src/elements/Tbody.tsx","../src/elements/Tfoot.tsx","../src/elements/Td.tsx","../src/elements/Tr.tsx","../src/elements/Th.tsx","../src/elements/Table.tsx","../src/elements/Tag.tsx","../src/elements/Tags.tsx","../src/elements/Title.tsx","../src/elements/UnorderedList.tsx","../src/form/FormContext.tsx","../src/form/Checkbox.tsx","../src/form/Control.tsx","../src/form/Field.tsx","../src/form/useAutoLabelId.ts","../src/form/Checkboxes.tsx","../src/form/File.tsx","../src/form/Radio.tsx","../src/form/Radios.tsx","../src/form/Switch.tsx","../src/form/Slider.tsx","../src/form/Numberinput.tsx","../src/form/Rate.tsx","../src/form/Autocomplete.tsx","../src/form/Taginput.tsx","../src/form/InputBase.tsx","../src/form/SelectBase.tsx","../src/form/TextAreaBase.tsx","../src/form/Input.tsx","../src/form/Select.tsx","../src/form/TextArea.tsx","../src/form/_pickerInternals/pickerTypes.ts","../src/form/_pickerInternals/formatters.ts","../src/form/_pickerInternals/dateUtils.ts","../src/form/_pickerInternals/Calendar.tsx","../src/form/_pickerInternals/useFocusTrap.ts","../src/form/_pickerInternals/PickerPopover.tsx","../src/form/_pickerInternals/useNativeMobilePicker.ts","../src/form/_pickerInternals/segmentMap.ts","../src/form/_pickerInternals/useSegmentedEntry.ts","../src/form/DateInputBase.tsx","../src/form/DateInput.tsx","../src/form/_pickerInternals/haptics.ts","../src/form/_pickerInternals/audioTick.ts","../src/form/_pickerInternals/TimeWheels.tsx","../src/form/TimeInputBase.tsx","../src/form/TimeInput.tsx","../src/form/DateTimeInputBase.tsx","../src/form/DateTimeInput.tsx","../src/grid/Cell.tsx","../src/grid/Grid.tsx","../src/helpers/Theme.tsx","../src/layout/Container.tsx","../src/layout/Footer.tsx","../src/layout/Hero.tsx","../src/layout/Level.tsx","../src/layout/Media.tsx","../src/layout/Section.tsx"],"sourcesContent":["import React, { createContext, useContext, ReactNode } from 'react';\n\n/** Supported icon library identifiers. */\ntype IconLibrary = 'fa' | 'mdi' | 'ion' | 'material-icons' | 'material-symbols';\n\n/**\n * Shape of the configuration context value.\n *\n * @property {string} [classPrefix] - Prefix applied to all Bulma class names.\n * @property {IconLibrary} [iconLibrary] - Default icon library for Icon components.\n */\nexport interface ConfigContextProps {\n classPrefix?: string;\n iconLibrary?: IconLibrary;\n}\n\nconst ConfigContext = createContext<ConfigContextProps>({});\n\n/**\n * Hook to access the bulma-ui configuration context.\n *\n * @function\n * @returns {ConfigContextProps} The current configuration values.\n */\nexport const useConfig = () => useContext(ConfigContext);\n\n/**\n * Props for the ConfigProvider component.\n *\n * @property {React.ReactNode} children - Child components to receive configuration.\n * @property {string} [classPrefix] - Prefix applied to all Bulma class names.\n * @property {IconLibrary} [iconLibrary] - Default icon library for Icon components.\n */\nexport interface ConfigProviderProps {\n children: ReactNode;\n classPrefix?: string;\n iconLibrary?: IconLibrary;\n}\n\n/**\n * ConfigProvider injects configuration into all child components via React context.\n *\n * @function\n * @param {ConfigProviderProps} props - Provider props.\n * @returns {JSX.Element} The context provider wrapping children.\n *\n * @example\n * <ConfigProvider classPrefix=\"my-\" iconLibrary=\"mdi\">\n * <App />\n * </ConfigProvider>\n */\nexport const ConfigProvider: React.FC<ConfigProviderProps> = ({\n classPrefix,\n iconLibrary,\n children,\n}) => {\n return (\n <ConfigContext.Provider value={{ classPrefix, iconLibrary }}>\n {children}\n </ConfigContext.Provider>\n );\n};\n\n/**\n * Utility hook to get the configured class prefix string.\n *\n * @function\n * @returns {string} The class prefix, or empty string if none configured.\n */\nexport const useClassPrefix = () => {\n const { classPrefix } = useConfig();\n return classPrefix || '';\n};\n\n/**\n * Hook that returns a function to prefix a class name with the configured prefix.\n *\n * @function\n * @returns {(className: string) => string} A function that applies the class prefix.\n */\nexport const usePrefixedClass = () => {\n const { classPrefix } = useConfig();\n return (className: string) =>\n classPrefix ? `${classPrefix}${className}` : className;\n};\n\n/**\n * Hook to get the default icon library from configuration.\n *\n * @function\n * @returns {IconLibrary | undefined} The configured icon library, or undefined.\n */\nexport const useIconLibrary = () => {\n const { iconLibrary } = useConfig();\n return iconLibrary;\n};\n","import { useConfig } from './Config';\n\n/**\n * Returns a space-separated string of class names based on input arguments.\n *\n * Accepts any mix of strings, numbers, arrays, or objects. Falsy values are ignored.\n * Array and object values are recursively flattened, and object keys are included\n * if their value is truthy. Duplicate class names are removed.\n *\n * @param {...(string | number | undefined | null | false | Record<string, unknown> | unknown[])} args - Class values to join.\n * @returns {string} A space-separated string of unique class names.\n *\n * @example\n * classNames('foo', ['bar', { baz: true }], { qux: false, quux: true });\n * // => 'foo bar baz quux'\n */\nexport function classNames(\n ...args: (\n | string\n | number\n | undefined\n | null\n | false\n | Record<string, unknown>\n | unknown[]\n )[]\n): string {\n const classSet = new Set<string>();\n\n function process(\n item:\n | string\n | number\n | undefined\n | null\n | false\n | Record<string, unknown>\n | unknown[]\n ) {\n if (item === undefined || item === null || item === false || item === '') {\n return;\n }\n if (typeof item === 'string' || typeof item === 'number') {\n for (const cls of String(item).split(/\\s+/)) {\n if (cls) classSet.add(cls);\n }\n } else if (Array.isArray(item)) {\n for (const sub of item as (\n | string\n | number\n | undefined\n | null\n | false\n | Record<string, unknown>\n | unknown[]\n )[])\n process(sub);\n } else if (typeof item === 'object') {\n for (const key in item) {\n if (Object.prototype.hasOwnProperty.call(item, key) && item[key]) {\n for (const cls of key.split(/\\s+/)) {\n if (cls) classSet.add(cls);\n }\n }\n }\n }\n }\n\n for (const arg of args) {\n process(arg);\n }\n return Array.from(classSet).join(' ');\n}\n\n/**\n * Creates a prefixed version of classNames that automatically applies a prefix to all class names.\n *\n * @param {string} classPrefix - The prefix to apply to all class names.\n * @returns {Function} A classNames function that applies the prefix.\n *\n * @example\n * const prefixedClassNames = createPrefixedClassNames('bulma-');\n * prefixedClassNames('button', { 'is-primary': true });\n * // => 'bulma-button bulma-is-primary'\n */\nexport function createPrefixedClassNames(classPrefix: string) {\n return function prefixedClassNames(\n ...args: (\n | string\n | number\n | undefined\n | null\n | false\n | Record<string, unknown>\n | unknown[]\n )[]\n ): string {\n const classSet = new Set<string>();\n\n function process(\n item:\n | string\n | number\n | undefined\n | null\n | false\n | Record<string, unknown>\n | unknown[]\n ) {\n if (\n item === undefined ||\n item === null ||\n item === false ||\n item === ''\n ) {\n return;\n }\n if (typeof item === 'string' || typeof item === 'number') {\n for (const cls of String(item).split(/\\s+/)) {\n if (cls) {\n classSet.add(`${classPrefix}${cls}`);\n }\n }\n } else if (Array.isArray(item)) {\n for (const sub of item as (\n | string\n | number\n | undefined\n | null\n | false\n | Record<string, unknown>\n | unknown[]\n )[])\n process(sub);\n } else if (typeof item === 'object') {\n for (const key in item) {\n if (Object.prototype.hasOwnProperty.call(item, key) && item[key]) {\n for (const cls of key.split(/\\s+/)) {\n if (cls) {\n classSet.add(`${classPrefix}${cls}`);\n }\n }\n }\n }\n }\n }\n\n for (const arg of args) {\n process(arg);\n }\n return Array.from(classSet).join(' ');\n };\n}\n\nexport default classNames;\n\n/**\n * A simple wrapper around classNames that applies an optional prefix to all class names.\n *\n * @param {string | undefined} prefix - The prefix to apply to all class names. If undefined, no prefix is applied.\n * @param {...(string | number | undefined | null | false | Record<string, unknown> | unknown[])} args - Class values to join.\n * @returns {string} A space-separated string of unique class names, with prefix applied if provided.\n *\n * @example\n * prefixedClassNames('bulma-', 'button', { 'is-primary': true });\n * // => 'bulma-button bulma-is-primary'\n *\n * prefixedClassNames(undefined, 'button', { 'is-primary': true });\n * // => 'button is-primary'\n */\nexport function prefixedClassNames(\n prefix: string | undefined,\n ...args: (\n | string\n | number\n | undefined\n | null\n | false\n | Record<string, unknown>\n | unknown[]\n )[]\n): string {\n if (!prefix) {\n return classNames(...args);\n }\n\n return createPrefixedClassNames(prefix)(...args);\n}\n\n/**\n * Hook that automatically applies the classPrefix from Config context to class names.\n *\n * @param {...(string | number | undefined | null | false | Record<string, unknown> | unknown[])} args - Class values to join.\n * @returns {string} A space-separated string of unique class names with prefix applied from context.\n *\n * @example\n * // With ConfigProvider providing classPrefix=\"bulma-\"\n * const classes = usePrefixedClassNames('button', { 'is-primary': true });\n * // => 'bulma-button bulma-is-primary'\n */\nexport function usePrefixedClassNames(\n ...args: (\n | string\n | number\n | undefined\n | null\n | false\n | Record<string, unknown>\n | unknown[]\n )[]\n): string {\n const { classPrefix } = useConfig();\n\n return prefixedClassNames(classPrefix, ...args);\n}\n","/**\n * Valid Bulma color classes.\n * @example 'primary', 'link', 'info'\n */\nexport const validColors = [\n 'primary',\n 'link',\n 'info',\n 'success',\n 'warning',\n 'danger',\n 'black',\n 'black-bis',\n 'black-ter',\n 'grey-darker',\n 'grey-dark',\n 'grey',\n 'grey-light',\n 'grey-lighter',\n 'white',\n 'white-bis',\n 'white-ter',\n 'light',\n 'dark',\n] as const;\n\n/**\n * Valid Bulma color shade suffixes.\n * @example '00', '05', 'invert', 'light', 'dark', 'soft', 'bold', 'on-scheme'\n */\nexport const validColorShades = [\n '00',\n '05',\n '10',\n '15',\n '20',\n '25',\n '30',\n '35',\n '40',\n '45',\n '50',\n '55',\n '60',\n '65',\n '70',\n '75',\n '80',\n '85',\n '90',\n '95',\n 'invert',\n 'light',\n 'dark',\n 'soft',\n 'bold',\n 'on-scheme',\n] as const;\n\n/**\n * Valid Bulma scheme color names for scheme-aware backgrounds.\n *\n * Bulma ships no `has-background-scheme-*` helper classes, so these values\n * never emit a class — components render them as a dark-mode-safe inline\n * `background-color: var(--bulma-<value>)` style instead.\n * @example 'scheme-main', 'scheme-main-bis', 'scheme-invert'\n */\nexport const validSchemeColors = [\n 'scheme-main',\n 'scheme-main-bis',\n 'scheme-main-ter',\n 'scheme-invert',\n 'scheme-invert-bis',\n 'scheme-invert-ter',\n] as const;\n\n/**\n * Valid Bulma size classes for margins and paddings.\n * @example '0', '1', 'auto'\n */\nexport const validSizes = ['0', '1', '2', '3', '4', '5', '6', 'auto'] as const;\n\n/**\n * Valid Bulma text size classes.\n * @example '1', '2', '3'\n */\nexport const validTextSizes = ['1', '2', '3', '4', '5', '6', '7'] as const;\n\n/**\n * Valid Bulma text alignment classes.\n * @example 'centered', 'left', 'right'\n */\nexport const validAlignments = [\n 'centered',\n 'justified',\n 'left',\n 'right',\n] as const;\n\n/**\n * Valid Bulma text transformation classes.\n * @example 'capitalized', 'uppercase', 'italic'\n */\nexport const validTextTransforms = [\n 'capitalized',\n 'lowercase',\n 'uppercase',\n 'italic',\n] as const;\n\n/**\n * Valid Bulma text weight classes.\n * @example 'light', 'normal', 'bold'\n */\nexport const validTextWeights = [\n 'light',\n 'normal',\n 'medium',\n 'semibold',\n 'bold',\n] as const;\n\n/**\n * Valid Bulma font family classes.\n * @example 'sans-serif', 'monospace', 'code'\n */\nexport const validFontFamilies = [\n 'sans-serif',\n 'monospace',\n 'primary',\n 'secondary',\n 'code',\n] as const;\n\n/**\n * Valid Bulma display classes.\n * @example 'block', 'flex', 'inline'\n */\nexport const validDisplays = [\n 'block',\n 'flex',\n 'inline',\n 'inline-block',\n 'inline-flex',\n 'grid',\n] as const;\n\n/**\n * Valid Bulma visibility classes.\n * These are all the valid visibility options available in Bulma.\n * @example 'hidden', 'sr-only', 'invisible'\n */\nexport const validVisibilities = ['hidden', 'sr-only', 'invisible'] as const;\n\n/**\n * Valid Bulma flex direction classes.\n * @example 'row', 'column', 'row-reverse'\n */\nexport const validFlexDirections = [\n 'row',\n 'row-reverse',\n 'column',\n 'column-reverse',\n] as const;\n\n/**\n * Valid Bulma flex wrap classes.\n * @example 'nowrap', 'wrap', 'wrap-reverse'\n */\nexport const validFlexWraps = ['nowrap', 'wrap', 'wrap-reverse'] as const;\n\n/**\n * Valid Bulma justify-content classes.\n * @example 'flex-start', 'center', 'space-between'\n */\nexport const validJustifyContents = [\n 'flex-start',\n 'flex-end',\n 'center',\n 'space-between',\n 'space-around',\n 'space-evenly',\n 'start',\n 'end',\n 'left',\n 'right',\n] as const;\n\n/**\n * Valid Bulma align-content classes.\n * @example 'flex-start', 'center', 'stretch'\n */\nexport const validAlignContents = [\n 'flex-start',\n 'flex-end',\n 'center',\n 'space-between',\n 'space-around',\n 'space-evenly',\n 'stretch',\n] as const;\n\n/**\n * Valid Bulma align-items classes.\n * @example 'stretch', 'flex-start', 'center'\n */\nexport const validAlignItems = [\n 'stretch',\n 'flex-start',\n 'flex-end',\n 'center',\n 'baseline',\n 'start',\n 'end',\n] as const;\n\n/**\n * Valid Bulma align-self classes.\n * @example 'auto', 'flex-start', 'center'\n */\nexport const validAlignSelfs = [\n 'auto',\n 'flex-start',\n 'flex-end',\n 'center',\n 'baseline',\n 'stretch',\n] as const;\n\n/**\n * Valid Bulma flex grow and shrink values.\n * @example '0', '1', '2', '3', '4', '5'\n */\nexport const validFlexGrowShrink = ['0', '1', '2', '3', '4', '5'] as const;\n\n/**\n * Valid Bulma viewport classes for responsive design.\n * @example 'mobile', 'tablet', 'desktop'\n */\nexport const validViewports = [\n 'mobile',\n 'tablet',\n 'tablet-only',\n 'touch',\n 'desktop',\n 'desktop-only',\n 'widescreen',\n 'widescreen-only',\n 'fullhd',\n] as const;\n\n/**\n * Valid Bulma float classes.\n * @example 'left', 'right'\n */\nexport const validFloats = ['left', 'right'] as const;\n\n/**\n * Valid Bulma overflow classes.\n * @example 'clipped'\n */\nexport const validOverflows = ['clipped'] as const;\n\n/**\n * Valid Bulma interaction classes.\n * @example 'unselectable', 'clickable'\n */\nexport const validInteractions = ['unselectable', 'clickable'] as const;\n\n/**\n * Valid Bulma cursor helper values.\n *\n * These share no class stem: `pointer` renders `is-clickable` and `help`\n * renders `is-cursor-help`, so the class each one emits lives in\n * `cursorClasses` rather than being built from the value.\n * @example 'pointer', 'help'\n */\nexport const validCursors = ['pointer', 'help'] as const;\n\n/**\n * Cursor helper value to the class it renders.\n *\n * A `Record` over `validCursors` on purpose: TypeScript then rejects a value\n * added to the tuple with no class for it, and a class for a value the tuple\n * does not carry, so the accepted set and the rendered classes cannot drift\n * apart.\n */\nexport const cursorClasses: Record<(typeof validCursors)[number], string> = {\n pointer: 'is-clickable',\n help: 'is-cursor-help',\n};\n\n/**\n * Valid Bulma border-radius helper classes.\n * @example 'radiusless'\n */\nexport const validRadii = ['radiusless'] as const;\n\n/**\n * Valid Bulma shadow helper classes.\n * @example 'shadowless'\n */\nexport const validShadows = ['shadowless'] as const;\n\n/**\n * Valid Bulma responsive helper classes.\n * @example 'mobile', 'narrow'\n */\nexport const validResponsives = ['mobile', 'narrow'] as const;\n\n/**\n * Props for applying a Bulma viewport modifier to viewport-aware helper classes.\n */\nexport interface BulmaViewportProps {\n /** Viewport for responsive classes (e.g., 'mobile', 'desktop'). */\n viewport?: (typeof validViewports)[number];\n}\n\n/**\n * Props for applying Bulma display helper classes, including viewport-specific\n * display variants.\n */\nexport interface BulmaDisplayProps {\n /** Display type (e.g., 'block', 'flex'). */\n display?: (typeof validDisplays)[number] | 'none';\n /** Display type for mobile viewport (up to 768px). */\n displayMobile?: (typeof validDisplays)[number] | 'none';\n /** Display type for tablet viewport (769px - 1023px). */\n displayTablet?: (typeof validDisplays)[number] | 'none';\n /** Display type for tablet-only viewport (769px - 1023px, excludes desktop+). */\n displayTabletOnly?: (typeof validDisplays)[number] | 'none';\n /** Display type for touch viewport (up to 1023px; mobile + tablet). */\n displayTouch?: (typeof validDisplays)[number] | 'none';\n /** Display type for desktop viewport (1024px - 1215px). */\n displayDesktop?: (typeof validDisplays)[number] | 'none';\n /** Display type for desktop-only viewport (1024px - 1215px, excludes widescreen+). */\n displayDesktopOnly?: (typeof validDisplays)[number] | 'none';\n /** Display type for widescreen viewport (1216px - 1407px). */\n displayWidescreen?: (typeof validDisplays)[number] | 'none';\n /** Display type for widescreen-only viewport (1216px - 1407px, excludes fullhd). */\n displayWidescreenOnly?: (typeof validDisplays)[number] | 'none';\n /** Display type for fullhd viewport (1408px and above). */\n displayFullhd?: (typeof validDisplays)[number] | 'none';\n}\n\n/**\n * Creates the shared class-building helpers used by the Bulma helper hooks.\n *\n * Returns a mutable `classes` array along with the helper functions that push\n * (optionally prefixed, optionally viewport-suffixed) class names onto it.\n *\n * @internal\n * @param classPrefix - Optional prefix applied to all generated class names.\n * @param viewport - Optional viewport modifier for viewport-aware classes.\n */\nexport const createBulmaClassHelpers = (\n classPrefix?: string,\n viewport?: (typeof validViewports)[number]\n) => {\n const classes: string[] = [];\n\n // Helper function to add class with prefix support\n const addPrefixedClass = (className: string) => {\n classes.push(classPrefix ? `${classPrefix}${className}` : className);\n };\n\n // Helper to add class with optional viewport\n //\n // `supportedViewports` narrows which viewports may be suffixed onto this\n // class. It defaults to every viewport, but a few Bulma helper families\n // (notably `is-size-*`, which ships no `-only` bands) support only a subset,\n // so passing the emitting set keeps us from producing dead classes.\n const addClass = (\n prefix: string,\n value: string | undefined,\n validValues: readonly string[],\n supportsViewport = false,\n supportedViewports: readonly string[] = validViewports\n ) => {\n if (value && validValues.includes(value)) {\n const className =\n supportsViewport &&\n viewport &&\n validViewports.includes(viewport) &&\n supportedViewports.includes(viewport)\n ? `${prefix}-${value}-${viewport}`\n : `${prefix}-${value}`;\n addPrefixedClass(className);\n }\n };\n\n // Helper specifically for classes that never support viewport modifiers\n const addClassNoViewport = (\n prefix: string,\n value: string | undefined,\n validValues: readonly string[]\n ) => {\n if (value && (!validValues.length || validValues.includes(value))) {\n addPrefixedClass(`${prefix}-${value}`);\n }\n };\n\n return { classes, addPrefixedClass, addClass, addClassNoViewport };\n};\n","import { useMemo, type CSSProperties } from 'react';\nimport { classNames } from './classNames';\nimport { useConfig } from './Config';\nimport {\n createBulmaClassHelpers,\n validColors,\n validColorShades,\n validSchemeColors,\n} from './bulmaClassHelpers';\n\n/**\n * Props for applying Bulma text and background color helper classes.\n */\nexport interface BulmaColorProps {\n /** Text color class (e.g., 'primary', 'info'). */\n color?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Text color shade suffix (e.g., '00', 'invert'). */\n colorShade?: (typeof validColorShades)[number];\n /** Background color class (e.g., 'primary', 'info'). */\n backgroundColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color shade suffix (e.g., '00', 'invert'). */\n backgroundColorShade?: (typeof validColorShades)[number];\n}\n\n/**\n * {@link BulmaColorProps} with `backgroundColor` widened to also accept the\n * scheme color names from `validSchemeColors` (e.g., 'scheme-main-bis').\n *\n * Scheme values never emit a `has-background-*` class — pass them through\n * {@link useColorStyles} (or `useBulmaClasses`' `bulmaHelperStyles` return) to\n * get the dark-mode-safe inline `background-color: var(--bulma-scheme-*)`\n * style instead.\n */\nexport type BulmaColorPropsWithScheme = Omit<\n BulmaColorProps,\n 'backgroundColor'\n> & {\n /** Background color: a Bulma color class name or a scheme color name. */\n backgroundColor?:\n BulmaColorProps['backgroundColor'] | (typeof validSchemeColors)[number];\n};\n\n/**\n * A hook that generates Bulma text and background color helper classes.\n *\n * Scheme background values (`scheme-main`, `scheme-main-bis`, …) are dropped\n * from class emission — Bulma ships no `has-background-scheme-*` classes; use\n * {@link useColorStyles} to render them as an inline style.\n *\n * @function useColorClasses\n * @param props - Color-related Bulma helper props.\n * @returns A space-separated string of color helper classes.\n * @example\n * const colorClasses = useColorClasses({\n * color: 'primary',\n * backgroundColor: 'info',\n * });\n * // colorClasses: 'has-text-primary has-background-info'\n */\nexport const useColorClasses = (props: BulmaColorPropsWithScheme): string => {\n const { classPrefix } = useConfig();\n\n const { color, colorShade, backgroundColor, backgroundColorShade } = props;\n\n return useMemo(() => {\n const { classes, addPrefixedClass, addClass } =\n createBulmaClassHelpers(classPrefix);\n\n // Color handling\n const addColorClass = (\n prefix: 'has-text' | 'has-background',\n value: string | undefined,\n shade: (typeof validColorShades)[number] | undefined\n ) => {\n if (!value || ![...validColors, 'inherit', 'current'].includes(value))\n return;\n if (shade && validColorShades.includes(shade)) {\n // Color shades never support viewport modifiers in Bulma\n const className = `${prefix}-${value}-${shade}`;\n addPrefixedClass(className);\n } else {\n // Color classes never support viewport modifiers in Bulma\n addClass(\n prefix,\n value,\n [...validColors, 'inherit', 'current'],\n false // supportsViewport = false for all color classes\n );\n }\n };\n\n // Color\n addColorClass('has-text', color, colorShade);\n addColorClass('has-background', backgroundColor, backgroundColorShade);\n\n return classNames(classes);\n }, [classPrefix, color, colorShade, backgroundColor, backgroundColorShade]);\n};\n\n/**\n * A hook that generates inline styles for scheme-aware color props.\n *\n * When `backgroundColor` is one of the scheme color names in\n * `validSchemeColors`, returns `{ backgroundColor: 'var(--bulma-<value>)' }` —\n * an inline style that tracks Bulma's scheme CSS variables, so it adapts to\n * light/dark mode with no bestax-shipped CSS. For every other input it\n * returns `undefined` (never `{}`), so components that don't use scheme\n * values produce identical DOM to before.\n *\n * `backgroundColorShade` is ignored for scheme values — Bulma defines no\n * shaded scheme variables. Only the background is set: the `scheme-invert*`\n * values do not change text color, so pair them with a contrasting\n * foreground.\n *\n * @function useColorStyles\n * @param props - Color-related Bulma helper props (scheme-aware).\n * @returns An inline style object for scheme backgrounds, or `undefined`.\n * @example\n * const colorStyles = useColorStyles({ backgroundColor: 'scheme-main-bis' });\n * // colorStyles: { backgroundColor: 'var(--bulma-scheme-main-bis)' }\n */\nexport const useColorStyles = (\n props: BulmaColorPropsWithScheme\n): CSSProperties | undefined => {\n const { backgroundColor } = props;\n\n return useMemo(() => {\n if (\n backgroundColor &&\n (validSchemeColors as readonly string[]).includes(backgroundColor)\n ) {\n return { backgroundColor: `var(--bulma-${backgroundColor})` };\n }\n return undefined;\n }, [backgroundColor]);\n};\n","import { useMemo } from 'react';\nimport { classNames } from './classNames';\nimport { useConfig } from './Config';\nimport { createBulmaClassHelpers, validSizes } from './bulmaClassHelpers';\n\n/**\n * Props for applying Bulma margin and padding helper classes.\n */\nexport interface BulmaSpacingProps {\n /** Margin (e.g., '0', '1'). */\n m?: (typeof validSizes)[number];\n /** Margin top. */\n mt?: (typeof validSizes)[number];\n /** Margin right. */\n mr?: (typeof validSizes)[number];\n /** Margin bottom. */\n mb?: (typeof validSizes)[number];\n /** Margin left. */\n ml?: (typeof validSizes)[number];\n /** Margin horizontal (left and right). */\n mx?: (typeof validSizes)[number];\n /** Margin vertical (top and bottom). */\n my?: (typeof validSizes)[number];\n /** Padding (e.g., '0', '1'). */\n p?: (typeof validSizes)[number];\n /** Padding top. */\n pt?: (typeof validSizes)[number];\n /** Padding right. */\n pr?: (typeof validSizes)[number];\n /** Padding bottom. */\n pb?: (typeof validSizes)[number];\n /** Padding left. */\n pl?: (typeof validSizes)[number];\n /** Padding horizontal (left and right). */\n px?: (typeof validSizes)[number];\n /** Padding vertical (top and bottom). */\n py?: (typeof validSizes)[number];\n}\n\n/**\n * A hook that generates Bulma margin and padding helper classes.\n *\n * @function useSpacingClasses\n * @param props - Spacing-related Bulma helper props.\n * @returns A space-separated string of spacing helper classes.\n * @example\n * const spacingClasses = useSpacingClasses({ m: '2', px: '4' });\n * // spacingClasses: 'm-2 px-4'\n */\nexport const useSpacingClasses = (props: BulmaSpacingProps): string => {\n const { classPrefix } = useConfig();\n\n const { m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py } = props;\n\n return useMemo(() => {\n const { classes, addClassNoViewport } =\n createBulmaClassHelpers(classPrefix);\n\n // Spacing (no viewport support in Bulma)\n addClassNoViewport('m', m, validSizes);\n addClassNoViewport('mt', mt, validSizes);\n addClassNoViewport('mr', mr, validSizes);\n addClassNoViewport('mb', mb, validSizes);\n addClassNoViewport('ml', ml, validSizes);\n addClassNoViewport('mx', mx, validSizes);\n addClassNoViewport('my', my, validSizes);\n addClassNoViewport('p', p, validSizes);\n addClassNoViewport('pt', pt, validSizes);\n addClassNoViewport('pr', pr, validSizes);\n addClassNoViewport('pb', pb, validSizes);\n addClassNoViewport('pl', pl, validSizes);\n addClassNoViewport('px', px, validSizes);\n addClassNoViewport('py', py, validSizes);\n\n return classNames(classes);\n }, [classPrefix, m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py]);\n};\n","import { useMemo } from 'react';\nimport { classNames } from './classNames';\nimport { useConfig } from './Config';\nimport {\n createBulmaClassHelpers,\n validTextSizes,\n validAlignments,\n validTextTransforms,\n validTextWeights,\n validFontFamilies,\n BulmaViewportProps,\n} from './bulmaClassHelpers';\n\n/**\n * Viewports Bulma generates `is-size-*` classes for. Unlike text alignment,\n * text size ships no `-only` bands (`tablet-only`/`desktop-only`/`widescreen-only`),\n * so the `viewport` prop's suffix is limited to these on the `is-size` path.\n */\nconst sizeSupportedViewports = [\n 'mobile',\n 'tablet',\n 'touch',\n 'desktop',\n 'widescreen',\n 'fullhd',\n] as const;\n\n/**\n * Props for applying Bulma typography helper classes.\n */\nexport interface BulmaTypographyProps extends BulmaViewportProps {\n /** Text size (e.g., '1', '2'). */\n textSize?: (typeof validTextSizes)[number];\n /** Text alignment (e.g., 'centered', 'left'). */\n textAlign?: (typeof validAlignments)[number];\n /** Text transformation (e.g., 'uppercase', 'italic'). */\n textTransform?: (typeof validTextTransforms)[number];\n /** Text weight (e.g., 'light', 'bold'). */\n textWeight?: (typeof validTextWeights)[number];\n /** Font family (e.g., 'sans-serif', 'code'). */\n fontFamily?: (typeof validFontFamilies)[number];\n /** Text size for mobile viewport (up to 768px). */\n textSizeMobile?: (typeof validTextSizes)[number];\n /** Text size for tablet viewport (769px - 1023px). */\n textSizeTablet?: (typeof validTextSizes)[number];\n /** Text size for desktop viewport (1024px - 1215px). */\n textSizeDesktop?: (typeof validTextSizes)[number];\n /** Text size for widescreen viewport (1216px - 1407px). */\n textSizeWidescreen?: (typeof validTextSizes)[number];\n /** Text size for fullhd viewport (1408px and above). */\n textSizeFullhd?: (typeof validTextSizes)[number];\n /** Text alignment for mobile viewport (up to 768px). */\n textAlignMobile?: (typeof validAlignments)[number];\n /** Text alignment for tablet viewport (769px - 1023px). */\n textAlignTablet?: (typeof validAlignments)[number];\n /** Text alignment for desktop viewport (1024px - 1215px). */\n textAlignDesktop?: (typeof validAlignments)[number];\n /** Text alignment for widescreen viewport (1216px - 1407px). */\n textAlignWidescreen?: (typeof validAlignments)[number];\n /** Text alignment for fullhd viewport (1408px and above). */\n textAlignFullhd?: (typeof validAlignments)[number];\n}\n\n/**\n * A hook that generates Bulma typography helper classes, including\n * viewport-specific text size and alignment variants.\n *\n * @function useTypographyClasses\n * @param props - Typography-related Bulma helper props.\n * @returns A space-separated string of typography helper classes.\n * @example\n * const typographyClasses = useTypographyClasses({\n * textSize: '3',\n * textWeight: 'bold',\n * });\n * // typographyClasses: 'is-size-3 has-text-weight-bold'\n */\nexport const useTypographyClasses = (props: BulmaTypographyProps): string => {\n const { classPrefix } = useConfig();\n\n const {\n textSize,\n textAlign,\n textTransform,\n textWeight,\n fontFamily,\n viewport,\n textSizeMobile,\n textSizeTablet,\n textSizeDesktop,\n textSizeWidescreen,\n textSizeFullhd,\n textAlignMobile,\n textAlignTablet,\n textAlignDesktop,\n textAlignWidescreen,\n textAlignFullhd,\n } = props;\n\n return useMemo(() => {\n const { classes, addPrefixedClass, addClass, addClassNoViewport } =\n createBulmaClassHelpers(classPrefix, viewport);\n\n // Typography\n // Bulma emits `is-size-*` for the six main/`touch` breakpoints but not the\n // three `-only` bands, so restrict the viewport suffix to the ones it ships\n // — otherwise `viewport=\"tablet-only\"` would render a dead `is-size-N-tablet-only`.\n addClass('is-size', textSize, validTextSizes, true, sizeSupportedViewports); // supports viewport (no `-only` bands)\n addClass('has-text', textAlign, validAlignments, true); // supports viewport (all bands)\n addClassNoViewport('is', textTransform, validTextTransforms); // no viewport support\n addClassNoViewport('has-text-weight', textWeight, validTextWeights); // no viewport support\n addClassNoViewport('is-family', fontFamily, validFontFamilies); // no viewport support\n\n // Viewport-specific text sizes\n const addViewportSpecificTextSizeClass = (\n value: string | undefined,\n viewportSuffix: string\n ) => {\n if (value && (validTextSizes as readonly string[]).includes(value)) {\n addPrefixedClass(`is-size-${value}${viewportSuffix}`);\n }\n };\n\n addViewportSpecificTextSizeClass(textSizeMobile, '-mobile');\n addViewportSpecificTextSizeClass(textSizeTablet, '-tablet');\n addViewportSpecificTextSizeClass(textSizeDesktop, '-desktop');\n addViewportSpecificTextSizeClass(textSizeWidescreen, '-widescreen');\n addViewportSpecificTextSizeClass(textSizeFullhd, '-fullhd');\n\n // Viewport-specific text alignment\n const addViewportSpecificTextAlignClass = (\n value: string | undefined,\n viewportSuffix: string\n ) => {\n if (value && (validAlignments as readonly string[]).includes(value)) {\n addPrefixedClass(`has-text-${value}${viewportSuffix}`);\n }\n };\n\n addViewportSpecificTextAlignClass(textAlignMobile, '-mobile');\n addViewportSpecificTextAlignClass(textAlignTablet, '-tablet');\n addViewportSpecificTextAlignClass(textAlignDesktop, '-desktop');\n addViewportSpecificTextAlignClass(textAlignWidescreen, '-widescreen');\n addViewportSpecificTextAlignClass(textAlignFullhd, '-fullhd');\n\n return classNames(classes);\n }, [\n classPrefix,\n textSize,\n textAlign,\n textTransform,\n textWeight,\n fontFamily,\n viewport,\n textSizeMobile,\n textSizeTablet,\n textSizeDesktop,\n textSizeWidescreen,\n textSizeFullhd,\n textAlignMobile,\n textAlignTablet,\n textAlignDesktop,\n textAlignWidescreen,\n textAlignFullhd,\n ]);\n};\n","import { useMemo } from 'react';\nimport { classNames } from './classNames';\nimport { useConfig } from './Config';\nimport {\n createBulmaClassHelpers,\n validDisplays,\n validVisibilities,\n validViewports,\n BulmaViewportProps,\n BulmaDisplayProps,\n} from './bulmaClassHelpers';\n\n/**\n * Props for applying Bulma visibility and display helper classes.\n */\nexport interface BulmaVisibilityProps\n extends BulmaViewportProps, BulmaDisplayProps {\n /** Visibility (e.g., 'hidden', 'sr-only'). */\n visibility?: (typeof validVisibilities)[number];\n /** Visibility for mobile viewport (up to 768px). */\n visibilityMobile?: (typeof validVisibilities)[number];\n /** Visibility for tablet viewport (769px - 1023px). */\n visibilityTablet?: (typeof validVisibilities)[number];\n /** Visibility for tablet-only viewport (769px - 1023px, excludes desktop+). */\n visibilityTabletOnly?: (typeof validVisibilities)[number];\n /** Visibility for touch viewport (up to 1023px; mobile + tablet). */\n visibilityTouch?: (typeof validVisibilities)[number];\n /** Visibility for desktop viewport (1024px - 1215px). */\n visibilityDesktop?: (typeof validVisibilities)[number];\n /** Visibility for desktop-only viewport (1024px - 1215px, excludes widescreen+). */\n visibilityDesktopOnly?: (typeof validVisibilities)[number];\n /** Visibility for widescreen viewport (1216px - 1407px). */\n visibilityWidescreen?: (typeof validVisibilities)[number];\n /** Visibility for widescreen-only viewport (1216px - 1407px, excludes fullhd). */\n visibilityWidescreenOnly?: (typeof validVisibilities)[number];\n /** Visibility for fullhd viewport (1408px and above). */\n visibilityFullhd?: (typeof validVisibilities)[number];\n}\n\n/**\n * A hook that generates Bulma visibility and display helper classes. This hook\n * owns all display class emission, including viewport-specific display props,\n * the legacy display/viewport combination, and `display: 'none'` mapping to\n * `is-hidden`.\n *\n * @function useVisibilityClasses\n * @param props - Visibility- and display-related Bulma helper props.\n * @returns A space-separated string of visibility and display helper classes.\n * @example\n * const visibilityClasses = useVisibilityClasses({\n * display: 'flex',\n * visibilityMobile: 'hidden',\n * });\n * // visibilityClasses: 'is-hidden-mobile is-flex'\n */\nexport const useVisibilityClasses = (props: BulmaVisibilityProps): string => {\n const { classPrefix } = useConfig();\n\n const {\n visibility,\n visibilityMobile,\n visibilityTablet,\n visibilityTabletOnly,\n visibilityTouch,\n visibilityDesktop,\n visibilityDesktopOnly,\n visibilityWidescreen,\n visibilityWidescreenOnly,\n visibilityFullhd,\n display,\n displayMobile,\n displayTablet,\n displayTabletOnly,\n displayTouch,\n displayDesktop,\n displayDesktopOnly,\n displayWidescreen,\n displayWidescreenOnly,\n displayFullhd,\n viewport,\n } = props;\n\n return useMemo(() => {\n const { classes, addPrefixedClass, addClass } = createBulmaClassHelpers(\n classPrefix,\n viewport\n );\n\n // Viewport-specific visibility\n const addViewportSpecificVisibilityClass = (\n value: string | undefined,\n viewportSuffix: string\n ) => {\n if (value === 'hidden') {\n addPrefixedClass(`is-hidden${viewportSuffix}`);\n } else if (value === 'sr-only') {\n addPrefixedClass(`is-sr-only${viewportSuffix}`);\n } else if (value === 'invisible') {\n addPrefixedClass(`is-invisible${viewportSuffix}`);\n }\n };\n\n addViewportSpecificVisibilityClass(visibilityMobile, '-mobile');\n addViewportSpecificVisibilityClass(visibilityTablet, '-tablet');\n addViewportSpecificVisibilityClass(visibilityTabletOnly, '-tablet-only');\n addViewportSpecificVisibilityClass(visibilityTouch, '-touch');\n addViewportSpecificVisibilityClass(visibilityDesktop, '-desktop');\n addViewportSpecificVisibilityClass(visibilityDesktopOnly, '-desktop-only');\n addViewportSpecificVisibilityClass(visibilityWidescreen, '-widescreen');\n addViewportSpecificVisibilityClass(\n visibilityWidescreenOnly,\n '-widescreen-only'\n );\n addViewportSpecificVisibilityClass(visibilityFullhd, '-fullhd');\n\n // Visibility and Display\n // Handle viewport-specific display properties first (they take precedence)\n const addDisplayClass = (\n displayValue: string | undefined,\n viewportSuffix: string\n ) => {\n if (displayValue) {\n if (displayValue === 'none') {\n addPrefixedClass(`is-hidden${viewportSuffix}`);\n } else if (\n (validDisplays as readonly string[]).includes(displayValue)\n ) {\n addPrefixedClass(`is-${displayValue}${viewportSuffix}`);\n }\n }\n };\n\n // Apply viewport-specific display classes\n addDisplayClass(displayMobile, '-mobile');\n addDisplayClass(displayTablet, '-tablet');\n addDisplayClass(displayTabletOnly, '-tablet-only');\n addDisplayClass(displayTouch, '-touch');\n addDisplayClass(displayDesktop, '-desktop');\n addDisplayClass(displayDesktopOnly, '-desktop-only');\n addDisplayClass(displayWidescreen, '-widescreen');\n addDisplayClass(displayWidescreenOnly, '-widescreen-only');\n addDisplayClass(displayFullhd, '-fullhd');\n\n // Apply legacy display/viewport combination if no viewport-specific display props are set\n const hasViewportSpecificDisplay = !!(\n displayMobile ||\n displayTablet ||\n displayTabletOnly ||\n displayTouch ||\n displayDesktop ||\n displayDesktopOnly ||\n displayWidescreen ||\n displayWidescreenOnly ||\n displayFullhd\n );\n\n if (!hasViewportSpecificDisplay) {\n // Legacy display handling\n if (display === 'none') {\n if (viewport && validViewports.includes(viewport)) {\n addPrefixedClass(`is-hidden-${viewport}`);\n } else {\n addPrefixedClass('is-hidden');\n }\n } else {\n addClass('is', display, [...validDisplays], true); // display supports viewport\n }\n }\n\n // Visibility (always applied regardless of display settings)\n if (visibility) {\n if (\n (visibility === 'hidden' || visibility === 'invisible') &&\n viewport &&\n validViewports.includes(viewport)\n ) {\n addPrefixedClass(`is-${visibility}-${viewport}`);\n } else if (validVisibilities.includes(visibility)) {\n addPrefixedClass(`is-${visibility}`);\n }\n }\n\n return classNames(classes);\n }, [\n classPrefix,\n visibility,\n visibilityMobile,\n visibilityTablet,\n visibilityTabletOnly,\n visibilityTouch,\n visibilityDesktop,\n visibilityDesktopOnly,\n visibilityWidescreen,\n visibilityWidescreenOnly,\n visibilityFullhd,\n display,\n displayMobile,\n displayTablet,\n displayTabletOnly,\n displayTouch,\n displayDesktop,\n displayDesktopOnly,\n displayWidescreen,\n displayWidescreenOnly,\n displayFullhd,\n viewport,\n ]);\n};\n","import { useMemo } from 'react';\nimport { classNames } from './classNames';\nimport { useConfig } from './Config';\nimport {\n createBulmaClassHelpers,\n validFlexDirections,\n validFlexWraps,\n validJustifyContents,\n validAlignContents,\n validAlignItems,\n validAlignSelfs,\n validFlexGrowShrink,\n BulmaDisplayProps,\n} from './bulmaClassHelpers';\n\n/**\n * Props for applying Bulma flexbox helper classes. The display props are read\n * only to gate the flex container helpers; this hook never emits display\n * classes itself.\n */\nexport interface BulmaFlexboxProps extends BulmaDisplayProps {\n /** Flex direction (e.g., 'row', 'column'). */\n flexDirection?: (typeof validFlexDirections)[number];\n /** Flex wrap (e.g., 'wrap', 'nowrap'). */\n flexWrap?: (typeof validFlexWraps)[number];\n /** Justify content (e.g., 'center', 'space-between'). */\n justifyContent?: (typeof validJustifyContents)[number];\n /** Align content (e.g., 'center', 'stretch'). */\n alignContent?: (typeof validAlignContents)[number];\n /** Align items (e.g., 'center', 'flex-start'). */\n alignItems?: (typeof validAlignItems)[number];\n /** Align self (e.g., 'auto', 'center'). */\n alignSelf?: (typeof validAlignSelfs)[number];\n /** Flex grow value (e.g., '0', '1', '2', '3', '4', '5'). */\n flexGrow?: (typeof validFlexGrowShrink)[number];\n /** Flex shrink value (e.g., '0', '1', '2', '3', '4', '5'). */\n flexShrink?: (typeof validFlexGrowShrink)[number];\n}\n\n/**\n * A hook that generates Bulma flexbox helper classes. Flex container helpers\n * (direction, wrap, justify/align content, align items) are only emitted when\n * one of the display props indicates a flex display; flex item helpers\n * (align self, grow, shrink) are always emitted.\n *\n * Note: this hook reads the display props purely as a gate and never emits\n * display classes — `is-flex` and friends come from useVisibilityClasses (or\n * the useBulmaClasses aggregate).\n *\n * @function useFlexboxClasses\n * @param props - Flexbox-related Bulma helper props.\n * @returns A space-separated string of flexbox helper classes.\n * @example\n * const flexboxClasses = useFlexboxClasses({\n * display: 'flex', // gates the container helpers, but emits no 'is-flex'\n * justifyContent: 'center',\n * });\n * // flexboxClasses: 'is-justify-content-center'\n * // ('is-flex' itself comes from useVisibilityClasses/useBulmaClasses)\n */\nexport const useFlexboxClasses = (props: BulmaFlexboxProps): string => {\n const { classPrefix } = useConfig();\n\n const {\n flexDirection,\n flexWrap,\n justifyContent,\n alignContent,\n alignItems,\n alignSelf,\n flexGrow,\n flexShrink,\n display,\n displayMobile,\n displayTablet,\n displayTabletOnly,\n displayTouch,\n displayDesktop,\n displayDesktopOnly,\n displayWidescreen,\n displayWidescreenOnly,\n displayFullhd,\n } = props;\n\n return useMemo(() => {\n const { classes, addClassNoViewport } =\n createBulmaClassHelpers(classPrefix);\n\n // Flexbox\n const hasFlexDisplay =\n display === 'flex' ||\n display === 'inline-flex' ||\n displayMobile === 'flex' ||\n displayMobile === 'inline-flex' ||\n displayTablet === 'flex' ||\n displayTablet === 'inline-flex' ||\n displayTabletOnly === 'flex' ||\n displayTabletOnly === 'inline-flex' ||\n displayTouch === 'flex' ||\n displayTouch === 'inline-flex' ||\n displayDesktop === 'flex' ||\n displayDesktop === 'inline-flex' ||\n displayDesktopOnly === 'flex' ||\n displayDesktopOnly === 'inline-flex' ||\n displayWidescreen === 'flex' ||\n displayWidescreen === 'inline-flex' ||\n displayWidescreenOnly === 'flex' ||\n displayWidescreenOnly === 'inline-flex' ||\n displayFullhd === 'flex' ||\n displayFullhd === 'inline-flex';\n\n if (hasFlexDisplay) {\n // Flexbox container properties do not support viewport modifiers in Bulma\n addClassNoViewport(\n 'is-flex-direction',\n flexDirection,\n validFlexDirections\n );\n addClassNoViewport('is-flex-wrap', flexWrap, validFlexWraps);\n addClassNoViewport(\n 'is-justify-content',\n justifyContent,\n validJustifyContents\n );\n addClassNoViewport('is-align-content', alignContent, validAlignContents);\n addClassNoViewport('is-align-items', alignItems, validAlignItems);\n }\n\n // Flex item properties (can be applied to any element that is a flex item)\n // These don't require the element itself to have display: flex\n addClassNoViewport('is-align-self', alignSelf, validAlignSelfs);\n addClassNoViewport('is-flex-grow', flexGrow, validFlexGrowShrink);\n addClassNoViewport('is-flex-shrink', flexShrink, validFlexGrowShrink);\n\n return classNames(classes);\n }, [\n classPrefix,\n flexDirection,\n flexWrap,\n justifyContent,\n alignContent,\n alignItems,\n alignSelf,\n flexGrow,\n flexShrink,\n display,\n displayMobile,\n displayTablet,\n displayTabletOnly,\n displayTouch,\n displayDesktop,\n displayDesktopOnly,\n displayWidescreen,\n displayWidescreenOnly,\n displayFullhd,\n ]);\n};\n","import { useMemo } from 'react';\nimport { classNames } from './classNames';\nimport { useConfig } from './Config';\nimport {\n createBulmaClassHelpers,\n cursorClasses,\n validCursors,\n validFloats,\n validInteractions,\n validOverflows,\n validRadii,\n validResponsives,\n validShadows,\n} from './bulmaClassHelpers';\n\n/**\n * Props for applying miscellaneous Bulma helper classes.\n */\nexport interface BulmaOtherProps {\n /** Float direction (e.g., 'left', 'right'). */\n float?: (typeof validFloats)[number];\n /** Overflow behavior (e.g., 'clipped'). */\n overflow?: (typeof validOverflows)[number];\n /** Applies overlay styling if true. */\n overlay?: boolean;\n /** Interaction behavior (e.g., 'unselectable', 'clickable'). */\n interaction?: (typeof validInteractions)[number];\n /** Cursor style (e.g., 'pointer', 'help'). */\n cursor?: (typeof validCursors)[number];\n /** Border radius style (e.g., 'radiusless'). */\n radius?: (typeof validRadii)[number];\n /** Shadow style (e.g., 'shadowless'). */\n shadow?: (typeof validShadows)[number];\n /** Responsive behavior (e.g., 'mobile', 'narrow'). */\n responsive?: (typeof validResponsives)[number];\n /** Add Bulma skeleton class if true. */\n skeleton?: boolean;\n /** Applies clearfix to fix floating children if true. */\n clearfix?: boolean;\n /** Applies position: relative if true. */\n relative?: boolean;\n /** Applies height: 100% if true. */\n fullHeight?: boolean;\n}\n\n/**\n * A hook that generates miscellaneous Bulma helper classes (float, overflow,\n * overlay, interaction, cursor, radius, shadow, responsive, skeleton,\n * clearfix, relative, and full height).\n *\n * @function useOtherClasses\n * @param props - Miscellaneous Bulma helper props.\n * @returns A space-separated string of helper classes.\n * @example\n * const otherClasses = useOtherClasses({ float: 'left', skeleton: true });\n * // otherClasses: 'is-pulled-left is-skeleton'\n */\nexport const useOtherClasses = (props: BulmaOtherProps): string => {\n const { classPrefix } = useConfig();\n\n const {\n float,\n overflow,\n overlay,\n interaction,\n cursor,\n radius,\n shadow,\n responsive,\n skeleton,\n clearfix,\n relative,\n fullHeight,\n } = props;\n\n return useMemo(() => {\n const { classes, addPrefixedClass, addClassNoViewport } =\n createBulmaClassHelpers(classPrefix);\n\n // Other Helpers (no viewport support)\n if (float) {\n addClassNoViewport('is-pulled', float, validFloats);\n }\n if (overflow) {\n addClassNoViewport('is', overflow, validOverflows);\n }\n if (overlay) {\n addPrefixedClass('is-overlay');\n }\n if (interaction) {\n addClassNoViewport('is', interaction, validInteractions);\n }\n if (cursor && validCursors.includes(cursor)) {\n addPrefixedClass(cursorClasses[cursor]);\n }\n if (radius) {\n addClassNoViewport('is', radius, validRadii);\n }\n if (shadow) {\n addClassNoViewport('is', shadow, validShadows);\n }\n if (responsive) {\n addClassNoViewport('is', responsive, validResponsives);\n }\n\n // Bulma Skeleton Helper\n if (skeleton) {\n addPrefixedClass('is-skeleton');\n }\n\n // Clearfix Helper\n if (clearfix) {\n addPrefixedClass('is-clearfix');\n }\n\n // Position Relative Helper\n if (relative) {\n addPrefixedClass('is-relative');\n }\n\n // Full Height Helper\n if (fullHeight) {\n addPrefixedClass('is-full-height');\n }\n\n return classNames(classes);\n }, [\n classPrefix,\n float,\n overflow,\n overlay,\n interaction,\n cursor,\n radius,\n shadow,\n responsive,\n skeleton,\n clearfix,\n relative,\n fullHeight,\n ]);\n};\n","import { useMemo, type CSSProperties } from 'react';\nimport { classNames } from '../helpers/classNames';\nimport { BulmaDisplayProps, BulmaViewportProps } from './bulmaClassHelpers';\nimport {\n useColorClasses,\n useColorStyles,\n BulmaColorProps,\n BulmaColorPropsWithScheme,\n} from './useColorClasses';\nimport { useSpacingClasses, BulmaSpacingProps } from './useSpacingClasses';\nimport {\n useTypographyClasses,\n BulmaTypographyProps,\n} from './useTypographyClasses';\nimport {\n useVisibilityClasses,\n BulmaVisibilityProps,\n} from './useVisibilityClasses';\nimport { useFlexboxClasses, BulmaFlexboxProps } from './useFlexboxClasses';\nimport { useOtherClasses, BulmaOtherProps } from './useOtherClasses';\n\n/**\n * Props for applying Bulma helper classes to components.\n */\nexport interface BulmaClassesProps\n extends\n BulmaColorProps,\n BulmaSpacingProps,\n BulmaTypographyProps,\n BulmaVisibilityProps,\n BulmaFlexboxProps,\n BulmaOtherProps {}\n\n/**\n * {@link BulmaClassesProps} with `backgroundColor` widened to also accept the\n * scheme color names from `validSchemeColors` (see\n * {@link BulmaColorPropsWithScheme}). This is the input type of\n * `useBulmaClasses`; scheme values surface as the `bulmaHelperStyles` return\n * member instead of a class.\n */\nexport type BulmaClassesPropsWithScheme = Omit<\n BulmaClassesProps,\n keyof BulmaColorProps\n> &\n BulmaColorPropsWithScheme;\n\n/**\n * A hook that generates Bulma helper classes from props and separates unhandled props.\n *\n * Composed from the per-concern mini hooks (useColorClasses, useSpacingClasses,\n * useTypographyClasses, useVisibilityClasses, useFlexboxClasses, and\n * useOtherClasses), which can also be used individually.\n *\n * Scheme background values (`backgroundColor: 'scheme-main-bis'`, …) emit no\n * class; they are returned as `bulmaHelperStyles` — a dark-mode-safe inline\n * `background-color: var(--bulma-scheme-*)` style (`undefined` for all other\n * inputs). Merge it with a user `style` prop via `mergeBulmaStyles`.\n *\n * @function useBulmaClasses\n * @param props - Combination of BulmaClassesPropsWithScheme and additional props.\n * @returns An object containing the Bulma helper classes, optional helper\n * styles, and unhandled props.\n * @example\n * const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({\n * color: 'primary',\n * backgroundColor: 'scheme-main-bis',\n * className: 'custom-class'\n * });\n * // bulmaHelperClasses: 'has-text-primary'\n * // bulmaHelperStyles: { backgroundColor: 'var(--bulma-scheme-main-bis)' }\n * // rest: { className: 'custom-class' }\n */\nexport const useBulmaClasses = <T extends object>(\n props: BulmaClassesPropsWithScheme & T\n): {\n bulmaHelperClasses: string;\n bulmaHelperStyles?: CSSProperties;\n rest: Omit<T, keyof BulmaClassesProps>;\n} => {\n const {\n color,\n backgroundColor,\n colorShade,\n backgroundColorShade,\n m,\n mt,\n mr,\n mb,\n ml,\n mx,\n my,\n p,\n pt,\n pr,\n pb,\n pl,\n px,\n py,\n textSize,\n textAlign,\n textTransform,\n textWeight,\n fontFamily,\n display,\n visibility,\n flexDirection,\n flexWrap,\n justifyContent,\n alignContent,\n alignItems,\n alignSelf,\n flexGrow,\n flexShrink,\n float,\n overflow,\n overlay,\n interaction,\n cursor,\n radius,\n shadow,\n responsive,\n viewport,\n displayMobile,\n displayTablet,\n displayTabletOnly,\n displayTouch,\n displayDesktop,\n displayDesktopOnly,\n displayWidescreen,\n displayWidescreenOnly,\n displayFullhd,\n textSizeMobile,\n textSizeTablet,\n textSizeDesktop,\n textSizeWidescreen,\n textSizeFullhd,\n textAlignMobile,\n textAlignTablet,\n textAlignDesktop,\n textAlignWidescreen,\n textAlignFullhd,\n visibilityMobile,\n visibilityTablet,\n visibilityTabletOnly,\n visibilityTouch,\n visibilityDesktop,\n visibilityDesktopOnly,\n visibilityWidescreen,\n visibilityWidescreenOnly,\n visibilityFullhd,\n skeleton,\n clearfix,\n relative,\n fullHeight,\n ...rest\n } = props;\n\n const colorClasses = useColorClasses({\n color,\n colorShade,\n backgroundColor,\n backgroundColorShade,\n });\n\n const bulmaHelperStyles = useColorStyles({ backgroundColor });\n\n const spacingClasses = useSpacingClasses({\n m,\n mt,\n mr,\n mb,\n ml,\n mx,\n my,\n p,\n pt,\n pr,\n pb,\n pl,\n px,\n py,\n });\n\n const typographyClasses = useTypographyClasses({\n textSize,\n textAlign,\n textTransform,\n textWeight,\n fontFamily,\n viewport,\n textSizeMobile,\n textSizeTablet,\n textSizeDesktop,\n textSizeWidescreen,\n textSizeFullhd,\n textAlignMobile,\n textAlignTablet,\n textAlignDesktop,\n textAlignWidescreen,\n textAlignFullhd,\n });\n\n const visibilityClasses = useVisibilityClasses({\n visibility,\n visibilityMobile,\n visibilityTablet,\n visibilityTabletOnly,\n visibilityTouch,\n visibilityDesktop,\n visibilityDesktopOnly,\n visibilityWidescreen,\n visibilityWidescreenOnly,\n visibilityFullhd,\n display,\n displayMobile,\n displayTablet,\n displayTabletOnly,\n displayTouch,\n displayDesktop,\n displayDesktopOnly,\n displayWidescreen,\n displayWidescreenOnly,\n displayFullhd,\n viewport,\n });\n\n const flexboxClasses = useFlexboxClasses({\n flexDirection,\n flexWrap,\n justifyContent,\n alignContent,\n alignItems,\n alignSelf,\n flexGrow,\n flexShrink,\n display,\n displayMobile,\n displayTablet,\n displayTabletOnly,\n displayTouch,\n displayDesktop,\n displayDesktopOnly,\n displayWidescreen,\n displayWidescreenOnly,\n displayFullhd,\n });\n\n const otherClasses = useOtherClasses({\n float,\n overflow,\n overlay,\n interaction,\n cursor,\n radius,\n shadow,\n responsive,\n skeleton,\n clearfix,\n relative,\n fullHeight,\n });\n\n const bulmaHelperClasses = useMemo(\n () =>\n classNames(\n colorClasses,\n spacingClasses,\n typographyClasses,\n visibilityClasses,\n flexboxClasses,\n otherClasses\n ),\n [\n colorClasses,\n spacingClasses,\n typographyClasses,\n visibilityClasses,\n flexboxClasses,\n otherClasses,\n ]\n );\n\n return { bulmaHelperClasses, bulmaHelperStyles, rest };\n};\n\nexport {\n validColors,\n validColorShades,\n validSchemeColors,\n validSizes,\n validTextSizes,\n validAlignments,\n validTextTransforms,\n validTextWeights,\n validFontFamilies,\n validDisplays,\n validVisibilities,\n validFlexDirections,\n validFlexWraps,\n validJustifyContents,\n validAlignContents,\n validAlignItems,\n validAlignSelfs,\n validFlexGrowShrink,\n validViewports,\n validFloats,\n validOverflows,\n validInteractions,\n validCursors,\n validRadii,\n validShadows,\n validResponsives,\n} from './bulmaClassHelpers';\nexport type { BulmaViewportProps, BulmaDisplayProps };\nexport * from './useColorClasses';\nexport * from './useSpacingClasses';\nexport * from './useTypographyClasses';\nexport * from './useVisibilityClasses';\nexport * from './useFlexboxClasses';\nexport * from './useOtherClasses';\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * Possible values for Bulma column size: a number 1–12 (as a number or a numeric string, `7` and `\"7\"` are equivalent) or a named fraction.\n */\nexport type BulmaColumnSize =\n | number\n | '1'\n | '2'\n | '3'\n | '4'\n | '5'\n | '6'\n | '7'\n | '8'\n | '9'\n | '10'\n | '11'\n | '12'\n | 'full'\n | 'half'\n | 'one-third'\n | 'two-thirds'\n | 'one-quarter'\n | 'three-quarters'\n | 'one-fifth'\n | 'two-fifths'\n | 'three-fifths'\n | 'four-fifths';\n\n/**\n * Props for the Column component.\n */\nexport interface ColumnProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes for the column. */\n className?: string;\n /** Text color. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Bulma color modifier for the column. */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Background color. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n\n /** Column size (see Bulma docs). */\n size?: BulmaColumnSize;\n /** Size for mobile breakpoint. */\n sizeMobile?: BulmaColumnSize;\n /** Size for tablet breakpoint. */\n sizeTablet?: BulmaColumnSize;\n /** Size for desktop breakpoint. */\n sizeDesktop?: BulmaColumnSize;\n /** Size for widescreen breakpoint. */\n sizeWidescreen?: BulmaColumnSize;\n /** Size for fullhd breakpoint. */\n sizeFullhd?: BulmaColumnSize;\n\n /** Offset for column. */\n offset?: BulmaColumnSize;\n /** Offset for mobile. */\n offsetMobile?: BulmaColumnSize;\n /** Offset for tablet. */\n offsetTablet?: BulmaColumnSize;\n /** Offset for desktop. */\n offsetDesktop?: BulmaColumnSize;\n /** Offset for widescreen. */\n offsetWidescreen?: BulmaColumnSize;\n /** Offset for fullhd. */\n offsetFullhd?: BulmaColumnSize;\n\n /** Column is only as wide as its content. */\n isNarrow?: boolean;\n /** The column is narrow on mobile. */\n isNarrowMobile?: boolean;\n /** The column is narrow on tablet. */\n isNarrowTablet?: boolean;\n /** The column is narrow on touch devices. */\n isNarrowTouch?: boolean;\n /** The column is narrow on desktop. */\n isNarrowDesktop?: boolean;\n /** The column is narrow on widescreen. */\n isNarrowWidescreen?: boolean;\n /** The column is narrow on fullhd. */\n isNarrowFullhd?: boolean;\n\n /** Children to render inside the column. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Column` component provides a single responsive layout column using Bulma's flexbox-based column system.\n *\n * @function\n * @param {ColumnProps} props - Props for the Column component.\n * @returns {JSX.Element} The rendered column.\n * @see {@link https://bulma.io/documentation/columns/ | Bulma Columns documentation}\n */\nexport const Column: React.FC<ColumnProps> = ({\n className,\n textColor,\n color: _fieldColor,\n bgColor,\n size,\n sizeMobile,\n sizeTablet,\n sizeDesktop,\n sizeWidescreen,\n sizeFullhd,\n offset,\n offsetMobile,\n offsetTablet,\n offsetDesktop,\n offsetWidescreen,\n offsetFullhd,\n isNarrow,\n isNarrowMobile,\n isNarrowTablet,\n isNarrowTouch,\n isNarrowDesktop,\n isNarrowWidescreen,\n isNarrowFullhd,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n });\n\n const mainClass = usePrefixedClassNames('column');\n\n // Build column-specific classes with prefixes\n const columnSpecificClasses = usePrefixedClassNames('', {\n [`is-${size}`]: size !== undefined && size !== null,\n [`is-${sizeMobile}-mobile`]:\n sizeMobile !== undefined && sizeMobile !== null,\n [`is-${sizeTablet}-tablet`]:\n sizeTablet !== undefined && sizeTablet !== null,\n [`is-${sizeDesktop}-desktop`]:\n sizeDesktop !== undefined && sizeDesktop !== null,\n [`is-${sizeWidescreen}-widescreen`]:\n sizeWidescreen !== undefined && sizeWidescreen !== null,\n [`is-${sizeFullhd}-fullhd`]:\n sizeFullhd !== undefined && sizeFullhd !== null,\n [`is-offset-${offset}`]: offset !== undefined && offset !== null,\n [`is-offset-${offsetMobile}-mobile`]:\n offsetMobile !== undefined && offsetMobile !== null,\n [`is-offset-${offsetTablet}-tablet`]:\n offsetTablet !== undefined && offsetTablet !== null,\n [`is-offset-${offsetDesktop}-desktop`]:\n offsetDesktop !== undefined && offsetDesktop !== null,\n [`is-offset-${offsetWidescreen}-widescreen`]:\n offsetWidescreen !== undefined && offsetWidescreen !== null,\n [`is-offset-${offsetFullhd}-fullhd`]:\n offsetFullhd !== undefined && offsetFullhd !== null,\n 'is-narrow': !!isNarrow,\n 'is-narrow-mobile': !!isNarrowMobile,\n 'is-narrow-tablet': !!isNarrowTablet,\n 'is-narrow-touch': !!isNarrowTouch,\n 'is-narrow-desktop': !!isNarrowDesktop,\n 'is-narrow-widescreen': !!isNarrowWidescreen,\n 'is-narrow-fullhd': !!isNarrowFullhd,\n });\n\n const columnClasses = classNames(\n mainClass,\n columnSpecificClasses,\n className,\n bulmaHelperClasses\n );\n\n return (\n <div className={columnClasses} {...rest}>\n {children}\n </div>\n );\n};\n","/**\n * Attaches compound sub-components as statics on a base component and\n * optionally sets the parent's displayName.\n *\n * Internal helper — it MUST mutate and return the same function object\n * (`Object.assign`), never wrap the base in a new function: identity checks\n * like `child.type === ModalCard` (Modal) and Field's displayName-based\n * child detection rely on the attached component being the same object as\n * the separately exported one.\n *\n * displayName is only ever set on the parent (and only when provided) —\n * sub-components keep whatever displayName they declare themselves.\n */\nexport function withSubComponents<\n Base extends { displayName?: string },\n Subs extends Record<string, unknown>,\n>(base: Base, subs: Subs, displayName?: string): Base & Subs {\n const compound = Object.assign(base, subs) as Base & Subs;\n if (displayName !== undefined) {\n compound.displayName = displayName;\n }\n return compound;\n}\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\nimport type { BulmaGapValue } from '../grid/Grid';\nimport { Column } from './Column';\n\n/**\n * Possible values for the Bulma columns gap size.\n * @deprecated Use {@link BulmaGapValue} instead — `gapSize*` and `gap*` share\n * the same 0-8 scale.\n */\nexport type BulmaGapSize = BulmaGapValue;\n\n/**\n * Props for the Columns component.\n */\nexport interface ColumnsProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes for the columns container. */\n className?: string;\n /** Text color. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Bulma color modifier for all columns. */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Background color for all columns. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Horizontally center columns within the container. */\n isCentered?: boolean;\n /** Remove gap between columns. */\n isGapless?: boolean;\n /** Allow columns to wrap to multiple lines. */\n isMultiline?: boolean;\n /** Vertically center columns within the container. */\n isVCentered?: boolean;\n /** Apply columns layout on mobile and up. */\n isMobile?: boolean;\n /** Apply columns layout on desktop and up. */\n isDesktop?: boolean;\n\n /** Gap size for all breakpoints. Same scale as `Grid`'s `gap` prop; wins over `gapSize` if both are set. */\n gap?: BulmaGapValue;\n /** Gap size for mobile. Wins over `gapSizeMobile` if both are set. */\n gapMobile?: BulmaGapValue;\n /** Gap size for tablet. Wins over `gapSizeTablet` if both are set. */\n gapTablet?: BulmaGapValue;\n /** Gap size for desktop. Wins over `gapSizeDesktop` if both are set. */\n gapDesktop?: BulmaGapValue;\n /** Gap size for widescreen. Wins over `gapSizeWidescreen` if both are set. */\n gapWidescreen?: BulmaGapValue;\n /** Gap size for fullhd. Wins over `gapSizeFullhd` if both are set. */\n gapFullhd?: BulmaGapValue;\n\n /** Gap size for all breakpoints. @deprecated Use `gap` instead — `gap` wins if both are set. */\n gapSize?: BulmaGapSize;\n /** Gap size for mobile. @deprecated Use `gapMobile` instead — `gapMobile` wins if both are set. */\n gapSizeMobile?: BulmaGapSize;\n /** Gap size for tablet. @deprecated Use `gapTablet` instead — `gapTablet` wins if both are set. */\n gapSizeTablet?: BulmaGapSize;\n /** Gap size for desktop. @deprecated Use `gapDesktop` instead — `gapDesktop` wins if both are set. */\n gapSizeDesktop?: BulmaGapSize;\n /** Gap size for widescreen. @deprecated Use `gapWidescreen` instead — `gapWidescreen` wins if both are set. */\n gapSizeWidescreen?: BulmaGapSize;\n /** Gap size for fullhd. @deprecated Use `gapFullhd` instead — `gapFullhd` wins if both are set. */\n gapSizeFullhd?: BulmaGapSize;\n\n /** Columns to render within the container. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Columns` component provides Bulma's flexible, responsive grid container for aligning and distributing [`Column`](./column.md) components.\n *\n * @function\n * @param {ColumnsProps} props - Props for the Columns component.\n * @returns {JSX.Element} The rendered columns container.\n * @see {@link https://bulma.io/documentation/columns/ | Bulma Columns documentation}\n */\nconst ColumnsComponent: React.FC<ColumnsProps> = ({\n className,\n textColor,\n color: _fieldColor,\n bgColor,\n isCentered,\n isGapless,\n isMultiline,\n isVCentered,\n isMobile,\n isDesktop,\n gap,\n gapMobile,\n gapTablet,\n gapDesktop,\n gapWidescreen,\n gapFullhd,\n gapSize,\n gapSizeMobile,\n gapSizeTablet,\n gapSizeDesktop,\n gapSizeWidescreen,\n gapSizeFullhd,\n children,\n ...props\n}) => {\n const resolvedGap = gap ?? gapSize;\n const resolvedGapMobile = gapMobile ?? gapSizeMobile;\n const resolvedGapTablet = gapTablet ?? gapSizeTablet;\n const resolvedGapDesktop = gapDesktop ?? gapSizeDesktop;\n const resolvedGapWidescreen = gapWidescreen ?? gapSizeWidescreen;\n const resolvedGapFullhd = gapFullhd ?? gapSizeFullhd;\n\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n });\n\n const mainClass = usePrefixedClassNames('columns');\n\n // Build gap classes with prefixes\n const gapClasses = usePrefixedClassNames('', {\n [`is-${resolvedGap}`]: resolvedGap !== undefined && resolvedGap !== null,\n [`is-${resolvedGapMobile}-mobile`]:\n resolvedGapMobile !== undefined && resolvedGapMobile !== null,\n [`is-${resolvedGapTablet}-tablet`]:\n resolvedGapTablet !== undefined && resolvedGapTablet !== null,\n [`is-${resolvedGapDesktop}-desktop`]:\n resolvedGapDesktop !== undefined && resolvedGapDesktop !== null,\n [`is-${resolvedGapWidescreen}-widescreen`]:\n resolvedGapWidescreen !== undefined && resolvedGapWidescreen !== null,\n [`is-${resolvedGapFullhd}-fullhd`]:\n resolvedGapFullhd !== undefined && resolvedGapFullhd !== null,\n 'is-centered': !!isCentered,\n 'is-gapless': !!isGapless,\n 'is-multiline': !!isMultiline,\n 'is-vcentered': !!isVCentered,\n 'is-mobile': !!isMobile,\n 'is-desktop': !!isDesktop,\n });\n\n const columnsClasses = classNames(\n mainClass,\n gapClasses,\n className,\n bulmaHelperClasses\n );\n\n return (\n <div className={columnsClasses} {...rest}>\n {children}\n </div>\n );\n};\n\nexport const Columns = withSubComponents(\n ColumnsComponent,\n { Column },\n 'Columns'\n);\n","import type React from 'react';\n\n/**\n * Whether an `as` target is a custom element rather than a built-in tag.\n *\n * HTML requires a custom element's name to contain a hyphen, and no built-in\n * element name has one, so this is exact rather than a heuristic. It matters\n * because a custom element is an intrinsic STRING — `typeof as === 'string'` is\n * true — while its props are whatever a consumer declared through\n * `React.JSX.IntrinsicElements`, the way this package declares `<ion-icon>`.\n * A runtime backstop that filters built-in attributes must leave those alone,\n * or it strips props the derived type just promised to forward.\n */\nexport function isCustomElement(as: unknown): as is string {\n return typeof as === 'string' && as.includes('-');\n}\n\n/**\n * The ref type of whatever element `as` renders.\n *\n * Derived from `ComponentPropsWithRef` rather than `React.ComponentRef` so it\n * resolves on every `@types/react` a consumer may be on: this package supports\n * React 18 and 19, and the CI matrix pins only `react`/`react-dom`, never the\n * types, so a types-only regression here would not be caught.\n *\n * `never` when the target takes no ref. A plain function component has no `ref`\n * key at all, and React's own types reject `<PlainFC ref={…} />`; without the\n * guard the indexed access degraded to `unknown` and we accepted a ref that\n * silently does nothing — `ref.current` stays null and a later `.focus()`\n * throws. Matching React's strictness is the point.\n */\nexport type PolymorphicRef<T extends React.ElementType> =\n 'ref' extends keyof React.ComponentPropsWithRef<T>\n ? React.ComponentPropsWithRef<T>['ref']\n : never;\n\n/**\n * A component's own props, plus the attributes of the element `as` names.\n *\n * `Own` wins every collision — a component that declares `color` as a Bulma\n * variant keeps it, rather than inheriting the DOM attribute of the same name.\n * That subtraction is the ONLY one. `color` used to be dropped here as well, to\n * stop the deprecated presentational HTML attribute reaching the three\n * components whose own props do not declare one — but doing it in the shared\n * type also stripped `color` from a CUSTOM target that legitimately has one.\n * Those three declare `color?: never` themselves instead, which lands in\n * `keyof Own` and reaches the same result without a special case here.\n *\n * Distributive over `T` on purpose. `Omit<A | B, K>` keys off `keyof (A | B)`,\n * which is only what A and B share — so a union-typed `as` (a ternary, or a\n * variable typed `'a' | 'button'`) silently lost every prop that belongs to\n * just one member, `href` among them. Distributing produces a union of prop\n * shapes instead, and each member keeps its own.\n *\n * Each component writes this intersection out in its own `*Props` alias rather\n * than referring to this type: the API-docs extractor\n * (`scripts/lib/props-extract.mjs`) walks heritage syntactically, and a generic\n * alias leaves it resolving a type parameter it cannot see through.\n * This type is here for the component's cast target and for consumers writing\n * wrappers.\n */\nexport type PolymorphicProps<\n T extends React.ElementType,\n Own,\n> = T extends unknown\n ? Own &\n Omit<React.ComponentPropsWithoutRef<T>, keyof Own | 'as'> & {\n /** The element or component to render. */\n as?: T;\n }\n : never;\n\n/**\n * A component whose props and forwarded ref both follow `as`.\n *\n * `forwardRef` cannot express a generic component, so the implementation is\n * cast to this. `displayName` is part of the type because the library sets it\n * on every `forwardRef` component, and `withSubComponents` constrains its base\n * to `{ displayName?: string }`.\n *\n * The second, non-generic signature exists for type DERIVATION rather than for\n * calls. `React.ComponentProps<typeof Button>` infers from the last overload;\n * with only the generic one it instantiated at the constraint and collapsed to\n * `any`, so a consumer building their own prop type on ours lost every check.\n * Calls still resolve against the generic signature first, so ordering here is\n * load-bearing — swapping the two puts the collapse back.\n *\n * **A wrapping HOC erases the genericity.** `React.memo(Button)`,\n * `React.lazy`, a `styled()` wrapper — anything that infers its props through\n * `ComponentProps<T>` — instantiates the type parameter once and hands back a\n * component with a single prop type. It takes the LAST call signature, which is\n * the derivation overload, so the wrapper is pinned to the DEFAULT element:\n * `React.memo(Button)` rejects `as=\"div\"` outright, and `React.memo(Dropdown.Item)`\n * renders neither a `<div>` nor a `<button>`, though both components accept those\n * directly. Stricter, not looser — the checks do not stop, they collapse onto one\n * element, and a `Dropdown.Item` memoized for a long menu list is the case that\n * meets it. This is inherent to polymorphic components in TypeScript, not\n * something this library can fix. Re-assert the type to get the rest back:\n *\n * ```tsx\n * const MemoButton = React.memo(Button) as typeof Button;\n * ```\n */\nexport interface PolymorphicComponent<Own, Default extends React.ElementType> {\n <T extends React.ElementType = Default>(\n props: PolymorphicProps<T, Own> & { ref?: PolymorphicRef<T> }\n ): React.ReactElement | null;\n (\n props: PolymorphicProps<Default, Own> & { ref?: PolymorphicRef<Default> }\n ): React.ReactElement | null;\n displayName?: string;\n}\n\n/**\n * A component whose props follow `as` but which forwards no ref.\n *\n * For components that own the node they observe — `Reveal` keeps its own ref on\n * the element it watches for scroll intersection, which is not always the\n * element `as` names.\n */\nexport interface PolymorphicComponentWithoutRef<\n Own,\n Default extends React.ElementType,\n> {\n <T extends React.ElementType = Default>(\n props: PolymorphicProps<T, Own>\n ): React.ReactElement | null;\n // The same derivation overload `PolymorphicComponent` carries, for the same\n // reason: without it `React.ComponentProps<typeof Reveal>` instantiates at the\n // constraint and collapses to `any`.\n (props: PolymorphicProps<Default, Own>): React.ReactElement | null;\n displayName?: string;\n}\n\n/**\n * A component whose props follow `as`, where `as` is a closed set of tags.\n *\n * `PolymorphicComponentWithoutRef` lets `as` name anything; this narrows it to\n * `Allowed`. Bulma pins some elements by its own markup contract — a dropdown\n * item is an `<a>`, a `<div>` or a `<button>` and nothing else — and the\n * constraint keeps that promise while still deriving props from whichever of\n * the three a caller picks.\n *\n * Genericity is what makes the derivation exact for a LITERAL `as`, and it is\n * worth the extra type parameter. Typing such a component as `React.FC<Union>`\n * instead — a union of the three prop shapes — reads as equivalent but is not:\n * against a union target, an object literal's excess-property check passes if\n * the property exists in ANY member, so `<Item as=\"div\" href=\"/x\" />` slips\n * through. Inferring `T` from the literal checks against that one member.\n *\n * A UNION-typed `as` — a ternary, or a variable typed as the whole set — infers\n * `T` as the union and lands back in that same permissive check, so\n * `<Item as={tag} href=\"/x\" />` compiles whatever `tag` turns out to be. That is\n * the open `as` behaviour too, and deliberate there: `PolymorphicProps`\n * distributes precisely so a union-typed `as` KEEPS each member's props rather\n * than losing every prop the members do not share. Narrowing it is not a\n * constrained-component question; it would have to change for `Button` first.\n */\nexport interface ConstrainedPolymorphicComponentWithoutRef<\n Own,\n Allowed extends React.ElementType,\n Default extends Allowed,\n> {\n <T extends Allowed = Default>(\n props: PolymorphicProps<T, Own>\n ): React.ReactElement | null;\n // The derivation overload `PolymorphicComponent` documents, for the same\n // reason: without it `React.ComponentProps<typeof DropdownItem>` instantiates\n // at the constraint and collapses to `any`.\n (props: PolymorphicProps<Default, Own>): React.ReactElement | null;\n displayName?: string;\n}\n","import React, { forwardRef, useEffect, useRef, useState } from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport {\n isCustomElement,\n type PolymorphicComponent,\n} from '../helpers/polymorphic';\n\nconst avatarColors = [\n 'primary',\n 'link',\n 'info',\n 'success',\n 'warning',\n 'danger',\n 'black',\n 'dark',\n 'light',\n 'white',\n] as const;\n\n/** Valid color values for the Avatar component. */\nexport type AvatarColor = (typeof avatarColors)[number];\n\nconst autoAvatarColors: AvatarColor[] = [\n 'primary',\n 'link',\n 'info',\n 'success',\n 'warning',\n 'danger',\n];\n\nconst avatarSizes = [\n '16x16',\n '24x24',\n '32x32',\n '48x48',\n '64x64',\n '96x96',\n '128x128',\n] as const;\n\n/** Valid preset size values for the Avatar component. */\nexport type AvatarSize = (typeof avatarSizes)[number];\n\n/** Valid shape values for the Avatar component. */\nexport type AvatarShape = 'circle' | 'rounded' | 'square';\n\n/**\n * Derives a small set of initials from a name (e.g. \"Ada Lovelace\" -> \"AL\").\n */\nfunction getInitialsFromName(name: string): string {\n const words = name.trim().split(/\\s+/).filter(Boolean);\n if (words.length === 0) return '';\n // Iterate by code point (Array.from) so astral-plane characters (emoji, some\n // CJK) don't get split into half surrogates.\n if (words.length === 1) {\n return Array.from(words[0]).slice(0, 2).join('').toUpperCase();\n }\n const first = Array.from(words[0])[0];\n const last = Array.from(words[words.length - 1])[0];\n return (first + last).toUpperCase();\n}\n\n/**\n * Deterministically hashes a string to pick one of the auto avatar colors.\n */\nfunction getAutoColor(name: string): AvatarColor {\n let hash = 0;\n for (let i = 0; i < name.length; i++) {\n hash = (hash << 5) - hash + name.charCodeAt(i);\n hash |= 0;\n }\n const index = Math.abs(hash) % autoAvatarColors.length;\n return autoAvatarColors[index];\n}\n\n/**\n * Default generic avatar icon shown when there is no image, name, initials, or icon.\n */\nfunction DefaultAvatarIcon() {\n return (\n <svg viewBox=\"0 0 24 24\" width=\"60%\" height=\"60%\" aria-hidden=\"true\">\n <path\n fill=\"currentColor\"\n d=\"M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-4.42 0-9 2.24-9 5v2a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1v-2c0-2.76-4.58-5-9-5Z\"\n />\n </svg>\n );\n}\n\n/**\n * The Avatar component's own props — everything it adds on top of the\n * attributes of whatever element `as` renders.\n */\nexport interface AvatarOwnProps extends Omit<BulmaClassesProps, 'color'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Image URL. On load error (or if absent), falls back to initials, then `icon`. */\n src?: string;\n /** Alternate text for the image (used for the accessible name in every render mode). An explicit `alt=\"\"` marks a non-interactive avatar as decorative. */\n alt?: string;\n /** Derives initials and a deterministic background color when no `src` is shown. */\n name?: string;\n /** Explicit initials override (else derived from `name`). */\n initials?: string;\n /** Final fallback, rendered when there is no `src`, `name`, or `initials`. */\n icon?: React.ReactNode;\n /** Preset size, or a pixel size when a number. */\n size?: AvatarSize | number;\n /** Avatar shape. Default `'circle'`. */\n shape?: AvatarShape;\n /** Background color for initials/icon avatars (else auto-derived from `name`). */\n color?: AvatarColor;\n /** When set, renders the avatar as a link. */\n href?: string;\n /** Anchor target — forwarded only when rendering a link (an `a` or a custom `as` component). */\n target?: string;\n /** Anchor rel — forwarded only when rendering a link (an `a` or a custom `as` component). */\n rel?: string;\n /** Extra props forwarded to the underlying `<img>` (e.g. `loading`, `crossOrigin`); its `onError` is chained before the fallback fires. */\n imageProps?: React.ImgHTMLAttributes<HTMLImageElement>;\n /** Inline styles, merged after the size style. */\n style?: React.CSSProperties;\n /**\n * Not accepted. Avatar always renders its own content — the image, the\n * initials, or the icon — so anything a caller passed would be replaced. It\n * is declared unavailable rather than derived from `as`, which would let a\n * target requiring `children` compel a value it then never receives.\n * @internal\n */\n children?: never;\n}\n\n/**\n * Props for the Avatar component. The DOM attributes and the `ref` both follow\n * `as`.\n *\n * `href`, `target` and `rel` stay Avatar's own props rather than being derived:\n * they are what *chooses* the element when `as` is absent (an `<a>` with an\n * `href`, a `<figure>` without one), so they have to be accepted before `as` is\n * known.\n *\n * The type parameter defaults to `'figure'`, not to `React.ElementType`.\n * Defaulting to the constraint sounds truer to a runtime default that is\n * conditional, but `ComponentPropsWithoutRef<React.ElementType>` spreads across\n * every element at once and accepts anything — which is the false-positive this\n * whole change exists to remove. `'figure'` is the element a no-`href` avatar\n * actually renders, and the anchor props it can additionally take are declared\n * above.\n *\n * @extraProp {PolymorphicRef<React.ElementType>} [ref] - Ref forwarded to the element `as` renders, typed from `as`: the DOM node for an intrinsic tag, or whatever handle a custom component exposes.\n */\nexport type AvatarProps<T extends React.ElementType = 'figure'> =\n AvatarOwnProps &\n Omit<React.ComponentPropsWithoutRef<T>, keyof AvatarOwnProps | 'as'> & {\n /** Element/component to render as. Defaults to `'a'` when `href` is set, else `'figure'`. */\n as?: T;\n };\n\n/**\n * The shape the implementation destructures. The public contract is the generic\n * `AvatarProps<T>` above — the body cannot see through `T`.\n */\ntype AvatarImplProps = AvatarOwnProps & { as?: React.ElementType };\n\n/**\n * The `Avatar` component represents a person or entity as a compact image.\n *\n * @function\n * @param {AvatarProps} props - Props for the Avatar component.\n * @param {React.Ref} ref - Forwarded ref to the element `as` renders.\n * @returns {JSX.Element} The rendered avatar element.\n *\n * @example\n * <Avatar src=\"/users/ada.jpg\" name=\"Ada Lovelace\" size=\"64x64\" />\n * @example\n * <Avatar name=\"Grace Hopper\" />\n */\nexport const Avatar = forwardRef(function Avatar(\n avatarProps: AvatarProps,\n ref: React.Ref<HTMLElement>\n) {\n const {\n className,\n src,\n alt,\n name,\n initials,\n icon,\n size,\n shape = 'circle',\n color,\n as,\n href,\n target,\n rel,\n imageProps,\n style,\n ...props\n } = avatarProps as AvatarImplProps;\n // Tracks the src that failed to load. A src change clears the latch during\n // render (React's \"reset state when props change\" pattern) so a previously\n // failed src is retried when switched back to. The img is additionally\n // keyed by src so a swap discards the old DOM node — a late error event\n // from the previous request can't fire on a retained node and latch the\n // replacement src as failed.\n const [erroredSrc, setErroredSrc] = useState<string | undefined>(undefined);\n const [prevSrc, setPrevSrc] = useState(src);\n if (src !== prevSrc) {\n setPrevSrc(src);\n setErroredSrc(undefined);\n }\n const imgRef = useRef<HTMLImageElement>(null);\n\n const { bulmaHelperClasses, rest } = useBulmaClasses(props);\n\n const showImage = !!src && src !== erroredSrc;\n\n // Catch images that failed before hydration: in SSR/static pages a broken\n // image can finish loading before React attaches its onError, so it never\n // fires. A complete image with no intrinsic width is a load failure.\n useEffect(() => {\n const img = imgRef.current;\n if (img && img.complete && img.naturalWidth === 0) {\n setErroredSrc(src);\n }\n }, [src]);\n\n const resolvedInitials = initials\n ? initials.toUpperCase()\n : name\n ? getInitialsFromName(name)\n : '';\n const showInitials = !showImage && !!resolvedInitials;\n const showIcon = !showImage && !showInitials && !!icon;\n const showDefaultIcon = !showImage && !showInitials && !showIcon;\n\n const resolvedColor = color ?? (name ? getAutoColor(name) : undefined);\n\n const isPresetSize = typeof size === 'string' && avatarSizes.includes(size);\n const sizeStyle =\n typeof size === 'number'\n ? { width: size, height: size, fontSize: size / 2.5 }\n : undefined;\n\n const avatarClasses = usePrefixedClassNames('avatar', {\n [`is-${size}`]: isPresetSize,\n [`is-${shape}`]: shape,\n [`is-${resolvedColor}`]:\n resolvedColor && !showImage && avatarColors.includes(resolvedColor),\n });\n\n const combinedClasses = classNames(\n avatarClasses,\n bulmaHelperClasses,\n className\n );\n\n const initialsClass = usePrefixedClassNames('avatar-initials');\n\n const Tag: React.ElementType = as ?? (href ? 'a' : 'figure');\n // A custom `as` component given an href is being used as a link — the same\n // condition under which isLinkLike forwards href/target/rel below — so it\n // counts as interactive too. Otherwise alt=\"\" would mark a real link\n // decorative (aria-hidden) and it could render nameless.\n const isInteractive =\n Tag === 'a' ||\n Tag === 'button' ||\n ((typeof Tag !== 'string' || isCustomElement(Tag)) && href != null);\n\n // Only forward link attributes when rendering an anchor or a custom (non-DOM)\n // component; a plain `as=\"div\"` must not receive a stray `href`/`target`/`rel`.\n const isLinkLike =\n Tag === 'a' || typeof Tag !== 'string' || isCustomElement(Tag);\n const linkProps = isLinkLike ? { href, target, rel } : {};\n\n // alt coalesces with ?? (not ||) so an explicit alt=\"\" survives as the\n // standard decorative marker instead of being overridden by name.\n const accessibleName = alt ?? name;\n // The decorative opt-out never applies to an interactive avatar — a link or\n // button must always expose an accessible name.\n const isDecorative = alt === '' && !isInteractive;\n\n const a11yProps = showImage\n ? isInteractive && !accessibleName\n ? // The img alt normally names the control; with no alt/name (an API\n // returning only a photo URL) the link/button would be nameless.\n { 'aria-label': name || 'Avatar' }\n : {}\n : isDecorative\n ? { 'aria-hidden': true as const }\n : {\n ...(isInteractive ? {} : { role: 'img' as const }),\n 'aria-label': accessibleName || name || 'Avatar',\n };\n\n // A clickable avatar inside a form must not submit it; default the native\n // button type (an explicit type passed through rest still wins).\n const buttonTypeProps = Tag === 'button' ? { type: 'button' as const } : {};\n\n return (\n <Tag\n ref={ref}\n className={combinedClasses}\n style={{ ...sizeStyle, ...style }}\n {...buttonTypeProps}\n {...linkProps}\n {...a11yProps}\n {...rest}\n >\n {showImage && (\n <img\n key={src}\n {...imageProps}\n ref={imgRef}\n src={src}\n alt={accessibleName ?? ''}\n onError={e => {\n imageProps?.onError?.(e);\n setErroredSrc(src);\n }}\n />\n )}\n {showInitials && (\n <span className={initialsClass}>{resolvedInitials}</span>\n )}\n {showIcon && icon}\n {showDefaultIcon && <DefaultAvatarIcon />}\n </Tag>\n );\n}) as PolymorphicComponent<AvatarOwnProps, 'figure'>;\n\nAvatar.displayName = 'Avatar';\n\nexport default Avatar;\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { Avatar, AvatarProps } from './Avatar';\n\n/** Valid overlap spacing values for the Avatars component. */\nexport type AvatarsSpacing = 'sm' | 'md' | 'lg';\n\n/**\n * Props for the Avatars component.\n */\nexport interface AvatarsProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, 'color'>,\n Omit<BulmaClassesProps, 'backgroundColor' | 'color'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Show only the first `max` children, replacing the overflow with a \"+N\" surplus avatar. A single overflow avatar is shown directly rather than as a pointless \"+1\". */\n max?: number;\n /** Uniform size applied to every child `Avatar` (and the surplus avatar). */\n size?: AvatarProps['size'];\n /** Uniform shape applied to every child `Avatar` (and the surplus avatar); a child's own `shape` wins when this is unset. */\n shape?: AvatarProps['shape'];\n /** Space between avatars: a preset or a pixel `number`. The overlap distance, or the gap when `spaced`. */\n spacing?: AvatarsSpacing | number;\n /** Lay the avatars out side by side (non-overlapping), using `spacing` as the gap. */\n spaced?: boolean;\n /** Builds the surplus avatar's accessible name from the hidden count, for localization. Default: `` `${count} more` ``. */\n surplusLabel?: (count: number) => string;\n /** `Avatar` elements to render inside the group. */\n children?: React.ReactNode;\n}\n\n/**\n * Flattens Fragment children (recursively) into a flat element array so they\n * participate in max clamping and size/shape injection. Children.toArray keys\n * restart at \".0\" inside each fragment, so fragment children are re-keyed by\n * prefixing the fragment's own key — otherwise a fragment sibling of a direct\n * child would collide (both \".0\") and trigger duplicate-key warnings.\n */\nfunction flattenChildren(\n children: React.ReactNode,\n keyPrefix = ''\n): React.ReactElement<AvatarProps>[] {\n return React.Children.toArray(children).flatMap(child => {\n if (!React.isValidElement(child)) return [];\n if (child.type === React.Fragment) {\n return flattenChildren(\n (child.props as { children?: React.ReactNode }).children,\n keyPrefix + child.key\n );\n }\n const el = child as React.ReactElement<AvatarProps>;\n return [\n keyPrefix ? React.cloneElement(el, { key: keyPrefix + el.key }) : el,\n ];\n });\n}\n\n/**\n * The `Avatars` component renders an overlapping/stacked group of `Avatar`s, the \"members\" list pattern.\n *\n * @function\n * @param {AvatarsProps} props - Props for the Avatars component.\n * @returns {JSX.Element} The rendered avatars group.\n *\n * @example\n * <Avatars max={3} size=\"48x48\">\n * {members.map(m => <Avatar key={m.id} src={m.photo} name={m.name} />)}\n * </Avatars>\n */\nconst AvatarsComponent: React.FC<AvatarsProps> = ({\n className,\n max,\n size,\n shape,\n spacing = 'md',\n spaced = false,\n surplusLabel,\n style,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });\n\n // A preset spacing maps to a class; a numeric spacing sets the CSS var inline\n // (mirrors Sidebar's inline --bulma-* width var).\n const isPresetSpacing = typeof spacing === 'string';\n const avatarsClasses = usePrefixedClassNames('avatars', {\n [`is-spacing-${spacing}`]: isPresetSpacing,\n 'is-spaced': spaced,\n });\n const spacingStyle: React.CSSProperties | undefined =\n typeof spacing === 'number'\n ? ({ '--bulma-avatars-spacing': `${spacing}px` } as React.CSSProperties)\n : undefined;\n\n const surplusClass = usePrefixedClassNames('is-surplus');\n\n const combinedClasses = classNames(\n avatarsClasses,\n bulmaHelperClasses,\n className\n );\n\n const childArray = flattenChildren(children);\n\n const maxCount =\n typeof max === 'number' && Number.isInteger(max) && max >= 0\n ? max\n : undefined;\n const overshoot = maxCount !== undefined ? childArray.length - maxCount : 0;\n // A \"+1\" surplus bubble occupies the same slot the hidden avatar would, so\n // only collapse into a surplus when it stands in for two or more avatars; a\n // single overflow avatar is shown directly.\n const clamp = maxCount !== undefined && overshoot >= 2;\n const visibleChildren = clamp ? childArray.slice(0, maxCount) : childArray;\n const overflowCount = clamp ? overshoot : 0;\n\n return (\n <div\n className={combinedClasses}\n style={{ ...spacingStyle, ...style }}\n {...rest}\n >\n {visibleChildren.map(child =>\n // Conditional-spread so an unset group size/shape doesn't clobber a\n // child that set its own.\n React.cloneElement(child, {\n ...(size !== undefined ? { size } : {}),\n ...(shape !== undefined ? { shape } : {}),\n })\n )}\n {overflowCount > 0 && (\n <Avatar\n initials={`+${overflowCount}`}\n alt={\n // `||` (not a plain ternary): an empty string from surplusLabel\n // would make the bubble decorative (alt=\"\") and hide the count\n // from assistive tech — fall back to the default label instead.\n surplusLabel?.(overflowCount) || `${overflowCount} more`\n }\n size={size}\n shape={shape}\n className={surplusClass}\n />\n )}\n </div>\n );\n};\n\nexport const Avatars = withSubComponents(\n AvatarsComponent,\n { Avatar },\n 'Avatars'\n);\n\nexport default Avatars;\n","import React, { useMemo } from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\n\nconst badgeColors = [\n 'primary',\n 'link',\n 'info',\n 'success',\n 'warning',\n 'danger',\n 'black',\n 'dark',\n 'light',\n 'white',\n] as const;\n\n/** Valid color values for the Badge component. */\nexport type BadgeColor = (typeof badgeColors)[number];\n\n/** Valid corner position values for the Badge component. */\nexport type BadgePosition =\n 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';\n\n/** Valid overlap adjustment values for the Badge component. */\nexport type BadgeOverlap = 'circle' | 'square';\n\n/**\n * Props for the Badge component.\n */\nexport interface BadgeProps\n extends\n Omit<React.HTMLAttributes<HTMLSpanElement>, 'color' | 'content'>,\n Omit<BulmaClassesProps, 'color'> {\n /** Additional CSS classes for the root — the wrapper when `children` are present, else the badge pill. */\n className?: string;\n /** Additional CSS classes applied to the badge pill itself (unprefixed, like `Tooltip`'s `tooltipClassName`). */\n badgeClassName?: string;\n /** Count, short text, or a custom node to display; omit with `dot` for a plain dot. `max`/`showZero` apply only to numeric content. */\n content?: React.ReactNode;\n /** Numeric `content` above this renders as `\"{max}+\"`. A negative or non-integer value falls back to the default. */\n max?: number;\n /** Render a small dot with no content. */\n dot?: boolean;\n /** Show the badge when `content` is `0`. Default `false`. */\n showZero?: boolean;\n /** Status color. Default `'danger'`. */\n color?: BadgeColor;\n /** Corner to overlay the badge on, relative to `children`. Ignored for standalone badges (no `children`). */\n position?: BadgePosition;\n /** Nudges the offset for a round (`'circle'`) vs rectangular (`'square'`) child. Ignored for standalone badges (no `children`). */\n overlap?: BadgeOverlap;\n /** Processing/pulse animation; no-ops under `prefers-reduced-motion: reduce`. */\n pulse?: boolean;\n /** Hide the badge pill without unmounting it (the wrapper and `children` stay visible). */\n invisible?: boolean;\n /** The element the badge overlays. Omit to render a standalone badge. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Badge` component is a small status/count indicator overlaid on the corner of another element, or rendered standalone.\n *\n * @function\n * @param {BadgeProps} props - Props for the Badge component.\n * @returns {JSX.Element | null} The rendered badge (and children, if provided).\n *\n * @example\n * <Badge dot color=\"success\" overlap=\"circle\">\n * <Avatar src=\"/users/ada.jpg\" name=\"Ada\" />\n * </Badge>\n * @example\n * <Badge content={128} max={99} color=\"danger\">\n * <Icon name=\"bell\" />\n * </Badge>\n */\nexport const Badge: React.FC<BadgeProps> = ({\n className,\n badgeClassName,\n content,\n max = 99,\n dot = false,\n showZero = false,\n color = 'danger',\n position = 'top-right',\n overlap = 'square',\n pulse = false,\n invisible = false,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses(props);\n\n const hasChildren = children != null && children !== false;\n\n const isZero = typeof content === 'number' && content === 0;\n const hasContent =\n content != null &&\n content !== false &&\n content !== true &&\n content !== '' &&\n (!isZero || showZero);\n // A hidden zero keeps the pill mounted (visually hidden via .is-zero) so the\n // role=\"status\" live region exists before a 0 -> 1 change — mutating text in\n // an existing region is reliably announced, inserting an already-populated\n // region is not.\n const zeroPlaceholder = isZero && !showZero && !dot && !invisible;\n const shouldRender = dot || hasContent || invisible || zeroPlaceholder;\n\n // A negative or non-integer max is nonsensical; fall back to the default\n // rather than render e.g. \"-1+\" (mirrors Avatars' max sanitization).\n const sanitizedMax = Number.isInteger(max) && max >= 0 ? max : 99;\n\n const displayValue = useMemo<React.ReactNode>(() => {\n if (dot || !hasContent) return undefined;\n // max only applies to numeric content; any other node renders verbatim.\n if (typeof content === 'number') {\n return content > sanitizedMax ? `${sanitizedMax}+` : String(content);\n }\n return content;\n }, [dot, hasContent, content, sanitizedMax]);\n\n // Only primitive content produces a meaningful aria-label; a custom node\n // supplies its own accessible text, so we leave role=\"status\" unlabeled.\n const ariaLabel =\n typeof displayValue === 'string' || typeof displayValue === 'number'\n ? String(displayValue)\n : undefined;\n\n // Both prefixed-classname hooks stay above the early returns (Rules of Hooks).\n const wrapperClass = usePrefixedClassNames('badge-wrapper');\n const badgeClasses = usePrefixedClassNames('badge', {\n [`is-${color}`]: !!color && badgeColors.includes(color),\n // Corner position / overlap only mean anything inside a wrapper; emitting\n // them on a standalone badge shifts it out of normal flow via the transform.\n [`is-${position}`]: !!position && hasChildren,\n [`is-overlap-${overlap}`]: !!overlap && hasChildren,\n 'is-standalone': !hasChildren,\n 'is-dot': dot,\n 'is-pulse': pulse,\n 'is-invisible': invisible,\n 'is-zero': zeroPlaceholder,\n });\n\n // badgeClassName is a plain (unprefixed) slot merged onto the pill, mirroring\n // Tooltip's tooltipClassName. Standalone badges have no wrapper, so the pill\n // is the root and takes className/helpers/rest directly.\n const pillClass = hasChildren\n ? classNames(badgeClasses, badgeClassName)\n : classNames(badgeClasses, badgeClassName, bulmaHelperClasses, className);\n\n const a11yProps = dot\n ? { 'aria-hidden': true as const }\n : {\n role: 'status' as const,\n ...(ariaLabel !== undefined ? { 'aria-label': ariaLabel } : {}),\n };\n\n const indicator = shouldRender ? (\n <span className={pillClass} {...a11yProps} {...(hasChildren ? {} : rest)}>\n {!dot && displayValue}\n </span>\n ) : null;\n\n if (!hasChildren) {\n return indicator;\n }\n\n // Always render the wrapper when there are children so the root keeps\n // className/helpers/rest (data-testid, id, onClick, ...) even when the badge\n // itself is hidden.\n return (\n <span\n className={classNames(wrapperClass, bulmaHelperClasses, className)}\n {...rest}\n >\n {children}\n {indicator}\n </span>\n );\n};\n\nBadge.displayName = 'Badge';\n\nexport default Badge;\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\n\nconst validBreadcrumbAlignments = ['centered', 'right'] as const;\n/**\n * Valid alignment values for the Breadcrumb component.\n */\nexport type BreadcrumbAlignment = (typeof validBreadcrumbAlignments)[number];\n\nconst validBreadcrumbSeparators = [\n 'arrow',\n 'bullet',\n 'dot',\n 'succeeds',\n] as const;\n/**\n * Valid separator values for the Breadcrumb component.\n */\nexport type BreadcrumbSeparator = (typeof validBreadcrumbSeparators)[number];\n\nconst validBreadcrumbSizes = ['small', 'medium', 'large'] as const;\n/**\n * Valid size values for the Breadcrumb component.\n */\nexport type BreadcrumbSize = (typeof validBreadcrumbSizes)[number];\n\n/**\n * Props for the Breadcrumb component.\n */\nexport interface BreadcrumbProps\n extends\n Omit<React.HTMLAttributes<HTMLElement>, 'color'>,\n Omit<BulmaClassesProps, 'backgroundColor' | 'color'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Alignment of the breadcrumb (`is-centered`, `is-right`). */\n alignment?: BreadcrumbAlignment;\n /** Type of separator between breadcrumb items. */\n separator?: BreadcrumbSeparator;\n /** Breadcrumb size. */\n size?: BreadcrumbSize;\n /** Breadcrumb items (`<li>`s with `<a>` or `<span>`). */\n children?: React.ReactNode;\n}\n\n/**\n * The `Breadcrumb` component renders a Bulma-styled breadcrumb navigation.\n *\n * @function\n * @param {BreadcrumbProps} props - Props for the Breadcrumb component.\n * @returns {JSX.Element} The rendered breadcrumb element.\n * @see {@link https://bulma.io/documentation/components/breadcrumb/ | Bulma Breadcrumb documentation}\n */\nexport const Breadcrumb: React.FC<BreadcrumbProps> = ({\n className,\n alignment,\n separator,\n size,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });\n\n // Generate Bulma classes with prefix\n const bulmaClasses = usePrefixedClassNames('breadcrumb', {\n [`is-${alignment}`]:\n alignment && validBreadcrumbAlignments.includes(alignment),\n [`has-${separator}-separator`]:\n separator && validBreadcrumbSeparators.includes(separator),\n [`is-${size}`]: size && validBreadcrumbSizes.includes(size),\n });\n\n // Combine prefixed Bulma classes with unprefixed user className and prefixed helper classes\n const breadcrumbClasses = classNames(\n bulmaClasses,\n bulmaHelperClasses,\n className\n );\n\n return (\n <nav className={breadcrumbClasses} aria-label=\"breadcrumbs\" {...rest}>\n <ul>{children}</ul>\n </nav>\n );\n};\n","import type { CSSProperties } from 'react';\n\n/**\n * Merges helper-emitted inline styles (e.g., `bulmaHelperStyles` from\n * `useBulmaClasses`) with a user-supplied `style` prop.\n *\n * The user's `style` wins on conflicting properties, and when both inputs are\n * absent the result is `undefined` — so components that receive neither\n * render with no `style` attribute at all, exactly as before.\n *\n * @function mergeBulmaStyles\n * @param helperStyles - Inline styles emitted by the Bulma helper hooks.\n * @param style - The component consumer's `style` prop.\n * @returns The merged style object, or `undefined` when both are absent.\n * @example\n * <section style={mergeBulmaStyles(bulmaHelperStyles, style)} />\n */\nexport const mergeBulmaStyles = (\n helperStyles?: CSSProperties,\n style?: CSSProperties\n): CSSProperties | undefined =>\n helperStyles || style ? { ...helperStyles, ...style } : undefined;\n","import React from 'react';\nimport {\n classNames,\n usePrefixedClassNames,\n prefixedClassNames,\n} from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n validSchemeColors,\n} from '../helpers/useBulmaClasses';\nimport { mergeBulmaStyles } from '../helpers/mergeBulmaStyles';\nimport { useConfig } from '../helpers/Config';\n\n/**\n * Props for the Card component.\n * @extraProp {'centered' | 'justified' | 'left' | 'right'} [textAlign] - Text alignment.\n */\nexport interface CardProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text color for the card. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /**\n * Text color alias: renders `has-text-<color>`, exactly like `textColor`.\n * Not a filled card variant (no `.card.is-<color>` CSS exists). Prefer\n * `textColor`, which takes precedence when both are set; use `bgColor` for\n * a colored surface.\n */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /**\n * Background color for the card. `scheme-*` values render as a\n * dark-mode-safe inline `background-color: var(--bulma-scheme-*)` instead\n * of a class. The `scheme-invert*` values do not change text color — pair\n * them with a contrasting foreground.\n */\n bgColor?:\n | (typeof validColors)[number]\n | (typeof validSchemeColors)[number]\n | 'inherit'\n | 'current';\n /** Whether the card has a shadow (default: `true`). */\n hasShadow?: boolean;\n /** Card header content, rendered inside `.card-header-title`. */\n header?: React.ReactNode;\n /** If true, centers the header title. */\n headerCentered?: boolean;\n /** Card header icon, rendered as a sibling to the header title. */\n headerIcon?: React.ReactNode;\n /** Card footer content; each item is wrapped in `.card-footer-item`. */\n footer?: React.ReactNode | React.ReactNode[];\n /** Card image node or image src string. */\n image?: React.ReactNode | string;\n /** Alternate text for the card image. */\n imageAlt?: string;\n /** Card content (body). */\n children?: React.ReactNode;\n}\n\n/**\n * Wrap each footer item in a `.card-footer-item` span.\n * @param {CardProps['footer']} footer - Footer content (single node or array).\n * @param {string | undefined} classPrefix - Bulma class prefix.\n * @returns {React.ReactNode[] | null} Wrapped footer items, or null if no footer.\n */\nconst renderFooter = (\n footer: CardProps['footer'],\n classPrefix: string | undefined\n) => {\n if (!footer) return null;\n const items = Array.isArray(footer) ? footer : [footer];\n return items.map((item, idx) => (\n <span\n className={prefixedClassNames(classPrefix, 'card-footer-item')}\n key={idx}\n >\n {item}\n </span>\n ));\n};\n\n/**\n * Check if children contain any Card compound sub-components.\n * @param {React.ReactNode} children - The children to inspect.\n * @returns {boolean} True if any child is a Card compound component.\n */\nconst hasCompoundComponents = (children: React.ReactNode): boolean => {\n return React.Children.toArray(children).some(child => {\n if (!React.isValidElement(child)) return false;\n\n // Direct comparison with our compound component functions\n return (\n child.type === CardHeader ||\n child.type === CardContent ||\n child.type === CardImage ||\n child.type === CardFooter ||\n child.type === CardFooterItem ||\n child.type === CardHeaderIcon\n );\n });\n};\n\n/**\n * The `Card` component renders a Bulma-styled card with optional header, image, content, and footer.\n *\n * @function\n * @param {CardProps} props - Props for the Card component.\n * @returns {JSX.Element} The rendered card element.\n * @see {@link https://bulma.io/documentation/components/card/ | Bulma Card documentation}\n */\nconst CardComponent: React.FC<CardProps> = ({\n className,\n children,\n textColor,\n color,\n bgColor,\n hasShadow = true,\n header,\n headerCentered,\n headerIcon,\n footer,\n image,\n imageAlt,\n style,\n ...props\n}) => {\n const { classPrefix } = useConfig();\n const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n\n // Generate Bulma classes with prefix\n const bulmaClasses = usePrefixedClassNames('card', {\n 'is-shadowless': !hasShadow,\n });\n\n // Combine prefixed Bulma classes with unprefixed user className and prefixed helper classes\n const cardClasses = classNames(bulmaClasses, bulmaHelperClasses, className);\n\n // Render header with optional icon and is-centered modifier\n const renderHeader = (\n header: React.ReactNode,\n headerIcon: React.ReactNode,\n headerCentered: boolean | undefined,\n classPrefix: string | undefined\n ) => {\n if (!header && !headerIcon) return null;\n return (\n <header className={prefixedClassNames(classPrefix, 'card-header')}>\n {header && (\n <div\n className={prefixedClassNames(classPrefix, 'card-header-title', {\n 'is-centered': headerCentered,\n })}\n >\n {header}\n </div>\n )}\n {headerIcon}\n </header>\n );\n };\n\n return (\n <div\n className={cardClasses}\n style={mergeBulmaStyles(bulmaHelperStyles, style)}\n {...rest}\n >\n {renderHeader(header, headerIcon, headerCentered, classPrefix)}\n {image && (\n <div className={prefixedClassNames(classPrefix, 'card-image')}>\n {typeof image === 'string' ? (\n <figure className={prefixedClassNames(classPrefix, 'image')}>\n <img src={image} alt={imageAlt ?? 'Card image'} />\n </figure>\n ) : (\n image\n )}\n </div>\n )}\n {/* Only render card-content if children is specified and doesn't contain compound components */}\n {typeof children !== 'undefined' &&\n children !== null &&\n children !== '' &&\n !hasCompoundComponents(children) && (\n <div className={prefixedClassNames(classPrefix, 'card-content')}>\n {children}\n </div>\n )}\n {/* Render children directly if they contain compound components */}\n {typeof children !== 'undefined' &&\n children !== null &&\n children !== '' &&\n hasCompoundComponents(children) &&\n children}\n {footer && (\n <footer className={prefixedClassNames(classPrefix, 'card-footer')}>\n {Array.isArray(footer)\n ? footer.map((item, idx) => (\n <span\n className={prefixedClassNames(\n classPrefix,\n 'card-footer-item'\n )}\n key={idx}\n >\n {item}\n </span>\n ))\n : footer && (\n <span\n className={prefixedClassNames(\n classPrefix,\n 'card-footer-item'\n )}\n >\n {footer}\n </span>\n )}\n </footer>\n )}\n </div>\n );\n};\n\n// Compound components for flexible composition\n\n/**\n * Props for the Card.Header compound component.\n */\nexport interface CardHeaderProps\n extends\n React.HTMLAttributes<HTMLElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Bulma color modifier (text color helper). */\n color?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Text color helper; wins over `color` when both are set. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Additional CSS classes. */\n className?: string;\n /** Header content. Wrap in Card.Header.Title for Bulma styling. */\n children?: React.ReactNode;\n /** Whether to center the header title text. */\n centered?: boolean;\n}\n\n/**\n * Props for the Card.Image compound component.\n */\nexport interface CardImageProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Bulma color modifier (text color helper). */\n color?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Text color helper; wins over `color` when both are set. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Additional CSS classes. */\n className?: string;\n /** Image content (e.g. a `<figure>` with an `<img>`). */\n children?: React.ReactNode;\n}\n\n/**\n * Props for the Card.Content compound component.\n */\nexport interface CardContentProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Bulma color modifier (text color helper). */\n color?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Text color helper; wins over `color` when both are set. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Additional CSS classes. */\n className?: string;\n /** Card body content. */\n children?: React.ReactNode;\n}\n\n/**\n * Props for the Card.Footer compound component.\n */\nexport interface CardFooterProps\n extends\n React.HTMLAttributes<HTMLElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Bulma color modifier (text color helper). */\n color?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Text color helper; wins over `color` when both are set. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Additional CSS classes. */\n className?: string;\n /** Footer content, typically Card.FooterItem elements. */\n children?: React.ReactNode;\n}\n\n/**\n * Props for the Card.FooterItem compound component.\n */\nexport interface CardFooterItemProps\n extends\n React.HTMLAttributes<HTMLSpanElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Bulma color modifier (text color helper). */\n color?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Text color helper; wins over `color` when both are set. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Additional CSS classes. */\n className?: string;\n /** Footer item content (link, button, text, etc.). */\n children?: React.ReactNode;\n}\n\n/**\n * Props for the Card.Header.Title compound component.\n */\nexport interface CardHeaderTitleProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Bulma color modifier (text color helper). */\n color?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Text color helper; wins over `color` when both are set. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Additional CSS classes. */\n className?: string;\n /** Title text content. */\n children?: React.ReactNode;\n /** Whether to center the title text. */\n centered?: boolean;\n}\n\n/**\n * Props for the Card.Header.Icon compound component.\n */\nexport interface CardHeaderIconProps\n extends\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Bulma color modifier (text color helper). */\n color?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Text color helper; wins over `color` when both are set. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Additional CSS classes. */\n className?: string;\n /** Icon content (e.g. an icon element). */\n children?: React.ReactNode;\n}\n\n/**\n * Card header compound component. Wraps children in a `.card-header` element.\n *\n * @function\n * @param {CardHeaderProps} props - Props for the CardHeader component.\n * @returns {JSX.Element} The rendered card header.\n */\nconst CardHeader: React.FC<CardHeaderProps> = ({\n className,\n children,\n centered,\n color,\n bgColor,\n textColor,\n ...props\n}) => {\n const { classPrefix } = useConfig();\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n\n // Check if children contains a CardHeaderTitle component\n const hasHeaderTitle = React.Children.toArray(children).some(\n child =>\n React.isValidElement(child) &&\n typeof child.type === 'function' &&\n child.type === CardHeaderTitle\n );\n\n const headerClasses = usePrefixedClassNames('card-header');\n\n return (\n <header\n className={classNames(headerClasses, bulmaHelperClasses, className)}\n {...rest}\n >\n {hasHeaderTitle ? (\n children\n ) : (\n <div\n className={classNames(\n prefixedClassNames(classPrefix, 'card-header-title', {\n 'is-centered': centered,\n }),\n className\n )}\n >\n {children}\n </div>\n )}\n </header>\n );\n};\n\n/**\n * Card header title compound component. Renders a `.card-header-title` element.\n *\n * @function\n * @param {CardHeaderTitleProps} props - Props for the CardHeaderTitle component.\n * @returns {JSX.Element} The rendered card header title.\n */\nconst CardHeaderTitle: React.FC<CardHeaderTitleProps> = ({\n className,\n children,\n centered,\n color,\n bgColor,\n textColor,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n return (\n <div\n className={classNames(\n usePrefixedClassNames('card-header-title', {\n 'is-centered': centered,\n }),\n bulmaHelperClasses,\n className\n )}\n {...rest}\n >\n {children}\n </div>\n );\n};\n\n/**\n * Card header icon compound component. Renders a `.card-header-icon` button.\n *\n * @function\n * @param {CardHeaderIconProps} props - Props for the CardHeaderIcon component.\n * @returns {JSX.Element} The rendered card header icon button.\n */\nconst CardHeaderIcon: React.FC<CardHeaderIconProps> = ({\n className,\n children,\n color,\n bgColor,\n textColor,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n return (\n <button\n className={classNames(\n usePrefixedClassNames('card-header-icon'),\n bulmaHelperClasses,\n className\n )}\n aria-label={props['aria-label'] || 'more options'}\n {...rest}\n >\n {children}\n </button>\n );\n};\n\n/**\n * Card image compound component. Wraps children in a `.card-image` element.\n *\n * @function\n * @param {CardImageProps} props - Props for the CardImage component.\n * @returns {JSX.Element} The rendered card image container.\n */\nconst CardImage: React.FC<CardImageProps> = ({\n className,\n children,\n color,\n bgColor,\n textColor,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n return (\n <div\n className={classNames(\n usePrefixedClassNames('card-image'),\n bulmaHelperClasses,\n className\n )}\n {...rest}\n >\n {children}\n </div>\n );\n};\n\n/**\n * Card content compound component. Wraps children in a `.card-content` element.\n *\n * @function\n * @param {CardContentProps} props - Props for the CardContent component.\n * @returns {JSX.Element} The rendered card content container.\n */\nconst CardContent: React.FC<CardContentProps> = ({\n className,\n children,\n color,\n bgColor,\n textColor,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n return (\n <div\n className={classNames(\n usePrefixedClassNames('card-content'),\n bulmaHelperClasses,\n className\n )}\n {...rest}\n >\n {children}\n </div>\n );\n};\n\n/**\n * Card footer compound component. Wraps children in a `.card-footer` element.\n *\n * @function\n * @param {CardFooterProps} props - Props for the CardFooter component.\n * @returns {JSX.Element} The rendered card footer.\n */\nconst CardFooter: React.FC<CardFooterProps> = ({\n className,\n children,\n color,\n bgColor,\n textColor,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n return (\n <footer\n className={classNames(\n usePrefixedClassNames('card-footer'),\n bulmaHelperClasses,\n className\n )}\n {...rest}\n >\n {children}\n </footer>\n );\n};\n\n/**\n * Card footer item compound component. Wraps children in a `.card-footer-item` span.\n *\n * @function\n * @param {CardFooterItemProps} props - Props for the CardFooterItem component.\n * @returns {JSX.Element} The rendered card footer item.\n */\nconst CardFooterItem: React.FC<CardFooterItemProps> = ({\n className,\n children,\n color,\n bgColor,\n textColor,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n return (\n <span\n className={classNames(\n usePrefixedClassNames('card-footer-item'),\n bulmaHelperClasses,\n className\n )}\n {...rest}\n >\n {children}\n </span>\n );\n};\n\n// Attach nested Title and Icon components to CardHeader\nconst CardHeaderCompound = withSubComponents(CardHeader, {\n Title: CardHeaderTitle,\n Icon: CardHeaderIcon,\n});\n\n/** Card component with Header, Image, Content, Footer, and FooterItem sub-components. */\nexport const Card = withSubComponents(\n CardComponent,\n {\n Header: CardHeaderCompound,\n Image: CardImage,\n Content: CardContent,\n Footer: CardFooter,\n FooterItem: CardFooterItem,\n },\n 'Card'\n);\n\n/** Internal test-only exports. Not part of the public API. */\nexport const __test_exports__ = { renderFooter };\n","import type React from 'react';\n\n/**\n * Exactly what `<a>` adds over the attributes every element has: `href`,\n * `target`, `download`, `hrefLang`, `ping`, `referrerPolicy`, `media`, `type`.\n *\n * Subtracted from React's own types rather than listed. Listing them is how\n * `Level.Item` came to reject `download` at `as=\"a\"` — its list said `href`,\n * `target`, `rel` and stopped (#641). A list gains an entry when someone\n * notices; a subtraction gains it when React does.\n *\n * NOT `rel`: React declares it on `HTMLAttributes`, for every element, so the\n * subtraction removes it. A component that withholds `rel` from a non-anchor is\n * making a compatibility choice rather than stating a fact about anchors, and\n * says so where it makes it.\n */\nexport type AnchorOnlyAttributes = Omit<\n React.AnchorHTMLAttributes<HTMLAnchorElement>,\n keyof React.HTMLAttributes<HTMLAnchorElement>\n>;\n\n/**\n * The runtime mirror of `AnchorOnlyAttributes`, keyed so the two cannot drift.\n *\n * `Record<keyof …, true>` is what links them: the day React adds an anchor\n * attribute, every component deriving its props from `as` accepts it and this\n * object stops compiling until it is named here. A plain array beside a derived\n * type drifts in the one direction that matters — the type accepts the new\n * attribute and the filter lets it leak onto a `<div>`.\n */\nexport const ANCHOR_ONLY_ATTRS: Readonly<\n Record<keyof AnchorOnlyAttributes, true>\n> = {\n href: true,\n target: true,\n download: true,\n hrefLang: true,\n ping: true,\n referrerPolicy: true,\n media: true,\n type: true,\n};\n\n/**\n * `props` without the keys named in `strip`.\n *\n * The SET is per component and deliberately not shared, because the right\n * answer differs and the differences are principled: how open the component's\n * `as` is, and which of these attributes its own tags legitimately take. What\n * IS shared is the derived source of truth above and this function. Each caller\n * declares its delta next to the set it passes, which is the only place that\n * stays true when a component's `as` changes.\n */\nexport function omitAttrs<T extends object, K extends string>(\n props: T,\n strip: Readonly<Record<K, true>>\n): Omit<T, K> {\n const out: Record<string | symbol, unknown> = {};\n // `Reflect.ownKeys`, not `Object.entries`: the latter drops symbol-keyed props.\n // React enumerates props with `for...in`, which never reports a symbol, so\n // nothing renders differently either way. It is not the same change for all\n // three callers: Menu filtered by rest-destructure and kept them already,\n // while Dropdown and Level filtered through `Object.entries` and did not, so\n // this restores one and widens two. Symbols are the only shape where those\n // two disagreed, and keeping them is the side a spread is on.\n for (const key of Reflect.ownKeys(props)) {\n // Enumerability, for the same reason in the other direction: `Reflect.ownKeys`\n // also reports NON-enumerable own props, which every filter this replaced left\n // behind. Copying one out would both add a prop the old code dropped and make\n // it enumerable on the way, so widening the key source must not widen this.\n if (!Object.prototype.propertyIsEnumerable.call(props, key)) continue;\n const value = (props as Record<string | symbol, unknown>)[key];\n // `hasOwnProperty`, not `key in strip`: `in` walks the prototype chain, so a\n // prop named `toString`, `valueOf`, `constructor` or `hasOwnProperty` was\n // stripped although no caller named it — and anything written to\n // `Object.prototype` would start deleting props that share its keys.\n if (\n typeof key === 'symbol' ||\n !Object.prototype.hasOwnProperty.call(strip, key)\n ) {\n // `defineProperty`, not `out[key] = value`: assignment consults the\n // prototype chain for a setter, and `__proto__` has one. A prop named\n // `__proto__` would be swallowed by it — dropped from the result AND\n // replacing the result's prototype with its value. A spread and a rest\n // destructure both DEFINE, which is what makes them immune, so this has\n // to define too.\n Object.defineProperty(out, key, {\n value,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n }\n }\n return out as Omit<T, K>;\n}\n","import React, {\n forwardRef,\n useCallback,\n useState,\n useRef,\n useEffect,\n} from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport type { ConstrainedPolymorphicComponentWithoutRef } from '../helpers/polymorphic';\nimport {\n type AnchorOnlyAttributes,\n ANCHOR_ONLY_ATTRS,\n omitAttrs,\n} from '../helpers/anchorAttrs';\n\n/**\n * Checks if code is running in a browser environment.\n * @param win - Window object.\n * @param doc - Document object.\n * @returns {boolean} True if in browser, false otherwise.\n */\nexport const isBrowser = (win?: typeof window, doc?: typeof document) =>\n typeof win !== 'undefined' && typeof doc !== 'undefined';\n\n/**\n * Props for the Dropdown component.\n * @extraProp {React.Ref<HTMLDivElement>} [ref] - Ref forwarded to the root dropdown element.\n */\nexport interface DropdownProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, keyof BulmaClassesProps>,\n BulmaClassesProps {\n /** The dropdown button/trigger content. */\n label: React.ReactNode;\n /** Dropdown menu items and dividers. */\n children: React.ReactNode;\n /** Additional CSS classes for root. */\n className?: string;\n /** Additional CSS classes for the dropdown menu. */\n menuClassName?: string;\n /** Whether the dropdown is open (controlled). */\n active?: boolean;\n /** Dropdown menu opens upward. */\n up?: boolean;\n /** Menu is right-aligned. */\n right?: boolean;\n /** Open on hover instead of click. */\n hoverable?: boolean;\n /** Disables the dropdown trigger. */\n disabled?: boolean;\n /** Callback when dropdown active state changes. */\n onActiveChange?: (active: boolean) => void;\n /** Close dropdown when a menu item is clicked. */\n closeOnClick?: boolean;\n /** Root element ID (for aria-controls, etc). */\n id?: string;\n}\n\n/**\n * The `Dropdown` component provides Bulma's versatile dropdown menu for your Bulma React UI.\n *\n * @function\n * @param {DropdownProps} props - Props for the Dropdown component.\n * @param {React.Ref<HTMLDivElement>} ref - Forwarded ref to the root dropdown element.\n * @returns {JSX.Element} The rendered dropdown.\n * @see {@link https://bulma.io/documentation/components/dropdown/ | Bulma Dropdown documentation}\n */\nconst DropdownComponent = forwardRef<HTMLDivElement, DropdownProps>(\n function DropdownComponent(\n {\n label,\n children,\n className,\n menuClassName,\n active: activeProp,\n up,\n right,\n hoverable,\n disabled,\n onActiveChange,\n closeOnClick = true,\n id,\n ...props\n },\n ref\n ) {\n const [active, setActive] = useState<boolean>(!!activeProp);\n const dropdownRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n const pendingFocusRef = useRef<'first' | 'last' | null>(null);\n\n // Cleanup returned by a consumer's callback ref on attach, held until detach.\n const consumerCleanupRef = useRef<(() => void) | null>(null);\n\n const setRefs = useCallback(\n (node: HTMLDivElement | null) => {\n (dropdownRef as React.MutableRefObject<HTMLDivElement | null>).current =\n node;\n if (typeof ref === 'function') {\n // React 19 lets a callback ref return a cleanup function and detaches\n // by running it instead of calling the ref with `null`; React 18\n // discards the return value entirely. Returning it from here would be\n // a React-19-only contract, so instead we hold the cleanup and run it\n // ourselves on detach — a consumer's cleanup ref then behaves the same\n // on both majors of the CI matrix.\n if (node === null) {\n const consumerCleanup = consumerCleanupRef.current;\n consumerCleanupRef.current = null;\n if (consumerCleanup) {\n consumerCleanup();\n } else {\n ref(null);\n }\n return;\n }\n const cleanup: unknown = ref(node);\n consumerCleanupRef.current =\n typeof cleanup === 'function' ? (cleanup as () => void) : null;\n } else if (ref) {\n (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n }\n },\n [ref]\n );\n\n const { bulmaHelperClasses, rest } = useBulmaClasses(props);\n\n // Generate Bulma classes with prefix\n const bulmaClasses = usePrefixedClassNames('dropdown', {\n 'is-active': active,\n 'is-up': up,\n 'is-right': right,\n 'is-hoverable': hoverable,\n 'is-disabled': disabled,\n });\n\n const buttonClass = usePrefixedClassNames('button');\n\n // Controlled mode support: mirror the controlled `active` prop into local\n // state. This is an intentional external-prop sync (controlled/uncontrolled\n // hybrid); behavior is covered by tests and certified in-browser.\n useEffect(() => {\n // eslint-disable-next-line react-hooks/set-state-in-effect -- syncing to controlled prop\n if (typeof activeProp === 'boolean') setActive(activeProp);\n }, [activeProp]);\n\n // SSR-safe outside click\n useEffect(() => {\n if (!active) return;\n\n if (!isBrowser(window, document)) return;\n\n const handleClick = (e: MouseEvent) => {\n /* istanbul ignore next: dropdownRef.current is never null while the listener is attached */\n if (!dropdownRef.current?.contains(e.target as Node)) {\n setActive(false);\n onActiveChange?.(false);\n }\n };\n document.addEventListener('mousedown', handleClick);\n return () => document.removeEventListener('mousedown', handleClick);\n }, [active, onActiveChange]);\n\n const handleToggle = () => {\n /* istanbul ignore next: guard is enforced by button[disabled] at the DOM level */\n if (disabled) return;\n\n const newActive = !active;\n setActive(newActive);\n onActiveChange?.(newActive);\n };\n\n const handleMenuClick = () => {\n if (closeOnClick) {\n setActive(false);\n onActiveChange?.(false);\n }\n };\n\n const getMenuItems = (): HTMLElement[] => {\n /* istanbul ignore next: dropdownRef.current is never null once mounted */\n if (!dropdownRef.current) return [];\n return Array.from(\n dropdownRef.current.querySelectorAll<HTMLElement>('[role=\"menuitem\"]')\n ).filter(\n el =>\n !el.hasAttribute('disabled') &&\n el.getAttribute('aria-disabled') !== 'true'\n );\n };\n\n // Focus the pending menu item once the menu becomes visible; the item is\n // unfocusable while `display: none` applies, so this must wait for the\n // `is-active` class to actually land in the DOM.\n useEffect(() => {\n if (!active || !pendingFocusRef.current) return;\n const items = getMenuItems();\n if (items.length) {\n const index =\n pendingFocusRef.current === 'first' ? 0 : items.length - 1;\n items[index].focus();\n }\n pendingFocusRef.current = null;\n }, [active]);\n\n const handleTriggerKeyDown = (\n e: React.KeyboardEvent<HTMLButtonElement>\n ) => {\n if (disabled) return;\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault();\n pendingFocusRef.current = 'first';\n if (!active) {\n setActive(true);\n onActiveChange?.(true);\n } else {\n const items = getMenuItems();\n if (items.length) items[0].focus();\n pendingFocusRef.current = null;\n }\n break;\n case 'ArrowUp':\n e.preventDefault();\n pendingFocusRef.current = 'last';\n if (!active) {\n setActive(true);\n onActiveChange?.(true);\n } else {\n const items = getMenuItems();\n if (items.length) items[items.length - 1].focus();\n pendingFocusRef.current = null;\n }\n break;\n case 'Enter':\n case ' ':\n e.preventDefault();\n if (!active) {\n pendingFocusRef.current = 'first';\n setActive(true);\n onActiveChange?.(true);\n } else {\n setActive(false);\n onActiveChange?.(false);\n }\n break;\n case 'Escape':\n if (active) {\n e.preventDefault();\n setActive(false);\n onActiveChange?.(false);\n }\n break;\n default:\n break;\n }\n };\n\n const handleMenuKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n // Escape and Tab close the menu regardless of whether it has any focusable\n // items — an empty or all-disabled menu must still honor the close contract.\n if (e.key === 'Escape') {\n e.preventDefault();\n setActive(false);\n onActiveChange?.(false);\n triggerRef.current?.focus();\n return;\n }\n if (e.key === 'Tab') {\n setActive(false);\n onActiveChange?.(false);\n return;\n }\n\n const items = getMenuItems();\n if (!items.length) return;\n const currentIndex = items.indexOf(document.activeElement as HTMLElement);\n switch (e.key) {\n case 'ArrowDown': {\n e.preventDefault();\n const next =\n currentIndex >= 0 ? (currentIndex + 1) % items.length : 0;\n items[next].focus();\n break;\n }\n case 'ArrowUp': {\n e.preventDefault();\n const prev =\n currentIndex >= 0\n ? (currentIndex - 1 + items.length) % items.length\n : items.length - 1;\n items[prev].focus();\n break;\n }\n case 'Home':\n e.preventDefault();\n items[0].focus();\n break;\n case 'End':\n e.preventDefault();\n items[items.length - 1].focus();\n break;\n default:\n break;\n }\n };\n\n const dropdownClasses = classNames(\n bulmaClasses,\n bulmaHelperClasses,\n className\n );\n\n return (\n <div\n className={dropdownClasses}\n ref={setRefs}\n id={id}\n data-testid=\"dropdown-root\"\n {...rest}\n >\n <div className={usePrefixedClassNames('dropdown-trigger')}>\n <button\n ref={triggerRef}\n className={buttonClass}\n aria-haspopup=\"true\"\n aria-controls={id ? `${id}-menu` : undefined}\n aria-expanded={active}\n onClick={handleToggle}\n onKeyDown={handleTriggerKeyDown}\n disabled={disabled}\n type=\"button\"\n >\n <span>{label}</span>\n <span\n className={usePrefixedClassNames('icon', 'is-small')}\n aria-hidden=\"true\"\n >\n <i className=\"fas fa-angle-down\" />\n </span>\n </button>\n </div>\n <div\n className={classNames(\n usePrefixedClassNames('dropdown-menu'),\n menuClassName\n )}\n id={id ? `${id}-menu` : undefined}\n role=\"menu\"\n data-testid=\"dropdown-menu\"\n onKeyDown={handleMenuKeyDown}\n >\n <div\n className={usePrefixedClassNames('dropdown-content')}\n onClick={handleMenuClick}\n tabIndex={-1}\n >\n {children}\n </div>\n </div>\n </div>\n );\n }\n);\n\n/**\n * The elements a dropdown item may render as. Bulma's dropdown markup names\n * these three and no others, so `as` is a closed set rather than an open\n * `React.ElementType`.\n */\nexport type DropdownItemElement = 'a' | 'div' | 'button';\n\n/**\n * The DropdownItem component's own props.\n */\nexport interface DropdownItemOwnProps extends BulmaClassesProps {\n /** Whether the item is active. */\n active?: boolean;\n /** Additional CSS classes. */\n className?: string;\n /** Marks the item as disabled; disabled items are skipped during keyboard navigation. Use with `as=\"button\"` for a native disabled control, or pair with `aria-disabled` on a link. */\n disabled?: boolean;\n /** Item content. */\n children?: React.ReactNode;\n}\n\n/**\n * Props for the DropdownItem component. Everything the item does not own\n * follows `as`: `href`, `target` and `rel` under the default `'a'`, `type` and\n * `form` under `'button'`, and the shared HTML attributes under any of them.\n *\n * Pinning these to `React.HTMLAttributes<HTMLElement>` instead — which is what\n * this type did before — rejected `href` on an anchor and `type` on a button,\n * both of which have always worked at runtime. Same defect as #641, in the\n * narrower shape a constrained `as` takes.\n *\n * **Name the tag you mean.** The type parameter defaults to the whole union, not\n * to the rendered element, so bare `DropdownItemProps` keeps accepting\n * `{ as: 'div' }` the way it always has. The cost is that it is not\n * distributive: `Omit` over a union keeps only the shared keys, so the bare\n * alias carries no `href` even though the component takes one under `as=\"a\"`.\n * Write `DropdownItemProps<'a'>` for the anchor's props. That is the #667 alias\n * limitation Button carries, labelled next-major because closing it is\n * source-breaking, and pinned for this component in\n * `__typetests__/polymorphic.tsx`; the component itself is unaffected.\n */\nexport type DropdownItemProps<\n T extends DropdownItemElement = DropdownItemElement,\n> = DropdownItemOwnProps &\n Omit<React.ComponentPropsWithoutRef<T>, keyof DropdownItemOwnProps | 'as'> & {\n /** The element type to render. */\n as?: T;\n };\n\n/**\n * The anchor's attributes, minus the one a `<button>` legitimately takes.\n *\n * `type` stays: `as=\"button\"` is a supported form and `type=\"submit\"` is valid\n * there, so stripping it would remove a working attribute. The exclusion is per\n * COMPONENT where the reason is per TAG, so it also lets a `type` reach a\n * `<div>`; selecting the set from the rendered element would close that, and\n * moves output.\n *\n * This set differs from `Level.Item`'s in both directions, not just one. The\n * `type` above, which Level strips and this component keeps, and `rel`, which\n * Level adds and this component does not: React declares `rel` on\n * `HTMLAttributes` for every element, so withholding it would diverge from\n * React's own typing — the call #641 recorded for `Navbar.Link`. Level\n * withholds it anyway, because it always has.\n */\nconst STRIP_FROM_NON_ANCHOR: Readonly<\n Record<Exclude<keyof AnchorOnlyAttributes, 'type'>, true>\n> = (() => {\n const { type: _type, ...rest } = ANCHOR_ONLY_ATTRS;\n return rest;\n})();\n\n/**\n * The shape the implementation destructures. The public contract is the generic\n * `DropdownItemProps<T>` above — the body cannot see through `T`.\n */\ntype DropdownItemImplProps = DropdownItemOwnProps & {\n as?: DropdownItemElement;\n};\n\n/**\n * Bulma Dropdown item.\n *\n * @function\n * @param {DropdownItemProps} props - Props for the DropdownItem component.\n * @returns {JSX.Element} The rendered dropdown item.\n */\nexport const DropdownItem = ((itemProps: DropdownItemProps) => {\n const {\n children,\n active,\n className,\n as: Component = 'a',\n ...props\n } = itemProps as DropdownItemImplProps;\n const { bulmaHelperClasses, rest } = useBulmaClasses(props);\n // The anchor's attributes reach an anchor and nothing else — `<div href>` and\n // `<button target>` are invalid HTML. The same rule Menu applies, for the same\n // reason: the type now derives these from `as`, and deriving them must not\n // quietly widen where they land. The type stops a direct caller; this stops a\n // plain-JS one, a loose `{...props}` spread, and the genericity a wrapping HOC\n // erases.\n //\n // The whole link set, not `href` alone: they all arrive together under\n // `as=\"a\"`. Menu strips `href` only, because its `as` is open and a flat set\n // would delete attributes legal on the element a caller named.\n //\n // `bestax-migrate` tracks the same question from the other side, per attribute\n // per element (`LINK_ATTR_ELEMENTS`) rather than as one set — so the two lists\n // are not interchangeable and neither derives from the other.\n //\n // Menu's condition also admits a custom component and a custom element, which\n // own their prop contracts. `as` is closed to three intrinsic tags here, so\n // neither can arrive and the anchor test is the whole rule.\n const forwarded =\n Component === 'a' ? rest : omitAttrs(rest, STRIP_FROM_NON_ANCHOR);\n return (\n <Component\n className={classNames(\n usePrefixedClassNames('dropdown-item', {\n 'is-active': active,\n }),\n bulmaHelperClasses,\n className\n )}\n tabIndex={0}\n role=\"menuitem\"\n data-testid=\"dropdown-item\"\n {...forwarded}\n // A menu item inside a form must not submit it. `<button>` defaults to\n // type=\"submit\", and a filter or sort menu sitting in a form is ordinary.\n // Dropdown's own trigger sets it. `Avatar` and `Menu.Item` do NOT get this\n // right — Avatar spreads its default BEFORE `rest`, so `type={undefined}`\n // arriving through a spread erases it, and Menu defaults none at all.\n //\n // After `forwarded`, reading through it rather than before it: React\n // treats `type={undefined}` as \"remove the attribute\", and a spread\n // carrying an absent key is how that arrives. Spreading the default first\n // let such a spread erase it and restore the submit behaviour, so the\n // guard only held for callers who passed nothing.\n {...(Component === 'button'\n ? {\n type:\n (\n forwarded as {\n type?: React.ButtonHTMLAttributes<HTMLButtonElement>['type'];\n }\n ).type ?? 'button',\n }\n : {})}\n >\n {children}\n </Component>\n );\n}) as ConstrainedPolymorphicComponentWithoutRef<\n DropdownItemOwnProps,\n DropdownItemElement,\n 'a'\n>;\n\n/**\n * Bulma Dropdown divider.\n *\n * @function\n * @returns {JSX.Element} The rendered divider element.\n */\nexport const DropdownDivider: React.FC = () => (\n <hr className={usePrefixedClassNames('dropdown-divider')} />\n);\n\n/** Bulma Dropdown component with Item and Divider sub-components. */\nexport const Dropdown = withSubComponents(\n DropdownComponent,\n {\n Item: DropdownItem,\n Divider: DropdownDivider,\n },\n 'Dropdown'\n);\n\nexport default Dropdown;\n","import React, { createContext, forwardRef, useContext } from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport { omitAttrs } from '../helpers/anchorAttrs';\nimport {\n isCustomElement,\n type PolymorphicComponent,\n} from '../helpers/polymorphic';\n\n// Context to track MenuList nesting level\nconst MenuListLevelContext = createContext(0);\n\n/**\n * Props for the Menu component.\n */\nexport interface MenuProps\n extends\n Omit<React.HTMLAttributes<HTMLElement>, keyof BulmaClassesProps>,\n BulmaClassesProps {\n /** Additional CSS classes. */\n className?: string;\n /** Menu content (labels, lists, items, etc). */\n children: React.ReactNode;\n}\n\n/**\n * The `Menu` component provides Bulma's vertical navigation menu: a simple, accessible sidebar or section menu for your Bulma React UI.\n *\n * @function\n * @param {MenuProps} props - Props for the Menu component.\n * @returns {JSX.Element} The rendered menu.\n * @see {@link https://bulma.io/documentation/components/menu/ | Bulma Menu documentation}\n */\nconst MenuComponent: React.FC<MenuProps> = ({\n className,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses(props);\n\n // Generate Bulma classes with prefix\n const bulmaClasses = usePrefixedClassNames('menu');\n\n return (\n <aside\n className={classNames(bulmaClasses, bulmaHelperClasses, className)}\n {...rest}\n >\n {children}\n </aside>\n );\n};\n\n/**\n * Props for the MenuLabel component.\n */\nexport interface MenuLabelProps\n extends\n Omit<React.HTMLAttributes<HTMLParagraphElement>, keyof BulmaClassesProps>,\n BulmaClassesProps {\n /** Additional CSS classes. */\n className?: string;\n /** Label content. */\n children: React.ReactNode;\n}\n\n/**\n * Bulma Menu label component.\n *\n * @function\n * @param {MenuLabelProps} props - Props for the MenuLabel component.\n * @returns {JSX.Element} The rendered menu label.\n */\nexport const MenuLabel: React.FC<MenuLabelProps> = ({\n className,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses(props);\n\n return (\n <p\n className={classNames(\n usePrefixedClassNames('menu-label'),\n className,\n bulmaHelperClasses\n )}\n {...rest}\n >\n {children}\n </p>\n );\n};\n\n/**\n * Props for the MenuList component.\n */\nexport interface MenuListProps\n extends\n Omit<React.HTMLAttributes<HTMLUListElement>, keyof BulmaClassesProps>,\n BulmaClassesProps {\n /** Additional CSS classes. */\n className?: string;\n /** List items. */\n children: React.ReactNode;\n}\n\n/**\n * MenuList applies `menu-list` class only at the top level (not for nested lists).\n *\n * @function\n * @param {MenuListProps} props - Props for the MenuList component.\n * @returns {JSX.Element} The rendered menu list.\n */\nexport const MenuList: React.FC<MenuListProps> = ({\n className,\n children,\n ...props\n}) => {\n const level = useContext(MenuListLevelContext);\n const { bulmaHelperClasses, rest } = useBulmaClasses(props);\n\n const ulClass = classNames(className, bulmaHelperClasses, {\n [usePrefixedClassNames('menu-list')]: level === 0,\n });\n\n // Increment level for nested MenuLists\n return (\n <MenuListLevelContext.Provider value={level + 1}>\n <ul className={ulClass} {...rest}>\n {children}\n </ul>\n </MenuListLevelContext.Provider>\n );\n};\n\n/**\n * The MenuItem component's own props.\n *\n * A menu item is two elements: a wrapping `<li>` and, inside it, the element\n * `as` names. The props here are the ones the `<li>` consumes; everything else\n * follows `as` onto the inner element.\n */\nexport interface MenuItemOwnProps extends BulmaClassesProps {\n /** Additional CSS classes for the wrapping `<li>`. */\n className?: string;\n /** Item content and optional nested MenuList. */\n children: React.ReactNode;\n /** Highlight item as active. */\n active?: boolean;\n /** Inline styles for the wrapping `<li>`. */\n style?: React.CSSProperties;\n /** `id` for the wrapping `<li>`. */\n id?: string;\n /** `title` for the wrapping `<li>`. */\n title?: string;\n /** ARIA role for the wrapping `<li>`. */\n role?: React.AriaRole;\n /** Tab index for the wrapping `<li>`. */\n tabIndex?: number;\n /** Test id for the wrapping `<li>`. */\n 'data-testid'?: string;\n}\n\n/**\n * Props for the MenuItem component. Everything the `<li>` does not consume\n * follows `as` onto the inner element: with the default `'a'` that means `href`\n * and the other anchor attributes, and with `as={Link}` it means that\n * component's own props.\n *\n * @extraProp {PolymorphicRef<React.ElementType>} [ref] - Ref forwarded to the inner element `as` renders, not the wrapping `<li>`, typed from `as`: the DOM node for an intrinsic tag, or whatever handle a custom component exposes.\n */\nexport type MenuItemProps<T extends React.ElementType = 'a'> =\n MenuItemOwnProps &\n Omit<React.ComponentPropsWithoutRef<T>, keyof MenuItemOwnProps | 'as'> & {\n /** Custom link component (e.g. `Link` from router). */\n as?: T;\n };\n\n/**\n * `href` alone — annotated so a typo is a compile error rather than a silent\n * no-op, the way both siblings' sets are.\n */\nconst STRIP_FROM_NON_LINK: Readonly<Record<'href', true>> = { href: true };\n\n/**\n * The shape the implementation destructures. The public contract is the generic\n * `MenuItemProps<T>` above — the body cannot see through `T`.\n */\ntype MenuItemImplProps = MenuItemOwnProps & { as?: React.ElementType };\n\n/**\n * MenuItem supports `as` prop for custom link components, e.g., react-router-dom Link.\n *\n * @function\n * @param {MenuItemProps} props - Props for the MenuItem component.\n * @param {React.Ref} ref - Forwarded ref to the inner element `as` renders.\n * @returns {JSX.Element} The rendered menu item.\n */\nexport const MenuItem = forwardRef(function MenuItem(\n itemProps: MenuItemProps,\n ref: React.Ref<HTMLElement>\n) {\n const {\n className,\n children,\n active,\n as: Component = 'a',\n 'data-testid': testId,\n style,\n id,\n title,\n role,\n tabIndex,\n ...rest\n } = itemProps as MenuItemImplProps;\n const { bulmaHelperClasses, rest: forwarded } = useBulmaClasses(rest);\n // `href` reaches an anchor or a custom component (which owns its own prop\n // contract), but not another intrinsic tag — `<span href>` is invalid HTML.\n // The same rule Avatar applies through `isLinkLike` and Button through its\n // intrinsic-only strip. Before #641 `href` was an own prop re-applied only\n // for `as=\"a\"`; deriving it from `as` must not quietly widen that.\n const isLinkLike =\n Component === 'a' ||\n typeof Component !== 'string' ||\n isCustomElement(Component);\n // `href` ALONE. `Dropdown.Item` strips every anchor-only attribute except\n // `type`; `Level.Item` strips all of them, plus `rel`.\n //\n // Not because nothing else can arrive: `as` here is an open `React.ElementType`,\n // and a non-fresh spread skips excess-property checking, so a typed caller\n // CAN deliver `target` or `download` and they are forwarded. The set stays at\n // `href` because widening it would be wrong for an open `as` — `referrerPolicy`\n // on `as=\"img\"`, `target` on `as=\"form\"` and `media` on `as=\"source\"` are all\n // legal, and a flat strip would delete them. Getting that right needs a\n // per-attribute-per-element rule, which `bestax-migrate` already models in\n // `LINK_ATTR_ELEMENTS`.\n const linkProps = isLinkLike\n ? forwarded\n : omitAttrs(forwarded, STRIP_FROM_NON_LINK);\n const itemClass = classNames(\n { [usePrefixedClassNames('is-active')]: active },\n bulmaHelperClasses\n );\n\n // Split children into label and nested MenuList(s)\n const labelChildren: React.ReactNode[] = [];\n const nestedMenuLists: React.ReactNode[] = [];\n React.Children.forEach(children, child => {\n if (React.isValidElement(child) && child.type === MenuList) {\n nestedMenuLists.push(child);\n } else {\n labelChildren.push(child);\n }\n });\n\n return (\n <li\n className={className}\n data-testid={testId}\n style={style}\n id={id}\n title={title}\n role={role}\n tabIndex={tabIndex}\n >\n <Component ref={ref} className={itemClass} {...linkProps}>\n {labelChildren}\n </Component>\n {nestedMenuLists}\n </li>\n );\n}) as PolymorphicComponent<MenuItemOwnProps, 'a'>;\n\nMenuItem.displayName = 'MenuItem';\n\n// Attach static subcomponents\nexport const Menu = withSubComponents(\n MenuComponent,\n {\n Label: MenuLabel,\n List: MenuList,\n Item: MenuItem,\n },\n 'Menu'\n);\n\nexport default Menu;\n","import React from 'react';\nimport {\n classNames,\n usePrefixedClassNames,\n prefixedClassNames,\n} from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\nimport { useConfig } from '../helpers/Config';\n\nconst validMessageSizes = ['small', 'medium', 'large'] as const;\n/**\n * Valid size values for the Message component (Bulma message sizes).\n */\nexport type MessageSize = (typeof validMessageSizes)[number];\n\n/**\n * Props for the Message component.\n */\nexport interface MessageProps\n extends\n Omit<React.HTMLAttributes<HTMLElement>, 'title'>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'> {\n /** Additional CSS classes. */\n className?: string;\n /** Title string/node (renders header section). */\n title?: React.ReactNode;\n /** Text color for the message (Bulma helper). */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Bulma color modifier for the message. */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Background color for the message (Bulma helper). */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Size of the message. */\n size?: MessageSize;\n /** Callback for the close (\"X\") button. */\n onClose?: () => void;\n /** Body content for the message. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Message` component provides Bulma's flexible notice/message box for your Bulma React UI.\n *\n * @function\n * @param {MessageProps} props - Props for the Message component.\n * @returns {JSX.Element} The rendered message.\n * @see {@link https://bulma.io/documentation/components/message/ | Bulma Message documentation}\n */\nconst MessageComponent: React.FC<MessageProps> = ({\n className,\n title,\n textColor,\n color,\n bgColor,\n size,\n onClose,\n children,\n ...props\n}) => {\n const { classPrefix } = useConfig();\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n });\n\n // Generate Bulma classes with prefix\n const bulmaClasses = usePrefixedClassNames('message', {\n [`is-${color}`]: color,\n [`is-${size}`]: size && validMessageSizes.includes(size),\n });\n const deleteClass = usePrefixedClassNames('delete');\n\n const messageClasses = classNames(\n bulmaClasses,\n bulmaHelperClasses,\n className\n );\n\n return (\n <article className={messageClasses} {...rest} data-testid=\"message\">\n {(title || onClose) && (\n <div className={prefixedClassNames(classPrefix, 'message-header')}>\n {title && <span>{title}</span>}\n {onClose && (\n <button\n className={deleteClass}\n aria-label=\"delete\"\n onClick={onClose}\n type=\"button\"\n data-testid=\"message-close\"\n />\n )}\n </div>\n )}\n {children && (\n <div\n className={prefixedClassNames(classPrefix, 'message-body')}\n data-testid=\"message-body\"\n >\n {children}\n </div>\n )}\n </article>\n );\n};\n\n// Compound components for flexible composition\n\n/**\n * Props for the Message.Header compound component.\n */\nexport interface MessageHeaderProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Additional CSS classes. */\n className?: string;\n /** Header content (title, close button, etc.). */\n children?: React.ReactNode;\n}\n\n/**\n * Props for the Message.Body compound component.\n */\nexport interface MessageBodyProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Additional CSS classes. */\n className?: string;\n /** Message body content. */\n children?: React.ReactNode;\n}\n\n/**\n * Message header compound component. Renders a `.message-header` element.\n *\n * @function\n * @param {MessageHeaderProps} props - Props for the MessageHeader component.\n * @returns {JSX.Element} The rendered message header.\n */\nconst MessageHeader: React.FC<MessageHeaderProps> = ({\n className,\n children,\n ...props\n}) => (\n <div\n className={classNames(usePrefixedClassNames('message-header'), className)}\n {...props}\n >\n {children}\n </div>\n);\n\n/**\n * Message body compound component. Renders a `.message-body` element.\n *\n * @function\n * @param {MessageBodyProps} props - Props for the MessageBody component.\n * @returns {JSX.Element} The rendered message body.\n */\nconst MessageBody: React.FC<MessageBodyProps> = ({\n className,\n children,\n ...props\n}) => (\n <div\n className={classNames(usePrefixedClassNames('message-body'), className)}\n {...props}\n >\n {children}\n </div>\n);\n\n// Attach compound components\nexport const Message = withSubComponents(\n MessageComponent,\n {\n Header: MessageHeader,\n Body: MessageBody,\n },\n 'Message'\n);\n\nexport default Message;\n","import { useEffect } from 'react';\n\n// Ref-counted across every caller (e.g. a Dialog rendering its own Modal)\n// so overlapping/nested locks don't fight over which one restores `overflow`.\n// Every overlay that locks body scroll — Modal, Dialog, Sidebar, Loading —\n// goes through here; a component setting `document.body.style.overflow`\n// itself would clear a lock another overlay still needs.\nlet lockCount = 0;\nlet originalOverflow = '';\n\n/**\n * Locks (and ref-counted-ly unlocks) `document.body` scrolling while `active`\n * is true. Safe to call from multiple components at once — the body scroll\n * is only restored once every active caller has released its lock.\n *\n * @function useScrollLock\n * @param active - Whether this caller wants the body scroll locked.\n */\nexport function useScrollLock(active: boolean): void {\n useEffect(() => {\n if (!active) return undefined;\n\n lockCount++;\n if (lockCount === 1) {\n originalOverflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n }\n\n return () => {\n lockCount--;\n if (lockCount === 0) {\n document.body.style.overflow = originalOverflow;\n }\n };\n }, [active]);\n}\n","/**\n * Resolves a portal target: an `HTMLElement` is used directly, a non-empty\n * `string` is treated as a `document.querySelector` selector (falling back to\n * `document.body` when it matches nothing), and any falsy value — `undefined`\n * or the empty string — resolves to `document.body`.\n *\n * The empty string is deliberately treated as \"no target\" rather than passed\n * through: `document.querySelector('')` throws a `SyntaxError`, and callers\n * building a selector from state can easily hand us `''`.\n *\n * @function resolvePortalContainer\n * @param container - The requested portal target, if any.\n * @returns The resolved DOM node to portal into.\n */\nexport function resolvePortalContainer(\n container?: string | HTMLElement\n): HTMLElement {\n if (!container) {\n return document.body;\n }\n if (typeof container === 'string') {\n return (\n (document.querySelector(container) as HTMLElement | null) ?? document.body\n );\n }\n return container;\n}\n","import { useSyncExternalStore } from 'react';\n\n// \"Are we past hydration?\" as a store that never changes: React reads the\n// server snapshot both while server-rendering and while hydrating, and the\n// client snapshot from the first post-hydration render onward.\nconst subscribeToNothing = () => () => {};\nconst getClientSnapshot = () => true;\nconst getServerSnapshot = () => false;\n\n/**\n * Reports whether the component has passed hydration.\n *\n * Returns `false` during server rendering and during the hydrating client\n * render, then `true` from the commit that follows. Use it to defer\n * DOM-only behaviour (such as portalling) past hydration so the first client\n * render matches the server markup instead of tripping hydration recovery.\n *\n * @function useIsHydrated\n * @returns `true` once the hydrating render has completed, otherwise `false`.\n */\nexport function useIsHydrated(): boolean {\n return useSyncExternalStore(\n subscribeToNothing,\n getClientSnapshot,\n getServerSnapshot\n );\n}\n","import React, {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useRef,\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport {\n classNames,\n usePrefixedClassNames,\n prefixedClassNames,\n} from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\nimport { useConfig } from '../helpers/Config';\nimport { useScrollLock } from '../helpers/scrollLock';\nimport { resolvePortalContainer } from '../helpers/portal';\nimport { useIsHydrated } from '../helpers/useIsHydrated';\n\n/**\n * Every currently active modal, in the order they opened. Only the last entry\n * — the topmost modal — reacts to Escape and Tab, so one keypress can't\n * dismiss a whole stack (e.g. a `Dialog` opened on top of a `Modal`).\n */\nconst activeModalStack: object[] = [];\n\n/**\n * Controls the modal can hand focus to. Disabled and hidden controls are\n * excluded because `focus()` on them is a no-op, which would leave focus\n * outside the modal.\n */\nconst FOCUSABLE_SELECTOR =\n 'button:not(:disabled), [href], input:not(:disabled):not([type=\"hidden\"]), select:not(:disabled), textarea:not(:disabled), [tabindex]';\n\n/**\n * The modal's tab stops, in document order. The selector alone is not the\n * tabbable set — `[href]` and `button` match regardless of `tabindex`, so an\n * `<a href tabIndex={-1}>` would otherwise be treated as a tab stop and let\n * Tab escape the modal when it sorts last. `el.tabIndex` is the browser's own\n * resolved value, so filtering on it drops every negative index (not just\n * `-1`) without a second selector to keep in sync.\n */\nconst getTabbable = (node: HTMLElement): HTMLElement[] =>\n Array.from(node.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR)).filter(\n el => el.tabIndex >= 0\n );\n\n/**\n * Props for the Modal component.\n * @extraProp {React.Ref<HTMLDivElement>} [ref] - Ref forwarded to the root `.modal` element.\n */\nexport interface ModalProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, 'color' | 'title'>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Whether the modal is open/visible. */\n active?: boolean;\n /** Alias for `active`. Whether the modal is open/visible. */\n isActive?: boolean; // Alias for active\n /** Callback invoked to request modal close (background or close button). */\n onClose?: () => void;\n /** Additional CSS classes for the modal. */\n className?: string;\n /** Text color for modal content. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color for modal content. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Title/header for modal-card variant. (Legacy API only) */\n modalCardTitle?: React.ReactNode;\n /** Footer for modal-card variant. (Legacy API only) */\n modalCardFoot?: React.ReactNode;\n /**\n * Modal style: `'card'` for modal-card, `'content'` for modal-content. (Legacy API only)\n * @defaultValue auto\n */\n type?: 'card' | 'content';\n /** Modal body/content or compound components. */\n children?: React.ReactNode;\n /**\n * Close the modal when the Escape key is pressed (calls `onClose`). Only the\n * topmost open modal responds, so Escape closes one layer at a time.\n * @defaultValue true\n */\n closeOnEscape?: boolean;\n /**\n * Lock body scroll while the modal is active. Ref-counted and shared with\n * `Dialog`, `Sidebar` and `Loading`, so whichever overlay closes first does\n * not unlock the page underneath one that is still open.\n * @defaultValue true\n */\n lockScroll?: boolean;\n /**\n * Renders the modal into a portal target instead of inline, so it isn't\n * clipped by an ancestor with `overflow: hidden`, `filter` or `transform`.\n * `true` portals to `document.body`; a string is used as a\n * `document.querySelector` selector; an element is used directly. Renders\n * inline on the server and while hydrating, moving into the portal once the\n * client takes over, so hydration matches.\n * @defaultValue false\n */\n portal?: boolean | string | HTMLElement;\n}\n\n/**\n * Props for Modal.Background component.\n */\nexport interface ModalBackgroundProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Additional CSS classes. */\n className?: string;\n}\n\n/**\n * Props for Modal.Content component.\n */\nexport interface ModalContentProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Additional CSS classes. */\n className?: string;\n}\n\n/**\n * Props for Modal.Card component.\n */\nexport interface ModalCardProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Additional CSS classes. */\n className?: string;\n}\n\n/**\n * Props for Modal.Card.Head component.\n */\nexport interface ModalCardHeadProps extends React.HTMLAttributes<HTMLElement> {\n /** Additional CSS classes. */\n className?: string;\n}\n\n/**\n * Props for Modal.Card.Title component.\n */\nexport interface ModalCardTitleProps extends React.HTMLAttributes<HTMLParagraphElement> {\n /** Additional CSS classes. */\n className?: string;\n}\n\n/**\n * Props for Modal.Card.Body component.\n */\nexport interface ModalCardBodyProps extends React.HTMLAttributes<HTMLElement> {\n /** Additional CSS classes. */\n className?: string;\n}\n\n/**\n * Props for Modal.Card.Foot component.\n */\nexport interface ModalCardFootProps extends React.HTMLAttributes<HTMLElement> {\n /** Additional CSS classes. */\n className?: string;\n}\n\n/**\n * Props for Modal.Close component.\n */\nexport interface ModalCloseProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** Additional CSS classes. */\n className?: string;\n /** Size of the close button (only applies to 'floating' variant). */\n size?: 'small' | 'medium' | 'large';\n /** Button variant. 'delete' (default) for modal card headers, 'floating' for overlay close button. */\n variant?: 'delete' | 'floating';\n}\n\n/**\n * Modal.Background - Renders the modal background overlay.\n *\n * @function\n * @param {ModalBackgroundProps} props - Component props.\n * @returns {JSX.Element} Modal background element.\n */\nconst ModalBackground: React.FC<ModalBackgroundProps> = ({\n className,\n ...props\n}) => {\n const classes = classNames(\n usePrefixedClassNames('modal-background'),\n className\n );\n return <div className={classes} {...props} />;\n};\n\n/**\n * Modal.Content - Renders modal content wrapper for custom content.\n *\n * @function\n * @param {ModalContentProps} props - Component props.\n * @returns {JSX.Element} Modal content element.\n */\nconst ModalContent: React.FC<ModalContentProps> = ({ className, ...props }) => {\n const classes = classNames(usePrefixedClassNames('modal-content'), className);\n return <div className={classes} {...props} />;\n};\n\n/**\n * Modal.Card.Head - Renders modal card header section.\n *\n * @function\n * @param {ModalCardHeadProps} props - Component props.\n * @returns {JSX.Element} Modal card header element.\n */\nconst ModalCardHead: React.FC<ModalCardHeadProps> = ({\n className,\n ...props\n}) => {\n const classes = classNames(\n usePrefixedClassNames('modal-card-head'),\n className\n );\n return <header className={classes} {...props} />;\n};\n\n/**\n * Modal.Card.Title - Renders modal card title.\n *\n * @function\n * @param {ModalCardTitleProps} props - Component props.\n * @returns {JSX.Element} Modal card title element.\n */\nconst ModalCardTitle: React.FC<ModalCardTitleProps> = ({\n className,\n ...props\n}) => {\n const classes = classNames(\n usePrefixedClassNames('modal-card-title'),\n className\n );\n return <p className={classes} {...props} />;\n};\n\n/**\n * Modal.Card.Body - Renders modal card body section.\n *\n * @function\n * @param {ModalCardBodyProps} props - Component props.\n * @returns {JSX.Element} Modal card body element.\n */\nconst ModalCardBody: React.FC<ModalCardBodyProps> = ({\n className,\n ...props\n}) => {\n const classes = classNames(\n usePrefixedClassNames('modal-card-body'),\n className\n );\n return <section className={classes} {...props} />;\n};\n\n/**\n * Modal.Card.Foot - Renders modal card footer section.\n *\n * @function\n * @param {ModalCardFootProps} props - Component props.\n * @returns {JSX.Element} Modal card footer element.\n */\nconst ModalCardFoot: React.FC<ModalCardFootProps> = ({\n className,\n ...props\n}) => {\n const classes = classNames(\n usePrefixedClassNames('modal-card-foot'),\n className\n );\n return <footer className={classes} {...props} />;\n};\n\n/**\n * Modal.Card - Renders modal card wrapper with compound components.\n * Use with Modal.Card.Head, Modal.Card.Title, Modal.Card.Body, and Modal.Card.Foot.\n *\n * @function\n * @param {ModalCardProps} props - Component props.\n * @returns {JSX.Element} Modal card element.\n */\nconst ModalCardComponent: React.FC<ModalCardProps> = ({\n className,\n ...props\n}) => {\n const classes = classNames(usePrefixedClassNames('modal-card'), className);\n return <div className={classes} {...props} />;\n};\n\nconst ModalCard = withSubComponents(ModalCardComponent, {\n Head: ModalCardHead,\n Title: ModalCardTitle,\n Body: ModalCardBody,\n Foot: ModalCardFoot,\n});\n\n/**\n * Modal.Close - Renders modal close button with two variant styles.\n *\n * @function\n * @param {ModalCloseProps} props - Component props.\n * @returns {JSX.Element} Close button element.\n *\n * @remarks\n * Supports two variants:\n * - 'delete' (default): For use in modal card headers, renders with 'delete' class\n * - 'floating': For floating overlay close button, renders with 'modal-close' class\n *\n * The size prop only applies to the 'floating' variant.\n */\nconst ModalClose: React.FC<ModalCloseProps> = ({\n className,\n size = 'large',\n variant = 'delete',\n ...props\n}) => {\n const classes = classNames(\n usePrefixedClassNames(\n variant === 'delete' ? 'delete' : 'modal-close',\n variant === 'floating' && size && { [`is-${size}`]: true }\n ),\n className\n );\n return (\n <button className={classes} aria-label=\"close\" type=\"button\" {...props} />\n );\n};\n\n/**\n * The `Modal` component provides an empty, accessible overlay for arbitrary content — for a ready-made confirm or alert, reach for `Dialog` instead.\n *\n * @function\n * @param {ModalProps} props - Props for the Modal component.\n * @returns {JSX.Element} The rendered modal.\n *\n * @example\n * // Legacy API\n * <Modal active={isOpen} onClose={handleClose} modalCardTitle=\"Title\">\n * Content\n * </Modal>\n *\n * @example\n * // Compound Component API\n * <Modal isActive={isOpen}>\n * <Modal.Background onClick={handleClose} />\n * <Modal.Card>\n * <Modal.Card.Head>\n * <Modal.Card.Title>Title</Modal.Card.Title>\n * <Modal.Close onClick={handleClose} />\n * </Modal.Card.Head>\n * <Modal.Card.Body>Content</Modal.Card.Body>\n * </Modal.Card>\n * </Modal>\n *\n * @see {@link https://bulma.io/documentation/components/modal/ | Bulma Modal documentation}\n */\nconst ModalRoot = forwardRef<HTMLDivElement, ModalProps>(function ModalRoot(\n {\n active,\n isActive,\n onClose,\n className,\n textColor,\n bgColor,\n modalCardTitle,\n modalCardFoot,\n type,\n children,\n closeOnEscape = true,\n lockScroll = true,\n portal = false,\n role,\n 'aria-modal': ariaModalProp,\n ...props\n },\n ref\n) {\n const { classPrefix } = useConfig();\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n });\n\n // Support both active and isActive props\n const isModalActive = active ?? isActive ?? false;\n\n const modalRootRef = useRef<HTMLDivElement>(null);\n\n // Cleanup returned by a consumer's callback ref on attach, held until detach.\n const consumerCleanupRef = useRef<(() => void) | null>(null);\n\n // The forwarded ref and the internal one must both see the node: focus\n // management, the scroll lock and the topmost-modal check all read\n // `modalRootRef`, while consumers expect their own ref to resolve.\n const combinedRef = useCallback(\n (node: HTMLDivElement | null) => {\n (modalRootRef as React.MutableRefObject<HTMLDivElement | null>).current =\n node;\n if (typeof ref === 'function') {\n // React 19 lets a callback ref return a cleanup function and detaches\n // by running it instead of calling the ref with `null`; React 18\n // discards the return value entirely. Returning it from here would be\n // a React-19-only contract, so instead we hold the cleanup and run it\n // ourselves on detach — a consumer's cleanup ref then behaves the same\n // on both majors of the CI matrix. Same shape as `Dropdown`.\n if (node === null) {\n const consumerCleanup = consumerCleanupRef.current;\n consumerCleanupRef.current = null;\n if (consumerCleanup) {\n consumerCleanup();\n } else {\n ref(null);\n }\n return;\n }\n const cleanup: unknown = ref(node);\n consumerCleanupRef.current =\n typeof cleanup === 'function' ? (cleanup as () => void) : null;\n } else if (ref) {\n (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n }\n },\n [ref]\n );\n const previouslyFocusedRef = useRef<HTMLElement | null>(null);\n const stackTokenRef = useRef<object>({});\n const generatedTitleId = useId();\n // A portal has no server-rendered counterpart, so the server render and the\n // hydrating render have to stay inline and only move into the portal once\n // we're past hydration.\n const onClient = useIsHydrated();\n // Moving into the portal remounts the modal's subtree, so any effect holding\n // a DOM node from before the move is holding a detached one. Effects that\n // touch the modal's nodes key on this so they re-run against the new tree.\n const isPortaled = Boolean(portal) && onClient;\n\n useScrollLock(isModalActive && lockScroll);\n\n // Record open order so keyboard handling only applies to the topmost modal.\n useEffect(() => {\n if (!isModalActive) return undefined;\n\n const token = stackTokenRef.current;\n activeModalStack.push(token);\n return () => {\n const index = activeModalStack.indexOf(token);\n if (index !== -1) activeModalStack.splice(index, 1);\n };\n }, [isModalActive]);\n\n // Escape closes; Tab cycles inside the modal. Both only for the topmost one.\n useEffect(() => {\n if (!isModalActive) return undefined;\n\n const handleKeyDown = (e: KeyboardEvent) => {\n const node = modalRootRef.current;\n if (\n activeModalStack[activeModalStack.length - 1] !== stackTokenRef.current\n ) {\n return;\n }\n\n if (e.key === 'Escape') {\n if (closeOnEscape) onClose?.();\n return;\n }\n if (e.key !== 'Tab' || !node) return;\n\n // Keep Tab within the modal — `aria-modal` hides the rest of the page\n // from assistive technology, so the keyboard order has to agree.\n const focusable = getTabbable(node);\n const activeElement = document.activeElement;\n if (focusable.length === 0) {\n e.preventDefault();\n node.focus();\n return;\n }\n\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n const outside = !node.contains(activeElement);\n if (e.shiftKey) {\n if (outside || activeElement === first) {\n e.preventDefault();\n last.focus();\n }\n } else if (outside || activeElement === last) {\n e.preventDefault();\n first.focus();\n }\n };\n\n document.addEventListener('keydown', handleKeyDown);\n return () => document.removeEventListener('keydown', handleKeyDown);\n }, [isModalActive, closeOnEscape, onClose]);\n\n // Move focus into the modal on open, restore it on close\n useEffect(() => {\n if (!isModalActive) return undefined;\n\n previouslyFocusedRef.current = document.activeElement as HTMLElement | null;\n const node = modalRootRef.current;\n const focusable = node ? getTabbable(node)[0] : undefined;\n (focusable ?? node)?.focus();\n\n return () => {\n // Only hand focus back if this modal still owns it: closing a background\n // modal must not pull focus out of one that is still open on top. A\n // removed subtree leaves focus on <body>, which still counts as ours.\n const activeElement = document.activeElement;\n if (\n activeElement &&\n activeElement !== document.body &&\n !node?.contains(activeElement)\n ) {\n return;\n }\n previouslyFocusedRef.current?.focus?.();\n };\n // `isPortaled` flips once when a hydrated portal modal moves out of the\n // inline tree; re-running rebinds focus onto the remounted nodes. The\n // cleanup above restores focus to the pre-open element first (the detached\n // subtree has left focus on <body>), so the re-run re-records the same\n // element and restore-on-close still lands in the right place.\n }, [isModalActive, isPortaled]);\n\n // Check if children contain compound components\n const hasCompoundComponents = React.Children.toArray(children).some(\n child =>\n React.isValidElement(child) &&\n (child.type === ModalBackground ||\n child.type === ModalContent ||\n child.type === ModalCard ||\n child.type === ModalClose)\n );\n\n // Generate Bulma classes with prefix\n const bulmaClasses = usePrefixedClassNames('modal', {\n 'is-active': isModalActive,\n });\n const deleteClass = usePrefixedClassNames('delete');\n\n const modalClasses = classNames(bulmaClasses, bulmaHelperClasses, className);\n\n const resolvedRole = role ?? (isModalActive ? 'dialog' : undefined);\n const resolvedAriaModal =\n ariaModalProp ??\n (isModalActive && resolvedRole !== 'presentation' ? 'true' : undefined);\n // A dialog needs an accessible name: the legacy card title is wired up\n // automatically, compound users pass their own aria-label/aria-labelledby\n // (both arrive in `rest`, which is spread last and so wins).\n const titleId = modalCardTitle ? generatedTitleId : undefined;\n\n let modalElement: React.ReactElement;\n\n // If using compound components, render children as-is\n if (hasCompoundComponents) {\n modalElement = (\n <div\n className={modalClasses}\n ref={combinedRef}\n role={resolvedRole}\n aria-modal={resolvedAriaModal}\n tabIndex={-1}\n {...rest}\n data-testid=\"modal\"\n >\n {children}\n </div>\n );\n } else {\n // Legacy API: EXPLICIT type wins; fallback to auto detection if not provided\n let isModalCard: boolean;\n if (type === 'card') isModalCard = true;\n else if (type === 'content') isModalCard = false;\n else isModalCard = !!modalCardTitle || !!modalCardFoot;\n\n modalElement = (\n <div\n className={modalClasses}\n ref={combinedRef}\n role={resolvedRole}\n aria-modal={resolvedAriaModal}\n aria-labelledby={titleId}\n tabIndex={-1}\n {...rest}\n data-testid=\"modal\"\n >\n <div\n className={prefixedClassNames(classPrefix, 'modal-background')}\n onClick={onClose}\n data-testid=\"modal-background\"\n />\n {isModalCard ? (\n <div className={prefixedClassNames(classPrefix, 'modal-card')}>\n {modalCardTitle && (\n <header\n className={prefixedClassNames(classPrefix, 'modal-card-head')}\n >\n <p\n id={titleId}\n className={prefixedClassNames(\n classPrefix,\n 'modal-card-title'\n )}\n >\n {modalCardTitle}\n </p>\n {onClose && (\n <button\n className={deleteClass}\n aria-label=\"close\"\n onClick={onClose}\n type=\"button\"\n data-testid=\"modal-close\"\n />\n )}\n </header>\n )}\n <section\n className={prefixedClassNames(classPrefix, 'modal-card-body')}\n data-testid=\"modal-body\"\n >\n {children}\n </section>\n {modalCardFoot && (\n <footer\n className={prefixedClassNames(classPrefix, 'modal-card-foot')}\n >\n {modalCardFoot}\n </footer>\n )}\n </div>\n ) : (\n <div\n className={prefixedClassNames(classPrefix, 'modal-content')}\n data-testid=\"modal-content\"\n >\n {children}\n </div>\n )}\n {/* Show floating close button for modal-content, or for modal-card when no header */}\n {(!isModalCard || (!modalCardTitle && onClose)) && onClose && (\n <button\n className={prefixedClassNames(\n classPrefix,\n 'modal-close',\n 'is-large'\n )}\n aria-label=\"close\"\n onClick={onClose}\n type=\"button\"\n data-testid=\"modal-close-float\"\n />\n )}\n </div>\n );\n }\n\n if (isPortaled) {\n const target = resolvePortalContainer(\n typeof portal === 'boolean' ? undefined : portal\n );\n return createPortal(modalElement, target);\n }\n\n return modalElement;\n});\n\nexport const Modal = withSubComponents(\n ModalRoot,\n {\n Background: ModalBackground,\n Content: ModalContent,\n Card: ModalCard,\n Close: ModalClose,\n },\n 'Modal'\n);\nexport default Modal;\n","import React, { forwardRef, useContext, useEffect, useState } from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport type { PolymorphicComponent } from '../helpers/polymorphic';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * Shared state a `Navbar.Dropdown` exposes to its `Navbar.Link` trigger so the\n * trigger needs no hand-wired ARIA or keyboard handling.\n */\ninterface NavbarDropdownContextValue {\n /** Whether the dropdown is currently open. */\n active: boolean;\n /** Flips the open state. */\n toggle: () => void;\n /** Closes the dropdown (no-op if already closed). */\n close: () => void;\n}\n\nconst NavbarDropdownContext =\n React.createContext<NavbarDropdownContextValue | null>(null);\n\n/**\n * Props for the Navbar component.\n * @extraProp {React.Ref<HTMLElement>} [ref] - Ref forwarded to the root `<nav>` element.\n */\nexport interface NavbarProps\n extends\n React.HTMLAttributes<HTMLElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes for the navbar. */\n className?: string;\n /** Text color for the navbar. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Bulma color modifier for the navbar. */\n color?:\n | 'primary'\n | 'link'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger'\n | 'black'\n | 'dark'\n | 'light'\n | 'white';\n /** Background color for the navbar. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Renders the navbar with a transparent background. */\n transparent?: boolean;\n /** Fixes the navbar to the top or bottom of the viewport. */\n fixed?: 'top' | 'bottom';\n /** Navbar content (compose with subcomponents). */\n children?: React.ReactNode;\n}\n\n/**\n * The `Navbar` component implements Bulma's powerful, responsive navigation bar for your Bulma React UI.\n *\n * @function\n * @param {NavbarProps} props - Props for the Navbar component.\n * @param {React.Ref<HTMLElement>} ref - Forwarded ref to the root `<nav>` element.\n * @returns {JSX.Element} The rendered navbar.\n * @see {@link https://bulma.io/documentation/components/navbar/ | Bulma Navbar documentation}\n */\nconst NavbarComponent = forwardRef<HTMLElement, NavbarProps>(\n function NavbarComponent(\n {\n className,\n textColor,\n bgColor,\n color,\n transparent,\n fixed,\n children,\n ...props\n },\n ref\n ) {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n });\n\n // Generate Bulma classes with prefix\n const bulmaClasses = usePrefixedClassNames('navbar', {\n [`is-${color}`]: color,\n 'is-transparent': transparent,\n [`is-fixed-${fixed}`]: fixed,\n });\n\n const navbarClasses = classNames(\n bulmaClasses,\n bulmaHelperClasses,\n className\n );\n\n return (\n <nav\n ref={ref}\n className={navbarClasses}\n role=\"navigation\"\n aria-label=\"main navigation\"\n {...rest}\n >\n {children}\n </nav>\n );\n }\n);\n\n/**\n * Props for the NavbarBrand component.\n */\nexport interface NavbarBrandProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes. */\n className?: string;\n /** Text color for the brand. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Bulma color modifier for the brand. */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Brand content. */\n children?: React.ReactNode;\n}\n\n/**\n * For logo and branding (left side)\n *\n * @function\n * @param {NavbarBrandProps} props - Props for the NavbarBrand component.\n * @returns {JSX.Element} The rendered brand area.\n */\nexport const NavbarBrand: React.FC<NavbarBrandProps> = ({\n className,\n children,\n textColor,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n ...props,\n });\n\n return (\n <div\n className={classNames(\n usePrefixedClassNames('navbar-brand'),\n bulmaHelperClasses,\n className\n )}\n {...rest}\n >\n {children}\n </div>\n );\n};\n\n/**\n * The NavbarItem component's own props — everything it adds on top of the\n * attributes of whatever element `as` renders.\n */\nexport interface NavbarItemOwnProps extends Omit<\n BulmaClassesProps,\n 'color' | 'backgroundColor'\n> {\n /**\n * Not accepted. `color` here would be the deprecated presentational HTML\n * attribute, and `useBulmaClasses` consumes any `color` key as a Bulma helper\n * before the target could see it — so it is declared unavailable rather than\n * silently eaten. Use `textColor` / `bgColor`.\n * @internal\n */\n color?: never;\n /**\n * Not accepted under this name. `useBulmaClasses` consumes any\n * `backgroundColor` key before `rest` is spread, so a custom `as` target\n * declaring one would never receive it. Use `bgColor`.\n * @internal\n */\n backgroundColor?: never;\n /** Additional CSS classes. */\n className?: string;\n /** Whether the item is active. */\n active?: boolean;\n /** Text color for the item. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color for the item. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Navbar item content. */\n children?: React.ReactNode;\n}\n\n/**\n * Props for the NavbarItem component. The DOM attributes and the `ref` both\n * follow `as`: rendering as a router link accepts that component's props (`to`\n * and friends) by inference, and `as=\"span\"` rejects `href`.\n *\n * @extraProp {PolymorphicRef<React.ElementType>} [ref] - Ref forwarded to the element `as` renders, typed from `as`: the DOM node for an intrinsic tag, or whatever handle a custom component exposes.\n */\nexport type NavbarItemProps<T extends React.ElementType = 'a'> =\n NavbarItemOwnProps &\n Omit<React.ComponentPropsWithoutRef<T>, keyof NavbarItemOwnProps | 'as'> & {\n /** Render as another intrinsic element (`'span'`, `'div'`) or a custom component (e.g. a router link). Defaults to `'a'`. */\n as?: T;\n };\n\n/**\n * The shape the implementation destructures. The public contract is the generic\n * `NavbarItemProps<T>` above — the body cannot see through `T`.\n */\ntype NavbarItemImplProps = NavbarItemOwnProps & { as?: React.ElementType };\n\n/**\n * Navigation links, buttons, or custom content\n *\n * @function\n * @param {NavbarItemProps} props - Props for the NavbarItem component.\n * @param {React.Ref} ref - Forwarded ref to the element `as` renders.\n * @returns {JSX.Element} The rendered item.\n */\nexport const NavbarItem = forwardRef(function NavbarItem(\n itemProps: NavbarItemProps,\n ref: React.Ref<HTMLElement>\n) {\n const {\n className,\n as: Component = 'a',\n active,\n textColor,\n bgColor,\n children,\n ...props\n } = itemProps as NavbarItemImplProps;\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n });\n\n return (\n <Component\n ref={ref}\n className={classNames(\n usePrefixedClassNames('navbar-item', {\n 'is-active': active,\n }),\n bulmaHelperClasses,\n className\n )}\n {...rest}\n >\n {children}\n </Component>\n );\n}) as PolymorphicComponent<NavbarItemOwnProps, 'a'>;\n\nNavbarItem.displayName = 'NavbarItem';\n\n/**\n * Props for the NavbarBurger component.\n * @extraProp {React.Ref<HTMLButtonElement>} [ref] - Ref forwarded to the burger button element.\n */\nexport interface NavbarBurgerProps\n extends\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes. */\n className?: string;\n /** Text color for the burger. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Bulma color modifier for the burger. */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Whether the burger is active. */\n active?: boolean;\n /** Custom content inside the burger. */\n children?: React.ReactNode;\n /** Aria label for accessibility. */\n 'aria-label'?: string;\n /** Aria expanded state. */\n 'aria-expanded'?: boolean;\n /** Click handler. */\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n}\n\n/**\n * Responsive menu toggle (mobile)\n *\n * @function\n * @param {NavbarBurgerProps} props - Props for the NavbarBurger component.\n * @param {React.Ref<HTMLButtonElement>} ref - Forwarded ref to the burger button element.\n * @returns {JSX.Element} The rendered burger.\n */\nexport const NavbarBurger = forwardRef<HTMLButtonElement, NavbarBurgerProps>(\n function NavbarBurger({ className, active, children, ...props }, ref) {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n ...props,\n });\n\n return (\n <button\n ref={ref}\n type=\"button\"\n className={classNames(\n usePrefixedClassNames('navbar-burger', {\n 'is-active': active,\n }),\n bulmaHelperClasses,\n className\n )}\n aria-label={props['aria-label'] || 'menu'}\n aria-expanded={props['aria-expanded'] ?? !!active}\n {...rest}\n >\n <span aria-hidden=\"true\"></span>\n <span aria-hidden=\"true\"></span>\n <span aria-hidden=\"true\"></span>\n {children}\n </button>\n );\n }\n);\n\nNavbarBurger.displayName = 'NavbarBurger';\n\n/**\n * Props for the NavbarMenu component.\n */\nexport interface NavbarMenuProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes. */\n className?: string;\n /** Text color for the menu. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Bulma color modifier for the menu. */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Whether the menu is active. */\n active?: boolean;\n /** Menu content. */\n children?: React.ReactNode;\n}\n\n/**\n * Collapsible content (contains `Navbar.Start` and `Navbar.End`)\n *\n * @function\n * @param {NavbarMenuProps} props - Props for the NavbarMenu component.\n * @returns {JSX.Element} The rendered menu.\n */\nexport const NavbarMenu: React.FC<NavbarMenuProps> = ({\n className,\n active,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n ...props,\n });\n\n return (\n <div\n className={classNames(\n usePrefixedClassNames('navbar-menu', {\n 'is-active': active,\n }),\n bulmaHelperClasses,\n className\n )}\n {...rest}\n >\n {children}\n </div>\n );\n};\n\n/**\n * Props for the NavbarStartEnd component.\n */\nexport interface NavbarStartEndProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes. */\n className?: string;\n /** Text color. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Bulma color modifier. */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Content. */\n children?: React.ReactNode;\n}\n\n/**\n * Left-aligned menu area\n *\n * @function\n * @param {NavbarStartEndProps} props - Props for the NavbarStart component.\n * @returns {JSX.Element} The rendered start area.\n */\nexport const NavbarStart: React.FC<NavbarStartEndProps> = ({\n className,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n ...props,\n });\n return (\n <div\n className={classNames(\n usePrefixedClassNames('navbar-start'),\n bulmaHelperClasses,\n className\n )}\n {...rest}\n >\n {children}\n </div>\n );\n};\n\n/**\n * Right-aligned menu area\n *\n * @function\n * @param {NavbarStartEndProps} props - Props for the NavbarEnd component.\n * @returns {JSX.Element} The rendered end area.\n */\nexport const NavbarEnd: React.FC<NavbarStartEndProps> = ({\n className,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n ...props,\n });\n return (\n <div\n className={classNames(\n usePrefixedClassNames('navbar-end'),\n bulmaHelperClasses,\n className\n )}\n {...rest}\n >\n {children}\n </div>\n );\n};\n\n/**\n * The NavbarLink component's own props — everything it adds on top of the\n * attributes of whatever element `as` renders.\n */\nexport interface NavbarLinkOwnProps extends Omit<\n BulmaClassesProps,\n 'color' | 'backgroundColor'\n> {\n /**\n * Not accepted. `color` here would be the deprecated presentational HTML\n * attribute, and `useBulmaClasses` consumes any `color` key as a Bulma helper\n * before the target could see it — so it is declared unavailable rather than\n * silently eaten. Use `textColor` / `bgColor`.\n * @internal\n */\n color?: never;\n /**\n * Not accepted under this name. `useBulmaClasses` consumes any\n * `backgroundColor` key before `rest` is spread, so a custom `as` target\n * declaring one would never receive it. Use `bgColor`.\n * @internal\n */\n backgroundColor?: never;\n /** Additional CSS classes. */\n className?: string;\n /** Remove the dropdown arrow indicator. */\n arrowless?: boolean;\n /** Text color. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Link content. */\n children?: React.ReactNode;\n}\n\n/**\n * Props for the NavbarLink component. The DOM attributes and the `ref` both\n * follow `as`: `as=\"button\"` accepts the button attributes and a button ref,\n * and `as=\"span\"` rejects `href` and `target`. Not `rel` — React declares it on\n * `HTMLAttributes<T>`, so it is valid on every element, and rejecting it would\n * mean diverging from React's own typing.\n *\n * @extraProp {PolymorphicRef<React.ElementType>} [ref] - Ref forwarded to the element `as` renders, typed from `as`: the DOM node for an intrinsic tag, or whatever handle a custom component exposes.\n */\nexport type NavbarLinkProps<T extends React.ElementType = 'a'> =\n NavbarLinkOwnProps &\n Omit<React.ComponentPropsWithoutRef<T>, keyof NavbarLinkOwnProps | 'as'> & {\n /** Render as another intrinsic element (`'button'`, `'span'`) or a custom component. Defaults to `'a'`. */\n as?: T;\n };\n\n/**\n * The shape the implementation destructures. The public contract is the generic\n * `NavbarLinkProps<T>` above — the body cannot see through `T`, so it names the\n * handful of DOM props it actually reads back off `rest`.\n */\ntype NavbarLinkImplProps = NavbarLinkOwnProps & {\n as?: React.ElementType;\n href?: string;\n onKeyDown?: React.KeyboardEventHandler<HTMLAnchorElement>;\n onClick?: React.MouseEventHandler<HTMLAnchorElement>;\n};\n\n/**\n * Dropdown trigger with arrow indicator (use as first child of `Navbar.Dropdown`)\n *\n * @function\n * @param {NavbarLinkProps} props - Props for the NavbarLink component.\n * @param {React.Ref} ref - Forwarded ref to the element `as` renders.\n * @returns {JSX.Element} The rendered navbar link.\n */\nexport const NavbarLink = forwardRef(function NavbarLink(\n linkProps: NavbarLinkProps,\n ref: React.Ref<HTMLElement>\n) {\n const {\n className,\n as: Component = 'a',\n arrowless,\n textColor,\n bgColor,\n children,\n ...props\n } = linkProps as NavbarLinkImplProps;\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n });\n\n const dropdownContext = useContext(NavbarDropdownContext);\n const hasHref = rest.href !== undefined;\n const isNativeInteractive = Component === 'button' || hasHref;\n\n // Guarded like Button's disabled blocker: these run on whatever `as` renders,\n // and a custom target's callback need not take a DOM event. One declaring\n // `onKeyDown: (k: {key: string}) => void` reaches `e.preventDefault()` and\n // throws. Composing the caller's handler is unconditional; acting on the\n // event is not ours to do when the payload is foreign.\n const isDomEvent = (e: unknown): e is { preventDefault: () => void } =>\n typeof (e as { preventDefault?: unknown })?.preventDefault === 'function';\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLAnchorElement>) => {\n rest.onKeyDown?.(e);\n if (!isDomEvent(e)) return;\n if (!dropdownContext || e.defaultPrevented) return;\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n dropdownContext.toggle();\n } else if (e.key === 'Escape' && dropdownContext.active) {\n e.preventDefault();\n dropdownContext.close();\n }\n };\n\n // When the link is not natively interactive (no `href`, not a `<button>`) it\n // renders as `role=\"button\"`, so a mouse/touch click has no default action to\n // open the dropdown. Compose the caller's handler and toggle the dropdown\n // unless the caller prevented the default. Native links/buttons keep their own\n // click semantics (navigation / the caller's handler).\n const handleClick = (e: React.MouseEvent<HTMLAnchorElement>) => {\n rest.onClick?.(e);\n if (!isDomEvent(e)) return;\n if (!dropdownContext || isNativeInteractive || e.defaultPrevented) return;\n dropdownContext.toggle();\n };\n\n return (\n <Component\n ref={ref}\n className={classNames(\n usePrefixedClassNames('navbar-link', {\n 'is-arrowless': arrowless,\n }),\n bulmaHelperClasses,\n className\n )}\n {...rest}\n {...(dropdownContext && {\n 'aria-haspopup': 'true',\n 'aria-expanded': dropdownContext.active,\n onKeyDown: handleKeyDown,\n ...(!isNativeInteractive && {\n role: 'button',\n tabIndex: 0,\n onClick: handleClick,\n }),\n })}\n >\n {children}\n </Component>\n );\n}) as PolymorphicComponent<NavbarLinkOwnProps, 'a'>;\n\nNavbarLink.displayName = 'NavbarLink';\n\n/**\n * Props for the NavbarDropdown component.\n * @extraProp {React.Ref<HTMLDivElement>} [ref] - Ref forwarded to the dropdown container element.\n */\nexport interface NavbarDropdownProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Additional CSS classes. */\n className?: string;\n /** Dropdown aligned right. */\n right?: boolean;\n /** Dropdown opens upwards. */\n up?: boolean;\n /** Dropdown opens on hover. */\n hoverable?: boolean;\n /** Dropdown is open. */\n active?: boolean;\n /** Callback when dropdown active state changes. */\n onActiveChange?: (active: boolean) => void;\n /** Dropdown content. */\n children?: React.ReactNode;\n}\n\n/**\n * Dropdown parent (with options for hover, up, right, active)\n *\n * @function\n * @param {NavbarDropdownProps} props - Props for the NavbarDropdown component.\n * @param {React.Ref<HTMLDivElement>} ref - Forwarded ref to the dropdown container element.\n * @returns {JSX.Element} The rendered dropdown.\n */\nexport const NavbarDropdown = forwardRef<HTMLDivElement, NavbarDropdownProps>(\n function NavbarDropdown(\n {\n className,\n right,\n up,\n hoverable,\n active: activeProp,\n onActiveChange,\n children,\n ...props\n },\n ref\n ) {\n const [active, setActive] = useState<boolean>(!!activeProp);\n\n useEffect(() => {\n // eslint-disable-next-line react-hooks/set-state-in-effect -- syncing to controlled prop\n if (typeof activeProp === 'boolean') setActive(activeProp);\n }, [activeProp]);\n\n // Keep `onActiveChange` out of the state updater (a pure function) so Strict\n // Mode's double-invoked updaters don't double-fire it — mirrors `Dropdown`.\n const toggle = () => {\n const next = !active;\n setActive(next);\n onActiveChange?.(next);\n };\n\n const close = () => {\n /* istanbul ignore next: close() is only invoked once already active */\n if (!active) return;\n setActive(false);\n onActiveChange?.(false);\n };\n\n return (\n <NavbarDropdownContext.Provider value={{ active, toggle, close }}>\n <div\n ref={ref}\n className={classNames(\n usePrefixedClassNames('navbar-item', 'has-dropdown', {\n 'has-dropdown-up': up,\n 'is-right': right,\n 'is-hoverable': hoverable,\n 'is-active': active,\n }),\n className\n )}\n {...props}\n >\n {children}\n </div>\n </NavbarDropdownContext.Provider>\n );\n }\n);\n\nNavbarDropdown.displayName = 'NavbarDropdown';\n\n/**\n * Props for the NavbarDropdownMenu component.\n */\nexport interface NavbarDropdownMenuProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Additional CSS classes. */\n className?: string;\n /** Dropdown aligned right. */\n right?: boolean;\n /** Dropdown opens upwards. */\n up?: boolean;\n /** Dropdown menu content. */\n children?: React.ReactNode;\n}\n\n/**\n * Dropdown menu container\n *\n * @function\n * @param {NavbarDropdownMenuProps} props - Props for the NavbarDropdownMenu component.\n * @returns {JSX.Element} The rendered dropdown menu.\n */\nexport const NavbarDropdownMenu: React.FC<NavbarDropdownMenuProps> = ({\n className,\n right,\n up,\n children,\n ...props\n}) => (\n <div\n className={classNames(\n usePrefixedClassNames('navbar-dropdown', {\n 'is-right': right,\n 'is-up': up,\n }),\n className\n )}\n {...props}\n >\n {children}\n </div>\n);\n\n/**\n * Divider in dropdown menus.\n *\n * @function\n * @param {React.HTMLAttributes<HTMLHRElement>} props - Standard hr props.\n * @returns {JSX.Element} The rendered divider.\n */\nexport const NavbarDivider: React.FC<\n React.HTMLAttributes<HTMLHRElement>\n> = props => (\n <hr className={usePrefixedClassNames('navbar-divider')} {...props} />\n);\n\n// Attach subcomponents\nexport const Navbar = withSubComponents(\n NavbarComponent,\n {\n Brand: NavbarBrand,\n Item: NavbarItem,\n Link: NavbarLink,\n Burger: NavbarBurger,\n Menu: NavbarMenu,\n Start: NavbarStart,\n End: NavbarEnd,\n Dropdown: NavbarDropdown,\n DropdownMenu: NavbarDropdownMenu,\n Divider: NavbarDivider,\n },\n 'Navbar'\n);\n\nexport default Navbar;\n","// INTERNAL — deliberately not exported from src/index.ts.\n\n/**\n * Color values that emit an `is-<color>` modifier no shipped Bulma 1.0.4 rule\n * matches on `.progress`/`.notification`/`.hero`. The `has-text-*` and\n * `has-background-*` helpers DO cover these values — only the\n * component-modifier form is dead.\n */\nexport const UNSTYLED_MODIFIER_COLORS = [\n 'black-bis',\n 'black-ter',\n 'white-bis',\n 'white-ter',\n 'grey-darker',\n 'grey-dark',\n 'grey',\n 'grey-light',\n 'grey-lighter',\n] as const;\n\nconst CSS_BACKED =\n 'primary, link, info, success, warning, danger, black, white, light, dark';\n\nconst warnedKeys = new Set<string>();\n\n/** Test-only: re-arm the warn-once registry. */\nexport const resetColorDeprecationWarnings = (): void => {\n warnedKeys.clear();\n};\n\n// Local declaration because the library tsconfig has no Node types. The\n// reference must stay a bare `process.env.NODE_ENV` so bundlers can replace\n// it statically.\ndeclare const process: { env: { NODE_ENV?: string } };\n\n// Fail closed: with no bundler and no Node (raw CDN ESM), reading `process`\n// throws and warnings stay off, so production can never warn by accident.\nconst isDev = (): boolean => {\n try {\n return process.env.NODE_ENV !== 'production';\n } catch {\n return false;\n }\n};\n\nconst warnOnce = (key: string, message: string): void => {\n if (!isDev() || warnedKeys.has(key)) return;\n warnedKeys.add(key);\n console.warn(message);\n};\n\n/**\n * Dev warning for a `color` value whose `is-<color>` modifier has no shipped\n * CSS. `extraUnstyled` covers per-component dead values beyond the shared\n * list (e.g. Hero's `inherit`/`current`).\n */\nexport const warnUnstyledColor = (\n component: string,\n value: string | undefined,\n extraUnstyled: readonly string[] = []\n): void => {\n if (!value) return;\n if (\n !(UNSTYLED_MODIFIER_COLORS as readonly string[]).includes(value) &&\n !extraUnstyled.includes(value)\n ) {\n return;\n }\n warnOnce(\n `${component}:${value}`,\n `[bestax-bulma] <${component} color=\"${value}\">: Bulma ships no ` +\n `\"is-${value}\" CSS for ${component}, so it renders unstyled. This ` +\n `value is deprecated and will be removed from the ${component} color ` +\n `union in the next major version. CSS-backed values: ${CSS_BACKED}.`\n );\n};\n\n/** Dev warning for a `color` prop that has no shipped CSS for any value. */\nexport const warnDeprecatedColorProp = (\n component: string,\n value: string | undefined,\n hint: string\n): void => {\n if (value === undefined) return;\n warnOnce(\n `${component}:color-prop`,\n `[bestax-bulma] The ${component} \"color\" prop is deprecated: Bulma ` +\n `ships no ${component.toLowerCase()} color CSS, so it has never had ` +\n `a visual effect. It will be removed in the next major version. ${hint}`\n );\n};\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\nimport { warnDeprecatedColorProp } from '../helpers/colorDeprecations';\n\n/**\n * Props for the Pagination component.\n */\nexport interface PaginationProps\n extends\n React.HTMLAttributes<HTMLElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /**\n * Color modifier for the pagination (renders `is-<color>`).\n *\n * Bulma ships no pagination color CSS, so this prop has never had a visual\n * effect for any value. Passing it logs a console warning in development.\n * Use `textColor` / `bgColor` instead.\n * @deprecated No `.pagination.is-<color>` CSS exists; the prop renders\n * unstyled and will be removed in the next major version.\n */\n color?:\n | 'primary'\n | 'link'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger'\n | 'black'\n | 'dark'\n | 'light'\n | 'white';\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Size modifier for the pagination. */\n size?: 'small' | 'medium' | 'large';\n /** Alignment for the pagination. */\n align?: 'centered' | 'right';\n /** Renders pagination with rounded corners. */\n rounded?: boolean;\n /** Total number of pages (for custom implementations). */\n total?: number;\n /** Current page (for controlled implementations). */\n current?: number;\n /** Callback when a page is selected. */\n onPageChange?: (page: number) => void;\n /** Additional CSS classes. */\n className?: string;\n /** Custom pagination content (usually subcomponents). */\n children?: React.ReactNode;\n}\n\n/**\n * Props for PaginationPrevious and PaginationNext components.\n */\nexport interface PaginationPreviousNextProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n /** Additional CSS classes. */\n className?: string;\n /** Whether previous/next is disabled. */\n disabled?: boolean;\n /** Button content. */\n children?: React.ReactNode;\n}\n\n/**\n * \"Previous\" navigation button.\n *\n * @function\n * @param {PaginationPreviousNextProps} props - Props for the PaginationPrevious component.\n * @returns {JSX.Element} The rendered previous button.\n */\nexport const PaginationPrevious: React.FC<PaginationPreviousNextProps> = ({\n className,\n disabled,\n children,\n ...props\n}) => (\n <a\n className={classNames(\n usePrefixedClassNames('pagination-previous'),\n className,\n {\n 'is-disabled': disabled,\n }\n )}\n aria-disabled={disabled}\n tabIndex={disabled ? -1 : 0}\n {...props}\n onClick={\n disabled\n ? e => {\n e.preventDefault();\n e.stopPropagation();\n }\n : props.onClick\n }\n >\n {children}\n </a>\n);\n\n/**\n * \"Next\" navigation button.\n *\n * @function\n * @param {PaginationPreviousNextProps} props - Props for the PaginationNext component.\n * @returns {JSX.Element} The rendered next button.\n */\nexport const PaginationNext: React.FC<PaginationPreviousNextProps> = ({\n className,\n disabled,\n children,\n ...props\n}) => (\n <a\n className={classNames(usePrefixedClassNames('pagination-next'), className, {\n 'is-disabled': disabled,\n })}\n aria-disabled={disabled}\n tabIndex={disabled ? -1 : 0}\n {...props}\n onClick={\n disabled\n ? e => {\n e.preventDefault();\n e.stopPropagation();\n }\n : props.onClick\n }\n >\n {children}\n </a>\n);\n\n/**\n * The `Pagination` component provides a flexible, composable Bulma pagination navigation for your Bulma React UI.\n *\n * @function\n * @param {PaginationProps} props - Props for the Pagination component.\n * @returns {JSX.Element} The rendered pagination.\n * @see {@link https://bulma.io/documentation/components/pagination/ | Bulma Pagination documentation}\n */\nconst PaginationComponent: React.FC<PaginationProps> = ({\n color,\n textColor,\n bgColor,\n size,\n align,\n rounded,\n className,\n children,\n ...props\n}) => {\n warnDeprecatedColorProp(\n 'Pagination',\n color,\n 'Use the textColor / bgColor helper props instead.'\n );\n\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n });\n\n // Generate Bulma classes with prefix\n const bulmaClasses = usePrefixedClassNames('pagination', {\n [`is-${color}`]: color,\n [`is-${size}`]: size,\n [`is-${align}`]: align,\n 'is-rounded': rounded,\n });\n\n const paginationClasses = classNames(\n bulmaClasses,\n bulmaHelperClasses,\n className\n );\n\n return (\n <nav\n className={paginationClasses}\n role=\"navigation\"\n aria-label=\"pagination\"\n {...rest}\n >\n {children}\n </nav>\n );\n};\n\n/**\n * Props for the PaginationList component.\n */\nexport interface PaginationListProps\n extends\n React.HTMLAttributes<HTMLUListElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes. */\n className?: string;\n /** Text color for the list. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Bulma color modifier for the list. */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Background color for the list. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** List items. */\n children?: React.ReactNode;\n}\n\n/**\n * Container for page links and ellipsis.\n *\n * @function\n * @param {PaginationListProps} props - Props for the PaginationList component.\n * @returns {JSX.Element} The rendered pagination list.\n */\nexport const PaginationList: React.FC<PaginationListProps> = ({\n className,\n textColor,\n bgColor,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n });\n return (\n <ul\n className={classNames(\n usePrefixedClassNames('pagination-list'),\n bulmaHelperClasses,\n className\n )}\n {...rest}\n >\n {children}\n </ul>\n );\n};\n\n/**\n * Props for the PaginationLink component.\n */\nexport interface PaginationLinkProps\n extends\n React.AnchorHTMLAttributes<HTMLAnchorElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes. */\n className?: string;\n /** Bulma color modifier. */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Text color. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Whether the link is for the current page. */\n active?: boolean;\n /** Whether the link is disabled. */\n disabled?: boolean;\n /** Link content. */\n children?: React.ReactNode;\n}\n\n/**\n * Page number or navigation link.\n *\n * @function\n * @param {PaginationLinkProps} props - Props for the PaginationLink component.\n * @returns {JSX.Element} The rendered pagination link.\n */\nexport const PaginationLink: React.FC<PaginationLinkProps> = ({\n className,\n textColor,\n bgColor,\n active,\n disabled,\n onClick,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n });\n\n const handleClick = (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => {\n if (disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n if (onClick) {\n onClick(e);\n }\n };\n\n return (\n <li>\n <a\n className={classNames(\n usePrefixedClassNames('pagination-link'),\n bulmaHelperClasses,\n className,\n {\n 'is-current': active,\n 'is-disabled': disabled,\n }\n )}\n aria-current={active ? 'page' : undefined}\n aria-disabled={disabled}\n tabIndex={disabled ? -1 : 0}\n onClick={handleClick}\n {...rest}\n >\n {children}\n </a>\n </li>\n );\n};\n\n/**\n * Ellipsis separator.\n *\n * @function\n * @param {React.LiHTMLAttributes<HTMLLIElement>} props - Standard li props.\n * @returns {JSX.Element} The rendered ellipsis.\n */\nexport const PaginationEllipsis: React.FC<\n React.LiHTMLAttributes<HTMLLIElement>\n> = props => (\n <li>\n <span className={usePrefixedClassNames('pagination-ellipsis')} {...props}>\n …\n </span>\n </li>\n);\n\nexport const Pagination = withSubComponents(\n PaginationComponent,\n {\n Link: PaginationLink,\n List: PaginationList,\n Ellipsis: PaginationEllipsis,\n Previous: PaginationPrevious,\n Next: PaginationNext,\n },\n 'Pagination'\n);\n\nexport default Pagination;\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\nimport { useIconLibrary } from '../helpers/Config';\n\n// TypeScript declaration for Ionicons web component\ninterface IonIconProps extends React.HTMLAttributes<HTMLElement> {\n name?: string;\n src?: string;\n icon?: unknown;\n size?: string;\n lazy?: boolean;\n sanitize?: boolean;\n color?: string;\n flipRtl?: boolean;\n ariaLabel?: string;\n ariaHidden?: string;\n}\n\n// React 19 moved the global `JSX` namespace under the `react` module, so the\n// `<ion-icon>` web-component augmentation must target `React.JSX` to take effect.\ndeclare module 'react' {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n 'ion-icon': IonIconProps;\n }\n }\n}\n\ntype IconLibrary = 'fa' | 'mdi' | 'ion' | 'material-icons' | 'material-symbols'; // 'fa' = Font Awesome, 'mdi' = Material Design Icons, 'ion' = Ionicons Web Components, 'material-icons' = Google Material Icons, 'material-symbols' = Google Material Symbols\n\n/**\n * Shared props for the Icon component, independent of whether a class-based `name` or a\n * custom `children` node supplies the glyph.\n */\ninterface IconBaseProps\n extends React.HTMLAttributes<HTMLSpanElement>, BulmaClassesProps {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Bulma color modifier for the icon. */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /**\n * Legacy icon class string (e.g. `'fas fa-star'`). Only its last segment is read, as the\n * glyph name; the library still comes from `library` or `ConfigProvider`, so\n * `'mdi mdi-rocket'` renders an `fa` class unless the effective library is already `mdi` —\n * set it here or on the provider.\n *\n * @deprecated Use `name` instead.\n */\n icon?: string;\n /**\n * The icon library to use ('fa' = Font Awesome, 'mdi' = Material Design Icons, 'ion' = Ionicons Web Components, 'material-icons' = Google Material Icons, 'material-symbols' = Google Material Symbols). Defaults to the value set in ConfigProvider or 'fa' if not configured. Ignored when `children` supplies the glyph instead of `name`.\n * @defaultValue 'fa'\n */\n library?: IconLibrary; // defaults to ConfigProvider iconLibrary or 'fa'\n /** Icon style variant (e.g. `'solid'`, `'outlined'`, `'rounded'`). Ignored when `children` supplies the glyph instead of `name`. */\n variant?: string; // e.g., 'solid', 'outlined', 'rounded', 'sharp'\n /** Additional modifiers (e.g. `'fa-lg'`, `'fa-spin'`, `'is-size-1'`). Ignored when `children` supplies the glyph instead of `name`. */\n features?: string | string[]; // e.g., 'fa-lg', 'fa-spin', 'is-size-1'\n /**\n * Additional modifiers in the older combined form, parsed into `variant` and `features`.\n *\n * @deprecated Use `variant` and `features` instead.\n */\n libraryFeatures?: string | string[];\n /** Size modifier for the icon container. */\n size?: 'small' | 'medium' | 'large';\n /**\n * ARIA label for accessibility. Applied unconditionally to the container span, so an\n * icon that never sets it still renders `aria-label=\"icon\"`. For an icon-only control,\n * put the real `aria-label` on the control (e.g. `Button`) and set `aria-hidden` here\n * instead — otherwise the control's accessible name is announced as just \"icon\". For a\n * decorative icon beside visible text, set `aria-hidden` here rather than leaving the\n * default, so it doesn't add \"icon\" to the text's accessible name.\n * @defaultValue 'icon'\n */\n ariaLabel?: string;\n /** Inline style object. */\n style?: React.CSSProperties;\n /** Override the default `'icon'` container class (e.g., `'panel-icon'`). */\n containerClassName?: string; // Override the default 'icon' container class (e.g., 'panel-icon')\n}\n\n/**\n * Props for `Icon` rendering a class-based glyph from an icon library.\n */\nexport interface IconNameProps extends IconBaseProps {\n /** The icon name, with or without its library prefix (e.g. `'star'` or `'fa-star'`). Mutually exclusive with `children`. */\n name: string; // e.g., 'star', 'account', 'home-outline'\n /** A custom node (an inline SVG, a `react-icons` component, …) rendered inside the icon container in place of a class-based glyph. Mutually exclusive with `name`. */\n children?: never;\n}\n\n/**\n * Props for `Icon` rendering a custom node (an inline SVG, a `react-icons` component, a Font\n * Awesome React `<FontAwesomeIcon>`, …) in place of a class-based glyph.\n */\nexport interface IconChildrenProps extends IconBaseProps {\n /** The icon name, with or without its library prefix (e.g. `'star'` or `'fa-star'`). Mutually exclusive with `children`. */\n name?: undefined;\n /** A custom node (an inline SVG, a `react-icons` component, …) rendered inside the icon container in place of a class-based glyph. Mutually exclusive with `name`. */\n // `undefined` is excluded deliberately: the renderer discriminates on `children !== undefined`,\n // so `children={undefined}` would satisfy the type but fall through to the `name` path with no\n // name and render an `fa-undefined` glyph. Excluding it keeps the advertised\n // exactly-one-of-`name`-or-`children` constraint matching what actually renders.\n children: Exclude<React.ReactNode, undefined>;\n}\n\n/**\n * Props for `Icon` naming its glyph through the deprecated `icon` prop instead of `name`.\n *\n * The runtime has always accepted `icon` on its own — it strips a leading library prefix off\n * the class string and falls through to the `name` path — but the type offered no member without\n * a `name` or `children`, so every caller still on the deprecated prop got an error the\n * package could not see — until #663 nothing here type-checked a test or a story, so the\n * three `Icon.test.tsx` cases exercising this path proved the runtime and said nothing about\n * the type. Declaring the path is the honest resolution: it is deprecated, not removed, and a\n * deprecation that does not type-check is a removal announced only to whoever tries it.\n *\n * @deprecated Pass `name` instead. This member goes when `icon` does.\n */\nexport interface IconDeprecatedProps extends IconBaseProps {\n /**\n * Legacy icon class string (e.g. `'fas fa-star'`). Only its last segment is read, as the\n * glyph name; the library still comes from `library` or `ConfigProvider`, so\n * `'mdi mdi-rocket'` renders an `fa` class unless the effective library is already `mdi` —\n * set it here or on the provider.\n *\n * @deprecated Use `name` instead.\n */\n // Required here, optional on `IconBaseProps`: the other two members allow it\n // alongside `name`, and this one is the member where it IS the glyph. Same\n // prose in both places on purpose — the API-docs extractor reads whichever it\n // reaches first, and the two must not drift apart.\n icon: string;\n /** The icon name. Absent on this path — `icon` supplies the glyph. */\n name?: undefined;\n /** A custom node. Mutually exclusive with `icon`. */\n children?: never;\n}\n\n/**\n * Props for the Icon component — a discriminated union of a class-based `name`, a custom\n * `children` node, and the deprecated `icon` class string.\n */\nexport type IconProps = IconNameProps | IconChildrenProps | IconDeprecatedProps;\n\n/**\n * Strips a redundant leading library prefix from an icon name (e.g. `fa-check` -> `check`\n * for the `fa` library, `mdi-account` -> `account` for `mdi`), so `name` behaves the same\n * whether or not the caller includes the prefix. Font Awesome and Material Design Icons docs\n * conventionally refer to icons with their class prefix (`fa-check`), which otherwise gets\n * doubled by `getIconClasses` (producing `fa-fa-check`, matching no glyph).\n *\n * @param {string} name - The icon name, possibly including a redundant library prefix.\n * @param {IconLibrary} library - The icon library the name will be rendered with.\n * @returns {string} The icon name with any redundant leading library prefix removed.\n */\nfunction stripRedundantLibraryPrefix(\n name: string,\n library: IconLibrary\n): string {\n if (!name) {\n return name;\n }\n if (library === 'fa' && name.startsWith('fa-')) {\n return name.substring(3);\n }\n if (library === 'mdi' && name.startsWith('mdi-')) {\n return name.substring(4);\n }\n return name;\n}\n\n/**\n * Gets the correct classes for the icon element based on the library and features.\n *\n * @param {IconLibrary} library - The icon library.\n * @param {string} name - The icon name.\n * @param {string} [variant] - Icon style variant (e.g., 'solid', 'outlined', 'rounded').\n * @param {string | string[]} [features] - Additional library-specific modifiers.\n * @returns {string} The combined class string for the icon.\n */\nfunction getIconClasses(\n library: IconLibrary,\n name: string,\n variant?: string,\n features?: string | string[]\n): string {\n let baseClass: string;\n let iconClass: string;\n const featureList = Array.isArray(features)\n ? features\n : features\n ? [features]\n : [];\n\n switch (library) {\n case 'fa': {\n // Font Awesome: use variant as style ('solid' -> 'fas', 'regular' -> 'far', etc.)\n const styleMap: Record<string, string> = {\n solid: 'fas',\n regular: 'far',\n brands: 'fab',\n light: 'fal',\n duotone: 'fad',\n thin: 'fat',\n };\n const faStyle = variant ? styleMap[variant] || variant : 'fas';\n baseClass = faStyle;\n iconClass = `fa-${name}`;\n return [baseClass, iconClass, ...featureList].join(' ');\n }\n case 'mdi':\n // Material Design Icons: no variants, just features\n baseClass = 'mdi';\n iconClass = `mdi-${name}`;\n return [baseClass, iconClass, ...featureList].join(' ');\n case 'material-icons': {\n // Google Material Icons: map variants to full class names\n const styleVariants: Record<string, string> = {\n filled: 'material-icons',\n outlined: 'material-icons-outlined',\n round: 'material-icons-round',\n sharp: 'material-icons-sharp',\n };\n baseClass = variant\n ? styleVariants[variant] || `material-icons-${variant}`\n : 'material-icons';\n return [baseClass, ...featureList].join(' ');\n }\n case 'material-symbols': {\n // Google Material Symbols: map variants to full class names\n const styleVariants: Record<string, string> = {\n outlined: 'material-symbols-outlined',\n rounded: 'material-symbols-rounded',\n sharp: 'material-symbols-sharp',\n };\n baseClass = variant\n ? styleVariants[variant] || `material-symbols-${variant}`\n : 'material-symbols-outlined';\n return [baseClass, ...featureList].join(' ');\n }\n default:\n // fallback: just icon name and features\n return [name, ...featureList].join(' ');\n }\n}\n\n/**\n * The `Icon` component is a Bulma-styled wrapper for displaying icons from various libraries (Font Awesome, Material Design Icons, Ionicons, Google Material Icons, Material Symbols, etc.).\n *\n * @function\n * @param {IconProps} props - Props for the Icon component.\n * @returns {JSX.Element} The rendered icon element.\n * @see {@link https://bulma.io/documentation/elements/icon/ | Bulma Icon documentation}\n */\nexport const Icon: React.FC<IconProps> = ({\n className,\n textColor,\n bgColor,\n name,\n library,\n variant,\n features,\n libraryFeatures, // Deprecated but maintained for backward compatibility\n size,\n ariaLabel = 'icon',\n style,\n icon, // Capture and exclude the deprecated 'icon' prop from DOM\n color: _color, // Exclude 'color' prop if passed directly\n containerClassName,\n children,\n ...restProps\n}) => {\n // Get the default icon library from context, fallback to 'fa' if not set\n const defaultLibrary = useIconLibrary();\n\n /**\n * Generates Bulma helper classes and separates out remaining props.\n * Note: variant, features, and libraryFeatures are excluded from props spread\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...restProps,\n });\n\n // Hoisted unconditionally to respect rules-of-hooks; the branches below\n // pick which result to consume.\n const defaultIconClasses = usePrefixedClassNames('icon', {\n [`is-${size}`]: size,\n });\n const sizeModifierClass = usePrefixedClassNames(\n size ? `is-${size}` : undefined\n );\n\n const bulmaClasses = containerClassName\n ? containerClassName\n : defaultIconClasses;\n\n const iconContainerClasses = classNames(\n bulmaClasses,\n containerClassName && size ? sizeModifierClass : undefined,\n bulmaHelperClasses,\n className\n );\n\n if (children !== undefined) {\n // `IconChildrenProps`: render the caller's node (an inline SVG, a `react-icons`\n // component, …) in place of a class-based glyph. Library/variant/features don't apply.\n return (\n <span\n className={iconContainerClasses}\n aria-label={ariaLabel}\n style={style}\n {...rest}\n >\n {children}\n </span>\n );\n }\n\n // `name` is guaranteed once `children` is absent UNLESS the caller is on the deprecated\n // `icon` path, which `IconDeprecatedProps` declares with `name?: undefined`.\n // (`IconChildrenProps['children']` excludes `undefined`, so `children={undefined}` can't\n // slip past into this branch.) The cast covers that third member, and the `!name && icon`\n // fallback below is what fills it in.\n let finalName = name as string;\n if (!name && icon) {\n // If icon prop is provided instead of name, try to parse it\n // e.g., \"mdi mdi-rocket-launch\" -> \"rocket-launch\"\n if (typeof icon === 'string') {\n const parts = icon.split(' ');\n const lastPart = parts[parts.length - 1];\n if (lastPart.startsWith('mdi-')) {\n finalName = lastPart.substring(4); // Remove \"mdi-\" prefix\n } else if (lastPart.startsWith('fa-')) {\n finalName = lastPart.substring(3); // Remove \"fa-\" prefix\n } else {\n finalName = lastPart;\n }\n }\n }\n\n const finalLibrary = library || defaultLibrary || 'fa';\n\n // Normalize a redundant leading library prefix (e.g. \"fa-check\" -> \"check\" when the\n // library is 'fa'), so `name` behaves identically with or without the prefix.\n finalName = stripRedundantLibraryPrefix(finalName, finalLibrary);\n\n if (!finalName) {\n // No glyph to name. Reachable through the public type only as `icon=\"\"`, and otherwise\n // by a plain-JS caller (or one that casts). Building a class off an absent name produced\n // a bogus `fa-undefined` glyph; render the bare container instead, matching the\n // `children` branch.\n return (\n <span\n className={iconContainerClasses}\n aria-label={ariaLabel}\n style={style}\n {...rest}\n />\n );\n }\n\n // Backward compatibility: if libraryFeatures is provided, parse it for variant and features\n let finalVariant = variant;\n let finalFeatures = features;\n\n if (libraryFeatures && !variant && !features) {\n const legacyFeatures = Array.isArray(libraryFeatures)\n ? libraryFeatures\n : [libraryFeatures];\n\n // For Font Awesome, extract style from features\n if (finalLibrary === 'fa') {\n const faStyle = legacyFeatures.find(f =>\n [\n 'fas',\n 'far',\n 'fab',\n 'fal',\n 'fad',\n 'fat',\n 'solid',\n 'regular',\n 'brands',\n 'light',\n 'duotone',\n 'thin',\n ].includes(f)\n );\n if (faStyle) {\n finalVariant = faStyle;\n finalFeatures = legacyFeatures.filter(f => f !== faStyle);\n } else {\n finalFeatures = legacyFeatures;\n }\n }\n // For Material Icons/Symbols, extract style variant\n else if (\n finalLibrary === 'material-icons' ||\n finalLibrary === 'material-symbols'\n ) {\n const styleVariants =\n finalLibrary === 'material-icons'\n ? ['filled', 'outlined', 'round', 'sharp']\n : ['outlined', 'rounded', 'sharp'];\n\n const styleVariant = legacyFeatures.find(f => styleVariants.includes(f));\n if (styleVariant) {\n finalVariant = styleVariant;\n finalFeatures = legacyFeatures.filter(f => f !== styleVariant);\n } else {\n finalFeatures = legacyFeatures;\n }\n }\n // For others, all features go to finalFeatures\n else {\n finalFeatures = legacyFeatures;\n }\n }\n\n // Handle web components vs CSS-based icons\n if (finalLibrary === 'ion') {\n // For Ionicons, handle variant in the name\n let ionName = finalName;\n if (finalVariant === 'outline') {\n ionName = `${finalName}-outline`;\n } else if (finalVariant === 'sharp') {\n ionName = `${finalName}-sharp`;\n }\n\n return (\n <span\n className={iconContainerClasses}\n aria-label={ariaLabel}\n style={style}\n {...rest}\n >\n <ion-icon name={ionName} />\n </span>\n );\n }\n\n // Legacy CSS-based icons\n const iClasses = getIconClasses(\n finalLibrary,\n finalName,\n finalVariant,\n finalFeatures\n );\n\n // Material Icons and Material Symbols use text content, not CSS classes for the icon name\n if (\n finalLibrary === 'material-icons' ||\n finalLibrary === 'material-symbols'\n ) {\n return (\n <span\n className={iconContainerClasses}\n aria-label={ariaLabel}\n style={style}\n {...rest}\n >\n <i className={iClasses}>{finalName}</i>\n </span>\n );\n }\n\n return (\n <span\n className={iconContainerClasses}\n aria-label={ariaLabel}\n style={style}\n {...rest}\n >\n <i className={iClasses} />\n </span>\n );\n};\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport {\n Icon,\n IconChildrenProps,\n IconDeprecatedProps,\n IconNameProps,\n} from '../elements/Icon';\n\n/**\n * Props for the Panel component.\n */\nexport interface PanelProps\n extends\n React.HTMLAttributes<HTMLElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Bulma color modifier for the panel. */\n color?:\n | 'primary'\n | 'link'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger'\n | 'black'\n | 'dark'\n | 'light'\n | 'white';\n /** Additional CSS classes. */\n className?: string;\n /** Panel content (usually includes subcomponents). */\n children?: React.ReactNode;\n}\n\n/**\n * Props for the PanelHeading component.\n */\nexport interface PanelHeadingProps extends React.HTMLAttributes<HTMLParagraphElement> {\n /** Additional CSS classes. */\n className?: string;\n /** Heading content. */\n children?: React.ReactNode;\n}\n\n/**\n * Props for the PanelTabs component.\n */\nexport interface PanelTabsProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Additional CSS classes. */\n className?: string;\n /** Tabs content. */\n children?: React.ReactNode;\n}\n\n/**\n * Props for the PanelBlock component.\n */\nexport interface PanelBlockProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n /** Additional CSS classes. */\n className?: string;\n /** Whether the block is active. */\n active?: boolean;\n /** Block content. */\n children?: React.ReactNode;\n}\n\n/**\n * Props for the PanelIcon component.\n * Extends IconProps but uses 'panel-icon' as the container class.\n */\nexport type PanelIconProps =\n | Omit<IconNameProps, 'containerClassName'>\n | Omit<IconChildrenProps, 'containerClassName'>\n // `PanelIcon` spreads straight into `<Icon>`, so every member of `IconProps`\n // reaches it. Enumerating them by hand is what left the deprecated `icon`\n // path compiling on `Icon` and failing here, with an error naming `children`.\n | Omit<IconDeprecatedProps, 'containerClassName'>;\n\n/**\n * Props for the PanelInputBlock component.\n */\nexport interface PanelInputBlockProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Input value. */\n value?: string;\n /** Input change handler. */\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n /** Input placeholder. */\n placeholder?: string;\n /** Icon class for left icon (default 'fas fa-search'). */\n iconClassName?: string;\n}\n\n/**\n * Props for the PanelCheckboxBlock component.\n */\nexport interface PanelCheckboxBlockProps extends Omit<\n React.LabelHTMLAttributes<HTMLLabelElement>,\n 'onChange'\n> {\n /** Whether the checkbox is checked. */\n checked?: boolean;\n /** Checkbox change handler. */\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n /** Label/content. */\n children?: React.ReactNode;\n}\n\n/**\n * Props for the PanelButtonBlock component.\n */\nexport interface PanelButtonBlockProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** Button content. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Panel` component implements Bulma's versatile panel block for React.\n *\n * @function\n * @param {PanelProps} props - Props for the Panel component.\n * @returns {JSX.Element} The rendered panel.\n * @see {@link https://bulma.io/documentation/components/panel/ | Bulma Panel documentation}\n */\nconst PanelComponent: React.FC<PanelProps> = ({\n color,\n className,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color,\n ...props,\n });\n\n // Generate Bulma classes with prefix\n const bulmaClasses = usePrefixedClassNames('panel', {\n [`is-${color}`]: color,\n });\n\n const panelClasses = classNames(bulmaClasses, bulmaHelperClasses, className);\n\n return (\n <nav className={panelClasses} {...rest}>\n {children}\n </nav>\n );\n};\n\n/**\n * Main heading (renders as `<p class=\"panel-heading\">`)\n *\n * @function\n * @param {PanelHeadingProps} props - Props for the PanelHeading component.\n * @returns {JSX.Element} The rendered panel heading.\n */\nexport const PanelHeading: React.FC<PanelHeadingProps> = ({\n className,\n children,\n ...props\n}) => (\n <p\n className={classNames(usePrefixedClassNames('panel-heading'), className)}\n {...props}\n >\n {children}\n </p>\n);\n\n/**\n * Panel tabs (renders as `<p class=\"panel-tabs\">`)\n *\n * @function\n * @param {PanelTabsProps} props - Props for the PanelTabs component.\n * @returns {JSX.Element} The rendered panel tabs.\n */\nexport const PanelTabs: React.FC<PanelTabsProps> = ({\n className,\n children,\n ...props\n}) => (\n <p\n className={classNames(usePrefixedClassNames('panel-tabs'), className)}\n {...props}\n >\n {children}\n </p>\n);\n\n/**\n * Individual panel block (renders as `<a class=\"panel-block\">`)\n *\n * @function\n * @param {PanelBlockProps} props - Props for the PanelBlock component.\n * @returns {JSX.Element} The rendered panel block.\n */\nexport const PanelBlock: React.FC<PanelBlockProps> = ({\n className,\n active,\n children,\n ...props\n}) => (\n <a\n className={classNames(\n usePrefixedClassNames('panel-block', { 'is-active': active }),\n className\n )}\n {...props}\n >\n {children}\n </a>\n);\n\n/**\n * Icon wrapper with panel styling (renders as `<span class=\"panel-icon\">`, containing an\n * `<i/>` when a `name` is given, or the custom node passed as `children`).\n * Accepts all Icon props (`name`, `variant`, `features`, etc.), or `children` for a custom node.\n *\n * @function\n * @param {PanelIconProps} props - Props for the PanelIcon component.\n * @returns {JSX.Element} The rendered panel icon.\n */\nexport const PanelIcon: React.FC<PanelIconProps> = ({\n className,\n ...props\n}) => (\n <Icon\n containerClassName={classNames(\n usePrefixedClassNames('panel-icon'),\n className\n )}\n {...props}\n />\n);\n\n/**\n * Search input with icon (renders as `<div class=\"panel-block\">`)\n *\n * @function\n * @param {PanelInputBlockProps} props - Props for the PanelInputBlock component.\n * @returns {JSX.Element} The rendered panel input block.\n */\nexport const PanelInputBlock: React.FC<PanelInputBlockProps> = ({\n value,\n onChange,\n placeholder,\n iconClassName = 'fas fa-search',\n ...props\n}) => {\n const inputClass = usePrefixedClassNames('input');\n\n return (\n <div className={usePrefixedClassNames('panel-block')} {...props}>\n <p className={usePrefixedClassNames('control', 'has-icons-left')}>\n <input\n className={inputClass}\n type=\"text\"\n placeholder={placeholder}\n value={value}\n onChange={onChange}\n />\n <span className={usePrefixedClassNames('icon', 'is-left')}>\n <i className={iconClassName} aria-hidden=\"true\"></i>\n </span>\n </p>\n </div>\n );\n};\n\n/**\n * Checkbox block (renders as `<label class=\"panel-block\">`)\n *\n * @function\n * @param {PanelCheckboxBlockProps} props - Props for the PanelCheckboxBlock component.\n * @returns {JSX.Element} The rendered panel checkbox block.\n */\nexport const PanelCheckboxBlock: React.FC<PanelCheckboxBlockProps> = ({\n checked,\n onChange,\n children,\n ...props\n}) => (\n <label className={usePrefixedClassNames('panel-block')} {...props}>\n <input type=\"checkbox\" checked={checked} onChange={onChange} />\n {children}\n </label>\n);\n\n/**\n * Call-to-action button (renders as `<div class=\"panel-block\"><button /></div>`)\n *\n * @function\n * @param {PanelButtonBlockProps} props - Props for the PanelButtonBlock component.\n * @returns {JSX.Element} The rendered panel button block.\n */\nexport const PanelButtonBlock: React.FC<PanelButtonBlockProps> = ({\n children,\n className,\n ...props\n}) => (\n <div className={usePrefixedClassNames('panel-block')}>\n <button\n className={classNames(\n usePrefixedClassNames(\n 'button',\n 'is-link',\n 'is-outlined',\n 'is-fullwidth'\n ),\n className\n )}\n {...props}\n >\n {children}\n </button>\n </div>\n);\n\nexport const Panel = withSubComponents(\n PanelComponent,\n {\n Heading: PanelHeading,\n Tabs: PanelTabs,\n Block: PanelBlock,\n Icon: PanelIcon,\n InputBlock: PanelInputBlock,\n CheckboxBlock: PanelCheckboxBlock,\n ButtonBlock: PanelButtonBlock,\n },\n 'Panel'\n);\n\nexport default Panel;\n","import React, { createContext, useContext, useState, useCallback } from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { warnDeprecatedColorProp } from '../helpers/colorDeprecations';\nimport { Icon } from '../elements/Icon';\n\n// ---------------------------------------------------------------------------\n// Context\n// ---------------------------------------------------------------------------\n\ninterface TabsContextValue {\n activeTab: number;\n setActiveTab: (index: number) => void;\n}\n\nconst TabsContext = createContext<TabsContextValue | null>(null);\n\nfunction useTabsContext(): TabsContextValue | null {\n return useContext(TabsContext);\n}\n\n// ---------------------------------------------------------------------------\n// Tabs (root)\n// ---------------------------------------------------------------------------\n\n/**\n * Props for the Tabs component.\n */\nexport interface TabsProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Tab alignment. */\n align?: 'centered' | 'right' | 'left';\n /** Tab size. */\n size?: 'small' | 'medium' | 'large';\n /** Tabs expand to fill the horizontal space. */\n isFullwidth?: boolean;\n /** Tabs expand to fill the horizontal space. @deprecated Use `isFullwidth` instead — `isFullwidth` wins if both are set. */\n isFullWidth?: boolean;\n /** Tabs expand to fill the horizontal space. @deprecated Use `isFullwidth` instead — `isFullwidth` wins if both are set. */\n fullwidth?: boolean;\n /** Tabs use the boxed style. */\n boxed?: boolean;\n /** Tabs use the toggle style. */\n toggle?: boolean;\n /** Tabs use the rounded toggle style (only with `toggle`). */\n rounded?: boolean;\n /**\n * Bulma color for tab underlines and active state (renders `is-<color>`).\n *\n * Bulma ships no tabs color CSS, so this prop has never had a visual effect\n * for any value. Passing it logs a console warning in development.\n * @deprecated No `.tabs.is-<color>` CSS exists; the prop renders unstyled\n * and will be removed in the next major version.\n */\n color?:\n | 'primary'\n | 'link'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger'\n | 'black'\n | 'dark'\n | 'light'\n | 'white';\n /** Controlled active tab index. */\n value?: number;\n /** Callback when active tab changes. */\n onChange?: (index: number) => void;\n /** Initial active tab index (uncontrolled). */\n defaultValue?: number;\n /** Renders tabs vertically. */\n vertical?: boolean;\n /** Side placement when `vertical` is true. */\n side?: 'left' | 'right';\n /** Makes tabs take up the full width equally. */\n expanded?: boolean;\n /** Additional CSS classes. */\n className?: string;\n /** Tab list and tab items. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Tabs` component provides flexible and fully-featured Bulma tab navigation for your Bulma React UI.\n *\n * @function\n * @param {TabsProps} props - Props for the Tabs component.\n * @returns {JSX.Element} The rendered tabs component.\n * @see {@link https://bulma.io/documentation/components/tabs/ | Bulma Tabs documentation}\n *\n * @example\n * // Basic tabs\n * <Tabs>\n * <Tabs.List>\n * <Tabs.Tab index={0}>Pictures</Tabs.Tab>\n * <Tabs.Tab index={1}>Music</Tabs.Tab>\n * </Tabs.List>\n * <Tabs.Content>\n * <Tabs.Content.Item index={0}>Pictures content</Tabs.Content.Item>\n * <Tabs.Content.Item index={1}>Music content</Tabs.Content.Item>\n * </Tabs.Content>\n * </Tabs>\n */\nconst TabsComponent: React.FC<TabsProps> = ({\n align,\n size,\n isFullwidth,\n isFullWidth,\n fullwidth,\n boxed,\n toggle,\n rounded,\n color,\n value,\n onChange,\n defaultValue = 0,\n vertical,\n side,\n expanded,\n className,\n children,\n ...props\n}) => {\n warnDeprecatedColorProp(\n 'Tabs',\n color,\n 'Remove the prop; no replacement exists.'\n );\n\n const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });\n\n // Controlled vs uncontrolled state\n const isControlled = value !== undefined;\n const [internalTab, setInternalTab] = useState(defaultValue);\n const activeTab = isControlled ? value : internalTab;\n\n const setActiveTab = useCallback(\n (index: number) => {\n if (!isControlled) {\n setInternalTab(index);\n }\n onChange?.(index);\n },\n [isControlled, onChange]\n );\n\n const contextValue: TabsContextValue = { activeTab, setActiveTab };\n\n // Build classes for the .tabs div\n const tabsClasses = usePrefixedClassNames('tabs', {\n [`is-${align}`]: align,\n [`is-${size}`]: size,\n [`is-${color}`]: color,\n 'is-fullwidth': isFullwidth ?? isFullWidth ?? fullwidth,\n 'is-boxed': boxed,\n 'is-toggle': toggle,\n 'is-toggle-rounded': rounded,\n });\n\n // Check if children include TabsContent\n const childArray = React.Children.toArray(children);\n const hasContent = childArray.some(\n child => React.isValidElement(child) && child.type === TabsContent\n );\n\n // Hoisted unconditionally to respect rules-of-hooks. Modifiers gate themselves\n // via their truthy values — `tabs-root` is always prefixed, modifiers only\n // apply in the vertical-with-content branch.\n const rootClasses = usePrefixedClassNames('tabs-root', {\n 'is-vertical': hasContent && vertical,\n 'is-right': hasContent && vertical && side === 'right',\n 'is-expanded': hasContent && vertical && expanded,\n });\n\n if (hasContent && vertical) {\n const combinedRootClasses = classNames(\n rootClasses,\n bulmaHelperClasses,\n className\n );\n\n // Split children into list-like and content children\n const listChildren: React.ReactNode[] = [];\n const contentChildren: React.ReactNode[] = [];\n childArray.forEach(child => {\n if (React.isValidElement(child) && child.type === TabsContent) {\n contentChildren.push(child);\n } else {\n listChildren.push(child);\n }\n });\n\n return (\n <TabsContext.Provider value={contextValue}>\n <div className={combinedRootClasses} {...rest}>\n <div className={tabsClasses}>{listChildren}</div>\n {contentChildren}\n </div>\n </TabsContext.Provider>\n );\n }\n\n if (hasContent) {\n const combinedRootClasses = classNames(\n rootClasses,\n bulmaHelperClasses,\n className\n );\n\n const listChildren: React.ReactNode[] = [];\n const contentChildren: React.ReactNode[] = [];\n childArray.forEach(child => {\n if (React.isValidElement(child) && child.type === TabsContent) {\n contentChildren.push(child);\n } else {\n listChildren.push(child);\n }\n });\n\n return (\n <TabsContext.Provider value={contextValue}>\n <div className={combinedRootClasses} {...rest}>\n <div className={tabsClasses}>{listChildren}</div>\n {contentChildren}\n </div>\n </TabsContext.Provider>\n );\n }\n\n // No content children — backward compatible single .tabs div\n const combinedClasses = classNames(\n tabsClasses,\n bulmaHelperClasses,\n className\n );\n\n return (\n <TabsContext.Provider value={contextValue}>\n <div className={combinedClasses} {...rest}>\n {children}\n </div>\n </TabsContext.Provider>\n );\n};\n\n// ---------------------------------------------------------------------------\n// TabList\n// ---------------------------------------------------------------------------\n\n/**\n * Props for the TabList component.\n */\nexport interface TabListProps extends React.HTMLAttributes<HTMLUListElement> {\n /** Additional CSS classes. */\n className?: string;\n /** Tab elements. */\n children?: React.ReactNode;\n}\n\n/**\n * The `<ul>` container for tab items.\n *\n * @function\n * @param {TabListProps} props - Props for the TabList component.\n * @returns {JSX.Element} The rendered tab list.\n */\nexport const TabList: React.FC<TabListProps> = ({\n className,\n children,\n ...props\n}) => (\n <ul role=\"tablist\" className={classNames(className)} {...props}>\n {children}\n </ul>\n);\n\n// ---------------------------------------------------------------------------\n// Tab (new — context-aware)\n// ---------------------------------------------------------------------------\n\ntype IconLibrary = 'fa' | 'mdi' | 'ion' | 'material-icons' | 'material-symbols';\n\n/**\n * Props for the Tab component.\n */\nexport interface TabProps extends Omit<\n React.LiHTMLAttributes<HTMLLIElement>,\n 'onClick'\n> {\n /** **Required.** Tab index for matching with content. */\n index: number;\n /** Disables the tab. */\n disabled?: boolean;\n /** Icon name for the tab. */\n icon?: string;\n /** Icon library to use. */\n iconLibrary?: IconLibrary;\n /** Icon style variant (e.g., 'solid', 'outlined', 'rounded'). */\n iconVariant?: string;\n /** Size of the tab icon. */\n iconSize?: 'small' | 'medium' | 'large';\n /** Additional icon modifiers. */\n iconFeatures?: string | string[];\n /** Additional CSS classes. */\n className?: string;\n /** Tab label content. */\n children?: React.ReactNode;\n}\n\n/**\n * Individual tab button. Consumes Tabs context for active state management.\n * Renders `<a>` internally — consumers provide only the label text/children.\n *\n * @function\n * @param {TabProps} props - Props for the Tab component.\n * @returns {JSX.Element} The rendered tab.\n */\nexport const Tab: React.FC<TabProps> = ({\n index,\n disabled,\n icon,\n iconLibrary,\n iconVariant,\n iconSize = 'small',\n iconFeatures,\n className,\n children,\n ...props\n}) => {\n const ctx = useTabsContext();\n const isActive = ctx ? ctx.activeTab === index : false;\n\n const activeClass = usePrefixedClassNames({ 'is-active': isActive });\n\n const handleClick = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n if (!disabled && ctx) {\n ctx.setActiveTab(index);\n }\n },\n [disabled, ctx, index]\n );\n\n return (\n <li\n className={classNames(activeClass, className)}\n role=\"tab\"\n aria-selected={isActive}\n tabIndex={disabled ? -1 : 0}\n {...props}\n >\n <a onClick={handleClick} aria-disabled={disabled || undefined}>\n {icon && (\n <Icon\n name={icon}\n library={iconLibrary}\n variant={iconVariant}\n size={iconSize}\n features={iconFeatures}\n />\n )}\n {children && <span>{children}</span>}\n </a>\n </li>\n );\n};\n\n// ---------------------------------------------------------------------------\n// TabItem (backward-compatible — no context)\n// ---------------------------------------------------------------------------\n\n/**\n * Props for the TabItem component (backward-compatible).\n */\nexport interface TabItemProps extends React.LiHTMLAttributes<HTMLLIElement> {\n /** Whether the tab is active. */\n active?: boolean;\n /** Additional CSS classes. */\n className?: string;\n /** Tab content. */\n children?: React.ReactNode;\n /** Click handler. */\n onClick?: React.MouseEventHandler<HTMLLIElement>;\n}\n\n/**\n * Each tab; accepts `active`, `onClick`, etc.\n *\n * @function\n * @param {TabItemProps} props - Props for the TabItem component.\n * @returns {JSX.Element} The rendered tab item.\n * @deprecated Use `Tabs.Tab` with an `index` prop instead.\n */\nexport const TabItem: React.FC<TabItemProps> = ({\n active,\n className,\n children,\n onClick,\n ...props\n}) => (\n <li\n className={classNames(\n { [usePrefixedClassNames('is-active')]: active },\n className\n )}\n onClick={onClick}\n {...props}\n >\n {children}\n </li>\n);\n\n// ---------------------------------------------------------------------------\n// TabsContent\n// ---------------------------------------------------------------------------\n\n/**\n * Props for the TabsContent component.\n */\nexport interface TabsContentProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Additional CSS classes. */\n className?: string;\n /** TabContentItem elements. */\n children?: React.ReactNode;\n}\n\n/**\n * Container for tab content panels. No custom props beyond `children` and standard `<div>` HTML attributes. Applies the `.tabs-content` class.\n *\n * @function\n * @param {TabsContentProps} props - Props for the TabsContent component.\n * @returns {JSX.Element} The rendered tabs content wrapper.\n */\nconst TabsContentComponent: React.FC<TabsContentProps> = ({\n className,\n children,\n ...props\n}) => {\n const contentClass = usePrefixedClassNames('tabs-content');\n return (\n <div className={classNames(contentClass, className)} {...props}>\n {children}\n </div>\n );\n};\n\n// ---------------------------------------------------------------------------\n// TabContentItem\n// ---------------------------------------------------------------------------\n\n/**\n * Props for the TabContentItem component.\n */\nexport interface TabContentItemProps extends React.HTMLAttributes<HTMLDivElement> {\n /** **Required.** Tab index for matching with content. */\n index: number;\n /** Additional CSS classes. */\n className?: string;\n /** Panel content. */\n children?: React.ReactNode;\n}\n\n/**\n * Individual content panel. Shows/hides based on active tab from context.\n *\n * @function\n * @param {TabContentItemProps} props - Props for the TabContentItem component.\n * @returns {JSX.Element} The rendered tab content panel.\n */\nexport const TabContentItem: React.FC<TabContentItemProps> = ({\n index,\n className,\n children,\n ...props\n}) => {\n const ctx = useTabsContext();\n const isActive = ctx ? ctx.activeTab === index : false;\n\n const itemClass = usePrefixedClassNames('tabs-content-item', {\n 'is-active': isActive,\n });\n\n return (\n <div\n className={classNames(itemClass, className)}\n role=\"tabpanel\"\n aria-hidden={!isActive}\n {...props}\n >\n {children}\n </div>\n );\n};\n\n// ---------------------------------------------------------------------------\n// Static property attachment\n// ---------------------------------------------------------------------------\n\nexport const TabsContent = withSubComponents(TabsContentComponent, {\n Item: TabContentItem,\n});\n\nexport const Tabs = withSubComponents(\n TabsComponent,\n {\n List: TabList,\n Tab,\n Item: TabItem,\n Content: TabsContent,\n },\n 'Tabs'\n);\n\nexport default Tabs;\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { useScrollLock } from '../helpers/scrollLock';\n\n/**\n * Overlay opacity levels for the Loading background.\n */\nexport type LoadingOverlay = 'light' | 'dark' | 'opaque';\n\n/**\n * Color variants for the Loading spinner.\n */\nexport type LoadingColor =\n 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n\n/**\n * Props for the Loading component.\n * @extraProp {React.ReactNode} [children] - Content to display below the spinner.\n * @extraProp {string} [className] - Additional CSS classes.\n */\nexport interface LoadingProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, 'color'>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size' | 'overlay'> {\n /** Whether the loading overlay is visible. */\n active?: boolean;\n /** Cover the entire viewport. */\n isFullPage?: boolean;\n /** Size of the loading spinner. */\n size?: 'small' | 'medium' | 'large';\n /** Color variant for the spinner. Default is light grey. */\n color?: LoadingColor;\n /** Show a cancel button and allow closing. */\n canCancel?: boolean;\n /** Callback when cancel is triggered. */\n onCancel?: () => void;\n /** Additional classes for the overlay. */\n overlayClassName?: string;\n /** Additional classes for the spinner icon. */\n iconClassName?: string;\n /** Custom loading indicator element. */\n indicator?: React.ReactNode;\n /** Style of the loading overlay. */\n overlay?: LoadingOverlay;\n}\n\n/**\n * The `Loading` component provides a loading overlay with a spinner animation.\n *\n * @function\n * @param {LoadingProps} props - Props for the Loading component.\n * @returns {JSX.Element | null} The rendered loading overlay or null if not active.\n *\n * @example\n * // Full page loading\n * <Loading active isFullPage />\n *\n * @example\n * // Container loading with message\n * <div style={{ position: 'relative', height: '200px' }}>\n * <Loading active>Loading data...</Loading>\n * </div>\n *\n * @example\n * // With color variant\n * <Loading active color=\"primary\" />\n *\n * @example\n * // With cancel functionality\n * <Loading\n * active={isLoading}\n * canCancel\n * onCancel={() => setIsLoading(false)}\n * />\n */\nexport const Loading: React.FC<LoadingProps> = ({\n active = false,\n isFullPage = false,\n size,\n color,\n canCancel = false,\n onCancel,\n children,\n className,\n overlayClassName,\n iconClassName,\n indicator,\n overlay,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses(props);\n\n // Generate Bulma classes with prefix\n const loadingClasses = usePrefixedClassNames('loading', {\n 'is-active': active,\n 'is-full-page': isFullPage,\n 'is-cancelable': canCancel,\n [`is-${overlay}`]: !!overlay,\n [`is-${color}`]: !!color,\n });\n\n const iconClasses = usePrefixedClassNames('loading-icon', {\n [`is-${size}`]: size,\n });\n\n // Combine classes\n const combinedClasses = classNames(\n loadingClasses,\n bulmaHelperClasses,\n className\n );\n const combinedOverlayClasses = classNames(\n usePrefixedClassNames('loading-overlay'),\n overlayClassName\n );\n const combinedIconClasses = classNames(iconClasses, iconClassName);\n const loadingContentClass = usePrefixedClassNames('loading-content');\n const loadingIconCustomClass = usePrefixedClassNames('loading-icon-custom');\n const loadingTextClass = usePrefixedClassNames('loading-text');\n const loadingCancelClass = usePrefixedClassNames('loading-cancel');\n\n // Handle cancel click\n const handleOverlayClick = () => {\n if (canCancel && onCancel) {\n onCancel();\n }\n };\n\n // Handle escape key\n React.useEffect(() => {\n if (!active || !canCancel || !onCancel) return;\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n onCancel();\n }\n };\n\n document.addEventListener('keydown', handleKeyDown);\n return () => document.removeEventListener('keydown', handleKeyDown);\n }, [active, canCancel, onCancel]);\n\n // Prevent body scroll when full page loading is active. Ref-counted through\n // the shared helper so an overlapping Modal/Dialog/Sidebar doesn't have its\n // lock cleared when this one releases.\n useScrollLock(isFullPage && active);\n\n if (!active) {\n return null;\n }\n\n return (\n <div\n className={combinedClasses}\n role=\"alert\"\n aria-busy=\"true\"\n aria-label=\"Loading\"\n {...rest}\n >\n <div\n className={combinedOverlayClasses}\n onClick={handleOverlayClick}\n aria-hidden=\"true\"\n />\n <div className={loadingContentClass}>\n {indicator ? (\n <span className={loadingIconCustomClass}>{indicator}</span>\n ) : (\n <span className={combinedIconClasses} />\n )}\n {children && <div className={loadingTextClass}>{children}</div>}\n {canCancel && (\n <button\n type=\"button\"\n className={loadingCancelClass}\n onClick={onCancel}\n aria-label=\"Cancel loading\"\n >\n Cancel\n </button>\n )}\n </div>\n </div>\n );\n};\n\nexport default Loading;\n","import React, { useState, useRef, useEffect, useCallback, useId } from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\n\n/**\n * Props for the Collapse component.\n * @extraProp {React.ReactNode} [children] - The collapsible content.\n * @extraProp {string} [className] - Additional CSS classes.\n */\nexport interface CollapseProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, 'color'>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Controlled open state. If provided, component is controlled. */\n open?: boolean;\n /** Initial open state for uncontrolled usage. */\n defaultOpen?: boolean;\n /** Callback when collapse opens. */\n onOpen?: () => void;\n /** Callback when collapse closes. */\n onClose?: () => void;\n /** The clickable trigger element (header/button). */\n trigger?: React.ReactNode;\n /** Animation style, or `false` to disable. */\n animation?: 'fade' | 'slide' | false;\n /** Position of the trigger relative to content. */\n position?: 'top' | 'bottom';\n /**\n * Custom aria id for accessibility.\n * @defaultValue auto\n */\n ariaId?: string;\n /** Adds a border around the collapse. */\n bordered?: boolean;\n /** Additional classes for the trigger wrapper. */\n triggerClassName?: string;\n /** Additional classes for the content wrapper. */\n contentClassName?: string;\n}\n\n/**\n * The `Collapse` component provides an expandable/collapsible content panel.\n *\n * @function\n * @param {CollapseProps} props - Props for the Collapse component.\n * @returns {JSX.Element} The rendered collapse component.\n *\n * @example\n * // Basic uncontrolled collapse\n * <Collapse trigger={<button>Click to toggle</button>}>\n * <p>Collapsible content here</p>\n * </Collapse>\n *\n * @example\n * // Controlled collapse\n * const [isOpen, setIsOpen] = useState(false);\n * <Collapse\n * open={isOpen}\n * trigger={<button onClick={() => setIsOpen(!isOpen)}>Toggle</button>}\n * >\n * <p>Content</p>\n * </Collapse>\n *\n * @example\n * // With callbacks\n * <Collapse\n * trigger={<button>Toggle</button>}\n * onOpen={() => console.log('Opened!')}\n * onClose={() => console.log('Closed!')}\n * >\n * <p>Content</p>\n * </Collapse>\n */\nexport const Collapse: React.FC<CollapseProps> = ({\n open: controlledOpen,\n defaultOpen = false,\n onOpen,\n onClose,\n trigger,\n animation = 'fade',\n position = 'top',\n ariaId,\n bordered,\n children,\n className,\n triggerClassName,\n contentClassName,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses(props);\n const contentRef = useRef<HTMLDivElement>(null);\n const [height, setHeight] = useState<number | 'auto'>(\n defaultOpen ? 'auto' : 0\n );\n\n // Determine if controlled or uncontrolled\n const isControlled = controlledOpen !== undefined;\n const [internalOpen, setInternalOpen] = useState(defaultOpen);\n const isOpen = isControlled ? controlledOpen : internalOpen;\n\n // Generate unique ID for accessibility (useId is SSR-safe and stable across\n // renders; works in React 18 and 19).\n const generatedId = useId();\n const uniqueId = ariaId || generatedId;\n\n // Update height when open state changes (for 'slide' animation)\n useEffect(() => {\n if (!contentRef.current) return undefined;\n if (animation !== 'slide') return undefined;\n\n if (isOpen) {\n // Opening: set height to content's scrollHeight\n const contentHeight = contentRef.current.scrollHeight;\n setHeight(contentHeight);\n\n // After animation completes, set to auto for dynamic content\n const timer = setTimeout(() => {\n setHeight('auto');\n }, 300); // Match CSS transition duration\n return () => clearTimeout(timer);\n } else {\n // Closing: first set to current height, then to 0\n if (height === 'auto') {\n // Read scrollHeight and offsetHeight to capture the current size and\n // force a layout flush, then schedule the height transition to 0.\n // (Reading offsetHeight after assignment is the standard reflow trick;\n // assigning into a state setter avoids a bare expression statement.)\n const currentHeight = contentRef.current.scrollHeight;\n const reflowHeight = contentRef.current.offsetHeight;\n setHeight(Math.max(currentHeight, reflowHeight));\n requestAnimationFrame(() => {\n setHeight(0);\n });\n } else {\n setHeight(0);\n }\n }\n return undefined;\n // `height` is read here but is an output of this effect; re-running when it\n // changes would re-trigger the open/close animation, so it's intentionally\n // excluded from the deps.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isOpen, animation]);\n\n // Handle toggle\n const handleToggle = useCallback(() => {\n if (!isControlled) {\n const newOpen = !internalOpen;\n setInternalOpen(newOpen);\n if (newOpen) {\n onOpen?.();\n } else {\n onClose?.();\n }\n }\n }, [isControlled, internalOpen, onOpen, onClose]);\n\n // Handle keyboard interaction\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleToggle();\n }\n },\n [handleToggle]\n );\n\n // Generate Bulma classes\n const collapseClasses = usePrefixedClassNames('collapse', {\n 'is-active': isOpen,\n 'is-bordered': bordered,\n });\n\n const combinedClasses = classNames(\n collapseClasses,\n bulmaHelperClasses,\n className\n );\n const combinedTriggerClasses = classNames(\n usePrefixedClassNames('collapse-trigger'),\n triggerClassName\n );\n const combinedContentClasses = classNames(\n usePrefixedClassNames('collapse-content', {\n 'is-active': isOpen,\n }),\n contentClassName\n );\n\n // Content wrapper styles based on animation type\n let contentWrapperStyle: React.CSSProperties;\n\n if (animation === 'slide') {\n contentWrapperStyle = {\n height: height === 'auto' ? 'auto' : `${height}px`,\n overflow: 'hidden',\n transition: 'height 0.3s ease-in-out',\n };\n } else if (animation === 'fade') {\n contentWrapperStyle = {\n opacity: isOpen ? 1 : 0,\n overflow: 'hidden',\n height: isOpen ? 'auto' : 0,\n transition: 'opacity 0.3s ease-in-out',\n };\n } else {\n contentWrapperStyle = {\n display: isOpen ? 'block' : 'none',\n };\n }\n\n const triggerElement = (\n <div\n className={combinedTriggerClasses}\n onClick={handleToggle}\n onKeyDown={handleKeyDown}\n role=\"button\"\n tabIndex={0}\n aria-expanded={isOpen}\n aria-controls={uniqueId}\n >\n {trigger}\n </div>\n );\n\n const contentElement = (\n <div style={contentWrapperStyle}>\n <div\n ref={contentRef}\n id={uniqueId}\n className={combinedContentClasses}\n aria-hidden={!isOpen}\n >\n {children}\n </div>\n </div>\n );\n\n return (\n <div className={combinedClasses} {...rest}>\n {position === 'bottom' ? (\n <>\n {contentElement}\n {triggerElement}\n </>\n ) : (\n <>\n {triggerElement}\n {contentElement}\n </>\n )}\n </div>\n );\n};\n\nexport default Collapse;\n","import React, {\n useState,\n useRef,\n useEffect,\n useLayoutEffect,\n useCallback,\n} from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\n\n/** Screen positions for the tooltip. */\nexport type TooltipPosition = 'top' | 'bottom' | 'left' | 'right' | 'auto';\n/** Color variants for the tooltip. */\nexport type TooltipColor =\n | 'primary'\n | 'link'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger'\n | 'dark'\n | 'light';\n/** Size variants for the tooltip. */\nexport type TooltipSize = 'small' | 'medium' | 'large';\n\n/**\n * Props for the Tooltip component.\n * @extraProp {React.ReactNode} [children] - The element that triggers the tooltip.\n * @extraProp {string} [className] - Additional CSS classes.\n */\nexport interface TooltipProps\n extends\n Omit<React.HTMLAttributes<HTMLSpanElement>, 'color' | 'content'>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** The tooltip text content. */\n label?: string;\n /** Rich tooltip content (alternative to `label`). */\n content?: React.ReactNode;\n /** Position of the tooltip. Default: 'top'. */\n position?: TooltipPosition;\n /** Color variant for the tooltip. */\n color?: TooltipColor;\n /** Size of the tooltip. */\n size?: TooltipSize;\n /** Force tooltip to be always visible. */\n active?: boolean;\n /** Allow tooltip to wrap to multiple lines. */\n multiline?: boolean;\n /** Enable fade animation. Default: true. */\n animated?: boolean;\n /** Use square corners instead of rounded. */\n square?: boolean;\n /** Show dashed underline on trigger. */\n dashed?: boolean;\n /** Delay before showing tooltip (ms). */\n delay?: number;\n /** Delay in ms before hiding the tooltip. */\n closeDelay?: number;\n /** Additional classes for the tooltip element. */\n tooltipClassName?: string;\n}\n\n/**\n * The `Tooltip` component displays helpful information when users hover over or focus on an element.\n *\n * @function\n * @param {TooltipProps} props - Props for the Tooltip component.\n * @returns {JSX.Element} The rendered tooltip wrapper.\n *\n * @example\n * // Basic tooltip\n * <Tooltip label=\"This is helpful info\">\n * <button>Hover me</button>\n * </Tooltip>\n *\n * @example\n * // Positioned tooltip with color\n * <Tooltip label=\"Delete item\" position=\"right\" color=\"danger\">\n * <Icon icon=\"fas fa-trash\" />\n * </Tooltip>\n *\n * @example\n * // Multiline tooltip\n * <Tooltip label=\"This is a longer tooltip that wraps to multiple lines\" multiline>\n * <span>?</span>\n * </Tooltip>\n */\nexport const Tooltip: React.FC<TooltipProps> = ({\n label,\n content,\n position = 'top',\n color,\n size,\n active: alwaysActive,\n multiline = false,\n animated = true,\n square = false,\n dashed = false,\n delay = 0,\n closeDelay = 0,\n children,\n className,\n tooltipClassName,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses(props);\n const [isVisible, setIsVisible] = useState(false);\n const [isHovering, setIsHovering] = useState(false);\n const [resolvedPosition, setResolvedPosition] = useState<\n Exclude<TooltipPosition, 'auto'>\n >(position === 'auto' ? 'top' : position);\n const [contentStyle, setContentStyle] = useState<React.CSSProperties>({});\n const openTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const closeTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const wrapperRef = useRef<HTMLSpanElement | null>(null);\n const contentRef = useRef<HTMLSpanElement | null>(null);\n\n // Clear timeouts on unmount\n useEffect(() => {\n return () => {\n if (openTimeoutRef.current) {\n clearTimeout(openTimeoutRef.current);\n }\n if (closeTimeoutRef.current) {\n clearTimeout(closeTimeoutRef.current);\n }\n };\n }, []);\n\n // Handle delayed visibility\n useEffect(() => {\n if (isHovering) {\n if (closeTimeoutRef.current) {\n clearTimeout(closeTimeoutRef.current);\n closeTimeoutRef.current = null;\n }\n if (delay > 0) {\n openTimeoutRef.current = setTimeout(() => {\n setIsVisible(true);\n }, delay);\n } else {\n // eslint-disable-next-line react-hooks/set-state-in-effect -- show immediately on hover when no delay\n setIsVisible(true);\n }\n } else {\n if (openTimeoutRef.current) {\n clearTimeout(openTimeoutRef.current);\n openTimeoutRef.current = null;\n }\n if (closeDelay > 0) {\n closeTimeoutRef.current = setTimeout(() => {\n setIsVisible(false);\n }, closeDelay);\n } else {\n setIsVisible(false);\n }\n }\n }, [isHovering, delay, closeDelay]);\n\n // Auto-placement and overflow correction\n useLayoutEffect(() => {\n const isAuto = position === 'auto';\n\n if (!isAuto) {\n // eslint-disable-next-line react-hooks/set-state-in-effect -- layout measurement effect resolves placement\n setResolvedPosition(position);\n }\n\n const showing = isVisible || alwaysActive;\n if (!showing) {\n setContentStyle({});\n return;\n }\n\n const wrapper = wrapperRef.current;\n const content = contentRef.current;\n if (!wrapper || !content) return;\n\n const wrapperRect = wrapper.getBoundingClientRect();\n const margin = 40;\n const edgePadding = 8; // minimum distance from viewport edge\n\n // Step 1: determine position (auto mode only)\n if (isAuto) {\n const spaceTop = wrapperRect.top;\n const spaceBottom = window.innerHeight - wrapperRect.bottom;\n\n if (spaceTop >= margin) {\n setResolvedPosition('top');\n } else if (spaceBottom >= margin) {\n setResolvedPosition('bottom');\n } else if (window.innerWidth - wrapperRect.right >= wrapperRect.left) {\n setResolvedPosition('right');\n } else {\n setResolvedPosition('left');\n }\n }\n\n // Step 2: measure tooltip content and correct overflow.\n // Use requestAnimationFrame so the resolved position class is applied first.\n requestAnimationFrame(() => {\n const contentEl = contentRef.current;\n if (!contentEl) return;\n\n const contentRect = contentEl.getBoundingClientRect();\n const style: React.CSSProperties = {};\n\n // For top/bottom positions, tooltip is centered horizontally via CSS\n // (left: 50%; transform: translateX(-50%)).\n // Check if it overflows left or right and apply a corrective shift.\n const pos = isAuto ? undefined : position; // read from state won't be updated yet in auto\n const effectivePos = pos || 'top'; // fallback, actual is set by state\n const isVertical =\n effectivePos === 'top' ||\n effectivePos === 'bottom' ||\n resolvedPosition === 'top' ||\n resolvedPosition === 'bottom';\n\n if (isVertical) {\n if (contentRect.left < edgePadding) {\n // Overflows left — shift right\n const shift = edgePadding - contentRect.left;\n style.left = `calc(50% + ${shift}px)`;\n (style as Record<string, string>)['--tooltip-arrow-offset'] =\n `${-shift}px`;\n } else if (contentRect.right > window.innerWidth - edgePadding) {\n // Overflows right — shift left\n const shift = contentRect.right - (window.innerWidth - edgePadding);\n style.left = `calc(50% - ${shift}px)`;\n (style as Record<string, string>)['--tooltip-arrow-offset'] =\n `${shift}px`;\n }\n } else {\n // For left/right positions, tooltip is centered vertically via CSS\n // (top: 50%; transform: translateY(-50%)).\n if (contentRect.top < edgePadding) {\n const shift = edgePadding - contentRect.top;\n style.top = `calc(50% + ${shift}px)`;\n (style as Record<string, string>)['--tooltip-arrow-offset'] =\n `${-shift}px`;\n } else if (contentRect.bottom > window.innerHeight - edgePadding) {\n const shift = contentRect.bottom - (window.innerHeight - edgePadding);\n style.top = `calc(50% - ${shift}px)`;\n (style as Record<string, string>)['--tooltip-arrow-offset'] =\n `${shift}px`;\n }\n }\n\n setContentStyle(style);\n });\n }, [position, resolvedPosition, isVisible, alwaysActive, label, content]);\n\n const handleMouseEnter = useCallback(() => {\n setIsHovering(true);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setIsHovering(false);\n }, []);\n\n const handleFocus = useCallback(() => {\n setIsHovering(true);\n }, []);\n\n const handleBlur = useCallback(() => {\n setIsHovering(false);\n }, []);\n\n // Generate Bulma classes\n const tooltipClasses = usePrefixedClassNames('tooltip', {\n 'is-active': alwaysActive || isVisible,\n [`is-${resolvedPosition}`]: resolvedPosition,\n [`is-${color}`]: color,\n [`is-${size}`]: size,\n 'is-multiline': multiline,\n 'is-animated': animated,\n 'is-square': square,\n 'is-dashed': dashed,\n });\n\n const combinedClasses = classNames(\n tooltipClasses,\n bulmaHelperClasses,\n className\n );\n const combinedTooltipClasses = usePrefixedClassNames(\n 'tooltip-content',\n tooltipClassName\n );\n\n return (\n <span\n ref={wrapperRef}\n className={combinedClasses}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...(label ? { 'data-tooltip': label } : {})}\n {...rest}\n >\n {children}\n <span\n ref={contentRef}\n className={combinedTooltipClasses}\n role=\"tooltip\"\n aria-hidden={!isVisible && !alwaysActive}\n style={Object.keys(contentStyle).length > 0 ? contentStyle : undefined}\n >\n {content || label}\n </span>\n </span>\n );\n};\n\nexport default Tooltip;\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\n\n/** Available size modifiers for the Steps component. */\nexport type StepsSize = 'small' | 'medium' | 'large';\n/** Available color variants for the Steps component. */\nexport type StepsColor =\n 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n\n/**\n * Props for individual Step items.\n */\nexport interface StepItemProps {\n /** Step label/title */\n label?: React.ReactNode;\n /** Icon for the step marker */\n icon?: React.ReactNode;\n /**\n * Icon shown when the step is completed.\n * @defaultValue '✓'\n */\n completedIcon?: React.ReactNode;\n /** Whether this step is clickable */\n clickable?: boolean;\n /** Additional CSS classes. */\n className?: string;\n}\n\n/**\n * Props for the Steps component.\n * @extraProp {React.ReactNode} [children] - Step children (alternative to items).\n * @extraProp {string} [className] - Additional CSS classes.\n */\nexport interface StepsProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, 'color'>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'> {\n /** Current active step (0-indexed). */\n value?: number;\n /** Array of step items. */\n items?: StepItemProps[];\n /** Size of the steps. */\n size?: StepsSize;\n /** Color variant. */\n color?: StepsColor;\n /** Show step markers. Default: true. */\n hasMarker?: boolean;\n /** Enable animations. Default: true. */\n animated?: boolean;\n /** Use rounded markers. Default: true. */\n rounded?: boolean;\n /** Vertical layout. */\n vertical?: boolean;\n /** Position of labels. */\n labelPosition?: 'bottom' | 'right' | 'left';\n /** Mobile display mode. */\n mobileMode?: 'minimal' | 'compact' | 'right';\n /** Displays step numbers in the markers. */\n showStepNumbers?: boolean;\n /** Shows previous/next navigation buttons. */\n hasNavigation?: boolean;\n /** Label for the previous button. */\n prevLabel?: string;\n /** Label for the next button. */\n nextLabel?: string;\n /** Callback when previous button is clicked. */\n onPrev?: () => void;\n /** Callback when next button is clicked. */\n onNext?: () => void;\n /** Callback when a step is clicked. */\n onStepClick?: (step: number) => void;\n}\n\n/**\n * Props for the Step subcomponent.\n */\nexport interface StepProps\n extends\n Omit<React.LiHTMLAttributes<HTMLLIElement>, 'color'>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Whether this step is active */\n isActive?: boolean;\n /** Whether this step is completed */\n isCompleted?: boolean;\n /** Step label/title */\n label?: React.ReactNode;\n /** Icon for the step marker */\n icon?: React.ReactNode;\n /** Whether this step is clickable */\n clickable?: boolean;\n /** Click handler */\n onClick?: () => void;\n /** Step number to display in marker (1-indexed) */\n stepNumber?: number;\n /**\n * Icon shown when the step is completed.\n * @defaultValue '✓'\n */\n completedIcon?: React.ReactNode;\n}\n\n/**\n * Individual Step component for use inside Steps.\n *\n * @function\n * @param {StepProps} props - Props for the Step component.\n * @returns {JSX.Element} The rendered step segment.\n */\nexport const Step: React.FC<StepProps> = ({\n isActive = false,\n isCompleted = false,\n label,\n icon,\n clickable = false,\n onClick,\n stepNumber,\n completedIcon,\n className,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses(props);\n\n const stepClasses = classNames(\n usePrefixedClassNames('steps-segment', {\n 'is-active': isActive,\n 'is-completed': isCompleted,\n }),\n bulmaHelperClasses,\n className\n );\n const stepsLinkClass = usePrefixedClassNames('steps-link');\n const stepsMarkerClass = usePrefixedClassNames('steps-marker');\n const stepsContentClass = usePrefixedClassNames('steps-content');\n const stepsTitleClass = usePrefixedClassNames('steps-title');\n\n const handleClick = () => {\n if (clickable && onClick) {\n onClick();\n }\n };\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (clickable && onClick && (e.key === 'Enter' || e.key === ' ')) {\n e.preventDefault();\n onClick();\n }\n };\n\n const resolvedCompletedIcon =\n completedIcon === undefined ? '\\u2713' : completedIcon;\n const markerContent =\n icon ||\n (isCompleted && resolvedCompletedIcon\n ? resolvedCompletedIcon\n : (stepNumber ?? null));\n\n return (\n <li\n className={stepClasses}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n tabIndex={clickable ? 0 : undefined}\n role={clickable ? 'button' : undefined}\n aria-current={isActive ? 'step' : undefined}\n {...rest}\n >\n <div className={stepsLinkClass}>\n <span className={stepsMarkerClass}>{markerContent}</span>\n {(label || children) && (\n <div className={stepsContentClass}>\n <p className={stepsTitleClass}>{label || children}</p>\n </div>\n )}\n </div>\n </li>\n );\n};\n\n/**\n * The `Steps` component provides a multi-step progress indicator for wizard flows, checkout processes, or any multi-step workflow.\n *\n * @function\n * @param {StepsProps} props - Props for the Steps component.\n * @returns {JSX.Element} The rendered steps component.\n *\n * @example\n * // Basic steps with items\n * <Steps\n * value={1}\n * items={[\n * { label: 'Account' },\n * { label: 'Profile' },\n * { label: 'Complete' },\n * ]}\n * />\n *\n * @example\n * // Clickable steps with navigation\n * <Steps\n * value={currentStep}\n * onStepClick={(step) => setCurrentStep(step)}\n * hasNavigation\n * items={[\n * { label: 'Step 1', clickable: true },\n * { label: 'Step 2', clickable: true },\n * { label: 'Step 3', clickable: true },\n * ]}\n * />\n */\nconst StepsComponent: React.FC<StepsProps> = ({\n value = 0,\n items,\n size,\n color,\n hasMarker = true,\n animated = true,\n rounded = true,\n vertical = false,\n labelPosition = 'bottom',\n mobileMode,\n showStepNumbers = true,\n hasNavigation = false,\n prevLabel,\n nextLabel,\n onPrev,\n onNext,\n onStepClick,\n className,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses(props);\n\n // Generate classes for the wrapper div\n const stepsClasses = usePrefixedClassNames('steps', {\n [`is-${size}`]: size,\n [`is-${color}`]: color,\n 'has-marker': hasMarker,\n 'is-animated': animated,\n 'is-rounded': rounded,\n 'is-vertical': vertical,\n [`has-label-${labelPosition}`]:\n labelPosition && (labelPosition !== 'bottom' || vertical),\n [`is-${mobileMode}`]: mobileMode,\n });\n\n const combinedClasses = classNames(\n stepsClasses,\n bulmaHelperClasses,\n className\n );\n\n // Generate classes for the ul (list)\n const listClasses = usePrefixedClassNames('steps-list', {\n 'is-vertical': vertical,\n });\n const stepsNavigationClass = usePrefixedClassNames('steps-navigation');\n const prevButtonClass = usePrefixedClassNames('button');\n const nextButtonClass = usePrefixedClassNames('button', {\n 'is-primary': true,\n });\n\n // Count total steps for navigation\n const totalSteps = items ? items.length : React.Children.count(children);\n\n // Render items if provided\n const renderSteps = () => {\n if (items && items.length > 0) {\n return items.map((item, index) => (\n <Step\n key={index}\n isActive={index === value}\n isCompleted={index < value}\n label={item.label}\n icon={item.icon}\n completedIcon={item.completedIcon}\n clickable={item.clickable}\n stepNumber={showStepNumbers ? index + 1 : undefined}\n onClick={\n item.clickable && onStepClick ? () => onStepClick(index) : undefined\n }\n className={item.className}\n />\n ));\n }\n\n // If children are provided, clone them with active/completed states\n if (children) {\n return React.Children.map(children, (child, index) => {\n if (React.isValidElement<StepProps>(child)) {\n return React.cloneElement(child, {\n isActive: index === value,\n isCompleted: index < value,\n stepNumber: showStepNumbers ? index + 1 : undefined,\n onClick:\n child.props.clickable && onStepClick\n ? () => onStepClick(index)\n : child.props.onClick,\n });\n }\n return child;\n });\n }\n\n return null;\n };\n\n return (\n <div className={combinedClasses} {...rest}>\n <ul className={listClasses}>{renderSteps()}</ul>\n {hasNavigation && (\n <div className={stepsNavigationClass}>\n <button\n className={prevButtonClass}\n disabled={value === 0}\n onClick={onPrev ?? (() => onStepClick?.(value - 1))}\n >\n {prevLabel ?? 'Previous'}\n </button>\n <button\n className={nextButtonClass}\n disabled={value === totalSteps - 1}\n onClick={onNext ?? (() => onStepClick?.(value + 1))}\n >\n {nextLabel ?? 'Next'}\n </button>\n </div>\n )}\n </div>\n );\n};\n\n// Attach Step as static property\nexport const Steps = withSubComponents(StepsComponent, { Step }, 'Steps');\n\nexport default Steps;\n","import React, { forwardRef, useEffect, useCallback, useRef } from 'react';\nimport { createPortal } from 'react-dom';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport { useScrollLock } from '../helpers/scrollLock';\n\n/** Position of the sidebar relative to the viewport. */\nexport type SidebarPosition = 'left' | 'right';\n\n/**\n * Props for the Sidebar component.\n * @extraProp {string} [className] - Additional CSS classes.\n * @extraProp {React.Ref<HTMLElement>} [ref] - Ref forwarded to the sidebar element.\n */\nexport interface SidebarProps\n extends\n Omit<React.HTMLAttributes<HTMLElement>, 'children' | 'color'>,\n BulmaClassesProps {\n /** Whether the sidebar is open (required). */\n isOpen: boolean;\n /** Callback when sidebar should close. */\n onClose?: () => void;\n /** Which side the sidebar appears from. Default: 'left'. */\n position?: SidebarPosition;\n /** Custom width of the sidebar. */\n width?: string;\n /** Sidebar takes full width (mobile-style). */\n isFullwidth?: boolean;\n /** Sidebar takes full width (mobile-style). @deprecated Use `isFullwidth` instead — `isFullwidth` wins if both are set. */\n fullWidth?: boolean;\n /** Show overlay behind sidebar. Default: true. */\n overlay?: boolean;\n /** Close sidebar when overlay is clicked. Default: true. */\n overlayClose?: boolean;\n /** Close sidebar on Escape key. Default: true. */\n escapeClose?: boolean;\n /** Allow closing the sidebar. Default: true. */\n canCancel?: boolean;\n /** Content to display in the sidebar. */\n children?: React.ReactNode;\n /** Renders inline instead of using a portal. */\n inline?: boolean;\n}\n\n/**\n * The `Sidebar` component provides a slide-out navigation panel that appears from the left or right side of the screen.\n *\n * @function\n * @param {SidebarProps} props - Props for the Sidebar component.\n * @param {React.Ref<HTMLElement>} ref - Forwarded ref to the sidebar element.\n * @returns {JSX.Element | null} The rendered sidebar component.\n *\n * @example\n * // Basic sidebar\n * const [isOpen, setIsOpen] = useState(false);\n * <Sidebar isOpen={isOpen} onClose={() => setIsOpen(false)}>\n * <Menu>...</Menu>\n * </Sidebar>\n *\n * @example\n * // Right-side sidebar with custom width\n * <Sidebar\n * isOpen={isOpen}\n * onClose={() => setIsOpen(false)}\n * position=\"right\"\n * width=\"320px\"\n * >\n * <div>Panel content</div>\n * </Sidebar>\n */\nconst SidebarComponent = forwardRef<HTMLElement, SidebarProps>(\n (\n {\n isOpen,\n onClose,\n position = 'left',\n width = '260px',\n isFullwidth,\n fullWidth,\n overlay = true,\n overlayClose = true,\n escapeClose = true,\n canCancel = true,\n children,\n inline = false,\n className,\n style,\n ...props\n },\n ref\n ) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses(props);\n const sidebarRef = useRef<HTMLElement>(null);\n // Cleanup returned by a consumer's callback ref on attach, held until detach.\n const consumerCleanupRef = useRef<(() => void) | null>(null);\n const resolvedFullwidth = isFullwidth ?? fullWidth ?? false;\n\n // Close handler\n const handleClose = useCallback(() => {\n if (canCancel && onClose) {\n onClose();\n }\n }, [canCancel, onClose]);\n\n // Handle overlay click\n const handleOverlayClick = useCallback(() => {\n if (overlayClose) {\n handleClose();\n }\n }, [overlayClose, handleClose]);\n\n // Handle escape key\n useEffect(() => {\n if (!isOpen || !escapeClose) return;\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n handleClose();\n }\n };\n\n document.addEventListener('keydown', handleKeyDown);\n return () => document.removeEventListener('keydown', handleKeyDown);\n }, [isOpen, escapeClose, handleClose]);\n\n // Prevent body scroll when sidebar is open. Ref-counted through the shared\n // helper so an overlapping Modal/Dialog/Loading doesn't unlock underneath.\n useScrollLock(isOpen && overlay);\n\n // Focus trap (basic - focus sidebar when opened)\n useEffect(() => {\n if (isOpen) {\n const element = sidebarRef.current;\n if (element) {\n // Focus first focusable element or sidebar itself\n const focusable = element.querySelector<HTMLElement>(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (focusable) {\n focusable.focus();\n } else {\n element.focus();\n }\n }\n }\n }, [isOpen]);\n\n // Use combined ref\n const combinedRef = useCallback(\n (node: HTMLElement | null) => {\n (sidebarRef as React.MutableRefObject<HTMLElement | null>).current =\n node;\n if (typeof ref === 'function') {\n // React 19 lets a callback ref return a cleanup function and detaches by\n // running it instead of calling the ref with `null`; React 18 discards the\n // return value entirely. Returning it from here would be a React-19-only\n // contract, so we hold the cleanup and run it ourselves on detach — the\n // same shape as `Dropdown`, `Modal`, `Dialog`, `Toast` and `Carousel`.\n // The form controls that merge a forwarded ref still discard the cleanup\n // and detach with `ref(null)`, so this is not yet library-wide — grep\n // `typeof ref === 'function'` for the current split.\n if (node === null) {\n const consumerCleanup = consumerCleanupRef.current;\n consumerCleanupRef.current = null;\n if (consumerCleanup) {\n consumerCleanup();\n } else {\n ref(null);\n }\n return;\n }\n const cleanup: unknown = ref(node);\n consumerCleanupRef.current =\n typeof cleanup === 'function' ? (cleanup as () => void) : null;\n } else if (ref) {\n (ref as React.MutableRefObject<HTMLElement | null>).current = node;\n }\n },\n [ref]\n );\n\n // Generate classes\n const sidebarClasses = usePrefixedClassNames('sidebar', {\n 'is-active': isOpen,\n [`is-${position}`]: position,\n 'is-fullwidth': resolvedFullwidth,\n });\n const backgroundClass = usePrefixedClassNames('sidebar-background', {\n 'is-active': isOpen,\n });\n const contentClass = usePrefixedClassNames('sidebar-content');\n\n const combinedClasses = classNames(\n sidebarClasses,\n bulmaHelperClasses,\n className\n );\n\n // Custom style for width\n const sidebarStyle: React.CSSProperties = {\n ...style,\n '--bulma-sidebar-width': resolvedFullwidth ? '100%' : width,\n } as React.CSSProperties;\n\n const sidebarContent = (\n <>\n {overlay && (\n <div\n className={backgroundClass}\n onClick={handleOverlayClick}\n aria-hidden=\"true\"\n />\n )}\n <aside\n ref={combinedRef}\n className={combinedClasses}\n style={sidebarStyle}\n role=\"dialog\"\n aria-modal={overlay ? 'true' : undefined}\n aria-hidden={!isOpen}\n tabIndex={-1}\n {...rest}\n >\n <div className={contentClass}>{children}</div>\n </aside>\n </>\n );\n\n if (inline) {\n return sidebarContent;\n }\n\n // Render to portal for proper stacking\n if (typeof document !== 'undefined') {\n return createPortal(sidebarContent, document.body);\n }\n\n return null;\n }\n);\n\n// Sub-components\n\n/**\n * Props for the SidebarHeader component.\n */\ninterface SidebarHeaderProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Header content. */\n children?: React.ReactNode;\n}\n\n/**\n * Container for the sidebar header.\n *\n * @function\n * @param {SidebarHeaderProps} props - Props for the SidebarHeader component.\n * @returns {JSX.Element} The rendered sidebar header.\n */\nconst SidebarHeader: React.FC<SidebarHeaderProps> = ({\n className,\n children,\n ...props\n}) => {\n const headerClass = usePrefixedClassNames('sidebar-header');\n return (\n <div className={classNames(headerClass, className)} {...props}>\n {children}\n </div>\n );\n};\n\n/**\n * Props for the SidebarTitle component.\n */\ninterface SidebarTitleProps extends React.HTMLAttributes<HTMLParagraphElement> {\n /** Title content. */\n children?: React.ReactNode;\n}\n\n/**\n * Title text inside the header.\n *\n * @function\n * @param {SidebarTitleProps} props - Props for the SidebarTitle component.\n * @returns {JSX.Element} The rendered sidebar title.\n */\nconst SidebarTitle: React.FC<SidebarTitleProps> = ({\n className,\n children,\n ...props\n}) => {\n const titleClass = usePrefixedClassNames('sidebar-title');\n return (\n <p className={classNames(titleClass, className)} {...props}>\n {children}\n </p>\n );\n};\n\n/**\n * Props for the SidebarClose component.\n * Extends standard button attributes.\n */\ntype SidebarCloseProps = React.ButtonHTMLAttributes<HTMLButtonElement>;\n\n/**\n * Close button for the sidebar.\n *\n * @function\n * @param {SidebarCloseProps} props - Props for the SidebarClose component.\n * @returns {JSX.Element} The rendered close button.\n */\nconst SidebarClose: React.FC<SidebarCloseProps> = ({\n className,\n children,\n ...props\n}) => {\n const closeClass = usePrefixedClassNames('sidebar-close');\n return (\n <button\n type=\"button\"\n className={classNames(closeClass, className)}\n aria-label=\"Close\"\n {...props}\n >\n {children}\n </button>\n );\n};\n\n/**\n * Props for the SidebarBody component.\n */\ninterface SidebarBodyProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Body content. */\n children?: React.ReactNode;\n}\n\n/**\n * Main content area of the sidebar.\n *\n * @function\n * @param {SidebarBodyProps} props - Props for the SidebarBody component.\n * @returns {JSX.Element} The rendered sidebar body.\n */\nconst SidebarBody: React.FC<SidebarBodyProps> = ({\n className,\n children,\n ...props\n}) => {\n const bodyClass = usePrefixedClassNames('sidebar-body');\n return (\n <div className={classNames(bodyClass, className)} {...props}>\n {children}\n </div>\n );\n};\n\n/**\n * Props for the SidebarFooter component.\n */\ninterface SidebarFooterProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Footer content. */\n children?: React.ReactNode;\n}\n\n/**\n * Footer area of the sidebar.\n *\n * @function\n * @param {SidebarFooterProps} props - Props for the SidebarFooter component.\n * @returns {JSX.Element} The rendered sidebar footer.\n */\nconst SidebarFooter: React.FC<SidebarFooterProps> = ({\n className,\n children,\n ...props\n}) => {\n const footerClass = usePrefixedClassNames('sidebar-footer');\n return (\n <div className={classNames(footerClass, className)} {...props}>\n {children}\n </div>\n );\n};\n\n// Attach static subcomponents\nexport const Sidebar = withSubComponents(\n SidebarComponent,\n {\n Header: SidebarHeader,\n Title: SidebarTitle,\n Close: SidebarClose,\n Body: SidebarBody,\n Footer: SidebarFooter,\n },\n 'Sidebar'\n);\n\nexport default Sidebar;\n","import React, {\n forwardRef,\n useEffect,\n useRef,\n useState,\n useCallback,\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { resolvePortalContainer } from '../helpers/portal';\n\n/** Color/style type presets for toast messages. */\nexport type ToastType =\n 'default' | 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n\n/** Screen positions where toasts can be displayed. */\nexport type ToastPosition =\n | 'top-left'\n | 'top-center'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'bottom-right';\n\n/**\n * Props for the Toast component.\n * @extraProp {string} [className] - Additional CSS classes.\n * @extraProp {React.Ref<HTMLDivElement>} [ref] - Ref forwarded to the toast element.\n */\nexport interface ToastProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, 'color'>,\n Omit<BulmaClassesProps, 'color'> {\n /** The message to display (required). */\n message: string;\n /** Color variant — colors the toast **background**. */\n type?: ToastType;\n /** Color variant — colors the **action button** text. */\n actionType?: ToastType;\n /** Position on the screen. Default: 'top-right'. */\n position?: ToastPosition;\n /** Duration in ms before auto-close. `0` disables auto-close. */\n duration?: number;\n /** Keeps the toast visible until dismissed. */\n indefinite?: boolean;\n /** Whether clicking the toast (or outside it) dismisses it. */\n dismissible?: boolean;\n /** Show an explicit close (X) button. Default: false. */\n closable?: boolean;\n /** Pill-shaped (rounded corners). */\n rounded?: boolean;\n /** Pause auto-close timer on hover. Default: false. */\n pauseOnHover?: boolean;\n /** Whether the toast can be dismissed with Escape. Default: true. */\n cancelable?: boolean;\n /** Text for an action button (e.g. \"Undo\"). */\n actionText?: string;\n /** Text for a cancel button. */\n cancelText?: string;\n /** Callback when the action button is clicked. */\n onAction?: () => void;\n /** Callback when toast closes. */\n onClose?: () => void;\n /** CSS selector or DOM node to mount the toast into. */\n container?: string | HTMLElement;\n /** Renders inline instead of using a portal. */\n inline?: boolean;\n}\n\n/**\n * The `Toast` component provides brief notification messages with optional action and cancel buttons.\n *\n * @function\n * @param {ToastProps} props - Props for the Toast component.\n * @param {React.Ref<HTMLDivElement>} ref - Forwarded ref to the toast element.\n * @returns {JSX.Element | null} The rendered toast component.\n *\n * @example\n * // Basic toast\n * <Toast message=\"Operation successful!\" type=\"success\" />\n *\n * @example\n * // Toast with action button\n * <Toast message=\"Item deleted\" actionText=\"Undo\" onAction={handleUndo} />\n */\nexport const Toast = forwardRef<HTMLDivElement, ToastProps>(\n (\n {\n message,\n type = 'default',\n actionType,\n position = 'top-right',\n duration = 2000,\n indefinite = false,\n dismissible = true,\n closable = false,\n rounded = false,\n pauseOnHover = false,\n cancelable = true,\n actionText,\n cancelText,\n onAction,\n onClose,\n container,\n inline = false,\n className,\n ...props\n },\n ref\n ) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses(props);\n const [isVisible, setIsVisible] = useState(true);\n const [isPaused, setIsPaused] = useState(false);\n const toastRef = useRef<HTMLDivElement | null>(null);\n\n // Cleanup returned by a consumer's callback ref on attach, held until detach.\n const consumerCleanupRef = useRef<(() => void) | null>(null);\n const handleClose = useCallback(() => {\n setIsVisible(false);\n onClose?.();\n }, [onClose]);\n\n const handleAction = useCallback(() => {\n onAction?.();\n handleClose();\n }, [onAction, handleClose]);\n\n useEffect(() => {\n if (indefinite || duration === 0 || isPaused) return undefined;\n\n const timer = setTimeout(() => {\n handleClose();\n }, duration);\n\n return () => clearTimeout(timer);\n }, [duration, indefinite, isPaused, handleClose]);\n\n const handleMouseEnter = useCallback(() => {\n if (pauseOnHover) {\n setIsPaused(true);\n }\n }, [pauseOnHover]);\n\n const handleMouseLeave = useCallback(() => {\n if (pauseOnHover) {\n setIsPaused(false);\n }\n }, [pauseOnHover]);\n\n // Click-outside dismiss — deferred so the click that spawned the toast\n // doesn't immediately dismiss it before it's even visible.\n useEffect(() => {\n if (!dismissible || !isVisible) return undefined;\n\n const handleDocumentClick = (e: MouseEvent) => {\n if (toastRef.current && !toastRef.current.contains(e.target as Node)) {\n handleClose();\n }\n };\n\n const raf = requestAnimationFrame(() => {\n document.addEventListener('click', handleDocumentClick);\n });\n\n return () => {\n cancelAnimationFrame(raf);\n document.removeEventListener('click', handleDocumentClick);\n };\n }, [dismissible, isVisible, handleClose]);\n\n useEffect(() => {\n if (!cancelable) return undefined;\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n handleClose();\n }\n };\n\n document.addEventListener('keydown', handleKeyDown);\n return () => document.removeEventListener('keydown', handleKeyDown);\n }, [cancelable, handleClose]);\n\n const containerClasses = usePrefixedClassNames('toast-container', {\n [`is-${position}`]: true,\n });\n\n const toastClasses = usePrefixedClassNames('toast', {\n [`is-${type}`]: type !== 'default',\n [`is-action-${actionType}`]: !!actionType && actionType !== 'default',\n 'is-rounded': rounded,\n });\n\n const combinedClasses = classNames(\n toastClasses,\n bulmaHelperClasses,\n className\n );\n const toastMessageClass = usePrefixedClassNames('toast-message');\n const toastActionsClass = usePrefixedClassNames('toast-actions');\n const toastCancelClass = usePrefixedClassNames('toast-cancel');\n const toastActionClass = usePrefixedClassNames('toast-action');\n const toastButtonClass = usePrefixedClassNames('button');\n const toastCloseClass = usePrefixedClassNames('delete', 'is-small');\n\n const setRef = useCallback(\n (node: HTMLDivElement | null) => {\n toastRef.current = node;\n if (typeof ref === 'function') {\n // React 19 lets a callback ref return a cleanup function and detaches by\n // running it instead of calling the ref with `null`; React 18 discards the\n // return value entirely. Returning it from here would be a React-19-only\n // contract, so we hold the cleanup and run it ourselves on detach — the\n // same shape as `Dropdown`, `Modal`, `Dialog`, `Sidebar` and `Carousel`.\n // The form controls that merge a forwarded ref still discard the cleanup\n // and detach with `ref(null)`, so this is not yet library-wide — grep\n // `typeof ref === 'function'` for the current split. Memoized because an\n // unstable ref identity makes React detach and re-attach on every render,\n // which would run that cleanup each time.\n if (node === null) {\n const consumerCleanup = consumerCleanupRef.current;\n consumerCleanupRef.current = null;\n if (consumerCleanup) {\n consumerCleanup();\n } else {\n ref(null);\n }\n return;\n }\n const cleanup: unknown = ref(node);\n consumerCleanupRef.current =\n typeof cleanup === 'function' ? (cleanup as () => void) : null;\n } else if (ref) {\n (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n }\n },\n [ref]\n );\n\n if (!isVisible) {\n return null;\n }\n\n const toastElement = (\n <div\n ref={setRef}\n className={combinedClasses}\n role=\"alert\"\n aria-live={\n type === 'danger' || type === 'warning' ? 'assertive' : 'polite'\n }\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onClick={dismissible ? handleClose : undefined}\n {...rest}\n >\n <span className={toastMessageClass}>{message}</span>\n {(cancelText || actionText) && (\n <div className={toastActionsClass}>\n {cancelText && (\n <span className={toastCancelClass}>\n <button\n type=\"button\"\n className={toastButtonClass}\n onClick={e => {\n e.stopPropagation();\n handleClose();\n }}\n >\n {cancelText}\n </button>\n </span>\n )}\n {actionText && (\n <span className={toastActionClass}>\n <button\n type=\"button\"\n className={toastButtonClass}\n onClick={e => {\n e.stopPropagation();\n handleAction();\n }}\n >\n {actionText}\n </button>\n </span>\n )}\n </div>\n )}\n {closable && (\n <button\n type=\"button\"\n className={toastCloseClass}\n onClick={e => {\n e.stopPropagation();\n handleClose();\n }}\n aria-label=\"Close\"\n />\n )}\n </div>\n );\n\n if (inline) {\n return toastElement;\n }\n\n const toastContent = <div className={containerClasses}>{toastElement}</div>;\n\n if (typeof document !== 'undefined') {\n return createPortal(toastContent, resolvePortalContainer(container));\n }\n\n return null;\n }\n);\n\nToast.displayName = 'Toast';\n\n// Toast Manager for programmatic toasts\n\n/**\n * Options for showing a programmatic toast. Extends ToastProps with a required message.\n */\nexport interface ToastOptions extends Omit<ToastProps, 'message'> {\n /** The message to display. */\n message: string;\n /** When true, toasts enter a FIFO queue and display one at a time. Default false. */\n queue?: boolean;\n}\n\n/**\n * Internal representation of a toast instance.\n */\nexport interface ToastInstance {\n /** Unique identifier for this toast. */\n id: string;\n /** Configuration options for the toast. */\n props: ToastOptions;\n}\n\nlet toastId = 0;\nconst toastListeners: Set<(toasts: ToastInstance[]) => void> = new Set();\nlet toasts: ToastInstance[] = [];\n\n// Queued toasts: FIFO queue, one at a time\nlet queuedToasts: ToastInstance[] = [];\nlet currentQueuedToast: ToastInstance | null = null;\n\nconst notifyListeners = () => {\n const allVisible = [...toasts];\n if (currentQueuedToast) {\n allVisible.push(currentQueuedToast);\n }\n toastListeners.forEach(listener => listener([...allVisible]));\n};\n\nconst processQueuedToast = () => {\n if (currentQueuedToast || queuedToasts.length === 0) return;\n currentQueuedToast = queuedToasts.shift()!;\n notifyListeners();\n};\n\n/**\n * Programmatic toast API for showing, closing, and managing toasts.\n *\n * @example\n * toast.success('Saved!');\n * toast.show({ message: 'Item deleted', actionText: 'Undo', onAction: handleUndo });\n */\nexport const toast = {\n /**\n * Show a toast with the given options.\n * @param {ToastOptions} options - Toast configuration.\n * @returns {string} The unique ID of the created toast.\n */\n show: (options: ToastOptions): string => {\n const id = `toast-${++toastId}`;\n const instance = { id, props: options };\n\n if (options.queue) {\n queuedToasts.push(instance);\n processQueuedToast();\n } else {\n toasts.push(instance);\n notifyListeners();\n }\n\n return id;\n },\n\n /**\n * Show a success toast.\n * @param {string} message - The message to display.\n * @param {Partial<ToastOptions>} [options] - Additional options.\n * @returns {string} The toast ID.\n */\n success: (message: string, options?: Partial<ToastOptions>): string => {\n return toast.show({ message, type: 'success', ...options });\n },\n\n /**\n * Show a danger toast.\n * @param {string} message - The message to display.\n * @param {Partial<ToastOptions>} [options] - Additional options.\n * @returns {string} The toast ID.\n */\n danger: (message: string, options?: Partial<ToastOptions>): string => {\n return toast.show({ message, type: 'danger', ...options });\n },\n\n /**\n * Show a warning toast.\n * @param {string} message - The message to display.\n * @param {Partial<ToastOptions>} [options] - Additional options.\n * @returns {string} The toast ID.\n */\n warning: (message: string, options?: Partial<ToastOptions>): string => {\n return toast.show({ message, type: 'warning', ...options });\n },\n\n /**\n * Show an info toast.\n * @param {string} message - The message to display.\n * @param {Partial<ToastOptions>} [options] - Additional options.\n * @returns {string} The toast ID.\n */\n info: (message: string, options?: Partial<ToastOptions>): string => {\n return toast.show({ message, type: 'info', ...options });\n },\n\n /**\n * Close a specific toast by ID.\n * @param {string} id - The toast ID to close.\n */\n close: (id: string): void => {\n if (currentQueuedToast && currentQueuedToast.id === id) {\n currentQueuedToast = null;\n processQueuedToast();\n } else {\n queuedToasts = queuedToasts.filter(t => t.id !== id);\n toasts = toasts.filter(t => t.id !== id);\n }\n notifyListeners();\n },\n\n /** Close all toasts and clear the queue. */\n closeAll: (): void => {\n toasts = [];\n queuedToasts = [];\n currentQueuedToast = null;\n notifyListeners();\n },\n\n /**\n * Subscribe to toast state changes.\n * @param {(toasts: ToastInstance[]) => void} listener - Callback invoked on changes.\n * @returns {() => void} Unsubscribe function.\n */\n subscribe: (listener: (toasts: ToastInstance[]) => void): (() => void) => {\n toastListeners.add(listener);\n return () => toastListeners.delete(listener);\n },\n};\n\n/**\n * Container component for rendering programmatic toasts.\n * Place once at your app root to enable the toast API.\n *\n * @function\n * @param {{ position?: ToastPosition }} props - Container props.\n * @returns {JSX.Element | null} The rendered toast container, or null if empty.\n */\nexport const ToastContainer: React.FC<{ position?: ToastPosition }> = ({\n position = 'top-right',\n}) => {\n const [toastList, setToastList] = useState<ToastInstance[]>([]);\n\n useEffect(() => {\n return toast.subscribe(setToastList);\n }, []);\n\n if (typeof document === 'undefined' || toastList.length === 0) {\n return null;\n }\n\n return createPortal(\n <div className={`toast-container is-${position}`}>\n {toastList.map(t => {\n const { queue: _queue, ...toastProps } = t.props;\n return (\n <Toast\n key={t.id}\n {...toastProps}\n position={position}\n onClose={() => toast.close(t.id)}\n />\n );\n })}\n </div>,\n document.body\n );\n};\n\nexport default Toast;\n","import React, { forwardRef, useCallback, useEffect, useRef } from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { useIsHydrated } from '../helpers/useIsHydrated';\nimport { Modal } from './Modal';\n\n/** Valid dialog type/color values. */\nexport type DialogType = 'default' | 'success' | 'danger' | 'warning' | 'info';\n\n/**\n * Props for the Dialog component.\n * @extraProp {string} [className] - Additional CSS classes.\n * @extraProp {React.Ref<HTMLElement>} [ref] - Ref forwarded to the dialog element.\n */\nexport interface DialogProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, 'color'>,\n Omit<BulmaClassesProps, 'color'> {\n /** Whether the dialog is open (required). */\n isOpen: boolean;\n /** Dialog title. */\n title?: string;\n /** Dialog message/content (required). */\n message: string | React.ReactNode;\n /** The type/color of the dialog. Default: 'default'. */\n type?: DialogType;\n /** Text for confirm button. Default: 'OK'. */\n confirmText?: string;\n /** Text for cancel button. Default: 'Cancel'. */\n cancelText?: string;\n /** Callback when confirm button is clicked. */\n onConfirm?: () => void;\n /** Callback when cancel button is clicked or dismissed. */\n onCancel?: () => void;\n /** Whether to show cancel button. Default: true for confirm dialogs. */\n showCancel?: boolean;\n /** Whether the dialog can be dismissed. Default: true. */\n canCancel?: boolean;\n /** Focus cancel button instead of confirm. Default: false. */\n focusCancel?: boolean;\n /** Custom icon to display. */\n icon?: React.ReactNode;\n /**\n * Renders the dialog into a portal target instead of inline. Forwarded to\n * the underlying `Modal`; see its `portal` prop for the accepted values.\n * @defaultValue false\n */\n portal?: boolean | string | HTMLElement;\n}\n\n/**\n * The `Dialog` component provides ready-made confirm and alert dialogs, so a destructive action stays one `await dialog.confirm()` call away.\n *\n * @function\n * @param {DialogProps} props - Props for the Dialog component.\n * @param {React.Ref<HTMLDivElement>} ref - Forwarded ref to the dialog element.\n * @returns {JSX.Element | null} The rendered dialog component.\n *\n * @example\n * // Alert dialog\n * <Dialog\n * isOpen={showAlert}\n * title=\"Success\"\n * message=\"Operation completed successfully!\"\n * type=\"success\"\n * onConfirm={() => setShowAlert(false)}\n * showCancel={false}\n * />\n *\n * @example\n * // Confirm dialog\n * <Dialog\n * isOpen={showConfirm}\n * title=\"Delete Item?\"\n * message=\"This action cannot be undone.\"\n * type=\"danger\"\n * confirmText=\"Delete\"\n * onConfirm={handleDelete}\n * onCancel={() => setShowConfirm(false)}\n * />\n */\nexport const Dialog = forwardRef<HTMLDivElement, DialogProps>(\n (\n {\n isOpen,\n title,\n message,\n type = 'default',\n confirmText = 'OK',\n cancelText = 'Cancel',\n onConfirm,\n onCancel,\n showCancel = true,\n canCancel = true,\n focusCancel = false,\n icon,\n portal,\n className,\n ...props\n },\n ref\n ) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses(props);\n const dialogRef = useRef<HTMLDivElement>(null);\n // Cleanup returned by a consumer's callback ref on attach, held until detach.\n const consumerCleanupRef = useRef<(() => void) | null>(null);\n const confirmRef = useRef<HTMLButtonElement>(null);\n const cancelRef = useRef<HTMLButtonElement>(null);\n\n // Handle cancel\n const handleCancel = useCallback(() => {\n if (canCancel) {\n onCancel?.();\n }\n }, [canCancel, onCancel]);\n\n // Handle confirm\n const handleConfirm = useCallback(() => {\n onConfirm?.();\n }, [onConfirm]);\n\n // Handle background click\n const handleBackgroundClick = useCallback(() => {\n if (canCancel) {\n handleCancel();\n }\n }, [canCancel, handleCancel]);\n\n // Moving into the portal remounts the Modal's subtree — these buttons\n // included — so the focus effect below has to re-run against the new\n // nodes, exactly as the Modal's own focus effect does.\n const isHydrated = useIsHydrated();\n const isPortaled = Boolean(portal) && isHydrated;\n\n // Focus management — Dialog picks a specific button rather than the\n // Modal's default (first focusable/root); this effect runs after the\n // inner Modal's own focus-on-open effect, so it wins.\n useEffect(() => {\n if (isOpen) {\n const buttonToFocus =\n focusCancel && showCancel ? cancelRef.current : confirmRef.current;\n buttonToFocus?.focus();\n }\n }, [isOpen, focusCancel, showCancel, isPortaled]);\n\n // Use combined ref\n const combinedRef = useCallback(\n (node: HTMLDivElement | null) => {\n (dialogRef as React.MutableRefObject<HTMLDivElement | null>).current =\n node;\n if (typeof ref === 'function') {\n // React 19 lets a callback ref return a cleanup function and detaches by\n // running it instead of calling the ref with `null`; React 18 discards the\n // return value entirely. Returning it from here would be a React-19-only\n // contract, so we hold the cleanup and run it ourselves on detach — the\n // same shape as `Dropdown`, `Modal`, `Sidebar`, `Toast` and `Carousel`.\n // The form controls that merge a forwarded ref still discard the cleanup\n // and detach with `ref(null)`, so this is not yet library-wide — grep\n // `typeof ref === 'function'` for the current split.\n if (node === null) {\n const consumerCleanup = consumerCleanupRef.current;\n consumerCleanupRef.current = null;\n if (consumerCleanup) {\n consumerCleanup();\n } else {\n ref(null);\n }\n return;\n }\n const cleanup: unknown = ref(node);\n consumerCleanupRef.current =\n typeof cleanup === 'function' ? (cleanup as () => void) : null;\n } else if (ref) {\n (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n }\n },\n [ref]\n );\n\n // Generate classes\n const dialogClasses = usePrefixedClassNames('dialog', {\n [`is-${type}`]: type !== 'default',\n });\n const headerClass = usePrefixedClassNames('dialog-header');\n const iconClass = usePrefixedClassNames('dialog-icon');\n const titleClass = usePrefixedClassNames('dialog-title');\n const bodyClass = usePrefixedClassNames('dialog-body');\n const footerClass = usePrefixedClassNames('dialog-footer');\n const cancelButtonClass = usePrefixedClassNames('button');\n const confirmButtonClass = usePrefixedClassNames('button', {\n 'is-success': type === 'success',\n 'is-danger': type === 'danger',\n 'is-warning': type === 'warning',\n 'is-info': type === 'info',\n 'is-primary': type === 'default',\n });\n\n const combinedClasses = classNames(\n dialogClasses,\n bulmaHelperClasses,\n className\n );\n\n // Get default icon based on type\n const getDefaultIcon = () => {\n switch (type) {\n case 'success':\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n >\n <path d=\"M20 6L9 17l-5-5\" />\n </svg>\n );\n case 'danger':\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <line x1=\"15\" y1=\"9\" x2=\"9\" y2=\"15\" />\n <line x1=\"9\" y1=\"9\" x2=\"15\" y2=\"15\" />\n </svg>\n );\n case 'warning':\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n stroke=\"none\"\n >\n <path d=\"M12 2L1 21h22L12 2zm0 3.99L19.53 19H4.47L12 5.99zM11 16h2v2h-2zm0-6h2v4h-2z\" />\n </svg>\n );\n case 'info':\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n stroke=\"none\"\n >\n <path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-9h2v6h-2zm0-4h2v2h-2z\" />\n </svg>\n );\n default:\n return null;\n }\n };\n\n const displayIcon = icon !== undefined ? icon : getDefaultIcon();\n\n if (!isOpen) {\n return null;\n }\n\n return (\n <Modal\n isActive={isOpen}\n onClose={handleCancel}\n role=\"presentation\"\n portal={portal}\n >\n <Modal.Background onClick={handleBackgroundClick} />\n <div\n ref={combinedRef}\n className={combinedClasses}\n role=\"alertdialog\"\n aria-modal=\"true\"\n aria-labelledby={title ? 'dialog-title' : undefined}\n aria-describedby=\"dialog-message\"\n {...rest}\n >\n {title && (\n <div className={headerClass}>\n {displayIcon && <span className={iconClass}>{displayIcon}</span>}\n <h3 id=\"dialog-title\" className={titleClass}>\n {title}\n </h3>\n </div>\n )}\n <div id=\"dialog-message\" className={bodyClass}>\n {message}\n </div>\n <div className={footerClass}>\n {showCancel && (\n <button\n ref={cancelRef}\n type=\"button\"\n className={cancelButtonClass}\n onClick={handleCancel}\n >\n {cancelText}\n </button>\n )}\n <button\n ref={confirmRef}\n type=\"button\"\n className={confirmButtonClass}\n onClick={handleConfirm}\n >\n {confirmText}\n </button>\n </div>\n </div>\n </Modal>\n );\n }\n);\n\nDialog.displayName = 'Dialog';\n\n// Dialog Manager for programmatic dialogs\n\n/**\n * Options for showing a programmatic alert dialog.\n */\nexport interface AlertOptions {\n /** Dialog title. */\n title?: string;\n /** Dialog message/content. */\n message: string | React.ReactNode;\n /** Dialog type/color. */\n type?: DialogType;\n /** Text for the confirm button. */\n confirmText?: string;\n /** Custom icon to display. */\n icon?: React.ReactNode;\n}\n\n/**\n * Options for showing a programmatic confirm dialog.\n */\nexport interface ConfirmOptions extends AlertOptions {\n /** Text for the cancel button. */\n cancelText?: string;\n /** Focus cancel button instead of confirm. */\n focusCancel?: boolean;\n}\n\n/**\n * Options for showing a programmatic prompt dialog.\n */\nexport interface PromptOptions extends ConfirmOptions {\n /** Input placeholder text. */\n placeholder?: string;\n /** Default input value. */\n defaultValue?: string;\n}\n\ntype DialogResolve = (value?: void | boolean | string) => void;\n\ntype DialogState = {\n type: 'alert' | 'confirm' | 'prompt';\n options: PromptOptions;\n resolve: DialogResolve;\n};\n\nlet dialogListeners: Set<(dialog: DialogState | null) => void> = new Set();\nlet currentDialog: DialogState | null = null;\n\nconst notifyDialogListeners = () => {\n dialogListeners.forEach(listener => listener(currentDialog));\n};\n\n/**\n * Programmatic dialog API for showing dialogs from anywhere.\n */\nexport const dialog = {\n /**\n * Show an alert dialog. Returns a promise that resolves when closed.\n */\n alert: (options: AlertOptions | string): Promise<void> => {\n return new Promise<void>(resolve => {\n const opts = typeof options === 'string' ? { message: options } : options;\n currentDialog = {\n type: 'alert',\n options: opts,\n resolve: () => resolve(),\n };\n notifyDialogListeners();\n });\n },\n\n /**\n * Show a confirm dialog. Returns a promise that resolves to true/false.\n */\n confirm: (options: ConfirmOptions | string): Promise<boolean> => {\n return new Promise<boolean>(resolve => {\n const opts = typeof options === 'string' ? { message: options } : options;\n currentDialog = {\n type: 'confirm',\n options: opts,\n resolve: value => resolve(Boolean(value)),\n };\n notifyDialogListeners();\n });\n },\n\n /**\n * Close the current dialog.\n */\n close: (value?: void | boolean | string): void => {\n if (currentDialog) {\n currentDialog.resolve(value);\n currentDialog = null;\n notifyDialogListeners();\n }\n },\n\n /**\n * Subscribe to dialog changes.\n */\n subscribe: (listener: (dialog: DialogState | null) => void): (() => void) => {\n dialogListeners.add(listener);\n return () => dialogListeners.delete(listener);\n },\n};\n\n/**\n * DialogContainer component to render programmatic dialogs.\n * Place this once at the root of your app.\n *\n * @function\n * @returns {JSX.Element | null} The rendered dialog, or null if none is active.\n */\nexport const DialogContainer: React.FC = () => {\n const [current, setCurrent] = React.useState<DialogState | null>(null);\n\n useEffect(() => {\n return dialog.subscribe(setCurrent);\n }, []);\n\n if (!current) {\n return null;\n }\n\n const { type, options } = current;\n\n return (\n <Dialog\n isOpen\n title={options.title}\n message={options.message}\n type={options.type}\n confirmText={options.confirmText}\n cancelText={options.cancelText}\n icon={options.icon}\n showCancel={type === 'confirm'}\n focusCancel={options.focusCancel}\n onConfirm={() => dialog.close(type === 'confirm' ? true : undefined)}\n onCancel={() => dialog.close(type === 'confirm' ? false : undefined)}\n />\n );\n};\n\nexport default Dialog;\n","import React, { forwardRef } from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n isCustomElement,\n type PolymorphicComponent,\n} from '../helpers/polymorphic';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * The Button component's own props — everything it adds on top of the\n * attributes of whatever element `as` renders.\n */\nexport interface ButtonOwnProps extends Omit<\n BulmaClassesProps,\n 'color' | 'backgroundColor' | 'size'\n> {\n /**\n * Not accepted under this name. `useBulmaClasses` consumes any\n * `backgroundColor` key before `rest` is spread, so a custom `as` target\n * declaring one would never receive it. Use `bgColor`.\n * @internal\n */\n backgroundColor?: never;\n /** Bulma color variant for the button. `ghost` renders a link-like button; `text` renders a minimal text-only button. */\n color?:\n | 'primary'\n | 'link'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger'\n | 'white'\n | 'light'\n | 'dark'\n | 'black'\n | 'text'\n | 'ghost';\n /** Size of the button. */\n size?: 'small' | 'normal' | 'medium' | 'large';\n /** Applies a lighter color variant. */\n isLight?: boolean;\n /** Makes the button rounded. */\n isRounded?: boolean;\n /** Displays a loading spinner. */\n isLoading?: boolean;\n /** Makes the button non-interactive. */\n isStatic?: boolean;\n /** Makes the button full-width. */\n isFullwidth?: boolean;\n /** Makes the button full-width. @deprecated Use `isFullwidth` instead — `isFullwidth` wins if both are set. */\n isFullWidth?: boolean;\n /** Applies outlined styling (requires color). */\n isOutlined?: boolean;\n /** Applies inverted styling (requires color). */\n isInverted?: boolean;\n /** Applies focused styling (visual only). */\n isFocused?: boolean;\n /** Applies active styling (visual only). */\n isActive?: boolean;\n /** Applies hovered styling (visual only). */\n isHovered?: boolean;\n /** Applies disabled styling. */\n isDisabled?: boolean;\n /** Custom class name. */\n className?: string;\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Button content. */\n children?: React.ReactNode;\n}\n\n/**\n * Props for the Button component. The DOM attributes and the `ref` both follow\n * `as`: with `as=\"a\"` the anchor attributes are accepted, with `as=\"div\"` they\n * are not.\n *\n * @extraProp {PolymorphicRef<React.ElementType>} [ref] - Ref forwarded to the element `as` renders, typed from `as`: the DOM node for an intrinsic tag, or whatever handle a custom component exposes.\n */\nexport type ButtonProps<T extends React.ElementType = 'button'> =\n ButtonOwnProps &\n Omit<React.ComponentPropsWithoutRef<T>, keyof ButtonOwnProps | 'as'> & {\n /** Render as a `<button>`, `<a>`, or a custom component (e.g. a router `Link`). Defaults to `'button'`; anything else renders through the anchor path, which adds `href`/`target`/`rel` and withholds the submit-override attributes (`formAction` and friends) from an `<a>`. */\n as?: T;\n };\n\n/**\n * The shape the implementation destructures. The public contract is the generic\n * `ButtonProps<T>` above — the body cannot see through `T`, so it reads the\n * widest form of the props it actually touches.\n */\ntype ButtonImplProps = ButtonOwnProps & {\n as?: React.ElementType;\n href?: string;\n target?: string;\n rel?: string;\n onClick?:\n | React.MouseEventHandler<HTMLButtonElement>\n | React.MouseEventHandler<HTMLAnchorElement>;\n};\n\nconst validButtonColors = [...validColors, 'text', 'ghost'] as const;\n\n/**\n * The `Button` component provides a flexible and highly customizable button for your Bulma React UI.\n *\n * @function\n * @param {ButtonProps} props - Props for the Button component.\n * @param {React.Ref} ref - Forwarded ref to the element `as` renders.\n * @returns {JSX.Element} The rendered button, anchor, or custom element.\n * @see {@link https://bulma.io/documentation/elements/button/ | Bulma Button documentation}\n */\n\nexport const Button = forwardRef(function Button(\n props: ButtonProps,\n ref: React.Ref<HTMLElement>\n) {\n const {\n color,\n size,\n isLight,\n isRounded,\n isLoading,\n isStatic,\n isFullwidth,\n isFullWidth,\n isOutlined,\n isInverted,\n isFocused,\n isActive,\n isHovered,\n isDisabled,\n className,\n children,\n textColor,\n bgColor,\n as: Component = 'button',\n href,\n onClick,\n target,\n rel,\n ...bulmaProps\n } = props as ButtonImplProps;\n\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...bulmaProps,\n });\n\n // Generate Bulma classes with prefix\n const bulmaClasses = usePrefixedClassNames('button', {\n [`is-${color}`]:\n color &&\n validButtonColors.includes(color as (typeof validButtonColors)[number]),\n [`is-${size}`]: size,\n 'is-outlined': isOutlined,\n 'is-light': isLight,\n 'is-loading': isLoading,\n 'is-static': isStatic,\n 'is-disabled': isDisabled,\n 'is-rounded': isRounded,\n 'is-hovered': isHovered,\n 'is-focused': isFocused,\n 'is-active': isActive,\n 'is-inverted': isInverted,\n 'is-fullwidth': isFullwidth ?? isFullWidth,\n });\n\n // Combine prefixed Bulma classes with unprefixed user className and prefixed helper classes\n const buttonClasses = classNames(bulmaClasses, bulmaHelperClasses, className);\n\n if (Component !== 'button') {\n // Strip the form-control attributes a link-like element cannot carry, so a\n // JavaScript consumer or a spread object doesn't put them on the DOM. The\n // types no longer allow them through; this is the runtime backstop.\n //\n // Only for INTRINSIC tags. A custom component (a router Link, ...) owns its\n // prop contract, and `ComponentPropsWithoutRef<T>` promises the caller that\n // its props reach it. Stripping names by their spelling alone broke that\n // promise silently: `<Button as={Custom} name=\"x\" />` type-checked while\n // `Custom` never received the `name` it requires.\n //\n // `autoFocus` and `type` are deliberately NOT stripped: both are valid on\n // targets this list was filtering them from. `autoFocus` is a global\n // attribute (React decides per element whether to honour it, which is not\n // ours to pre-empt), and `type` on an anchor is the MIME hint that\n // `ButtonProps<'a'>` now types it as.\n //\n // The types already answer this for a TypeScript caller: `ButtonProps<T>`\n // derives from `ComponentPropsWithoutRef<T>`, so only what the target\n // accepts can be passed. What is left is a runtime backstop for JavaScript\n // consumers and spread objects.\n //\n // Keep it to the two cases where a stray attribute does something. The\n // submit-overrides belong to a submit control and never make sense on the\n // anchor path. `disabled` is the one that is VISIBLE: Bulma styles\n // `.button[disabled]` (background, border, shadow, opacity), so letting it\n // through to a `<span>` greys the element out — main stripped it, and not\n // stripping it would be a silent visual change on a types-only release.\n //\n // Everything else (`name`, `value`, `form`) is inert where it does not\n // belong, and enumerating which tags own it is what kept going wrong:\n // first all nine names on every non-button tag (so `<Button as=\"input\"\n // name=\"query\" value=\"Search\">` submitted nothing), then a form-control\n // allowlist that still lost `formAction` on an input and `value` on an\n // option. Those now ride on the types instead.\n //\n // A custom component is exempt entirely — it owns its prop contract, and\n // `ComponentPropsWithoutRef<T>` promises the caller its props arrive.\n //\n // The elements that own `disabled`, per the HTML spec. A closed set, unlike\n // the open-ended question of which tag owns which attribute.\n const SUBMIT_OVERRIDES = [\n 'formAction',\n 'formEncType',\n 'formMethod',\n 'formNoValidate',\n 'formTarget',\n ];\n const OWNS_DISABLED = [\n 'button',\n 'fieldset',\n 'input',\n 'optgroup',\n 'option',\n 'select',\n 'textarea',\n ];\n\n // Two independent filters. They are not exclusive — an `<a>` owns neither\n // the submit-overrides nor `disabled`, so it takes both — and deriving them\n // from one destructure, or from one if/else, is what broke each of them in\n // turn: first the overrides came off every intrinsic (an `as=\"input\"` lost\n // `formAction`), then scoping them to the anchor let `disabled` back onto\n // it.\n const forwardedRest: Record<string, unknown> = { ...rest };\n if (typeof Component === 'string' && !isCustomElement(Component)) {\n // Meaningless anywhere but a submit control, and an anchor is not one.\n if (Component === 'a') {\n for (const key of SUBMIT_OVERRIDES) delete forwardedRest[key];\n }\n // Visible via Bulma's `.button[disabled]`, so withheld from any element\n // that does not own it.\n if (!OWNS_DISABLED.includes(Component)) delete forwardedRest.disabled;\n }\n\n return (\n <Component\n ref={ref as React.Ref<HTMLAnchorElement>}\n className={buttonClasses}\n href={href}\n target={target}\n rel={rel}\n aria-disabled={isDisabled}\n tabIndex={isDisabled ? -1 : undefined}\n onClick={\n isDisabled\n ? // Guarded, because this handler is installed into whatever `as`\n // renders and a custom component's `onClick` need not be a DOM\n // event handler at all. One declaring `onClick: (v: string) =>\n // void` calls this with a string, and an unguarded\n // `e.preventDefault()` throws `is not a function`. Blocking the\n // real event is the point; a foreign payload is simply not ours\n // to act on.\n (e: React.MouseEvent<HTMLAnchorElement>) => {\n if (typeof e?.preventDefault === 'function') e.preventDefault();\n }\n : (onClick as\n React.MouseEventHandler<HTMLAnchorElement> | undefined)\n }\n {...(forwardedRest as React.AnchorHTMLAttributes<HTMLAnchorElement>)}\n >\n {children}\n </Component>\n );\n }\n\n return (\n <button\n ref={ref as React.Ref<HTMLButtonElement>}\n className={buttonClasses}\n disabled={isDisabled}\n onClick={\n onClick as React.MouseEventHandler<HTMLButtonElement> | undefined\n }\n {...rest}\n >\n {children}\n </button>\n );\n}) as PolymorphicComponent<ButtonOwnProps, 'button'>;\n\nButton.displayName = 'Button';\n\nexport default Button;\n","import React, {\n forwardRef,\n useState,\n useRef,\n useEffect,\n useCallback,\n Children,\n isValidElement,\n cloneElement,\n} from 'react';\nimport {\n classNames,\n prefixedClassNames,\n usePrefixedClassNames,\n} from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { useClassPrefix } from '../helpers/Config';\nimport { Icon } from '../elements/Icon';\nimport { Button } from '../elements/Button';\n\n/**\n * Props for the CarouselItem component.\n */\nexport interface CarouselItemProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Whether this item is active (set automatically). */\n active?: boolean;\n}\n\n/**\n * Individual carousel item/slide.\n *\n * @function\n * @param {CarouselItemProps} props - Props for the CarouselItem component.\n * @param {React.Ref<HTMLDivElement>} ref - Forwarded ref to the carousel item element.\n * @returns {JSX.Element} The rendered carousel item.\n */\nexport const CarouselItem = forwardRef<HTMLDivElement, CarouselItemProps>(\n ({ active, className, children, ...props }, ref) => {\n const itemClasses = classNames(\n usePrefixedClassNames('carousel-item', { 'is-active': active }),\n className\n );\n\n return (\n <div ref={ref} className={itemClasses} {...props}>\n {children}\n </div>\n );\n }\n);\n\nCarouselItem.displayName = 'CarouselItem';\n\ntype IconLibrary = 'fa' | 'mdi' | 'ion' | 'material-icons' | 'material-symbols';\n\n/**\n * Default SVG icon for the previous arrow button.\n *\n * @function\n * @returns {JSX.Element} The rendered SVG chevron-left icon.\n */\nconst DefaultPrevIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n >\n <polyline points=\"15 18 9 12 15 6\" />\n </svg>\n);\n\n/**\n * Default SVG icon for the next arrow button.\n *\n * @function\n * @returns {JSX.Element} The rendered SVG chevron-right icon.\n */\nconst DefaultNextIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n >\n <polyline points=\"9 18 15 12 9 6\" />\n </svg>\n);\n\n/**\n * Props for the Carousel component.\n * @extraProp {string} [className] - Additional CSS classes.\n * @extraProp {React.Ref<HTMLElement>} [ref] - Ref forwarded to the carousel element.\n */\nexport interface CarouselProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'color'>,\n BulmaClassesProps {\n /**\n * Current active slide index (controlled).\n * @defaultValue 0\n */\n value?: number;\n /** Enable auto-play. */\n autoplay?: boolean;\n /** Auto-play interval in milliseconds. Default: 5000. */\n interval?: number;\n /** Pause auto-play on hover. Default: true. */\n pauseOnHover?: boolean;\n /** Loop back to first slide after last. Default: true. */\n repeat?: boolean;\n /** Enable drag/swipe navigation. Default: true. */\n hasDrag?: boolean;\n /** Show navigation arrows. Default: true. */\n arrow?: boolean;\n /** Only show arrows on hover. */\n arrowHover?: boolean;\n /** Show slide indicators. Default: true. */\n indicator?: boolean;\n /** Position indicators inside carousel. */\n indicatorInside?: boolean;\n /** Indicator position. Default: 'bottom'. */\n indicatorPosition?: 'bottom' | 'top';\n /** Indicator style. Default: 'dots'. */\n indicatorStyle?: 'circles' | 'dots' | 'lines' | 'bars';\n /** Icon name for the previous arrow button. */\n iconPrev?: string;\n /** Icon name for the next arrow button. */\n iconNext?: string;\n /** Icon library to use. */\n iconLibrary?: IconLibrary;\n /** Icon style variant (e.g., 'solid', 'outlined'). */\n iconVariant?: string;\n /** Icon size modifier. */\n iconSize?: 'small' | 'medium' | 'large';\n /** Additional icon modifiers. */\n iconFeatures?: string | string[];\n /** Show semi-transparent background on arrow buttons. Set to `false` for icon-only arrows. */\n arrowBackground?: boolean;\n /** Color theme for navigation arrows. */\n arrowColor?: 'light' | 'dark';\n /** Accessible label for the carousel region. Default: 'Image carousel'. */\n ariaLabel?: string;\n /** Callback when slide changes. */\n onChange?: (value: number) => void;\n /** CarouselItem children. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Carousel` component provides an image/content slider with navigation arrows and indicators.\n *\n * @function\n * @param {CarouselProps} props - Props for the Carousel component.\n * @param {React.Ref<HTMLDivElement>} ref - Forwarded ref to the carousel element.\n * @returns {JSX.Element} The rendered carousel component.\n *\n * @example\n * // Basic carousel\n * <Carousel>\n * <CarouselItem>Slide 1</CarouselItem>\n * <CarouselItem>Slide 2</CarouselItem>\n * <CarouselItem>Slide 3</CarouselItem>\n * </Carousel>\n *\n * @example\n * // Auto-playing carousel\n * <Carousel autoplay interval={3000}>\n * <CarouselItem>\n * <img src=\"image1.jpg\" alt=\"Slide 1\" />\n * </CarouselItem>\n * <CarouselItem>\n * <img src=\"image2.jpg\" alt=\"Slide 2\" />\n * </CarouselItem>\n * </Carousel>\n */\nexport const Carousel = forwardRef<HTMLDivElement, CarouselProps>(\n (\n {\n value: controlledValue,\n autoplay = false,\n interval = 5000,\n pauseOnHover = true,\n repeat = true,\n hasDrag = true,\n arrow = true,\n arrowHover = false,\n indicator = true,\n indicatorInside = false,\n indicatorPosition = 'bottom',\n indicatorStyle = 'dots',\n iconPrev,\n iconNext,\n iconLibrary,\n iconVariant,\n iconSize,\n iconFeatures,\n arrowBackground = true,\n arrowColor,\n ariaLabel = 'Image carousel',\n onChange,\n className,\n children,\n ...props\n },\n ref\n ) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses(props);\n const carouselRef = useRef<HTMLDivElement>(null);\n // Cleanup returned by a consumer's callback ref on attach, held until detach.\n const consumerCleanupRef = useRef<(() => void) | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n\n const [internalValue, setInternalValue] = useState(0);\n const [isPaused, setIsPaused] = useState(false);\n const [isDragging, setIsDragging] = useState(false);\n const [dragStart, setDragStart] = useState(0);\n const [dragOffset, setDragOffset] = useState(0);\n const [isWrapping, setIsWrapping] = useState(false);\n const [displayIndex, setDisplayIndex] = useState(0);\n const [skipTransition, setSkipTransition] = useState(false);\n\n // Get valid children\n const items = Children.toArray(children).filter(isValidElement);\n const itemCount = items.length;\n\n // Use controlled or internal value\n const activeIndex =\n controlledValue !== undefined ? controlledValue : internalValue;\n\n // Sync displayIndex when controlled value changes externally. Intentional\n // external-prop sync that must not run mid-wrap animation; covered by tests\n // and certified in-browser.\n useEffect(() => {\n if (controlledValue !== undefined && !isWrapping) {\n // eslint-disable-next-line react-hooks/set-state-in-effect -- syncing to controlled prop\n setDisplayIndex(controlledValue);\n }\n }, [controlledValue, isWrapping]);\n\n // Update active index\n const setActiveIndex = useCallback(\n (index: number, syncDisplay = true) => {\n let newIndex = index;\n\n if (repeat) {\n if (index < 0) {\n newIndex = itemCount - 1;\n } else if (index >= itemCount) {\n newIndex = 0;\n }\n } else {\n newIndex = Math.max(0, Math.min(index, itemCount - 1));\n }\n\n if (controlledValue === undefined) {\n setInternalValue(newIndex);\n }\n if (syncDisplay) {\n setDisplayIndex(newIndex);\n }\n onChange?.(newIndex);\n },\n [controlledValue, itemCount, repeat, onChange]\n );\n\n // Navigation handlers\n const goToPrev = useCallback(() => {\n if (activeIndex === 0 && repeat && itemCount > 1) {\n // Animate to clone of last slide (position -1)\n setDisplayIndex(-1);\n setIsWrapping(true);\n } else {\n setActiveIndex(activeIndex - 1);\n }\n }, [activeIndex, repeat, itemCount, setActiveIndex]);\n\n const goToNext = useCallback(() => {\n if (activeIndex === itemCount - 1 && repeat && itemCount > 1) {\n // Animate to clone of first slide (position itemCount)\n setDisplayIndex(itemCount);\n setIsWrapping(true);\n } else {\n setActiveIndex(activeIndex + 1);\n }\n }, [activeIndex, itemCount, repeat, setActiveIndex]);\n\n const goToSlide = useCallback(\n (index: number) => {\n setIsWrapping(false);\n setActiveIndex(index);\n },\n [setActiveIndex]\n );\n\n // Auto-play\n useEffect(() => {\n if (!autoplay || isPaused || itemCount <= 1) return undefined;\n\n const timer = setInterval(() => {\n goToNext();\n }, interval);\n\n return () => clearInterval(timer);\n }, [autoplay, isPaused, interval, goToNext, itemCount]);\n\n // Pause on hover\n const handleMouseEnter = useCallback(() => {\n if (pauseOnHover) {\n setIsPaused(true);\n }\n }, [pauseOnHover]);\n\n const handleMouseLeave = useCallback(() => {\n if (pauseOnHover) {\n setIsPaused(false);\n }\n }, [pauseOnHover]);\n\n // Drag handlers\n const handleDragStart = useCallback(\n (clientX: number) => {\n if (!hasDrag) return;\n setIsDragging(true);\n setDragStart(clientX);\n setDragOffset(0);\n },\n [hasDrag]\n );\n\n const handleDragMove = useCallback(\n (clientX: number) => {\n if (!isDragging) return;\n setDragOffset(clientX - dragStart);\n },\n [isDragging, dragStart]\n );\n\n const handleDragEnd = useCallback(() => {\n if (!isDragging) return;\n setIsDragging(false);\n\n const threshold = 50;\n if (dragOffset < -threshold) {\n goToNext();\n } else if (dragOffset > threshold) {\n goToPrev();\n }\n\n setDragOffset(0);\n }, [isDragging, dragOffset, goToNext, goToPrev]);\n\n // Mouse events\n const handleMouseDown = useCallback(\n (e: React.MouseEvent) => {\n e.preventDefault();\n handleDragStart(e.clientX);\n },\n [handleDragStart]\n );\n\n const handleMouseMove = useCallback(\n (e: React.MouseEvent) => {\n handleDragMove(e.clientX);\n },\n [handleDragMove]\n );\n\n const handleMouseUp = useCallback(() => {\n handleDragEnd();\n }, [handleDragEnd]);\n\n // Touch events\n const handleTouchStart = useCallback(\n (e: React.TouchEvent) => {\n handleDragStart(e.touches[0].clientX);\n },\n [handleDragStart]\n );\n\n const handleTouchMove = useCallback(\n (e: React.TouchEvent) => {\n handleDragMove(e.touches[0].clientX);\n },\n [handleDragMove]\n );\n\n const handleTouchEnd = useCallback(() => {\n handleDragEnd();\n }, [handleDragEnd]);\n\n // Keyboard navigation\n useEffect(() => {\n const handleKeyDown = (e: KeyboardEvent) => {\n if (!carouselRef.current?.contains(document.activeElement)) return;\n\n switch (e.key) {\n case 'ArrowLeft':\n e.preventDefault();\n goToPrev();\n break;\n case 'ArrowRight':\n e.preventDefault();\n goToNext();\n break;\n }\n };\n\n document.addEventListener('keydown', handleKeyDown);\n return () => document.removeEventListener('keydown', handleKeyDown);\n }, [goToPrev, goToNext]);\n\n // Handle wrap-around transition end\n const handleTransitionEnd = useCallback(() => {\n if (isWrapping) {\n // Skip transition for the instant snap\n setSkipTransition(true);\n setIsWrapping(false);\n\n if (displayIndex === itemCount) {\n // Was at clone of first slide, snap to real first slide\n setActiveIndex(0, false);\n setDisplayIndex(0);\n } else if (displayIndex === -1) {\n // Was at clone of last slide, snap to real last slide\n setActiveIndex(itemCount - 1, false);\n setDisplayIndex(itemCount - 1);\n }\n\n // Re-enable transition after the snap\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n setSkipTransition(false);\n });\n });\n }\n }, [isWrapping, displayIndex, itemCount, setActiveIndex]);\n\n // Combined ref\n const combinedRef = useCallback(\n (node: HTMLDivElement | null) => {\n (carouselRef as React.MutableRefObject<HTMLDivElement | null>).current =\n node;\n if (typeof ref === 'function') {\n // React 19 lets a callback ref return a cleanup function and detaches by\n // running it instead of calling the ref with `null`; React 18 discards the\n // return value entirely. Returning it from here would be a React-19-only\n // contract, so we hold the cleanup and run it ourselves on detach — the\n // same shape as `Dropdown`, `Modal`, `Dialog`, `Sidebar` and `Toast`.\n // The form controls that merge a forwarded ref still discard the cleanup\n // and detach with `ref(null)`, so this is not yet library-wide — grep\n // `typeof ref === 'function'` for the current split.\n if (node === null) {\n const consumerCleanup = consumerCleanupRef.current;\n consumerCleanupRef.current = null;\n if (consumerCleanup) {\n consumerCleanup();\n } else {\n ref(null);\n }\n return;\n }\n const cleanup: unknown = ref(node);\n consumerCleanupRef.current =\n typeof cleanup === 'function' ? (cleanup as () => void) : null;\n } else if (ref) {\n (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n }\n },\n [ref]\n );\n\n // Can navigate\n const canGoPrev = repeat || activeIndex > 0;\n const canGoNext = repeat || activeIndex < itemCount - 1;\n\n // Generate classes\n const carouselClasses = usePrefixedClassNames('carousel', {\n 'is-overlay': indicatorInside,\n 'has-arrow-hover': arrowHover,\n [`is-indicator-${indicatorStyle}`]: indicatorStyle !== 'dots',\n [`is-arrow-${arrowColor}`]: !!arrowColor,\n });\n const classPrefix = useClassPrefix();\n const carouselContainerClass = usePrefixedClassNames('carousel-container');\n const carouselSlidesClass = usePrefixedClassNames('carousel-slides');\n const carouselArrowPrevClass = usePrefixedClassNames(\n 'carousel-arrow',\n 'is-prev',\n { 'is-transparent': !arrowBackground }\n );\n const carouselArrowNextClass = usePrefixedClassNames(\n 'carousel-arrow',\n 'is-next',\n { 'is-transparent': !arrowBackground }\n );\n const carouselIndicatorClass = usePrefixedClassNames('carousel-indicator', {\n 'is-inside': indicatorInside,\n 'is-top': indicatorPosition === 'top',\n });\n\n const combinedClasses = classNames(\n carouselClasses,\n bulmaHelperClasses,\n className\n );\n\n // Render slides with active state (includes clones for infinite loop)\n const renderSlides = () => {\n const slides = items.map((item, index) => {\n if (isValidElement<CarouselItemProps>(item)) {\n return cloneElement(item, {\n key: index,\n active: index === activeIndex,\n });\n }\n return item;\n });\n\n // Add clones for seamless infinite loop when repeat is enabled\n if (repeat && itemCount > 1) {\n const lastItem = items[itemCount - 1];\n const firstItem = items[0];\n\n const lastClone = isValidElement<CarouselItemProps>(lastItem)\n ? cloneElement(lastItem as React.ReactElement<CarouselItemProps>, {\n key: 'clone-last',\n active: false,\n })\n : null;\n\n const firstClone = isValidElement<CarouselItemProps>(firstItem)\n ? cloneElement(firstItem as React.ReactElement<CarouselItemProps>, {\n key: 'clone-first',\n active: false,\n })\n : null;\n\n return [lastClone, ...slides, firstClone];\n }\n\n return slides;\n };\n\n return (\n <div\n ref={combinedRef}\n className={combinedClasses}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n role=\"region\"\n aria-roledescription=\"carousel\"\n aria-label={ariaLabel}\n {...rest}\n >\n <div\n ref={containerRef}\n className={carouselContainerClass}\n onMouseDown={hasDrag ? handleMouseDown : undefined}\n onMouseMove={hasDrag && isDragging ? handleMouseMove : undefined}\n onMouseUp={hasDrag ? handleMouseUp : undefined}\n onMouseLeave={hasDrag ? handleMouseUp : undefined}\n onTouchStart={hasDrag ? handleTouchStart : undefined}\n onTouchMove={hasDrag ? handleTouchMove : undefined}\n onTouchEnd={hasDrag ? handleTouchEnd : undefined}\n style={{\n transform: isDragging ? `translateX(${dragOffset}px)` : undefined,\n cursor: hasDrag ? (isDragging ? 'grabbing' : 'grab') : undefined,\n }}\n >\n <div\n className={carouselSlidesClass}\n style={{\n // When repeat is enabled, account for the prepended clone (+1 offset)\n transform: `translateX(-${(repeat && itemCount > 1 ? displayIndex + 1 : displayIndex) * 100}%)`,\n // Disable transition during drag or instant snap after wrap-around\n transition:\n isDragging || skipTransition\n ? 'none'\n : 'transform 0.3s ease-in-out',\n }}\n onTransitionEnd={handleTransitionEnd}\n >\n {renderSlides()}\n </div>\n {arrow && itemCount > 1 && (\n <>\n <Button\n className={carouselArrowPrevClass}\n onClick={goToPrev}\n isDisabled={!canGoPrev}\n aria-label=\"Previous slide\"\n >\n {iconPrev ? (\n <Icon\n name={iconPrev}\n library={iconLibrary}\n variant={iconVariant}\n size={iconSize}\n features={iconFeatures}\n />\n ) : (\n <DefaultPrevIcon />\n )}\n </Button>\n <Button\n className={carouselArrowNextClass}\n onClick={goToNext}\n isDisabled={!canGoNext}\n aria-label=\"Next slide\"\n >\n {iconNext ? (\n <Icon\n name={iconNext}\n library={iconLibrary}\n variant={iconVariant}\n size={iconSize}\n features={iconFeatures}\n />\n ) : (\n <DefaultNextIcon />\n )}\n </Button>\n </>\n )}\n </div>\n\n {indicator && itemCount > 1 && (\n <div className={carouselIndicatorClass} role=\"tablist\">\n {items.map((_, index) => (\n <Button\n key={index}\n className={prefixedClassNames(classPrefix, 'indicator-item', {\n 'is-active': index === activeIndex,\n })}\n onClick={() => goToSlide(index)}\n role=\"tab\"\n aria-selected={index === activeIndex}\n aria-label={`Go to slide ${index + 1}`}\n />\n ))}\n </div>\n )}\n </div>\n );\n }\n);\n\nCarousel.displayName = 'Carousel';\n\nexport default Carousel;\n","import React, {\n Children,\n cloneElement,\n isValidElement,\n useEffect,\n useState,\n} from 'react';\nimport {\n classNames,\n prefixedClassNames,\n usePrefixedClassNames,\n} from '../helpers/classNames';\nimport { useClassPrefix } from '../helpers/Config';\nimport type { PolymorphicComponentWithoutRef } from '../helpers/polymorphic';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\n\n/**\n * Animation styles available for the Reveal component.\n */\nexport type RevealAnimation =\n | 'fade'\n | 'fade-up'\n | 'fade-down'\n | 'slide-left'\n | 'slide-right'\n | 'zoom'\n | 'flip';\n\n/**\n * The Reveal component's own props — everything it adds on top of the\n * attributes of whatever element `as` renders.\n */\nexport interface RevealOwnProps extends BulmaClassesProps {\n /** Animation style applied when the element enters the viewport. */\n animation?: RevealAnimation;\n /** Delay in milliseconds before the animation starts. Default: 0. */\n delay?: number;\n /** Animation duration in milliseconds. Default: 600. */\n duration?: number;\n /** Fraction (0-1) of the element that must be visible to trigger the reveal. Clamped to the 0-1 range; non-finite values fall back to `0.15`. */\n threshold?: number;\n /** Animate only the first time the element enters the viewport. If `false`, it re-animates on every entry/exit. */\n once?: boolean;\n /** Stagger direct children with an incrementing delay instead of animating this element as a single block. */\n cascade?: boolean;\n /** Milliseconds added to each successive child's delay when `cascade` is set. Default: 80. */\n cascadeInterval?: number;\n /** Content to reveal. */\n children?: React.ReactNode;\n /** Additional CSS classes. Applied to the observed element (the wrapper `div` when `as` is a component). */\n className?: string;\n /** Inline styles, merged after the animation's own. Applied to the observed element. */\n style?: React.CSSProperties;\n}\n\n/**\n * Props for the Reveal component. The DOM attributes follow `as`.\n *\n * Reveal forwards no `ref`: it owns the node it observes for scroll\n * intersection, and when `as` is a component that node is a wrapper `div`\n * rather than the element `as` names — so a ref derived from `as` would point\n * at the wrong thing.\n */\nexport type RevealProps<T extends React.ElementType = 'div'> = RevealOwnProps &\n Omit<React.ComponentPropsWithoutRef<T>, keyof RevealOwnProps | 'as'> & {\n /** Element or component to render as. Default: 'div'. When `as` is a plain intrinsic tag (e.g. `'section'`), your `className`, `style`, and Bulma helper classes plus everything in `...rest` all land on that single element. When `as` is a component (e.g. `Section`, `Card`), scroll detection needs a real DOM node with a ref, so `Reveal` wraps it in an observed `div`: `className`/`style`/helper classes go on that wrapper `div`, while `...rest` (`id`, `aria-*`, `data-*`, event handlers) is forwarded to the inner component. */\n as?: T;\n };\n\n/**\n * The shape the implementation destructures. The public contract is the generic\n * `RevealProps<T>` above — the body cannot see through `T`.\n */\ntype RevealImplProps = RevealOwnProps & { as?: React.ElementType };\n\n/**\n * Detects the user's `prefers-reduced-motion` preference. Always `false` on\n * the server and on the very first client render, so SSR output and the\n * initial hydration pass always agree.\n *\n * @function\n * @returns {boolean} Whether the user has requested reduced motion.\n */\nfunction usePrefersReducedMotion(): boolean {\n const [prefersReducedMotion, setPrefersReducedMotion] = useState(false);\n\n useEffect(() => {\n if (typeof window === 'undefined' || !window.matchMedia) return undefined;\n\n const mediaQuery = window.matchMedia('(prefers-reduced-motion: reduce)');\n // eslint-disable-next-line react-hooks/set-state-in-effect -- reads the live media query on mount\n setPrefersReducedMotion(mediaQuery.matches);\n\n const handleChange = (event: MediaQueryListEvent) => {\n setPrefersReducedMotion(event.matches);\n };\n\n mediaQuery.addEventListener('change', handleChange);\n return () => mediaQuery.removeEventListener('change', handleChange);\n }, []);\n\n return prefersReducedMotion;\n}\n\n/**\n * The `Reveal` component animates its content into view as it scrolls into the viewport, backed by `IntersectionObserver`.\n *\n * @function\n * @param {RevealProps} props - Props for the Reveal component.\n * @returns {JSX.Element} The rendered reveal wrapper.\n *\n * @example\n * // Fade a section up into view\n * <Reveal animation=\"fade-up\" as={Section}>\n * <Title>Why Grass Doctor</Title>\n * </Reveal>\n *\n * @example\n * // Stagger a set of cards as they enter the viewport\n * <Reveal animation=\"fade-up\" cascade cascadeInterval={80}>\n * {services.map(service => (\n * <Card key={service.name}>{service.name}</Card>\n * ))}\n * </Reveal>\n */\nfunction RevealImpl(revealProps: RevealProps) {\n const {\n animation = 'fade-up',\n delay = 0,\n duration = 600,\n threshold = 0.15,\n once = true,\n as: Component = 'div',\n cascade = false,\n cascadeInterval = 80,\n className,\n style,\n children,\n ...props\n } = revealProps as RevealImplProps;\n const { bulmaHelperClasses, rest } = useBulmaClasses(props);\n const classPrefix = useClassPrefix();\n const prefersReducedMotion = usePrefersReducedMotion();\n const [node, setNode] = useState<HTMLElement | null>(null);\n const [isMounted, setIsMounted] = useState(false);\n const [isRevealed, setIsRevealed] = useState(false);\n\n // IntersectionObserver throws a RangeError for NaN or thresholds outside\n // 0-1, so clamp valid numbers and fall back to the default for anything else.\n const observerThreshold = Number.isFinite(threshold)\n ? Math.min(Math.max(threshold, 0), 1)\n : 0.15;\n\n useEffect(() => {\n // eslint-disable-next-line react-hooks/set-state-in-effect -- flips to true once mounted on the client so SSR/first-paint markup matches the server\n setIsMounted(true);\n }, []);\n\n useEffect(() => {\n if (prefersReducedMotion) {\n // eslint-disable-next-line react-hooks/set-state-in-effect -- reduced motion skips straight to the revealed state\n setIsRevealed(true);\n return undefined;\n }\n\n if (typeof IntersectionObserver === 'undefined') {\n setIsRevealed(true);\n return undefined;\n }\n\n // The ref callback attaches after this effect's first pass; it re-runs\n // once `node` becomes available since it's a dependency.\n if (!node) return undefined;\n\n const observer = new IntersectionObserver(\n ([entry]) => {\n if (entry.isIntersecting) {\n setIsRevealed(true);\n if (once) observer.unobserve(node);\n } else if (!once) {\n setIsRevealed(false);\n }\n },\n { threshold: observerThreshold }\n );\n\n observer.observe(node);\n return () => observer.disconnect();\n }, [node, prefersReducedMotion, once, observerThreshold]);\n\n // Only apply the hidden/animating state once mounted on the client with\n // motion allowed; otherwise render the final, visible state (SSR-safe).\n const isAnimated = isMounted && !prefersReducedMotion;\n const revealed = !isAnimated || isRevealed;\n\n const itemAnimationClasses = prefixedClassNames(classPrefix, {\n [`reveal-${animation}`]: isAnimated,\n 'is-revealed': revealed,\n });\n\n const combinedClasses = classNames(\n usePrefixedClassNames('reveal', { 'is-cascade': cascade }),\n !cascade && itemAnimationClasses,\n bulmaHelperClasses,\n className\n );\n\n const wrapperStyle: React.CSSProperties = cascade\n ? { ...style }\n : {\n ...style,\n transitionDelay: `${delay}ms`,\n transitionDuration: `${duration}ms`,\n };\n\n const content = cascade\n ? Children.toArray(children).map((child, index) => {\n const itemStyle: React.CSSProperties = {\n transitionDelay: `${delay + index * cascadeInterval}ms`,\n transitionDuration: `${duration}ms`,\n };\n\n if (\n isValidElement<{ className?: string; style?: React.CSSProperties }>(\n child\n )\n ) {\n return cloneElement(child, {\n // Children.toArray always assigns a key, generating one from\n // the position when the element doesn't already have one.\n key: child.key,\n className: classNames(itemAnimationClasses, child.props.className),\n style: { ...itemStyle, ...child.props.style },\n });\n }\n\n return (\n <span key={index} className={itemAnimationClasses} style={itemStyle}>\n {child}\n </span>\n );\n })\n : children;\n\n // Scroll observation needs a DOM node this component OWNS — the observer and\n // the animation classes both key off it. An intrinsic tag is that node, so\n // the ref goes straight on it. A component passed via `as` is not: whatever\n // it renders is its own business, and it may render several elements or\n // none. So it gets wrapped in an observed `div`.\n //\n // Not a statement about ref forwarding. Several components in this library\n // forward refs (#641 added four more), and that changes nothing here — a\n // forwarded ref would still point at the target's node rather than at one\n // this component controls.\n if (typeof Component === 'string') {\n // A plain createElement call sidesteps the combinatorial JSX prop types\n // for `ref` across every possible intrinsic tag `as` could be.\n return React.createElement(\n Component,\n {\n ...rest,\n ref: setNode,\n className: combinedClasses,\n style: wrapperStyle,\n },\n content\n );\n }\n\n return (\n <div ref={setNode} className={combinedClasses} style={wrapperStyle}>\n <Component {...rest}>{content}</Component>\n </div>\n );\n}\n\nexport const Reveal = RevealImpl as PolymorphicComponentWithoutRef<\n RevealOwnProps,\n 'div'\n>;\n\nReveal.displayName = 'Reveal';\n\nexport default Reveal;\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * Props for the Block component.\n */\nexport interface BlockProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /**\n * Text color alias: renders `has-text-<color>`, exactly like `textColor`.\n * Not a filled variant (no `.block.is-<color>` CSS exists). Prefer\n * `textColor`, which takes precedence when both are set; use `bgColor` for\n * a colored surface.\n */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Content to render inside the block. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Block` component renders a simple container with Bulma's `.block` class, adding vertical margin between sections of content.\n *\n * @function\n * @param {BlockProps} props - Props for the Block component.\n * @returns {JSX.Element} The rendered block element.\n * @see {@link https://bulma.io/documentation/elements/block/ | Bulma Block documentation}\n */\nexport const Block: React.FC<BlockProps> = ({\n className,\n textColor,\n color,\n bgColor,\n children,\n ...props\n}) => {\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n\n const bulmaClasses = usePrefixedClassNames('block');\n const blockClasses = classNames(bulmaClasses, bulmaHelperClasses, className);\n\n return (\n <div className={blockClasses} {...rest}>\n {children}\n </div>\n );\n};\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n validSchemeColors,\n} from '../helpers/useBulmaClasses';\nimport { mergeBulmaStyles } from '../helpers/mergeBulmaStyles';\n\n/**\n * Props for the Box component.\n */\nexport interface BoxProps\n /** @ignore */\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /**\n * Text color alias: renders `has-text-<color>`, exactly like `textColor`.\n * Not a filled box variant (no `.box.is-<color>` CSS exists). Prefer\n * `textColor`, which takes precedence when both are set; use `bgColor` for\n * a colored surface.\n */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /**\n * Background color helper. `scheme-*` values render as a dark-mode-safe\n * inline `background-color: var(--bulma-scheme-*)` instead of a class. The\n * `scheme-invert*` values do not change text color — pair them with a\n * contrasting foreground.\n */\n bgColor?:\n | (typeof validColors)[number]\n | (typeof validSchemeColors)[number]\n | 'inherit'\n | 'current';\n /** Whether the box has a shadow (default: true). */\n hasShadow?: boolean;\n /** Content to render inside the box. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Box` component renders a bordered, padded container with an optional shadow using Bulma's `.box` class.\n *\n * @function\n * @param {BoxProps} props - Props for the Box component.\n * @returns {JSX.Element} The rendered box element.\n * @see {@link https://bulma.io/documentation/elements/box/ | Bulma Box documentation}\n */\nexport const Box: React.FC<BoxProps> = ({\n className,\n textColor,\n color,\n bgColor,\n hasShadow = true,\n children,\n style,\n ...props\n}) => {\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n\n const bulmaClasses = usePrefixedClassNames('box', {\n 'is-shadowless': !hasShadow,\n });\n\n const boxClasses = classNames(bulmaClasses, bulmaHelperClasses, className);\n\n return (\n <div\n className={boxClasses}\n style={mergeBulmaStyles(bulmaHelperStyles, style)}\n {...rest}\n >\n {children}\n </div>\n );\n};\n\nexport default Box;\n","import React, { forwardRef } from 'react';\nimport { Button, ButtonOwnProps } from './Button';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport type { PolymorphicComponent } from '../helpers/polymorphic';\n\n/**\n * The LinkButton component's own props — everything it adds on top of the\n * attributes of whatever element `as` renders.\n */\nexport interface LinkButtonOwnProps extends Omit<\n ButtonOwnProps,\n 'color' | 'isOutlined' | 'isInverted' | 'isLight'\n> {\n /** Display mode. `text` has no underline and highlights its background on hover; `ghost` uses the default text color and underlines on hover; `underline` drops the button chrome entirely (transparent background and border) and underlines on hover or focus. */\n variant?: 'text' | 'ghost' | 'underline';\n /** Text color override for the button. */\n color?:\n | 'primary'\n | 'link'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger'\n | 'white'\n | 'light'\n | 'dark'\n | 'black';\n /**\n * Not available on `LinkButton`, and declared so that a custom `as` target\n * cannot reintroduce it. `Button` consumes these three for styling variants\n * `LinkButton` does not offer, and strips them before rendering the target —\n * so without this a component requiring one would type-check and silently\n * never receive it.\n * @internal\n */\n isOutlined?: never;\n /** @internal Not available on `LinkButton` — see `isOutlined`. */\n isInverted?: never;\n /** @internal Not available on `LinkButton` — see `isOutlined`. */\n isLight?: never;\n}\n\n/**\n * Props for the LinkButton component. The DOM attributes and the `ref` both\n * follow `as`, exactly as they do on `Button`.\n *\n * @extraProp {PolymorphicRef<React.ElementType>} [ref] - Ref forwarded to the element `as` renders, typed from `as`: the DOM node for an intrinsic tag, or whatever handle a custom component exposes.\n */\nexport type LinkButtonProps<T extends React.ElementType = 'button'> =\n LinkButtonOwnProps &\n Omit<React.ComponentPropsWithoutRef<T>, keyof LinkButtonOwnProps | 'as'> & {\n /**\n * Render as a `<button>`, `<a>`, or a custom component (e.g. a router `Link`).\n * @defaultValue 'button'\n */\n as?: T;\n };\n\n/**\n * The `LinkButton` component renders a `<button>` that visually looks like text or a link.\n *\n * @function\n * @param {LinkButtonProps} props - Props for the LinkButton component.\n * @param {React.Ref} ref - Forwarded ref to the element `as` renders.\n * @returns {JSX.Element} The rendered link-styled button element.\n *\n * @example\n * // Text variant (default)\n * <LinkButton onClick={handleClick}>Click me</LinkButton>\n *\n * @example\n * // Underline variant with color\n * <LinkButton variant=\"underline\" color=\"primary\">Learn more</LinkButton>\n */\nexport const LinkButton = forwardRef(function LinkButton(\n { variant = 'text', color, className, ...props }: LinkButtonProps,\n ref: React.Ref<HTMLElement>\n) {\n const buttonColor = variant === 'underline' ? 'text' : variant;\n\n const prefixedClasses = usePrefixedClassNames(\n 'link-button',\n color && `link-button-${color}`,\n variant === 'underline' && 'link-button-underline'\n );\n\n return (\n <Button\n // LinkButton is polymorphic through to Button, which resolves the element\n // from `as`. TS cannot infer that through the spread below.\n ref={ref as React.Ref<HTMLButtonElement>}\n color={buttonColor}\n className={classNames(prefixedClasses, className)}\n {...props}\n />\n );\n}) as PolymorphicComponent<LinkButtonOwnProps, 'button'>;\n\nLinkButton.displayName = 'LinkButton';\n\nexport default LinkButton;\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport { Button } from './Button';\nimport { LinkButton } from './LinkButton';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\nconst validButtonsSizes = ['small', 'medium', 'large'] as const;\n/**\n * Valid size values for the Buttons component (Bulma button group sizes).\n */\nexport type ButtonsSize = (typeof validButtonsSizes)[number];\n\n/**\n * Props for the Buttons component.\n */\ninterface ButtonsProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'size'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text color helper for the button group. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /**\n * Text color alias: renders `has-text-<color>`, exactly like `textColor`.\n * Not a filled variant (no `.buttons.is-<color>` CSS exists; color the\n * individual `Button`s instead). Prefer `textColor`, which takes precedence\n * when both are set; use `bgColor` for a colored surface.\n */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Background color helper for the button group. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Center the group of buttons. */\n isCentered?: boolean;\n /** Align the group of buttons to the right. */\n isRight?: boolean;\n /** Group buttons together as addons (removes spacing between them). */\n hasAddons?: boolean;\n /** Size of the button group. */\n size?: ButtonsSize;\n /** The button elements to render inside the group. */\n children: React.ReactNode;\n}\n\n/**\n * The `Buttons` component lets you group multiple `Button` elements together with Bulma's spacing, alignment, and add-on features.\n *\n * @function\n * @param {ButtonsProps} props - Props for the Buttons component.\n * @returns {JSX.Element} The rendered group of buttons.\n * @see {@link https://bulma.io/documentation/elements/button/#group | Bulma Button Group documentation}\n */\nconst ButtonsComponent: React.FC<ButtonsProps> = ({\n className,\n textColor,\n color,\n bgColor,\n isCentered,\n isRight,\n hasAddons,\n size,\n children,\n ...props\n}) => {\n const buttonsClasses = usePrefixedClassNames('buttons', {\n 'is-centered': isCentered,\n 'is-right': isRight,\n 'has-addons': hasAddons,\n [`are-${size}`]: size && validButtonsSizes.includes(size),\n });\n\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n\n const combinedClasses = classNames(\n buttonsClasses,\n className,\n bulmaHelperClasses\n );\n\n return (\n <div className={combinedClasses} {...rest}>\n {children}\n </div>\n );\n};\n\nexport const Buttons = withSubComponents(\n ButtonsComponent,\n {\n Button,\n LinkButton,\n },\n 'Buttons'\n);\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * Props for the Code component.\n */\nexport interface CodeProps\n extends\n React.HTMLAttributes<HTMLElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Code content to render inside the element. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Code` component renders a styled `<code>` element with Bulma helper class integration.\n *\n * @function\n * @param {CodeProps} props - Props for the Code component.\n * @returns {JSX.Element} The rendered code element.\n */\nexport const Code: React.FC<CodeProps> = ({\n className,\n textColor,\n bgColor,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n } as BulmaClassesProps & typeof props);\n\n const bulmaClasses = usePrefixedClassNames();\n const codeClasses = classNames(bulmaClasses, bulmaHelperClasses, className);\n\n return (\n <code className={codeClasses || undefined} {...rest}>\n {children}\n </code>\n );\n};\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * Props for the Content component.\n */\ninterface ContentProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text color helper (e.g., `'danger'` for `has-text-danger`). */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /**\n * Text color alias: renders `has-text-<color>`, exactly like `textColor`.\n * Not a filled variant (no `.content.is-<color>` CSS exists). Prefer\n * `textColor`, which takes precedence when both are set; use `bgColor` for\n * a colored surface.\n */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Background color helper (e.g., `'info'` for `has-background-info`). */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Size modifier for the content. */\n size?: 'small' | 'normal' | 'medium' | 'large';\n /** Content to be rendered inside the block. */\n children?: React.ReactNode;\n}\n\n// Valid size modifiers for the content class\nconst validSizes = ['small', 'medium', 'large'] as const;\n\n/**\n * The `Content` component applies Bulma’s typographic styles to its children, enhancing the appearance of HTML elements like paragraphs, headings, lists, and tables.\n *\n * @function\n * @param {ContentProps} props - Props for the Content component.\n * @returns {JSX.Element} The rendered content block.\n * @see {@link https://bulma.io/documentation/elements/content/ | Bulma Content documentation}\n */\nexport const Content: React.FC<ContentProps> = ({\n className,\n textColor,\n color,\n bgColor,\n size,\n children,\n ...props\n}) => {\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n\n const bulmaClasses = usePrefixedClassNames('content', {\n [`is-${size}`]: size && size !== 'normal' && validSizes.includes(size),\n });\n\n const contentClasses = classNames(\n bulmaClasses,\n bulmaHelperClasses,\n className\n );\n\n return (\n <div className={contentClasses} {...rest}>\n {children}\n </div>\n );\n};\n\nexport default Content;\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * Props for the Delete component.\n */\ninterface DeleteProps\n extends React.HTMLAttributes<HTMLButtonElement>, BulmaClassesProps {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /**\n * Text color alias: renders `has-text-<color>`, exactly like `textColor`.\n * Not a filled variant (no `.delete.is-<color>` CSS exists). Prefer\n * `textColor`, which takes precedence when both are set; use `bgColor` for\n * a colored surface.\n */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Click handler for the button. */\n onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n /** Size modifier for the delete button. */\n size?: 'small' | 'medium' | 'large';\n /** ARIA label for accessibility (default: 'Close'). */\n ariaLabel?: string;\n /** Whether the button is disabled (default: false). */\n disabled?: boolean;\n}\n\n/**\n * The `Delete` component provides a Bulma-styled close/delete button for dismissing modals, notifications, tags, messages, and more.\n *\n * @function\n * @param {DeleteProps} props - Props for the Delete component.\n * @returns {JSX.Element} The rendered delete button.\n * @see {@link https://bulma.io/documentation/elements/delete/ | Bulma Delete documentation}\n */\nexport const Delete: React.FC<DeleteProps> = ({\n className,\n textColor,\n color,\n bgColor,\n onClick,\n size,\n ariaLabel = 'Close',\n disabled = false,\n ...props\n}) => {\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n\n const bulmaClasses = usePrefixedClassNames('delete', {\n [`is-${size}`]: size,\n 'is-disabled': disabled,\n });\n\n const classes = classNames(bulmaClasses, bulmaHelperClasses, className);\n\n return (\n <button\n className={classes}\n onClick={onClick}\n aria-label={ariaLabel}\n disabled={disabled}\n type=\"button\"\n {...rest}\n />\n );\n};\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * Props for the Divider component.\n */\nexport interface DividerProps\n extends\n React.HTMLAttributes<HTMLHRElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n}\n\n/**\n * The `Divider` component renders a styled horizontal rule (`<hr>`) element with Bulma helper class integration.\n *\n * @function\n * @param {DividerProps} props - Props for the Divider component.\n * @returns {JSX.Element} The rendered hr element.\n */\nexport const Divider: React.FC<DividerProps> = ({\n className,\n bgColor,\n ...props\n}) => {\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n backgroundColor: bgColor,\n ...props,\n } as BulmaClassesProps & typeof props);\n\n const bulmaClasses = usePrefixedClassNames();\n const dividerClasses = classNames(\n bulmaClasses,\n bulmaHelperClasses,\n className\n );\n\n return <hr className={dividerClasses || undefined} {...rest} />;\n};\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * Props for the Emphasis component.\n */\nexport interface EmphasisProps\n extends\n React.HTMLAttributes<HTMLElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Content to render inside the em element. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Emphasis` component renders a styled `<em>` element with Bulma helper class integration.\n *\n * @function\n * @param {EmphasisProps} props - Props for the Emphasis component.\n * @returns {JSX.Element} The rendered em element.\n */\nexport const Emphasis: React.FC<EmphasisProps> = ({\n className,\n textColor,\n bgColor,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n } as BulmaClassesProps & typeof props);\n\n const bulmaClasses = usePrefixedClassNames();\n const emphasisClasses = classNames(\n bulmaClasses,\n bulmaHelperClasses,\n className\n );\n\n return (\n <em className={emphasisClasses || undefined} {...rest}>\n {children}\n </em>\n );\n};\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * Props for the FigureCaption component.\n */\nexport interface FigureCaptionProps\n extends\n React.HTMLAttributes<HTMLElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text color (Bulma color, 'inherit', or 'current'). */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color (Bulma color, 'inherit', or 'current'). */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Content to be rendered inside the figcaption. */\n children?: React.ReactNode;\n}\n\n/**\n * FigureCaption component for rendering a styled figcaption element.\n *\n * A FigureCaption wraps the HTML `<figcaption>` element with Bulma helper class integration.\n * Use it inside Figure components to provide captions for images or other media.\n *\n * @function\n * @param {FigureCaptionProps} props - Props for the FigureCaption component.\n * @returns {JSX.Element} The rendered figcaption element.\n */\nconst FigureCaption: React.FC<FigureCaptionProps> = ({\n className,\n textColor,\n bgColor,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n } as BulmaClassesProps & typeof props);\n\n const bulmaClasses = usePrefixedClassNames();\n const captionClasses = classNames(\n bulmaClasses,\n bulmaHelperClasses,\n className\n );\n\n return (\n <figcaption className={captionClasses || undefined} {...rest}>\n {children}\n </figcaption>\n );\n};\n\n/**\n * Props for the Figure component.\n */\nexport interface FigureProps\n extends\n React.HTMLAttributes<HTMLElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Content to render inside the figure. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Figure` component renders a styled `<figure>` element with Bulma helper class integration.\n *\n * @function\n * @param {FigureProps} props - Props for the Figure component.\n * @returns {JSX.Element} The rendered figure element.\n */\nconst FigureComponent: React.FC<FigureProps> = ({\n className,\n textColor,\n bgColor,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n } as BulmaClassesProps & typeof props);\n\n const bulmaClasses = usePrefixedClassNames();\n const figureClasses = classNames(bulmaClasses, bulmaHelperClasses, className);\n\n return (\n <figure className={figureClasses || undefined} {...rest}>\n {children}\n </figure>\n );\n};\n\n/**\n * Figure component with Caption subcomponent.\n *\n * @example\n * <Figure>\n * <img src=\"image.jpg\" alt=\"Description\" />\n * <Figure.Caption>Image caption text</Figure.Caption>\n * </Figure>\n */\nexport const Figure = withSubComponents(\n FigureComponent,\n {\n Caption: FigureCaption,\n },\n 'Figure'\n);\n","import React from 'react';\nimport type { IconProps } from './Icon';\n\n/**\n * Distinguishes an `IconProps` object from a plain custom node (an inline SVG, a\n * `react-icons` component, …) in a slot that accepts either — `Control`'s\n * `iconLeft`/`iconRight`, `IconText`'s `iconProps`.\n *\n * One copy, imported by both consumers: two hand-maintained copies, one per\n * consumer, is how the deprecated `icon` path came to crash both (#663).\n *\n * Its own module rather than `Icon.tsx` because `src/index.ts` wildcard-exports\n * that file, and everything published there is public forever. `polymorphic.ts`\n * makes the same call for `isCustomElement`: an internal discriminator is not\n * something to support for the life of the package.\n *\n * It tests each member's VALUE, not merely its key, and only after everything\n * React owns is out of the way. `'icon' in value` was enough\n * to claim a Font Awesome `IconDefinition` — `{ prefix, iconName, icon: [w, h, …,\n * path] }` — whose `icon` is a path array rather than a class string. That object\n * is not a renderable node either, so the honest outcome is the one this slot has\n * always had for it: the node branch, and React's own \"Objects are not valid as a\n * React child\". Claiming it here instead rendered a blank container that still\n * reserved layout.\n *\n * A member added to `IconProps` needs a line here, and a missed one is a crash\n * rather than a fallthrough. That is the cost of a slot taking either a props\n * object or a node; keeping the guard in one place is what keeps the cost to a\n * single line.\n */\nexport function isIconProps(\n value: IconProps | React.ReactNode\n): value is IconProps {\n if (typeof value !== 'object' || value === null) return false;\n // Anything React owns. `isValidElement` covers elements only; a PORTAL is a\n // valid `ReactNode` that fails it and carries a `children` key, so the member\n // test below claimed it and `Control` spread it into `<Icon>` as props —\n // rendering the portal's child locally instead of in its container. Every\n // React internal carries `$$typeof`, so testing for it covers lazy, context\n // and whatever React adds next, rather than portals alone.\n if (React.isValidElement(value) || '$$typeof' in value) return false;\n const candidate = value as {\n name?: unknown;\n icon?: unknown;\n children?: unknown;\n };\n return (\n typeof candidate.name === 'string' ||\n typeof candidate.icon === 'string' ||\n 'children' in candidate\n );\n}\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\nimport { Icon, IconProps } from './Icon';\nimport { isIconProps } from './iconProps';\n\n/**\n * Represents an item for the IconText component, containing icon props and optional text.\n */\ninterface IconTextItem {\n /** Props for the Icon component, or a custom node (an inline SVG, a `react-icons` component, …) rendered in place of a class-based glyph. */\n iconProps: IconProps | React.ReactNode;\n /** Optional text to display next to the icon. */\n text?: string;\n}\n\n/**\n * Props for the IconText component.\n */\ninterface IconTextProps\n extends React.HTMLAttributes<HTMLSpanElement>, BulmaClassesProps {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /**\n * Text color alias: renders `has-text-<color>`, exactly like `textColor`.\n * Not a filled variant (no `.icon-text.is-<color>` CSS exists). Prefer\n * `textColor`, which takes precedence when both are set; use `bgColor` for\n * a colored surface.\n */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Props for a single Icon component, or a custom node, for single icon mode. */\n iconProps?: IconProps | React.ReactNode; // For single icon\n /** Text for a single icon (for single icon mode). */\n children?: React.ReactNode; // Text for single icon\n /** Array of icon/text pairs (for multiple icons mode). */\n items?: IconTextItem[]; // For multiple icons\n}\n\n/**\n * The `IconText` component provides a Bulma-styled horizontal arrangement of one or more `Icon` components and optional text.\n *\n * @function\n * @param {IconTextProps} props - Props for the IconText component.\n * @returns {JSX.Element} The rendered icon text element.\n * @see {@link https://bulma.io/documentation/elements/icon/#icon-text | Bulma IconText documentation}\n */\nconst IconTextComponent: React.FC<IconTextProps> = ({\n className,\n textColor,\n color,\n bgColor,\n iconProps,\n children,\n items,\n ...props\n}) => {\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n\n const bulmaClasses = usePrefixedClassNames('icon-text');\n const iconTextClasses = classNames(\n bulmaClasses,\n bulmaHelperClasses,\n className\n );\n\n return (\n <span className={iconTextClasses} {...rest}>\n {items ? (\n items.map((item, index) => (\n <React.Fragment key={index}>\n {item.iconProps &&\n (isIconProps(item.iconProps) ? (\n <Icon {...item.iconProps} />\n ) : (\n <Icon>{item.iconProps}</Icon>\n ))}\n {item.text && <span>{item.text}</span>}\n </React.Fragment>\n ))\n ) : (\n <>\n {iconProps &&\n (isIconProps(iconProps) ? (\n <Icon {...iconProps} />\n ) : (\n <Icon>{iconProps}</Icon>\n ))}\n {children && <span>{children}</span>}\n </>\n )}\n </span>\n );\n};\n\nexport const IconText = withSubComponents(\n IconTextComponent,\n { Icon },\n 'IconText'\n);\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * Props for the Image component.\n */\nexport interface ImageProps\n extends\n React.HTMLAttributes<HTMLElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text color helper for the container. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /**\n * Text color alias: renders `has-text-<color>`, exactly like `textColor`.\n * Not a filled variant (no `.image.is-<color>` CSS exists). Prefer\n * `textColor`, which takes precedence when both are set; use `bgColor` for\n * a colored surface.\n */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Background color helper for the container. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Fixed size or aspect ratio modifier for the image container. */\n size?:\n | '16x16'\n | '24x24'\n | '32x32'\n | '48x48'\n | '64x64'\n | '96x96'\n | '128x128'\n | 'square'\n | '1by1'\n | '5by4'\n | '4by3'\n | '3by2'\n | '5by3'\n | '16by9'\n | '2by1'\n | '3by1'\n | '4by5'\n | '3by4'\n | '2by3'\n | '3by5'\n | '9by16'\n | '1by2'\n | '1by3';\n /** Renders the image with rounded corners. */\n isRounded?: boolean;\n /** Uses retina (2x) image source. */\n isRetina?: boolean;\n /** Image source URL. */\n src?: string;\n /** Alternate text for the image. */\n alt?: string;\n /** Arbitrary content (e.g., iframe, custom HTML) inside the image container. */\n children?: React.ReactNode;\n /** Container element tag. Defaults to `'figure'` when using aspect-ratio sizes, `'div'` otherwise. */\n as?: 'figure' | 'div' | 'p';\n}\n\n/**\n * The `Image` component wraps images, iframes, or custom content in a Bulma-styled container, supporting fixed sizes, aspect ratios, rounded corners, retina images, and all Bulma helper props for color and spacing.\n *\n * @function\n * @param {ImageProps} props - Props for the Image component.\n * @returns {JSX.Element} The rendered image element.\n * @see {@link https://bulma.io/documentation/elements/image/ | Bulma Image documentation}\n */\nexport const Image: React.FC<ImageProps> = ({\n as,\n className,\n textColor,\n color,\n bgColor,\n size,\n isRounded,\n isRetina,\n src,\n alt,\n children,\n ...props\n}) => {\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n\n const bulmaClasses = usePrefixedClassNames('image', {\n [`is-${size}`]: size,\n 'has-ratio': size && typeof size === 'string' && size.includes('by'),\n });\n\n const imageClasses = classNames(bulmaClasses, bulmaHelperClasses, className);\n\n // Default tag logic: if \"as\" is provided, use it.\n // If not, use <figure> for aspect ratios or children, <div> otherwise.\n let Tag: 'figure' | 'div' | 'p';\n if (as) {\n Tag = as;\n } else if (size && typeof size === 'string' && size.includes('by')) {\n Tag = 'figure';\n } else {\n Tag = 'div';\n }\n\n const roundedClass = usePrefixedClassNames('is-rounded');\n\n const content = children ? (\n children\n ) : (\n <img\n className={classNames({ [roundedClass]: isRounded })}\n src={src}\n alt={alt}\n {...(isRetina && src ? { srcSet: `${src} 2x` } : {})}\n />\n );\n\n return (\n <Tag className={imageClasses} {...rest}>\n {content}\n </Tag>\n );\n};\n\nexport default Image;\n","import React, { forwardRef } from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport type { PolymorphicComponent } from '../helpers/polymorphic';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * The Link component's own props — everything it adds on top of the attributes\n * of whatever element `as` renders.\n */\nexport interface LinkOwnProps extends Omit<\n BulmaClassesProps,\n 'color' | 'backgroundColor'\n> {\n /**\n * Not accepted. `color` on this component would be the deprecated\n * presentational HTML attribute, and `useBulmaClasses` consumes any `color`\n * key as a Bulma helper before the target could see it — so it is declared\n * unavailable rather than silently eaten. Use `textColor` / `bgColor`.\n * @internal\n */\n color?: never;\n /**\n * Not accepted under this name. `useBulmaClasses` consumes any\n * `backgroundColor` key before `rest` is spread, so a custom `as` target\n * declaring one would never receive it. Use `bgColor`.\n * @internal\n */\n backgroundColor?: never;\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Whether the link appears active. */\n isActive?: boolean;\n /** Content to render inside the link. */\n children?: React.ReactNode;\n}\n\n/**\n * Props for the Link component. The DOM attributes and the `ref` both follow\n * `as`: with the default `'a'` the anchor attributes (`href`, `target`, `rel`)\n * are accepted, with `as=\"span\"` they are not.\n *\n * @extraProp {PolymorphicRef<React.ElementType>} [ref] - Ref forwarded to the element `as` renders, typed from `as`: the DOM node for an intrinsic tag, or whatever handle a custom component exposes.\n */\nexport type LinkProps<T extends React.ElementType = 'a'> = LinkOwnProps &\n Omit<React.ComponentPropsWithoutRef<T>, keyof LinkOwnProps | 'as'> & {\n /** Render as another intrinsic element (`'span'`, `'button'`) or a custom component (e.g. a router `Link`) instead of `<a>`. Defaults to `'a'`. */\n as?: T;\n };\n\n/**\n * The shape the implementation destructures. The public contract is the generic\n * `LinkProps<T>` above — the body cannot see through `T`, so it reads the widest\n * form of the props it actually touches.\n */\ntype LinkImplProps = LinkOwnProps & { as?: React.ElementType };\n\n/**\n * The `Link` component renders a styled anchor (`<a>`) element with Bulma helper class integration.\n *\n * @function\n * @param {LinkProps} props - Props for the Link component.\n * @param {React.Ref} ref - Forwarded ref to the element `as` renders.\n * @returns {JSX.Element} The rendered anchor, or whatever `as` names.\n * @see {@link https://bulma.io/documentation/elements/content/ | Bulma Content documentation}\n */\nexport const Link = forwardRef(function Link(\n linkProps: LinkProps,\n ref: React.Ref<HTMLElement>\n) {\n const {\n className,\n textColor,\n bgColor,\n isActive,\n as: Component = 'a',\n children,\n ...props\n } = linkProps as LinkImplProps;\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n } as BulmaClassesProps & typeof props);\n\n const bulmaClasses = usePrefixedClassNames({\n 'is-active': isActive,\n });\n const linkClasses = classNames(bulmaClasses, bulmaHelperClasses, className);\n\n return (\n <Component ref={ref} className={linkClasses || undefined} {...rest}>\n {children}\n </Component>\n );\n}) as PolymorphicComponent<LinkOwnProps, 'a'>;\n\nLink.displayName = 'Link';\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * Props for the ListItem component.\n * @extraProp {number} [value] - Custom value for ordered list items.\n */\nexport interface ListItemProps\n extends\n React.LiHTMLAttributes<HTMLLIElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Content to render inside the list item. */\n children?: React.ReactNode;\n}\n\n/**\n * The `ListItem` component renders a styled list item (`<li>`) element with Bulma helper class integration.\n *\n * @function\n * @param {ListItemProps} props - Props for the ListItem component.\n * @returns {JSX.Element} The rendered li element.\n */\nexport const ListItem: React.FC<ListItemProps> = ({\n className,\n textColor,\n bgColor,\n children,\n ...props\n}) => {\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n } as BulmaClassesProps & typeof props);\n\n const bulmaClasses = usePrefixedClassNames();\n const itemClasses = classNames(bulmaClasses, bulmaHelperClasses, className);\n\n return (\n <li className={itemClasses || undefined} {...rest}>\n {children}\n </li>\n );\n};\n","import React, { useEffect, useState, useCallback } from 'react';\nimport { createPortal } from 'react-dom';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\nimport { warnUnstyledColor } from '../helpers/colorDeprecations';\n\n/**\n * Props for the Notification component.\n */\nexport interface NotificationProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /**\n * Bulma color modifier for the notification (renders `is-<color>`).\n *\n * Only `primary`, `link`, `info`, `success`, `warning`, `danger`, `black`,\n * `white`, `light`, and `dark` have shipped CSS for `.notification`. Every\n * other value the union accepts emits a class no CSS rule matches, so the\n * notification renders unstyled; those log a console warning in development\n * and will be removed from this union in the next major version.\n */\n color?: (typeof validColors)[number];\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Use the light color variant. */\n isLight?: boolean;\n /** Shows a close (delete) button in the notification. */\n hasDelete?: boolean;\n /** Callback fired when the delete button is clicked. */\n onDelete?: () => void;\n /** Content inside the notification. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Notification` component is a Bulma-styled alert/message area for providing feedback, warnings, or information to users.\n *\n * @function\n * @param {NotificationProps} props - Props for the Notification component.\n * @returns {JSX.Element} The rendered notification element.\n * @see {@link https://bulma.io/documentation/elements/notification/ | Bulma Notification documentation}\n */\nexport const Notification: React.FC<NotificationProps> = ({\n className,\n color,\n textColor,\n isLight,\n hasDelete,\n onDelete,\n children,\n ...props\n}) => {\n warnUnstyledColor('Notification', color);\n\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n ...props,\n });\n\n const bulmaClasses = usePrefixedClassNames('notification', {\n [`is-${color}`]: color && validColors.includes(color),\n 'is-light': isLight,\n });\n\n const deleteClasses = usePrefixedClassNames('delete');\n\n const notificationClasses = classNames(\n bulmaClasses,\n bulmaHelperClasses,\n className\n );\n\n return (\n <div className={notificationClasses} {...rest}>\n {hasDelete && (\n <button\n className={deleteClasses}\n onClick={onDelete}\n aria-label=\"Close notification\"\n />\n )}\n {children}\n </div>\n );\n};\n\n// Programmatic Notification API\n\n/** Screen positions where programmatic notifications can be displayed. */\nexport type NotificationPosition =\n 'top-left' | 'top' | 'top-right' | 'bottom-left' | 'bottom' | 'bottom-right';\n\n/**\n * Options for showing a programmatic notification.\n */\nexport interface NotificationOptions {\n /** The message to display. */\n message: string | React.ReactNode;\n /**\n * Bulma color modifier for the notification (renders `is-<color>`).\n *\n * Only `primary`, `link`, `info`, `success`, `warning`, `danger`, `black`,\n * `white`, `light`, and `dark` have shipped CSS for `.notification`. Every\n * other value the union accepts emits a class no CSS rule matches, so the\n * notification renders unstyled; those log a console warning in development\n * and will be removed from this union in the next major version.\n */\n color?: (typeof validColors)[number];\n /** Use the light color variant. */\n isLight?: boolean;\n /** Duration in ms before auto-close. Default 3000. */\n duration?: number;\n /** Position on the screen. Default 'top-right'. */\n position?: NotificationPosition;\n /** When true, notifications enter a FIFO queue and display one at a time. Default false. */\n queue?: boolean;\n /** Show a delete (close) button. Default true. */\n hasDelete?: boolean;\n /** Stay open until dismissed. */\n indefinite?: boolean;\n /** Pause auto-close timer on hover. Default true. */\n pauseOnHover?: boolean;\n}\n\n/**\n * Internal representation of a notification instance.\n */\ninterface NotificationInstance {\n /** Unique identifier for this notification. */\n id: string;\n /** Configuration options for the notification. */\n options: NotificationOptions;\n}\n\nlet notificationId = 0;\nconst notificationListeners: Set<(items: NotificationInstance[]) => void> =\n new Set();\nlet notifications: NotificationInstance[] = [];\n\n// Queue support\nlet queuedNotifications: NotificationInstance[] = [];\nlet currentQueuedNotification: NotificationInstance | null = null;\n\nconst notifyNotificationListeners = () => {\n const allVisible = [...notifications];\n if (currentQueuedNotification) {\n allVisible.push(currentQueuedNotification);\n }\n notificationListeners.forEach(listener => listener([...allVisible]));\n};\n\nconst processQueuedNotification = () => {\n if (currentQueuedNotification || queuedNotifications.length === 0) return;\n currentQueuedNotification = queuedNotifications.shift()!;\n notifyNotificationListeners();\n};\n\n/**\n * Programmatic notification API for showing, closing, and managing notifications.\n *\n * @example\n * notification.success('File saved successfully');\n * notification.danger('Something went wrong', { duration: 5000 });\n */\nexport const notification = {\n /**\n * Show a notification with the given options.\n * @param {NotificationOptions} options - Notification configuration.\n * @returns {string} The unique ID of the created notification.\n */\n show: (options: NotificationOptions): string => {\n const id = `notification-${++notificationId}`;\n const instance = { id, options };\n\n if (options.queue) {\n queuedNotifications.push(instance);\n processQueuedNotification();\n } else {\n notifications.push(instance);\n notifyNotificationListeners();\n }\n\n return id;\n },\n\n /**\n * Show a success notification.\n * @param {string|React.ReactNode} message - The message to display.\n * @param {Partial<NotificationOptions>} [options] - Additional options.\n * @returns {string} The notification ID.\n */\n success: (\n message: string | React.ReactNode,\n options?: Partial<NotificationOptions>\n ): string => {\n return notification.show({ message, color: 'success', ...options });\n },\n\n /**\n * Show a danger notification.\n * @param {string|React.ReactNode} message - The message to display.\n * @param {Partial<NotificationOptions>} [options] - Additional options.\n * @returns {string} The notification ID.\n */\n danger: (\n message: string | React.ReactNode,\n options?: Partial<NotificationOptions>\n ): string => {\n return notification.show({ message, color: 'danger', ...options });\n },\n\n /**\n * Show a warning notification.\n * @param {string|React.ReactNode} message - The message to display.\n * @param {Partial<NotificationOptions>} [options] - Additional options.\n * @returns {string} The notification ID.\n */\n warning: (\n message: string | React.ReactNode,\n options?: Partial<NotificationOptions>\n ): string => {\n return notification.show({ message, color: 'warning', ...options });\n },\n\n /**\n * Show an info notification.\n * @param {string|React.ReactNode} message - The message to display.\n * @param {Partial<NotificationOptions>} [options] - Additional options.\n * @returns {string} The notification ID.\n */\n info: (\n message: string | React.ReactNode,\n options?: Partial<NotificationOptions>\n ): string => {\n return notification.show({ message, color: 'info', ...options });\n },\n\n /**\n * Close a specific notification by ID.\n * @param {string} id - The notification ID to close.\n */\n close: (id: string): void => {\n if (currentQueuedNotification && currentQueuedNotification.id === id) {\n currentQueuedNotification = null;\n processQueuedNotification();\n } else {\n queuedNotifications = queuedNotifications.filter(n => n.id !== id);\n notifications = notifications.filter(n => n.id !== id);\n }\n notifyNotificationListeners();\n },\n\n /** Close all notifications and clear the queue. */\n closeAll: (): void => {\n notifications = [];\n queuedNotifications = [];\n currentQueuedNotification = null;\n notifyNotificationListeners();\n },\n\n /**\n * Subscribe to notification state changes.\n * @param {(items: NotificationInstance[]) => void} listener - Callback invoked on changes.\n * @returns {() => void} Unsubscribe function.\n */\n subscribe: (\n listener: (items: NotificationInstance[]) => void\n ): (() => void) => {\n notificationListeners.add(listener);\n return () => notificationListeners.delete(listener);\n },\n};\n\n/**\n * Single auto-dismissing notification item used by NotificationContainer.\n *\n * @function\n * @param {{ instance: NotificationInstance; onClose: (id: string) => void }} props - Component props.\n * @returns {JSX.Element} The rendered notification item.\n */\nconst NotificationItem: React.FC<{\n instance: NotificationInstance;\n onClose: (id: string) => void;\n}> = ({ instance, onClose }) => {\n const {\n message,\n color,\n isLight,\n duration = 3000,\n hasDelete = true,\n indefinite = false,\n pauseOnHover = true,\n } = instance.options;\n\n const [isPaused, setIsPaused] = useState(false);\n\n const handleClose = useCallback(() => {\n onClose(instance.id);\n }, [onClose, instance.id]);\n\n // Auto-close timer\n useEffect(() => {\n if (indefinite || duration === 0 || isPaused) return undefined;\n\n const timer = setTimeout(handleClose, duration);\n return () => clearTimeout(timer);\n }, [duration, indefinite, isPaused, handleClose]);\n\n const handleMouseEnter = useCallback(() => {\n if (pauseOnHover) setIsPaused(true);\n }, [pauseOnHover]);\n\n const handleMouseLeave = useCallback(() => {\n if (pauseOnHover) setIsPaused(false);\n }, [pauseOnHover]);\n\n return (\n <Notification\n color={color}\n isLight={isLight}\n hasDelete={hasDelete}\n onDelete={handleClose}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n style={{ pointerEvents: 'auto' }}\n >\n {message}\n </Notification>\n );\n};\n\n/**\n * Container component for rendering programmatic notifications.\n * Place once at your app root to enable the notification API.\n *\n * @function\n * @param {{ position?: NotificationPosition }} props - Container props.\n * @returns {JSX.Element | null} The rendered notification container, or null if empty.\n */\nexport const NotificationContainer: React.FC<{\n position?: NotificationPosition;\n}> = ({ position = 'top-right' }) => {\n const [items, setItems] = useState<NotificationInstance[]>([]);\n\n useEffect(() => {\n return notification.subscribe(setItems);\n }, []);\n\n if (typeof document === 'undefined' || items.length === 0) {\n return null;\n }\n\n const isBottom = position.startsWith('bottom');\n const isCenter = position === 'top' || position === 'bottom';\n const isRight = position.endsWith('right');\n\n const containerStyle: React.CSSProperties = {\n position: 'fixed',\n zIndex: 100,\n display: 'flex',\n flexDirection: isBottom ? 'column-reverse' : 'column',\n gap: '0.75rem',\n padding: '1rem',\n pointerEvents: 'none',\n maxWidth: '100%',\n ...(isBottom ? { bottom: 0 } : { top: 0 }),\n ...(isCenter\n ? { left: '50%', transform: 'translateX(-50%)', alignItems: 'center' }\n : isRight\n ? { right: 0, alignItems: 'flex-end' }\n : { left: 0, alignItems: 'flex-start' }),\n };\n\n return createPortal(\n <div style={containerStyle}>\n {items.map(item => (\n <NotificationItem\n key={item.id}\n instance={item}\n onClose={notification.close}\n />\n ))}\n </div>,\n document.body\n );\n};\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport { ListItem } from './ListItem';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * Props for the OrderedList component.\n * @extraProp {'1' | 'a' | 'A' | 'i' | 'I'} [type='1'] - The numbering type for the list.\n * @extraProp {number} [start] - The starting number for the list.\n * @extraProp {boolean} [reversed] - Whether to reverse the list numbering.\n */\nexport interface OrderedListProps\n extends\n React.OlHTMLAttributes<HTMLOListElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** List items to render inside the list. */\n children?: React.ReactNode;\n}\n\n/**\n * The `OrderedList` component renders a styled ordered list (`<ol>`) element with Bulma helper class integration.\n *\n * @function\n * @param {OrderedListProps} props - Props for the OrderedList component.\n * @returns {JSX.Element} The rendered ol element.\n */\nconst OrderedListComponent: React.FC<OrderedListProps> = ({\n className,\n textColor,\n bgColor,\n children,\n ...props\n}) => {\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n } as BulmaClassesProps & typeof props);\n\n const bulmaClasses = usePrefixedClassNames();\n const listClasses = classNames(bulmaClasses, bulmaHelperClasses, className);\n\n return (\n <ol className={listClasses || undefined} {...rest}>\n {children}\n </ol>\n );\n};\n\nexport const OrderedList = withSubComponents(\n OrderedListComponent,\n { Item: ListItem },\n 'OrderedList'\n);\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * Props for the Paragraph component.\n */\nexport interface ParagraphProps\n extends\n React.HTMLAttributes<HTMLParagraphElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Content to render inside the paragraph. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Paragraph` component renders a styled `<p>` element with Bulma helper class integration.\n *\n * @function\n * @param {ParagraphProps} props - Props for the Paragraph component.\n * @returns {JSX.Element} The rendered paragraph element.\n */\nexport const Paragraph: React.FC<ParagraphProps> = ({\n className,\n textColor,\n bgColor,\n children,\n ...props\n}) => {\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n } as BulmaClassesProps & typeof props);\n\n const bulmaClasses = usePrefixedClassNames();\n const paragraphClasses = classNames(\n bulmaClasses,\n bulmaHelperClasses,\n className\n );\n\n return (\n <p className={paragraphClasses || undefined} {...rest}>\n {children}\n </p>\n );\n};\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * Props for the Pre component.\n */\nexport interface PreProps\n extends\n React.HTMLAttributes<HTMLPreElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Preformatted content to render. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Pre` component renders a styled `<pre>` element with Bulma helper class integration.\n *\n * @function\n * @param {PreProps} props - Props for the Pre component.\n * @returns {JSX.Element} The rendered pre element.\n */\nexport const Pre: React.FC<PreProps> = ({\n className,\n textColor,\n bgColor,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n } as BulmaClassesProps & typeof props);\n\n const bulmaClasses = usePrefixedClassNames();\n const preClasses = classNames(bulmaClasses, bulmaHelperClasses, className);\n\n return (\n <pre className={preClasses || undefined} {...rest}>\n {children}\n </pre>\n );\n};\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\nimport { warnUnstyledColor } from '../helpers/colorDeprecations';\n\n/**\n * Props for the Progress component.\n */\nexport interface ProgressProps\n extends\n React.ProgressHTMLAttributes<HTMLProgressElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /**\n * Bulma color modifier for the progress bar (renders `is-<color>`).\n *\n * Only `primary`, `link`, `info`, `success`, `warning`, `danger`, `black`,\n * `white`, `light`, and `dark` have shipped CSS for `.progress`. Every\n * other value the union accepts emits a class no CSS rule matches, so the\n * bar renders unstyled; those log a console warning in development and will\n * be removed from this union in the next major version.\n */\n color?: (typeof validColors)[number];\n /** Size modifier for the progress bar. */\n size?: 'small' | 'medium' | 'large';\n /** Current value of the progress bar. */\n value?: number;\n /** Maximum value of the progress bar. */\n max?: number;\n /** Optional custom content inside the progress bar. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Progress` component displays a Bulma-styled progress bar.\n *\n * @function\n * @param {ProgressProps} props - Props for the Progress component.\n * @returns {JSX.Element} The rendered progress bar element.\n * @see {@link https://bulma.io/documentation/elements/progress/ | Bulma Progress documentation}\n */\nexport const Progress: React.FC<ProgressProps> = ({\n className,\n color,\n size,\n value,\n max,\n children,\n ...props\n}) => {\n warnUnstyledColor('Progress', color);\n\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n ...props,\n });\n\n const bulmaClasses = usePrefixedClassNames('progress', {\n [`is-${color}`]: color && validColors.includes(color),\n [`is-${size}`]: size,\n });\n\n const progressClasses = classNames(\n bulmaClasses,\n bulmaHelperClasses,\n className\n );\n\n return (\n <progress className={progressClasses} value={value} max={max} {...rest}>\n {children}\n </progress>\n );\n};\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\n\n/**\n * Props for the Skeleton component.\n */\nexport interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Additional CSS classes to apply */\n className?: string;\n /** Skeleton variant: block (single block) or lines. */\n variant?: 'block' | 'lines';\n /** Number of lines (only for `lines` variant). */\n lines?: number;\n /** Content inside the block (only for block variant). */\n children?: React.ReactNode;\n}\n\n/**\n * The `Skeleton` component provides a Bulma-styled skeleton loader for React applications, useful for indicating that content is loading.\n *\n * @function\n * @param {SkeletonProps} props - Props for the Skeleton component.\n * @returns {JSX.Element} The rendered skeleton element.\n *\n * @example\n * // Block skeleton\n * <Skeleton />\n *\n * @example\n * // Multi-line skeleton\n * <Skeleton variant=\"lines\" lines={5} />\n */\nexport const Skeleton: React.FC<SkeletonProps> = ({\n className,\n variant = 'block',\n lines = 3,\n children,\n ...props\n}) => {\n const linesClass = usePrefixedClassNames('skeleton-lines');\n const blockClass = usePrefixedClassNames('skeleton-block');\n\n if (variant === 'lines') {\n return (\n <div className={classNames(linesClass, className)} {...props}>\n {Array.from({ length: lines }).map((_, i) => (\n <div key={i} />\n ))}\n </div>\n );\n }\n\n return (\n <div className={classNames(blockClass, className)} {...props}>\n {children}\n </div>\n );\n};\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * Props for the Span component.\n */\nexport interface SpanProps\n extends\n React.HTMLAttributes<HTMLSpanElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Content to render inside the span. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Span` component renders a styled inline `<span>` element with Bulma helper class integration.\n *\n * @function\n * @param {SpanProps} props - Props for the Span component.\n * @returns {JSX.Element} The rendered span element.\n */\nexport const Span: React.FC<SpanProps> = ({\n className,\n textColor,\n bgColor,\n children,\n ...props\n}) => {\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n } as BulmaClassesProps & typeof props);\n\n const bulmaClasses = usePrefixedClassNames();\n const spanClasses = classNames(bulmaClasses, bulmaHelperClasses, className);\n\n return (\n <span className={spanClasses || undefined} {...rest}>\n {children}\n </span>\n );\n};\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * Props for the Strong component.\n */\nexport interface StrongProps\n extends\n React.HTMLAttributes<HTMLElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Content to render inside the strong element. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Strong` component renders a styled `<strong>` element with Bulma helper class integration.\n *\n * @function\n * @param {StrongProps} props - Props for the Strong component.\n * @returns {JSX.Element} The rendered strong element.\n */\nexport const Strong: React.FC<StrongProps> = ({\n className,\n textColor,\n bgColor,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n } as BulmaClassesProps & typeof props);\n\n const bulmaClasses = usePrefixedClassNames();\n const strongClasses = classNames(bulmaClasses, bulmaHelperClasses, className);\n\n return (\n <strong className={strongClasses || undefined} {...rest}>\n {children}\n </strong>\n );\n};\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\nconst validSubTitleSizes = ['1', '2', '3', '4', '5', '6'] as const;\n/**\n * Valid size values for the SubTitle component (Bulma subtitle sizes): `'1'`–`'6'` as a string or number (`3` and `'3'` are equivalent).\n */\nexport type SubTitleSize =\n '1' | '2' | '3' | '4' | '5' | '6' | 1 | 2 | 3 | 4 | 5 | 6;\n\nconst validSubTitleElements = [\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'p',\n] as const;\n/**\n * Valid HTML elements for the SubTitle component.\n */\nexport type SubTitleElement = (typeof validSubTitleElements)[number];\n\n/**\n * Props for the SubTitle component.\n * @extraProp {boolean} [skeleton] - Applies the `is-skeleton` class to the entire component.\n */\nexport interface SubTitleProps\n extends\n Omit<\n React.HTMLAttributes<HTMLHeadingElement | HTMLParagraphElement>,\n 'color'\n >,\n Omit<BulmaClassesProps, 'backgroundColor' | 'color'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Size of the subtitle (Bulma sizes `1`-`6`, as a string or number). */\n size?: SubTitleSize;\n /** HTML element to render as (h1-h6 or p). */\n as?: SubTitleElement;\n /** Applies the `has-skeleton` class to part of the content. */\n hasSkeleton?: boolean;\n /** Subtitle content. */\n children?: React.ReactNode;\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n}\n\n/**\n * The `SubTitle` component renders a Bulma-styled subtitle (secondary heading), supporting sizes `1-6` and rendering as any heading or paragraph element (`h1-h6`, `p`).\n *\n * @function\n * @param {SubTitleProps} props - Props for the SubTitle component.\n * @returns {JSX.Element} The rendered subtitle element.\n * @see {@link https://bulma.io/documentation/elements/title/#subtitle | Bulma Subtitle documentation}\n */\nexport const SubTitle: React.FC<SubTitleProps> = ({\n className,\n size,\n as = 'h1',\n hasSkeleton,\n textColor,\n bgColor,\n children,\n ...props\n}) => {\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n });\n\n // Validate 'as' prop at runtime\n const element = validSubTitleElements.includes(as) ? as : 'h1';\n\n // Validate 'size' prop at runtime (numeric sizes normalize to strings)\n const normalized = size == null ? undefined : String(size);\n const validSize =\n normalized && (validSubTitleSizes as readonly string[]).includes(normalized)\n ? (normalized as (typeof validSubTitleSizes)[number])\n : undefined;\n\n const bulmaClasses = usePrefixedClassNames('subtitle', {\n [`is-${validSize}`]: validSize,\n 'has-skeleton': hasSkeleton,\n });\n\n const subTitleClasses = classNames(\n bulmaClasses,\n bulmaHelperClasses,\n className\n );\n\n // Determine the tag based on 'element' and 'validSize'\n const Tag: React.ElementType =\n element === 'p' ? 'p' : validSize ? `h${validSize}` : element;\n\n return (\n <Tag className={subTitleClasses} {...rest}>\n {children}\n </Tag>\n );\n};\n\nexport default SubTitle;\n","/**\n * @group Table\n */\nimport React from 'react';\nimport classNames from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\n\n/**\n * Props for the Thead component.\n */\nexport interface TheadProps\n extends\n Omit<React.HTMLAttributes<HTMLTableSectionElement>, 'color'>,\n Omit<BulmaClassesProps, 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Table header content (rows). */\n children?: React.ReactNode;\n}\n\n/**\n * Thead component for rendering a styled Bulma table header.\n *\n * Supports Bulma helper classes for additional styling.\n *\n * @function\n * @param {TheadProps} props - Props for the Thead component.\n * @returns {JSX.Element} The rendered table header element.\n * @see {@link https://bulma.io/documentation/elements/table/#table-head | Bulma Table documentation}\n */\nexport const Thead: React.FC<TheadProps> = ({\n className,\n children,\n ...props\n}) => {\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });\n\n const theadClasses = classNames(className, bulmaHelperClasses);\n\n return (\n <thead className={theadClasses} {...rest}>\n {children}\n </thead>\n );\n};\n","/**\n * @group Table\n */\nimport React from 'react';\nimport classNames from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\n\n/**\n * Props for the Tbody component.\n */\nexport interface TbodyProps\n extends\n Omit<React.HTMLAttributes<HTMLTableSectionElement>, 'color'>,\n Omit<BulmaClassesProps, 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Table body content (rows). */\n children?: React.ReactNode;\n}\n\n/**\n * Tbody component for rendering a styled Bulma table body.\n *\n * Supports Bulma helper classes for additional styling.\n *\n * @function\n * @param {TbodyProps} props - Props for the Tbody component.\n * @returns {JSX.Element} The rendered table body element.\n * @see {@link https://bulma.io/documentation/elements/table/#table-body | Bulma Table documentation}\n */\nexport const Tbody: React.FC<TbodyProps> = ({\n className,\n children,\n ...props\n}) => {\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });\n\n const tbodyClasses = classNames(className, bulmaHelperClasses);\n\n return (\n <tbody className={tbodyClasses} {...rest}>\n {children}\n </tbody>\n );\n};\n","/**\n * @group Table\n */\nimport React from 'react';\nimport classNames from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\n\n/**\n * Props for the Tfoot component.\n */\nexport interface TfootProps\n extends\n Omit<React.HTMLAttributes<HTMLTableSectionElement>, 'color'>,\n Omit<BulmaClassesProps, 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Table footer content (rows). */\n children?: React.ReactNode;\n}\n\n/**\n * Tfoot component for rendering a styled Bulma table footer.\n *\n * Supports Bulma helper classes for additional styling.\n *\n * @function\n * @param {TfootProps} props - Props for the Tfoot component.\n * @returns {JSX.Element} The rendered table footer element.\n * @see {@link https://bulma.io/documentation/elements/table/#table-footer | Bulma Table documentation}\n */\nexport const Tfoot: React.FC<TfootProps> = ({\n className,\n children,\n ...props\n}) => {\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });\n\n const tfootClasses = classNames(className, bulmaHelperClasses);\n\n return (\n <tfoot className={tfootClasses} {...rest}>\n {children}\n </tfoot>\n );\n};\n","/**\n * @group Table\n */\nimport React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\n\n/** Valid Bulma color values for table cells. */\nexport const validTableColors = [\n 'primary',\n 'link',\n 'info',\n 'success',\n 'warning',\n 'danger',\n 'black',\n 'dark',\n 'light',\n 'white',\n] as const;\n\n/**\n * Valid color values for the Td component (Bulma table cell colors).\n */\nexport type TableColor = (typeof validTableColors)[number];\n\n/**\n * Props for the Td component.\n */\nexport interface TdProps\n extends\n Omit<React.TdHTMLAttributes<HTMLTableCellElement>, 'color'>,\n Omit<BulmaClassesProps, 'backgroundColor' | 'color'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Bulma color modifier for the table cell. */\n color?: TableColor;\n /** Table cell content. */\n children?: React.ReactNode;\n}\n\n/**\n * Td component for rendering a styled Bulma table cell.\n *\n * Supports Bulma color modifiers and helper classes for additional styling.\n *\n * @function\n * @param {TdProps} props - Props for the Td component.\n * @returns {JSX.Element} The rendered table cell element.\n * @see {@link https://bulma.io/documentation/elements/table/#table-body | Bulma Table documentation}\n */\nexport const Td: React.FC<TdProps> = ({\n className,\n color,\n children,\n ...props\n}) => {\n const colorClass = usePrefixedClassNames('', {\n [`is-${color}`]: color && validTableColors.includes(color),\n });\n\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });\n\n const tdClasses = classNames(colorClass, className, bulmaHelperClasses);\n\n return (\n <td className={tdClasses} {...rest}>\n {children}\n </td>\n );\n};\n","/**\n * @group Table\n */\nimport React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { TableColor, validTableColors } from './Td'; // Import TableColor from Td\n\n/**\n * Props for the Tr component.\n */\nexport interface TrProps\n extends\n Omit<React.HTMLAttributes<HTMLTableRowElement>, 'color'>,\n Omit<BulmaClassesProps, 'backgroundColor' | 'color'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Whether the row is selected (adds Bulma's is-selected class). */\n isSelected?: boolean;\n /** Bulma color modifier for the table row. */\n color?: TableColor;\n /** Table row content (cells). */\n children?: React.ReactNode;\n}\n\n/**\n * Tr component for rendering a styled Bulma table row.\n *\n * Supports the is-selected modifier and color modifiers.\n *\n * @function\n * @param {TrProps} props - Props for the Tr component.\n * @returns {JSX.Element} The rendered table row element.\n * @see {@link https://bulma.io/documentation/elements/table/#table-row | Bulma Table documentation}\n */\nexport const Tr: React.FC<TrProps> = ({\n className,\n isSelected,\n color,\n children,\n ...props\n}) => {\n const bulmaClasses = usePrefixedClassNames('', {\n 'is-selected': isSelected,\n [`is-${color}`]: color && validTableColors.includes(color),\n });\n\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });\n\n const trClasses = classNames(bulmaClasses, className, bulmaHelperClasses);\n\n return (\n <tr className={trClasses} {...rest}>\n {children}\n </tr>\n );\n};\n","/**\n * @group Table\n */\nimport React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { TableColor, validTableColors } from './Td';\n\nconst validAlignments = ['left', 'right', 'centered'] as const;\n/**\n * Valid alignment values for the Th component.\n */\ntype TableAlignment = (typeof validAlignments)[number];\n\n/**\n * Props for the Th component.\n */\nexport interface ThProps\n extends\n Omit<React.ThHTMLAttributes<HTMLTableCellElement>, 'color'>,\n Omit<BulmaClassesProps, 'backgroundColor' | 'color'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text alignment for the header cell ('left', 'right', 'centered'). */\n isAligned?: TableAlignment;\n /** Width of the header cell (e.g., '100px' or 100). */\n width?: string | number;\n /** Bulma color modifier for the header cell. */\n color?: TableColor;\n /** Table header cell content. */\n children?: React.ReactNode;\n}\n\n/**\n * Th component for rendering a styled Bulma table header cell.\n *\n * Supports alignment, width, and color modifiers.\n *\n * @function\n * @param {ThProps} props - Props for the Th component.\n * @returns {JSX.Element} The rendered table header cell element.\n * @see {@link https://bulma.io/documentation/elements/table/#table-head | Bulma Table documentation}\n */\nexport const Th: React.FC<ThProps> = ({\n className,\n isAligned,\n width,\n color,\n children,\n ...props\n}) => {\n const bulmaClasses = usePrefixedClassNames('', {\n [`has-text-${isAligned}`]: isAligned && validAlignments.includes(isAligned),\n [`is-${color}`]: color && validTableColors.includes(color),\n });\n\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });\n\n const thClasses = classNames(bulmaClasses, className, bulmaHelperClasses);\n\n return (\n <th\n className={thClasses}\n style={\n width\n ? { width: typeof width === 'number' ? `${width}px` : width }\n : undefined\n }\n {...rest}\n >\n {children}\n </th>\n );\n};\n","/**\n * @group Table\n */\nimport React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { Thead } from './Thead';\nimport { Tbody } from './Tbody';\nimport { Tfoot } from './Tfoot';\nimport { Tr } from './Tr';\nimport { Th } from './Th';\nimport { Td } from './Td';\n\n/**\n * Props for the Table component.\n */\nexport interface TableProps\n extends\n Omit<React.TableHTMLAttributes<HTMLTableElement>, 'color'>,\n Omit<BulmaClassesProps, 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Adds borders to all cells. */\n isBordered?: boolean;\n /** Adds zebra-striping to rows. */\n isStriped?: boolean;\n /** Makes the table more compact by cutting cell padding in half. */\n isNarrow?: boolean;\n /** Adds a hover effect on rows. */\n isHoverable?: boolean;\n /** Makes the table span the full width of its parent. */\n isFullwidth?: boolean;\n /** Makes the table span the full width of its parent. @deprecated Use `isFullwidth` instead — `isFullwidth` wins if both are set. */\n isFullWidth?: boolean;\n /** Makes the table horizontally scrollable on small screens. */\n isResponsive?: boolean;\n /** Table content (should use subcomponents). */\n children?: React.ReactNode;\n}\n\n/**\n * The `Table` component and its subcomponents provide a highly composable, Bulma-styled table system for React.\n *\n * @function\n * @param {TableProps} props - Props for the Table component.\n * @returns {JSX.Element} The rendered table element.\n * @see {@link https://bulma.io/documentation/elements/table/ | Bulma Table documentation}\n */\nconst TableComponent: React.FC<TableProps> = ({\n className,\n isBordered,\n isStriped,\n isNarrow,\n isHoverable,\n isFullwidth,\n isFullWidth,\n isResponsive,\n children,\n ...props\n}) => {\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });\n\n const bulmaClasses = usePrefixedClassNames('table', {\n 'is-bordered': isBordered,\n 'is-striped': isStriped,\n 'is-narrow': isNarrow,\n 'is-hoverable': isHoverable,\n 'is-fullwidth': isFullwidth ?? isFullWidth,\n });\n\n const containerClass = usePrefixedClassNames('table-container');\n const tableClasses = classNames(bulmaClasses, bulmaHelperClasses, className);\n\n const tableElement = (\n <table className={tableClasses} {...rest}>\n {children}\n </table>\n );\n\n if (isResponsive) {\n return <div className={containerClass}>{tableElement}</div>;\n }\n\n return tableElement;\n};\n\nexport const Table = withSubComponents(\n TableComponent,\n {\n Thead,\n Tbody,\n Tfoot,\n Tr,\n Th,\n Td,\n },\n 'Table'\n);\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\n\nconst validTagColors = [\n 'primary',\n 'link',\n 'info',\n 'success',\n 'warning',\n 'danger',\n 'black',\n 'dark',\n 'light',\n 'white',\n] as const;\n\n/**\n * Valid color values for the Tag component (Bulma tag colors).\n */\nexport type TagColor = (typeof validTagColors)[number];\n\nconst validTagSizes = ['normal', 'medium', 'large'] as const;\n/**\n * Valid size values for the Tag component (Bulma tag sizes).\n */\nexport type TagSize = (typeof validTagSizes)[number];\n\n/**\n * Props for the Tag component.\n */\nexport interface TagProps\n extends\n Omit<React.HTMLAttributes<HTMLSpanElement>, 'color'>,\n Omit<BulmaClassesProps, 'color'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Bulma color modifier for the tag. */\n color?: TagColor;\n /** Tag size. */\n size?: TagSize;\n /** Use the light color variant. */\n isLight?: boolean;\n /** Renders a rounded tag. */\n isRounded?: boolean;\n /** Renders a delete-style tag (delete button). */\n isDelete?: boolean;\n /** Adds hover effect to the tag. */\n isHoverable?: boolean;\n /** Callback for delete tag/button. */\n onDelete?: () => void;\n /** Tag content. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Tag` component renders a Bulma-styled label or badge.\n *\n * @function\n * @param {TagProps} props - Props for the Tag component.\n * @returns {JSX.Element} The rendered tag element.\n * @see {@link https://bulma.io/documentation/elements/tag/ | Bulma Tag documentation}\n */\nexport const Tag: React.FC<TagProps> = ({\n className,\n color,\n size,\n isLight,\n isRounded,\n isDelete,\n isHoverable,\n onDelete,\n children,\n ...props\n}) => {\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });\n\n const bulmaClasses = usePrefixedClassNames('tag', {\n [`is-${color}`]: color && validTagColors.includes(color),\n [`is-${size}`]: size && size !== 'normal' && validTagSizes.includes(size),\n 'is-light': isLight,\n 'is-rounded': isRounded,\n 'is-delete': isDelete,\n 'is-hoverable': isHoverable,\n });\n\n const tagClasses = classNames(bulmaClasses, bulmaHelperClasses, className);\n\n if (isDelete) {\n return (\n <button\n className={tagClasses}\n onClick={onDelete}\n aria-label=\"Delete tag\"\n {...rest}\n />\n );\n }\n\n return (\n <span className={tagClasses} {...rest}>\n {children}\n </span>\n );\n};\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { Tag } from './Tag';\n\nconst validTagsSizes = ['medium', 'large'] as const;\n/**\n * Valid size values for the Tags component (Bulma tag group sizes).\n */\nexport type TagsSize = (typeof validTagsSizes)[number];\n\n/**\n * Props for the Tags component.\n */\nexport interface TagsProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, 'color'>,\n Omit<BulmaClassesProps, 'backgroundColor' | 'color' | 'size'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Group tags together as add-ons (no spacing). */\n hasAddons?: boolean;\n /**\n * No-op retained for backwards compatibility.\n *\n * @deprecated Bulma's `.tags` wraps by default (no shipped `are-multiline`\n * CSS exists for it) — this prop has never had a visual effect and will be\n * removed in the next major version.\n */\n isMultiline?: boolean;\n /** Size of every tag in the group. */\n size?: TagsSize;\n /** Tag elements to render inside the container. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Tags` component groups multiple `Tag` components together in a Bulma-styled container that wraps onto multiple lines by default.\n *\n * @function\n * @param {TagsProps} props - Props for the Tags component.\n * @returns {JSX.Element} The rendered tags container.\n * @see {@link https://bulma.io/documentation/elements/tag/#list-of-tags | Bulma Tags documentation}\n */\nconst TagsComponent: React.FC<TagsProps> = ({\n className,\n hasAddons,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars -- accepted for backwards compatibility, deprecated no-op (no `are-multiline` CSS ships)\n isMultiline,\n size,\n children,\n ...props\n}) => {\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });\n\n const bulmaClasses = usePrefixedClassNames('tags', {\n 'has-addons': hasAddons,\n [`are-${size}`]: size && validTagsSizes.includes(size),\n });\n\n const tagsClasses = classNames(bulmaClasses, bulmaHelperClasses, className);\n\n return (\n <div className={tagsClasses} {...rest}>\n {children}\n </div>\n );\n};\n\nexport const Tags = withSubComponents(TagsComponent, { Tag }, 'Tags');\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\nconst validTitleSizes = ['1', '2', '3', '4', '5', '6'] as const;\n/**\n * Valid size values for the Title component (Bulma title sizes): `'1'`–`'6'` as a string or number (`3` and `'3'` are equivalent).\n */\nexport type TitleSize =\n '1' | '2' | '3' | '4' | '5' | '6' | 1 | 2 | 3 | 4 | 5 | 6;\n\nconst validTitleElements = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'] as const;\n/**\n * Valid HTML elements for the Title component.\n */\nexport type TitleElement = (typeof validTitleElements)[number];\n\n/**\n * Props for the Title component.\n * @extraProp {boolean} [skeleton] - Applies the `is-skeleton` class to the entire component.\n */\nexport interface TitleProps\n extends\n Omit<\n React.HTMLAttributes<HTMLHeadingElement | HTMLParagraphElement>,\n 'color'\n >,\n Omit<BulmaClassesProps, 'backgroundColor' | 'color'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Size of the title (Bulma sizes `1`-`6`, as a string or number). */\n size?: TitleSize;\n /** Adds margin below the title. */\n isSpaced?: boolean;\n /** HTML element to render as (h1-h6 or p). */\n as?: TitleElement;\n /** Applies the `has-skeleton` class to part of the content. */\n hasSkeleton?: boolean;\n /** Title content. */\n children?: React.ReactNode;\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n}\n\n/**\n * The `Title` component renders a Bulma-styled title (heading), supporting sizes `1`-`6`, spacing, and rendering as any heading or paragraph element (`h1`-`h6`, `p`).\n *\n * @function\n * @param {TitleProps} props - Props for the Title component.\n * @returns {JSX.Element} The rendered title element.\n * @see {@link https://bulma.io/documentation/elements/title/ | Bulma Title documentation}\n */\nexport const Title: React.FC<TitleProps> = ({\n className,\n size,\n isSpaced,\n as = 'h1',\n hasSkeleton,\n textColor,\n bgColor,\n children,\n ...props\n}) => {\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n });\n\n // Validate 'as' prop at runtime\n const element = validTitleElements.includes(as) ? as : 'h1';\n\n // Validate 'size' prop at runtime (numeric sizes normalize to strings)\n const normalized = size == null ? undefined : String(size);\n const validSize =\n normalized && (validTitleSizes as readonly string[]).includes(normalized)\n ? (normalized as (typeof validTitleSizes)[number])\n : undefined;\n\n const bulmaClasses = usePrefixedClassNames('title', {\n [`is-${validSize}`]: validSize,\n 'is-spaced': isSpaced,\n 'has-skeleton': hasSkeleton,\n });\n\n const titleClasses = classNames(bulmaClasses, bulmaHelperClasses, className);\n\n // Determine the tag based on 'element' and 'validSize'\n const Tag: React.ElementType =\n element === 'p' ? 'p' : validSize ? `h${validSize}` : element;\n\n return (\n <Tag className={titleClasses} {...rest}>\n {children}\n </Tag>\n );\n};\n\nexport default Title;\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport { ListItem } from './ListItem';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * Props for the UnorderedList component.\n */\nexport interface UnorderedListProps\n extends\n React.HTMLAttributes<HTMLUListElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** List items to render inside the list. */\n children?: React.ReactNode;\n}\n\n/**\n * The `UnorderedList` component renders a styled unordered list (`<ul>`) element with Bulma helper class integration.\n *\n * @function\n * @param {UnorderedListProps} props - Props for the UnorderedList component.\n * @returns {JSX.Element} The rendered ul element.\n */\nconst UnorderedListComponent: React.FC<UnorderedListProps> = ({\n className,\n textColor,\n bgColor,\n children,\n ...props\n}) => {\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n } as BulmaClassesProps & typeof props);\n\n const bulmaClasses = usePrefixedClassNames();\n const listClasses = classNames(bulmaClasses, bulmaHelperClasses, className);\n\n return (\n <ul className={listClasses || undefined} {...rest}>\n {children}\n </ul>\n );\n};\n\nexport const UnorderedList = withSubComponents(\n UnorderedListComponent,\n { Item: ListItem },\n 'UnorderedList'\n);\n","import { createContext, useContext } from 'react';\n\nconst FieldContext = createContext(false);\nconst ControlContext = createContext(false);\n\n/**\n * Hook to detect if the component is inside a Field wrapper.\n * Form components use this to skip rendering their own Field.\n */\nexport const useInsideField = () => useContext(FieldContext);\n\n/**\n * Hook to detect if the component is inside a Control wrapper.\n * Form components use this to skip rendering their own Control.\n */\nexport const useInsideControl = () => useContext(ControlContext);\n\n/** Provider for Field context — used internally by Field component. */\nexport const FieldProvider = FieldContext.Provider;\n\n/** Provider for Control context — used internally by Control component. */\nexport const ControlProvider = ControlContext.Provider;\n\nconst FieldLabelIdContext = createContext<string | undefined>(undefined);\n\n/**\n * The id a labeled Field wants its single composed control to adopt (#495).\n * `undefined` outside a Field, in unlabeled/grouped/addons Fields, or when the\n * user took over the association with an explicit `labelProps.htmlFor`.\n * Consumed only by the single-control bases (InputBase, SelectBase,\n * TextAreaBase). Internal; not part of the public API.\n */\nexport const useFieldLabelId = () => useContext(FieldLabelIdContext);\n\n/** Provider for the Field label-target id — used internally by Field. */\nexport const FieldLabelIdProvider = FieldLabelIdContext.Provider;\n\n/**\n * Shape of the Radios group context. The group provides:\n * - `name`: shared form field name (Stage 1)\n * - `value`: currently-selected radio value (Stage 2 — group-managed selection)\n * - `onChange`: dispatched by child Radios when clicked (Stage 2)\n *\n * Group sets `value`/`onChange` only when actively managing selection\n * (i.e., the user passed `value`, `defaultValue`, or `onChange` to `<Radios>`).\n * When only `name` is provided, the group is in \"name-only\" mode and child\n * Radios manage their own checked state independently.\n */\nexport interface RadiosGroupContextValue {\n name?: string;\n value?: string;\n onChange?: (value: string) => void;\n}\n\n/**\n * Shape of the Checkboxes group context. Like Radios but with array semantics\n * for multi-select.\n */\nexport interface CheckboxesGroupContextValue {\n name?: string;\n value?: string[];\n onChange?: (values: string[]) => void;\n}\n\nconst RadiosContext = createContext<RadiosGroupContextValue | undefined>(\n undefined\n);\nconst CheckboxesContext = createContext<\n CheckboxesGroupContextValue | undefined\n>(undefined);\n\n/**\n * Hook to read the full surrounding `<Radios>` group context (name + selection).\n * Returns `undefined` when not inside a `<Radios>` group.\n */\nexport const useRadiosGroup = () => useContext(RadiosContext);\n\n/**\n * Hook to read the full surrounding `<Checkboxes>` group context.\n * Returns `undefined` when not inside a `<Checkboxes>` group.\n */\nexport const useCheckboxesGroup = () => useContext(CheckboxesContext);\n\n/**\n * Hook to read just the shared `name` from a surrounding `<Radios>` group.\n * Child `<Radio>` components fall back to this when no local `name` prop is set.\n * Returns `undefined` outside of a `<Radios>` group.\n */\nexport const useRadiosName = () => useRadiosGroup()?.name;\n\n/**\n * Hook to read just the shared `name` from a surrounding `<Checkboxes>` group.\n * Returns `undefined` outside of a `<Checkboxes>` group.\n */\nexport const useCheckboxesName = () => useCheckboxesGroup()?.name;\n\n/** Provider for the Radios group context — used internally by Radios. */\nexport const RadiosProvider = RadiosContext.Provider;\n\n/** Provider for the Checkboxes group context — used internally by Checkboxes. */\nexport const CheckboxesProvider = CheckboxesContext.Provider;\n\n// --- Backward-compat aliases (Stage 1 names) -----------------------------\n// Internal callers may still import these. Both still work because they refer\n// to the same providers/hooks under the new shape.\n\n/** @deprecated Use `RadiosProvider` (provides {name, value, onChange}). */\nexport const RadiosNameProvider = RadiosProvider;\n\n/** @deprecated Use `CheckboxesProvider` (provides {name, value, onChange}). */\nexport const CheckboxesNameProvider = CheckboxesProvider;\n","import React, { forwardRef, useCallback } from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\nimport { useCheckboxesGroup } from './FormContext';\n\n/**\n * Valid colors for the Checkbox component.\n */\nexport const checkboxColors = [\n 'primary',\n 'link',\n 'info',\n 'success',\n 'warning',\n 'danger',\n] as const;\n\n/**\n * Valid sizes for the Checkbox component.\n */\nexport const checkboxSizes = ['small', 'normal', 'medium', 'large'] as const;\n\n/**\n * Props for the Checkbox component.\n */\nexport interface CheckboxProps\n extends\n Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n 'size' | 'type' | 'color'\n >,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'> {\n /** Color of the checkbox. */\n color?: (typeof checkboxColors)[number];\n /** Size of the checkbox. */\n size?: (typeof checkboxSizes)[number];\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Whether the checkbox is disabled. */\n disabled?: boolean;\n /** Additional CSS classes to apply. */\n className?: string;\n /** The label/content for the checkbox. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Checkbox` component provides a Bulma-styled checkbox input.\n *\n * @function\n * @param {CheckboxProps} props - Props for the Checkbox component.\n * @returns {JSX.Element} The rendered checkbox element.\n *\n * @example\n * // Basic checkbox\n * <Checkbox>Accept terms</Checkbox>\n *\n * @example\n * // Inside a group\n * <Checkboxes name=\"tags\" defaultValue={['react']}>\n * <Checkbox value=\"react\">React</Checkbox>\n * <Checkbox value=\"vue\">Vue</Checkbox>\n * </Checkboxes>\n */\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n color,\n size,\n className,\n children,\n textColor,\n disabled,\n name,\n value,\n checked,\n defaultChecked,\n onChange,\n ...props\n },\n ref\n ) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n ...props,\n });\n\n // Inherit name + selection state from a surrounding <Checkboxes> group.\n // Local props always win over the group (explicit > implicit).\n const group = useCheckboxesGroup();\n const effectiveName = name ?? group?.name;\n\n // Group-managed checked state — only when the group is in\n // controlled/uncontrolled mode (group.value is defined) AND this Checkbox\n // has a value to compare against. Local `checked` always wins.\n const groupManaged = group?.value !== undefined && value !== undefined;\n const groupHas = groupManaged && group!.value!.includes(String(value));\n const effectiveChecked =\n checked !== undefined ? checked : groupManaged ? groupHas : undefined;\n // When the group manages checked, suppress local defaultChecked to avoid\n // the controlled/uncontrolled React warning.\n const effectiveDefaultChecked = groupManaged ? undefined : defaultChecked;\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n // Local onChange always fires.\n onChange?.(e);\n // Dispatch to the group additionally — toggle this value's\n // membership in the group's array.\n if (group?.onChange && value !== undefined) {\n const valStr = String(value);\n const currentArr = group.value ?? [];\n const next = e.target.checked\n ? currentArr.includes(valStr)\n ? currentArr\n : [...currentArr, valStr]\n : currentArr.filter(v => v !== valStr);\n group.onChange(next);\n }\n },\n [onChange, group, value]\n );\n\n const mainClass = usePrefixedClassNames('styled-checkbox', 'checkbox', {\n [`is-${color}`]: color && checkboxColors.includes(color),\n [`is-${size}`]: size && checkboxSizes.includes(size),\n });\n const checkboxClass = classNames(mainClass, bulmaHelperClasses, className);\n const checkClass = usePrefixedClassNames('check');\n const controlLabelClass = usePrefixedClassNames('control-label');\n\n return (\n <label className={checkboxClass}>\n <input\n ref={ref}\n type=\"checkbox\"\n disabled={disabled}\n name={effectiveName}\n value={value}\n checked={effectiveChecked}\n defaultChecked={effectiveDefaultChecked}\n onChange={handleChange}\n {...rest}\n />\n <span className={checkClass} />\n {children && <span className={controlLabelClass}>{children}</span>}\n </label>\n );\n }\n);\n\nCheckbox.displayName = 'Checkbox';\n\nexport default Checkbox;\n","import React from 'react';\nimport {\n classNames,\n usePrefixedClassNames,\n prefixedClassNames,\n} from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\nimport { Icon, IconProps } from '../elements/Icon';\nimport { isIconProps } from '../elements/iconProps';\nimport { useConfig } from '../helpers/Config';\nimport { ControlProvider } from './FormContext';\n\n/**\n * Props for the Control component.\n */\nexport interface ControlBaseProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Adds left icon container. */\n hasIconsLeft?: boolean;\n /** Adds right icon container. */\n hasIconsRight?: boolean;\n /** Shows loading indicator. */\n isLoading?: boolean;\n /** Makes the control expand to fill available space. */\n isExpanded?: boolean;\n /** Sets the control size. */\n size?: 'small' | 'medium' | 'large';\n /** Sets text color. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Bulma color for the control. */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Background color. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Icon props for left icon, or a custom node (an inline SVG, a `react-icons` component, …) rendered in place of a class-based glyph. */\n iconLeft?: IconProps | React.ReactNode;\n /** Icon props for right icon, or a custom node (an inline SVG, a `react-icons` component, …) rendered in place of a class-based glyph. */\n iconRight?: IconProps | React.ReactNode;\n /** Shortcut for left icon name. */\n iconLeftName?: string;\n /** Shortcut for left icon size. */\n iconLeftSize?: 'small' | 'medium' | 'large';\n /** Shortcut for right icon name. */\n iconRightName?: string;\n /** Shortcut for right icon size. */\n iconRightSize?: 'small' | 'medium' | 'large';\n /** Additional CSS classes to apply. */\n className?: string;\n /** Content inside the control. */\n children?: React.ReactNode;\n}\n\n/** Props for the Control component, supporting either `div` or `p` as the root element. */\ntype ControlProps =\n | ({\n /** Element type for the control (`div` by default). */\n as?: 'div';\n } & ControlBaseProps & {\n /** Ref for the control element. */\n ref?: React.Ref<HTMLDivElement>;\n })\n | ({\n /** Element type for the control (`div` by default). */\n as: 'p';\n } & Omit<ControlBaseProps, keyof React.HTMLAttributes<HTMLDivElement>> &\n React.HTMLAttributes<HTMLParagraphElement> & {\n /** Ref for the control element. */\n ref?: React.Ref<HTMLParagraphElement>;\n });\n\nconst allowedColors = [...validColors, 'inherit', 'current'] as const;\n\n/**\n * The `Control` component is a Bulma-styled wrapper for form controls (`Input`, `Select`, `TextArea`, etc.), supporting icons (left/right), loading state, expansion, size, and Bulma helper props for layout and color.\n *\n * @function\n * @param {ControlProps} props - Props for the Control component.\n * @returns {JSX.Element} The rendered control container.\n * @see {@link https://bulma.io/documentation/form/general/#control | Bulma Control documentation}\n *\n * @example\n * // Control with left icon\n * <Control iconLeftName=\"envelope\" iconLeftSize=\"small\">\n * <input className=\"input\" type=\"email\" placeholder=\"Email\" />\n * </Control>\n */\nexport const Control = React.forwardRef<\n HTMLDivElement | HTMLParagraphElement,\n ControlProps\n>(\n (\n {\n as = 'div',\n hasIconsLeft,\n hasIconsRight,\n isLoading,\n isExpanded,\n size,\n textColor,\n bgColor,\n iconLeft,\n iconRight,\n iconLeftName,\n iconLeftSize,\n iconRightName,\n iconRightSize,\n className,\n children,\n ...props\n },\n ref\n ) => {\n const Component = (as === 'p' ? 'p' : 'div') as 'div' | 'p';\n const { classPrefix } = useConfig();\n\n // Remove textColor/bgColor from props before spreading\n const {\n textColor: _ignoredTextColor,\n bgColor: _ignoredBgColor,\n ...restProps\n } = props as Record<string, unknown>;\n\n const safeTextColor = allowedColors.includes(\n textColor as (typeof allowedColors)[number]\n )\n ? textColor\n : undefined;\n\n const safeBgColor = allowedColors.includes(\n bgColor as (typeof allowedColors)[number]\n )\n ? bgColor\n : undefined;\n\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: safeTextColor,\n backgroundColor: safeBgColor,\n ...restProps,\n });\n\n // Prepare icon props for the shortcut. A truthiness test (not `!== undefined`)\n // so a falsy node from the idiomatic `iconLeft={cond && <Node/>}` / `iconLeft={maybe ?? null}`\n // pattern counts as \"no icon\" — otherwise `false`/`null` would reserve the icon column and\n // mount an empty `.icon` span. A falsy `iconLeft` also correctly falls through to the\n // `iconLeftName` shortcut, matching the pre-node behavior.\n const leftIconValue: IconProps | React.ReactNode | undefined =\n iconLeft ||\n (iconLeftName\n ? {\n name: iconLeftName,\n size: iconLeftSize,\n }\n : undefined);\n\n const rightIconValue: IconProps | React.ReactNode | undefined =\n iconRight ||\n (iconRightName\n ? {\n name: iconRightName,\n size: iconRightSize,\n }\n : undefined);\n\n const mainClass = usePrefixedClassNames('control', {\n 'has-icons-left': hasIconsLeft || !!leftIconValue,\n 'has-icons-right': hasIconsRight || !!rightIconValue,\n 'is-loading': isLoading,\n 'is-expanded': isExpanded,\n [`is-${size}`]: !!size,\n });\n const controlClass = classNames(mainClass, bulmaHelperClasses, className);\n\n // --- FIX: Spread both restProps (for data-testid, etc) AND rest (from useBulmaClasses) ---\n return (\n <ControlProvider value={true}>\n <Component\n className={controlClass}\n ref={ref as typeof ref}\n {...restProps}\n {...rest}\n >\n {children}\n {leftIconValue &&\n (isIconProps(leftIconValue) ? (\n <Icon\n {...leftIconValue}\n className={prefixedClassNames(classPrefix, 'is-left')}\n />\n ) : (\n <Icon className={prefixedClassNames(classPrefix, 'is-left')}>\n {leftIconValue}\n </Icon>\n ))}\n {rightIconValue &&\n (isIconProps(rightIconValue) ? (\n <Icon\n {...rightIconValue}\n className={prefixedClassNames(classPrefix, 'is-right')}\n />\n ) : (\n <Icon className={prefixedClassNames(classPrefix, 'is-right')}>\n {rightIconValue}\n </Icon>\n ))}\n </Component>\n </ControlProvider>\n );\n }\n);\n\nControl.displayName = 'Control';\n\nexport default Control;\n","import React, { useId } from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\nimport { FieldProvider, FieldLabelIdProvider } from './FormContext';\nimport { Control } from './Control';\n\n/**\n * Props for the Field component.\n */\nexport interface FieldProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Renders the field as horizontal (label and control side by side). */\n horizontal?: boolean;\n /** Group controls in a row (optionally centered, right, or multiline). */\n grouped?: boolean | 'centered' | 'right' | 'multiline';\n /** Group controls as addons (optionally centered or right-aligned). */\n hasAddons?: boolean | 'centered' | 'right';\n /** Constrains the field to its content's width (used inside horizontal field bodies). */\n narrow?: boolean;\n /** Field label, rendered above the widget. Automatically associated with a single composed `InputBase`, `SelectBase`, or `TextAreaBase` via a generated id and `htmlFor`. Pass `labelProps={{ htmlFor }}` to wire your own `id`, or `labelProps={{ htmlFor: undefined }}` to opt out. Skipped for `grouped`/`hasAddons` fields (multiple controls). */\n label?: React.ReactNode;\n /** Size for the label. */\n labelSize?: 'small' | 'normal' | 'medium' | 'large';\n /** Props for the label element. An explicit `htmlFor` key — even set to `undefined` — takes over the association. */\n labelProps?: React.LabelHTMLAttributes<HTMLLabelElement> & {\n [key: string]: unknown;\n };\n /** Text color for the field. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Bulma color for the field. */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Background color for the field. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Additional CSS classes. */\n className?: string;\n /** Field content. */\n children?: React.ReactNode;\n}\n\n/**\n * Props for the FieldLabel component.\n */\nexport interface FieldLabelProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Size for the field label. */\n size?: 'small' | 'normal' | 'medium' | 'large';\n /** Text color for the label. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Bulma color for the label. */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Background color for the label. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Additional CSS classes. */\n className?: string;\n /** Field label content. */\n children?: React.ReactNode;\n}\n\n/**\n * Props for the FieldBody component.\n */\nexport interface FieldBodyProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Text color for the field body. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Bulma color for the field body. */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Background color for the field body. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Additional CSS classes. */\n className?: string;\n /** Field body content. */\n children?: React.ReactNode;\n}\n\n/**\n * FieldLabel component for rendering a Bulma field label.\n *\n * @function\n * @param {FieldLabelProps} props - Props for the FieldLabel component.\n * @returns {JSX.Element} The rendered field label.\n *\n * @example\n * <FieldLabel size=\"normal\">Name</FieldLabel>\n */\nexport const FieldLabel: React.FC<FieldLabelProps> = ({\n size,\n textColor,\n bgColor,\n className,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n });\n\n const mainClass = usePrefixedClassNames('field-label', {\n [`is-${size}`]: !!size,\n });\n const fieldLabelClass = classNames(mainClass, bulmaHelperClasses, className);\n // Spread ...props and ...rest so custom props like data-testid are included\n return (\n <div className={fieldLabelClass} {...props} {...rest}>\n {children}\n </div>\n );\n};\n\n/**\n * FieldBody component for rendering Bulma field body.\n *\n * @function\n * @param {FieldBodyProps} props - Props for the FieldBody component.\n * @returns {JSX.Element} The rendered field body.\n *\n * @example\n * <FieldBody><input className=\"input\" /></FieldBody>\n */\nexport const FieldBody: React.FC<FieldBodyProps> = ({\n textColor,\n bgColor,\n className,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n });\n\n const mainClass = usePrefixedClassNames('field-body');\n const fieldBodyClass = classNames(mainClass, bulmaHelperClasses, className);\n // Spread ...props and ...rest so custom props like data-testid are included\n return (\n <div className={fieldBodyClass} {...props} {...rest}>\n {children}\n </div>\n );\n};\n\n/**\n * The `Field` component is a Bulma-styled form field container.\n *\n * @function\n * @param {FieldProps} props - Props for the Field component.\n * @returns {JSX.Element} The rendered field container.\n * @see {@link https://bulma.io/documentation/form/general/#field | Bulma Field documentation}\n *\n * @example\n * // Labelled field — the label auto-associates with the composed base\n * <Field label=\"Email\">\n * <Control>\n * <InputBase type=\"email\" />\n * </Control>\n * </Field>\n *\n * @example\n * // Horizontal field\n * <Field horizontal label=\"Name\">\n * <Control>\n * <InputBase />\n * </Control>\n * </Field>\n */\nconst FieldComponent: React.FC<FieldProps> = ({\n horizontal,\n grouped,\n hasAddons,\n narrow,\n label,\n labelSize,\n labelProps,\n textColor,\n color: _fieldColor,\n bgColor,\n className,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n });\n\n const mainClass = usePrefixedClassNames('field', {\n 'is-horizontal': horizontal,\n 'has-addons': !!hasAddons,\n 'has-addons-centered': hasAddons === 'centered',\n 'has-addons-right': hasAddons === 'right',\n 'is-narrow': narrow,\n 'is-grouped':\n grouped === true ||\n grouped === 'centered' ||\n grouped === 'right' ||\n grouped === 'multiline',\n 'is-grouped-centered': grouped === 'centered',\n 'is-grouped-right': grouped === 'right',\n 'is-grouped-multiline': grouped === 'multiline',\n });\n const fieldClass = classNames(mainClass, bulmaHelperClasses, className);\n\n // Default labelSize to 'normal' when horizontal for proper baseline alignment\n const effectiveLabelSize = labelSize ?? (horizontal ? 'normal' : undefined);\n\n const labelClass = usePrefixedClassNames('label');\n\n // Auto-associate the label with a single composed base control (#495): the\n // label points at a generated id shared via context, which InputBase/\n // SelectBase/TextAreaBase adopt when the user supplied no id of their own.\n // Presence semantics on htmlFor — even an explicit `htmlFor: undefined`\n // means the caller owns the association. Grouped/addons fields hold several\n // controls, so no single association is generated for them.\n const generatedId = useId();\n const userWiredLabel = !!labelProps && 'htmlFor' in labelProps;\n const targetId =\n label && !userWiredLabel && !grouped && !hasAddons\n ? generatedId\n : undefined;\n\n let renderedLabel = null;\n if (label) {\n if (horizontal) {\n renderedLabel = (\n <FieldLabel size={effectiveLabelSize}>\n <label\n htmlFor={targetId}\n {...labelProps}\n className={classNames(labelClass, labelProps?.className)}\n style={labelProps?.style}\n >\n {label}\n </label>\n </FieldLabel>\n );\n } else {\n renderedLabel = (\n <label\n htmlFor={targetId}\n {...labelProps}\n className={classNames(labelClass, labelProps?.className)}\n style={{ display: 'block', ...(labelProps?.style || {}) }}\n >\n {label}\n </label>\n );\n }\n }\n\n // If horizontal, wrap children in FieldBody (unless the user already provided\n // a FieldBody — either as the single child, or as one element among siblings\n // like <Field.Label/> + <Field.Body/>).\n let content = children;\n if (horizontal) {\n const isFieldBody = (c: React.ReactNode): boolean =>\n React.isValidElement(c) &&\n // @ts-expect-error displayName isn't on the public type\n (c.type === FieldBody || c.type?.displayName === 'FieldBody');\n const isFieldLabel = (c: React.ReactNode): boolean =>\n React.isValidElement(c) &&\n // @ts-expect-error displayName isn't on the public type\n (c.type === FieldLabel || c.type?.displayName === 'FieldLabel');\n const childArray = React.Children.toArray(children);\n const userProvidedStructure = childArray.some(\n c => isFieldBody(c) || isFieldLabel(c)\n );\n if (userProvidedStructure) {\n content = children;\n } else {\n content = <FieldBody>{children}</FieldBody>;\n }\n }\n\n return (\n <FieldProvider value={true}>\n <FieldLabelIdProvider value={targetId}>\n <div className={fieldClass} {...rest}>\n {renderedLabel}\n {content}\n </div>\n </FieldLabelIdProvider>\n </FieldProvider>\n );\n};\n\nFieldLabel.displayName = 'FieldLabel';\nFieldBody.displayName = 'FieldBody';\n\nexport const Field = withSubComponents(\n FieldComponent,\n {\n Label: FieldLabel,\n Body: FieldBody,\n Control,\n },\n 'Field'\n);\n\nexport default Field;\n","import React, { useId } from 'react';\nimport type { FieldProps } from './Field';\n\ninterface UseAutoLabelIdOptions {\n /** The convenience `label` prop as passed by the caller. */\n label: React.ReactNode;\n /** User-supplied id for the control, if any. */\n id?: string;\n /** User-supplied labelProps, if any. */\n labelProps?: FieldProps['labelProps'];\n /**\n * True when this render actually outputs the label wired to a control —\n * false inside an outer Field (label is dropped), in variants that render\n * no Field, and in modes with no labellable control (e.g. inline pickers).\n */\n rendersLabel: boolean;\n}\n\n/**\n * Associates the convenience `label` prop with its control (#368): generates\n * an id for the control and returns labelProps carrying a matching `htmlFor`.\n * A user-supplied `id` is used as the target instead of the generated one, and\n * an explicit `htmlFor` key in labelProps — even set to `undefined` — disables\n * generation entirely: the user has taken over the association (#495 presence\n * semantics). Internal; not part of the public API.\n */\nexport function useAutoLabelId({\n label,\n id,\n labelProps,\n rendersLabel,\n}: UseAutoLabelIdOptions): {\n controlId: string | undefined;\n fieldLabelProps: FieldProps['labelProps'] | undefined;\n} {\n // Called unconditionally per the rules of hooks; SSR-safe on React 18 and 19.\n const generatedId = useId();\n // Truthiness mirrors Field's own `if (label)` render gate.\n const active = !!label && rendersLabel;\n // Presence, not truthiness: `htmlFor: undefined` is an explicit opt-out and\n // must not leave an orphan generated id on the control.\n const userWired = !!labelProps && 'htmlFor' in labelProps;\n const controlId = id ?? (active && !userWired ? generatedId : undefined);\n // Inactive with a label still means an own Field may render it (pickers'\n // inline mode, Taginput at maxTags) — the explicit `htmlFor: undefined`\n // tells Field the association is owned here, so it must not generate one\n // that would dangle (#495 presence semantics).\n const fieldLabelProps = active\n ? { htmlFor: controlId, ...labelProps }\n : label\n ? { htmlFor: undefined, ...labelProps }\n : labelProps;\n return { controlId, fieldLabelProps };\n}\n\ninterface UseAutoLabelledByOptions {\n /** The convenience `label` prop as passed by the caller. */\n label: React.ReactNode;\n /** User-supplied labelProps, if any. */\n labelProps?: FieldProps['labelProps'];\n /** True when this render actually outputs the label naming the group. */\n rendersLabel: boolean;\n}\n\n/**\n * Group-input counterpart of {@link useAutoLabelId} (#494): a group of\n * controls cannot take a single `htmlFor`, so instead the rendered `<label>`\n * gets a generated id and the group container points at it with\n * `aria-labelledby`. A user-supplied `labelProps.id` is used as the target\n * instead of generating one. Any caller `htmlFor` is stripped — a group label\n * names the group, never a single control — so the merged labelProps always\n * carry an explicit `htmlFor: undefined`.\n * Internal; not part of the public API.\n */\nexport function useAutoLabelledBy({\n label,\n labelProps,\n rendersLabel,\n}: UseAutoLabelledByOptions): {\n ariaLabelledBy: string | undefined;\n fieldLabelProps: FieldProps['labelProps'] | undefined;\n} {\n // Called unconditionally per the rules of hooks; SSR-safe on React 18 and 19.\n const generatedId = useId();\n const active = !!label && rendersLabel;\n const labelId = labelProps?.id ?? (active ? generatedId : undefined);\n const fieldLabelProps = active\n ? { ...labelProps, id: labelId, htmlFor: undefined }\n : labelProps;\n return { ariaLabelledBy: active ? labelId : undefined, fieldLabelProps };\n}\n","import React, { useCallback, useMemo, useState } from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport {\n useInsideField,\n useInsideControl,\n CheckboxesProvider,\n CheckboxesGroupContextValue,\n} from './FormContext';\nimport { Field } from './Field';\nimport { Control } from './Control';\nimport { FormFieldProps } from './fieldProps';\nimport { useAutoLabelledBy } from './useAutoLabelId';\nimport { Checkbox } from './Checkbox';\n\n/**\n * Props for the Checkboxes component.\n */\nexport interface CheckboxesProps\n extends Omit<BulmaClassesProps, 'color'>, FormFieldProps {\n /** Field label naming the whole group. Automatically associated via `aria-labelledby` on the `role=\"group\"` wrapper — uses your `labelProps.id` when provided, otherwise a generated one. Dropped inside an outer `Field` (label that `Field` yourself). */\n label?: React.ReactNode;\n /** Props for the label element. An explicit `id` here is used as the `aria-labelledby` target instead of a generated one; any `htmlFor` is ignored (a group label names the group, never a single control). */\n labelProps?: React.LabelHTMLAttributes<HTMLLabelElement> & {\n [key: string]: unknown;\n };\n /** Additional CSS classes to apply. */\n className?: string;\n /** Form field name shared by every Checkbox in the group (via context). */\n name?: string;\n /** Currently-selected values (controlled mode). */\n value?: string[];\n /** Initial selected values (uncontrolled mode). */\n defaultValue?: string[];\n /** Fires when the selection changes; receives the new array. */\n onChange?: (values: string[]) => void;\n /** Checkbox elements to render in the group. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Checkboxes` component wraps multiple `Checkbox` components in a Bulma-styled group.\n *\n * @function\n * @param {CheckboxesProps} props - Props for the Checkboxes component.\n * @returns {JSX.Element} The rendered checkboxes group.\n * @see {@link https://bulma.io/documentation/form/checkbox/#grouped-checkboxes | Bulma Checkboxes documentation}\n *\n * @example\n * // Controlled\n * const [tags, setTags] = useState(['react']);\n * <Checkboxes name=\"tags\" value={tags} onChange={setTags}>\n * <Checkbox value=\"react\">React</Checkbox>\n * <Checkbox value=\"vue\">Vue</Checkbox>\n * <Checkbox value=\"angular\">Angular</Checkbox>\n * </Checkboxes>\n *\n * @example\n * // Uncontrolled\n * <Checkboxes name=\"tags\" defaultValue={['react', 'vue']}>\n * <Checkbox value=\"react\">React</Checkbox>\n * <Checkbox value=\"vue\">Vue</Checkbox>\n * <Checkbox value=\"angular\">Angular</Checkbox>\n * </Checkboxes>\n */\nconst CheckboxesComponent: React.FC<CheckboxesProps> = ({\n label,\n labelSize,\n labelProps,\n horizontal,\n message,\n messageColor,\n fieldClassName,\n name,\n value,\n defaultValue,\n onChange,\n children,\n className,\n ...props\n}) => {\n const insideField = useInsideField();\n const insideControl = useInsideControl();\n const { ariaLabelledBy, fieldLabelProps } = useAutoLabelledBy({\n label,\n labelProps,\n rendersLabel: !insideField,\n });\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n ...props,\n });\n\n const mainClass = usePrefixedClassNames('checkboxes');\n const wrapperClass = classNames(mainClass, bulmaHelperClasses, className);\n\n const helpClass = usePrefixedClassNames('help', {\n [`is-${messageColor}`]: !!messageColor,\n });\n const messageEl = message ? <p className={helpClass}>{message}</p> : null;\n\n const groupActive =\n value !== undefined || defaultValue !== undefined || onChange !== undefined;\n\n const [internalValue, setInternalValue] = useState<string[] | undefined>(\n defaultValue\n );\n const isControlled = value !== undefined;\n const currentValue = isControlled ? value : internalValue;\n\n const handleChange = useCallback(\n (newValues: string[]) => {\n if (!isControlled) setInternalValue(newValues);\n onChange?.(newValues);\n },\n [isControlled, onChange]\n );\n\n const ctx = useMemo<CheckboxesGroupContextValue>(\n () => ({\n name,\n ...(groupActive ? { value: currentValue, onChange: handleChange } : {}),\n }),\n [name, groupActive, currentValue, handleChange]\n );\n\n const checkboxesElement = (\n <div\n className={wrapperClass}\n role=\"group\"\n aria-labelledby={ariaLabelledBy}\n {...rest}\n >\n <CheckboxesProvider value={ctx}>{children}</CheckboxesProvider>\n </div>\n );\n\n let content = checkboxesElement;\n\n if (!insideControl) {\n content = <Control>{content}</Control>;\n }\n\n if (!insideField) {\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\nexport const Checkboxes = withSubComponents(\n CheckboxesComponent,\n { Checkbox },\n 'Checkboxes'\n);\n\nexport default Checkboxes;\n","import React, { forwardRef } from 'react';\nimport {\n classNames,\n usePrefixedClassNames,\n prefixedClassNames,\n} from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { useConfig } from '../helpers/Config';\nimport { useInsideField } from './FormContext';\nimport { Field } from './Field';\nimport { FormFieldProps } from './fieldProps';\nimport { useAutoLabelId } from './useAutoLabelId';\n\n/**\n * Props for the File component.\n */\nexport interface FileProps\n extends\n Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n 'size' | 'color' | 'type'\n >,\n Omit<BulmaClassesProps, 'color'>,\n FormFieldProps {\n /** Field label. Automatically associated with the file input via `htmlFor` — uses your `id` when provided, otherwise a generated one. The input then has two labels (this one plus the wrapping `file-label`); assistive tech reads both. Dropped inside an outer `Field` (label that `Field` yourself). */\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 /** Bulma color modifier for the file input. */\n color?:\n | 'primary'\n | 'link'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger'\n | 'black'\n | 'dark'\n | 'light'\n | 'white';\n /** Size modifier for the file input. */\n size?: 'small' | 'medium' | 'large';\n /** Boxed file input. */\n isBoxed?: boolean;\n /** Whether the file input expands to full width. */\n isFullwidth?: boolean;\n /** Whether the file input expands to full width. @deprecated Use `isFullwidth` instead — `isFullwidth` wins if both are set. */\n isFullWidth?: boolean;\n /** Position the CTA on the right (with `hasName`). */\n isRight?: boolean;\n /** Center the file input within its container. */\n isCentered?: boolean;\n /** Show a file name indicator. */\n hasName?: boolean;\n /** Text on the file CTA button (defaults to \"Choose a file…\"). */\n buttonLabel?: React.ReactNode;\n /** Left icon element. */\n iconLeft?: React.ReactNode;\n /** Right icon element. */\n iconRight?: React.ReactNode;\n /** Additional CSS classes to apply. */\n className?: string;\n /** Additional CSS classes for the `<input>`. */\n inputClassName?: string;\n /** File name to display. */\n fileName?: string;\n}\n\n/**\n * The `File` component provides a Bulma-styled file input, supporting color, size, boxed/fullwidth/align styles, icons, \"has name\", and filename display.\n *\n * @function\n * @param {FileProps} props - Props for the File component.\n * @returns {JSX.Element} The rendered file upload field.\n * @see {@link https://bulma.io/documentation/form/file/ | Bulma File documentation}\n */\nexport const File = forwardRef<HTMLInputElement, FileProps>(\n (\n {\n // Field props\n label,\n labelSize,\n labelProps,\n horizontal,\n message,\n messageColor,\n fieldClassName,\n color,\n size,\n isBoxed,\n isFullwidth,\n isFullWidth,\n isRight,\n isCentered,\n hasName,\n buttonLabel,\n iconLeft,\n iconRight,\n className,\n inputClassName,\n fileName,\n ...props\n },\n ref\n ) => {\n const insideField = useInsideField();\n const { controlId, fieldLabelProps } = useAutoLabelId({\n label,\n id: props.id,\n labelProps,\n rendersLabel: !insideField,\n });\n const { classPrefix } = useConfig();\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color,\n ...props,\n });\n\n // Mutually exclusive alignment\n let alignmentClass: string | undefined;\n if (isRight && isCentered) {\n // If both are set, prefer isRight and warn in dev\n alignmentClass = prefixedClassNames(classPrefix, 'is-right');\n } else if (isRight) {\n alignmentClass = prefixedClassNames(classPrefix, 'is-right');\n } else if (isCentered) {\n alignmentClass = prefixedClassNames(classPrefix, 'is-centered');\n }\n\n const mainClass = usePrefixedClassNames('file', {\n [`is-${color}`]: !!color,\n [`is-${size}`]: !!size,\n 'is-boxed': isBoxed,\n 'is-fullwidth': isFullwidth ?? isFullWidth,\n 'has-name': hasName,\n });\n const fileClass = classNames(\n mainClass,\n bulmaHelperClasses,\n alignmentClass,\n className\n );\n\n const helpClass = usePrefixedClassNames('help', {\n [`is-${messageColor}`]: !!messageColor,\n });\n const messageEl = message ? <p className={helpClass}>{message}</p> : null;\n\n const fileElement = (\n <div className={fileClass}>\n <label className={usePrefixedClassNames('file-label')}>\n <input\n ref={ref}\n className={classNames(\n usePrefixedClassNames('file-input'),\n inputClassName\n )}\n type=\"file\"\n id={controlId}\n {...rest}\n />\n <span className={usePrefixedClassNames('file-cta')}>\n {iconLeft && (\n <span className={prefixedClassNames(classPrefix, 'file-icon')}>\n {iconLeft}\n </span>\n )}\n <span className={usePrefixedClassNames('file-label')}>\n {buttonLabel || 'Choose a file\\u2026'}\n </span>\n {iconRight && (\n <span className={prefixedClassNames(classPrefix, 'file-icon')}>\n {iconRight}\n </span>\n )}\n </span>\n {hasName && fileName && (\n <span className={prefixedClassNames(classPrefix, 'file-name')}>\n {fileName}\n </span>\n )}\n </label>\n </div>\n );\n\n if (!insideField) {\n return (\n <Field\n label={label}\n labelSize={labelSize}\n labelProps={fieldLabelProps}\n horizontal={horizontal}\n className={fieldClassName}\n >\n {fileElement}\n {messageEl}\n </Field>\n );\n }\n\n return (\n <>\n {fileElement}\n {messageEl}\n </>\n );\n }\n);\n\nFile.displayName = 'File';\n\nexport default File;\n","import React, { forwardRef, useCallback } from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\nimport { useRadiosGroup } from './FormContext';\n\n/**\n * Valid colors for the Radio component.\n */\nexport const radioColors = [\n 'primary',\n 'link',\n 'info',\n 'success',\n 'warning',\n 'danger',\n] as const;\n\n/**\n * Valid sizes for the Radio component.\n */\nexport const radioSizes = ['small', 'normal', 'medium', 'large'] as const;\n\n/**\n * Props for the Radio component.\n */\nexport interface RadioProps\n extends\n Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n 'size' | 'type' | 'color'\n >,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'> {\n /** Color of the radio button. */\n color?: (typeof radioColors)[number];\n /** Size of the radio button. */\n size?: (typeof radioSizes)[number];\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Whether the radio is disabled. */\n disabled?: boolean;\n /** Additional CSS classes to apply. */\n className?: string;\n /** The label/content for the radio. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Radio` component provides a Bulma-styled radio button input with flexible labels and helper classes.\n *\n * @function\n * @param {RadioProps} props - Props for the Radio component.\n * @returns {JSX.Element} The rendered radio element.\n *\n * @example\n * // Basic radio\n * <Radio name=\"option\">Option A</Radio>\n *\n * @example\n * // Inside a group\n * <Radios name=\"color\" defaultValue=\"red\">\n * <Radio value=\"red\">Red</Radio>\n * <Radio value=\"blue\">Blue</Radio>\n * </Radios>\n */\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>(\n (\n {\n color,\n size,\n className,\n children,\n textColor,\n disabled,\n name,\n value,\n checked,\n defaultChecked,\n onChange,\n ...props\n },\n ref\n ) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n ...props,\n });\n\n // Inherit name + selection state from a surrounding <Radios> group.\n // Local props always win over the group (explicit > implicit).\n const group = useRadiosGroup();\n const effectiveName = name ?? group?.name;\n\n // Group-managed checked state — only when the group is in\n // controlled/uncontrolled mode (group.value is defined) AND this Radio\n // has a value to compare against. Local `checked` always wins.\n const groupManaged = group?.value !== undefined && value !== undefined;\n const effectiveChecked =\n checked !== undefined\n ? checked\n : groupManaged\n ? group!.value === value\n : undefined;\n // When the group manages checked, suppress local defaultChecked to avoid\n // the controlled/uncontrolled React warning.\n const effectiveDefaultChecked = groupManaged ? undefined : defaultChecked;\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n // Local onChange always fires.\n onChange?.(e);\n // Dispatch to the group additionally — keeps group state in sync.\n if (group?.onChange && value !== undefined) {\n group.onChange(String(value));\n }\n },\n [onChange, group, value]\n );\n\n const mainClass = usePrefixedClassNames('styled-radio', 'radio', {\n [`is-${color}`]: color && radioColors.includes(color),\n [`is-${size}`]: size && radioSizes.includes(size),\n });\n const radioClass = classNames(mainClass, bulmaHelperClasses, className);\n const checkClass = usePrefixedClassNames('check');\n const controlLabelClass = usePrefixedClassNames('control-label');\n\n return (\n <label className={radioClass}>\n <input\n ref={ref}\n type=\"radio\"\n disabled={disabled}\n name={effectiveName}\n value={value}\n checked={effectiveChecked}\n defaultChecked={effectiveDefaultChecked}\n onChange={handleChange}\n {...rest}\n />\n <span className={checkClass} />\n {children && <span className={controlLabelClass}>{children}</span>}\n </label>\n );\n }\n);\n\nRadio.displayName = 'Radio';\n\nexport default Radio;\n","import React, { useCallback, useMemo, useState } from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport {\n useInsideField,\n useInsideControl,\n RadiosProvider,\n RadiosGroupContextValue,\n} from './FormContext';\nimport { Field } from './Field';\nimport { Control } from './Control';\nimport { FormFieldProps } from './fieldProps';\nimport { useAutoLabelledBy } from './useAutoLabelId';\nimport { Radio } from './Radio';\n\n/**\n * Props for the Radios component.\n */\nexport interface RadiosProps\n extends Omit<BulmaClassesProps, 'color'>, FormFieldProps {\n /** Field label naming the whole group. Automatically associated via `aria-labelledby` on the `role=\"radiogroup\"` wrapper — uses your `labelProps.id` when provided, otherwise a generated one. Dropped inside an outer `Field` (label that `Field` yourself). */\n label?: React.ReactNode;\n /** Props for the label element. An explicit `id` here is used as the `aria-labelledby` target instead of a generated one; any `htmlFor` is ignored (a group label names the group, never a single control). */\n labelProps?: React.LabelHTMLAttributes<HTMLLabelElement> & {\n [key: string]: unknown;\n };\n /** Additional CSS classes to apply. */\n className?: string;\n /** Form field name shared by every Radio in the group (via context). */\n name?: string;\n /** Currently-selected value (controlled mode). */\n value?: string;\n /** Initial selected value (uncontrolled mode). */\n defaultValue?: string;\n /** Fires when the selection changes. */\n onChange?: (value: string) => void;\n /** Radio elements to render in the group. */\n children: React.ReactNode;\n}\n\n/**\n * The `Radios` component wraps multiple `Radio` components in a Bulma-styled group.\n *\n * @function\n * @param {RadiosProps} props - Props for the Radios component.\n * @returns {JSX.Element} The rendered radios group.\n * @see {@link https://bulma.io/documentation/form/radio/#grouped-radios | Bulma Radios documentation}\n *\n * @example\n * // Controlled\n * const [color, setColor] = useState('red');\n * <Radios name=\"color\" value={color} onChange={setColor}>\n * <Radio value=\"red\">Red</Radio>\n * <Radio value=\"green\">Green</Radio>\n * <Radio value=\"blue\">Blue</Radio>\n * </Radios>\n *\n * @example\n * // Uncontrolled\n * <Radios name=\"color\" defaultValue=\"red\" onChange={v => console.log(v)}>\n * <Radio value=\"red\">Red</Radio>\n * <Radio value=\"green\">Green</Radio>\n * </Radios>\n */\nconst RadiosComponent: React.FC<RadiosProps> = ({\n label,\n labelSize,\n labelProps,\n horizontal,\n message,\n messageColor,\n fieldClassName,\n name,\n value,\n defaultValue,\n onChange,\n children,\n className,\n ...props\n}) => {\n const insideField = useInsideField();\n const insideControl = useInsideControl();\n const { ariaLabelledBy, fieldLabelProps } = useAutoLabelledBy({\n label,\n labelProps,\n rendersLabel: !insideField,\n });\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n ...props,\n });\n\n const mainClass = usePrefixedClassNames('radios');\n const wrapperClass = classNames(mainClass, bulmaHelperClasses, className);\n\n const helpClass = usePrefixedClassNames('help', {\n [`is-${messageColor}`]: !!messageColor,\n });\n const messageEl = message ? <p className={helpClass}>{message}</p> : null;\n\n // The group is \"active\" (manages child selection) when the user opted in by\n // passing value, defaultValue, or onChange. Otherwise it's name-only and\n // children manage their own checked state (Stage 1 behavior).\n const groupActive =\n value !== undefined || defaultValue !== undefined || onChange !== undefined;\n\n const [internalValue, setInternalValue] = useState<string | undefined>(\n defaultValue\n );\n const isControlled = value !== undefined;\n const currentValue = isControlled ? value : internalValue;\n\n const handleChange = useCallback(\n (newValue: string) => {\n if (!isControlled) setInternalValue(newValue);\n onChange?.(newValue);\n },\n [isControlled, onChange]\n );\n\n const ctx = useMemo<RadiosGroupContextValue>(\n () => ({\n name,\n ...(groupActive ? { value: currentValue, onChange: handleChange } : {}),\n }),\n [name, groupActive, currentValue, handleChange]\n );\n\n const radiosElement = (\n <div\n className={wrapperClass}\n role=\"radiogroup\"\n aria-labelledby={ariaLabelledBy}\n {...rest}\n >\n <RadiosProvider value={ctx}>{children}</RadiosProvider>\n </div>\n );\n\n let content = radiosElement;\n\n if (!insideControl) {\n content = <Control>{content}</Control>;\n }\n\n if (!insideField) {\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\nexport const Radios = withSubComponents(RadiosComponent, { Radio }, 'Radios');\n\nexport default Radios;\n","import React, { forwardRef } from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * Valid colors for the Switch component.\n */\nexport const switchColors = [\n 'primary',\n 'link',\n 'info',\n 'success',\n 'warning',\n 'danger',\n] as const;\n\n/**\n * Valid sizes for the Switch component.\n */\nexport const switchSizes = ['small', 'normal', 'medium', 'large'] as const;\n\n/**\n * Props for the Switch component.\n * @extraProp {boolean} [checked] - Controlled checked state.\n * @extraProp {boolean} [defaultChecked=false] - Default checked state for uncontrolled usage.\n * @extraProp {boolean} [disabled=false] - Whether the switch is disabled.\n * @extraProp {string} [className] - Additional CSS classes.\n * @extraProp {(event: React.ChangeEvent<HTMLInputElement>) => void} [onChange] - Callback when switch state changes.\n * @extraProp {React.Ref<HTMLInputElement>} [ref] - Ref forwarded to the input element.\n */\nexport interface SwitchProps\n extends\n Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n 'size' | 'type' | 'color'\n >,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'> {\n /** Color variant for the switch. */\n color?: (typeof switchColors)[number];\n /** Size of the switch. */\n size?: (typeof switchSizes)[number];\n /** Use rounded switch style. */\n isRounded?: boolean;\n /** Use thin switch style. */\n isThin?: boolean;\n /** Use outlined switch style. */\n isOutlined?: boolean;\n /** Right-to-left layout (label on left). */\n isRtl?: boolean;\n /** Color when the switch is in the off/passive state. */\n passiveType?: (typeof switchColors)[number];\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Label content for the switch. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Switch` component provides a toggle switch for boolean on/off states.\n *\n * @function\n * @param {SwitchProps} props - Props for the Switch component.\n * @returns {JSX.Element} The rendered switch element.\n *\n * @example\n * // Basic switch\n * <Switch>Enable notifications</Switch>\n *\n * @example\n * // Colored and rounded switch\n * <Switch color=\"success\" isRounded checked>\n * Active\n * </Switch>\n *\n * @example\n * // Controlled switch\n * <Switch\n * checked={isEnabled}\n * onChange={(e) => setIsEnabled(e.target.checked)}\n * >\n * Feature enabled\n * </Switch>\n */\nexport const Switch = forwardRef<HTMLInputElement, SwitchProps>(\n (\n {\n color,\n size,\n isRounded,\n isThin,\n isOutlined,\n isRtl,\n passiveType,\n className,\n children,\n textColor,\n disabled,\n ...props\n },\n ref\n ) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n ...props,\n });\n\n // Generate Bulma classes with prefix\n const switchClasses = usePrefixedClassNames('switch', {\n [`is-${color}`]: color && switchColors.includes(color),\n [`is-${size}`]: size && switchSizes.includes(size),\n 'is-rounded': isRounded,\n 'is-thin': isThin,\n 'is-outlined': isOutlined,\n 'is-rtl': isRtl,\n [`is-${passiveType}-passive`]:\n passiveType && switchColors.includes(passiveType),\n });\n\n // Combine prefixed Bulma classes with unprefixed user className and helper classes\n const labelClasses = classNames(\n switchClasses,\n bulmaHelperClasses,\n className\n );\n const checkClass = usePrefixedClassNames('check');\n const controlLabelClass = usePrefixedClassNames('control-label');\n\n return (\n <label className={labelClasses}>\n <input ref={ref} type=\"checkbox\" disabled={disabled} {...rest} />\n <span className={checkClass} />\n {children && <span className={controlLabelClass}>{children}</span>}\n </label>\n );\n }\n);\n\nSwitch.displayName = 'Switch';\n\nexport default Switch;\n","import React, {\n forwardRef,\n useState,\n useCallback,\n useRef,\n useMemo,\n useLayoutEffect,\n} from 'react';\nimport {\n classNames,\n prefixedClassNames,\n usePrefixedClassNames,\n} from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { useClassPrefix } from '../helpers/Config';\nimport { useInsideField, useInsideControl } from './FormContext';\nimport { Field } from './Field';\nimport { Control } from './Control';\nimport { FormFieldProps } from './fieldProps';\nimport { useAutoLabelId } from './useAutoLabelId';\n\n/** Valid sizes for the Slider component. */\nexport type SliderSize = 'small' | 'medium' | 'large';\n\n/** Valid colors for the Slider component. */\nexport type SliderColor =\n 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n\n/** Tooltip display mode for the Slider component. */\nexport type SliderTooltip = 'auto' | 'always' | 'hidden';\n\n/** Orientation of the Slider component. */\nexport type SliderOrientation = 'horizontal' | 'vertical';\n\n/**\n * A tick mark displayed along the Slider track.\n */\nexport interface SliderMark {\n /** Controlled value. */\n value: number;\n /** Optional label rendered below the tick mark. */\n label?: React.ReactNode;\n}\n\n/**\n * Shared base props for single and range Slider modes.\n */\ninterface SliderBaseProps\n extends\n Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n 'color' | 'size' | 'onChange' | 'value' | 'defaultValue'\n >,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'>,\n FormFieldProps {\n /** Field label. Automatically associated with the slider input via `htmlFor` — uses your `id` when provided, otherwise a generated one. In range mode the label targets the low (minimum) thumb. Dropped inside an outer `Field` (label that `Field` yourself). */\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 /** Minimum value. */\n min?: number;\n /** Maximum value. */\n max?: number;\n /** Step increment (default: 1). */\n step?: number;\n /** Size variant. */\n size?: SliderSize;\n /** Color variant. */\n color?: SliderColor;\n /** Use rounded track ends. */\n isRounded?: boolean;\n /** Use circular thumb. */\n isCircle?: boolean;\n /** Show current value tooltip. */\n showOutput?: boolean;\n /** Controls tooltip visibility on the thumb. */\n tooltip?: SliderTooltip;\n /** Shows tick marks along the track. */\n ticks?: boolean;\n /** Custom labeled marks along the track. Each mark has `{ value: number; label?: ReactNode }`. */\n marks?: SliderMark[];\n /** Orientation of the slider. */\n orientation?: SliderOrientation;\n /** Function to scale the displayed value. */\n scale?: (value: number) => number;\n /** Function to generate the `aria-valuetext` attribute. */\n getAriaValueText?: (value: number) => string;\n /** Format function for output display. */\n formatOutput?: (value: number) => string;\n}\n\n/**\n * Props for the Slider in single-value mode.\n */\nexport interface SliderSingleProps extends SliderBaseProps {\n /**\n * Enables range mode with two thumbs.\n * @defaultValue false\n */\n range?: false;\n /** Controlled value. */\n value?: number;\n /**\n * Default value for uncontrolled usage.\n * @defaultValue 0\n */\n defaultValue?: number;\n /** Callback when value changes. */\n onChange?: (value: number) => void;\n /**\n * Minimum distance between thumbs in range mode.\n * @defaultValue 0\n */\n minDistance?: never;\n /** ARIA label(s) for the slider thumb(s). */\n ariaLabel?: string;\n}\n\n/**\n * Props for the Slider in range (dual-thumb) mode.\n */\nexport interface SliderRangeProps extends SliderBaseProps {\n /**\n * Enables range mode with two thumbs.\n * @defaultValue false\n */\n range: true;\n /** Controlled value. */\n value?: [number, number];\n /**\n * Default value for uncontrolled usage.\n * @defaultValue 0\n */\n defaultValue?: [number, number];\n /** Callback when value changes. */\n onChange?: (value: [number, number]) => void;\n /**\n * Minimum distance between thumbs in range mode.\n * @defaultValue 0\n */\n minDistance?: number;\n /** ARIA label(s) for the slider thumb(s). */\n ariaLabel?: [string, string];\n /** Form field name for the low thumb. Use this in range mode so each thumb submits with its own name. */\n nameLow?: string;\n /** Form field name for the high thumb. */\n nameHigh?: string;\n}\n\n/**\n * Props for the Slider component — a discriminated union of single and range modes.\n * @extraProp {boolean} [disabled=false] - Whether the slider is disabled.\n * @extraProp {string} [className] - Additional CSS classes.\n * @extraProp {React.Ref<HTMLElement>} [ref] - Ref forwarded to the input element.\n */\nexport type SliderProps = SliderSingleProps | SliderRangeProps;\n\n/**\n * Helper to compute tick positions.\n * If `marks` are provided, those positions are used.\n * If `ticks` is true, generates ticks at every step (capped at 100).\n */\nfunction getTickPositions(\n min: number,\n max: number,\n step: number,\n ticks?: boolean,\n marks?: SliderMark[]\n): SliderMark[] {\n if (marks && marks.length > 0) return marks;\n if (!ticks) return [];\n const positions: SliderMark[] = [];\n const count = Math.round((max - min) / step);\n if (count > 100) {\n // Cap at 100 ticks to prevent perf issues\n const tickStep = (max - min) / 100;\n // Skip first (i=0) and last (i=100) — no ticks at endpoints\n for (let i = 1; i < 100; i++) {\n positions.push({ value: min + i * tickStep });\n }\n } else {\n // Skip first (i=0) and last (i=count) — no ticks at endpoints\n for (let i = 1; i < count; i++) {\n positions.push({ value: min + i * step });\n }\n }\n return positions;\n}\n\n/**\n * The `Slider` component provides a range slider input for selecting values within a range.\n *\n * @function\n * @param {SliderProps} props - Props for the Slider component.\n * @returns {JSX.Element} The rendered slider element.\n *\n * @example\n * // Basic slider\n * <Slider defaultValue={50} />\n *\n * @example\n * // Range slider\n * <Slider range defaultValue={[20, 80]} onChange={([low, high]) => {}} />\n */\nexport const Slider = forwardRef<HTMLInputElement, SliderProps>(\n (props, ref) => {\n // Pull out fields that differ between the single and range branches\n // *first*, by narrowing on the `range` discriminator. We then destructure\n // the remaining base props from a `SliderBaseProps` view of `props`.\n //\n // Why not destructure everything via `props as SliderRangeProps & SliderSingleProps`?\n // Because intersecting the two halves of a discriminated union collapses\n // overlapping fields (e.g. `range: true & false`, `value: number & [number, number]`,\n // `onChange`, `ariaLabel`) to `never`, which breaks call sites and rest spreads.\n let range: boolean | undefined;\n let controlledValue: number | [number, number] | undefined;\n let defaultValue: number | [number, number] | undefined;\n let onChange:\n ((v: number) => void) | ((v: [number, number]) => void) | undefined;\n let ariaLabel: string | [string, string] | undefined;\n let minDistance = 0;\n let nameLow: string | undefined;\n let nameHigh: string | undefined;\n if (props.range === true) {\n range = true;\n controlledValue = props.value;\n defaultValue = props.defaultValue;\n onChange = props.onChange;\n ariaLabel = props.ariaLabel;\n minDistance = props.minDistance ?? 0;\n nameLow = props.nameLow;\n nameHigh = props.nameHigh;\n } else {\n range = props.range;\n controlledValue = props.value;\n defaultValue = props.defaultValue;\n onChange = props.onChange;\n ariaLabel = props.ariaLabel;\n }\n\n // Destructure base / shared props from a `SliderBaseProps` view. None of\n // these fields differ between the two branches, so this view is safe.\n const {\n label,\n labelSize,\n labelProps,\n horizontal,\n message,\n messageColor,\n fieldClassName,\n min = 0,\n max = 100,\n step = 1,\n size,\n color,\n isRounded = false,\n isCircle = false,\n disabled = false,\n showOutput = false,\n tooltip,\n ticks,\n marks,\n orientation = 'horizontal',\n scale,\n getAriaValueText,\n formatOutput,\n className,\n // Strip the discriminated/union fields from `restProps` so they don't\n // flow back into `useBulmaClasses` / spread onto inputs.\n range: _range,\n value: _value,\n defaultValue: _defaultValue,\n onChange: _onChange,\n ariaLabel: _ariaLabel,\n minDistance: _minDistance,\n nameLow: _nameLow,\n nameHigh: _nameHigh,\n ...restProps\n } = props as SliderBaseProps & {\n range?: boolean;\n value?: number | [number, number];\n defaultValue?: number | [number, number];\n onChange?: (v: never) => void;\n ariaLabel?: string | [string, string];\n minDistance?: number;\n nameLow?: string;\n nameHigh?: string;\n };\n void _range;\n void _value;\n void _defaultValue;\n void _onChange;\n void _ariaLabel;\n void _minDistance;\n void _nameLow;\n void _nameHigh;\n\n const insideField = useInsideField();\n const insideControl = useInsideControl();\n const { bulmaHelperClasses, rest } = useBulmaClasses(restProps);\n // In range mode the low thumb carries `rest` (and any user id), so the\n // label targets it; each thumb keeps its own aria-label for AT.\n const { controlId, fieldLabelProps } = useAutoLabelId({\n label,\n id: restProps.id,\n labelProps,\n rendersLabel: !insideField,\n });\n\n // Resolve tooltip mode: explicit tooltip prop takes precedence, else showOutput maps to 'auto'\n const tooltipMode: SliderTooltip =\n tooltip ?? (showOutput ? 'auto' : 'hidden');\n\n // --- Range mode state ---\n const [internalRange, setInternalRange] = useState<[number, number]>(() =>\n range ? ((defaultValue as [number, number]) ?? [min, max]) : [min, min]\n );\n const [internalSingle, setInternalSingle] = useState<number>(() =>\n !range ? ((defaultValue as number) ?? 0) : 0\n );\n const [showTooltip, setShowTooltip] = useState(false);\n const [showTooltipHigh, setShowTooltipHigh] = useState(false);\n const inputRef = useRef<HTMLInputElement>(null);\n const inputHighRef = useRef<HTMLInputElement>(null);\n const outputRef = useRef<HTMLOutputElement>(null);\n const outputHighRef = useRef<HTMLOutputElement>(null);\n const wrapperRef = useRef<HTMLDivElement>(null);\n const [flipped, setFlipped] = useState(false);\n const [flippedHigh, setFlippedHigh] = useState(false);\n const [nudgeX, setNudgeX] = useState(0);\n const [nudgeXHigh, setNudgeXHigh] = useState(0);\n const [verticalFlippedLeft, setVerticalFlippedLeft] = useState(false);\n\n const isControlled = controlledValue !== undefined;\n\n // Current values\n const currentRange: [number, number] = range\n ? isControlled\n ? (controlledValue as [number, number])\n : internalRange\n : [0, 0];\n const currentSingle: number = !range\n ? isControlled\n ? (controlledValue as number)\n : internalSingle\n : 0;\n\n // Progress percentages\n const progressSingle = !range\n ? ((currentSingle - min) / (max - min)) * 100\n : 0;\n const progressLow = range\n ? ((currentRange[0] - min) / (max - min)) * 100\n : 0;\n const progressHigh = range\n ? ((currentRange[1] - min) / (max - min)) * 100\n : 0;\n\n // Scale helper\n const scaleValue = useCallback(\n (v: number) => (scale ? scale(v) : v),\n [scale]\n );\n\n // Format helper\n const formatValue = useCallback(\n (v: number) => {\n const scaled = scaleValue(v);\n return formatOutput ? formatOutput(scaled) : scaled.toString();\n },\n [formatOutput, scaleValue]\n );\n\n // --- Handlers ---\n const handleSingleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = parseFloat(e.target.value);\n if (!isControlled) setInternalSingle(newValue);\n (onChange as ((v: number) => void) | undefined)?.(newValue);\n },\n [isControlled, onChange]\n );\n\n const handleRangeLowChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const raw = parseFloat(e.target.value);\n const clamped = Math.min(raw, currentRange[1] - minDistance);\n const newRange: [number, number] = [clamped, currentRange[1]];\n if (!isControlled) setInternalRange(newRange);\n (onChange as ((v: [number, number]) => void) | undefined)?.(newRange);\n },\n [isControlled, onChange, currentRange, minDistance]\n );\n\n const handleRangeHighChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const raw = parseFloat(e.target.value);\n const clamped = Math.max(raw, currentRange[0] + minDistance);\n const newRange: [number, number] = [currentRange[0], clamped];\n if (!isControlled) setInternalRange(newRange);\n (onChange as ((v: [number, number]) => void) | undefined)?.(newRange);\n },\n [isControlled, onChange, currentRange, minDistance]\n );\n\n // Key handler for Home/End\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Home') {\n e.preventDefault();\n if (!range) {\n if (!isControlled) setInternalSingle(min);\n (onChange as ((v: number) => void) | undefined)?.(min);\n }\n } else if (e.key === 'End') {\n e.preventDefault();\n if (!range) {\n if (!isControlled) setInternalSingle(max);\n (onChange as ((v: number) => void) | undefined)?.(max);\n }\n }\n },\n [range, isControlled, onChange, min, max]\n );\n\n // Tick positions\n const tickPositions = useMemo(\n () => getTickPositions(min, max, step, ticks, marks),\n [min, max, step, ticks, marks]\n );\n\n const hasLabels = tickPositions.some(t => t.label !== undefined);\n const isVertical = orientation === 'vertical';\n\n // Compute corrected thumb position CSS calc expression.\n // The browser insets the range input thumb by half its size from each edge,\n // so the tooltip left must account for this to align with the thumb center.\n const thumbVarName = size\n ? `slider-thumb-size-${size}`\n : 'slider-thumb-size';\n const thumbCssVar = `var(--bulma-${thumbVarName})`;\n const effectiveThumbExpr = isCircle\n ? `(${thumbCssVar} * 1.2)`\n : thumbCssVar;\n\n const getThumbLeft = (progressPct: number) => {\n const fraction = progressPct / 100;\n return `calc(${effectiveThumbExpr} / 2 + ${fraction} * (100% - ${effectiveThumbExpr}))`;\n };\n\n // Vertical tooltip offset: position to the right or left of the thumb\n const verticalTooltipOffset = `calc(50% + ${effectiveThumbExpr} / 2 + 0.5rem)`;\n\n // Get effective thumb size in px for nudge computation\n const getThumbSizePx = (): number => {\n const el = inputRef.current;\n if (!el) return 0;\n const style = getComputedStyle(el);\n const raw = style.getPropertyValue(`--bulma-${thumbVarName}`).trim();\n const value = parseFloat(raw);\n if (isNaN(value)) return 0;\n let px: number;\n if (raw.includes('rem')) {\n const rootFs =\n parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;\n px = value * rootFs;\n } else {\n px = value;\n }\n return isCircle ? px * 1.2 : px;\n };\n\n // Generate wrapper classes\n const classPrefix = useClassPrefix();\n const sliderClasses = usePrefixedClassNames('slider', {\n [`is-${size}`]: size,\n [`is-${color}`]: color,\n 'is-rounded': isRounded,\n 'is-circle': isCircle,\n 'is-disabled': disabled,\n 'has-output': tooltipMode !== 'hidden',\n 'has-output-always': tooltipMode === 'always',\n 'is-vertical': isVertical,\n 'is-range': range,\n 'has-ticks': tickPositions.length > 0,\n 'has-tick-labels': hasLabels,\n });\n\n const combinedClasses = classNames(\n sliderClasses,\n bulmaHelperClasses,\n className\n );\n\n // Combined ref for the first (or only) input\n const combinedRef = (node: HTMLInputElement | null) => {\n (inputRef as React.MutableRefObject<HTMLInputElement | null>).current =\n node;\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref) {\n (ref as React.MutableRefObject<HTMLInputElement | null>).current = node;\n }\n };\n\n // Tooltip show/hide for auto mode\n const showTipLow =\n tooltipMode === 'always' || (tooltipMode === 'auto' && showTooltip);\n const showTipHigh =\n tooltipMode === 'always' || (tooltipMode === 'auto' && showTooltipHigh);\n\n // Aria value text\n const getAriaProps = (value: number) => {\n const ariaProps: Record<string, string> = {};\n if (getAriaValueText) {\n ariaProps['aria-valuetext'] = getAriaValueText(value);\n } else if (scale) {\n ariaProps['aria-valuetext'] = scaleValue(value).toString();\n }\n return ariaProps;\n };\n\n // Detect tooltip overflow: flip vertically if clipped at top,\n // nudge horizontally if clipped at left/right edge.\n // We compute the un-nudged tooltip position from the progress %\n // and wrapper rect to avoid feedback loops.\n const computeNudge = useCallback(\n (\n el: HTMLElement,\n wrapper: HTMLElement,\n progressPct: number,\n thumbSizePx: number\n ): number => {\n const wr = wrapper.getBoundingClientRect();\n const tooltipWidth = el.offsetWidth;\n // Corrected center: accounts for thumb inset from track edges\n const fraction = progressPct / 100;\n const centerX =\n wr.left + thumbSizePx / 2 + fraction * (wr.width - thumbSizePx);\n const tooltipLeft = centerX - tooltipWidth / 2;\n const tooltipRight = centerX + tooltipWidth / 2;\n if (tooltipLeft < wr.left) {\n return wr.left - tooltipLeft; // nudge right\n }\n if (tooltipRight > wr.right) {\n return wr.right - tooltipRight; // nudge left (negative)\n }\n return 0;\n },\n []\n );\n\n useLayoutEffect(() => {\n if (isVertical) return;\n const wrapper = wrapperRef.current;\n const el = outputRef.current;\n if (wrapper && el) {\n const wrapperTop = wrapper.getBoundingClientRect().top;\n const tooltipHeight = el.offsetHeight + 10;\n setFlipped(wrapperTop < tooltipHeight);\n const pct = range ? progressLow : progressSingle;\n const thumbPx = getThumbSizePx();\n setNudgeX(computeNudge(el, wrapper, pct, thumbPx));\n }\n });\n\n useLayoutEffect(() => {\n if (isVertical || !range) return;\n const wrapper = wrapperRef.current;\n const el = outputHighRef.current;\n if (wrapper && el) {\n const wrapperTop = wrapper.getBoundingClientRect().top;\n const tooltipHeight = el.offsetHeight + 10;\n setFlippedHigh(wrapperTop < tooltipHeight);\n const thumbPx = getThumbSizePx();\n setNudgeXHigh(computeNudge(el, wrapper, progressHigh, thumbPx));\n }\n });\n\n // Detect vertical tooltip overflow: flip to left if no space on right\n useLayoutEffect(() => {\n if (!isVertical) return;\n const wrapper = wrapperRef.current;\n const el = outputRef.current;\n if (!wrapper || !el) return;\n const wrapperRect = wrapper.getBoundingClientRect();\n const tooltipWidth = el.offsetWidth;\n const thumbPx = getThumbSizePx();\n const gap = 8; // 0.5rem\n // Tooltip right edge if placed to the right of the thumb\n const tooltipRightEdge =\n wrapperRect.left +\n wrapperRect.width / 2 +\n thumbPx / 2 +\n gap +\n tooltipWidth;\n setVerticalFlippedLeft(tooltipRightEdge > window.innerWidth);\n });\n\n // Vertical wrapper style\n const wrapperStyle = isVertical\n ? ({\n height: 'var(--bulma-slider-vertical-height, 200px)',\n } as React.CSSProperties)\n : undefined;\n\n // Render ticks\n const renderTicks = () => {\n if (tickPositions.length === 0) return null;\n return (\n <div className={prefixedClassNames(classPrefix, 'slider-ticks')}>\n {tickPositions.map((tick, i) => {\n const pct = ((tick.value - min) / (max - min)) * 100;\n const posStyle = isVertical\n ? { bottom: `${pct}%` }\n : { left: `${pct}%` };\n const isEndpoint = tick.value === min || tick.value === max;\n return (\n <span\n key={i}\n className={prefixedClassNames(classPrefix, 'slider-tick', {\n 'is-endpoint': isEndpoint,\n })}\n style={posStyle}\n >\n {tick.label !== undefined && (\n <span\n className={prefixedClassNames(\n classPrefix,\n 'slider-tick-label'\n )}\n >\n {tick.label}\n </span>\n )}\n </span>\n );\n })}\n </div>\n );\n };\n\n const helpClass = usePrefixedClassNames('help', {\n [`is-${messageColor}`]: !!messageColor,\n });\n const messageEl = message ? <p className={helpClass}>{message}</p> : null;\n\n // --- Single slider ---\n const sliderElement = !range ? (\n <div ref={wrapperRef} className={combinedClasses} style={wrapperStyle}>\n <input\n ref={combinedRef}\n type=\"range\"\n min={min}\n max={max}\n step={step}\n value={currentSingle}\n disabled={disabled}\n onChange={handleSingleChange}\n onKeyDown={handleKeyDown}\n onMouseEnter={() => setShowTooltip(true)}\n onMouseLeave={() => setShowTooltip(false)}\n onFocus={() => setShowTooltip(true)}\n onBlur={() => setShowTooltip(false)}\n className={prefixedClassNames(classPrefix, 'slider-input')}\n style={\n {\n '--slider-progress': `${progressSingle}%`,\n } as React.CSSProperties\n }\n aria-valuenow={currentSingle}\n aria-valuemin={min}\n aria-valuemax={max}\n aria-orientation={isVertical ? 'vertical' : undefined}\n aria-label={ariaLabel as string | undefined}\n {...getAriaProps(currentSingle)}\n id={controlId}\n {...rest}\n />\n {tooltipMode !== 'hidden' && (\n <output\n ref={outputRef}\n className={prefixedClassNames(classPrefix, 'slider-output', {\n 'is-visible': showTipLow,\n 'is-flipped': flipped,\n 'is-flipped-left': isVertical && verticalFlippedLeft,\n })}\n style={\n isVertical\n ? ((verticalFlippedLeft\n ? {\n bottom: getThumbLeft(progressSingle),\n right: verticalTooltipOffset,\n left: 'auto',\n }\n : {\n bottom: getThumbLeft(progressSingle),\n left: verticalTooltipOffset,\n right: 'auto',\n }) as React.CSSProperties)\n : ({\n left: getThumbLeft(progressSingle),\n transform: `translateX(calc(-50% + ${nudgeX}px))`,\n '--slider-output-arrow-offset': `calc(50% - ${nudgeX}px)`,\n } as React.CSSProperties)\n }\n >\n {formatValue(currentSingle)}\n </output>\n )}\n {renderTicks()}\n </div>\n ) : (\n // --- Range slider ---\n <div ref={wrapperRef} className={combinedClasses} style={wrapperStyle}>\n {/* Visible track background */}\n <div\n className={prefixedClassNames(classPrefix, 'slider-track')}\n style={\n isVertical\n ? ({\n '--slider-progress-low': `${progressLow}%`,\n '--slider-progress-high': `${progressHigh}%`,\n } as React.CSSProperties)\n : ({\n '--slider-progress-low': `${progressLow}%`,\n '--slider-progress-high': `${progressHigh}%`,\n } as React.CSSProperties)\n }\n />\n {/* Low thumb. nameLow overrides any `name` from rest so each thumb has its own form field. */}\n <input\n ref={combinedRef}\n type=\"range\"\n min={min}\n max={max}\n step={step}\n value={currentRange[0]}\n disabled={disabled}\n onChange={handleRangeLowChange}\n onKeyDown={handleKeyDown}\n onMouseEnter={() => setShowTooltip(true)}\n onMouseLeave={() => setShowTooltip(false)}\n onFocus={() => setShowTooltip(true)}\n onBlur={() => setShowTooltip(false)}\n className={prefixedClassNames(\n classPrefix,\n 'slider-input',\n 'slider-input-low'\n )}\n aria-valuenow={currentRange[0]}\n aria-valuemin={min}\n aria-valuemax={max}\n aria-orientation={isVertical ? 'vertical' : undefined}\n aria-label={\n (ariaLabel as [string, string] | undefined)?.[0] ?? 'Minimum value'\n }\n {...getAriaProps(currentRange[0])}\n id={controlId}\n {...rest}\n {...(nameLow !== undefined ? { name: nameLow } : {})}\n />\n {/* High thumb */}\n <input\n ref={inputHighRef}\n type=\"range\"\n min={min}\n max={max}\n step={step}\n value={currentRange[1]}\n disabled={disabled}\n onChange={handleRangeHighChange}\n onMouseEnter={() => setShowTooltipHigh(true)}\n onMouseLeave={() => setShowTooltipHigh(false)}\n onFocus={() => setShowTooltipHigh(true)}\n onBlur={() => setShowTooltipHigh(false)}\n className={prefixedClassNames(\n classPrefix,\n 'slider-input',\n 'slider-input-high'\n )}\n aria-valuenow={currentRange[1]}\n aria-valuemin={min}\n aria-valuemax={max}\n aria-orientation={isVertical ? 'vertical' : undefined}\n aria-label={\n (ariaLabel as [string, string] | undefined)?.[1] ?? 'Maximum value'\n }\n {...getAriaProps(currentRange[1])}\n name={nameHigh}\n />\n {/* Low tooltip */}\n {tooltipMode !== 'hidden' && (\n <output\n ref={outputRef}\n className={prefixedClassNames(\n classPrefix,\n 'slider-output',\n 'slider-output-low',\n {\n 'is-visible': showTipLow,\n 'is-flipped': flipped,\n 'is-flipped-left': isVertical && verticalFlippedLeft,\n }\n )}\n style={\n isVertical\n ? ((verticalFlippedLeft\n ? {\n bottom: getThumbLeft(progressLow),\n right: verticalTooltipOffset,\n left: 'auto',\n }\n : {\n bottom: getThumbLeft(progressLow),\n left: verticalTooltipOffset,\n right: 'auto',\n }) as React.CSSProperties)\n : ({\n left: getThumbLeft(progressLow),\n transform: `translateX(calc(-50% + ${nudgeX}px))`,\n '--slider-output-arrow-offset': `calc(50% - ${nudgeX}px)`,\n } as React.CSSProperties)\n }\n >\n {formatValue(currentRange[0])}\n </output>\n )}\n {/* High tooltip */}\n {tooltipMode !== 'hidden' && (\n <output\n ref={outputHighRef}\n className={prefixedClassNames(\n classPrefix,\n 'slider-output',\n 'slider-output-high',\n {\n 'is-visible': showTipHigh,\n 'is-flipped': flippedHigh,\n 'is-flipped-left': isVertical && verticalFlippedLeft,\n }\n )}\n style={\n isVertical\n ? ((verticalFlippedLeft\n ? {\n bottom: getThumbLeft(progressHigh),\n right: verticalTooltipOffset,\n left: 'auto',\n }\n : {\n bottom: getThumbLeft(progressHigh),\n left: verticalTooltipOffset,\n right: 'auto',\n }) as React.CSSProperties)\n : ({\n left: getThumbLeft(progressHigh),\n transform: `translateX(calc(-50% + ${nudgeXHigh}px))`,\n '--slider-output-arrow-offset': `calc(50% - ${nudgeXHigh}px)`,\n } as React.CSSProperties)\n }\n >\n {formatValue(currentRange[1])}\n </output>\n )}\n {renderTicks()}\n </div>\n );\n\n let content = sliderElement;\n\n if (!insideControl) {\n content = <Control>{content}</Control>;\n }\n\n if (!insideField) {\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\nSlider.displayName = 'Slider';\n\nexport default Slider;\n","import React, { forwardRef, useState, useCallback, useRef } from 'react';\nimport type { JSX } from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { useInsideField } from './FormContext';\nimport { Field } from './Field';\nimport { FormFieldProps } from './fieldProps';\nimport { useAutoLabelId } from './useAutoLabelId';\n\n/** Valid sizes for the Numberinput component. */\nexport type NumberinputSize = 'small' | 'medium' | 'large';\n\n/** Valid colors for the Numberinput wrapper and control buttons. */\nexport type NumberinputColor =\n | 'primary'\n | 'link'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger'\n | 'light'\n | 'dark';\n\n/** Valid colors for the Numberinput inner input element. */\nexport type NumberinputInputColor =\n 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n\n/** Position of the increment/decrement control buttons. */\nexport type NumberinputControlsPosition = 'left' | 'right' | 'both';\n\n/** Visual variant for the Numberinput controls. */\nexport type NumberinputVariant = 'plusminus' | 'stepper';\n\n/**\n * Props for the Numberinput component.\n * @extraProp {string} [className] - Additional CSS classes.\n * @extraProp {React.Ref<HTMLElement>} [ref] - Ref forwarded to the input element.\n */\nexport interface NumberinputProps\n extends\n Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n 'color' | 'size' | 'onChange' | 'value' | 'defaultValue' | 'type'\n >,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'size'>,\n FormFieldProps {\n /** Field label. Automatically associated with the number input via `htmlFor` — uses your `id` when provided, otherwise a generated one. Not wired when no Field wrapper is rendered (inside a `Field`, or plusminus `bare`). */\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 /** Controlled value. */\n value?: number;\n /** Default value for uncontrolled usage. */\n defaultValue?: number;\n /** Minimum allowed value. */\n min?: number;\n /** Maximum allowed value. */\n max?: number;\n /** Step increment (default: 1). */\n step?: number;\n /** Size variant. */\n size?: NumberinputSize;\n /** Color variant for buttons. */\n color?: NumberinputColor;\n /** Color of the input field itself. */\n inputColor?: NumberinputInputColor;\n /** Position of +/- buttons. */\n controlsPosition?: NumberinputControlsPosition;\n /** Use rounded buttons. */\n controlsRounded?: boolean;\n /** Uses compact button spacing. */\n compact?: boolean;\n /** Removes button borders and background. */\n bare?: boolean;\n /** Style variant for the control buttons. */\n variant?: NumberinputVariant;\n /** Whether the input is disabled. */\n disabled?: boolean;\n /** Whether the input can be typed in. */\n editable?: boolean;\n /** Shows a loading state. */\n isLoading?: boolean;\n /** Enables exponential step increments when holding buttons. */\n exponential?: boolean;\n /** Callback when value changes. */\n onChange?: (value: number) => void;\n}\n\nconst ArrowDropUp = () => (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M7 14.5l5-5 5 5\" />\n </svg>\n);\n\nconst ArrowDropDown = () => (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M7 9.5l5 5 5-5\" />\n </svg>\n);\n\n/**\n * The `Numberinput` component provides a number input with increment/decrement buttons.\n *\n * @function\n * @param {NumberinputProps} props - Props for the Numberinput component.\n * @returns {JSX.Element} The rendered numeric input element.\n *\n * @example\n * // Basic number input\n * <Numberinput defaultValue={5} min={0} max={100} />\n *\n * @example\n * // Stepper variant with color\n * <Numberinput variant=\"stepper\" color=\"primary\" step={10} />\n */\nexport const Numberinput = forwardRef<HTMLInputElement, NumberinputProps>(\n (\n {\n // Field props\n label,\n labelSize,\n labelProps,\n horizontal,\n message,\n messageColor,\n fieldClassName,\n value: controlledValue,\n defaultValue,\n min,\n max,\n step = 1,\n size,\n color,\n inputColor,\n controlsPosition = 'both',\n controlsRounded = false,\n compact = false,\n bare,\n variant = 'plusminus',\n disabled = false,\n editable = true,\n isLoading = false,\n exponential = false,\n onChange,\n className,\n ...props\n },\n ref\n ) => {\n const insideField = useInsideField();\n const effectiveBare = bare ?? insideField;\n const { bulmaHelperClasses, rest } = useBulmaClasses(props);\n const [internalValue, setInternalValue] = useState<number | undefined>(\n defaultValue\n );\n const inputRef = useRef<HTMLInputElement>(null);\n\n // Determine if controlled\n const isControlled = controlledValue !== undefined;\n const currentValue = isControlled ? controlledValue : internalValue;\n\n // Layout mode\n const isStepper = variant === 'stepper';\n const isAddons = compact || isStepper;\n const effectiveControlsPosition = isStepper ? 'right' : controlsPosition;\n\n // The plusminus bare branch renders no Field and no label at all.\n const { controlId, fieldLabelProps } = useAutoLabelId({\n label,\n id: props.id,\n labelProps,\n rendersLabel: !insideField && (isStepper || !effectiveBare),\n });\n\n // Clamp value to min/max\n const clampValue = useCallback(\n (val: number): number => {\n let clamped = val;\n if (min !== undefined && clamped < min) clamped = min;\n if (max !== undefined && clamped > max) clamped = max;\n return clamped;\n },\n [min, max]\n );\n\n // Update value\n const updateValue = useCallback(\n (newValue: number) => {\n const clampedValue = clampValue(newValue);\n if (!isControlled) {\n setInternalValue(clampedValue);\n }\n onChange?.(clampedValue);\n },\n [isControlled, clampValue, onChange]\n );\n\n // Exponential step: step grows with value magnitude\n const getEffectiveStep = useCallback(() => {\n if (!exponential) return step;\n return step * Math.max(1, Math.floor(Math.abs(currentValue ?? 0)));\n }, [exponential, step, currentValue]);\n\n // Handle increment\n const handleIncrement = useCallback(() => {\n updateValue((currentValue ?? 0) + getEffectiveStep());\n }, [currentValue, getEffectiveStep, updateValue]);\n\n // Handle decrement\n const handleDecrement = useCallback(() => {\n updateValue((currentValue ?? 0) - getEffectiveStep());\n }, [currentValue, getEffectiveStep, updateValue]);\n\n // Handle input change\n const handleInputChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = parseFloat(e.target.value);\n if (!isNaN(newValue)) {\n updateValue(newValue);\n }\n },\n [updateValue]\n );\n\n // Handle keyboard\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'ArrowUp') {\n e.preventDefault();\n handleIncrement();\n } else if (e.key === 'ArrowDown') {\n e.preventDefault();\n handleDecrement();\n }\n },\n [handleIncrement, handleDecrement]\n );\n\n // Check if at limits\n const isAtMin =\n min !== undefined && currentValue !== undefined && currentValue <= min;\n const isAtMax =\n max !== undefined && currentValue !== undefined && currentValue >= max;\n\n // Generate classes\n const fieldClasses = usePrefixedClassNames('field', {\n 'is-grouped': !isAddons,\n 'has-addons': isAddons,\n });\n\n const numberinputClasses = usePrefixedClassNames('numberinput', {\n 'is-compact': isAddons,\n 'is-stepper': isStepper,\n [`is-${size}`]: !!size,\n 'is-disabled': disabled,\n [`controls-${effectiveControlsPosition}`]:\n effectiveControlsPosition !== 'both',\n });\n\n const controlClasses = usePrefixedClassNames('control');\n const expandedControlClasses = usePrefixedClassNames('control', {\n 'is-expanded': true,\n 'is-loading': isLoading,\n });\n\n const buttonClasses = usePrefixedClassNames('button', {\n [`is-${size}`]: !!size,\n [`is-${color}`]: !!color,\n 'is-rounded': controlsRounded,\n });\n\n const inputClasses = usePrefixedClassNames('input', {\n [`is-${size}`]: !!size,\n [`is-${inputColor}`]: !!inputColor,\n });\n\n const iconClasses = usePrefixedClassNames('icon', 'is-small');\n const stepperClasses = usePrefixedClassNames('numberinput-stepper');\n const stepperButtonClasses = usePrefixedClassNames(\n 'numberinput-stepper-button'\n );\n\n const combinedClasses = classNames(\n fieldClasses,\n numberinputClasses,\n bulmaHelperClasses,\n className\n );\n\n const helpClass = usePrefixedClassNames('help', {\n [`is-${messageColor}`]: !!messageColor,\n });\n const messageEl = message ? <p className={helpClass}>{message}</p> : null;\n\n // Use combined ref\n const combinedRef = (node: HTMLInputElement | null) => {\n (inputRef as React.MutableRefObject<HTMLInputElement | null>).current =\n node;\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref) {\n (ref as React.MutableRefObject<HTMLInputElement | null>).current = node;\n }\n };\n\n // Shared input element\n const inputControl = (\n <div className={expandedControlClasses}>\n <input\n ref={combinedRef}\n type=\"number\"\n className={inputClasses}\n value={currentValue ?? ''}\n min={min}\n max={max}\n step={step}\n disabled={disabled}\n readOnly={!editable}\n onChange={handleInputChange}\n onKeyDown={handleKeyDown}\n aria-valuenow={currentValue ?? undefined}\n aria-valuemin={min}\n aria-valuemax={max}\n id={controlId}\n {...rest}\n />\n </div>\n );\n\n // Stepper variant\n if (isStepper) {\n const stepperElement = (\n <div className={combinedClasses}>\n {inputControl}\n <div className={controlClasses}>\n <div className={stepperClasses}>\n <button\n type=\"button\"\n className={stepperButtonClasses}\n onClick={handleIncrement}\n disabled={disabled || isAtMax}\n tabIndex={-1}\n aria-label=\"Increase value\"\n >\n <ArrowDropUp />\n </button>\n <button\n type=\"button\"\n className={stepperButtonClasses}\n onClick={handleDecrement}\n disabled={disabled || isAtMin}\n tabIndex={-1}\n aria-label=\"Decrease value\"\n >\n <ArrowDropDown />\n </button>\n </div>\n </div>\n </div>\n );\n\n if (!insideField) {\n return (\n <Field\n label={label}\n labelSize={labelSize}\n labelProps={fieldLabelProps}\n horizontal={horizontal}\n className={fieldClassName}\n >\n {stepperElement}\n {messageEl}\n </Field>\n );\n }\n\n return (\n <>\n {stepperElement}\n {messageEl}\n </>\n );\n }\n\n // Plusminus buttons\n const decrementButton = (\n <button\n type=\"button\"\n className={buttonClasses}\n onClick={handleDecrement}\n disabled={disabled || isAtMin}\n tabIndex={-1}\n aria-label=\"Decrease value\"\n >\n <span className={iconClasses}>\n <span aria-hidden=\"true\">−</span>\n </span>\n </button>\n );\n\n const incrementButton = (\n <button\n type=\"button\"\n className={buttonClasses}\n onClick={handleIncrement}\n disabled={disabled || isAtMax}\n tabIndex={-1}\n aria-label=\"Increase value\"\n >\n <span className={iconClasses}>\n <span aria-hidden=\"true\">+</span>\n </span>\n </button>\n );\n\n const decrementControl = (\n <div className={controlClasses}>{decrementButton}</div>\n );\n const incrementControl = (\n <div className={controlClasses}>{incrementButton}</div>\n );\n\n // Bare mode: no outer .field wrapper, for composing inside a parent Field\n if (effectiveBare) {\n const bareClasses = classNames(\n numberinputClasses,\n bulmaHelperClasses,\n className\n );\n\n if (effectiveControlsPosition === 'left') {\n return (\n <div className={bareClasses} style={{ display: 'contents' }}>\n {decrementControl}\n {incrementControl}\n {inputControl}\n </div>\n );\n }\n\n if (effectiveControlsPosition === 'right') {\n return (\n <div className={bareClasses} style={{ display: 'contents' }}>\n {inputControl}\n {decrementControl}\n {incrementControl}\n </div>\n );\n }\n\n return (\n <div className={bareClasses} style={{ display: 'contents' }}>\n {decrementControl}\n {inputControl}\n {incrementControl}\n </div>\n );\n }\n\n // Controls left: [−] [+] [input]\n let numberinputElement: JSX.Element;\n if (effectiveControlsPosition === 'left') {\n numberinputElement = (\n <div className={combinedClasses}>\n {decrementControl}\n {incrementControl}\n {inputControl}\n </div>\n );\n } else if (effectiveControlsPosition === 'right') {\n // Controls right: [input] [−] [+]\n numberinputElement = (\n <div className={combinedClasses}>\n {inputControl}\n {decrementControl}\n {incrementControl}\n </div>\n );\n } else {\n // Both sides (default): [−] [input] [+]\n numberinputElement = (\n <div className={combinedClasses}>\n {decrementControl}\n {inputControl}\n {incrementControl}\n </div>\n );\n }\n\n if (!insideField) {\n return (\n <Field\n label={label}\n labelSize={labelSize}\n labelProps={fieldLabelProps}\n horizontal={horizontal}\n className={fieldClassName}\n >\n {numberinputElement}\n {messageEl}\n </Field>\n );\n }\n\n return (\n <>\n {numberinputElement}\n {messageEl}\n </>\n );\n }\n);\n\nNumberinput.displayName = 'Numberinput';\n\n/** @deprecated Use `Numberinput` — same component. */\nexport const NumberInput = Numberinput;\n\n/** @deprecated Use `NumberinputProps`. */\nexport type NumberInputProps = NumberinputProps;\n\nexport default Numberinput;\n","import React, { forwardRef, useState, useCallback } from 'react';\nimport {\n classNames,\n prefixedClassNames,\n usePrefixedClassNames,\n} from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { Icon } from '../elements/Icon';\nimport { useClassPrefix, useIconLibrary } from '../helpers/Config';\nimport { useInsideField, useInsideControl } from './FormContext';\nimport { Field } from './Field';\nimport { Control } from './Control';\nimport { FormFieldProps } from './fieldProps';\nimport { useAutoLabelledBy } from './useAutoLabelId';\n\n/** Available size modifiers for the Rate component. */\nexport type RateSize = 'small' | 'medium' | 'large';\ntype IconLibrary = 'fa' | 'mdi' | 'ion' | 'material-icons' | 'material-symbols';\ntype BulmaColor =\n 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n\n/**\n * Props for individual rate icons.\n */\nexport interface RateIconProps {\n /** The index of this icon (0-based) */\n index: number;\n /** Whether this icon is currently active (filled) */\n isActive: boolean;\n /** Whether this icon is currently hovered */\n isHovered: boolean;\n /** The current value */\n value: number;\n /** Fill percentage for partial icons (0-100). Used with precision < 1. */\n fillPercent: number;\n}\n\n/**\n * Props for the Rate component.\n * @extraProp {string} [className] - Additional CSS classes.\n * @extraProp {React.Ref<HTMLElement>} [ref] - Ref forwarded to the container element.\n */\nexport interface RateProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'color'>,\n Omit<BulmaClassesProps, 'size'>,\n FormFieldProps {\n /** Field label naming the rating group. Automatically associated via `aria-labelledby` on the `role=\"radiogroup\"` container — uses your `labelProps.id` when provided, otherwise a generated one; it also replaces the default `aria-label=\"Rating\"`. Dropped inside an outer `Field` (label that `Field` yourself). */\n label?: React.ReactNode;\n /** Props for the label element. An explicit `id` here is used as the `aria-labelledby` target instead of a generated one; any `htmlFor` is ignored (a group label names the group, never a single control). */\n labelProps?: React.LabelHTMLAttributes<HTMLLabelElement> & {\n [key: string]: unknown;\n };\n /** Form field name. When set, a hidden input is rendered. */\n name?: string;\n /** Optional id of the form this hidden input belongs to (use when the input lives outside the form element). */\n form?: string;\n /** Controlled value (0 to max). */\n value?: number;\n /** Default value for uncontrolled usage. */\n defaultValue?: number;\n /** Maximum rating value. */\n max?: number;\n /** Size variant. */\n size?: RateSize;\n /** Whether the rating is disabled. */\n disabled?: boolean;\n /** Show the numeric score next to stars. */\n showScore?: boolean;\n /** Show custom text based on value. */\n showText?: boolean;\n /** Array of text labels for each rating value. */\n texts?: string[];\n /** Callback when rating changes. */\n onChange?: (value: number) => void;\n /** Custom icon renderer. */\n customIcon?: (props: RateIconProps) => React.ReactNode;\n /** Add spacing between icons. */\n spaced?: boolean;\n /** Right-to-left direction. */\n rtl?: boolean;\n /** Custom icon name for the rating stars. */\n iconName?: string;\n /** Icon library to use (defaults to ConfigProvider value or 'fa'). */\n iconLibrary?: IconLibrary;\n /** Icon style variant (e.g., 'solid', 'outlined'). */\n iconVariant?: string;\n /** Additional icon modifiers. */\n iconFeatures?: string | string[];\n /** Color of the active rating icons. */\n color?: BulmaColor;\n /** Rating precision (e.g., `0.5` for half stars). */\n precision?: number;\n /** Custom text displayed next to the rating. */\n customText?: string;\n}\n\n/**\n * Default star icon component.\n */\nconst StarIcon: React.FC<{ filled: boolean }> = ({ filled }) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill={filled ? 'currentColor' : 'none'}\n stroke=\"currentColor\"\n strokeWidth={filled ? 0 : 2}\n aria-hidden=\"true\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z\"\n />\n </svg>\n);\n\n/** Snap a value to the nearest precision step. */\nfunction snapToPrecision(val: number, precision: number): number {\n return Math.round(val / precision) * precision;\n}\n\n/** Get fill percentage for a given icon index based on current value. */\nfunction getFillPercent(iconIndex: number, value: number): number {\n if (value >= iconIndex + 1) return 100;\n if (value <= iconIndex) return 0;\n return Math.round((value - iconIndex) * 100);\n}\n\n/**\n * The `Rate` component provides a star/icon-based rating system.\n *\n * @function\n * @param {RateProps} props - Props for the Rate component.\n * @param {React.Ref<HTMLDivElement>} ref - Forwarded ref to the container element.\n * @returns {JSX.Element} The rendered rating component.\n *\n * @example\n * // Basic 5-star rating\n * <Rate defaultValue={3} />\n *\n * @example\n * // With color and precision\n * <Rate defaultValue={3.5} color=\"warning\" precision={0.5} showScore />\n *\n * @example\n * // With Font Awesome icons\n * <Rate iconName=\"star\" iconLibrary=\"fa\" iconVariant=\"solid\" />\n */\nexport const Rate = forwardRef<HTMLDivElement, RateProps>(\n (\n {\n label,\n labelSize,\n labelProps,\n horizontal,\n message,\n messageColor,\n fieldClassName,\n value: controlledValue,\n defaultValue = 0,\n max = 5,\n size,\n disabled = false,\n showScore = false,\n showText = false,\n texts,\n onChange,\n customIcon,\n spaced = false,\n rtl = false,\n iconName,\n iconLibrary: iconLibraryProp,\n iconVariant,\n iconFeatures,\n color,\n precision = 1,\n customText,\n name,\n form,\n className,\n ...props\n },\n ref\n ) => {\n const insideField = useInsideField();\n const insideControl = useInsideControl();\n const { ariaLabelledBy, fieldLabelProps } = useAutoLabelledBy({\n label,\n labelProps,\n rendersLabel: !insideField,\n });\n const { bulmaHelperClasses, rest } = useBulmaClasses(props);\n const [internalValue, setInternalValue] = useState(defaultValue);\n const [hoverValue, setHoverValue] = useState<number | null>(null);\n\n const defaultIconLibrary = useIconLibrary();\n const resolvedLibrary = iconLibraryProp || defaultIconLibrary || 'fa';\n\n // Determine if controlled\n const isControlled = controlledValue !== undefined;\n const currentValue = isControlled ? controlledValue : internalValue;\n const displayValue = hoverValue !== null ? hoverValue : currentValue;\n\n // Update value\n const updateValue = useCallback(\n (newValue: number) => {\n if (disabled) return;\n\n // Allow clicking same value to deselect (set to 0)\n const finalValue = newValue === currentValue ? 0 : newValue;\n\n if (!isControlled) {\n setInternalValue(finalValue);\n }\n onChange?.(finalValue);\n },\n [isControlled, currentValue, disabled, onChange]\n );\n\n // Handle click with precision support\n const handleClick = useCallback(\n (iconIndex: number, e: React.MouseEvent<HTMLSpanElement>) => {\n if (disabled) return;\n\n if (precision < 1) {\n const rect = e.currentTarget.getBoundingClientRect();\n let relativeX = (e.clientX - rect.left) / rect.width;\n if (rtl) relativeX = 1 - relativeX;\n const rawValue = iconIndex + relativeX;\n const snapped = snapToPrecision(rawValue, precision);\n const clamped = Math.max(precision, Math.min(snapped, max));\n updateValue(clamped);\n } else {\n updateValue(iconIndex + 1);\n }\n },\n [disabled, precision, rtl, max, updateValue]\n );\n\n // Handle mouse enter on icon\n const handleMouseEnter = useCallback(\n (iconIndex: number) => {\n if (disabled) return;\n setHoverValue(iconIndex + 1);\n },\n [disabled]\n );\n\n // Handle mouse move with precision support\n const handleMouseMove = useCallback(\n (iconIndex: number, e: React.MouseEvent<HTMLSpanElement>) => {\n if (disabled || precision >= 1) return;\n const rect = e.currentTarget.getBoundingClientRect();\n let relativeX = (e.clientX - rect.left) / rect.width;\n if (rtl) relativeX = 1 - relativeX;\n const rawValue = iconIndex + relativeX;\n const snapped = snapToPrecision(rawValue, precision);\n const clamped = Math.max(precision, Math.min(snapped, max));\n setHoverValue(clamped);\n },\n [disabled, precision, rtl, max]\n );\n\n // Handle mouse leave\n const handleMouseLeave = useCallback(() => {\n setHoverValue(null);\n }, []);\n\n // Handle keyboard\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (disabled) return;\n\n let newValue = currentValue;\n const step = precision < 1 ? precision : 1;\n\n if (e.key === 'ArrowRight' || e.key === 'ArrowUp') {\n e.preventDefault();\n newValue = Math.min(currentValue + step, max);\n } else if (e.key === 'ArrowLeft' || e.key === 'ArrowDown') {\n e.preventDefault();\n newValue = Math.max(currentValue - step, 0);\n } else if (e.key === 'Home') {\n e.preventDefault();\n newValue = 0;\n } else if (e.key === 'End') {\n e.preventDefault();\n newValue = max;\n }\n\n // Round to avoid floating point issues\n newValue = Math.round(newValue * 1000) / 1000;\n\n if (newValue !== currentValue) {\n if (!isControlled) {\n setInternalValue(newValue);\n }\n onChange?.(newValue);\n }\n },\n [currentValue, max, precision, disabled, isControlled, onChange]\n );\n\n // Get text for current value\n const getText = () => {\n if (!showText || !texts) return null;\n const wholeIndex = Math.ceil(displayValue) - 1;\n const baseText = texts[wholeIndex] || null;\n if (!baseText) return null;\n // For fractional hover values with precision < 1, append \"+\"\n if (precision < 1 && hoverValue !== null && hoverValue % 1 !== 0) {\n return `${baseText}+`;\n }\n return baseText;\n };\n\n // Format score display\n const getScoreDisplay = () => {\n if (precision < 1 && currentValue % 1 !== 0) {\n return currentValue.toFixed(1);\n }\n return currentValue;\n };\n\n // Generate classes\n const classPrefix = useClassPrefix();\n const rateClasses = usePrefixedClassNames('rate', {\n [`is-${size}`]: size,\n 'is-disabled': disabled,\n 'is-spaced': spaced,\n 'is-rtl': rtl,\n [`is-${color}`]: color,\n });\n\n const combinedClasses = classNames(\n rateClasses,\n bulmaHelperClasses,\n className\n );\n\n // Render a single icon based on priority: customIcon > iconName > default SVG\n const renderIcon = (\n iconIndex: number,\n isActive: boolean,\n fillPercent: number\n ) => {\n const iconProps: RateIconProps = {\n index: iconIndex,\n isActive,\n isHovered: hoverValue !== null && iconIndex < hoverValue,\n value: displayValue,\n fillPercent,\n };\n\n if (customIcon) {\n return customIcon(iconProps);\n }\n\n if (iconName) {\n return (\n <Icon\n name={iconName}\n library={resolvedLibrary}\n variant={iconVariant}\n features={iconFeatures}\n />\n );\n }\n\n return <StarIcon filled={isActive} />;\n };\n\n // Render partial icon with layered approach\n const renderPartialIcon = (iconIndex: number, fillPercent: number) => {\n if (customIcon) {\n // For custom icons, pass fillPercent and let consumer handle it\n const iconProps: RateIconProps = {\n index: iconIndex,\n isActive: fillPercent > 0,\n isHovered: hoverValue !== null && iconIndex < (hoverValue ?? 0),\n value: displayValue,\n fillPercent,\n };\n return customIcon(iconProps);\n }\n\n if (iconName) {\n return (\n <span\n className={prefixedClassNames(classPrefix, 'rate-icon-partial')}\n style={\n {\n '--rate-fill-percent': `${fillPercent}%`,\n } as React.CSSProperties\n }\n >\n <span className={prefixedClassNames(classPrefix, 'rate-icon-bg')}>\n <Icon\n name={iconName}\n library={resolvedLibrary}\n variant={iconVariant}\n features={iconFeatures}\n />\n </span>\n <span className={prefixedClassNames(classPrefix, 'rate-icon-fg')}>\n <Icon\n name={iconName}\n library={resolvedLibrary}\n variant={iconVariant}\n features={iconFeatures}\n />\n </span>\n </span>\n );\n }\n\n // Default SVG with clipPath for partial fill\n const clipId = `rate-clip-${iconIndex}`;\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n aria-hidden=\"true\"\n >\n <defs>\n <clipPath id={clipId}>\n <rect\n x=\"0\"\n y=\"0\"\n width={`${(fillPercent / 100) * 24}`}\n height=\"24\"\n />\n </clipPath>\n </defs>\n {/* Background: empty star */}\n <path\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z\"\n />\n {/* Foreground: filled portion */}\n <path\n clipPath={`url(#${clipId})`}\n fill=\"currentColor\"\n d=\"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z\"\n />\n </svg>\n );\n };\n\n // Render icons\n const renderIcons = () => {\n const icons = [];\n\n for (let i = 0; i < max; i++) {\n const iconIndex = rtl ? max - 1 - i : i;\n const fillPercent = getFillPercent(iconIndex, displayValue);\n const isActive = fillPercent === 100;\n const isHovered = hoverValue !== null && iconIndex < hoverValue;\n const isPartial = fillPercent > 0 && fillPercent < 100;\n\n const icon = isPartial\n ? renderPartialIcon(iconIndex, fillPercent)\n : renderIcon(iconIndex, isActive, fillPercent);\n\n icons.push(\n <span\n key={iconIndex}\n className={prefixedClassNames(classPrefix, 'rate-item', {\n 'is-active': isActive,\n 'is-hovered': isHovered,\n })}\n onClick={e => handleClick(iconIndex, e)}\n onMouseEnter={() => handleMouseEnter(iconIndex)}\n onMouseMove={e => handleMouseMove(iconIndex, e)}\n onMouseLeave={handleMouseLeave}\n role=\"radio\"\n aria-checked={\n currentValue === iconIndex + 1 ||\n (precision < 1 &&\n currentValue > iconIndex &&\n currentValue <= iconIndex + 1)\n }\n aria-label={`${iconIndex + 1} star${iconIndex === 0 ? '' : 's'}`}\n tabIndex={-1}\n >\n {icon}\n </span>\n );\n }\n\n return icons;\n };\n\n const text = getText();\n const ariaValueText =\n precision < 1 && currentValue % 1 !== 0\n ? `${currentValue.toFixed(1)} out of ${max} stars`\n : undefined;\n\n const helpClass = usePrefixedClassNames('help', {\n [`is-${messageColor}`]: !!messageColor,\n });\n const messageEl = message ? <p className={helpClass}>{message}</p> : null;\n\n const rateItemsClass = usePrefixedClassNames('rate-items');\n const rateScoreClass = usePrefixedClassNames('rate-score');\n const rateTextClass = usePrefixedClassNames('rate-text');\n const rateCustomTextClass = usePrefixedClassNames('rate-custom-text');\n\n const rateElement = (\n <div\n ref={ref}\n className={combinedClasses}\n role=\"radiogroup\"\n // Fallback name only: a wired label names the group via labelledby.\n aria-label={ariaLabelledBy ? undefined : 'Rating'}\n aria-labelledby={ariaLabelledBy}\n aria-valuenow={currentValue}\n aria-valuemin={0}\n aria-valuemax={max}\n aria-valuetext={ariaValueText}\n tabIndex={disabled ? -1 : 0}\n onKeyDown={handleKeyDown}\n {...rest}\n >\n <div className={rateItemsClass}>{renderIcons()}</div>\n {showScore && (\n <span className={rateScoreClass}>{getScoreDisplay()}</span>\n )}\n {text && <span className={rateTextClass}>{text}</span>}\n {customText && (\n <span className={rateCustomTextClass}>{customText}</span>\n )}\n {name && (\n <input type=\"hidden\" name={name} value={currentValue} form={form} />\n )}\n </div>\n );\n\n let content = rateElement;\n\n if (!insideControl) {\n content = <Control>{content}</Control>;\n }\n\n if (!insideField) {\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\nRate.displayName = 'Rate';\n\nexport default Rate;\n","import React, {\n forwardRef,\n useState,\n useRef,\n useEffect,\n useCallback,\n} from 'react';\nimport {\n classNames,\n usePrefixedClassNames,\n prefixedClassNames,\n} from '../helpers/classNames';\nimport { useConfig } from '../helpers/Config';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { useInsideField } from './FormContext';\nimport { Field } from './Field';\nimport { FormFieldProps } from './fieldProps';\nimport { useAutoLabelId } from './useAutoLabelId';\n\n/**\n * An item in the Autocomplete dropdown list.\n */\nexport interface AutocompleteItem {\n /** The value used for filtering and selection. */\n value: string;\n /** Display label (optional). */\n label?: string;\n /** Whether the item is disabled and unselectable. */\n disabled?: boolean;\n [key: string]: unknown;\n}\n\n/**\n * Props for the Autocomplete component.\n * @extraProp {string} [className] - Additional CSS classes.\n * @extraProp {React.Ref<HTMLInputElement>} [ref] - Ref forwarded to the input element.\n */\nexport interface AutocompleteProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect' | 'onInput'>,\n Omit<BulmaClassesProps, 'color'>,\n FormFieldProps {\n /** Field label. Automatically associated with the text input via `htmlFor` — uses your `id` when provided, otherwise a generated one. Dropped inside an outer `Field` (label that `Field` yourself). */\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 inner text input (the labellable control), not the wrapper div. */\n id?: string;\n /** The options data to display (required). */\n data: AutocompleteItem[] | string[];\n /** The current input value (controlled). */\n value?: string;\n /** The selected item (controlled). */\n selected?: AutocompleteItem | string | null;\n /** Placeholder text for the input. */\n placeholder?: string;\n /** Object property to use as the display field. */\n field?: string;\n /** Whether to show a clear button. */\n clearable?: boolean;\n /** Open dropdown when input is focused. */\n openOnFocus?: boolean;\n /** Keep first option highlighted. */\n keepFirst?: boolean;\n /** Keep dropdown open after selection. */\n keepOpen?: boolean;\n /** Select highlighted item on click outside. */\n selectOnClickOutside?: boolean;\n /** Maximum dropdown height in pixels. */\n maxHeight?: number;\n /** Render as dropdown style. */\n dropdown?: boolean;\n /** Show loading state. */\n loading?: boolean;\n /** Whether the input is disabled. */\n disabled?: boolean;\n /** Enables infinite scroll detection in the dropdown. */\n checkInfiniteScroll?: boolean;\n /** Distance in pixels from the bottom to trigger `onInfiniteScroll`. */\n infiniteScrollDistance?: number;\n /** Input color variant. */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Size variant. */\n size?: 'small' | 'medium' | 'large';\n /** Form field name. Forwarded to the inner `<input>`. */\n name?: string;\n /** Optional id of the form the input belongs to. */\n form?: string;\n /** Marks the field as required for native HTML form validation. */\n required?: boolean;\n /** Callback when input value changes. */\n onInput?: (value: string) => void;\n /** Callback when item is selected. */\n onSelect?: (item: AutocompleteItem | string | null) => void;\n /** Callback when dropdown active state changes. */\n onActiveChange?: (active: boolean) => void;\n /** Callback when scrolled to bottom (infinite scroll). */\n onInfiniteScroll?: () => void;\n /** Custom render for items. */\n itemTemplate?: (item: AutocompleteItem | string) => React.ReactNode;\n /** Custom header in dropdown. */\n header?: React.ReactNode;\n /** Custom footer in dropdown. */\n footer?: React.ReactNode;\n /** Content to show when no results. */\n empty?: React.ReactNode;\n}\n\n/**\n * The `Autocomplete` component provides an input field with dropdown suggestions that filter based on user input.\n *\n * @function\n * @param {AutocompleteProps} props - Props for the Autocomplete component.\n * @param {React.Ref<HTMLInputElement>} ref - Forwarded ref to the input element.\n * @returns {JSX.Element} The rendered autocomplete component.\n *\n * @example\n * // Basic usage with string array\n * <Autocomplete\n * data={['Apple', 'Banana', 'Cherry']}\n * placeholder=\"Search fruit...\"\n * onSelect={(item) => console.log(item)}\n * />\n *\n * @example\n * // With object data\n * <Autocomplete\n * data={[{ value: '1', label: 'Option 1' }, { value: '2', label: 'Option 2' }]}\n * field=\"label\"\n * onSelect={(item) => console.log(item)}\n * />\n */\nexport const Autocomplete = forwardRef<HTMLInputElement, AutocompleteProps>(\n (\n {\n data = [],\n value: controlledValue,\n placeholder,\n field = 'label',\n clearable = false,\n openOnFocus = false,\n keepFirst = false,\n keepOpen = false,\n selectOnClickOutside = false,\n maxHeight = 200,\n loading = false,\n disabled = false,\n checkInfiniteScroll = false,\n infiniteScrollDistance = 50,\n color,\n size,\n onInput,\n onSelect,\n onActiveChange,\n onInfiniteScroll,\n itemTemplate,\n header,\n footer,\n empty,\n name,\n form,\n required,\n id,\n // Field props\n label,\n labelSize,\n labelProps,\n horizontal,\n message,\n messageColor,\n fieldClassName,\n className,\n ...props\n },\n ref\n ) => {\n const insideField = useInsideField();\n const { controlId, fieldLabelProps } = useAutoLabelId({\n label,\n id,\n labelProps,\n rendersLabel: !insideField,\n });\n const { bulmaHelperClasses, rest } = useBulmaClasses(props);\n const { classPrefix } = useConfig();\n const containerRef = useRef<HTMLDivElement>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const dropdownRef = useRef<HTMLDivElement>(null);\n\n const [internalValue, setInternalValue] = useState('');\n const [isActive, setIsActive] = useState(false);\n const [highlightedIndex, setHighlightedIndex] = useState(-1);\n\n // Use controlled or internal value\n const inputValue =\n controlledValue !== undefined ? controlledValue : internalValue;\n\n // Get display value from item\n const getDisplayValue = (item: AutocompleteItem | string): string => {\n if (typeof item === 'string') return item;\n const fieldValue = item[field];\n if (typeof fieldValue === 'string') return fieldValue;\n return item.value || '';\n };\n\n // Filter data based on input\n const filteredData = data.filter(item => {\n const displayValue = getDisplayValue(item);\n return displayValue.toLowerCase().includes(inputValue.toLowerCase());\n });\n\n // Handle input change\n const handleInputChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = e.target.value;\n if (controlledValue === undefined) {\n setInternalValue(newValue);\n }\n onInput?.(newValue);\n if (!isActive && newValue) {\n setIsActive(true);\n }\n },\n [controlledValue, isActive, onInput]\n );\n\n // Handle item selection\n const handleSelect = useCallback(\n (item: AutocompleteItem | string) => {\n if (typeof item !== 'string' && item.disabled) return;\n\n const displayValue = getDisplayValue(item);\n if (controlledValue === undefined) {\n setInternalValue(displayValue);\n }\n onInput?.(displayValue);\n onSelect?.(item);\n\n if (!keepOpen) {\n setIsActive(false);\n }\n setHighlightedIndex(-1);\n },\n [controlledValue, field, keepOpen, onInput, onSelect]\n );\n\n // Handle clear\n const handleClear = useCallback(() => {\n if (controlledValue === undefined) {\n setInternalValue('');\n }\n onInput?.('');\n onSelect?.(null);\n inputRef.current?.focus();\n }, [controlledValue, onInput, onSelect]);\n\n // Handle focus\n const handleFocus = useCallback(() => {\n if (openOnFocus && !disabled) {\n setIsActive(true);\n }\n }, [openOnFocus, disabled]);\n\n // Handle blur (click outside)\n useEffect(() => {\n if (!isActive) return undefined;\n\n const handleClickOutside = (e: MouseEvent) => {\n if (!containerRef.current) return;\n\n // Use composedPath() to correctly detect clicks inside Shadow DOM\n const path = e.composedPath();\n const isInside = path.includes(containerRef.current);\n\n if (!isInside) {\n if (selectOnClickOutside && highlightedIndex >= 0) {\n handleSelect(filteredData[highlightedIndex]);\n }\n setIsActive(false);\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n return () =>\n document.removeEventListener('mousedown', handleClickOutside);\n }, [\n isActive,\n selectOnClickOutside,\n highlightedIndex,\n filteredData,\n handleSelect,\n ]);\n\n // Notify active state change\n useEffect(() => {\n onActiveChange?.(isActive);\n }, [isActive, onActiveChange]);\n\n // Keep first highlighted\n useEffect(() => {\n if (keepFirst && isActive && filteredData.length > 0) {\n setHighlightedIndex(0);\n }\n }, [keepFirst, isActive, filteredData.length, inputValue]);\n\n // Handle keyboard navigation\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (disabled) return;\n\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault();\n if (!isActive) {\n setIsActive(true);\n } else {\n setHighlightedIndex(prev =>\n prev < filteredData.length - 1 ? prev + 1 : prev\n );\n }\n break;\n case 'ArrowUp':\n e.preventDefault();\n setHighlightedIndex(prev => (prev > 0 ? prev - 1 : prev));\n break;\n case 'Enter':\n e.preventDefault();\n if (highlightedIndex >= 0 && filteredData[highlightedIndex]) {\n handleSelect(filteredData[highlightedIndex]);\n }\n break;\n case 'Escape':\n e.preventDefault();\n setIsActive(false);\n setHighlightedIndex(-1);\n break;\n case 'Tab':\n if (highlightedIndex >= 0 && filteredData[highlightedIndex]) {\n handleSelect(filteredData[highlightedIndex]);\n }\n setIsActive(false);\n break;\n }\n },\n [disabled, isActive, highlightedIndex, filteredData, handleSelect]\n );\n\n // Handle dropdown scroll for infinite scroll\n const handleDropdownScroll = useCallback(() => {\n if (!checkInfiniteScroll || !dropdownRef.current) return;\n\n const { scrollTop, scrollHeight, clientHeight } = dropdownRef.current;\n if (scrollHeight - scrollTop - clientHeight <= infiniteScrollDistance) {\n onInfiniteScroll?.();\n }\n }, [checkInfiniteScroll, infiniteScrollDistance, onInfiniteScroll]);\n\n // Scroll highlighted item into view\n useEffect(() => {\n if (highlightedIndex >= 0 && dropdownRef.current) {\n const highlightedEl = dropdownRef.current.querySelector(\n `[data-index=\"${highlightedIndex}\"]`\n );\n if (\n highlightedEl &&\n typeof highlightedEl.scrollIntoView === 'function'\n ) {\n highlightedEl.scrollIntoView({ block: 'nearest' });\n }\n }\n }, [highlightedIndex]);\n\n // Combined ref\n const combinedRef = useCallback(\n (node: HTMLInputElement | null) => {\n (inputRef as React.MutableRefObject<HTMLInputElement | null>).current =\n node;\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref) {\n (ref as React.MutableRefObject<HTMLInputElement | null>).current =\n node;\n }\n },\n [ref]\n );\n\n // Generate classes\n const autocompleteClasses = usePrefixedClassNames('autocomplete', {\n 'is-active': isActive,\n [`is-${size}`]: !!size,\n });\n\n const inputClasses = usePrefixedClassNames('input', {\n [`is-${color}`]: !!color,\n [`is-${size}`]: !!size,\n 'is-loading': loading,\n });\n\n const controlClasses = usePrefixedClassNames(\n 'control',\n 'is-expanded',\n 'has-icons-right'\n );\n\n const dropdownMenuClasses = usePrefixedClassNames('dropdown-menu', {\n 'is-active': isActive && (filteredData.length > 0 || !!empty),\n });\n\n const dropdownContentClass = usePrefixedClassNames('dropdown-content');\n const dropdownHeaderClass = usePrefixedClassNames('dropdown-header');\n const dropdownFooterClass = usePrefixedClassNames('dropdown-footer');\n const emptyItemClasses = usePrefixedClassNames(\n 'dropdown-item',\n 'has-text-grey'\n );\n\n const iconRightClickableClass = usePrefixedClassNames(\n 'icon',\n 'is-right',\n 'is-clickable'\n );\n const iconRightClass = usePrefixedClassNames('icon', 'is-right');\n const loaderClass = usePrefixedClassNames('loader', 'is-loading');\n\n const combinedClasses = classNames(\n autocompleteClasses,\n bulmaHelperClasses,\n className\n );\n\n const helpClass = usePrefixedClassNames('help', {\n [`is-${messageColor}`]: !!messageColor,\n });\n const messageEl = message ? <p className={helpClass}>{message}</p> : null;\n\n const autocompleteElement = (\n <div ref={containerRef} className={combinedClasses} {...rest}>\n <div className={controlClasses}>\n <input\n ref={combinedRef}\n type=\"text\"\n className={inputClasses}\n id={controlId}\n value={inputValue}\n placeholder={placeholder}\n disabled={disabled}\n name={name}\n form={form}\n required={required}\n onChange={handleInputChange}\n onFocus={handleFocus}\n onKeyDown={handleKeyDown}\n role=\"combobox\"\n aria-expanded={isActive}\n aria-haspopup=\"listbox\"\n aria-autocomplete=\"list\"\n autoComplete=\"off\"\n />\n {clearable && inputValue && !disabled && (\n <span\n className={iconRightClickableClass}\n onClick={handleClear}\n role=\"button\"\n aria-label=\"Clear\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n width=\"16\"\n height=\"16\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </span>\n )}\n {loading && (\n <span className={iconRightClass}>\n <span className={loaderClass} />\n </span>\n )}\n </div>\n\n {isActive && (filteredData.length > 0 || empty) && (\n <div className={dropdownMenuClasses}>\n <div\n ref={dropdownRef}\n className={dropdownContentClass}\n style={{ maxHeight: `${maxHeight}px`, overflowY: 'auto' }}\n role=\"listbox\"\n onScroll={handleDropdownScroll}\n >\n {header && <div className={dropdownHeaderClass}>{header}</div>}\n\n {filteredData.length > 0 ? (\n filteredData.map((item, index) => {\n const isDisabled = typeof item !== 'string' && item.disabled;\n const isHighlighted = index === highlightedIndex;\n\n const itemClasses = prefixedClassNames(\n classPrefix,\n 'dropdown-item',\n {\n 'is-active': isHighlighted,\n 'is-disabled': isDisabled,\n }\n );\n\n return (\n <a\n key={index}\n data-index={index}\n className={itemClasses}\n onClick={() => !isDisabled && handleSelect(item)}\n onMouseEnter={() =>\n !isDisabled && setHighlightedIndex(index)\n }\n role=\"option\"\n aria-selected={isHighlighted}\n aria-disabled={isDisabled}\n >\n {itemTemplate\n ? itemTemplate(item)\n : getDisplayValue(item)}\n </a>\n );\n })\n ) : (\n <div className={emptyItemClasses}>{empty}</div>\n )}\n\n {footer && <div className={dropdownFooterClass}>{footer}</div>}\n </div>\n </div>\n )}\n </div>\n );\n\n if (!insideField) {\n return (\n <Field\n label={label}\n labelSize={labelSize}\n labelProps={fieldLabelProps}\n horizontal={horizontal}\n className={fieldClassName}\n >\n {autocompleteElement}\n {messageEl}\n </Field>\n );\n }\n\n return (\n <>\n {autocompleteElement}\n {messageEl}\n </>\n );\n }\n);\n\nAutocomplete.displayName = 'Autocomplete';\n\nexport default Autocomplete;\n","import React, {\n forwardRef,\n useState,\n useRef,\n useEffect,\n useCallback,\n} from 'react';\nimport {\n classNames,\n usePrefixedClassNames,\n prefixedClassNames,\n} from '../helpers/classNames';\nimport { useConfig, useIconLibrary } from '../helpers/Config';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { useInsideField } from './FormContext';\nimport { Field } from './Field';\nimport { FormFieldProps } from './fieldProps';\nimport { useAutoLabelId } from './useAutoLabelId';\nimport { Icon } from '../elements/Icon';\n\n/**\n * Represents a tag item object with a value and optional label.\n */\nexport interface TaginputItem {\n /** The tag value. */\n value: string;\n /** Display label (optional). */\n label?: string;\n [key: string]: unknown;\n}\n\n/** A tag can be either a TaginputItem object or a plain string. */\nexport type TaginputTag = TaginputItem | string;\n\ntype IconLibrary = 'fa' | 'mdi' | 'ion' | 'material-icons' | 'material-symbols';\n\n/**\n * Props for the Taginput component.\n * @extraProp {string} [className] - Additional CSS classes.\n * @extraProp {React.Ref<HTMLInputElement>} [ref] - Ref forwarded to the input element.\n */\nexport interface TaginputProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'>,\n Omit<BulmaClassesProps, 'color'>,\n FormFieldProps {\n /** Field label. Automatically associated with the text input via `htmlFor` — uses your `id` when provided, otherwise a generated one. Not wired when the tag limit is reached (the input is not rendered) and dropped inside an outer `Field`. */\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 inner text input (the labellable control), not the wrapper div. */\n id?: string;\n /** The current tags (controlled). */\n value?: TaginputTag[];\n /** Default tags (uncontrolled). */\n defaultValue?: TaginputTag[];\n /** Autocomplete suggestions. */\n data?: string[];\n /** Placeholder text when no tags. */\n placeholder?: string;\n /** Object property to use as display field. */\n field?: string;\n /** Allow creating new tags not in suggestions. */\n allowNew?: boolean;\n /** Allow duplicate tags. */\n allowDuplicates?: boolean;\n /** Open autocomplete dropdown on focus. */\n openOnFocus?: boolean;\n /** Remove tag on backspace. Default: true. */\n removeOnKeys?: boolean;\n /** Keys to confirm tag creation. Default: ['Enter', ',']. */\n confirmKeys?: string[];\n /** Show close button on tags. Default: true. */\n closable?: boolean;\n /** Attach tags visually. */\n attached?: boolean;\n /** Maximum number of tags allowed. */\n maxTags?: number;\n /** Maximum length of input. */\n maxlength?: number;\n /** Whether the input is disabled. */\n disabled?: boolean;\n /** Whether the input is read-only. */\n readonly?: boolean;\n /** Applies rounded corners to the tags. */\n rounded?: boolean;\n /** Truncates long tag text with ellipsis. */\n ellipsis?: boolean;\n /** Shows a counter of the number of tags. */\n hasCounter?: boolean;\n /** Characters that split pasted text into tags. */\n onPasteSeparators?: string[];\n /** Validation function called before adding a tag. */\n beforeAdding?: (tag: string) => boolean;\n /** Custom function for creating tag objects from input. */\n createTag?: (input: string) => TaginputTag;\n /** Keeps the first autocomplete suggestion highlighted. */\n keepFirst?: boolean;\n /** Keeps the autocomplete dropdown open after selection. */\n keepOpen?: boolean;\n /** Shows a loading indicator. */\n loading?: boolean;\n /** ARIA label for tag close buttons. */\n ariaCloseLabel?: string;\n /** Icon name for the input field. */\n icon?: string;\n /** Icon library to use. */\n iconLibrary?: IconLibrary;\n /** Icon style variant (e.g., 'solid', 'outlined'). */\n iconVariant?: string;\n /** Additional icon modifiers. */\n iconFeatures?: string | string[];\n /** Input color variant. */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Tag color variant. */\n tagColor?:\n | 'primary'\n | 'link'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger'\n | 'dark'\n | 'light';\n /** Size variant. */\n size?: 'small' | 'medium' | 'large';\n /** Form field name. When set, one hidden input per tag is rendered. */\n name?: string;\n /** Optional id of the form the hidden inputs belong to. */\n form?: string;\n /** Callback when tags change. */\n onChange?: (tags: TaginputTag[]) => void;\n /** Callback when tag is added. */\n onAdd?: (tag: TaginputTag) => void;\n /** Callback when tag is removed. */\n onRemove?: (tag: TaginputTag, index: number) => void;\n /** Callback when typing in input. */\n onTyping?: (value: string) => void;\n /** Custom render for tags. */\n tagTemplate?: (tag: TaginputTag) => React.ReactNode;\n}\n\n/**\n * The `Taginput` component provides a tag/chip input field for managing multiple tags.\n *\n * @function\n * @param {TaginputProps} props - Props for the Taginput component.\n * @param {React.Ref<HTMLInputElement>} ref - Forwarded ref to the input element.\n * @returns {JSX.Element} The rendered taginput component.\n *\n * @example\n * // Basic usage\n * <Taginput\n * placeholder=\"Add a tag...\"\n * onChange={(tags) => console.log(tags)}\n * />\n *\n * @example\n * // With autocomplete\n * <Taginput\n * data={['React', 'Vue', 'Angular', 'Svelte']}\n * allowNew={false}\n * placeholder=\"Select frameworks...\"\n * />\n */\nexport const Taginput = forwardRef<HTMLInputElement, TaginputProps>(\n (\n {\n // Field props\n label,\n labelSize,\n labelProps,\n horizontal,\n message,\n messageColor,\n fieldClassName,\n value: controlledValue,\n defaultValue = [],\n data = [],\n placeholder,\n field = 'label',\n allowNew = true,\n allowDuplicates = false,\n openOnFocus = false,\n removeOnKeys = true,\n confirmKeys = ['Enter', ','],\n closable = true,\n attached = false,\n maxTags,\n maxlength,\n disabled = false,\n readonly = false,\n rounded = false,\n ellipsis = false,\n hasCounter = true,\n onPasteSeparators = [','],\n beforeAdding,\n createTag,\n keepFirst = false,\n keepOpen = true,\n loading = false,\n ariaCloseLabel,\n icon,\n iconLibrary: iconLibraryProp,\n iconVariant,\n iconFeatures,\n color,\n tagColor,\n size,\n onChange,\n onAdd,\n onRemove,\n onTyping,\n tagTemplate,\n name,\n form,\n id,\n className,\n ...props\n },\n ref\n ) => {\n const insideField = useInsideField();\n const { bulmaHelperClasses, rest } = useBulmaClasses(props);\n const { classPrefix } = useConfig();\n const defaultIconLibrary = useIconLibrary();\n const resolvedLibrary = iconLibraryProp || defaultIconLibrary || 'fa';\n const pcn = (\n ...args: (\n | string\n | number\n | undefined\n | null\n | false\n | Record<string, unknown>\n | unknown[]\n )[]\n ) => prefixedClassNames(classPrefix, ...args);\n const containerRef = useRef<HTMLDivElement>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const dropdownRef = useRef<HTMLDivElement>(null);\n\n const [internalTags, setInternalTags] =\n useState<TaginputTag[]>(defaultValue);\n const [inputValue, setInputValue] = useState('');\n const [isActive, setIsActive] = useState(false);\n const [highlightedIndex, setHighlightedIndex] = useState(-1);\n\n // Use controlled or internal tags\n const tags = controlledValue !== undefined ? controlledValue : internalTags;\n\n const isMaxReached = maxTags !== undefined && tags.length >= maxTags;\n // At the tag limit the text input is not rendered, so there is nothing to\n // wire the label to.\n const { controlId, fieldLabelProps } = useAutoLabelId({\n label,\n id,\n labelProps,\n rendersLabel: !insideField && !isMaxReached,\n });\n\n // Get display value from tag\n const getDisplayValue = (tag: TaginputTag): string => {\n if (typeof tag === 'string') return tag;\n const fieldValue = tag[field];\n if (typeof fieldValue === 'string') return fieldValue;\n return tag.value || '';\n };\n\n // Filter autocomplete data\n const filteredData = data.filter(item => {\n const displayValue = item.toLowerCase();\n const matchesInput = displayValue.includes(inputValue.toLowerCase());\n const notAlreadyAdded =\n allowDuplicates ||\n !tags.some(tag => getDisplayValue(tag).toLowerCase() === displayValue);\n const hasInput = inputValue || (openOnFocus && isActive);\n return matchesInput && notAlreadyAdded && hasInput;\n });\n\n // keepFirst: auto-highlight first item when dropdown opens\n useEffect(() => {\n if (keepFirst && isActive && filteredData.length > 0) {\n setHighlightedIndex(0);\n }\n }, [keepFirst, isActive, filteredData.length]);\n\n // Update tags\n const updateTags = useCallback(\n (newTags: TaginputTag[]) => {\n if (controlledValue === undefined) {\n setInternalTags(newTags);\n }\n onChange?.(newTags);\n },\n [controlledValue, onChange]\n );\n\n // Add tag\n const addTag = useCallback(\n (value: string | TaginputTag) => {\n if (disabled || readonly) return;\n\n const tagValue = typeof value === 'string' ? value.trim() : value;\n const displayValue =\n typeof tagValue === 'string' ? tagValue : getDisplayValue(tagValue);\n\n if (!displayValue) return;\n\n // Check max tags\n if (maxTags && tags.length >= maxTags) return;\n\n // Check duplicates\n if (!allowDuplicates) {\n const exists = tags.some(\n tag =>\n getDisplayValue(tag).toLowerCase() === displayValue.toLowerCase()\n );\n if (exists) return;\n }\n\n // Check if allowed (must be in data if allowNew is false). Compare\n // case-insensitively, consistent with the dropdown filter and the\n // duplicate check above.\n if (\n !allowNew &&\n !data.some(d => d.toLowerCase() === displayValue.toLowerCase())\n )\n return;\n\n // beforeAdding validation\n if (beforeAdding && !beforeAdding(displayValue)) return;\n\n // createTag transformation\n const finalTag = createTag ? createTag(displayValue) : tagValue;\n\n const newTags = [...tags, finalTag];\n updateTags(newTags);\n onAdd?.(finalTag);\n setInputValue('');\n if (!keepOpen) {\n setIsActive(false);\n }\n setHighlightedIndex(-1);\n },\n [\n disabled,\n readonly,\n tags,\n maxTags,\n allowDuplicates,\n allowNew,\n data,\n field,\n updateTags,\n onAdd,\n beforeAdding,\n createTag,\n keepOpen,\n ]\n );\n\n // Remove tag\n const removeTag = useCallback(\n (index: number) => {\n /* istanbul ignore next: both triggers (delete button click, Backspace handler) are already gated on disabled/readonly */\n if (disabled || readonly) return;\n\n const removedTag = tags[index];\n const newTags = tags.filter((_, i) => i !== index);\n updateTags(newTags);\n onRemove?.(removedTag, index);\n },\n [disabled, readonly, tags, updateTags, onRemove]\n );\n\n // Handle input change\n const handleInputChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = e.target.value;\n\n // Check if a confirm key was typed\n const lastChar = newValue.slice(-1);\n if (confirmKeys.includes(lastChar) && lastChar !== 'Enter') {\n const valueWithoutKey = newValue.slice(0, -1).trim();\n if (valueWithoutKey) {\n addTag(valueWithoutKey);\n }\n return;\n }\n\n setInputValue(newValue);\n onTyping?.(newValue);\n\n if (newValue && data.length > 0) {\n setIsActive(true);\n }\n },\n [confirmKeys, addTag, onTyping, data.length]\n );\n\n // Handle paste\n const handlePaste = useCallback(\n (e: React.ClipboardEvent<HTMLInputElement>) => {\n if (onPasteSeparators.length === 0) return;\n\n const pastedText = e.clipboardData.getData('text');\n // Check if any separator exists in the pasted text\n const hasSeparator = onPasteSeparators.some(sep =>\n pastedText.includes(sep)\n );\n\n if (!hasSeparator) return;\n\n e.preventDefault();\n\n // Build a regex from all separators\n const escapedSeparators = onPasteSeparators.map(s =>\n s.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n );\n const regex = new RegExp(`[${escapedSeparators.join('')}]`);\n\n const parts = pastedText\n .split(regex)\n .map(s => s.trim())\n .filter(Boolean);\n\n for (const part of parts) {\n addTag(part);\n }\n },\n [onPasteSeparators, addTag]\n );\n\n // Handle focus\n const handleFocus = useCallback(() => {\n if (openOnFocus && data.length > 0 && !disabled) {\n setIsActive(true);\n }\n }, [openOnFocus, data.length, disabled]);\n\n // Handle click outside\n useEffect(() => {\n if (!isActive) return undefined;\n\n const handleClickOutside = (e: MouseEvent) => {\n if (\n containerRef.current &&\n !containerRef.current.contains(e.target as Node)\n ) {\n setIsActive(false);\n setHighlightedIndex(-1);\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n return () =>\n document.removeEventListener('mousedown', handleClickOutside);\n }, [isActive]);\n\n // Handle keyboard\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (disabled || readonly) return;\n\n // Handle confirm keys\n if (confirmKeys.includes(e.key)) {\n e.preventDefault();\n if (highlightedIndex >= 0 && filteredData[highlightedIndex]) {\n addTag(filteredData[highlightedIndex]);\n } else if (inputValue.trim()) {\n addTag(inputValue);\n }\n return;\n }\n\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault();\n if (!isActive && data.length > 0) {\n setIsActive(true);\n } else {\n setHighlightedIndex(prev =>\n prev < filteredData.length - 1 ? prev + 1 : prev\n );\n }\n break;\n case 'ArrowUp':\n e.preventDefault();\n setHighlightedIndex(prev => (prev > 0 ? prev - 1 : prev));\n break;\n case 'Backspace':\n if (removeOnKeys && !inputValue && tags.length > 0) {\n e.preventDefault();\n removeTag(tags.length - 1);\n }\n break;\n case 'Escape':\n setIsActive(false);\n setHighlightedIndex(-1);\n break;\n }\n },\n [\n disabled,\n readonly,\n confirmKeys,\n highlightedIndex,\n filteredData,\n addTag,\n inputValue,\n isActive,\n data.length,\n removeOnKeys,\n tags.length,\n removeTag,\n ]\n );\n\n // Combined ref\n const combinedRef = useCallback(\n (node: HTMLInputElement | null) => {\n (inputRef as React.MutableRefObject<HTMLInputElement | null>).current =\n node;\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref) {\n (ref as React.MutableRefObject<HTMLInputElement | null>).current =\n node;\n }\n },\n [ref]\n );\n\n // Focus input when container is clicked\n const handleContainerClick = useCallback(() => {\n inputRef.current?.focus();\n }, []);\n\n // Generate classes\n const taginputClasses = pcn('taginput', {\n 'is-active': isActive,\n [`is-${size}`]: !!size,\n [`is-${color}`]: !!color,\n 'is-disabled': disabled,\n 'is-rounded': rounded,\n 'is-ellipsis': ellipsis,\n });\n\n const containerClasses = pcn('taginput-container', {\n 'is-attached': attached,\n 'has-icons-left': !!icon,\n });\n\n const inputClasses = pcn('input', {\n [`is-${size}`]: !!size,\n });\n\n const tagClasses = pcn('tag', {\n [`is-${tagColor}`]: !!tagColor,\n [`is-${size}`]: !!size,\n });\n\n const combinedClasses = classNames(\n taginputClasses,\n bulmaHelperClasses,\n className\n );\n\n // Counter text\n const showCounter =\n hasCounter && (maxTags !== undefined || maxlength !== undefined);\n const counterText =\n maxTags !== undefined\n ? `${tags.length} / ${maxTags}`\n : maxlength !== undefined\n ? `${inputValue.length} / ${maxlength}`\n : '';\n\n const counterClasses = pcn('help', 'counter');\n const tagsClasses = pcn('tags');\n const dropdownMenuClasses = pcn('dropdown-menu', 'is-active');\n const dropdownContentClasses = pcn('dropdown-content');\n const iconRightClass = pcn('icon', 'is-right');\n const loaderClass = pcn('loader', 'is-loading');\n\n const helpClass = usePrefixedClassNames('help', {\n [`is-${messageColor}`]: !!messageColor,\n });\n const messageEl = message ? <p className={helpClass}>{message}</p> : null;\n\n const taginputElement = (\n <div\n ref={containerRef}\n className={combinedClasses}\n onClick={handleContainerClick}\n {...rest}\n >\n <div className={containerClasses}>\n {icon && (\n <Icon\n name={icon}\n library={resolvedLibrary}\n variant={iconVariant}\n features={iconFeatures}\n containerClassName={pcn('icon', 'is-left')}\n />\n )}\n <div className={tagsClasses}>\n {tags.map((tag, index) => {\n const displayVal = getDisplayValue(tag);\n return (\n <span key={index} className={tagClasses}>\n {tagTemplate ? (\n tagTemplate(tag)\n ) : ellipsis ? (\n <span title={displayVal}>{displayVal}</span>\n ) : (\n displayVal\n )}\n {closable && !disabled && !readonly && (\n <button\n type=\"button\"\n className={pcn('delete', 'is-small')}\n onClick={e => {\n e.stopPropagation();\n removeTag(index);\n }}\n aria-label={ariaCloseLabel || `Remove ${displayVal}`}\n />\n )}\n </span>\n );\n })}\n {!isMaxReached && (\n <input\n ref={combinedRef}\n type=\"text\"\n className={inputClasses}\n id={controlId}\n value={inputValue}\n placeholder={tags.length === 0 ? placeholder : undefined}\n disabled={disabled}\n readOnly={readonly}\n maxLength={maxlength}\n onChange={handleInputChange}\n onFocus={handleFocus}\n onKeyDown={handleKeyDown}\n onPaste={handlePaste}\n // Fallback name, dropped only when the rendered label actually\n // targets this input (aria-label would win otherwise). A\n // labelProps.htmlFor pointing elsewhere keeps the fallback so\n // the input is never nameless.\n aria-label={\n controlId && fieldLabelProps?.htmlFor === controlId\n ? undefined\n : 'Add tag'\n }\n />\n )}\n </div>\n {loading && (\n <span className={iconRightClass}>\n <span className={loaderClass} />\n </span>\n )}\n </div>\n\n {isActive && filteredData.length > 0 && (\n <div className={dropdownMenuClasses}>\n <div\n ref={dropdownRef}\n className={dropdownContentClasses}\n role=\"listbox\"\n >\n {filteredData.map((item, index) => (\n <a\n key={index}\n className={pcn('dropdown-item', {\n 'is-active': index === highlightedIndex,\n })}\n onClick={() => addTag(item)}\n onMouseEnter={() => setHighlightedIndex(index)}\n role=\"option\"\n aria-selected={index === highlightedIndex}\n >\n {item}\n </a>\n ))}\n </div>\n </div>\n )}\n\n {showCounter && <small className={counterClasses}>{counterText}</small>}\n\n {name &&\n tags.map((tag, i) => (\n <input\n key={`tag-input-${i}`}\n type=\"hidden\"\n name={name}\n value={getDisplayValue(tag)}\n form={form}\n />\n ))}\n </div>\n );\n\n if (!insideField) {\n return (\n <Field\n label={label}\n labelSize={labelSize}\n labelProps={fieldLabelProps}\n horizontal={horizontal}\n className={fieldClassName}\n >\n {taginputElement}\n {messageEl}\n </Field>\n );\n }\n\n return (\n <>\n {taginputElement}\n {messageEl}\n </>\n );\n }\n);\n\nTaginput.displayName = 'Taginput';\n\n/** @deprecated Use `Taginput` — same component. */\nexport const TagInput = Taginput;\n\n/** @deprecated Use `TaginputProps`. */\nexport type TagInputProps = TaginputProps;\n\nexport default Taginput;\n","import React, { forwardRef } from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { useFieldLabelId } from './FormContext';\n\n/**\n * Props for the Input component.\n */\nexport interface InputBaseProps\n extends\n Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>,\n Omit<BulmaClassesProps, 'color'> {\n /** Bulma color modifier for the input. */\n color?:\n | 'primary'\n | 'link'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger'\n | 'black'\n | 'dark'\n | 'light'\n | 'white';\n /** Size modifier for the input. */\n size?: 'small' | 'medium' | 'large';\n /** Rounded input corners. */\n isRounded?: boolean;\n /** Renders input as static (read only, styled). */\n isStatic?: boolean;\n /** Applies hovered state. */\n isHovered?: boolean;\n /** Applies focused state. */\n isFocused?: boolean;\n /** Shows loading indicator. */\n isLoading?: boolean;\n /** Additional CSS classes to apply. */\n className?: string;\n /** Disabled input. */\n disabled?: boolean;\n /** Read-only input. */\n readOnly?: boolean;\n}\n\n/**\n * Bulma Input component with full Bulma helper class support.\n *\n * @function\n * @param {InputBaseProps} props - Props for the Input component.\n * @returns {JSX.Element} The rendered input element.\n * @see {@link https://bulma.io/documentation/form/input/ | Bulma Input documentation}\n */\nexport const InputBase = forwardRef<HTMLInputElement, InputBaseProps>(\n (\n {\n color,\n size,\n isRounded,\n isStatic,\n isHovered,\n isFocused,\n isLoading,\n className,\n disabled,\n readOnly,\n ...props\n },\n ref\n ) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color,\n ...props,\n });\n const fieldLabelId = useFieldLabelId();\n\n const mainClass = usePrefixedClassNames('input', {\n [`is-${color}`]: !!color,\n [`is-${size}`]: !!size,\n 'is-rounded': isRounded,\n 'is-static': isStatic,\n 'is-hovered': isHovered,\n 'is-focused': isFocused,\n 'is-loading': isLoading,\n });\n const inputClass = classNames(mainClass, bulmaHelperClasses, className);\n\n return (\n <input\n ref={ref}\n className={inputClass}\n disabled={disabled}\n readOnly={readOnly}\n {...rest}\n // After the spread: a labeled Field's generated id is adopted only\n // when no user id arrived (rest.id may be an undefined own key).\n id={rest.id ?? fieldLabelId}\n />\n );\n }\n);\nInputBase.displayName = 'InputBase';\n\nexport default InputBase;\n","import React, { forwardRef } from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { useFieldLabelId } from './FormContext';\n\n/**\n * Props for the Select component.\n */\nexport interface SelectBaseProps\n extends\n Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'size'>,\n Omit<BulmaClassesProps, 'color'> {\n /** Bulma color modifier for the select. */\n color?:\n | 'primary'\n | 'link'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger'\n | 'black'\n | 'dark'\n | 'light'\n | 'white';\n /** Size modifier for the select. */\n size?: 'small' | 'medium' | 'large';\n /** Rounded select corners. */\n isRounded?: boolean;\n /** Shows loading indicator. */\n isLoading?: boolean;\n /** Applies Bulma's is-active modifier. */\n isActive?: boolean;\n /** Forces hovered state on the inner select. */\n isHovered?: boolean;\n /** Forces focused state on the inner select. */\n isFocused?: boolean;\n /** Makes the select span the full width of parent. */\n isFullwidth?: boolean;\n /** Makes the select span the full width of parent. @deprecated Use `isFullwidth` instead — `isFullwidth` wins if both are set. */\n isFullWidth?: boolean;\n /** Additional CSS classes to apply. */\n className?: string;\n /** Disables the select. */\n disabled?: boolean;\n /** Allows multiple selections. */\n multiple?: boolean;\n /** Number of visible options in multiselect. */\n multipleSize?: number;\n /** `<option>` elements. */\n children?: React.ReactNode;\n}\n\n/**\n * Bulma Select component with full Bulma helper class support.\n *\n * @function\n * @param {SelectBaseProps} props - Props for the SelectBase component.\n * @returns {JSX.Element} The rendered select element.\n * @see {@link https://bulma.io/documentation/form/select/ | Bulma Select documentation}\n */\nexport const SelectBase = forwardRef<HTMLSelectElement, SelectBaseProps>(\n (\n {\n color,\n size,\n isRounded,\n isLoading,\n isActive,\n isHovered,\n isFocused,\n isFullwidth,\n isFullWidth,\n className,\n disabled,\n children,\n multiple,\n multipleSize,\n ...props\n },\n ref\n ) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color,\n ...props,\n });\n const fieldLabelId = useFieldLabelId();\n\n const mainClass = usePrefixedClassNames('select', {\n [`is-${color}`]: !!color,\n [`is-${size}`]: !!size,\n 'is-rounded': isRounded,\n 'is-loading': isLoading,\n 'is-active': isActive,\n 'is-multiple': !!multiple,\n 'is-fullwidth': isFullwidth ?? isFullWidth,\n });\n const selectClass = classNames(mainClass, bulmaHelperClasses, className);\n\n // is-hovered / is-focused belong on the inner <select> element, not the wrapper.\n const innerSelectClass = usePrefixedClassNames('', {\n 'is-hovered': isHovered,\n 'is-focused': isFocused,\n });\n\n // Only set size attribute when multiple is true and multipleSize is specified\n const selectProps: React.SelectHTMLAttributes<HTMLSelectElement> = {\n disabled,\n multiple,\n ...rest,\n };\n\n if (multiple && typeof multipleSize === 'number') {\n selectProps.size = multipleSize;\n }\n\n return (\n <div className={selectClass}>\n <select\n ref={ref}\n className={innerSelectClass || undefined}\n {...selectProps}\n // After the spread: a labeled Field's generated id is adopted only\n // when no user id arrived; the id belongs on the inner <select>.\n id={selectProps.id ?? fieldLabelId}\n >\n {children}\n </select>\n </div>\n );\n }\n);\n\nSelectBase.displayName = 'SelectBase';\n\nexport default SelectBase;\n","import React, { forwardRef } from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { useFieldLabelId } from './FormContext';\n\n/**\n * Props for the TextArea component.\n */\nexport interface TextAreaBaseProps\n extends\n Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'>,\n Omit<BulmaClassesProps, 'color'> {\n /** Bulma color modifier for the textarea. */\n color?:\n | 'primary'\n | 'link'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger'\n | 'black'\n | 'dark'\n | 'light'\n | 'white';\n /** Size modifier for the textarea. */\n size?: 'small' | 'medium' | 'large';\n /** Rounded textarea corners. */\n isRounded?: boolean;\n /** Renders textarea as static (styled readonly). */\n isStatic?: boolean;\n /** Applies hovered state. */\n isHovered?: boolean;\n /** Applies focused state. */\n isFocused?: boolean;\n /** Shows loading indicator on the wrapping Control. */\n isLoading?: boolean;\n /** Applies Bulma's is-active modifier. */\n isActive?: boolean;\n /** Fixed textarea size (no resize). */\n hasFixedSize?: boolean;\n /** Additional CSS classes to apply. */\n className?: string;\n /** Disables the textarea. */\n disabled?: boolean;\n /** Read-only textarea. */\n readOnly?: boolean;\n /** Number of visible text lines. */\n rows?: number;\n}\n\n/**\n * Bulma TextArea component with full Bulma helper class support.\n *\n * @function\n * @param {TextAreaBaseProps} props - Props for the TextAreaBase component.\n * @returns {JSX.Element} The rendered textarea element.\n * @see {@link https://bulma.io/documentation/form/textarea/ | Bulma Textarea documentation}\n */\nexport const TextAreaBase = forwardRef<HTMLTextAreaElement, TextAreaBaseProps>(\n (\n {\n color,\n size,\n isRounded,\n isStatic,\n isHovered,\n isFocused,\n isLoading: _isLoading,\n isActive,\n hasFixedSize,\n className,\n disabled,\n readOnly,\n rows,\n ...props\n },\n ref\n ) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color,\n ...props,\n });\n const fieldLabelId = useFieldLabelId();\n\n // Note: `is-loading` is intentionally NOT applied to the <textarea> itself —\n // Bulma documents `<div class=\"control is-loading\">` as the loading pattern\n // for textareas, not `<textarea class=\"textarea is-loading\">`. The convenience\n // <TextArea> component routes its `isLoading` prop to the wrapping Control.\n const mainClass = usePrefixedClassNames('textarea', {\n [`is-${color}`]: !!color,\n [`is-${size}`]: !!size,\n 'is-rounded': isRounded,\n 'is-static': isStatic,\n 'is-hovered': isHovered,\n 'is-focused': isFocused,\n 'is-active': isActive,\n 'has-fixed-size': hasFixedSize,\n });\n const textareaClass = classNames(mainClass, bulmaHelperClasses, className);\n\n return (\n <textarea\n ref={ref}\n className={textareaClass}\n disabled={disabled}\n readOnly={readOnly}\n rows={rows}\n {...rest}\n // After the spread: a labeled Field's generated id is adopted only\n // when no user id arrived (rest.id may be an undefined own key).\n id={rest.id ?? fieldLabelId}\n />\n );\n }\n);\nTextAreaBase.displayName = 'TextAreaBase';\n\nexport default TextAreaBase;\n","import React, { forwardRef } from 'react';\nimport { usePrefixedClassNames } from '../helpers/classNames';\nimport { Field, FieldProps } from './Field';\nimport { Control, ControlBaseProps } from './Control';\nimport { InputBase, InputBaseProps } from './InputBase';\nimport { useInsideField, useInsideControl } from './FormContext';\nimport { useAutoLabelId } from './useAutoLabelId';\n\n/**\n * Props for the Input component.\n *\n * Composes Field, Control, and Input into a single convenience component.\n * Supports all Input props, plus Field-level (label, horizontal) and\n * Control-level (icons, loading) props.\n */\nexport interface InputProps extends InputBaseProps {\n /** Field label. Automatically associated with the input via `htmlFor` — 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`). */\n label?: React.ReactNode;\n /** Size for the label. */\n labelSize?: FieldProps['labelSize'];\n /** Props for the label element when the component renders its own `Field`; dropped inside an outer `Field` (use that `Field`'s `labelProps` instead). An explicit `htmlFor` key — even `undefined` — overrides the automatic association and no id is generated. */\n labelProps?: FieldProps['labelProps'];\n /** Horizontal field layout. */\n horizontal?: boolean;\n /** Icon props for left icon. */\n iconLeft?: ControlBaseProps['iconLeft'];\n /** Icon props for right icon. */\n iconRight?: ControlBaseProps['iconRight'];\n /** Shortcut for left icon name. */\n iconLeftName?: string;\n /** Shortcut for right icon name. */\n iconRightName?: string;\n /** Shortcut for left icon size. */\n iconLeftSize?: ControlBaseProps['iconLeftSize'];\n /** Shortcut for right icon size. */\n iconRightSize?: ControlBaseProps['iconRightSize'];\n /** Force left icon container. */\n hasIconsLeft?: boolean;\n /** Force right icon container. */\n hasIconsRight?: boolean;\n /** Shows loading indicator. */\n isLoading?: boolean;\n /** Expand the control. */\n isExpanded?: boolean;\n /** Control size. */\n controlSize?: ControlBaseProps['size'];\n /** Help/validation message below the input. */\n message?: React.ReactNode;\n /** Bulma color for the message. */\n messageColor?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Additional CSS classes for the Field. */\n fieldClassName?: string;\n /** Additional CSS classes for the Control. */\n controlClassName?: string;\n}\n\n/**\n * The `Input` component provides a Bulma-styled text input, supporting colors, sizes, rounded corners, static/read-only state, hover/focus/loading states, and all Bulma helper props.\n *\n * @function\n * @param {InputProps} props - Props for Input.\n * @returns {JSX.Element} The composed field element.\n *\n * @example\n * <Input label=\"Username\" placeholder=\"Enter username\" iconLeftName=\"user\" />\n *\n * @example\n * <Input\n * label=\"Email\"\n * type=\"email\"\n * message=\"Please enter a valid email\"\n * messageColor=\"danger\"\n * color=\"danger\"\n * />\n */\nexport const Input = forwardRef<HTMLInputElement, InputProps>(\n (\n {\n // Field props\n label,\n labelSize,\n labelProps,\n horizontal,\n // Control props\n iconLeft,\n iconRight,\n iconLeftName,\n iconRightName,\n iconLeftSize,\n iconRightSize,\n hasIconsLeft,\n hasIconsRight,\n isLoading,\n isExpanded,\n controlSize,\n // Message props\n message,\n messageColor,\n // Container class overrides\n fieldClassName,\n controlClassName,\n // Everything else goes to Input\n ...inputProps\n },\n ref\n ) => {\n const insideField = useInsideField();\n const insideControl = useInsideControl();\n const { controlId, fieldLabelProps } = useAutoLabelId({\n label,\n id: inputProps.id,\n labelProps,\n rendersLabel: !insideField,\n });\n const helpClass = usePrefixedClassNames('help', {\n [`is-${messageColor}`]: !!messageColor,\n });\n\n let content = <InputBase ref={ref} id={controlId} {...inputProps} />;\n\n if (!insideControl) {\n content = (\n <Control\n iconLeft={iconLeft}\n iconRight={iconRight}\n iconLeftName={iconLeftName}\n iconRightName={iconRightName}\n iconLeftSize={iconLeftSize}\n iconRightSize={iconRightSize}\n hasIconsLeft={hasIconsLeft}\n hasIconsRight={hasIconsRight}\n isLoading={isLoading}\n isExpanded={isExpanded}\n size={controlSize}\n className={controlClassName}\n >\n {content}\n </Control>\n );\n }\n\n const messageEl = message ? <p className={helpClass}>{message}</p> : null;\n\n if (!insideField) {\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\nInput.displayName = 'Input';\n\nexport default Input;\n","import React, { forwardRef } from 'react';\nimport { usePrefixedClassNames } from '../helpers/classNames';\nimport { Field, FieldProps } from './Field';\nimport { Control, ControlBaseProps } from './Control';\nimport { SelectBase, SelectBaseProps } from './SelectBase';\nimport { useInsideField, useInsideControl } from './FormContext';\nimport { useAutoLabelId } from './useAutoLabelId';\n\n/**\n * Props for the Select component.\n *\n * Composes Field, Control, and SelectBase into a single convenience component.\n * Supports all SelectBase props, plus Field-level (label, horizontal) and\n * Control-level (icons, loading) props.\n */\nexport interface SelectProps extends SelectBaseProps {\n /** Field label. Automatically associated with the select via `htmlFor` — 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`). */\n label?: React.ReactNode;\n /** Size for the label. */\n labelSize?: FieldProps['labelSize'];\n /** Props for the label element when the component renders its own `Field`; dropped inside an outer `Field` (use that `Field`'s `labelProps` instead). An explicit `htmlFor` key — even `undefined` — overrides the automatic association and no id is generated. */\n labelProps?: FieldProps['labelProps'];\n /** Horizontal field layout. */\n horizontal?: boolean;\n /** Icon props for left icon. */\n iconLeft?: ControlBaseProps['iconLeft'];\n /** Shortcut for left icon name. */\n iconLeftName?: string;\n /** Shortcut for left icon size. */\n iconLeftSize?: ControlBaseProps['iconLeftSize'];\n /** Force left icon container. */\n hasIconsLeft?: boolean;\n /** Shows loading indicator. */\n isLoading?: boolean;\n /** Expand the control. */\n isExpanded?: boolean;\n /** Control size. */\n controlSize?: ControlBaseProps['size'];\n /** Help/validation message below the select. */\n message?: React.ReactNode;\n /** Bulma color for the message. */\n messageColor?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Additional CSS classes for the Field. */\n fieldClassName?: string;\n /** Additional CSS classes for the Control. */\n controlClassName?: string;\n}\n\n/**\n * The `Select` component provides a Bulma-styled dropdown for selecting one or more options.\n *\n * @function\n * @param {SelectProps} props - Props for Select.\n * @returns {JSX.Element} The composed field element.\n *\n * @example\n * <Select label=\"Country\" iconLeftName=\"globe\">\n * <option>United States</option>\n * <option>Canada</option>\n * </Select>\n */\nexport const Select = forwardRef<HTMLSelectElement, SelectProps>(\n (\n {\n // Field props\n label,\n labelSize,\n labelProps,\n horizontal,\n // Control props\n iconLeft,\n iconLeftName,\n iconLeftSize,\n hasIconsLeft,\n isExpanded,\n controlSize,\n // Message props\n message,\n messageColor,\n // Container class overrides\n fieldClassName,\n controlClassName,\n // Everything else (including isLoading) goes to Select.\n // Note: isLoading on a select is rendered on the .select wrapper itself\n // (replacing the chevron with a spinner), not on .control — this matches\n // Bulma's documented behavior for `<div class=\"select is-loading\">`.\n ...selectProps\n },\n ref\n ) => {\n const insideField = useInsideField();\n const insideControl = useInsideControl();\n const { controlId, fieldLabelProps } = useAutoLabelId({\n label,\n id: selectProps.id,\n labelProps,\n rendersLabel: !insideField,\n });\n const helpClass = usePrefixedClassNames('help', {\n [`is-${messageColor}`]: !!messageColor,\n });\n\n let content = <SelectBase ref={ref} id={controlId} {...selectProps} />;\n\n if (!insideControl) {\n content = (\n <Control\n iconLeft={iconLeft}\n iconLeftName={iconLeftName}\n iconLeftSize={iconLeftSize}\n hasIconsLeft={hasIconsLeft}\n isExpanded={isExpanded}\n size={controlSize}\n className={controlClassName}\n >\n {content}\n </Control>\n );\n }\n\n const messageEl = message ? <p className={helpClass}>{message}</p> : null;\n\n if (!insideField) {\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\nSelect.displayName = 'Select';\n\nexport default Select;\n","import React, { forwardRef } from 'react';\nimport { usePrefixedClassNames } from '../helpers/classNames';\nimport { Field, FieldProps } from './Field';\nimport { Control, ControlBaseProps } from './Control';\nimport { TextAreaBase, TextAreaBaseProps } from './TextAreaBase';\nimport { useInsideField, useInsideControl } from './FormContext';\nimport { useAutoLabelId } from './useAutoLabelId';\n\n/**\n * Props for the TextArea component.\n *\n * Composes Field, Control, and TextAreaBase into a single convenience component.\n * Supports all TextAreaBase props, plus Field-level (label, horizontal) and\n * Control-level (loading) props.\n */\nexport interface TextAreaProps extends TextAreaBaseProps {\n /** Field label. Automatically associated with the textarea via `htmlFor` — 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`). */\n label?: React.ReactNode;\n /** Size for the label. */\n labelSize?: FieldProps['labelSize'];\n /** Props for the label element when the component renders its own `Field`; dropped inside an outer `Field` (use that `Field`'s `labelProps` instead). An explicit `htmlFor` key — even `undefined` — overrides the automatic association and no id is generated. */\n labelProps?: FieldProps['labelProps'];\n /** Horizontal field layout. */\n horizontal?: boolean;\n /** Shows loading indicator on the wrapping Control. */\n isLoading?: boolean;\n /** Control size. */\n controlSize?: ControlBaseProps['size'];\n /** Help/validation message below the textarea. */\n message?: React.ReactNode;\n /** Bulma color for the message. */\n messageColor?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Additional CSS classes for the Field. */\n fieldClassName?: string;\n /** Additional CSS classes for the Control. */\n controlClassName?: string;\n}\n\n/**\n * The `TextArea` component provides a Bulma-styled multi-line text input, supporting color, size, rounded corners, static/read-only state, hover/focus/loading states, fixed size, and all Bulma helper props.\n *\n * @function\n * @param {TextAreaProps} props - Props for TextArea.\n * @returns {JSX.Element} The composed field element.\n *\n * @example\n * <TextArea label=\"Bio\" placeholder=\"Tell us about yourself\" rows={4} />\n *\n * @example\n * <TextArea\n * label=\"Comments\"\n * message=\"Max 500 characters\"\n * messageColor=\"info\"\n * />\n */\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n (\n {\n // Field props\n label,\n labelSize,\n labelProps,\n horizontal,\n // Control props\n isLoading: controlIsLoading,\n controlSize,\n // Message props\n message,\n messageColor,\n // Container class overrides\n fieldClassName,\n controlClassName,\n // Everything else goes to TextAreaBase\n ...textAreaProps\n },\n ref\n ) => {\n const insideField = useInsideField();\n const insideControl = useInsideControl();\n const { controlId, fieldLabelProps } = useAutoLabelId({\n label,\n id: textAreaProps.id,\n labelProps,\n rendersLabel: !insideField,\n });\n const helpClass = usePrefixedClassNames('help', {\n [`is-${messageColor}`]: !!messageColor,\n });\n\n let content = <TextAreaBase ref={ref} id={controlId} {...textAreaProps} />;\n\n if (!insideControl) {\n content = (\n <Control\n isLoading={controlIsLoading}\n size={controlSize}\n className={controlClassName}\n >\n {content}\n </Control>\n );\n }\n\n const messageEl = message ? <p className={helpClass}>{message}</p> : null;\n\n if (!insideField) {\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\nTextArea.displayName = 'TextArea';\n\nexport default TextArea;\n","export type PickerPosition =\n 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right' | 'auto';\n\nexport type HourFormat = '12' | '24';\n\nexport type DayOfWeek = 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\n/**\n * Translatable strings used across all four pickers. Pass via the `labels`\n * prop to override defaults; consumers manage their own locale-driven mapping.\n */\nexport interface PickerLabels {\n // Calendar\n prevMonth?: string;\n nextMonth?: string;\n chooseDate?: string;\n // Time spinner\n hours?: string;\n minutes?: string;\n seconds?: string;\n ampm?: string;\n increaseHours?: string;\n decreaseHours?: string;\n increaseMinutes?: string;\n decreaseMinutes?: string;\n increaseSeconds?: string;\n decreaseSeconds?: string;\n toggleAmPm?: string;\n chooseTime?: string;\n chooseDateTime?: string;\n // Footer buttons\n now?: string;\n today?: string;\n clear?: string;\n cancel?: string;\n ok?: string;\n /** Mobile footer: text link that reverts to the value at open (like iOS). */\n reset?: string;\n /** Mobile footer: aria-label for the circular checkmark commit button. */\n done?: string;\n /** DateTimeInput footer: label preceding the selected-time display. */\n time?: string;\n}\n\nexport const DEFAULT_PICKER_LABELS: Required<PickerLabels> = {\n prevMonth: 'Previous month',\n nextMonth: 'Next month',\n chooseDate: 'Choose date',\n hours: 'hours',\n minutes: 'minutes',\n seconds: 'seconds',\n ampm: 'ampm',\n increaseHours: 'Increase hours',\n decreaseHours: 'Decrease hours',\n increaseMinutes: 'Increase minutes',\n decreaseMinutes: 'Decrease minutes',\n increaseSeconds: 'Increase seconds',\n decreaseSeconds: 'Decrease seconds',\n toggleAmPm: 'Toggle AM/PM',\n chooseTime: 'Choose time',\n chooseDateTime: 'Choose date and time',\n now: 'Now',\n today: 'Today',\n clear: 'Clear',\n cancel: 'Cancel',\n ok: 'OK',\n reset: 'Reset',\n done: 'Done',\n time: 'Time',\n};\n\n/** Merge user-supplied label overrides with the defaults. */\nexport const mergeLabels = (\n overrides?: PickerLabels\n): Required<PickerLabels> => ({\n ...DEFAULT_PICKER_LABELS,\n ...(overrides ?? {}),\n});\n","export type DateFormatOption = Intl.DateTimeFormatOptions | string;\n\nexport const DEFAULT_DATE_FORMAT = 'YYYY-MM-DD';\nexport const DEFAULT_TIME_FORMAT_24 = 'HH:mm';\nexport const DEFAULT_TIME_FORMAT_12 = 'hh:mm A';\nexport const DEFAULT_DATETIME_FORMAT = 'YYYY-MM-DD HH:mm';\n\nconst pad = (n: number, width = 2): string => String(n).padStart(width, '0');\n\nconst TOKEN_RE = /YYYY|YY|MM|M|DD|D|HH|H|hh|h|mm|m|ss|s|A|a/g;\n\nfunction formatToken(d: Date, token: string): string {\n switch (token) {\n case 'YYYY':\n // Zero-pad to a fixed 4 chars so the rendered width matches the\n // segment-map width during digit-by-digit keyboard entry (and to match\n // ISO 8601). Years >9999 keep their natural width.\n return pad(d.getFullYear(), 4);\n case 'YY':\n return pad(d.getFullYear() % 100);\n case 'MM':\n return pad(d.getMonth() + 1);\n case 'M':\n return String(d.getMonth() + 1);\n case 'DD':\n return pad(d.getDate());\n case 'D':\n return String(d.getDate());\n case 'HH':\n return pad(d.getHours());\n case 'H':\n return String(d.getHours());\n case 'hh': {\n const h12 = d.getHours() % 12 || 12;\n return pad(h12);\n }\n case 'h': {\n const h12 = d.getHours() % 12 || 12;\n return String(h12);\n }\n case 'mm':\n return pad(d.getMinutes());\n case 'm':\n return String(d.getMinutes());\n case 'ss':\n return pad(d.getSeconds());\n case 's':\n return String(d.getSeconds());\n case 'A':\n return d.getHours() < 12 ? 'AM' : 'PM';\n case 'a':\n return d.getHours() < 12 ? 'am' : 'pm';\n default:\n return token;\n }\n}\n\nfunction formatTokenString(d: Date, fmt: string): string {\n return fmt.replace(TOKEN_RE, t => formatToken(d, t));\n}\n\nfunction formatWithIntl(\n d: Date,\n options: Intl.DateTimeFormatOptions,\n locale?: string\n): string {\n return new Intl.DateTimeFormat(locale, options).format(d);\n}\n\nexport function formatDate(\n d: Date,\n fmt: DateFormatOption | undefined,\n locale?: string\n): string {\n const f = fmt ?? DEFAULT_DATE_FORMAT;\n if (typeof f === 'string') return formatTokenString(d, f);\n return formatWithIntl(d, f, locale);\n}\n\nexport function formatTime(\n d: Date,\n fmt: DateFormatOption | undefined,\n locale?: string\n): string {\n const f = fmt ?? DEFAULT_TIME_FORMAT_24;\n if (typeof f === 'string') return formatTokenString(d, f);\n return formatWithIntl(d, f, locale);\n}\n\nexport function formatDateTime(\n d: Date,\n fmt: DateFormatOption | undefined,\n locale?: string\n): string {\n const f = fmt ?? DEFAULT_DATETIME_FORMAT;\n if (typeof f === 'string') return formatTokenString(d, f);\n return formatWithIntl(d, f, locale);\n}\n\n/**\n * Derive the hour cycle (`'12'` or `'24'`) a display format will render, from\n * its first hour token: `h`/`hh` → 12-hour with meridiem, `H`/`HH` → 24-hour.\n *\n * Returns `null` when the cycle can't be read from the format — it's an\n * `Intl.DateTimeFormat` options object (no token string), `undefined`, or has\n * no hour token — so callers fall back to the raw `hourFormat` prop. Scans with\n * the same {@link TOKEN_RE} grammar the input renders with, so the derived cycle\n * always agrees with what the field actually displays.\n */\nexport function hourCycleFromFormat(\n fmt: DateFormatOption | undefined\n): '12' | '24' | null {\n if (typeof fmt !== 'string') return null;\n for (const [token] of fmt.matchAll(TOKEN_RE)) {\n if (token === 'H' || token === 'HH') return '24';\n if (token === 'h' || token === 'hh') return '12';\n }\n return null;\n}\n\n/**\n * Parse a date string against a token format. Returns null on mismatch.\n * For Intl-options formats parsing is the consumer's responsibility — pass\n * a custom `parse` prop on the picker.\n */\nexport function parseDate(\n s: string,\n fmt?: string,\n // locale arg accepted for symmetry; locale-aware parsing is not supported.\n _locale?: string\n): Date | null {\n if (!s) return null;\n const format = fmt ?? DEFAULT_DATE_FORMAT;\n const parts = parseTokens(s, format);\n if (!parts) return null;\n const year = parts.year ?? new Date().getFullYear();\n const month = (parts.month ?? 1) - 1;\n const day = parts.day ?? 1;\n const hours = parts.hours ?? 0;\n const minutes = parts.minutes ?? 0;\n const seconds = parts.seconds ?? 0;\n const d = new Date(year, month, day, hours, minutes, seconds, 0);\n if (\n d.getFullYear() !== year ||\n d.getMonth() !== month ||\n d.getDate() !== day\n ) {\n return null;\n }\n return d;\n}\n\nexport function parseTime(s: string, fmt?: string): Date | null {\n if (!s) return null;\n const format = fmt ?? DEFAULT_TIME_FORMAT_24;\n const parts = parseTokens(s, format);\n if (!parts) return null;\n const today = new Date();\n return new Date(\n today.getFullYear(),\n today.getMonth(),\n today.getDate(),\n parts.hours ?? 0,\n parts.minutes ?? 0,\n parts.seconds ?? 0,\n 0\n );\n}\n\ninterface ParsedParts {\n year?: number;\n month?: number;\n day?: number;\n hours?: number;\n minutes?: number;\n seconds?: number;\n meridiem?: 'am' | 'pm';\n}\n\nfunction escapeRegExp(s: string): string {\n return s.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\nfunction parseTokens(input: string, fmt: string): ParsedParts | null {\n const tokenOrder: string[] = [];\n let regex = '';\n let i = 0;\n while (i < fmt.length) {\n const four = fmt.slice(i, i + 4);\n const two = fmt.slice(i, i + 2);\n const one = fmt[i];\n let token: string | null = null;\n if (four === 'YYYY') token = 'YYYY';\n else if (\n two === 'YY' ||\n two === 'MM' ||\n two === 'DD' ||\n two === 'HH' ||\n two === 'hh' ||\n two === 'mm' ||\n two === 'ss'\n )\n token = two;\n else if (\n one === 'M' ||\n one === 'D' ||\n one === 'H' ||\n one === 'h' ||\n one === 'm' ||\n one === 's' ||\n one === 'A' ||\n one === 'a'\n )\n token = one;\n\n if (token) {\n tokenOrder.push(token);\n switch (token) {\n case 'YYYY':\n regex += '(\\\\d{4})';\n break;\n case 'YY':\n regex += '(\\\\d{2})';\n break;\n case 'MM':\n case 'DD':\n case 'HH':\n case 'hh':\n case 'mm':\n case 'ss':\n regex += '(\\\\d{1,2})';\n break;\n case 'M':\n case 'D':\n case 'H':\n case 'h':\n case 'm':\n case 's':\n regex += '(\\\\d{1,2})';\n break;\n case 'A':\n regex += '(AM|PM)';\n break;\n case 'a':\n regex += '(am|pm)';\n break;\n }\n i += token.length;\n } else {\n regex += escapeRegExp(one);\n i += 1;\n }\n }\n const m = new RegExp('^' + regex + '$').exec(input);\n if (!m) return null;\n const out: ParsedParts = {};\n tokenOrder.forEach((token, idx) => {\n const v = m[idx + 1];\n switch (token) {\n case 'YYYY':\n out.year = Number(v);\n break;\n case 'YY':\n out.year = 2000 + Number(v);\n break;\n case 'MM':\n case 'M':\n out.month = Number(v);\n break;\n case 'DD':\n case 'D':\n out.day = Number(v);\n break;\n case 'HH':\n case 'H':\n out.hours = Number(v);\n break;\n case 'hh':\n case 'h':\n out.hours = Number(v);\n break;\n case 'mm':\n case 'm':\n out.minutes = Number(v);\n break;\n case 'ss':\n case 's':\n out.seconds = Number(v);\n break;\n case 'A':\n out.meridiem = v.toLowerCase() === 'am' ? 'am' : 'pm';\n break;\n case 'a':\n out.meridiem = v === 'am' ? 'am' : 'pm';\n break;\n }\n });\n if (out.meridiem !== undefined && out.hours !== undefined) {\n if (out.meridiem === 'pm' && out.hours < 12) out.hours += 12;\n if (out.meridiem === 'am' && out.hours === 12) out.hours = 0;\n }\n return out;\n}\n\n/**\n * Locale-aware day name labels in calendar order (Sunday → Saturday).\n * Caller rotates by `firstDayOfWeek`.\n */\nexport function getDayNames(\n locale: string | undefined,\n length: 'narrow' | 'short' | 'long' = 'short'\n): string[] {\n const fmt = new Intl.DateTimeFormat(locale, { weekday: length });\n // 2021-01-03 was a Sunday; use it as the anchor.\n const sunday = new Date(2021, 0, 3);\n const out: string[] = [];\n for (let i = 0; i < 7; i++) {\n const d = new Date(sunday);\n d.setDate(sunday.getDate() + i);\n out.push(fmt.format(d));\n }\n return out;\n}\n\nexport function getMonthNames(\n locale: string | undefined,\n length: 'short' | 'long' = 'long'\n): string[] {\n const fmt = new Intl.DateTimeFormat(locale, { month: length });\n const out: string[] = [];\n for (let i = 0; i < 12; i++) {\n out.push(fmt.format(new Date(2021, i, 1)));\n }\n return out;\n}\n","import { DayOfWeek } from './pickerTypes';\n\nexport interface CalendarCell {\n date: Date;\n inCurrentMonth: boolean;\n isToday: boolean;\n}\n\nexport function isSameDay(a: Date, b: Date): boolean {\n return (\n a.getFullYear() === b.getFullYear() &&\n a.getMonth() === b.getMonth() &&\n a.getDate() === b.getDate()\n );\n}\n\nexport function isSameMonth(a: Date, b: Date): boolean {\n return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth();\n}\n\nexport function isBefore(a: Date, b: Date): boolean {\n return a.getTime() < b.getTime();\n}\n\nexport function isAfter(a: Date, b: Date): boolean {\n return a.getTime() > b.getTime();\n}\n\nexport function isWithin(d: Date, min?: Date, max?: Date): boolean {\n if (min && isBefore(d, min)) return false;\n if (max && isAfter(d, max)) return false;\n return true;\n}\n\nexport function startOfDay(d: Date): Date {\n return new Date(d.getFullYear(), d.getMonth(), d.getDate(), 0, 0, 0, 0);\n}\n\nexport function endOfDay(d: Date): Date {\n return new Date(d.getFullYear(), d.getMonth(), d.getDate(), 23, 59, 59, 999);\n}\n\nexport function startOfMonth(d: Date): Date {\n return new Date(d.getFullYear(), d.getMonth(), 1, 0, 0, 0, 0);\n}\n\nexport function endOfMonth(d: Date): Date {\n return new Date(d.getFullYear(), d.getMonth() + 1, 0, 23, 59, 59, 999);\n}\n\nexport function addDays(d: Date, n: number): Date {\n const r = new Date(d);\n r.setDate(r.getDate() + n);\n return r;\n}\n\nexport function addMonths(d: Date, n: number): Date {\n const r = new Date(d);\n const day = r.getDate();\n r.setDate(1);\n r.setMonth(r.getMonth() + n);\n // Clamp day to last day of new month if original day is out of range.\n const lastDay = new Date(r.getFullYear(), r.getMonth() + 1, 0).getDate();\n r.setDate(Math.min(day, lastDay));\n return r;\n}\n\nexport function addYears(d: Date, n: number): Date {\n return addMonths(d, n * 12);\n}\n\nexport function addHours(d: Date, n: number): Date {\n const r = new Date(d);\n r.setHours(r.getHours() + n);\n return r;\n}\n\nexport function addMinutes(d: Date, n: number): Date {\n const r = new Date(d);\n r.setMinutes(r.getMinutes() + n);\n return r;\n}\n\nexport function addSeconds(d: Date, n: number): Date {\n const r = new Date(d);\n r.setSeconds(r.getSeconds() + n);\n return r;\n}\n\nexport function setTimeOfDay(\n d: Date,\n parts: { hours?: number; minutes?: number; seconds?: number }\n): Date {\n const r = new Date(d);\n if (parts.hours !== undefined) r.setHours(parts.hours);\n if (parts.minutes !== undefined) r.setMinutes(parts.minutes);\n if (parts.seconds !== undefined) r.setSeconds(parts.seconds);\n return r;\n}\n\nexport function getTimeOfDay(d: Date): {\n hours: number;\n minutes: number;\n seconds: number;\n} {\n return {\n hours: d.getHours(),\n minutes: d.getMinutes(),\n seconds: d.getSeconds(),\n };\n}\n\nexport function clampDate(d: Date, min?: Date, max?: Date): Date {\n if (min && isBefore(d, min)) return new Date(min);\n if (max && isAfter(d, max)) return new Date(max);\n return new Date(d);\n}\n\n/**\n * Snap a Date's time-of-day to the nearest grid defined by the given\n * increment steps. Used by the \"Now\" button in pickers configured with\n * non-1 hour / minute / second steps so the committed time always lands on\n * a slot that exists on the wheel. Overflows roll up: e.g.\n * 13:58 with step=15 → 14:00. Seconds are zeroed when `enableSeconds` is\n * false, regardless of step.\n */\nexport function snapTimeToIncrement(\n d: Date,\n opts: {\n incrementHours?: number;\n incrementMinutes?: number;\n incrementSeconds?: number;\n enableSeconds?: boolean;\n } = {}\n): Date {\n const {\n incrementHours = 1,\n incrementMinutes = 1,\n incrementSeconds = 1,\n enableSeconds = false,\n } = opts;\n const r = new Date(d);\n let h = r.getHours();\n let m = r.getMinutes();\n let s = enableSeconds ? r.getSeconds() : 0;\n\n if (enableSeconds && incrementSeconds > 1) {\n s = Math.round(s / incrementSeconds) * incrementSeconds;\n if (s >= 60) {\n s -= 60;\n m += 1;\n }\n }\n\n if (incrementMinutes > 1) {\n m = Math.round(m / incrementMinutes) * incrementMinutes;\n if (m >= 60) {\n m -= 60;\n h += 1;\n }\n }\n\n if (incrementHours > 1) {\n h = Math.round(h / incrementHours) * incrementHours;\n // setHours handles 24+ overflow naturally (rolls forward into next day).\n }\n\n r.setHours(h, m, s, 0);\n return r;\n}\n\n/**\n * Build a 6-week × 7-day grid (42 cells) anchored on the month containing\n * `monthAnchor`. The first cell is the start of the week containing the first\n * of the month, where the week starts on `firstDayOfWeek`.\n */\nexport function buildMonthGrid(\n monthAnchor: Date,\n firstDayOfWeek: DayOfWeek = 0\n): CalendarCell[] {\n const monthStart = startOfMonth(monthAnchor);\n const firstWeekday = monthStart.getDay();\n const offset = (firstWeekday - firstDayOfWeek + 7) % 7;\n const gridStart = addDays(monthStart, -offset);\n const today = startOfDay(new Date());\n const cells: CalendarCell[] = [];\n for (let i = 0; i < 42; i++) {\n const date = addDays(gridStart, i);\n cells.push({\n date,\n inCurrentMonth: date.getMonth() === monthAnchor.getMonth(),\n isToday: isSameDay(date, today),\n });\n }\n return cells;\n}\n","import React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n classNames,\n prefixedClassNames,\n usePrefixedClassNames,\n} from '../../helpers/classNames';\nimport { useConfig } from '../../helpers/Config';\nimport { DayOfWeek, PickerLabels, mergeLabels } from './pickerTypes';\nimport {\n addDays,\n addMonths,\n addYears,\n buildMonthGrid,\n isSameDay,\n isSameMonth,\n isWithin,\n startOfDay,\n} from './dateUtils';\nimport { getDayNames, getMonthNames } from './formatters';\n\nexport interface CalendarProps {\n value: Date | null;\n focusedDate: Date;\n onSelect: (d: Date) => void;\n onFocusedDateChange: (d: Date) => void;\n min?: Date;\n max?: Date;\n shouldDisableDate?: (d: Date) => boolean;\n unselectableDates?: Date[];\n firstDayOfWeek?: DayOfWeek;\n locale?: string;\n dayNames?: string[];\n monthNames?: string[];\n nearbyMonthDays?: boolean;\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n size?: 'small' | 'medium' | 'large';\n className?: string;\n id?: string;\n /** When true, focus the cell matching `focusedDate` after each render. */\n autoFocusCell?: boolean;\n /** Optional translatable string overrides. */\n labels?: PickerLabels;\n /**\n * Inclusive `[min, max]` year range shown in the year-dropdown view.\n * Defaults to ±100 years around the focused year, clamped by `min`/`max`.\n */\n yearsRange?: [number, number];\n}\n\nexport const Calendar: React.FC<CalendarProps> = ({\n value,\n focusedDate,\n onSelect,\n onFocusedDateChange,\n min,\n max,\n shouldDisableDate,\n unselectableDates,\n firstDayOfWeek = 0,\n locale,\n dayNames,\n monthNames,\n nearbyMonthDays = true,\n color,\n size,\n className,\n id,\n autoFocusCell = false,\n labels,\n yearsRange,\n}) => {\n const gridRef = useRef<HTMLDivElement>(null);\n const yearGridRef = useRef<HTMLDivElement>(null);\n const { classPrefix } = useConfig();\n const t = mergeLabels(labels);\n const [view, setView] = useState<'days' | 'years'>('days');\n\n const computedDayNames = useMemo(() => {\n if (dayNames && dayNames.length === 7) return dayNames;\n const sundayFirst = getDayNames(locale, 'short');\n return [\n ...sundayFirst.slice(firstDayOfWeek),\n ...sundayFirst.slice(0, firstDayOfWeek),\n ];\n }, [dayNames, locale, firstDayOfWeek]);\n\n const computedMonthNames = useMemo(() => {\n if (monthNames && monthNames.length === 12) return monthNames;\n return getMonthNames(locale, 'long');\n }, [monthNames, locale]);\n\n const cells = useMemo(\n () => buildMonthGrid(focusedDate, firstDayOfWeek),\n [focusedDate, firstDayOfWeek]\n );\n\n const isDateUnselectable = useCallback(\n (d: Date) => {\n if (!isWithin(d, min, max)) return true;\n if (shouldDisableDate?.(d)) return true;\n if (unselectableDates?.some(u => isSameDay(u, d))) return true;\n return false;\n },\n [min, max, shouldDisableDate, unselectableDates]\n );\n\n // Step from `next` by `direction` days until we hit a selectable date,\n // skipping past dates blocked by min/max, shouldDisableDate, or\n // unselectableDates. If the whole searched range is disabled, focus stays\n // put. Cap iterations to guard against pathologically empty ranges.\n const moveFocus = useCallback(\n (next: Date, direction: 1 | -1) => {\n let candidate = next;\n for (let i = 0; i < 366; i++) {\n if (min && candidate.getTime() < startOfDay(min).getTime()) return;\n if (max && candidate.getTime() > startOfDay(max).getTime()) return;\n if (!isDateUnselectable(candidate)) {\n onFocusedDateChange(candidate);\n return;\n }\n candidate = addDays(candidate, direction);\n }\n },\n [min, max, isDateUnselectable, onFocusedDateChange]\n );\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n switch (e.key) {\n case 'ArrowLeft':\n e.preventDefault();\n moveFocus(addDays(focusedDate, -1), -1);\n break;\n case 'ArrowRight':\n e.preventDefault();\n moveFocus(addDays(focusedDate, 1), 1);\n break;\n case 'ArrowUp':\n e.preventDefault();\n moveFocus(addDays(focusedDate, -7), -1);\n break;\n case 'ArrowDown':\n e.preventDefault();\n moveFocus(addDays(focusedDate, 7), 1);\n break;\n case 'PageUp':\n e.preventDefault();\n moveFocus(\n e.shiftKey ? addYears(focusedDate, -1) : addMonths(focusedDate, -1),\n -1\n );\n break;\n case 'PageDown':\n e.preventDefault();\n moveFocus(\n e.shiftKey ? addYears(focusedDate, 1) : addMonths(focusedDate, 1),\n 1\n );\n break;\n case 'Home': {\n e.preventDefault();\n const dayOfWeek = focusedDate.getDay();\n const offset = (dayOfWeek - firstDayOfWeek + 7) % 7;\n moveFocus(addDays(focusedDate, -offset), 1);\n break;\n }\n case 'End': {\n e.preventDefault();\n const dayOfWeek = focusedDate.getDay();\n const offset = (dayOfWeek - firstDayOfWeek + 7) % 7;\n moveFocus(addDays(focusedDate, 6 - offset), -1);\n break;\n }\n case 'Enter':\n case ' ':\n e.preventDefault();\n if (!isDateUnselectable(focusedDate)) onSelect(focusedDate);\n break;\n }\n },\n [focusedDate, firstDayOfWeek, isDateUnselectable, moveFocus, onSelect]\n );\n\n const calendarClass = usePrefixedClassNames('dateinput', {\n [`is-${color}`]: !!color,\n [`is-${size}`]: !!size,\n });\n const headerClass = usePrefixedClassNames('dateinput-header');\n const monthTriggerClass = usePrefixedClassNames('dateinput-month-trigger', {\n 'is-active': view === 'years',\n });\n const monthCaretClass = usePrefixedClassNames('dateinput-month-caret');\n const navGroupClass = usePrefixedClassNames('dateinput-nav-group');\n const navPrevClass = usePrefixedClassNames('dateinput-nav-prev');\n const navNextClass = usePrefixedClassNames('dateinput-nav-next');\n const monthLabelClass = usePrefixedClassNames('dateinput-month-label');\n const dayNamesRowClass = usePrefixedClassNames('dateinput-day-names');\n const dayNameClass = usePrefixedClassNames('dateinput-day-name');\n const gridClass = usePrefixedClassNames('dateinput-grid');\n const yearsGridClass = usePrefixedClassNames('dateinput-years-grid');\n\n const prevMonthAnchor = addMonths(focusedDate, -1);\n const nextMonthAnchor = addMonths(focusedDate, 1);\n const prevDisabled = !!(\n min &&\n prevMonthAnchor.getTime() < startOfDay(min).getTime() &&\n isSameMonth(focusedDate, min)\n );\n const nextDisabled = !!(\n max &&\n nextMonthAnchor.getTime() > startOfDay(max).getTime() &&\n isSameMonth(focusedDate, max)\n );\n\n const labelId = id ? `${id}-label` : undefined;\n const monthLabel = `${computedMonthNames[focusedDate.getMonth()]} ${focusedDate.getFullYear()}`;\n\n const yearList = useMemo<number[]>(() => {\n const focusedYear = focusedDate.getFullYear();\n const minYear = min ? min.getFullYear() : focusedYear - 100;\n const maxYear = max ? max.getFullYear() : focusedYear + 100;\n const [lo, hi] = yearsRange ?? [minYear, maxYear];\n const start = Math.max(lo, minYear);\n const end = Math.min(hi, maxYear);\n const out: number[] = [];\n for (let y = start; y <= end; y++) out.push(y);\n return out;\n }, [focusedDate, min, max, yearsRange]);\n\n const handleYearSelect = useCallback(\n (year: number) => {\n const next = new Date(focusedDate);\n next.setFullYear(year);\n // Keep month/day but clamp into [min, max].\n onFocusedDateChange(next);\n setView('days');\n },\n [focusedDate, onFocusedDateChange]\n );\n\n useEffect(() => {\n if (view !== 'days') return;\n if (!autoFocusCell || !gridRef.current) return;\n const target = gridRef.current.querySelector<HTMLElement>(\n '[data-focused=\"true\"]'\n );\n target?.focus();\n }, [autoFocusCell, focusedDate, view]);\n\n // When the year view opens, scroll the focused year into view.\n useEffect(() => {\n if (view !== 'years' || !yearGridRef.current) return;\n const sel = yearGridRef.current.querySelector<HTMLElement>(\n '[data-focused-year=\"true\"]'\n );\n sel?.scrollIntoView({ block: 'center' });\n sel?.focus();\n }, [view]);\n\n const focusedYear = focusedDate.getFullYear();\n const todayYear = new Date().getFullYear();\n\n return (\n <div className={classNames(calendarClass, className)} id={id}>\n <div className={headerClass}>\n <button\n type=\"button\"\n className={monthTriggerClass}\n aria-haspopup=\"listbox\"\n aria-expanded={view === 'years'}\n onClick={() => setView(v => (v === 'years' ? 'days' : 'years'))}\n >\n <span className={monthLabelClass} id={labelId} aria-live=\"polite\">\n {monthLabel}\n </span>\n <svg\n className={monthCaretClass}\n viewBox=\"0 0 12 12\"\n width=\"10\"\n height=\"10\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M2 4l4 4 4-4\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.75\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </button>\n <div className={navGroupClass}>\n <button\n type=\"button\"\n className={navPrevClass}\n aria-label={t.prevMonth}\n disabled={prevDisabled || view !== 'days'}\n onClick={() => onFocusedDateChange(prevMonthAnchor)}\n >\n <svg viewBox=\"0 0 16 16\" width=\"14\" height=\"14\" aria-hidden=\"true\">\n <path\n d=\"M10 3l-5 5 5 5\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.75\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </button>\n <button\n type=\"button\"\n className={navNextClass}\n aria-label={t.nextMonth}\n disabled={nextDisabled || view !== 'days'}\n onClick={() => onFocusedDateChange(nextMonthAnchor)}\n >\n <svg viewBox=\"0 0 16 16\" width=\"14\" height=\"14\" aria-hidden=\"true\">\n <path\n d=\"M6 3l5 5-5 5\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.75\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </button>\n </div>\n </div>\n\n {view === 'days' ? (\n <>\n <div className={dayNamesRowClass} aria-hidden=\"true\">\n {computedDayNames.map((name, i) => (\n <div key={i} className={dayNameClass}>\n {name}\n </div>\n ))}\n </div>\n <div\n ref={gridRef}\n role=\"grid\"\n aria-labelledby={labelId}\n className={gridClass}\n onKeyDown={handleKeyDown}\n >\n {cells.map(cell => {\n const disabled = isDateUnselectable(cell.date);\n const isSelected = !!value && isSameDay(value, cell.date);\n const isFocused = isSameDay(cell.date, focusedDate);\n const otherMonth = !cell.inCurrentMonth;\n const cellClass = prefixedClassNames(\n classPrefix,\n 'dateinput-cell',\n {\n 'is-selected': isSelected,\n 'is-today': cell.isToday,\n 'is-disabled': disabled,\n 'is-other-month': otherMonth,\n }\n );\n const display = !otherMonth || nearbyMonthDays;\n return (\n <button\n key={cell.date.toISOString()}\n type=\"button\"\n role=\"gridcell\"\n tabIndex={isFocused ? 0 : -1}\n aria-selected={isSelected}\n aria-disabled={disabled}\n aria-current={cell.isToday ? 'date' : undefined}\n data-focused={isFocused ? 'true' : undefined}\n disabled={disabled || !display}\n className={cellClass}\n onClick={() => {\n if (disabled) return;\n onFocusedDateChange(cell.date);\n onSelect(cell.date);\n }}\n style={!display ? { visibility: 'hidden' } : undefined}\n >\n {cell.date.getDate()}\n </button>\n );\n })}\n </div>\n </>\n ) : (\n <div\n ref={yearGridRef}\n className={yearsGridClass}\n role=\"listbox\"\n aria-label={monthLabel}\n onKeyDown={e => {\n if (e.key === 'Escape') {\n e.preventDefault();\n setView('days');\n }\n }}\n >\n {yearList.map(year => {\n const isFocused = year === focusedYear;\n const isToday = year === todayYear;\n const cellCls = prefixedClassNames(\n classPrefix,\n 'dateinput-year-cell',\n {\n 'is-selected': isFocused,\n 'is-today': isToday,\n }\n );\n return (\n <button\n key={year}\n type=\"button\"\n role=\"option\"\n aria-selected={isFocused}\n data-focused-year={isFocused ? 'true' : undefined}\n tabIndex={isFocused ? 0 : -1}\n className={cellCls}\n onClick={() => handleYearSelect(year)}\n >\n {year}\n </button>\n );\n })}\n </div>\n )}\n </div>\n );\n};\n\nCalendar.displayName = 'Calendar';\n\nexport default Calendar;\n","import * as React from 'react';\nimport { useEffect } from 'react';\n\nconst FOCUSABLE_SELECTOR = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled]):not([type=\"hidden\"])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n].join(',');\n\ninterface UseFocusTrapOptions {\n initialFocusRef?: React.RefObject<HTMLElement | null>;\n restoreFocus?: boolean;\n}\n\nexport function useFocusTrap(\n containerRef: React.RefObject<HTMLElement | null>,\n active: boolean,\n options: UseFocusTrapOptions = {}\n): void {\n const { initialFocusRef, restoreFocus = true } = options;\n\n useEffect(() => {\n if (!active) return undefined;\n const container = containerRef.current;\n if (!container) return undefined;\n const previouslyFocused =\n typeof document !== 'undefined'\n ? (document.activeElement as HTMLElement | null)\n : null;\n\n const focusInitial = () => {\n if (initialFocusRef?.current) {\n initialFocusRef.current.focus();\n return;\n }\n const focusables = Array.from(\n container.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR)\n ).filter(el => !el.hasAttribute('disabled'));\n const target = focusables[0] ?? container;\n target.focus();\n };\n focusInitial();\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key !== 'Tab') return;\n const focusables = Array.from(\n container.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR)\n ).filter(el => !el.hasAttribute('disabled'));\n if (focusables.length === 0) {\n e.preventDefault();\n return;\n }\n const first = focusables[0];\n const last = focusables[focusables.length - 1];\n const activeEl = document.activeElement as HTMLElement | null;\n if (e.shiftKey && activeEl === first) {\n e.preventDefault();\n last.focus();\n } else if (!e.shiftKey && activeEl === last) {\n e.preventDefault();\n first.focus();\n }\n };\n\n container.addEventListener('keydown', handleKeyDown);\n return () => {\n container.removeEventListener('keydown', handleKeyDown);\n if (restoreFocus && previouslyFocused?.focus) {\n previouslyFocused.focus();\n }\n };\n }, [active, containerRef, initialFocusRef, restoreFocus]);\n}\n","import React, {\n useCallback,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { classNames, usePrefixedClassNames } from '../../helpers/classNames';\nimport { useFocusTrap } from './useFocusTrap';\nimport { PickerPosition } from './pickerTypes';\n\nexport interface PickerPopoverProps {\n isOpen: boolean;\n onClose: () => void;\n anchorRef: React.RefObject<HTMLElement | null>;\n children: React.ReactNode;\n position?: PickerPosition;\n appendToBody?: boolean;\n className?: string;\n trapFocus?: boolean;\n closeOnClickOutside?: boolean;\n closeOnEscape?: boolean;\n ariaLabel?: string;\n ariaLabelledBy?: string;\n role?: 'dialog' | 'group';\n id?: string;\n}\n\nconst isBrowser = typeof window !== 'undefined';\n\ninterface ResolvedPosition {\n position: Exclude<PickerPosition, 'auto'>;\n top?: number;\n left?: number;\n}\n\nfunction resolveAuto(\n rect: DOMRect,\n panelWidth: number,\n panelHeight: number\n): Exclude<PickerPosition, 'auto'> {\n const vw = window.innerWidth;\n const vh = window.innerHeight;\n const fitsBelow = rect.bottom + panelHeight + 4 <= vh;\n const fitsRight = rect.left + panelWidth <= vw;\n if (fitsBelow && fitsRight) return 'bottom-left';\n if (fitsBelow && !fitsRight) return 'bottom-right';\n if (!fitsBelow && fitsRight) return 'top-left';\n return 'top-right';\n}\n\nexport const PickerPopover: React.FC<PickerPopoverProps> = ({\n isOpen,\n onClose,\n anchorRef,\n children,\n position = 'bottom-left',\n appendToBody = false,\n className,\n trapFocus = true,\n closeOnClickOutside = true,\n closeOnEscape = true,\n ariaLabel,\n ariaLabelledBy,\n role = 'dialog',\n id,\n}) => {\n const panelRef = useRef<HTMLDivElement>(null);\n const [resolved, setResolved] = useState<ResolvedPosition>({\n position: position === 'auto' ? 'bottom-left' : position,\n });\n\n const updatePosition = useCallback(() => {\n if (!isBrowser || !isOpen) return;\n const anchor = anchorRef.current;\n const panel = panelRef.current;\n if (!anchor || !panel) return;\n const rect = anchor.getBoundingClientRect();\n const panelRect = panel.getBoundingClientRect();\n const w = panelRect.width;\n const h = panelRect.height;\n const finalPos = position === 'auto' ? resolveAuto(rect, w, h) : position;\n if (!appendToBody) {\n setResolved({ position: finalPos });\n return;\n }\n let top = 0;\n let left = 0;\n switch (finalPos) {\n case 'bottom-left':\n top = rect.bottom + 4;\n left = rect.left;\n break;\n case 'bottom-right':\n top = rect.bottom + 4;\n left = rect.right - w;\n break;\n case 'top-left':\n top = rect.top - h - 4;\n left = rect.left;\n break;\n case 'top-right':\n top = rect.top - h - 4;\n left = rect.right - w;\n break;\n }\n setResolved({ position: finalPos, top, left });\n }, [anchorRef, appendToBody, isOpen, position]);\n\n useLayoutEffect(() => {\n if (!isOpen) return undefined;\n updatePosition();\n if (!isBrowser) return undefined;\n const handler = () => updatePosition();\n window.addEventListener('resize', handler, { passive: true });\n window.addEventListener('scroll', handler, {\n passive: true,\n capture: true,\n });\n return () => {\n window.removeEventListener('resize', handler);\n window.removeEventListener('scroll', handler, { capture: true });\n };\n }, [isOpen, updatePosition]);\n\n useEffect(() => {\n if (!isOpen || !closeOnClickOutside || !isBrowser) return undefined;\n // Listen on `pointerdown` (rather than `mousedown`) so touch starts\n // outside the popover dismiss it on mobile — including swipe-from-outside\n // gestures, where the synthetic mouse event would otherwise lag a few\n // hundred ms behind the actual touch.\n const handler = (e: PointerEvent) => {\n const path = e.composedPath();\n if (panelRef.current && path.includes(panelRef.current)) return;\n if (anchorRef.current && path.includes(anchorRef.current)) return;\n onClose();\n };\n document.addEventListener('pointerdown', handler);\n return () => document.removeEventListener('pointerdown', handler);\n }, [isOpen, closeOnClickOutside, anchorRef, onClose]);\n\n useEffect(() => {\n if (!isOpen || !closeOnEscape || !isBrowser) return undefined;\n const handler = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.stopPropagation();\n onClose();\n }\n };\n document.addEventListener('keydown', handler);\n return () => document.removeEventListener('keydown', handler);\n }, [isOpen, closeOnEscape, onClose]);\n\n useFocusTrap(panelRef, isOpen && trapFocus);\n\n const panelClass = usePrefixedClassNames('picker-popover', {\n 'is-active': isOpen,\n [`is-${resolved.position}`]: true,\n 'is-portal': appendToBody,\n });\n\n if (!isOpen) return null;\n\n const style: React.CSSProperties = appendToBody\n ? {\n position: 'fixed',\n top: resolved.top,\n left: resolved.left,\n }\n : {};\n\n const panel = (\n <div\n ref={panelRef}\n id={id}\n role={role}\n aria-modal={role === 'dialog' ? 'false' : undefined}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n tabIndex={-1}\n className={classNames(panelClass, className)}\n style={style}\n >\n {children}\n </div>\n );\n\n if (appendToBody && isBrowser) {\n return createPortal(panel, document.body);\n }\n return panel;\n};\n\nPickerPopover.displayName = 'PickerPopover';\n\nexport default PickerPopover;\n","import { useEffect, useState } from 'react';\n\nexport interface NativeMobileDetect {\n isCoarsePointer: boolean;\n isSmallViewport: boolean;\n shouldUseNative: boolean;\n}\n\nexport interface UseNativeMobilePickerOptions {\n smallViewportMaxPx?: number;\n /** When set, overrides detection. */\n force?: boolean;\n}\n\nexport function useNativeMobilePicker(\n options: UseNativeMobilePickerOptions = {}\n): NativeMobileDetect {\n const { smallViewportMaxPx = 768, force } = options;\n const [state, setState] = useState<NativeMobileDetect>({\n isCoarsePointer: false,\n isSmallViewport: false,\n shouldUseNative: force === true,\n });\n\n useEffect(() => {\n const isBrowser =\n typeof window !== 'undefined' && typeof window.matchMedia === 'function';\n if (!isBrowser) return undefined;\n const coarse = window.matchMedia('(pointer: coarse)');\n const small = window.matchMedia(`(max-width: ${smallViewportMaxPx}px)`);\n\n const update = () => {\n const isCoarsePointer = coarse.matches;\n const isSmallViewport = small.matches;\n const shouldUseNative =\n force === true\n ? true\n : force === false\n ? false\n : isCoarsePointer && isSmallViewport;\n setState({ isCoarsePointer, isSmallViewport, shouldUseNative });\n };\n\n update();\n const subscribe = (mql: MediaQueryList, fn: () => void) => {\n if (mql.addEventListener) {\n // eslint-disable-next-line @eslint-react/web-api-no-leaked-event-listener -- cleanup returned below and run in the effect teardown\n mql.addEventListener('change', fn);\n return () => mql.removeEventListener('change', fn);\n }\n // Older Safari fallback\n mql.addListener(fn);\n return () => mql.removeListener(fn);\n };\n const unsubCoarse = subscribe(coarse, update);\n const unsubSmall = subscribe(small, update);\n return () => {\n unsubCoarse();\n unsubSmall();\n };\n }, [smallViewportMaxPx, force]);\n\n return state;\n}\n","/**\n * Segment-map utility for manual keyboard entry on a date / time picker input.\n * Given a token-format string like `'YYYY-MM-DD'`, `'HH:mm:ss'`, `'hh:mm A'`,\n * or a combined `'YYYY-MM-DD HH:mm'`, we compute the character ranges of each\n * editable segment in the formatted output, plus arithmetic helpers\n * (increment / digit-set) for each kind.\n *\n * Variable-width tokens (`Y`, `YYY`, `M`, `D`, `H`, `h`, `m`, `s`) cause the\n * renderer to emit output of unpredictable width depending on value, which\n * would shift segment boundaries between renders and break the selection.\n * `buildSegmentMap` returns `null` for any format containing those, signalling\n * the caller to fall back to free-form text entry.\n */\n\nimport { addYears } from './dateUtils';\n\nexport type SegmentKind =\n | 'year'\n | 'month'\n | 'day'\n | 'hours'\n | 'minutes'\n | 'seconds'\n | 'ampm'\n | 'literal';\n\nexport interface Segment {\n kind: SegmentKind;\n /** Source token (e.g., `'HH'`) for editable segments; literal text for `'literal'`. */\n token: string;\n /** Inclusive char index into the formatted-string output. */\n start: number;\n /** Exclusive char index. */\n end: number;\n /** Populated only when `kind === 'hours'`. */\n hourFormat?: '12' | '24';\n}\n\nexport interface SegmentMap {\n segments: Segment[];\n /** Indices of non-literal segments, left to right. */\n editable: number[];\n}\n\n// Match longest tokens first so `HH` doesn't collapse to two `H`s and `YYYY`\n// doesn't collapse to `YY` + `YY`. The single-char and odd-width variants\n// (`Y`, `YYY`, `M`, `D`, `H`, `h`, `m`, `s`) are matched only so they can be\n// explicitly rejected below — otherwise a format like `'YYY-MM'` would\n// silently mis-tokenize as `YY` + a stray `Y`.\nconst TOKEN_REGEX = /YYYY|YYY|YY|Y|MM|M|DD|D|HH|hh|mm|ss|H|h|m|s|A|a/g;\n\n// Fixed-width tokens render the same number of chars on every value. All are 2\n// wide except the 4-digit year.\nconst tokenWidth = (token: string): number => (token === 'YYYY' ? 4 : 2);\n\nconst KIND_BY_TOKEN: Record<string, SegmentKind> = {\n YYYY: 'year',\n YY: 'year',\n MM: 'month',\n DD: 'day',\n HH: 'hours',\n hh: 'hours',\n mm: 'minutes',\n ss: 'seconds',\n A: 'ampm',\n a: 'ampm',\n};\n\n/**\n * Walk a token-format string and produce a {@link SegmentMap}, or `null` if\n * the format contains any variable-width tokens (`H`, `h`, `m`, `s`) — the\n * caller should treat that case as \"segment mode unsupported, use the input's\n * free-form text-entry fallback\".\n */\nexport function buildSegmentMap(format: string): SegmentMap | null {\n const segments: Segment[] = [];\n let cursor = 0;\n let renderedPos = 0;\n // Reset the regex's lastIndex from any previous use (it's a /g regex).\n TOKEN_REGEX.lastIndex = 0;\n let match: RegExpExecArray | null;\n while ((match = TOKEN_REGEX.exec(format)) !== null) {\n const token = match[0];\n\n // Reject variable / odd-width tokens — they render an unpredictable number\n // of characters, which would break fixed segment boundaries.\n if (\n token === 'H' ||\n token === 'h' ||\n token === 'm' ||\n token === 's' ||\n token === 'M' ||\n token === 'D' ||\n token === 'Y' ||\n token === 'YYY'\n ) {\n return null;\n }\n\n // Capture any literal text between the previous cursor and this match.\n if (match.index > cursor) {\n const literal = format.slice(cursor, match.index);\n segments.push({\n kind: 'literal',\n token: literal,\n start: renderedPos,\n end: renderedPos + literal.length,\n });\n renderedPos += literal.length;\n }\n\n const kind = KIND_BY_TOKEN[token];\n const width = tokenWidth(token);\n const seg: Segment = {\n kind,\n token,\n start: renderedPos,\n end: renderedPos + width,\n };\n if (kind === 'hours') seg.hourFormat = token === 'hh' ? '12' : '24';\n segments.push(seg);\n\n renderedPos += width;\n cursor = match.index + token.length;\n }\n\n // Trailing literal after the final token.\n if (cursor < format.length) {\n const literal = format.slice(cursor);\n segments.push({\n kind: 'literal',\n token: literal,\n start: renderedPos,\n end: renderedPos + literal.length,\n });\n }\n\n const editable: number[] = [];\n for (let i = 0; i < segments.length; i++) {\n if (segments[i].kind !== 'literal') editable.push(i);\n }\n // Defensive: a format with no editable token is not segment-editable.\n if (editable.length === 0) return null;\n return { segments, editable };\n}\n\n// ---------------------------------------------------------------------------\n// Arithmetic helpers\n// ---------------------------------------------------------------------------\n\nconst wrap = (n: number, max: number): number => ((n % max) + max) % max;\nconst clamp = (n: number, min: number, max: number): number =>\n Math.max(min, Math.min(max, n));\n\n/** Number of days in the month of `d` (handles leap Februarys). */\nconst daysInMonth = (d: Date): number =>\n new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate();\n\n/**\n * Returns a new Date with the given segment incremented (`delta` = +1 or -1).\n * Wraps at segment boundaries: year is unbounded, month 0↔11 (in place, no\n * year roll), day within the current month's length, hours-24 0↔23, hours-12\n * 1↔12, minutes/seconds 0↔59, am/pm toggles. Day is re-clamped after a\n * month/year change (Jan 31 → Feb 28/29). `isPm` is the *current* meridiem\n * when editing a 12h hour segment so we preserve it across the increment;\n * date segments ignore it.\n */\nexport function incrementSegmentValue(\n segment: Segment,\n currentDate: Date,\n delta: number,\n isPm: boolean\n): Date {\n const next = new Date(currentDate);\n switch (segment.kind) {\n case 'year':\n // Unbounded ±1; addYears clamps Feb 29 → Feb 28 on non-leap targets.\n return addYears(next, delta);\n case 'month': {\n // In-place wrap Jan↔Dec without rolling the year, then clamp the day to\n // the new month's length (e.g. Jan 31 → Feb → day 28/29).\n const day = next.getDate();\n const m0 = wrap(next.getMonth() + delta, 12);\n next.setDate(1);\n next.setMonth(m0);\n next.setDate(Math.min(day, daysInMonth(next)));\n return next;\n }\n case 'day': {\n // Wrap within the current month's day count.\n const dim = daysInMonth(next);\n next.setDate(wrap(next.getDate() - 1 + delta, dim) + 1);\n return next;\n }\n case 'hours': {\n if (segment.hourFormat === '12') {\n const h = next.getHours();\n const displayed = h % 12 === 0 ? 12 : h % 12; // 1..12\n // Move within 1..12 and preserve the current AM/PM.\n const nextDisplayed = wrap(displayed - 1 + delta, 12) + 1;\n const next24 = isPm ? (nextDisplayed % 12) + 12 : nextDisplayed % 12;\n next.setHours(next24);\n } else {\n next.setHours(wrap(next.getHours() + delta, 24));\n }\n return next;\n }\n case 'minutes':\n next.setMinutes(wrap(next.getMinutes() + delta, 60));\n return next;\n case 'seconds':\n next.setSeconds(wrap(next.getSeconds() + delta, 60));\n return next;\n case 'ampm':\n // Toggle by shifting 12 hours in either direction.\n next.setHours((next.getHours() + 12) % 24);\n return next;\n default:\n return next;\n }\n}\n\n/**\n * Apply a buffered string of typed digits to the active segment. Returns the\n * updated Date plus an `advance` flag — `true` when the buffer is full (its\n * token width) or when the first digit alone forecloses any valid multi-digit\n * completion (e.g., first digit `3` for hours-24 since 30+ is out of range, or\n * `2` for month since there is no month 20+).\n *\n * Special cases: a leading `'0'` is held without committing for hours-12,\n * month, and day (00 isn't a valid display value for any of them) — the buffer\n * must reach `'0X'` first. Month/day writes clamp to range and re-clamp the\n * day to the month's length; year writes re-clamp the day across leap-year\n * boundaries.\n */\nexport function setSegmentValue(\n segment: Segment,\n currentDate: Date,\n rawDigits: string,\n isPm: boolean\n): { date: Date; advance: boolean } {\n if (rawDigits.length === 0) return { date: currentDate, advance: false };\n const value = parseInt(rawDigits, 10);\n if (Number.isNaN(value)) return { date: currentDate, advance: false };\n const next = new Date(currentDate);\n switch (segment.kind) {\n case 'year': {\n // YYYY buffers 4 digits; YY buffers 2 (mapped into the 2000s).\n const full = segment.token === 'YYYY';\n const maxLen = full ? 4 : 2;\n const yr = full ? value : 2000 + (value % 100);\n // Set day to 1 before changing the year so a Feb-29 source doesn't roll\n // into March on a non-leap target; then restore the clamped day.\n const day = next.getDate();\n next.setDate(1);\n next.setFullYear(yr);\n next.setDate(Math.min(day, daysInMonth(next)));\n return { date: next, advance: rawDigits.length >= maxLen };\n }\n case 'month': {\n if (rawDigits === '0') {\n // Hold: 00 is invalid; wait for the second digit (01..09).\n return { date: currentDate, advance: false };\n }\n const clamped = clamp(value, 1, 12);\n const day = next.getDate();\n next.setDate(1);\n next.setMonth(clamped - 1);\n next.setDate(Math.min(day, daysInMonth(next)));\n // Advance when buffer is full, or first digit >=2 (no month 20+). First\n // digit 1 still waits for 10/11/12.\n const advance = rawDigits.length >= 2 || value >= 2;\n return { date: next, advance };\n }\n case 'day': {\n if (rawDigits === '0') {\n // Hold: 00 is invalid; wait for the second digit (01..09).\n return { date: currentDate, advance: false };\n }\n const clamped = clamp(value, 1, daysInMonth(next));\n next.setDate(clamped);\n // Advance when buffer is full, or first digit >=4 (no day 40+). First\n // digit 3 still waits for 30/31.\n const advance = rawDigits.length >= 2 || value >= 4;\n return { date: next, advance };\n }\n case 'hours': {\n if (segment.hourFormat === '12') {\n if (rawDigits === '0') {\n // Don't commit yet; wait for the second digit (01..09 are valid).\n return { date: currentDate, advance: false };\n }\n const clamped = clamp(value, 1, 12);\n const h24 = isPm ? (clamped % 12) + 12 : clamped % 12;\n next.setHours(h24);\n // Advance when the buffer is full, or when no valid 2-digit\n // completion starting with this digit exists. For 12h: only 0 and 1\n // can be the first of a 2-digit value (giving 01..09 and 10..12);\n // any other first digit completes the segment.\n const advance = rawDigits.length >= 2 || value >= 2;\n return { date: next, advance };\n }\n // 24h: valid range 0..23.\n const clamped = clamp(value, 0, 23);\n next.setHours(clamped);\n // Advance when buffer is full, or when first digit is 3..9 (since\n // 30..99 are all out of range). First digits 0, 1, 2 can still accept\n // a second digit.\n const advance = rawDigits.length >= 2 || value >= 3;\n return { date: next, advance };\n }\n case 'minutes': {\n const clamped = clamp(value, 0, 59);\n next.setMinutes(clamped);\n // Advance when buffer full, or first digit 6..9 (can't form 60..99).\n const advance = rawDigits.length >= 2 || value >= 6;\n return { date: next, advance };\n }\n case 'seconds': {\n const clamped = clamp(value, 0, 59);\n next.setSeconds(clamped);\n const advance = rawDigits.length >= 2 || value >= 6;\n return { date: next, advance };\n }\n default:\n return { date: currentDate, advance: false };\n }\n}\n\n/** Force the meridiem of `currentDate` to AM (isPm=false) or PM (true). */\nexport function setAmPm(currentDate: Date, isPm: boolean): Date {\n const next = new Date(currentDate);\n const h = next.getHours();\n if (isPm && h < 12) next.setHours(h + 12);\n if (!isPm && h >= 12) next.setHours(h - 12);\n return next;\n}\n\n/** Map a caret position into the index of the segment that contains it. */\nexport function segmentIndexAtCaret(\n map: SegmentMap,\n caret: number\n): number | null {\n // Prefer an editable segment that strictly contains the caret; otherwise\n // the nearest editable segment by char distance.\n for (const idx of map.editable) {\n const s = map.segments[idx];\n if (caret >= s.start && caret <= s.end) return idx;\n }\n let bestIdx = map.editable[0] ?? null;\n let bestDist = Infinity;\n for (const idx of map.editable) {\n const s = map.segments[idx];\n const dist = Math.min(Math.abs(caret - s.start), Math.abs(caret - s.end));\n if (dist < bestDist) {\n bestDist = dist;\n bestIdx = idx;\n }\n }\n return bestIdx;\n}\n","import React, {\n useCallback,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { DateFormatOption } from './formatters';\nimport { isWithin } from './dateUtils';\nimport {\n buildSegmentMap,\n incrementSegmentValue,\n setSegmentValue,\n setAmPm,\n segmentIndexAtCaret,\n SegmentMap,\n} from './segmentMap';\n\n/**\n * Single-character literals that, when typed, jump the caret to the next\n * editable segment — the slash / colon / dash / dot / space separators that\n * appear between date and time tokens. Lets a user type `12/25/2026` or\n * `13:45` straight through, skipping over the format's punctuation.\n */\nconst SEPARATOR_RE = /[/:\\-.\\s]/;\n\nexport interface UseSegmentedEntryParams {\n /** Resolved format actually used to render (the host's default format). */\n format: DateFormatOption;\n /** Current canonical value (controlled or internal). */\n value: Date | null;\n /** Commit a new Date through the host's onChange / internal pipeline. */\n commitValue: (next: Date | null) => void;\n /** Host formatter: formatDate | formatTime | formatDateTime. */\n formatFn: (\n d: Date,\n fmt: DateFormatOption | undefined,\n locale?: string\n ) => string;\n /** Host parser used by the free-form fallback (parseDate / parseTime / custom). */\n tryParse: (s: string) => Date | null;\n /** Host's displayed-text state and setter (the hook drives it during edits). */\n text: string;\n setText: (s: string) => void;\n /**\n * Seed for an empty value when the user starts typing: Time → today at noon,\n * Date → today at 00:00, DateTime → now. Should be referentially stable.\n */\n makeBaseDate: () => Date;\n locale?: string;\n min?: Date;\n max?: Date;\n /**\n * Host-supplied blocking predicate (composed from shouldDisableDate /\n * unselectableDates / unselectableTimes). Checked alongside min/max on\n * every manual-entry commit; return true to reject the candidate value.\n */\n isBlocked?: (d: Date) => boolean;\n disabled?: boolean;\n readOnly?: boolean;\n /** Allow segmented typing. When false, segment mode never engages. */\n editable?: boolean;\n /** Whether a popover exists; gates open-on-focus / click / ArrowDown. */\n popover?: boolean;\n openOnFocus?: boolean;\n closeOnSelect?: boolean;\n isOpen: boolean;\n setOpen: (next: boolean) => void;\n inputRef: React.RefObject<HTMLInputElement | null>;\n containerRef: React.RefObject<HTMLElement | null>;\n onFocus?: React.FocusEventHandler<HTMLInputElement>;\n onClick?: React.MouseEventHandler<HTMLInputElement>;\n onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;\n onBlur?: React.FocusEventHandler<HTMLInputElement>;\n}\n\nexport interface UseSegmentedEntryResult {\n segmentMap: SegmentMap | null;\n activeSegmentIdx: number | null;\n /** True when segment typing is available (map + editable + not disabled/readOnly). */\n segmentEditable: boolean;\n /** True when a segment is actively selected. */\n inSegmentMode: boolean;\n /** Spread onto the combobox `<input>`. */\n inputHandlers: {\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n onFocus: React.FocusEventHandler<HTMLInputElement>;\n onClick: React.MouseEventHandler<HTMLInputElement>;\n onKeyDown: React.KeyboardEventHandler<HTMLInputElement>;\n onBlur: React.FocusEventHandler<HTMLInputElement>;\n };\n}\n\n/**\n * Segmented manual keyboard entry for a date / time picker input. Computes a\n * segment map from the token format, tracks the active segment, and returns\n * the full set of `<input>` event handlers — segment-mutating keys (arrows,\n * digits, AM/PM, separators) are handled here, while popover open/close and\n * free-form parse-on-blur/Enter are driven through the host-supplied\n * `setOpen` / `tryParse` / `commitValue` callbacks. When the format is an\n * `Intl` options object or contains variable-width tokens, the segment map is\n * null and the input transparently falls back to free-form text entry.\n */\nexport function useSegmentedEntry(\n params: UseSegmentedEntryParams\n): UseSegmentedEntryResult {\n const {\n format,\n value,\n commitValue,\n formatFn,\n tryParse,\n text,\n setText,\n makeBaseDate,\n locale,\n min,\n max,\n isBlocked,\n disabled,\n readOnly,\n editable = true,\n popover = true,\n openOnFocus = true,\n closeOnSelect = false,\n isOpen,\n setOpen,\n inputRef,\n containerRef,\n onFocus,\n onClick,\n onKeyDown,\n onBlur,\n } = params;\n\n const segmentMap: SegmentMap | null = useMemo(\n () => (typeof format === 'string' ? buildSegmentMap(format) : null),\n [format]\n );\n const [activeSegmentIdx, setActiveSegmentIdx] = useState<number | null>(null);\n // Buffer of digits typed within the current segment, cleared on segment\n // change. Kept in a ref because key handlers read+update synchronously\n // within the same event tick.\n const typedDigitsRef = useRef<string>('');\n\n // Segment mode is unavailable for disabled / read-only / non-editable\n // pickers and for Intl-options / variable-width formats (segmentMap null).\n const segmentEditable = !!segmentMap && !!editable && !disabled && !readOnly;\n\n // The Date we edit when the user starts without a current value.\n const segmentBaseDate = useCallback(\n (): Date => value ?? makeBaseDate(),\n [value, makeBaseDate]\n );\n\n // Single gate for every manual-entry commit: min/max bounds plus the\n // host's blocking predicate.\n const isAllowed = useCallback(\n (d: Date) => isWithin(d, min, max) && !isBlocked?.(d),\n [min, max, isBlocked]\n );\n\n // Apply a segment-driven date update: commit through the host pipeline (so\n // onChange / controlled mode keep working) and re-render the text so the\n // active selection range stays valid.\n const applyDateFromSegment = useCallback(\n (next: Date) => {\n if (!isAllowed(next)) return;\n commitValue(next);\n setText(formatFn(next, format, locale));\n },\n [commitValue, isAllowed, formatFn, format, locale, setText]\n );\n\n // After every segment-driven change, restore the system selection on the\n // active segment's char range. useLayoutEffect runs synchronously before\n // paint so the user never sees a stray caret position. We deliberately do\n // NOT gate on document.activeElement: when openOnFocus is true the focus\n // trap moves focus into the popover, but setSelectionRange on an unfocused\n // input is well-defined and the selection becomes visible on refocus.\n useLayoutEffect(() => {\n if (activeSegmentIdx === null || !segmentMap || !inputRef.current) return;\n const seg = segmentMap.segments[activeSegmentIdx];\n if (!seg) return;\n try {\n inputRef.current.setSelectionRange(seg.start, seg.end);\n } catch {\n // Some read-only inputs reject setSelectionRange; harmless.\n }\n }, [activeSegmentIdx, segmentMap, text, inputRef]);\n\n const moveSegment = useCallback(\n (delta: 1 | -1) => {\n if (!segmentMap || activeSegmentIdx === null) return;\n const pos = segmentMap.editable.indexOf(activeSegmentIdx);\n if (pos < 0) return;\n const nextPos = Math.max(\n 0,\n Math.min(segmentMap.editable.length - 1, pos + delta)\n );\n const nextIdx = segmentMap.editable[nextPos];\n if (nextIdx !== activeSegmentIdx) {\n typedDigitsRef.current = '';\n setActiveSegmentIdx(nextIdx);\n }\n },\n [segmentMap, activeSegmentIdx]\n );\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n // In segment mode the text is managed programmatically (every edit\n // re-formats from the canonical Date). Browser-issued input events\n // would otherwise clobber it. The free-form path runs only when\n // segment mode is inactive.\n if (activeSegmentIdx !== null && segmentEditable) return;\n setText(e.target.value);\n },\n [activeSegmentIdx, segmentEditable, setText]\n );\n\n const handleBlur = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n // The popover opens on focus by default, and the focus trap moves focus\n // into the popover panel — that fires this blur even though the user is\n // still in the same picker. Only tear down segment state and re-parse\n // when focus has truly left the picker's container.\n const nextFocus = e.relatedTarget as HTMLElement | null;\n const stayingInPicker =\n nextFocus !== null &&\n containerRef.current !== null &&\n containerRef.current.contains(nextFocus);\n if (stayingInPicker) {\n onBlur?.(e);\n return;\n }\n setActiveSegmentIdx(null);\n typedDigitsRef.current = '';\n const parsed = tryParse(text);\n if (parsed && isAllowed(parsed)) {\n commitValue(parsed);\n } else {\n setText(value ? formatFn(value, format, locale) : '');\n }\n onBlur?.(e);\n },\n [\n containerRef,\n tryParse,\n text,\n isAllowed,\n commitValue,\n value,\n formatFn,\n format,\n locale,\n setText,\n onBlur,\n ]\n );\n\n const handleFocus = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n if (openOnFocus && popover && !disabled && !readOnly) setOpen(true);\n // Enter segment mode: prime an initial value (so editing works even when\n // empty), seed the text, and highlight the first editable segment.\n if (segmentEditable && segmentMap) {\n if (!value) {\n setText(formatFn(makeBaseDate(), format, locale));\n }\n typedDigitsRef.current = '';\n setActiveSegmentIdx(segmentMap.editable[0]);\n }\n onFocus?.(e);\n },\n [\n openOnFocus,\n popover,\n disabled,\n readOnly,\n setOpen,\n segmentEditable,\n segmentMap,\n value,\n makeBaseDate,\n formatFn,\n format,\n locale,\n setText,\n onFocus,\n ]\n );\n\n const handleClick = useCallback(\n (e: React.MouseEvent<HTMLInputElement>) => {\n // Clicking the field opens the popover only when `openOnFocus` is on —\n // a click is just a focus. With `openOnFocus={false}` (manual-entry\n // mode) the click positions the caret for typing and the popover is\n // opened explicitly via the right launcher button (or ArrowDown).\n if (openOnFocus && popover && !disabled && !readOnly) setOpen(true);\n if (segmentEditable && segmentMap && inputRef.current) {\n const caret = inputRef.current.selectionStart ?? 0;\n const idx = segmentIndexAtCaret(segmentMap, caret);\n if (idx !== null && idx !== activeSegmentIdx) {\n typedDigitsRef.current = '';\n setActiveSegmentIdx(idx);\n }\n }\n onClick?.(e);\n },\n [\n openOnFocus,\n popover,\n disabled,\n readOnly,\n setOpen,\n segmentEditable,\n segmentMap,\n inputRef,\n activeSegmentIdx,\n onClick,\n ]\n );\n\n const inSegmentMode =\n segmentEditable && segmentMap !== null && activeSegmentIdx !== null;\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n // Segment-mode key routing comes first. When segment mode isn't engaged\n // (not editable, no map, or no active segment — e.g. after a typed-text\n // fallback), unhandled keys fall through to the popover / free-form\n // handling below.\n if (inSegmentMode && segmentMap && activeSegmentIdx !== null) {\n const seg = segmentMap.segments[activeSegmentIdx];\n const base = segmentBaseDate();\n const isPm = base.getHours() >= 12;\n switch (e.key) {\n case 'ArrowUp':\n e.preventDefault();\n typedDigitsRef.current = '';\n applyDateFromSegment(incrementSegmentValue(seg, base, 1, isPm));\n return;\n case 'ArrowDown':\n e.preventDefault();\n typedDigitsRef.current = '';\n applyDateFromSegment(incrementSegmentValue(seg, base, -1, isPm));\n return;\n case 'ArrowRight':\n e.preventDefault();\n moveSegment(1);\n return;\n case 'ArrowLeft':\n e.preventDefault();\n moveSegment(-1);\n return;\n case 'Backspace':\n e.preventDefault();\n if (typedDigitsRef.current.length > 0) {\n typedDigitsRef.current = '';\n } else {\n moveSegment(-1);\n }\n return;\n case 'Escape':\n if (isOpen) {\n e.preventDefault();\n setOpen(false);\n }\n return;\n case 'Enter':\n e.preventDefault();\n if (closeOnSelect) setOpen(false);\n return;\n case 'Tab':\n setActiveSegmentIdx(null);\n typedDigitsRef.current = '';\n return;\n default:\n // AM/PM keys.\n if (seg.kind === 'ampm') {\n if (e.key === 'a' || e.key === 'A') {\n e.preventDefault();\n typedDigitsRef.current = '';\n applyDateFromSegment(setAmPm(base, false));\n moveSegment(1);\n return;\n }\n if (e.key === 'p' || e.key === 'P') {\n e.preventDefault();\n typedDigitsRef.current = '';\n applyDateFromSegment(setAmPm(base, true));\n moveSegment(1);\n return;\n }\n }\n // Typing a format separator (/, :, -, ., space) jumps to the next\n // segment, skipping over the literal punctuation.\n if (e.key.length === 1 && SEPARATOR_RE.test(e.key)) {\n e.preventDefault();\n typedDigitsRef.current = '';\n moveSegment(1);\n return;\n }\n // Digit entry for numeric segments.\n if (/^[0-9]$/.test(e.key) && seg.kind !== 'ampm') {\n e.preventDefault();\n const nextBuffer = typedDigitsRef.current + e.key;\n typedDigitsRef.current = nextBuffer;\n const { date, advance } = setSegmentValue(\n seg,\n base,\n nextBuffer,\n isPm\n );\n applyDateFromSegment(date);\n if (advance) {\n typedDigitsRef.current = '';\n moveSegment(1);\n }\n return;\n }\n }\n }\n // ----- free-form / popover key handling -----\n if (e.key === 'ArrowDown' && !isOpen && popover) {\n e.preventDefault();\n setOpen(true);\n return;\n }\n if (e.key === 'Escape' && isOpen) {\n e.preventDefault();\n setOpen(false);\n return;\n }\n if (e.key === 'Enter') {\n e.preventDefault();\n const parsed = tryParse(text);\n if (parsed && isAllowed(parsed)) {\n commitValue(parsed);\n if (closeOnSelect) setOpen(false);\n }\n }\n onKeyDown?.(e);\n },\n [\n inSegmentMode,\n segmentMap,\n activeSegmentIdx,\n segmentBaseDate,\n applyDateFromSegment,\n moveSegment,\n isOpen,\n setOpen,\n closeOnSelect,\n popover,\n tryParse,\n text,\n isAllowed,\n commitValue,\n onKeyDown,\n ]\n );\n\n return {\n segmentMap,\n activeSegmentIdx,\n segmentEditable,\n inSegmentMode,\n inputHandlers: {\n onChange: handleChange,\n onFocus: handleFocus,\n onClick: handleClick,\n onKeyDown: handleKeyDown,\n onBlur: handleBlur,\n },\n };\n}\n","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 DayOfWeek,\n PickerLabels,\n mergeLabels,\n} from './_pickerInternals/pickerTypes';\nimport {\n formatDate,\n parseDate,\n DateFormatOption,\n DEFAULT_DATE_FORMAT,\n} from './_pickerInternals/formatters';\nimport { isWithin, clampDate, isSameDay } from './_pickerInternals/dateUtils';\nimport { Calendar } from './_pickerInternals/Calendar';\nimport { PickerPopover } from './_pickerInternals/PickerPopover';\nimport { useNativeMobilePicker } from './_pickerInternals/useNativeMobilePicker';\nimport { useSegmentedEntry } from './_pickerInternals/useSegmentedEntry';\nimport { Icon } from '../elements/Icon';\n\nconst toIsoDate = (d: Date): string =>\n `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`;\n\nconst fromIsoDate = (s: string): Date | null => {\n const m = /^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(s);\n if (!m) return null;\n return new Date(Number(m[1]), Number(m[2]) - 1, Number(m[3]));\n};\n\n/**\n * Props for the raw DateInput base. Use the higher-level `DateInput` for\n * Field/Control composition; `DateInputBase` is the input + popover only.\n */\nexport interface DateInputBaseProps\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 date. */\n value?: Date | null;\n /** Initial date 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 /** Earliest selectable date. */\n min?: Date;\n /** Latest selectable date. */\n max?: Date;\n /** Disable the input. */\n disabled?: boolean;\n /** Make the input read-only. */\n readOnly?: boolean;\n /** Placeholder text for the input. */\n placeholder?: string;\n /**\n * Token format string or `Intl.DateTimeFormat` options. Default `'YYYY-MM-DD'`.\n * @defaultValue 'YYYY-MM-DD'\n */\n format?: DateFormatOption;\n /** Custom parser (use when `format` is `Intl.DateTimeFormatOptions`). */\n parse?: (s: string) => Date | null;\n /** BCP-47 locale tag for day/month names and Intl formatting. */\n locale?: string;\n /** Render the calendar inline (no popover). */\n inline?: boolean;\n /** Use `<input type=\"date\">` on coarse-pointer + small-viewport devices. */\n mobileNative?: boolean | 'auto';\n /** Allow segmented keyboard typing in the input (type the date directly, auto-advancing across segments). `false` makes the field picker-only. */\n editable?: boolean;\n /** Whether the calendar popover exists. `false` makes the field input-only (segmented typing, no popover). */\n popover?: boolean;\n /** Open the popover when the input is focused. */\n openOnFocus?: boolean;\n /** Close the popover after a date is selected. */\n closeOnSelect?: boolean;\n /** Popover anchor position relative to the input. */\n position?: PickerPosition;\n /** Render the popover into `document.body` via portal. */\n appendToBody?: boolean;\n /** Bulma color modifier. */\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 /** Predicate to disable specific dates (e.g. weekends). Blocked dates are also rejected during manual typing. */\n shouldDisableDate?: (d: Date) => boolean;\n /** Convenience array of disabled dates; merged with `shouldDisableDate`. Matched by calendar day and also rejected during manual typing. */\n unselectableDates?: Date[];\n /** Day the week starts on (0 = Sunday). */\n firstDayOfWeek?: DayOfWeek;\n /** Override the 7 day-name labels (in calendar order, post-rotation). */\n dayNames?: string[];\n /** Override the 12 month-name labels. */\n monthNames?: string[];\n /** Show dimmed dates from adjacent months in the grid. */\n nearbyMonthDays?: boolean;\n /** Decorative left icon glyph for the wrapping `Control` (shown by default). Set `''` to hide. */\n iconLeftName?: string;\n /** Show a clickable launcher button on the right that toggles the popover. Default `true`. */\n triggerIcon?: boolean;\n /** Glyph for the right launcher button. */\n triggerIconName?: string;\n /** Optional translatable string overrides (ARIA labels, button text). */\n labels?: PickerLabels;\n}\n\n/**\n * Raw DateInput — input + popover calendar without Field/Control wrapping.\n * Use `DateInput` for the convenience wrapper.\n *\n * @function\n * @param {DateInputBaseProps} props\n * @returns {JSX.Element}\n */\nexport const DateInputBase = forwardRef<HTMLInputElement, DateInputBaseProps>(\n (props, ref) => {\n const {\n value: controlledValue,\n defaultValue,\n onChange,\n onOpen,\n onClose,\n min,\n max,\n disabled,\n readOnly,\n placeholder,\n format,\n parse,\n locale,\n inline = false,\n mobileNative = 'auto',\n editable = true,\n popover = true,\n openOnFocus = true,\n closeOnSelect = true,\n position = 'bottom-left',\n appendToBody = false,\n color,\n size,\n isRounded,\n shouldDisableDate,\n unselectableDates,\n firstDayOfWeek = 0,\n dayNames,\n monthNames,\n nearbyMonthDays = true,\n className,\n name,\n form,\n required,\n id,\n onFocus,\n onClick,\n onKeyDown,\n onBlur,\n iconLeftName: _iconLeftName,\n triggerIcon = true,\n triggerIconName = 'chevron-down',\n labels,\n ...rest\n } = props;\n\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 initialFocused = useMemo(\n () => clampDate(value ?? new Date(), min, max),\n // intentionally only on mount: keep focusedDate stable until value/open change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n []\n );\n const [focusedDate, setFocusedDate] = useState<Date>(initialFocused);\n // Re-clamp focusedDate if min/max change after mount so the focused cell\n // never disappears outside the displayable range.\n useEffect(() => {\n setFocusedDate(prev => clampDate(prev, min, max));\n }, [min, max]);\n const [open, setOpenState] = useState(false);\n const [text, setText] = useState<string>(\n value ? formatDate(value, format, locale) : ''\n );\n\n const inputRef = useRef<HTMLInputElement>(null);\n const containerRef = useRef<HTMLDivElement>(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 } = useNativeMobilePicker({\n force: mobileNative === 'auto' ? undefined : mobileNative,\n });\n const useNative = !inline && shouldUseNative;\n\n const inputClass = usePrefixedClassNames('input', {\n [`is-${color}`]: !!color,\n [`is-${size}`]: !!size,\n 'is-rounded': isRounded,\n });\n const containerClass = usePrefixedClassNames('dateinput-container');\n const triggerClass = usePrefixedClassNames('dateinput-trigger');\n\n const setOpen = useCallback(\n (next: boolean) => {\n setOpenState(prev => {\n if (prev === next) return prev;\n if (next) onOpen?.();\n else onClose?.();\n return next;\n });\n },\n [onOpen, onClose]\n );\n\n // Sync displayed text with value when value changes externally.\n useEffect(() => {\n setText(value ? formatDate(value, format, locale) : '');\n }, [value, format, locale]);\n\n const commitValue = useCallback(\n (next: Date | null) => {\n if (!isControlled) setInternalValue(next);\n // Keep the calendar's focused cell tracking typed / parsed values.\n if (next) setFocusedDate(next);\n onChange?.(next);\n },\n [isControlled, onChange]\n );\n\n const handleSelect = useCallback(\n (d: Date) => {\n if (!isWithin(d, min, max)) return;\n commitValue(d);\n setFocusedDate(d);\n if (closeOnSelect) setOpen(false);\n },\n [min, max, commitValue, closeOnSelect, setOpen]\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 : parseDate(trimmed, fmt ?? DEFAULT_DATE_FORMAT, locale);\n },\n [parse, format, locale]\n );\n\n // The Date the user edits when starting without a current value (today at\n // midnight; the hook clamps to min/max on commit).\n const makeBaseDate = useCallback((): Date => {\n const d = new Date();\n d.setHours(0, 0, 0, 0);\n return d;\n }, []);\n\n const inputReadOnlyAttr = !!readOnly || !editable;\n const canOpen = !!popover && !disabled && !readOnly;\n\n // Blocking predicate for manual entry, matching the calendar's\n // disabled-cell logic (shouldDisableDate + unselectableDates by day).\n const isBlocked = useMemo(() => {\n if (!shouldDisableDate && !unselectableDates?.length) return undefined;\n return (d: Date) =>\n !!shouldDisableDate?.(d) ||\n !!unselectableDates?.some(u => isSameDay(u, d));\n }, [shouldDisableDate, unselectableDates]);\n\n const { inputHandlers } = useSegmentedEntry({\n format: format ?? DEFAULT_DATE_FORMAT,\n value,\n commitValue,\n formatFn: formatDate,\n tryParse,\n text,\n setText,\n makeBaseDate,\n locale,\n min,\n max,\n isBlocked,\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 handlePopoverClose = useCallback(() => setOpen(false), [setOpen]);\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 // Native mobile path renders <input type=\"date\">.\n if (useNative) {\n return (\n <input\n {...cleanRest}\n ref={combinedRef}\n type=\"date\"\n className={classNames(inputClass, bulmaHelperClasses, className)}\n value={value ? toIsoDate(value) : ''}\n onChange={e => {\n const parsed = e.target.value ? fromIsoDate(e.target.value) : null;\n commitValue(parsed);\n }}\n min={min ? toIsoDate(min) : undefined}\n max={max ? toIsoDate(max) : 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 calendar = (\n <Calendar\n value={value}\n focusedDate={focusedDate}\n onSelect={handleSelect}\n onFocusedDateChange={setFocusedDate}\n min={min}\n max={max}\n shouldDisableDate={shouldDisableDate}\n unselectableDates={unselectableDates}\n firstDayOfWeek={firstDayOfWeek}\n locale={locale}\n dayNames={dayNames}\n monthNames={monthNames}\n nearbyMonthDays={nearbyMonthDays}\n color={color}\n size={size}\n id={popoverId}\n autoFocusCell={open}\n labels={labels}\n />\n );\n\n if (inline) {\n return (\n <div\n {...cleanRest}\n ref={containerRef}\n className={classNames(containerClass, bulmaHelperClasses, className)}\n >\n {calendar}\n {name && (\n <input\n type=\"hidden\"\n name={name}\n form={form}\n value={value ? toIsoDate(value) : ''}\n required={required}\n />\n )}\n </div>\n );\n }\n\n return (\n <div\n ref={containerRef}\n className={classNames(containerClass, bulmaHelperClasses, className)}\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.chooseDate}\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 isOpen={open}\n onClose={handlePopoverClose}\n anchorRef={containerRef}\n position={position}\n appendToBody={appendToBody}\n ariaLabel={t.chooseDate}\n id={popoverId}\n >\n {calendar}\n </PickerPopover>\n )}\n </div>\n );\n }\n);\n\nDateInputBase.displayName = 'DateInputBase';\n\nexport default DateInputBase;\n","import React, { forwardRef } from 'react';\nimport { usePrefixedClassNames } from '../helpers/classNames';\nimport { Field, FieldProps } from './Field';\nimport { Control, ControlBaseProps } from './Control';\nimport { DateInputBase, DateInputBaseProps } from './DateInputBase';\nimport { useInsideField, useInsideControl } from './FormContext';\nimport { useAutoLabelId } from './useAutoLabelId';\n\n/**\n * Props for the DateInput convenience wrapper. Extends `DateInputBaseProps`\n * with Field-level (label, horizontal) and Control-level (icons, loading) props.\n * @extraProp {string} [name] - Form field name. Forwarded to a hidden ISO-formatted input.\n * @extraProp {string} [form] - Form id the input belongs to.\n * @extraProp {boolean} [required=false] - Marks the input as required.\n * @extraProp {string} [className] - Additional CSS classes for the input.\n * @extraProp {React.Ref<HTMLInputElement>} [ref] - Forwarded to the underlying `<input>`.\n */\nexport interface DateInputProps extends DateInputBaseProps {\n /** Field label (component auto-wraps in a `Field` if not already inside). Automatically associated with the input via `htmlFor` — uses your `id` when provided, otherwise a generated one. Not wired in `inline` mode (no visible input to label) and dropped inside an outer `Field`. */\n label?: React.ReactNode;\n /** Size for the label. */\n labelSize?: FieldProps['labelSize'];\n /** Props for the label element. An explicit `htmlFor` here overrides the automatic association (no id is generated then). */\n labelProps?: FieldProps['labelProps'];\n /** Render the field with horizontal layout. */\n horizontal?: boolean;\n /** Icon props for the left icon. */\n iconLeft?: ControlBaseProps['iconLeft'];\n /** Icon props for the right icon. */\n iconRight?: ControlBaseProps['iconRight'];\n /** Shortcut for the right icon name. */\n iconRightName?: string;\n /** Shortcut for left icon size. */\n iconLeftSize?: ControlBaseProps['iconLeftSize'];\n /** Shortcut for right icon size. */\n iconRightSize?: ControlBaseProps['iconRightSize'];\n /** Force the left icon container. */\n hasIconsLeft?: boolean;\n /** Force the right icon container. */\n hasIconsRight?: boolean;\n /** Show a loading indicator on the control. */\n isLoading?: boolean;\n /** Expand the control to fill its container. */\n isExpanded?: boolean;\n /** Size of the wrapping Control. */\n controlSize?: ControlBaseProps['size'];\n /** Help/validation text below the input. */\n message?: React.ReactNode;\n /** Color modifier for the help message. */\n messageColor?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Additional CSS classes for the Field wrapper. */\n fieldClassName?: string;\n /** Additional CSS classes for the Control wrapper. */\n controlClassName?: string;\n}\n\n/**\n * The `DateInput` component is a form input that opens a popover calendar for date selection.\n *\n * @function\n * @param {DateInputProps} props - Props for the DateInput.\n * @returns {JSX.Element}\n *\n * @example\n * <DateInput label=\"Date of birth\" defaultValue={new Date(1990, 0, 1)} />\n *\n * @example\n * <DateInput\n * label=\"Booking\"\n * min={new Date()}\n * shouldDisableDate={d => d.getDay() === 0 || d.getDay() === 6}\n * />\n */\nexport const DateInput = forwardRef<HTMLInputElement, DateInputProps>(\n (\n {\n label,\n labelSize,\n labelProps,\n horizontal,\n iconLeft,\n iconRight,\n iconLeftName = 'calendar',\n iconRightName,\n iconLeftSize,\n iconRightSize,\n hasIconsLeft,\n hasIconsRight,\n isLoading,\n isExpanded,\n controlSize,\n message,\n messageColor,\n fieldClassName,\n controlClassName,\n ...baseProps\n },\n ref\n ) => {\n const insideField = useInsideField();\n const insideControl = useInsideControl();\n const { controlId, fieldLabelProps } = useAutoLabelId({\n label,\n id: baseProps.id,\n labelProps,\n // Inline mode renders a bare calendar with no input to label.\n rendersLabel: !insideField && !baseProps.inline,\n });\n const helpClass = usePrefixedClassNames('help', {\n [`is-${messageColor}`]: !!messageColor,\n });\n\n // The right-side launcher is on by default; suppress it while the Control\n // shows its loading spinner (also on the right) unless explicitly set.\n let content: React.ReactNode = (\n <DateInputBase\n ref={ref}\n id={controlId}\n {...baseProps}\n triggerIcon={baseProps.triggerIcon ?? !isLoading}\n />\n );\n\n // Inline mode renders a bare calendar with no input, so the Control's\n // icon-left container has nothing to anchor to. Skip the Control wrap.\n if (!insideControl && !baseProps.inline) {\n content = (\n <Control\n iconLeft={iconLeft}\n iconRight={iconRight}\n iconLeftName={iconLeftName}\n iconRightName={iconRightName}\n iconLeftSize={iconLeftSize}\n iconRightSize={iconRightSize}\n hasIconsLeft={hasIconsLeft || !!iconLeftName}\n hasIconsRight={hasIconsRight}\n isLoading={isLoading}\n isExpanded={isExpanded}\n size={controlSize}\n className={controlClassName}\n >\n {content}\n </Control>\n );\n }\n\n const messageEl = message ? <p className={helpClass}>{message}</p> : null;\n\n if (!insideField) {\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\nDateInput.displayName = 'DateInput';\n\nexport default DateInput;\n","/**\n * Tiny haptic blip used to signal each item tick on the time-wheel scroller.\n *\n * Implementation: feature-detect `navigator.vibrate()` and call it with a\n * 5ms duration. Supported on Android Chrome (since v30), Firefox Android,\n * and Samsung Internet. Silently no-ops elsewhere.\n *\n * iOS Safari does not expose `navigator.vibrate` and has no other web-\n * accessible haptic API as of May 2026. We previously shipped a fallback\n * that toggled a hidden `<input type=\"checkbox\" switch>` element via\n * `.click()` — that produced toggle haptics on iOS 17.4 through 26.4, but\n * Apple patched the loophole in iOS 26.5: haptics now only fire on\n * genuine, user-initiated taps on a visible switch, not on programmatic\n * invocation. There is no public WebKit ticket for the patch; it's\n * documented in the `tijnjh/ios-haptics` README and downstream community\n * write-ups. The Web Audio \"silent buffer\" trick unlocks audio playback\n * but never produced Taptic Engine output. PWAs added to the Home Screen\n * use the same WebKit and gain no extra haptic capability.\n *\n * If you need haptics on iOS, the only path today is wrapping the web view\n * in a native shell (Capacitor, react-native-webview) and bridging to\n * `UIImpactFeedbackGenerator`. Pure web cannot do it.\n */\nexport const tickHaptic = (): void => {\n if (\n typeof navigator !== 'undefined' &&\n typeof navigator.vibrate === 'function'\n ) {\n try {\n navigator.vibrate(5);\n } catch {\n // Some browsers throw on hidden documents — swallow.\n }\n }\n};\n","/**\n * Audio-tick fallback for platforms with no haptic API. iOS Safari has no\n * web-accessible Taptic path (see `./haptics.ts` for the full story), so the\n * closest UX substitute is a very short audible thunk played per item tick.\n *\n * Sound design — tuned to read as a body-felt impact, not an ear-felt beep:\n *\n * - Single triangle-wave oscillator at 160Hz, exponentially sweeping down to\n * 110Hz over ~30ms. The low fundamental matches the frequency band where\n * the Taptic Engine fires its UI pops (~150–200Hz); the downward sweep is\n * the single biggest contributor to the perception of a damped physical\n * impact (vs. a flat tone, which reads as a beep).\n *\n * - Triangle adds one odd harmonic over sine — just enough body to feel\n * \"soft\" without the buzz of square or sawtooth.\n *\n * - Quick 1ms attack to 0.08 gain; exponential decay to silence over ~30ms;\n * oscillator stops at +0.04s. Ramped envelope (no hard 0→1 jumps) avoids\n * the classic Web Audio speaker pop on attack/release.\n *\n * - Uses a single oscillator + envelope rather than an audio buffer /\n * decoded sample so there's no asset to ship and no `decodeAudioData`\n * round-trip.\n *\n * - iOS Safari requires a user gesture to *resume* a suspended\n * `AudioContext`. Call `unlockAudioTick()` from inside a touch / click\n * handler before the first `playAudioTick()`. After that single resume,\n * the context stays running and subsequent ticks play with no further\n * gesture needed.\n *\n * - Silent / Ring switch behaviour on iOS: with the side switch in silent\n * mode, this tick is suppressed (Web Audio respects the ringer). That\n * matches iOS native UX expectations — silent mode means silent UI.\n *\n * - On hardware with neither speakers nor an audio device, every call\n * silently no-ops.\n */\n\nlet audioCtx: AudioContext | null = null;\n\ninterface WindowWithWebkitAudio extends Window {\n // `AudioContext` lives on `typeof globalThis`, which a plain `Window` cast\n // drops — declare both the standard and the legacy webkit-prefixed ctor.\n AudioContext?: typeof AudioContext;\n webkitAudioContext?: typeof AudioContext;\n}\n\nconst getAudioContextCtor = (): typeof AudioContext | null => {\n if (typeof window === 'undefined') return null;\n const w = window as WindowWithWebkitAudio;\n return w.AudioContext ?? w.webkitAudioContext ?? null;\n};\n\nconst ensureAudioCtx = (): AudioContext | null => {\n if (audioCtx) return audioCtx;\n const Ctor = getAudioContextCtor();\n if (!Ctor) return null;\n try {\n audioCtx = new Ctor();\n return audioCtx;\n } catch {\n return null;\n }\n};\n\n/**\n * Call from inside a user-gesture handler (pointerdown, click, touchstart)\n * to resume the AudioContext on iOS Safari. Idempotent and cheap; safe to\n * call on every gesture. No-ops on platforms without Web Audio.\n */\nexport const unlockAudioTick = (): void => {\n const ctx = ensureAudioCtx();\n if (!ctx) return;\n if (ctx.state === 'suspended') {\n // Fire-and-forget: if the resume promise rejects (no gesture in\n // progress), the next call from a real gesture will succeed.\n void ctx.resume().catch(() => {});\n }\n};\n\n/**\n * Play a single short tick. No-op if Web Audio is unavailable or the\n * context hasn't been unlocked yet.\n */\nexport const playAudioTick = (): void => {\n const ctx = ensureAudioCtx();\n if (!ctx || ctx.state !== 'running') return;\n try {\n const now = ctx.currentTime;\n const osc = ctx.createOscillator();\n const gain = ctx.createGain();\n osc.type = 'triangle';\n // Pitch sweep: 160Hz → 110Hz over 30ms. The downward exponential ramp\n // is what makes this read as a damped impact rather than a flat beep.\n osc.frequency.setValueAtTime(160, now);\n osc.frequency.exponentialRampToValueAtTime(110, now + 0.03);\n // Envelope: 1ms attack to 0.08, exponential-style decay to near-zero\n // over 30ms. `exponentialRampToValueAtTime` requires a strictly\n // positive target — 0.0001 is inaudible and stops cleanly.\n gain.gain.setValueAtTime(0, now);\n gain.gain.linearRampToValueAtTime(0.08, now + 0.001);\n gain.gain.exponentialRampToValueAtTime(0.0001, now + 0.03);\n osc.connect(gain).connect(ctx.destination);\n osc.start(now);\n osc.stop(now + 0.04);\n } catch {\n // Connecting / starting an oscillator in an aborted context can throw;\n // best-effort, never propagate.\n }\n};\n\n/** Test-only hook to drop the singleton AudioContext. */\nexport const __resetAudioTickForTest = (): void => {\n if (audioCtx) {\n try {\n void audioCtx.close();\n } catch {\n // ignore\n }\n }\n audioCtx = null;\n};\n","/* eslint-disable react-hooks/refs --\n * This wheel/momentum picker intentionally accesses refs during render:\n * - state is mirrored into refs (positionRef, audioTickEnabledRef) so the\n * RAF/drag/tick callbacks read the latest values in lockstep with rendering\n * (refactoring to effect-synced refs would desync drag from the frame);\n * - a MediaQueryList is lazily cached in a ref (reducedMotionMqlRef);\n * - per-column Wheel handle refs build the keyboard focus order.\n * These are deliberate, established patterns; behavior is covered by unit tests\n * and certified interactively in-browser (drag, ticks, keyboard focus nav).\n */\nimport React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n classNames,\n prefixedClassNames,\n usePrefixedClassNames,\n} from '../../helpers/classNames';\nimport { useConfig } from '../../helpers/Config';\nimport { HourFormat, PickerLabels, mergeLabels } from './pickerTypes';\nimport { setTimeOfDay } from './dateUtils';\nimport { tickHaptic as fireTickHaptic } from './haptics';\nimport { playAudioTick, unlockAudioTick } from './audioTick';\n\nexport interface TimeWheelsValue {\n hours: number;\n minutes: number;\n seconds?: number;\n}\n\nexport interface TimeWheelsProps {\n value: TimeWheelsValue;\n onChange: (v: TimeWheelsValue) => void;\n hourFormat?: HourFormat;\n enableSeconds?: boolean;\n /** Step between visible values in the wheel. Default `1`. */\n incrementHours?: number;\n incrementMinutes?: number;\n incrementSeconds?: number;\n unselectableTimes?: (d: Date) => boolean;\n size?: 'small' | 'medium' | 'large';\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n disabled?: boolean;\n className?: string;\n id?: string;\n labels?: PickerLabels;\n /** Number of items visible at once (must be odd). Default 5. */\n visibleCount?: number;\n /** Item height in px. Default 32. */\n itemHeight?: number;\n /**\n * Play a short audible tick on each item crossing. Useful as a fallback on\n * iOS Safari, where there is no web-accessible haptic API. Off by default\n * to avoid surprising users with sound; flip on for iOS-targeted UIs.\n */\n audioTick?: boolean;\n /**\n * Fired when the user presses Enter on a wheel column. The current value is\n * already committed (each wheel-tick calls onChange), so this typically just\n * needs to close the surrounding popover.\n */\n onCommit?: () => void;\n}\n\nconst wrap = (n: number, max: number): number => ((n % max) + max) % max;\n\n/**\n * Walk forward (or backward) from `start` in `step` steps until `test` returns\n * true or we've cycled all `max` candidates. Used to skip past unselectable\n * values without freezing the wheel.\n */\nfunction nextValid(\n start: number,\n step: number,\n max: number,\n test: (n: number) => boolean\n): number {\n let candidate = wrap(start, max);\n for (let i = 0; i < max; i++) {\n if (test(candidate)) return candidate;\n candidate = wrap(candidate + step, max);\n }\n return start;\n}\n\nconst pad2 = (n: number): string => String(n).padStart(2, '0');\n\ninterface WheelHandle {\n focus: () => void;\n /**\n * Begin a drag externally — used by the parent's empty-space forwarder so\n * the user can grab the wheel by touching anywhere in the wheels row, not\n * just on the column itself (matches iOS native picker behavior).\n *\n * The pointer must already be active (i.e., a real `pointerdown` is in\n * flight). We immediately capture the pointer on the wheel root so the\n * existing `onPointerMove` / `onPointerUp` handlers will fire here.\n */\n startDrag: (pointerId: number, clientY: number) => void;\n}\n\ninterface WheelProps<T> {\n values: T[];\n index: number;\n onChange: (nextIndex: number) => void;\n formatLabel: (v: T) => string;\n formatAriaText?: (v: T) => string;\n ariaLabel: string;\n visibleCount: number;\n itemHeight: number;\n disabled?: boolean;\n size?: 'small' | 'medium' | 'large';\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n onFocusPrev?: () => void;\n onFocusNext?: () => void;\n /** Fired when Enter is pressed (current value is already committed live). */\n onCommit?: () => void;\n /**\n * Whether the wheel wraps at the edges. When true, scrolling past the last\n * value rolls back to the first (and vice versa) and neighbouring values\n * are visible above the first / below the last item.\n */\n wrap?: boolean;\n /**\n * Optional predicate. Items for which it returns `true` are rendered with\n * the `disabled` attribute (and visually dimmed via the `:disabled` SCSS\n * rule), giving users a clear cue that the value is blocked. Keyboard /\n * wheel navigation may still pass over these positions, but `onChange`\n * callers (`TimeWheels`) skip them via `nextValid`.\n */\n disabledFor?: (v: T) => boolean;\n /**\n * Play an audible tick on each item crossing. Used as the iOS substitute\n * for haptic feedback; threaded from `TimeWheels.audioTick`.\n */\n audioTick?: boolean;\n}\n\nconst WheelInner = <T,>(\n {\n values,\n index,\n onChange,\n formatLabel,\n formatAriaText,\n ariaLabel,\n visibleCount,\n itemHeight,\n disabled,\n size,\n color,\n onFocusPrev,\n onFocusNext,\n onCommit,\n wrap = false,\n disabledFor,\n audioTick = false,\n }: WheelProps<T>,\n ref: React.Ref<WheelHandle>\n) => {\n const { classPrefix } = useConfig();\n const N = values.length;\n const half = Math.floor(visibleCount / 2);\n const containerHeight = visibleCount * itemHeight;\n // Buffer around the visible window so adjacent items animate in/out smoothly.\n const BUFFER = half + 2;\n\n // Continuous wheel position in units of items. Math.round(position) is the\n // \"active\" virtual index; the fractional part is the drag/momentum offset\n // within an item slot. Using a single float (rather than virtualIdx +\n // dragOffset) keeps drag and tick-update in lockstep so items move with the\n // finger without a 40px overshoot when crossing item boundaries.\n const [position, setPosition] = useState<number>(index);\n const positionRef = useRef<number>(index);\n positionRef.current = position;\n const [isDragging, setIsDragging] = useState(false);\n const rootRef = useRef<HTMLDivElement>(null);\n // Ref to the stationary selection band — populated by the JSX below. The\n // band briefly scales + brightens on each item tick so users perceive a\n // body-felt \"thunk\" even on iOS where no haptic API exists.\n const bandRef = useRef<HTMLDivElement>(null);\n // Cached MediaQueryList for `prefers-reduced-motion`. We read this on\n // every tick to decide whether to fire the band pulse; caching the MQL\n // saves a `matchMedia` call per tick (which can fire at ~20Hz during a\n // momentum flick).\n const reducedMotionMqlRef = useRef<MediaQueryList | null>(null);\n if (\n reducedMotionMqlRef.current === null &&\n typeof window !== 'undefined' &&\n typeof window.matchMedia === 'function'\n ) {\n reducedMotionMqlRef.current = window.matchMedia(\n '(prefers-reduced-motion: reduce)'\n );\n }\n // In-flight band pulse animation (Web Animations API). Tracked so we can\n // cancel on unmount; the WAI's `composite: 'replace'` semantics handle\n // re-trigger automatically without us needing to cancel between ticks.\n const pulseAnimRef = useRef<Animation | null>(null);\n // True while the external `index` prop sync useEffect runs, so we don't\n // fire a haptic blip when the parent updates the value programmatically.\n const isSyncingRef = useRef<boolean>(false);\n\n // Tiny haptic/audio/visual blip per item tick. Haptic uses\n // `navigator.vibrate` where available (Android Chrome / Firefox Android /\n // Samsung Internet); iOS has no web-accessible haptic path as of May\n // 2026, so the optional `audioTick` plays a low-frequency thunk as the\n // closest UX substitute. The visual band-pulse fires on every tick on\n // every platform (gated only by `prefers-reduced-motion`) so the\n // selection band feels reactive — visual reinforcement of the tactile\n // feedback. We skip all three during programmatic prop sync so a parent\n // re-render doesn't blip.\n const audioTickEnabledRef = useRef<boolean>(audioTick);\n audioTickEnabledRef.current = audioTick;\n const playBandPulse = useCallback(() => {\n const el = bandRef.current;\n if (!el || typeof el.animate !== 'function') return;\n if (reducedMotionMqlRef.current?.matches) return;\n // Compound scale + brightness pulse, peaking at 40% through the 110ms\n // duration. `composite: 'replace'` means a re-trigger mid-pulse cleanly\n // restarts rather than queueing — important at fling rates where ticks\n // can fire every ~50ms.\n pulseAnimRef.current = el.animate(\n [\n { transform: 'scale(1)', filter: 'brightness(1)' },\n {\n transform: 'scale(1.04)',\n filter: 'brightness(1.15)',\n offset: 0.4,\n },\n { transform: 'scale(1)', filter: 'brightness(1)' },\n ],\n { duration: 110, easing: 'ease-out', composite: 'replace' }\n );\n }, []);\n const tickFeedback = useCallback(() => {\n /* istanbul ignore next: the sync flag is only true synchronously inside the prop-sync effect, which sets position directly and never routes through commitPosition */\n if (isSyncingRef.current) return;\n fireTickHaptic();\n if (audioTickEnabledRef.current) playAudioTick();\n playBandPulse();\n }, [playBandPulse]);\n const dragStateRef = useRef<{\n pointerId: number | null;\n startY: number;\n startPosition: number;\n captured: boolean;\n samples: { t: number; y: number }[];\n }>({\n pointerId: null,\n startY: 0,\n startPosition: 0,\n captured: false,\n samples: [],\n });\n // RAF id for the in-flight momentum / snap animation, so we can cancel when\n // the user grabs the wheel again or the component unmounts.\n const rafIdRef = useRef<number | null>(null);\n\n const virtualIdx = Math.round(position);\n\n const cancelRaf = useCallback(() => {\n if (rafIdRef.current !== null) {\n cancelAnimationFrame(rafIdRef.current);\n rafIdRef.current = null;\n }\n }, []);\n\n useEffect(\n () => () => {\n cancelRaf();\n // Cancel any in-flight band pulse so it doesn't keep a reference to\n // a detached DOM node. WAI Animation.cancel() is safe to call even\n // if the animation has already finished.\n pulseAnimRef.current?.cancel();\n pulseAnimRef.current = null;\n },\n [cancelRaf]\n );\n\n React.useImperativeHandle(\n ref,\n () => ({\n focus: () => rootRef.current?.focus(),\n startDrag: (pointerId: number, clientY: number) => {\n /* istanbul ignore next: the empty-space forwarder (sole caller) already returns on the same disabled prop */\n if (disabled) return;\n cancelRaf();\n if (audioTickEnabledRef.current) unlockAudioTick();\n const now =\n typeof performance !== 'undefined' ? performance.now() : Date.now();\n dragStateRef.current = {\n pointerId,\n startY: clientY,\n startPosition: positionRef.current,\n // Skip the drag-threshold gate: the parent forwarder has already\n // decided this is a drag (a pointerdown landed on empty space,\n // which has no click target).\n captured: true,\n samples: [{ t: now, y: clientY }],\n };\n try {\n rootRef.current?.setPointerCapture(pointerId);\n } catch {\n // setPointerCapture can throw if the pointer isn't currently\n // active for this element; the existing onPointerMove handler\n // still matches on pointerId so the drag will work either way.\n }\n setIsDragging(true);\n },\n }),\n [disabled, cancelRaf]\n );\n\n // Resolve a virtualIdx into an actual values[] index (modulo wrap if `wrap`).\n const toActual = useCallback(\n (v: number) => {\n if (wrap) return ((v % N) + N) % N;\n return Math.max(0, Math.min(N - 1, v));\n },\n [wrap, N]\n );\n\n const clampPosition = useCallback(\n (p: number) => {\n if (wrap) return p;\n return Math.max(0, Math.min(N - 1, p));\n },\n [wrap, N]\n );\n\n // Update position and fire onChange if the rounded value changed.\n const commitPosition = useCallback(\n (next: number) => {\n const clamped = clampPosition(next);\n const prevRound = Math.round(positionRef.current);\n const nextRound = Math.round(clamped);\n positionRef.current = clamped;\n setPosition(clamped);\n if (nextRound !== prevRound) {\n onChange(toActual(nextRound));\n tickFeedback();\n }\n },\n [clampPosition, onChange, toActual, tickFeedback]\n );\n\n // When the external `index` changes (e.g. from typed input), re-sync\n // position to the closest virtual position that maps to it.\n //\n // Crucial subtlety: this effect re-runs every time the parent value\n // changes — including the round-trip case where the user's own scroll\n // commits a tick → fires onChange → parent re-renders with the new\n // index → here. If we cancelled the in-flight momentum/snap RAF on\n // every such echo, the snap would never get to land on an integer\n // (the user's wheel would stop wherever the last tick fired). So we\n // bail out early when the rounded position already matches the\n // incoming index — the echo case — and only cancel + apply an actual\n // jump when the parent has moved us somewhere we don't already round\n // to.\n useEffect(() => {\n const prev = positionRef.current;\n const wrappedRoundPrev = ((Math.round(prev) % N) + N) % N;\n if (wrappedRoundPrev === index) return;\n cancelRaf();\n isSyncingRef.current = true;\n setPosition(prevPos => {\n if (!wrap) {\n positionRef.current = index;\n return index;\n }\n const wrappedPrev = ((prevPos % N) + N) % N;\n const forward = (index - wrappedPrev + N) % N;\n const backward = forward - N;\n const delta =\n Math.abs(forward) <= Math.abs(backward) ? forward : backward;\n const next = prevPos + delta;\n positionRef.current = next;\n return next;\n });\n isSyncingRef.current = false;\n }, [index, N, wrap, cancelRaf]);\n\n const moveBy = useCallback(\n (delta: number) => {\n if (disabled) return;\n cancelRaf();\n commitPosition(Math.round(positionRef.current) + delta);\n },\n [disabled, cancelRaf, commitPosition]\n );\n\n const onKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n switch (e.key) {\n case 'ArrowUp':\n e.preventDefault();\n moveBy(-1);\n break;\n case 'ArrowDown':\n e.preventDefault();\n moveBy(1);\n break;\n case 'PageUp':\n e.preventDefault();\n moveBy(-5);\n break;\n case 'PageDown':\n e.preventDefault();\n moveBy(5);\n break;\n case 'Home':\n e.preventDefault();\n if (disabled) break;\n cancelRaf();\n commitPosition(0);\n break;\n case 'End':\n e.preventDefault();\n if (disabled) break;\n cancelRaf();\n commitPosition(N - 1);\n break;\n case 'ArrowLeft':\n e.preventDefault();\n onFocusPrev?.();\n break;\n case 'ArrowRight':\n e.preventDefault();\n onFocusNext?.();\n break;\n case 'Enter':\n e.preventDefault();\n onCommit?.();\n break;\n }\n },\n [\n moveBy,\n disabled,\n commitPosition,\n cancelRaf,\n N,\n onFocusPrev,\n onFocusNext,\n onCommit,\n ]\n );\n\n // Animate position to the nearest integer with ease-out cubic. Used after a\n // drag / momentum settles, so the wheel always rests aligned to an item.\n const animateSnap = useCallback(() => {\n cancelRaf();\n const start = positionRef.current;\n const target = Math.round(start);\n if (start === target) return;\n const duration = 180;\n const startTime =\n typeof performance !== 'undefined' ? performance.now() : Date.now();\n const tick = (now: number) => {\n const t = Math.min(1, (now - startTime) / duration);\n const eased = 1 - Math.pow(1 - t, 3);\n const next = start + (target - start) * eased;\n commitPosition(next);\n if (t < 1) {\n rafIdRef.current = requestAnimationFrame(tick);\n } else {\n rafIdRef.current = null;\n }\n };\n rafIdRef.current = requestAnimationFrame(tick);\n }, [cancelRaf, commitPosition]);\n\n // Kinetic momentum after a flick. Uses exponential friction so the velocity\n // tapers smoothly. Updates `position` in items/ms; commitPosition handles\n // the onChange ticks as virtualIdx crosses integers.\n const startMomentum = useCallback(\n (initialPxPerMs: number) => {\n cancelRaf();\n // Drag-up (negative dy/dt in screen coords) should INCREASE position\n // (later values come into view), so flip the sign.\n let velocity = -initialPxPerMs / itemHeight; // items / ms\n // Cap initial velocity so a frantic swipe doesn't blast through the\n // whole list. Empirically tuned to match iOS feel.\n const MAX_VEL = 0.05; // items/ms (≈ 50 items/sec)\n if (velocity > MAX_VEL) velocity = MAX_VEL;\n if (velocity < -MAX_VEL) velocity = -MAX_VEL;\n const STOP_VEL = 0.0015; // items/ms (≈ 1.5 items/sec)\n // Friction coefficient per millisecond — chosen so velocity halves\n // every ~120ms.\n const FRICTION_PER_MS = Math.pow(0.5, 1 / 120);\n let lastTime =\n typeof performance !== 'undefined' ? performance.now() : Date.now();\n const tick = (now: number) => {\n const dt = Math.max(1, now - lastTime);\n lastTime = now;\n let next = positionRef.current + velocity * dt;\n // Boundary handling for non-wrapping wheels: clamp and zero the\n // velocity so we don't keep ticking against the wall.\n if (!wrap) {\n if (next <= 0) {\n next = 0;\n velocity = 0;\n } else if (next >= N - 1) {\n next = N - 1;\n velocity = 0;\n }\n }\n commitPosition(next);\n velocity *= Math.pow(FRICTION_PER_MS, dt);\n if (Math.abs(velocity) < STOP_VEL) {\n animateSnap();\n return;\n }\n rafIdRef.current = requestAnimationFrame(tick);\n };\n rafIdRef.current = requestAnimationFrame(tick);\n },\n [cancelRaf, commitPosition, itemHeight, wrap, N, animateSnap]\n );\n\n // Mouse wheel: accumulate deltaY across events and step when the\n // accumulator crosses SCROLL_STEP_PX. Trackpads emit dozens of small\n // events per swipe; without accumulation a single gesture flies the wheel.\n useEffect(() => {\n const el = rootRef.current;\n if (!el || disabled) return undefined;\n const SCROLL_STEP_PX = 60;\n const QUIET_MS = 250;\n let accumulated = 0;\n let resetTimer: ReturnType<typeof setTimeout> | null = null;\n const resetAccumulator = () => {\n accumulated = 0;\n };\n const onWheel = (e: WheelEvent) => {\n e.preventDefault();\n // Reset accumulator if scroll direction reversed mid-gesture.\n if (accumulated !== 0 && Math.sign(accumulated) !== Math.sign(e.deltaY)) {\n accumulated = 0;\n }\n accumulated += e.deltaY;\n while (Math.abs(accumulated) >= SCROLL_STEP_PX) {\n if (accumulated > 0) {\n moveBy(1);\n accumulated -= SCROLL_STEP_PX;\n } else {\n moveBy(-1);\n accumulated += SCROLL_STEP_PX;\n }\n }\n if (resetTimer) clearTimeout(resetTimer);\n resetTimer = setTimeout(resetAccumulator, QUIET_MS);\n };\n el.addEventListener('wheel', onWheel, { passive: false });\n return () => {\n el.removeEventListener('wheel', onWheel);\n if (resetTimer) clearTimeout(resetTimer);\n };\n }, [moveBy, disabled]);\n\n // Pointer drag.\n // We DELAY capturing the pointer until the user moves more than\n // DRAG_THRESHOLD_PX. Without this, capturing on pointerdown would redirect\n // mouseup → wheel root, which suppresses the click event on the item button\n // the user pressed (so single-clicks on neighbouring items would no-op).\n const DRAG_THRESHOLD_PX = 4;\n const onPointerDown = (e: React.PointerEvent<HTMLDivElement>) => {\n if (disabled) return;\n cancelRaf();\n if (audioTickEnabledRef.current) {\n // Resume the AudioContext from inside the user gesture so the first\n // tick of this drag can play (iOS Safari requires this; other browsers\n // are forgiving but it's a cheap idempotent call).\n unlockAudioTick();\n }\n const now =\n typeof performance !== 'undefined' ? performance.now() : Date.now();\n dragStateRef.current = {\n pointerId: e.pointerId,\n startY: e.clientY,\n startPosition: positionRef.current,\n captured: false,\n samples: [{ t: now, y: e.clientY }],\n };\n };\n const onPointerMove = (e: React.PointerEvent<HTMLDivElement>) => {\n const s = dragStateRef.current;\n if (s.pointerId !== e.pointerId) return;\n const dy = e.clientY - s.startY;\n if (!s.captured) {\n if (Math.abs(dy) < DRAG_THRESHOLD_PX) return;\n rootRef.current?.setPointerCapture(e.pointerId);\n s.captured = true;\n setIsDragging(true);\n }\n const now =\n typeof performance !== 'undefined' ? performance.now() : Date.now();\n s.samples.push({ t: now, y: e.clientY });\n // Keep the velocity sample window short so the post-flick velocity\n // reflects the *recent* finger speed, not the whole-drag average.\n const VELOCITY_WINDOW_MS = 100;\n while (s.samples.length > 2 && now - s.samples[0].t > VELOCITY_WINDOW_MS) {\n s.samples.shift();\n }\n // Continuous position: every itemHeight worth of finger drag advances\n // the wheel by 1 unit. Pulling the finger DOWN (positive dy) shows\n // EARLIER values, which means position decreases.\n commitPosition(s.startPosition - dy / itemHeight);\n };\n const onPointerUp = (e: React.PointerEvent<HTMLDivElement>) => {\n const s = dragStateRef.current;\n if (s.pointerId !== e.pointerId) return;\n if (s.captured) {\n rootRef.current?.releasePointerCapture(e.pointerId);\n // Drags don't fire click → focus would be left on whichever child\n // received pointerdown. Pull it back to the wheel root so :focus\n // emphasis still reads correctly after a drag.\n rootRef.current?.focus();\n // Compute fling velocity from the recent sample window.\n const samples = s.samples;\n let pxPerMs = 0;\n if (samples.length >= 2) {\n const first = samples[0];\n const last = samples[samples.length - 1];\n const dt = last.t - first.t;\n if (dt > 0) pxPerMs = (last.y - first.y) / dt;\n }\n // Threshold below which we just snap to the nearest item; above which\n // we kick off momentum.\n const FLING_THRESHOLD = 0.25; // px/ms ≈ 250 px/sec\n if (Math.abs(pxPerMs) > FLING_THRESHOLD) {\n startMomentum(pxPerMs);\n } else {\n animateSnap();\n }\n }\n s.pointerId = null;\n s.captured = false;\n s.samples = [];\n setIsDragging(false);\n };\n\n const rootClass = prefixedClassNames(classPrefix, 'timeinput-wheel', {\n [`is-${color}`]: !!color,\n [`is-${size}`]: !!size,\n 'is-disabled': disabled,\n 'is-dragging': isDragging,\n });\n const itemClass = (selected: boolean) =>\n prefixedClassNames(classPrefix, 'timeinput-wheel-item', {\n 'is-selected': selected,\n [`is-${color}`]: selected && !!color,\n });\n const bandClass = prefixedClassNames(classPrefix, 'timeinput-wheel-band', {\n [`is-${color}`]: !!color,\n });\n\n // Build the buffered window of items to render around the current position.\n const items: { vIdx: number; aIdx: number }[] = [];\n for (let off = -BUFFER; off <= BUFFER; off++) {\n const vIdx = virtualIdx + off;\n if (!wrap && (vIdx < 0 || vIdx >= N)) continue;\n const aIdx = toActual(vIdx);\n items.push({ vIdx, aIdx });\n }\n\n const ariaText = formatAriaText\n ? formatAriaText(values[toActual(virtualIdx)])\n : formatLabel(values[toActual(virtualIdx)]);\n\n // Center of the wheel viewport, in px from the top.\n const centreTop = containerHeight / 2 - itemHeight / 2;\n\n return (\n <div\n ref={rootRef}\n role=\"spinbutton\"\n aria-label={ariaLabel}\n aria-valuemin={0}\n aria-valuemax={N - 1}\n aria-valuenow={toActual(virtualIdx)}\n aria-valuetext={ariaText}\n tabIndex={disabled ? -1 : 0}\n className={rootClass}\n style={{ height: containerHeight }}\n onKeyDown={onKeyDown}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={onPointerUp}\n onPointerCancel={onPointerUp}\n >\n {/* Stationary selection band — sits at the centre of the viewport while\n items slide through it, like the iOS native picker. The ref lets\n `playBandPulse` animate scale + brightness on each item tick. */}\n <div\n ref={bandRef}\n className={bandClass}\n aria-hidden=\"true\"\n style={{\n position: 'absolute',\n left: 0,\n right: 0,\n top: centreTop,\n height: itemHeight,\n pointerEvents: 'none',\n }}\n />\n {items.map(({ vIdx, aIdx }) => {\n // Continuous offset in items: items at the centre have offset ≈ 0;\n // top of viewport is negative, bottom positive.\n const offCentreItems = vIdx - position;\n const top = centreTop + offCentreItems * itemHeight;\n const selected = vIdx === virtualIdx;\n const itemDisabled =\n disabled || (disabledFor ? disabledFor(values[aIdx]) : false);\n return (\n <button\n key={vIdx}\n type=\"button\"\n role=\"option\"\n aria-selected={selected}\n tabIndex={-1}\n className={itemClass(selected)}\n style={{\n position: 'absolute',\n left: 0,\n right: 0,\n height: itemHeight,\n top: `${top}px`,\n }}\n disabled={itemDisabled}\n onClick={() => {\n moveBy(vIdx - virtualIdx);\n // Click focuses the <button> child by default; pull focus back\n // to the wheel root so the column emphasis (:focus rules) match.\n rootRef.current?.focus();\n }}\n >\n {formatLabel(values[aIdx])}\n </button>\n );\n })}\n </div>\n );\n};\n\nconst Wheel = React.forwardRef(WheelInner) as <T>(\n props: WheelProps<T> & { ref?: React.Ref<WheelHandle> }\n) => React.ReactElement;\n\nexport const TimeWheels: React.FC<TimeWheelsProps> = ({\n value,\n onChange,\n hourFormat = '24',\n enableSeconds = false,\n incrementHours = 1,\n incrementMinutes = 1,\n incrementSeconds = 1,\n unselectableTimes,\n size,\n color,\n disabled,\n className,\n id,\n labels,\n visibleCount = 5,\n itemHeight = 32,\n audioTick = false,\n onCommit,\n}) => {\n const t = mergeLabels(labels);\n\n const rootClass = usePrefixedClassNames('timeinput', {\n [`is-${color}`]: !!color,\n [`is-${size}`]: !!size,\n 'is-disabled': disabled,\n });\n const wheelsClass = usePrefixedClassNames('timeinput-wheels');\n const sepClass = usePrefixedClassNames('timeinput-separator');\n // Use the prefixed class through the same helper the wheels themselves do,\n // so the selector matches the actual rendered class regardless of whether\n // the consumer configured `classPrefix` via ConfigProvider. Building the\n // selector with `${classPrefix}timeinput-wheel` is wrong when classPrefix\n // is undefined (defaults to the empty prefix) — it would stringify to\n // \"undefinedtimeinput-wheel\".\n const wheelSingleClass = usePrefixedClassNames('timeinput-wheel');\n const wheelsContainerRef = useRef<HTMLDivElement>(null);\n\n const isPm = value.hours >= 12;\n\n const isTimeAllowed = useCallback(\n (h: number, m: number, s: number) => {\n if (!unselectableTimes) return true;\n const probe = setTimeOfDay(new Date(), {\n hours: h,\n minutes: m,\n seconds: s,\n });\n return !unselectableTimes(probe);\n },\n [unselectableTimes]\n );\n\n // Per-column \"is this value disabled?\" predicates. We compute them against\n // the current value's other parts, so e.g. a predicate that only blocks\n // 12:00–12:59 leaves all minutes selectable when the user moves the hour\n // off 12. Returning `undefined` (rather than a function) when there is no\n // unselectableTimes lets the Wheel skip the disabled-attribute branch.\n const isHourDisabled = useCallback(\n (display: number) => {\n let h24 = display;\n if (hourFormat === '12') {\n const base = display % 12;\n h24 = isPm ? base + 12 : base;\n }\n return !isTimeAllowed(h24, value.minutes, value.seconds ?? 0);\n },\n [hourFormat, isPm, isTimeAllowed, value.minutes, value.seconds]\n );\n const isMinuteDisabled = useCallback(\n (m: number) => !isTimeAllowed(value.hours, m, value.seconds ?? 0),\n [isTimeAllowed, value.hours, value.seconds]\n );\n const isSecondDisabled = useCallback(\n (s: number) => !isTimeAllowed(value.hours, value.minutes, s),\n [isTimeAllowed, value.hours, value.minutes]\n );\n const hourDisabledFor = unselectableTimes ? isHourDisabled : undefined;\n const minuteDisabledFor = unselectableTimes ? isMinuteDisabled : undefined;\n const secondDisabledFor = unselectableTimes ? isSecondDisabled : undefined;\n\n const commit = useCallback(\n (next: Partial<TimeWheelsValue>) => {\n const merged: TimeWheelsValue = {\n hours: next.hours ?? value.hours,\n minutes: next.minutes ?? value.minutes,\n seconds: enableSeconds\n ? (next.seconds ?? value.seconds ?? 0)\n : undefined,\n };\n if (!isTimeAllowed(merged.hours, merged.minutes, merged.seconds ?? 0)) {\n return;\n }\n onChange(merged);\n },\n [value, enableSeconds, isTimeAllowed, onChange]\n );\n\n // Build the value lists per column.\n const hourValues = useMemo<number[]>(() => {\n const step = Math.max(1, incrementHours);\n if (hourFormat === '12') {\n const out: number[] = [];\n for (let h = 1; h <= 12; h += step) out.push(h);\n return out;\n }\n const out: number[] = [];\n for (let h = 0; h < 24; h += step) out.push(h);\n return out;\n }, [hourFormat, incrementHours]);\n\n const minuteValues = useMemo<number[]>(() => {\n const step = Math.max(1, incrementMinutes);\n const out: number[] = [];\n for (let m = 0; m < 60; m += step) out.push(m);\n return out;\n }, [incrementMinutes]);\n\n const secondValues = useMemo<number[]>(() => {\n const step = Math.max(1, incrementSeconds);\n const out: number[] = [];\n for (let s = 0; s < 60; s += step) out.push(s);\n return out;\n }, [incrementSeconds]);\n\n // Map current value → wheel index.\n const displayedHours =\n hourFormat === '12'\n ? value.hours % 12 === 0\n ? 12\n : value.hours % 12\n : value.hours;\n const hourIndex = Math.max(0, hourValues.indexOf(displayedHours));\n const minuteIndex = Math.max(0, minuteValues.indexOf(value.minutes));\n const secondIndex = Math.max(0, secondValues.indexOf(value.seconds ?? 0));\n const ampmIndex = isPm ? 1 : 0;\n\n // Refs for column focus management.\n const hoursRef = useRef<WheelHandle>(null);\n const minutesRef = useRef<WheelHandle>(null);\n const secondsRef = useRef<WheelHandle>(null);\n const ampmRef = useRef<WheelHandle>(null);\n\n // Build the focus order at runtime.\n const columnOrder: React.RefObject<WheelHandle | null>[] = [];\n columnOrder.push(hoursRef);\n columnOrder.push(minutesRef);\n if (enableSeconds) columnOrder.push(secondsRef);\n if (hourFormat === '12') columnOrder.push(ampmRef);\n const focusAt = (i: number) => columnOrder[i]?.current?.focus();\n const indexOf = (r: React.RefObject<WheelHandle | null>): number =>\n columnOrder.indexOf(r);\n const focusPrevOf = (r: React.RefObject<WheelHandle | null>) => () =>\n focusAt(indexOf(r) - 1);\n const focusNextOf = (r: React.RefObject<WheelHandle | null>) => () =>\n focusAt(indexOf(r) + 1);\n\n // Hour change — translate displayed value back into 24h.\n const onHourIndex = (next: number) => {\n const display =\n hourValues[Math.max(0, Math.min(hourValues.length - 1, next))];\n let next24 = display;\n if (hourFormat === '12') {\n const baseHour = display % 12;\n next24 = isPm ? baseHour + 12 : baseHour;\n }\n // Skip past any blocked hour using nextValid.\n const allowed = nextValid(next24, next24 >= value.hours ? 1 : -1, 24, h =>\n isTimeAllowed(h, value.minutes, value.seconds ?? 0)\n );\n commit({ hours: allowed });\n };\n\n const onMinuteIndex = (next: number) => {\n const m =\n minuteValues[Math.max(0, Math.min(minuteValues.length - 1, next))];\n const allowed = nextValid(m, m >= value.minutes ? 1 : -1, 60, mm =>\n isTimeAllowed(value.hours, mm, value.seconds ?? 0)\n );\n commit({ minutes: allowed });\n };\n\n const onSecondIndex = (next: number) => {\n const s =\n secondValues[Math.max(0, Math.min(secondValues.length - 1, next))];\n const allowed = nextValid(s, s >= (value.seconds ?? 0) ? 1 : -1, 60, ss =>\n isTimeAllowed(value.hours, value.minutes, ss)\n );\n commit({ seconds: allowed });\n };\n\n const onAmpmIndex = (next: number) => {\n if (next === ampmIndex) return;\n commit({ hours: (value.hours + 12) % 24 });\n };\n\n // Forward drags that originate on the empty space inside the wheels row\n // (left of the leftmost wheel, right of the rightmost wheel, on the\n // separator) to whichever wheel column is nearest to the pointer X — so\n // the picker behaves like the iOS native one, where the whole picker\n // surface is grabbable, not just the column itself.\n const onWheelsContainerPointerDown = (\n e: React.PointerEvent<HTMLDivElement>\n ) => {\n if (disabled) return;\n // If the pointerdown landed on a real wheel column, the wheel's own\n // handler takes over — don't double-dispatch.\n if ((e.target as HTMLElement).closest(`.${wheelSingleClass}`)) return;\n const container = wheelsContainerRef.current;\n /* istanbul ignore next: the handler is attached to the very element this ref points to, so it can't be null while events fire */\n if (!container) return;\n const wheels = container.querySelectorAll<HTMLElement>(\n `.${wheelSingleClass}`\n );\n if (wheels.length === 0) return;\n let nearestIdx = 0;\n let nearestDist = Infinity;\n const x = e.clientX;\n wheels.forEach((el, i) => {\n const r = el.getBoundingClientRect();\n const cx = (r.left + r.right) / 2;\n const d = Math.abs(x - cx);\n if (d < nearestDist) {\n nearestDist = d;\n nearestIdx = i;\n }\n });\n columnOrder[nearestIdx]?.current?.startDrag(e.pointerId, e.clientY);\n };\n\n return (\n <div\n id={id}\n className={classNames(rootClass, className)}\n aria-disabled={disabled}\n >\n <div\n className={wheelsClass}\n ref={wheelsContainerRef}\n onPointerDown={onWheelsContainerPointerDown}\n >\n <Wheel\n ref={hoursRef}\n values={hourValues}\n index={hourIndex}\n onChange={onHourIndex}\n formatLabel={pad2}\n ariaLabel={t.hours}\n visibleCount={visibleCount}\n itemHeight={itemHeight}\n disabled={disabled}\n size={size}\n color={color}\n wrap\n onCommit={onCommit}\n onFocusPrev={focusPrevOf(hoursRef)}\n onFocusNext={focusNextOf(hoursRef)}\n disabledFor={hourDisabledFor}\n audioTick={audioTick}\n />\n <div className={sepClass} aria-hidden=\"true\">\n :\n </div>\n <Wheel\n ref={minutesRef}\n values={minuteValues}\n index={minuteIndex}\n onChange={onMinuteIndex}\n formatLabel={pad2}\n ariaLabel={t.minutes}\n visibleCount={visibleCount}\n itemHeight={itemHeight}\n disabled={disabled}\n size={size}\n color={color}\n wrap\n onCommit={onCommit}\n onFocusPrev={focusPrevOf(minutesRef)}\n onFocusNext={focusNextOf(minutesRef)}\n disabledFor={minuteDisabledFor}\n audioTick={audioTick}\n />\n {enableSeconds && (\n <>\n <div className={sepClass} aria-hidden=\"true\">\n :\n </div>\n <Wheel\n ref={secondsRef}\n values={secondValues}\n index={secondIndex}\n onChange={onSecondIndex}\n formatLabel={pad2}\n ariaLabel={t.seconds}\n visibleCount={visibleCount}\n itemHeight={itemHeight}\n disabled={disabled}\n size={size}\n color={color}\n wrap\n onFocusPrev={focusPrevOf(secondsRef)}\n onFocusNext={focusNextOf(secondsRef)}\n disabledFor={secondDisabledFor}\n audioTick={audioTick}\n />\n </>\n )}\n {hourFormat === '12' && (\n <Wheel\n ref={ampmRef}\n values={['AM', 'PM']}\n index={ampmIndex}\n onChange={onAmpmIndex}\n formatLabel={v => v}\n ariaLabel={t.ampm}\n visibleCount={visibleCount}\n itemHeight={itemHeight}\n disabled={disabled}\n size={size}\n color={color}\n onCommit={onCommit}\n onFocusPrev={focusPrevOf(ampmRef)}\n onFocusNext={focusNextOf(ampmRef)}\n audioTick={audioTick}\n />\n )}\n </div>\n </div>\n );\n};\n\nTimeWheels.displayName = 'TimeWheels';\n\nexport default TimeWheels;\n","import React, {\n forwardRef,\n useCallback,\n useEffect,\n useId,\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 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 { 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 /** Earliest selectable time. */\n min?: Date;\n /** Latest selectable time. */\n max?: Date;\n /** Disable the input. */\n disabled?: boolean;\n /** Make the input read-only. */\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 /** Custom parser. */\n parse?: (s: string) => Date | null;\n /** BCP-47 locale tag for Intl formatting. */\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 /** Open the popover when the input is focused. */\n openOnFocus?: boolean;\n /** Close the popover after a time is selected (off by default). */\n closeOnSelect?: boolean;\n /** Popover anchor position relative to the input. */\n position?: PickerPosition;\n /** Render the popover into `document.body` via portal. */\n appendToBody?: boolean;\n /** Bulma color modifier. */\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'` shows an AM/PM toggle. */\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 /** Show a clickable launcher button on the right that toggles the popover. Default `true`. */\n triggerIcon?: boolean;\n /** Glyph for the right launcher button. */\n triggerIconName?: string;\n /** Optional translatable string overrides. */\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,\n readOnly,\n placeholder,\n format,\n parse,\n locale,\n inline = false,\n mobileNative = 'auto',\n editable = true,\n popover = true,\n openOnFocus = true,\n closeOnSelect = false,\n position = 'bottom-left',\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,\n onFocus,\n onClick,\n onKeyDown,\n onBlur,\n iconLeftName: _iconLeftName,\n triggerIcon = true,\n triggerIconName = 'chevron-down',\n labels,\n audioTick = false,\n haptics = false,\n ...rest\n } = props;\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 const setOpen = useCallback(\n (next: boolean) => {\n setOpenState(prev => {\n if (prev === next) return prev;\n if (next) {\n valueAtOpenRef.current = value;\n onOpen?.();\n } else {\n onClose?.();\n }\n return next;\n });\n },\n [onOpen, onClose, value]\n );\n\n useEffect(() => {\n setText(value ? formatTime(value, defaultFormat, locale) : '');\n }, [value, defaultFormat, locale]);\n\n const commitValue = useCallback(\n (next: Date | null) => {\n if (!isControlled) setInternalValue(next);\n onChange?.(next);\n },\n [isControlled, onChange]\n );\n\n const handleSpinnerChange = useCallback(\n (parts: { hours: number; minutes: number; seconds?: number }) => {\n const base = value ?? new Date();\n const next = setTimeOfDay(base, parts);\n if (!isWithin(next, min, max)) return;\n commitValue(next);\n },\n [value, min, 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,\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 {...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 id={popoverId}\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 {...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 {...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 isOpen={open}\n onClose={() => setOpen(false)}\n anchorRef={containerRef}\n position={position}\n appendToBody={appendToBody}\n ariaLabel={t.chooseTime}\n id={popoverId}\n >\n {panel}\n </PickerPopover>\n )}\n </div>\n );\n }\n);\n\nTimeInputBase.displayName = 'TimeInputBase';\n\nexport default TimeInputBase;\n","import React, { forwardRef } from 'react';\nimport { usePrefixedClassNames } from '../helpers/classNames';\nimport { Field, FieldProps } from './Field';\nimport { Control, ControlBaseProps } from './Control';\nimport { TimeInputBase, TimeInputBaseProps } from './TimeInputBase';\nimport { useInsideField, useInsideControl } from './FormContext';\nimport { useAutoLabelId } from './useAutoLabelId';\n\n/**\n * Props for the TimeInput convenience wrapper. Extends `TimeInputBaseProps`\n * with Field-level (label, horizontal) and Control-level (icons, loading) props.\n * @extraProp {string} [name] - Form field name.\n * @extraProp {string} [form] - Form id the input belongs to.\n * @extraProp {boolean} [required=false] - Marks the input as required.\n * @extraProp {string} [className] - Additional CSS classes for the input.\n * @extraProp {React.Ref<HTMLInputElement>} [ref] - Forwarded to the underlying `<input>`.\n */\nexport interface TimeInputProps extends TimeInputBaseProps {\n /** Field label. Automatically associated with the input via `htmlFor` — uses your `id` when provided, otherwise a generated one. Not wired in `inline` mode (no visible input to label) and dropped inside an outer `Field`. */\n label?: React.ReactNode;\n /** Size for the label. */\n labelSize?: FieldProps['labelSize'];\n /** Props for the label element. An explicit `htmlFor` here overrides the automatic association (no id is generated then). */\n labelProps?: FieldProps['labelProps'];\n /** Render the field with horizontal layout. */\n horizontal?: boolean;\n /** Icon props for the left icon. */\n iconLeft?: ControlBaseProps['iconLeft'];\n /** Icon props for the right icon. */\n iconRight?: ControlBaseProps['iconRight'];\n /** Shortcut for the right icon name. */\n iconRightName?: string;\n /** Shortcut for left icon size. */\n iconLeftSize?: ControlBaseProps['iconLeftSize'];\n /** Shortcut for right icon size. */\n iconRightSize?: ControlBaseProps['iconRightSize'];\n /** Force the left icon container. */\n hasIconsLeft?: boolean;\n /** Force the right icon container. */\n hasIconsRight?: boolean;\n /** Show a loading indicator on the control. */\n isLoading?: boolean;\n /** Expand the control to fill its container. */\n isExpanded?: boolean;\n /** Size of the wrapping Control. */\n controlSize?: ControlBaseProps['size'];\n /** Help/validation text below the input. */\n message?: React.ReactNode;\n /** Color modifier for the help message. */\n messageColor?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Additional CSS classes for the Field wrapper. */\n fieldClassName?: string;\n /** Additional CSS classes for the Control wrapper. */\n controlClassName?: string;\n}\n\n/**\n * The `TimeInput` component is a form input that opens a popover spinner for time-of-day selection.\n *\n * @function\n * @param {TimeInputProps} props\n * @returns {JSX.Element}\n *\n * @example\n * <TimeInput label=\"Departure\" defaultValue={new Date()} />\n *\n * @example\n * <TimeInput label=\"Slot\" hourFormat=\"12\" incrementMinutes={15} />\n */\nexport const TimeInput = forwardRef<HTMLInputElement, TimeInputProps>(\n (\n {\n label,\n labelSize,\n labelProps,\n horizontal,\n iconLeft,\n iconRight,\n iconLeftName = 'clock',\n iconRightName,\n iconLeftSize,\n iconRightSize,\n hasIconsLeft,\n hasIconsRight,\n isLoading,\n isExpanded,\n controlSize,\n message,\n messageColor,\n fieldClassName,\n controlClassName,\n ...baseProps\n },\n ref\n ) => {\n const insideField = useInsideField();\n const insideControl = useInsideControl();\n const { controlId, fieldLabelProps } = useAutoLabelId({\n label,\n id: baseProps.id,\n labelProps,\n // Inline mode renders a bare panel with no input to label.\n rendersLabel: !insideField && !baseProps.inline,\n });\n const helpClass = usePrefixedClassNames('help', {\n [`is-${messageColor}`]: !!messageColor,\n });\n\n // The right-side launcher is on by default; suppress it while the Control\n // shows its loading spinner (also on the right) unless explicitly set.\n let content: React.ReactNode = (\n <TimeInputBase\n ref={ref}\n id={controlId}\n {...baseProps}\n triggerIcon={baseProps.triggerIcon ?? !isLoading}\n />\n );\n\n // Inline mode renders a bare panel with no input, so the Control's\n // icon-left container has nothing to anchor to. Skip the Control wrap.\n if (!insideControl && !baseProps.inline) {\n content = (\n <Control\n iconLeft={iconLeft}\n iconRight={iconRight}\n iconLeftName={iconLeftName}\n iconRightName={iconRightName}\n iconLeftSize={iconLeftSize}\n iconRightSize={iconRightSize}\n hasIconsLeft={hasIconsLeft || !!iconLeftName}\n hasIconsRight={hasIconsRight}\n isLoading={isLoading}\n isExpanded={isExpanded}\n size={controlSize}\n className={controlClassName}\n >\n {content}\n </Control>\n );\n }\n\n const messageEl = message ? <p className={helpClass}>{message}</p> : null;\n\n if (!insideField) {\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\nTimeInput.displayName = 'TimeInput';\n\nexport default TimeInput;\n","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 DayOfWeek,\n PickerLabels,\n mergeLabels,\n} from './_pickerInternals/pickerTypes';\nimport {\n formatDateTime,\n formatTime,\n hourCycleFromFormat,\n parseDate,\n DateFormatOption,\n DEFAULT_DATETIME_FORMAT,\n} from './_pickerInternals/formatters';\nimport {\n isWithin,\n setTimeOfDay,\n clampDate,\n isSameDay,\n} from './_pickerInternals/dateUtils';\nimport { Calendar } from './_pickerInternals/Calendar';\nimport { TimeWheels } from './_pickerInternals/TimeWheels';\nimport { PickerPopover } from './_pickerInternals/PickerPopover';\nimport { useNativeMobilePicker } from './_pickerInternals/useNativeMobilePicker';\nimport { useSegmentedEntry } from './_pickerInternals/useSegmentedEntry';\nimport { Icon } from '../elements/Icon';\n\nconst toIsoDateTime = (d: Date, withSeconds: boolean): string => {\n const yyyy = d.getFullYear();\n const mo = String(d.getMonth() + 1).padStart(2, '0');\n const dd = String(d.getDate()).padStart(2, '0');\n const hh = String(d.getHours()).padStart(2, '0');\n const mm = String(d.getMinutes()).padStart(2, '0');\n const ss = String(d.getSeconds()).padStart(2, '0');\n return withSeconds\n ? `${yyyy}-${mo}-${dd}T${hh}:${mm}:${ss}`\n : `${yyyy}-${mo}-${dd}T${hh}:${mm}`;\n};\n\nconst fromIsoDateTime = (s: string): Date | null => {\n // The HTML datetime-local value may carry fractional seconds (the spec\n // allows them and some engines normalize to `:ss.sss`); accept and drop.\n const m =\n /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d{1,3})?)?$/.exec(\n s\n );\n if (!m) return null;\n return new Date(\n Number(m[1]),\n Number(m[2]) - 1,\n Number(m[3]),\n Number(m[4]),\n Number(m[5]),\n m[6] ? Number(m[6]) : 0,\n 0\n );\n};\n\n/**\n * Props for the raw DateTimeInput base. Use the higher-level `DateTimeInput`\n * for Field/Control composition. Combines the prop set of `DateInputBaseProps`\n * and `TimeInputBaseProps`.\n */\nexport interface DateTimeInputBaseProps\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 date-time. */\n value?: Date | null;\n /** Initial value for uncontrolled usage. */\n defaultValue?: Date | null;\n /** Fired when either the date or time portion 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 /** Lower bound for the combined date-time. */\n min?: Date;\n /** Upper bound for the combined date-time. */\n max?: Date;\n /** Disable the input. */\n disabled?: boolean;\n /** Read-only input. */\n readOnly?: boolean;\n /** Placeholder text. */\n placeholder?: string;\n /**\n * Token format string or `Intl.DateTimeFormat` options. Default `'YYYY-MM-DD HH:mm'`.\n * @defaultValue 'YYYY-MM-DD HH:mm'\n */\n format?: DateFormatOption;\n /** Custom parser. */\n parse?: (s: string) => Date | null;\n /** BCP-47 locale tag. */\n locale?: string;\n /** Render the panel inline (no popover). */\n inline?: boolean;\n /** Use `<input type=\"datetime-local\">` on coarse-pointer devices. */\n mobileNative?: boolean | 'auto';\n /** Allow segmented keyboard typing (type the date-time directly across all segments). `false` makes the field picker-only. */\n editable?: boolean;\n /** Whether the calendar + time popover exists. `false` makes the field input-only (segmented typing with no popover). Default `true`. */\n popover?: boolean;\n /** Open the popover on focus. Default `true`. */\n openOnFocus?: boolean;\n /** Off by default — users typically tweak both halves before committing. */\n closeOnSelect?: boolean;\n /** Popover anchor position. */\n position?: PickerPosition;\n /** Render the popover into `document.body` via portal. */\n appendToBody?: boolean;\n /** Bulma color modifier. */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Size variant. */\n size?: 'small' | 'medium' | 'large';\n /** Rounded input corners. */\n isRounded?: boolean;\n // date subset\n /** Disable specific dates. Blocked dates are also rejected during manual typing (the predicate receives the full candidate date-time — prefer day-based checks). */\n shouldDisableDate?: (d: Date) => boolean;\n /** Convenience array of disabled dates, matched by calendar day; also rejected by manual typing. */\n unselectableDates?: Date[];\n /** Day the calendar week starts on. */\n firstDayOfWeek?: DayOfWeek;\n /** Override the 7 day-name labels. */\n dayNames?: string[];\n /** Override the 12 month-name labels. */\n monthNames?: string[];\n /** Show dimmed dates from adjacent months. */\n nearbyMonthDays?: boolean;\n // time subset\n /** Time format. */\n hourFormat?: HourFormat;\n /** Show seconds column. Note: iOS Safari's native datetime-local picker UI does not include a seconds wheel; pass `mobileNative={false}` if you need one on iOS. */\n enableSeconds?: boolean;\n /** Hour step. */\n incrementHours?: number;\n /** Step between minute-wheel values (`1` = every minute, iOS-style). */\n incrementMinutes?: number;\n /** Step between second-wheel values (only with `enableSeconds`). */\n incrementSeconds?: number;\n /** Block specific times. 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 /** Show a clickable launcher button on the right that toggles the popover. Default `true`. */\n triggerIcon?: boolean;\n /** Glyph for the right launcher button. */\n triggerIconName?: string;\n /** Play a short audible tick on each time-wheel crossing. Default `false`. */\n audioTick?: boolean;\n /** Auto-route tactile feedback per wheel tick (vibrate on Android, audio thunk on iOS). Default `false`. */\n haptics?: boolean;\n /** Optional translatable string overrides. */\n labels?: PickerLabels;\n}\n\n/**\n * Raw DateTimeInput — combined input + calendar + time spinner without\n * Field/Control wrapping. Use `DateTimeInput` for the convenience wrapper.\n *\n * @function\n * @param {DateTimeInputBaseProps} props\n * @returns {JSX.Element}\n */\nexport const DateTimeInputBase = forwardRef<\n HTMLInputElement,\n DateTimeInputBaseProps\n>((props, ref) => {\n const {\n value: controlledValue,\n defaultValue,\n onChange,\n onOpen,\n onClose,\n min,\n max,\n disabled,\n readOnly,\n placeholder,\n format,\n parse,\n locale,\n inline = false,\n mobileNative = 'auto',\n editable = true,\n popover = true,\n openOnFocus = true,\n closeOnSelect = false,\n position = 'bottom-left',\n appendToBody = false,\n color,\n size,\n isRounded,\n shouldDisableDate,\n unselectableDates,\n firstDayOfWeek = 0,\n dayNames,\n monthNames,\n nearbyMonthDays = true,\n hourFormat = '24',\n enableSeconds = false,\n incrementHours = 1,\n // Step between visible wheel values; 1 gives the iOS-style every-minute wheel.\n incrementMinutes = 1,\n incrementSeconds = 1,\n unselectableTimes,\n className,\n name,\n form,\n required,\n id,\n onFocus,\n onClick,\n onKeyDown,\n onBlur,\n iconLeftName: _iconLeftName,\n triggerIcon = true,\n triggerIconName = 'chevron-down',\n audioTick = false,\n haptics = false,\n labels,\n ...rest\n } = props;\n const t = mergeLabels(labels);\n\n // Platform-appropriate feedback routing for the time wheel: on iOS (no\n // navigator.vibrate) the audio thunk fills in; on Android the real haptic\n // fires and no audio is layered on. `audioTick` always wins.\n const hasVibrate =\n typeof navigator !== 'undefined' && typeof navigator.vibrate === 'function';\n const effectiveAudioTick = audioTick || (haptics && !hasVibrate);\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 initialFocused = useMemo(\n () => clampDate(value ?? new Date(), min, max),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n []\n );\n const [focusedDate, setFocusedDate] = useState<Date>(initialFocused);\n // Re-clamp focusedDate when min/max change so the focused cell stays valid.\n useEffect(() => {\n setFocusedDate(prev => clampDate(prev, min, max));\n }, [min, max]);\n\n const defaultFormat: DateFormatOption =\n format ??\n (hourFormat === '12'\n ? enableSeconds\n ? 'YYYY-MM-DD hh:mm:ss A'\n : 'YYYY-MM-DD hh:mm A'\n : enableSeconds\n ? 'YYYY-MM-DD HH:mm:ss'\n : DEFAULT_DATETIME_FORMAT);\n\n // The displayed format is the source of truth for the hour cycle: an explicit\n // 12-hour `format` must drive a 12-hour wheel + pill even when `hourFormat`\n // was left at its default. Fall back to the raw prop only when the cycle\n // can't be read from the format (an Intl-options object, or no hour token).\n const effectiveHourFormat = hourCycleFromFormat(defaultFormat) ?? hourFormat;\n\n const [open, setOpenState] = useState(false);\n // The time wheels are collapsed by default (iOS-style); the user reveals\n // them by clicking the time value in the footer.\n const [timeOpen, setTimeOpen] = useState(false);\n const [text, setText] = useState<string>(\n value ? formatDateTime(value, defaultFormat, locale) : ''\n );\n\n const inputRef = useRef<HTMLInputElement>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n // Snapshot of the value when the popover opens, so Reset can revert the\n // edits made in this session (reverting to empty if it opened empty).\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 // Time-only format for the footer's \"Time 5:07 PM\" display.\n const timeDisplayFormat =\n effectiveHourFormat === '12'\n ? enableSeconds\n ? 'h:mm:ss A'\n : 'h:mm A'\n : enableSeconds\n ? 'HH:mm:ss'\n : 'HH:mm';\n\n const inputClass = usePrefixedClassNames('input', {\n [`is-${color}`]: !!color,\n [`is-${size}`]: !!size,\n 'is-rounded': isRounded,\n });\n const containerClass = usePrefixedClassNames('datetimeinput-container');\n const triggerClass = usePrefixedClassNames('datetimeinput-trigger');\n const panelClass = usePrefixedClassNames('datetimeinput');\n const calendarWrapClass = usePrefixedClassNames(\n 'datetimeinput-calendar-wrap'\n );\n const timeOverlayClass = usePrefixedClassNames('datetimeinput-time-overlay');\n const timeCardClass = usePrefixedClassNames('datetimeinput-time-card');\n const footerClass = usePrefixedClassNames('datetimeinput-footer');\n const footerTimeClass = usePrefixedClassNames('datetimeinput-footer-time');\n const footerActionsClass = usePrefixedClassNames(\n 'datetimeinput-footer-actions'\n );\n const footerResetClass = usePrefixedClassNames('datetimeinput-footer-reset');\n const footerDoneClass = usePrefixedClassNames('datetimeinput-footer-done');\n const footerTimePillClass = usePrefixedClassNames(\n 'datetimeinput-footer-time-pill'\n );\n\n const setOpen = useCallback(\n (next: boolean) => {\n setOpenState(prev => {\n if (prev === next) return prev;\n if (next) {\n valueAtOpenRef.current = value;\n onOpen?.();\n } else {\n onClose?.();\n }\n return next;\n });\n },\n [onOpen, onClose, value]\n );\n\n useEffect(() => {\n setText(value ? formatDateTime(value, defaultFormat, locale) : '');\n }, [value, defaultFormat, locale]);\n\n // Collapse the time wheels whenever the popover closes.\n useEffect(() => {\n if (!open) setTimeOpen(false);\n }, [open]);\n\n const commitValue = useCallback(\n (next: Date | null) => {\n if (!isControlled) setInternalValue(next);\n // Keep the calendar's focused cell tracking typed / parsed values.\n if (next) setFocusedDate(next);\n onChange?.(next);\n },\n [isControlled, onChange]\n );\n\n const handleDateSelect = useCallback(\n (d: Date) => {\n const merged = setTimeOfDay(d, {\n hours: value?.getHours() ?? 0,\n minutes: value?.getMinutes() ?? 0,\n seconds: enableSeconds ? (value?.getSeconds() ?? 0) : undefined,\n });\n if (!isWithin(merged, min, max)) return;\n commitValue(merged);\n setFocusedDate(d);\n },\n [value, enableSeconds, min, max, commitValue]\n );\n\n const handleTimeChange = useCallback(\n (parts: { hours: number; minutes: number; seconds?: number }) => {\n const base = value ?? focusedDate;\n const next = setTimeOfDay(base, parts);\n if (!isWithin(next, min, max)) return;\n commitValue(next);\n },\n [value, focusedDate, min, max, commitValue]\n );\n\n const tryParse = useCallback(\n (s: string): Date | null => {\n const trimmed = s.trim();\n if (!trimmed) return null;\n if (parse) return parse(trimmed);\n const fmt = typeof defaultFormat === 'string' ? defaultFormat : undefined;\n return parseDate(trimmed, fmt ?? DEFAULT_DATETIME_FORMAT, locale);\n },\n [parse, defaultFormat, locale]\n );\n\n // The Date the user edits when starting without a current value (now).\n const makeBaseDate = useCallback((): Date => new Date(), []);\n\n const inputReadOnlyAttr = !!readOnly || !editable;\n const canOpen = !!popover && !disabled && !readOnly;\n\n // Blocking predicate for manual entry, combining the calendar's\n // disabled-day logic with the wheels' unselectable-times predicate. The\n // candidate passed in carries the full date-time, so date predicates\n // should use day-based checks.\n const isBlocked = useMemo(() => {\n if (!shouldDisableDate && !unselectableDates?.length && !unselectableTimes)\n return undefined;\n return (d: Date) =>\n !!shouldDisableDate?.(d) ||\n !!unselectableDates?.some(u => isSameDay(u, d)) ||\n !!unselectableTimes?.(d);\n }, [shouldDisableDate, unselectableDates, unselectableTimes]);\n\n const { inputHandlers } = useSegmentedEntry({\n format: defaultFormat,\n value,\n commitValue,\n formatFn: formatDateTime,\n tryParse,\n text,\n setText,\n makeBaseDate,\n locale,\n min,\n max,\n isBlocked,\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 = node;\n },\n [ref]\n );\n\n if (useNative) {\n const nativeStep = enableSeconds ? incrementSeconds : incrementMinutes * 60;\n return (\n <input\n {...cleanRest}\n ref={combinedRef}\n type=\"datetime-local\"\n step={nativeStep}\n className={classNames(inputClass, bulmaHelperClasses, className)}\n value={value ? toIsoDateTime(value, enableSeconds) : ''}\n onChange={e => {\n const parsed = e.target.value\n ? fromIsoDateTime(e.target.value)\n : null;\n commitValue(parsed);\n }}\n min={min ? toIsoDateTime(min, enableSeconds) : undefined}\n max={max ? toIsoDateTime(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\n className={panelClass}\n onKeyDown={e => {\n // First Escape collapses the floating time wheels; the popover's own\n // Escape handler (which closes the whole panel) only sees the second.\n if (timeOpen && e.key === 'Escape') {\n e.stopPropagation();\n setTimeOpen(false);\n }\n }}\n >\n <div className={calendarWrapClass}>\n <Calendar\n value={value}\n focusedDate={focusedDate}\n onSelect={handleDateSelect}\n onFocusedDateChange={setFocusedDate}\n min={min}\n max={max}\n shouldDisableDate={shouldDisableDate}\n unselectableDates={unselectableDates}\n firstDayOfWeek={firstDayOfWeek}\n locale={locale}\n dayNames={dayNames}\n monthNames={monthNames}\n nearbyMonthDays={nearbyMonthDays}\n color={color}\n size={size}\n id={`${popoverId}-cal`}\n autoFocusCell={open}\n labels={labels}\n />\n {timeOpen && (\n <div\n className={timeOverlayClass}\n onClick={e => {\n // Tap outside the wheel card (on the covered calendar area)\n // collapses the wheels without selecting a date, matching the\n // native behavior.\n if (e.target === e.currentTarget) setTimeOpen(false);\n }}\n >\n <div className={timeCardClass}>\n <TimeWheels\n value={spinnerValue}\n onChange={handleTimeChange}\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 id={`${popoverId}-time`}\n labels={labels}\n itemHeight={wheelItemHeight}\n audioTick={effectiveAudioTick}\n onCommit={() => setOpen(false)}\n />\n </div>\n </div>\n )}\n </div>\n <div className={footerClass}>\n <button\n type=\"button\"\n className={footerTimeClass}\n onClick={() => setTimeOpen(o => !o)}\n aria-expanded={timeOpen}\n disabled={disabled}\n >\n <span>{t.time}</span>\n <span className={footerTimePillClass}>\n {value ? formatTime(value, timeDisplayFormat, locale) : '—'}\n </span>\n </button>\n <div className={footerActionsClass}>\n <button\n type=\"button\"\n className={footerResetClass}\n onClick={() => commitValue(valueAtOpenRef.current)}\n >\n {t.reset}\n </button>\n <button\n type=\"button\"\n className={footerDoneClass}\n aria-label={t.done}\n onClick={() => setOpen(false)}\n >\n <svg width=\"22\" height=\"22\" viewBox=\"0 0 22 22\" aria-hidden=\"true\">\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 </div>\n </div>\n );\n\n if (inline) {\n return (\n <div\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 ? toIsoDateTime(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 {...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.chooseDateTime}\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 isOpen={open}\n onClose={() => setOpen(false)}\n anchorRef={containerRef}\n position={position}\n appendToBody={appendToBody}\n ariaLabel={t.chooseDateTime}\n id={popoverId}\n >\n {panel}\n </PickerPopover>\n )}\n </div>\n );\n});\n\nDateTimeInputBase.displayName = 'DateTimeInputBase';\n\nexport default DateTimeInputBase;\n","import React, { forwardRef } from 'react';\nimport { usePrefixedClassNames } from '../helpers/classNames';\nimport { Field, FieldProps } from './Field';\nimport { Control, ControlBaseProps } from './Control';\nimport { DateTimeInputBase, DateTimeInputBaseProps } from './DateTimeInputBase';\nimport { useInsideField, useInsideControl } from './FormContext';\nimport { useAutoLabelId } from './useAutoLabelId';\n\n/**\n * Props for the DateTimeInput convenience wrapper. Extends\n * `DateTimeInputBaseProps` with Field-level and Control-level props.\n * @extraProp {string} [name] - Form field name.\n * @extraProp {string} [form] - Optional id of the form the input belongs to.\n * @extraProp {boolean} [required=false] - Marks the field as required for native HTML form validation.\n */\nexport interface DateTimeInputProps extends DateTimeInputBaseProps {\n /** Field label. Automatically associated with the input via `htmlFor` — uses your `id` when provided, otherwise a generated one. Not wired in `inline` mode (no visible input to label) and dropped inside an outer `Field`. */\n label?: React.ReactNode;\n /** Size for the label. */\n labelSize?: FieldProps['labelSize'];\n /** Props for the label element. An explicit `htmlFor` here overrides the automatic association (no id is generated then). */\n labelProps?: FieldProps['labelProps'];\n /** Render the field with horizontal layout. */\n horizontal?: boolean;\n /** Icon props for the left icon. */\n iconLeft?: ControlBaseProps['iconLeft'];\n /** Icon props for the right icon. */\n iconRight?: ControlBaseProps['iconRight'];\n /** Shortcut for the right icon name. */\n iconRightName?: string;\n /** Shortcut for left icon size. */\n iconLeftSize?: ControlBaseProps['iconLeftSize'];\n /** Shortcut for right icon size. */\n iconRightSize?: ControlBaseProps['iconRightSize'];\n /** Force the left icon container. */\n hasIconsLeft?: boolean;\n /** Force the right icon container. */\n hasIconsRight?: boolean;\n /** Show a loading indicator on the control. */\n isLoading?: boolean;\n /** Expand the control to fill its container. */\n isExpanded?: boolean;\n /** Size of the wrapping Control. */\n controlSize?: ControlBaseProps['size'];\n /** Help/validation text below the input. */\n message?: React.ReactNode;\n /** Message color. */\n messageColor?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Additional CSS classes for the Field wrapper. */\n fieldClassName?: string;\n /** Additional CSS classes for the Control wrapper. */\n controlClassName?: string;\n}\n\n/**\n * The `DateTimeInput` combines a calendar and a time **wheel spinner** in a single popover — an iOS-style layout.\n *\n * @function\n * @param {DateTimeInputProps} props\n * @returns {JSX.Element}\n *\n * @example\n * <DateTimeInput label=\"Appointment\" defaultValue={new Date()} />\n *\n * @example\n * <DateTimeInput\n * label=\"When\"\n * hourFormat=\"12\"\n * shouldDisableDate={d => d.getDay() === 0 || d.getDay() === 6}\n * />\n */\nexport const DateTimeInput = forwardRef<HTMLInputElement, DateTimeInputProps>(\n (\n {\n label,\n labelSize,\n labelProps,\n horizontal,\n iconLeft,\n iconRight,\n iconLeftName = 'calendar-alt',\n iconRightName,\n iconLeftSize,\n iconRightSize,\n hasIconsLeft,\n hasIconsRight,\n isLoading,\n isExpanded,\n controlSize,\n message,\n messageColor,\n fieldClassName,\n controlClassName,\n ...baseProps\n },\n ref\n ) => {\n const insideField = useInsideField();\n const insideControl = useInsideControl();\n const { controlId, fieldLabelProps } = useAutoLabelId({\n label,\n id: baseProps.id,\n labelProps,\n // Inline mode renders a bare picker with no input to label.\n rendersLabel: !insideField && !baseProps.inline,\n });\n const helpClass = usePrefixedClassNames('help', {\n [`is-${messageColor}`]: !!messageColor,\n });\n\n // The right-side launcher is on by default; suppress it while the Control\n // shows its loading spinner (also on the right) unless explicitly set.\n let content: React.ReactNode = (\n <DateTimeInputBase\n ref={ref}\n id={controlId}\n {...baseProps}\n triggerIcon={baseProps.triggerIcon ?? !isLoading}\n />\n );\n\n // Inline mode renders a bare picker with no input, so the Control's\n // icon-left container has nothing to anchor to. Skip the Control wrap.\n if (!insideControl && !baseProps.inline) {\n content = (\n <Control\n iconLeft={iconLeft}\n iconRight={iconRight}\n iconLeftName={iconLeftName}\n iconRightName={iconRightName}\n iconLeftSize={iconLeftSize}\n iconRightSize={iconRightSize}\n hasIconsLeft={hasIconsLeft || !!iconLeftName}\n hasIconsRight={hasIconsRight}\n isLoading={isLoading}\n isExpanded={isExpanded}\n size={controlSize}\n className={controlClassName}\n >\n {content}\n </Control>\n );\n }\n\n const messageEl = message ? <p className={helpClass}>{message}</p> : null;\n\n if (!insideField) {\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\nDateTimeInput.displayName = 'DateTimeInput';\n\nexport default DateTimeInput;\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * Type for grid cell span values.\n */\nexport type CellSpanValue = number;\n\n/**\n * Props for the Cell component.\n */\nexport interface CellProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Which column the cell starts at (Bulma: `is-col-start-x`). */\n colStart?: number;\n /** Which column the cell ends at, counting from the end (Bulma: `is-col-from-end-x`). */\n colFromEnd?: number;\n /** How many columns the cell will span (Bulma: `is-col-span-x`). */\n colSpan?: CellSpanValue;\n /** Which row the cell starts at (Bulma: `is-row-start-x`). */\n rowStart?: number;\n /** Which row the cell ends at, counting from the end (Bulma: `is-row-from-end-x`). */\n rowFromEnd?: number;\n /** How many rows the cell will span (Bulma: `is-row-span-x`). */\n rowSpan?: CellSpanValue;\n /** Additional CSS class names. */\n className?: string;\n /** Text color. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Bulma color modifier for the cell. */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Background color. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Content to render inside the cell. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Cell` component provides a single Bulma grid cell for use inside the [`Grid`](./grid.md) component.\n *\n * @function\n * @param {CellProps} props - Props for the Cell component.\n * @returns {JSX.Element} The rendered grid cell.\n * @see {@link https://bulma.io/documentation/grid/ | Bulma Grid documentation}\n */\nexport const Cell: React.FC<CellProps> = ({\n colStart,\n colFromEnd,\n colSpan,\n rowStart,\n rowFromEnd,\n rowSpan,\n className,\n textColor,\n color: _fieldColor,\n bgColor,\n children,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n });\n\n const mainClass = usePrefixedClassNames('cell');\n\n // Build cell grid classes with prefixes\n const cellGridClasses = usePrefixedClassNames('', {\n [`is-col-start-${colStart}`]: colStart !== undefined && colStart !== null,\n [`is-col-from-end-${colFromEnd}`]:\n colFromEnd !== undefined && colFromEnd !== null,\n [`is-col-span-${colSpan}`]: colSpan !== undefined && colSpan !== null,\n [`is-row-start-${rowStart}`]: rowStart !== undefined && rowStart !== null,\n [`is-row-from-end-${rowFromEnd}`]:\n rowFromEnd !== undefined && rowFromEnd !== null,\n [`is-row-span-${rowSpan}`]: rowSpan !== undefined && rowSpan !== null,\n });\n\n const cellClasses = classNames(\n mainClass,\n cellGridClasses,\n className,\n bulmaHelperClasses\n );\n\n return (\n <div className={cellClasses} {...rest}>\n {children}\n </div>\n );\n};\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport { Cell } from './Cell';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * Allowed gap values for Bulma's 0-8 spacing scale, shared by `Grid` and\n * `Columns`. Accepts the value as a number or a numeric string.\n */\nexport type BulmaGapValue =\n | 0\n | 1\n | 2\n | 3\n | 4\n | 5\n | 6\n | 7\n | 8\n | '0'\n | '1'\n | '2'\n | '3'\n | '4'\n | '5'\n | '6'\n | '7'\n | '8';\n/**\n * Allowed minimum column values for Bulma grid.\n */\nexport type BulmaMinColValue =\n | 1\n | 2\n | 3\n | 4\n | 5\n | 6\n | 7\n | 8\n | 9\n | 10\n | 11\n | 12\n | 13\n | 14\n | 15\n | 16\n | 17\n | 18\n | 19\n | 20\n | 21\n | 22\n | 23\n | 24\n | 25\n | 26\n | 27\n | 28\n | 29\n | 30\n | 31\n | 32;\n/**\n * Allowed fixed grid columns for Bulma grid.\n */\nexport type BulmaFixedGridCols =\n 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n/**\n * Allowed fixed grid columns prop for Bulma grid.\n */\nexport type BulmaFixedGridColsProp = BulmaFixedGridCols | 'auto';\n\n/**\n * Props for the Grid component.\n */\nexport interface GridProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Use a fixed grid layout (`.fixed-grid > .grid`). */\n isFixed?: boolean;\n /** Main gap for grid (Bulma `is-gap-X`). */\n gap?: BulmaGapValue;\n /** Column gap for grid (`is-column-gap-X`). */\n columnGap?: BulmaGapValue;\n /** Row gap for grid (`is-row-gap-X`). */\n rowGap?: BulmaGapValue;\n /** Minimum column width for the grid (`is-col-min-X`). */\n minCol?: BulmaMinColValue;\n /** For fixed grids: explicit column count (`has-X-cols`), or `'auto'` for auto-count. */\n fixedCols?: BulmaFixedGridColsProp;\n /** For fixed grids: explicit column count for mobile. */\n fixedColsMobile?: BulmaFixedGridCols;\n /** For fixed grids: explicit column count for tablet. */\n fixedColsTablet?: BulmaFixedGridCols;\n /** For fixed grids: explicit column count for desktop. */\n fixedColsDesktop?: BulmaFixedGridCols;\n /** For fixed grids: explicit column count for widescreen. */\n fixedColsWidescreen?: BulmaFixedGridCols;\n /** For fixed grids: explicit column count for fullhd. */\n fixedColsFullhd?: BulmaFixedGridCols;\n /** Additional CSS classes for the grid. */\n className?: string;\n /** Text color. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Bulma color modifier for the grid. */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /** Background color. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Children to render inside the grid (usually `Cell` components). */\n children?: React.ReactNode;\n}\n\n/**\n * The `Grid` component provides Bulma's advanced CSS Grid layout for complex, modern layouts.\n *\n * @function\n * @param {GridProps} props - Props for the Grid component.\n * @returns {JSX.Element} The rendered grid.\n * @see {@link https://bulma.io/documentation/grid/ | Bulma Grid documentation}\n */\nconst GridComponent: React.FC<GridProps> = ({\n isFixed = false,\n gap,\n columnGap,\n rowGap,\n minCol,\n fixedCols,\n fixedColsMobile,\n fixedColsTablet,\n fixedColsDesktop,\n fixedColsWidescreen,\n fixedColsFullhd,\n className,\n textColor,\n color: _fieldColor,\n bgColor,\n children,\n ...props\n}) => {\n // Map textColor and bgColor to color and backgroundColor for useBulmaClasses\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor,\n backgroundColor: bgColor,\n ...props,\n });\n\n const mainClass = usePrefixedClassNames('grid');\n\n // Build grid inner classes with prefixes\n const gridInnerClasses = usePrefixedClassNames('', {\n [`is-gap-${gap}`]: gap !== undefined && gap !== null,\n [`is-column-gap-${columnGap}`]:\n columnGap !== undefined && columnGap !== null,\n [`is-row-gap-${rowGap}`]: rowGap !== undefined && rowGap !== null,\n [`is-col-min-${minCol}`]: minCol !== undefined && minCol !== null,\n });\n\n // Build fixed grid classes with prefixes (always called, used conditionally)\n const fixedGridClasses = usePrefixedClassNames('fixed-grid', {\n 'has-auto-count': fixedCols === 'auto',\n [`has-${fixedCols}-cols`]: fixedCols !== undefined && fixedCols !== 'auto',\n [`has-${fixedColsMobile}-cols-mobile`]:\n fixedColsMobile !== undefined && fixedColsMobile !== null,\n [`has-${fixedColsTablet}-cols-tablet`]:\n fixedColsTablet !== undefined && fixedColsTablet !== null,\n [`has-${fixedColsDesktop}-cols-desktop`]:\n fixedColsDesktop !== undefined && fixedColsDesktop !== null,\n [`has-${fixedColsWidescreen}-cols-widescreen`]:\n fixedColsWidescreen !== undefined && fixedColsWidescreen !== null,\n [`has-${fixedColsFullhd}-cols-fullhd`]:\n fixedColsFullhd !== undefined && fixedColsFullhd !== null,\n });\n\n const gridClasses = classNames(\n mainClass,\n gridInnerClasses,\n bulmaHelperClasses,\n className\n );\n\n if (isFixed) {\n return (\n <div className={fixedGridClasses}>\n <div className={gridClasses} {...rest}>\n {children}\n </div>\n </div>\n );\n }\n\n // Standard Bulma grid (not fixed)\n return (\n <div className={gridClasses} {...rest}>\n {children}\n </div>\n );\n};\n\nexport const Grid = withSubComponents(GridComponent, { Cell }, 'Grid');\n","import React, { useEffect, useMemo, ReactNode, CSSProperties } from 'react';\nimport classNames from './classNames';\nimport { useBulmaClasses, BulmaClassesProps } from './useBulmaClasses';\n\n// --- FULL Bulma v1 CSS variable keys (auto-generated from CSSVAR_KEYS) ---\nconst bulmaCssVars = [\n // scheme\n '--bulma-scheme-h',\n '--bulma-scheme-s',\n '--bulma-scheme-main',\n '--bulma-scheme-main-bis',\n '--bulma-scheme-main-ter',\n '--bulma-scheme-invert',\n '--bulma-scheme-invert-bis',\n '--bulma-scheme-invert-ter',\n '--bulma-light-l',\n '--bulma-light-invert-l',\n '--bulma-dark-l',\n '--bulma-dark-invert-l',\n '--bulma-soft-l',\n '--bulma-bold-l',\n '--bulma-soft-invert-l',\n '--bulma-bold-invert-l',\n '--bulma-hover-background-l-delta',\n '--bulma-active-background-l-delta',\n '--bulma-hover-border-l-delta',\n '--bulma-active-border-l-delta',\n '--bulma-hover-color-l-delta',\n '--bulma-active-color-l-delta',\n '--bulma-hover-shadow-a-delta',\n '--bulma-active-shadow-a-delta',\n // colors\n '--bulma-primary-h',\n '--bulma-primary-s',\n '--bulma-primary-l',\n '--bulma-link-h',\n '--bulma-link-s',\n '--bulma-link-l',\n '--bulma-info-h',\n '--bulma-info-s',\n '--bulma-info-l',\n '--bulma-success-h',\n '--bulma-success-s',\n '--bulma-success-l',\n '--bulma-warning-h',\n '--bulma-warning-s',\n '--bulma-warning-l',\n '--bulma-danger-h',\n '--bulma-danger-s',\n '--bulma-danger-l',\n // shadow (the upstream token .box/.card/.dropdown/.panel derive their own\n // shadow variables from; overriding it from an ancestor is the route that\n // cascades, since those selectors re-declare their derived var on\n // themselves)\n '--bulma-shadow-h',\n '--bulma-shadow-s',\n '--bulma-shadow-l',\n '--bulma-shadow',\n // typography\n '--bulma-family-primary',\n '--bulma-family-secondary',\n '--bulma-family-code',\n '--bulma-size-small',\n '--bulma-size-normal',\n '--bulma-size-medium',\n '--bulma-size-large',\n '--bulma-weight-light',\n '--bulma-weight-normal',\n '--bulma-weight-medium',\n '--bulma-weight-semibold',\n '--bulma-weight-bold',\n '--bulma-weight-extrabold',\n // other\n '--bulma-block-spacing',\n '--bulma-duration',\n '--bulma-easing',\n '--bulma-radius-small',\n '--bulma-radius',\n '--bulma-radius-medium',\n '--bulma-radius-large',\n '--bulma-radius-rounded',\n '--bulma-speed',\n '--bulma-arrow-color',\n '--bulma-loading-color',\n '--bulma-burger-h',\n '--bulma-burger-s',\n '--bulma-burger-l',\n '--bulma-burger-border-radius',\n '--bulma-burger-gap',\n '--bulma-burger-item-height',\n '--bulma-burger-item-width',\n // generic\n '--bulma-body-background-color',\n '--bulma-body-size',\n '--bulma-body-min-width',\n '--bulma-body-rendering',\n '--bulma-body-family',\n '--bulma-body-overflow-x',\n '--bulma-body-overflow-y',\n '--bulma-body-color',\n '--bulma-body-font-size',\n '--bulma-body-weight',\n '--bulma-body-line-height',\n '--bulma-code-family',\n '--bulma-code-padding',\n '--bulma-code-weight',\n '--bulma-code-size',\n '--bulma-small-font-size',\n '--bulma-hr-background-color',\n '--bulma-hr-height',\n '--bulma-hr-margin',\n '--bulma-strong-color',\n '--bulma-strong-weight',\n '--bulma-pre-font-size',\n '--bulma-pre-padding',\n '--bulma-pre-code-font-size',\n // skeleton\n '--bulma-skeleton-background',\n '--bulma-skeleton-radius',\n '--bulma-skeleton-block-min-height',\n '--bulma-skeleton-lines-gap',\n '--bulma-skeleton-line-height',\n // breadcrumb\n '--bulma-breadcrumb-item-color',\n '--bulma-breadcrumb-item-hover-color',\n '--bulma-breadcrumb-item-active-color',\n '--bulma-breadcrumb-item-padding-vertical',\n '--bulma-breadcrumb-item-padding-horizontal',\n '--bulma-breadcrumb-item-separator-color',\n // card\n '--bulma-card-color',\n '--bulma-card-background-color',\n '--bulma-card-shadow',\n '--bulma-card-radius',\n '--bulma-card-header-background-color',\n '--bulma-card-header-color',\n '--bulma-card-header-padding',\n '--bulma-card-header-shadow',\n '--bulma-card-header-weight',\n '--bulma-card-content-background-color',\n '--bulma-card-content-padding',\n '--bulma-card-footer-background-color',\n '--bulma-card-footer-border-top',\n '--bulma-card-footer-padding',\n '--bulma-card-media-margin',\n // dropdown\n '--bulma-dropdown-menu-min-width',\n '--bulma-dropdown-content-background-color',\n '--bulma-dropdown-content-offset',\n '--bulma-dropdown-content-padding-bottom',\n '--bulma-dropdown-content-padding-top',\n '--bulma-dropdown-content-radius',\n '--bulma-dropdown-content-shadow',\n '--bulma-dropdown-content-z',\n '--bulma-dropdown-item-h',\n '--bulma-dropdown-item-s',\n '--bulma-dropdown-item-l',\n '--bulma-dropdown-item-background-l',\n '--bulma-dropdown-item-background-l-delta',\n '--bulma-dropdown-item-hover-background-l-delta',\n '--bulma-dropdown-item-active-background-l-delta',\n '--bulma-dropdown-item-color-l',\n '--bulma-dropdown-item-selected-h',\n '--bulma-dropdown-item-selected-s',\n '--bulma-dropdown-item-selected-l',\n '--bulma-dropdown-item-selected-background-l',\n '--bulma-dropdown-item-selected-color-l',\n '--bulma-dropdown-divider-background-color',\n // menu\n '--bulma-menu-item-h',\n '--bulma-menu-item-s',\n '--bulma-menu-item-l',\n '--bulma-menu-item-background-l',\n '--bulma-menu-item-background-l-delta',\n '--bulma-menu-item-hover-background-l-delta',\n '--bulma-menu-item-active-background-l-delta',\n '--bulma-menu-item-color-l',\n '--bulma-menu-item-radius',\n '--bulma-menu-item-selected-h',\n '--bulma-menu-item-selected-s',\n '--bulma-menu-item-selected-l',\n '--bulma-menu-item-selected-background-l',\n '--bulma-menu-item-selected-color-l',\n '--bulma-menu-list-border-left',\n '--bulma-menu-list-line-height',\n '--bulma-menu-list-link-padding',\n '--bulma-menu-nested-list-margin',\n '--bulma-menu-nested-list-padding-left',\n '--bulma-menu-label-color',\n '--bulma-menu-label-font-size',\n '--bulma-menu-label-letter-spacing',\n '--bulma-menu-label-spacing',\n // message\n '--bulma-message-h',\n '--bulma-message-s',\n '--bulma-message-background-l',\n '--bulma-message-border-l',\n '--bulma-message-border-l-delta',\n '--bulma-message-border-style',\n '--bulma-message-border-width',\n '--bulma-message-color-l',\n '--bulma-message-radius',\n '--bulma-message-header-weight',\n '--bulma-message-header-padding',\n '--bulma-message-header-radius',\n '--bulma-message-header-body-border-width',\n '--bulma-message-header-background-l',\n '--bulma-message-header-color-l',\n '--bulma-message-body-border-width',\n '--bulma-message-body-color',\n '--bulma-message-body-padding',\n '--bulma-message-body-radius',\n '--bulma-message-body-pre-code-background-color',\n // modal\n '--bulma-modal-z',\n '--bulma-modal-background-background-color',\n '--bulma-modal-content-width',\n '--bulma-modal-content-margin-mobile',\n '--bulma-modal-content-spacing-mobile',\n '--bulma-modal-content-spacing-tablet',\n '--bulma-modal-close-dimensions',\n '--bulma-modal-close-right',\n '--bulma-modal-close-top',\n '--bulma-modal-card-spacing',\n '--bulma-modal-card-head-background-color',\n '--bulma-modal-card-head-padding',\n '--bulma-modal-card-head-radius',\n '--bulma-modal-card-title-color',\n '--bulma-modal-card-title-line-height',\n '--bulma-modal-card-title-size',\n '--bulma-modal-card-foot-background-color',\n '--bulma-modal-card-foot-radius',\n '--bulma-modal-card-body-background-color',\n '--bulma-modal-card-body-padding',\n // navbar\n '--bulma-navbar-h',\n '--bulma-navbar-s',\n '--bulma-navbar-l',\n '--bulma-navbar-background-color',\n '--bulma-navbar-box-shadow-size',\n '--bulma-navbar-box-shadow-color',\n '--bulma-navbar-padding-vertical',\n '--bulma-navbar-padding-horizontal',\n '--bulma-navbar-z',\n '--bulma-navbar-fixed-z',\n '--bulma-navbar-item-background-a',\n '--bulma-navbar-item-background-l',\n '--bulma-navbar-item-background-l-delta',\n '--bulma-navbar-item-hover-background-l-delta',\n '--bulma-navbar-item-active-background-l-delta',\n '--bulma-navbar-item-color-l',\n '--bulma-navbar-item-selected-h',\n '--bulma-navbar-item-selected-s',\n '--bulma-navbar-item-selected-l',\n '--bulma-navbar-item-selected-background-l',\n '--bulma-navbar-item-selected-color-l',\n '--bulma-navbar-item-img-max-height',\n '--bulma-navbar-burger-color',\n '--bulma-navbar-tab-hover-background-color',\n '--bulma-navbar-tab-hover-border-bottom-color',\n '--bulma-navbar-tab-active-color',\n '--bulma-navbar-tab-active-background-color',\n '--bulma-navbar-tab-active-border-bottom-color',\n '--bulma-navbar-tab-active-border-bottom-style',\n '--bulma-navbar-tab-active-border-bottom-width',\n '--bulma-navbar-dropdown-background-color',\n '--bulma-navbar-dropdown-border-l',\n '--bulma-navbar-dropdown-border-color',\n '--bulma-navbar-dropdown-border-style',\n '--bulma-navbar-dropdown-border-width',\n '--bulma-navbar-dropdown-offset',\n '--bulma-navbar-dropdown-arrow',\n '--bulma-navbar-dropdown-radius',\n '--bulma-navbar-dropdown-z',\n '--bulma-navbar-dropdown-boxed-radius',\n '--bulma-navbar-dropdown-boxed-shadow',\n '--bulma-navbar-dropdown-item-h',\n '--bulma-navbar-dropdown-item-s',\n '--bulma-navbar-dropdown-item-l',\n '--bulma-navbar-dropdown-item-background-l',\n '--bulma-navbar-dropdown-item-color-l',\n '--bulma-navbar-divider-background-l',\n '--bulma-navbar-divider-height',\n '--bulma-navbar-bottom-box-shadow-size',\n // pagination\n '--bulma-pagination-margin',\n '--bulma-pagination-min-width',\n '--bulma-pagination-item-h',\n '--bulma-pagination-item-s',\n '--bulma-pagination-item-l',\n '--bulma-pagination-item-background-l-delta',\n '--bulma-pagination-item-hover-background-l-delta',\n '--bulma-pagination-item-active-background-l-delta',\n '--bulma-pagination-item-border-style',\n '--bulma-pagination-item-border-width',\n '--bulma-pagination-item-border-l',\n '--bulma-pagination-item-border-l-delta',\n '--bulma-pagination-item-hover-border-l-delta',\n '--bulma-pagination-item-active-border-l-delta',\n '--bulma-pagination-item-focus-border-l-delta',\n '--bulma-pagination-item-color-l',\n '--bulma-pagination-item-font-size',\n '--bulma-pagination-item-margin',\n '--bulma-pagination-item-padding-left',\n '--bulma-pagination-item-padding-right',\n '--bulma-pagination-item-outer-shadow-h',\n '--bulma-pagination-item-outer-shadow-s',\n '--bulma-pagination-item-outer-shadow-l',\n '--bulma-pagination-item-outer-shadow-a',\n '--bulma-pagination-nav-padding-left',\n '--bulma-pagination-nav-padding-right',\n '--bulma-pagination-disabled-color',\n '--bulma-pagination-disabled-background-color',\n '--bulma-pagination-disabled-border-color',\n '--bulma-pagination-current-color',\n '--bulma-pagination-current-background-color',\n '--bulma-pagination-current-border-color',\n '--bulma-pagination-ellipsis-color',\n '--bulma-pagination-shadow-inset',\n '--bulma-pagination-selected-item-h',\n '--bulma-pagination-selected-item-s',\n '--bulma-pagination-selected-item-l',\n '--bulma-pagination-selected-item-background-l',\n '--bulma-pagination-selected-item-border-l',\n '--bulma-pagination-selected-item-color-l',\n // panel\n '--bulma-panel-margin',\n '--bulma-panel-item-border',\n '--bulma-panel-radius',\n '--bulma-panel-shadow',\n '--bulma-panel-heading-line-height',\n '--bulma-panel-heading-padding',\n '--bulma-panel-heading-radius',\n '--bulma-panel-heading-size',\n '--bulma-panel-heading-weight',\n '--bulma-panel-tabs-font-size',\n '--bulma-panel-tab-border-bottom-color',\n '--bulma-panel-tab-border-bottom-style',\n '--bulma-panel-tab-border-bottom-width',\n '--bulma-panel-tab-active-color',\n '--bulma-panel-list-item-color',\n '--bulma-panel-list-item-hover-color',\n '--bulma-panel-block-color',\n '--bulma-panel-block-hover-background-color',\n '--bulma-panel-block-active-border-left-color',\n '--bulma-panel-block-active-color',\n '--bulma-panel-block-active-icon-color',\n '--bulma-panel-icon-color',\n // tabs\n '--bulma-tabs-border-bottom-color',\n '--bulma-tabs-border-bottom-style',\n '--bulma-tabs-border-bottom-width',\n '--bulma-tabs-link-color',\n '--bulma-tabs-link-hover-border-bottom-color',\n '--bulma-tabs-link-hover-color',\n '--bulma-tabs-link-active-border-bottom-color',\n '--bulma-tabs-link-active-color',\n '--bulma-tabs-link-padding',\n '--bulma-tabs-boxed-link-radius',\n '--bulma-tabs-boxed-link-hover-background-color',\n '--bulma-tabs-boxed-link-hover-border-bottom-color',\n '--bulma-tabs-boxed-link-active-background-color',\n '--bulma-tabs-boxed-link-active-border-color',\n '--bulma-tabs-boxed-link-active-border-bottom-color',\n '--bulma-tabs-toggle-link-border-color',\n '--bulma-tabs-toggle-link-border-style',\n '--bulma-tabs-toggle-link-border-width',\n '--bulma-tabs-toggle-link-hover-background-color',\n '--bulma-tabs-toggle-link-hover-border-color',\n '--bulma-tabs-toggle-link-radius',\n '--bulma-tabs-toggle-link-active-background-color',\n '--bulma-tabs-toggle-link-active-border-color',\n '--bulma-tabs-toggle-link-active-color',\n // box\n '--bulma-box-background-color',\n '--bulma-box-color',\n '--bulma-box-radius',\n '--bulma-box-shadow',\n '--bulma-box-padding',\n '--bulma-box-link-hover-shadow',\n '--bulma-box-link-active-shadow',\n // content\n '--bulma-content-heading-color',\n '--bulma-content-heading-weight',\n '--bulma-content-heading-line-height',\n '--bulma-content-block-margin-bottom',\n '--bulma-content-blockquote-background-color',\n '--bulma-content-blockquote-border-left',\n '--bulma-content-blockquote-padding',\n '--bulma-content-pre-padding',\n '--bulma-content-table-cell-border',\n '--bulma-content-table-cell-border-width',\n '--bulma-content-table-cell-padding',\n '--bulma-content-table-cell-heading-color',\n '--bulma-content-table-head-cell-border-width',\n '--bulma-content-table-head-cell-color',\n '--bulma-content-table-body-last-row-cell-border-bottom-width',\n '--bulma-content-table-foot-cell-border-width',\n '--bulma-content-table-foot-cell-color',\n // delete\n '--bulma-delete-dimensions',\n '--bulma-delete-background-l',\n '--bulma-delete-background-alpha',\n '--bulma-delete-color',\n // icon\n '--bulma-icon-dimensions',\n '--bulma-icon-dimensions-small',\n '--bulma-icon-dimensions-medium',\n '--bulma-icon-dimensions-large',\n '--bulma-icon-text-spacing',\n // notification\n '--bulma-notification-h',\n '--bulma-notification-s',\n '--bulma-notification-background-l',\n '--bulma-notification-color-l',\n '--bulma-notification-code-background-color',\n '--bulma-notification-radius',\n '--bulma-notification-padding',\n // progress\n '--bulma-progress-border-radius',\n '--bulma-progress-bar-background-color',\n '--bulma-progress-value-background-color',\n '--bulma-progress-indeterminate-duration',\n // table\n '--bulma-table-color',\n '--bulma-table-background-color',\n '--bulma-table-cell-border-color',\n '--bulma-table-cell-border-style',\n '--bulma-table-cell-border-width',\n '--bulma-table-cell-padding',\n '--bulma-table-cell-heading-color',\n '--bulma-table-cell-text-align',\n '--bulma-table-head-cell-border-width',\n '--bulma-table-head-cell-color',\n '--bulma-table-foot-cell-border-width',\n '--bulma-table-foot-cell-color',\n '--bulma-table-head-background-color',\n '--bulma-table-body-background-color',\n '--bulma-table-foot-background-color',\n '--bulma-table-row-hover-background-color',\n '--bulma-table-row-active-background-color',\n '--bulma-table-row-active-color',\n '--bulma-table-striped-row-even-background-color',\n '--bulma-table-striped-row-even-hover-background-color',\n // tag\n '--bulma-tag-h',\n '--bulma-tag-s',\n '--bulma-tag-background-l',\n '--bulma-tag-background-l-delta',\n '--bulma-tag-hover-background-l-delta',\n '--bulma-tag-active-background-l-delta',\n '--bulma-tag-color-l',\n '--bulma-tag-radius',\n '--bulma-tag-delete-margin',\n // title\n '--bulma-title-color',\n '--bulma-title-family',\n '--bulma-title-size',\n '--bulma-title-weight',\n '--bulma-title-line-height',\n '--bulma-title-strong-color',\n '--bulma-title-strong-weight',\n '--bulma-title-sub-size',\n '--bulma-title-sup-size',\n '--bulma-subtitle-color',\n '--bulma-subtitle-family',\n '--bulma-subtitle-size',\n '--bulma-subtitle-weight',\n '--bulma-subtitle-line-height',\n '--bulma-subtitle-strong-color',\n '--bulma-subtitle-strong-weight',\n // control\n '--bulma-control-radius',\n '--bulma-control-radius-small',\n '--bulma-control-border-width',\n '--bulma-control-height',\n '--bulma-control-line-height',\n '--bulma-control-padding-vertical',\n '--bulma-control-padding-horizontal',\n '--bulma-control-size',\n '--bulma-control-focus-shadow-l',\n // file\n '--bulma-file-radius',\n '--bulma-file-name-border-color',\n '--bulma-file-name-border-style',\n '--bulma-file-name-border-width',\n '--bulma-file-name-max-width',\n '--bulma-file-h',\n '--bulma-file-s',\n '--bulma-file-background-l',\n '--bulma-file-background-l-delta',\n '--bulma-file-hover-background-l-delta',\n '--bulma-file-active-background-l-delta',\n '--bulma-file-border-l',\n '--bulma-file-border-l-delta',\n '--bulma-file-hover-border-l-delta',\n '--bulma-file-active-border-l-delta',\n '--bulma-file-cta-color-l',\n '--bulma-file-name-color-l',\n '--bulma-file-color-l-delta',\n '--bulma-file-hover-color-l-delta',\n '--bulma-file-active-color-l-delta',\n // input\n '--bulma-input-h',\n '--bulma-input-s',\n '--bulma-input-l',\n '--bulma-input-border-style',\n '--bulma-input-border-l',\n '--bulma-input-border-l-delta',\n '--bulma-input-hover-border-l-delta',\n '--bulma-input-active-border-l-delta',\n '--bulma-input-focus-h',\n '--bulma-input-focus-s',\n '--bulma-input-focus-l',\n '--bulma-input-focus-shadow-size',\n '--bulma-input-focus-shadow-alpha',\n '--bulma-input-color-l',\n '--bulma-input-background-l',\n '--bulma-input-background-l-delta',\n '--bulma-input-height',\n '--bulma-input-shadow',\n '--bulma-input-placeholder-color',\n '--bulma-input-disabled-color',\n '--bulma-input-disabled-background-color',\n '--bulma-input-disabled-border-color',\n '--bulma-input-disabled-placeholder-color',\n '--bulma-input-arrow',\n '--bulma-input-icon-color',\n '--bulma-input-icon-hover-color',\n '--bulma-input-icon-focus-color',\n '--bulma-input-radius',\n // columns\n '--bulma-column-gap',\n // grid\n '--bulma-grid-gap',\n '--bulma-grid-column-count',\n '--bulma-grid-column-min',\n '--bulma-grid-cell-column-span',\n '--bulma-grid-cell-column-start',\n // footer\n '--bulma-footer-background-color',\n '--bulma-footer-color',\n '--bulma-footer-padding',\n // hero\n '--bulma-hero-body-padding',\n '--bulma-hero-body-padding-tablet',\n '--bulma-hero-body-padding-small',\n '--bulma-hero-body-padding-medium',\n '--bulma-hero-body-padding-large',\n // media\n '--bulma-media-border-color',\n '--bulma-media-border-size',\n '--bulma-media-spacing',\n '--bulma-media-spacing-large',\n '--bulma-media-content-spacing',\n '--bulma-media-level-1-spacing',\n '--bulma-media-level-1-content-spacing',\n '--bulma-media-level-2-spacing',\n // section\n '--bulma-section-padding',\n '--bulma-section-padding-desktop',\n '--bulma-section-padding-medium',\n '--bulma-section-padding-large',\n] as const;\n\n/** A single Bulma CSS variable key from the `bulmaCssVars` tuple. */\ntype BulmaVarKey = (typeof bulmaCssVars)[number];\n/** A partial record mapping Bulma CSS variable keys to string values. */\ntype BulmaVars = Partial<Record<BulmaVarKey, string>>;\n\n/**\n * Convert a Bulma CSS variable name to a camelCase prop name.\n * @param {string} varName - CSS variable name (e.g., '--bulma-primary-h').\n * @returns {string} The camelCase prop name (e.g., 'primaryH').\n */\nfunction cssVarToProp(varName: string): string {\n return varName\n .replace(/^--bulma-/, '')\n .split('-')\n .map((part, i) =>\n i === 0 ? part : part.charAt(0).toUpperCase() + part.slice(1)\n )\n .join('');\n}\n\n/**\n * Mapping of camelCase prop names to their Bulma CSS variable counterparts.\n *\n * `--bulma-shadow` is excluded: `cssVarToProp` would mint it as `shadow`,\n * which already exists as a `BulmaOtherProps` prop applied via\n * `useBulmaClasses` — keeping it out of this map means that\n * prop keeps its existing class-based meaning, while `--bulma-shadow` is\n * still reachable through the `bulmaVars` object.\n */\nconst bulmaVarPropMap = Object.fromEntries(\n bulmaCssVars\n .map(cssVar => [cssVarToProp(cssVar), cssVar])\n .filter(([prop]) => prop !== 'shadow')\n) as Record<string, string>;\n\n/**\n * Props for the Theme component.\n *\n * @property {React.ReactNode} children - Content to render inside the theme scope.\n * @property {string} [className] - Additional CSS classes (only when isRoot is false).\n * @property {boolean} [isRoot] - Inject CSS variables globally at :root level. Default: false.\n * @property {'light' | 'dark' | 'system'} [colorMode] - Set Bulma's light/dark scheme by writing\n * the `data-theme` attribute on the document root (`<html>`). This is always global, even on a\n * scoped Theme. `'system'` removes the attribute so Bulma follows the OS `prefers-color-scheme`.\n * Omit to leave the current setting untouched.\n * @property {BulmaVars} [bulmaVars] - Object mapping Bulma CSS variable names to values.\n * @property {string} [schemeH] - Scheme hue value.\n * @property {string} [schemeS] - Scheme saturation value.\n * @property {string} [lightL] - Light theme lightness value.\n * @property {string} [lightInvertL] - Light theme inverted lightness value.\n * @property {string} [darkL] - Dark theme lightness value.\n * @property {string} [darkInvertL] - Dark theme inverted lightness value.\n * @property {string} [softL] - Soft lightness value.\n * @property {string} [boldL] - Bold lightness value.\n * @property {string} [softInvertL] - Soft inverted lightness value.\n * @property {string} [boldInvertL] - Bold inverted lightness value.\n * @property {string} [hoverBackgroundLDelta] - Background lightness delta on hover.\n * @property {string} [activeBackgroundLDelta] - Background lightness delta on active.\n * @property {string} [hoverBorderLDelta] - Border lightness delta on hover.\n * @property {string} [activeBorderLDelta] - Border lightness delta on active.\n * @property {string} [hoverColorLDelta] - Text color lightness delta on hover.\n * @property {string} [activeColorLDelta] - Text color lightness delta on active.\n * @property {string} [hoverShadowADelta] - Shadow alpha delta on hover.\n * @property {string} [activeShadowADelta] - Shadow alpha delta on active.\n * @property {string} [primaryH] - Primary color hue.\n * @property {string} [primaryS] - Primary color saturation.\n * @property {string} [primaryL] - Primary color lightness.\n * @property {string} [linkH] - Link color hue.\n * @property {string} [linkS] - Link color saturation.\n * @property {string} [linkL] - Link color lightness.\n * @property {string} [infoH] - Info color hue.\n * @property {string} [infoS] - Info color saturation.\n * @property {string} [infoL] - Info color lightness.\n * @property {string} [successH] - Success color hue.\n * @property {string} [successS] - Success color saturation.\n * @property {string} [successL] - Success color lightness.\n * @property {string} [warningH] - Warning color hue.\n * @property {string} [warningS] - Warning color saturation.\n * @property {string} [warningL] - Warning color lightness.\n * @property {string} [dangerH] - Danger color hue.\n * @property {string} [dangerS] - Danger color saturation.\n * @property {string} [dangerL] - Danger color lightness.\n */\nexport interface ThemeProps extends Omit<\n BulmaClassesProps,\n 'color' | 'backgroundColor'\n> {\n children: ReactNode;\n className?: string;\n isRoot?: boolean;\n colorMode?: 'light' | 'dark' | 'system';\n bulmaVars?: BulmaVars;\n // Bulma scheme variables\n schemeH?: string;\n schemeS?: string;\n lightL?: string;\n lightInvertL?: string;\n darkL?: string;\n darkInvertL?: string;\n softL?: string;\n boldL?: string;\n softInvertL?: string;\n boldInvertL?: string;\n hoverBackgroundLDelta?: string;\n activeBackgroundLDelta?: string;\n hoverBorderLDelta?: string;\n activeBorderLDelta?: string;\n hoverColorLDelta?: string;\n activeColorLDelta?: string;\n hoverShadowADelta?: string;\n activeShadowADelta?: string;\n // Bulma color variables\n primaryH?: string;\n primaryS?: string;\n primaryL?: string;\n linkH?: string;\n linkS?: string;\n linkL?: string;\n infoH?: string;\n infoS?: string;\n infoL?: string;\n successH?: string;\n successS?: string;\n successL?: string;\n warningH?: string;\n warningS?: string;\n warningL?: string;\n dangerH?: string;\n dangerS?: string;\n dangerL?: string;\n // Add other commonly used ones as needed\n}\n\n/**\n * Theme component that injects Bulma CSS variables either globally or locally.\n *\n * When `isRoot` is true, variables are injected at `:root`. Otherwise, a wrapping\n * `<div>` scopes the variables to its children.\n *\n * @function\n * @param {ThemeProps} props - Props for the Theme component.\n * @returns {JSX.Element} The theme wrapper or fragment.\n *\n * @example\n * // Local theme scope\n * <Theme primaryH=\"171\" primaryS=\"100%\" primaryL=\"41%\">\n * <Button color=\"primary\">Themed</Button>\n * </Theme>\n */\nexport const Theme: React.FC<ThemeProps> = ({\n bulmaVars = {},\n children,\n className,\n isRoot = false,\n colorMode,\n ...restProps\n}) => {\n // Extract Bulma variable props from restProps\n const { bulmaVarProps, otherProps } = useMemo(() => {\n const varProps: Record<string, string | undefined> = {};\n const otherPropsObj: Record<string, unknown> = {};\n\n for (const [key, value] of Object.entries(restProps)) {\n if (Object.prototype.hasOwnProperty.call(bulmaVarPropMap, key)) {\n varProps[key] = value as string;\n } else {\n otherPropsObj[key] = value;\n }\n }\n\n return { bulmaVarProps: varProps, otherProps: otherPropsObj };\n }, [restProps]);\n\n // Use Bulma classes for styling (only when not isRoot)\n const { bulmaHelperClasses, rest } = useBulmaClasses(otherProps);\n\n // Merge bulmaVars and individual props, with props taking precedence\n const mergedVars: BulmaVars = useMemo(() => {\n const vars: BulmaVars = { ...bulmaVars };\n for (const [propName, cssVar] of Object.entries(bulmaVarPropMap)) {\n if (bulmaVarProps[propName] !== undefined) {\n vars[cssVar as BulmaVarKey] = bulmaVarProps[propName] as string;\n }\n }\n return vars;\n }, [bulmaVars, bulmaVarProps]);\n\n // Inject CSS variables globally at :root level\n useEffect(() => {\n if (!isRoot) {\n return;\n }\n\n const validVars = Object.entries(mergedVars).filter(\n ([key, value]) => bulmaCssVars.includes(key as BulmaVarKey) && value\n );\n\n if (validVars.length === 0) {\n return;\n }\n\n // Create and inject a style element for global CSS variables\n const styleId = 'bestax-bulma-theme-vars';\n let styleElement = document.getElementById(styleId) as HTMLStyleElement;\n\n if (!styleElement) {\n styleElement = document.createElement('style');\n styleElement.id = styleId;\n document.head.appendChild(styleElement);\n }\n\n const cssRules = validVars\n .map(([key, value]) => `${key}: ${value};`)\n .join(' ');\n styleElement.textContent = `:root { ${cssRules} }`;\n\n // Cleanup function to remove the style element when component unmounts\n return () => {\n const element = document.getElementById(styleId);\n if (element) {\n element.remove();\n }\n };\n }, [mergedVars, isRoot]);\n\n // Toggle Bulma's light/dark scheme by writing the `data-theme` attribute on\n // the document root (<html>). This is always global, even on a scoped Theme.\n // `'system'` removes the attribute so Bulma follows the OS preference.\n useEffect(() => {\n if (colorMode === undefined) {\n return;\n }\n\n const root = document.documentElement;\n const previous = root.getAttribute('data-theme');\n\n if (colorMode === 'system') {\n root.removeAttribute('data-theme');\n } else {\n root.setAttribute('data-theme', colorMode);\n }\n\n // Restore the previous value when colorMode changes or the component unmounts.\n return () => {\n if (previous === null) {\n root.removeAttribute('data-theme');\n } else {\n root.setAttribute('data-theme', previous);\n }\n };\n }, [colorMode]);\n\n // For local injection (when isRoot is false), prepare style object for CSS vars\n const style: CSSProperties = useMemo(() => {\n if (isRoot) {\n return {};\n }\n\n const styleObj: CSSProperties = {};\n for (const [key, value] of Object.entries(mergedVars)) {\n if (bulmaCssVars.includes(key as BulmaVarKey) && value) {\n (styleObj as Record<string, string>)[key] = value;\n }\n }\n return styleObj;\n }, [mergedVars, isRoot]);\n\n // Generate combined class names for the wrapper div\n const combinedClassName = useMemo(() => {\n if (isRoot) {\n return '';\n }\n return classNames(className, bulmaHelperClasses);\n }, [className, bulmaHelperClasses, isRoot]);\n\n return isRoot ? (\n <>{children}</>\n ) : (\n <div className={combinedClassName || undefined} style={style} {...rest}>\n {children}\n </div>\n );\n};\n","import React from 'react';\nimport classNames, { usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n validSchemeColors,\n} from '../helpers/useBulmaClasses';\nimport { mergeBulmaStyles } from '../helpers/mergeBulmaStyles';\n\n/**\n * Bulma container breakpoints.\n */\nexport type ContainerBreakpoint = 'tablet' | 'desktop' | 'widescreen';\n\n/**\n * Props for the Container component.\n */\nexport interface ContainerProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes. */\n className?: string;\n /** Text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /**\n * Text color alias: renders `has-text-<color>`, exactly like `textColor`.\n * Not a filled variant (no `.container.is-<color>` CSS exists). Prefer\n * `textColor`, which takes precedence when both are set; use `bgColor` for\n * a colored surface.\n */\n color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';\n /**\n * Background color helper. `scheme-*` values render as a dark-mode-safe\n * inline `background-color: var(--bulma-scheme-*)` instead of a class. The\n * `scheme-invert*` values do not change text color — pair them with a\n * contrasting foreground.\n */\n bgColor?:\n | (typeof validColors)[number]\n | (typeof validSchemeColors)[number]\n | 'inherit'\n | 'current';\n /** Makes the container full-width with a 32px gap on each side. */\n fluid?: boolean;\n /** Makes the container full-width until the `widescreen` breakpoint. */\n widescreen?: boolean;\n /** Makes the container full-width until the `fullhd` breakpoint. */\n fullhd?: boolean;\n /** Responsive breakpoint for container (`is-tablet`, `is-desktop`, `is-widescreen`). */\n breakpoint?: ContainerBreakpoint;\n /** Uses Bulma's `is-max-*` class for the specified breakpoint, limiting max width. */\n isMax?: boolean;\n /** Content inside the container. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Container` component provides a responsive and flexible layout wrapper for your Bulma React UI.\n *\n * @function\n * @param {ContainerProps} props - Props for the Container component.\n * @returns {JSX.Element} The rendered container.\n * @see {@link https://bulma.io/documentation/layout/container/ | Bulma Container documentation}\n */\nexport const Container: React.FC<ContainerProps> = ({\n className,\n textColor,\n color,\n bgColor,\n fluid,\n widescreen,\n fullhd,\n breakpoint,\n isMax,\n children,\n style,\n ...props\n}) => {\n const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n\n // Only allow isMax for supported breakpoints\n const validMaxBreakpoints: ContainerBreakpoint[] = [\n 'tablet',\n 'desktop',\n 'widescreen',\n ];\n let breakpointClass: string | undefined;\n if (breakpoint) {\n if (isMax && validMaxBreakpoints.includes(breakpoint)) {\n breakpointClass = `is-max-${breakpoint}`;\n } else if (!isMax) {\n breakpointClass = `is-${breakpoint}`;\n }\n }\n\n const mainClass = usePrefixedClassNames('container');\n const containerModifiers = usePrefixedClassNames('', {\n 'is-fluid': fluid,\n 'is-widescreen': widescreen,\n 'is-fullhd': fullhd,\n });\n const prefixedBreakpointClass = usePrefixedClassNames(breakpointClass || '');\n\n const containerClasses = classNames(\n mainClass,\n containerModifiers,\n prefixedBreakpointClass,\n className,\n bulmaHelperClasses\n );\n\n return (\n <div\n className={containerClasses}\n style={mergeBulmaStyles(bulmaHelperStyles, style)}\n {...rest}\n >\n {children}\n </div>\n );\n};\n\nexport default Container;\n","import React from 'react';\nimport classNames, { usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n validSchemeColors,\n} from '../helpers/useBulmaClasses';\nimport { mergeBulmaStyles } from '../helpers/mergeBulmaStyles';\n\n/**\n * Props for the Footer component.\n */\nexport interface FooterProps\n extends\n React.HTMLAttributes<HTMLElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** The HTML tag to render as. */\n as?: 'footer' | 'div';\n /** Bulma color modifier. */\n color?: (typeof validColors)[number] | 'inherit' | 'current';\n /**\n * Background color. `scheme-*` values render as a dark-mode-safe inline\n * `background-color: var(--bulma-scheme-*)` instead of a class. The\n * `scheme-invert*` values do not change text color — pair them with a\n * contrasting foreground.\n */\n bgColor?:\n | (typeof validColors)[number]\n | (typeof validSchemeColors)[number]\n | 'inherit'\n | 'current';\n /** Text color. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Additional CSS classes. */\n className?: string;\n /** Content inside the footer. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Footer` component provides a semantic and accessible site footer for your Bulma React UI.\n *\n * @function\n * @param {FooterProps} props - Props for the Footer component.\n * @returns {JSX.Element} The rendered footer element.\n * @see {@link https://bulma.io/documentation/layout/footer/ | Bulma Footer documentation}\n *\n * @example\n * <Footer>\n * <div className=\"content has-text-centered\">...</div>\n * </Footer>\n */\nexport const Footer: React.FC<FooterProps> = ({\n as = 'footer',\n className,\n children,\n color,\n bgColor,\n textColor,\n style,\n ...props\n}) => {\n const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n const Tag = as;\n const mainClass = usePrefixedClassNames('footer');\n const footerClasses = classNames(mainClass, bulmaHelperClasses, className);\n return (\n <Tag\n className={footerClasses}\n style={mergeBulmaStyles(bulmaHelperStyles, style)}\n {...rest}\n >\n {children}\n </Tag>\n );\n};\n\nexport default Footer;\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n validSchemeColors,\n} from '../helpers/useBulmaClasses';\nimport { mergeBulmaStyles } from '../helpers/mergeBulmaStyles';\nimport { warnUnstyledColor } from '../helpers/colorDeprecations';\n\n/**\n * Possible values for Bulma hero size.\n */\nexport type HeroSize =\n 'small' | 'medium' | 'large' | 'fullheight' | 'fullheight-with-navbar';\n\n/**\n * Props for the Hero component.\n */\nexport interface HeroProps\n extends\n React.HTMLAttributes<HTMLElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes. */\n className?: string;\n /**\n * Bulma color modifier for the hero section (renders `is-<color>`).\n *\n * Only `primary`, `link`, `info`, `success`, `warning`, `danger`, `black`,\n * `white`, `light`, and `dark` have shipped CSS for `.hero`. Every other\n * value the union accepts emits a class no CSS rule matches, so the hero\n * renders unstyled; those log a console warning in development and will be\n * removed from this union in the next major version.\n */\n color?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Hero size. */\n size?: HeroSize;\n /**\n * Bulma background color helper. `scheme-*` values render as a\n * dark-mode-safe inline `background-color: var(--bulma-scheme-*)` instead\n * of a class. The `scheme-invert*` values do not change text color — pair\n * them with a contrasting foreground.\n */\n bgColor?:\n | (typeof validColors)[number]\n | (typeof validSchemeColors)[number]\n | 'inherit'\n | 'current';\n /** Use fullheight hero with a navbar offset. */\n fullheightWithNavbar?: boolean;\n /** Hero content (often includes `Hero.Head`, `Hero.Body`, `Hero.Foot`). */\n children?: React.ReactNode;\n}\n\n/**\n * The `Hero` component provides a responsive, flexible, and visually striking section for your Bulma React UI.\n *\n * @function\n * @param {HeroProps} props - Props for the Hero component.\n * @returns {JSX.Element} The rendered hero.\n * @see {@link https://bulma.io/documentation/layout/hero/ | Bulma Hero documentation}\n */\nconst HeroComponent: React.FC<HeroProps> = ({\n className,\n color,\n size,\n bgColor,\n fullheightWithNavbar,\n children,\n style,\n ...props\n}) => {\n warnUnstyledColor('Hero', color, ['inherit', 'current']);\n\n const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({\n backgroundColor: bgColor,\n ...props,\n });\n\n const mainClass = usePrefixedClassNames('hero', {\n [`is-${color}`]: color,\n [`is-${size}`]: size && size !== 'fullheight-with-navbar',\n 'is-fullheight-with-navbar':\n fullheightWithNavbar || size === 'fullheight-with-navbar',\n });\n const heroClasses = classNames(mainClass, bulmaHelperClasses, className);\n\n return (\n <section\n className={heroClasses}\n style={mergeBulmaStyles(bulmaHelperStyles, style)}\n {...rest}\n >\n {children}\n </section>\n );\n};\n\n/**\n * Props for the HeroHead component.\n */\nexport interface HeroHeadProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes. */\n className?: string;\n /** Bulma color modifier for text. */\n color?: (typeof validColors)[number] | 'inherit' | 'current';\n /**\n * Background color. `scheme-*` values render as a dark-mode-safe inline\n * `background-color: var(--bulma-scheme-*)` instead of a class. The\n * `scheme-invert*` values do not change text color — pair them with a\n * contrasting foreground.\n */\n bgColor?:\n | (typeof validColors)[number]\n | (typeof validSchemeColors)[number]\n | 'inherit'\n | 'current';\n /** Text color. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Content. */\n children?: React.ReactNode;\n}\n\n/**\n * Top bar for navigation or branding.\n *\n * @function\n * @param {HeroHeadProps} props - Props for the HeroHead component.\n * @returns {JSX.Element} The rendered hero head.\n */\nexport const HeroHead: React.FC<HeroHeadProps> = ({\n className,\n children,\n color,\n bgColor,\n textColor,\n style,\n ...props\n}) => {\n const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n const mainClass = usePrefixedClassNames('hero-head');\n const heroHeadClasses = classNames(mainClass, bulmaHelperClasses, className);\n return (\n <div\n className={heroHeadClasses}\n style={mergeBulmaStyles(bulmaHelperStyles, style)}\n {...rest}\n >\n {children}\n </div>\n );\n};\n\n/**\n * Props for the HeroBody component.\n */\nexport interface HeroBodyProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes. */\n className?: string;\n /** Bulma color modifier for text. */\n color?: (typeof validColors)[number] | 'inherit' | 'current';\n /**\n * Background color. `scheme-*` values render as a dark-mode-safe inline\n * `background-color: var(--bulma-scheme-*)` instead of a class. The\n * `scheme-invert*` values do not change text color — pair them with a\n * contrasting foreground.\n */\n bgColor?:\n | (typeof validColors)[number]\n | (typeof validSchemeColors)[number]\n | 'inherit'\n | 'current';\n /** Text color. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Content. */\n children?: React.ReactNode;\n}\n\n/**\n * Main content area, vertically centered by default.\n *\n * @function\n * @param {HeroBodyProps} props - Props for the HeroBody component.\n * @returns {JSX.Element} The rendered hero body.\n */\nexport const HeroBody: React.FC<HeroBodyProps> = ({\n className,\n children,\n color,\n bgColor,\n textColor,\n style,\n ...props\n}) => {\n const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n const mainClass = usePrefixedClassNames('hero-body');\n const heroBodyClasses = classNames(mainClass, bulmaHelperClasses, className);\n return (\n <div\n className={heroBodyClasses}\n style={mergeBulmaStyles(bulmaHelperStyles, style)}\n {...rest}\n >\n {children}\n </div>\n );\n};\n\n/**\n * Props for the HeroFoot component.\n */\nexport interface HeroFootProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Additional CSS classes. */\n className?: string;\n /** Bulma color modifier for text. */\n color?: (typeof validColors)[number] | 'inherit' | 'current';\n /**\n * Background color. `scheme-*` values render as a dark-mode-safe inline\n * `background-color: var(--bulma-scheme-*)` instead of a class. The\n * `scheme-invert*` values do not change text color — pair them with a\n * contrasting foreground.\n */\n bgColor?:\n | (typeof validColors)[number]\n | (typeof validSchemeColors)[number]\n | 'inherit'\n | 'current';\n /** Text color. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Content. */\n children?: React.ReactNode;\n}\n\n/**\n * Bottom bar for tabs or actions.\n *\n * @function\n * @param {HeroFootProps} props - Props for the HeroFoot component.\n * @returns {JSX.Element} The rendered hero foot.\n */\nexport const HeroFoot: React.FC<HeroFootProps> = ({\n className,\n children,\n color,\n bgColor,\n textColor,\n style,\n ...props\n}) => {\n const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n const mainClass = usePrefixedClassNames('hero-foot');\n const heroFootClasses = classNames(mainClass, bulmaHelperClasses, className);\n return (\n <div\n className={heroFootClasses}\n style={mergeBulmaStyles(bulmaHelperStyles, style)}\n {...rest}\n >\n {children}\n </div>\n );\n};\n\n// Attach subcomponents\nexport const Hero = withSubComponents(\n HeroComponent,\n {\n Head: HeroHead,\n Body: HeroBody,\n Foot: HeroFoot,\n },\n 'Hero'\n);\n\nexport default Hero;\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport {\n type AnchorOnlyAttributes,\n ANCHOR_ONLY_ATTRS,\n omitAttrs,\n} from '../helpers/anchorAttrs';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * Props for the Level component.\n */\nexport interface LevelProps\n extends\n React.HTMLAttributes<HTMLElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Keeps the level horizontal on mobile (Bulma `is-mobile`). Without it\n * the level stacks vertically below tablet. */\n isMobile?: boolean;\n /** Bulma color modifier for the level. */\n color?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Bulma background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Bulma text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Additional CSS classes. */\n className?: string;\n /** Level content (`Level.Left`, `Level.Right`, `Level.Item`). */\n children?: React.ReactNode;\n}\n\n/**\n * The `Level` component provides a flexible horizontal layout for your Bulma React UI, perfect for aligning items on the left and right, distributing items evenly, or centering statistics and controls.\n *\n * @function\n * @param {LevelProps} props - Props for the Level component.\n * @returns {JSX.Element} The rendered level.\n * @see {@link https://bulma.io/documentation/layout/level/ | Bulma Level documentation}\n */\nconst LevelComponent: React.FC<LevelProps> = ({\n isMobile,\n className,\n children,\n color,\n bgColor,\n textColor,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n const mainClass = usePrefixedClassNames('level', {\n 'is-mobile': isMobile,\n });\n const levelClasses = classNames(mainClass, bulmaHelperClasses, className);\n return (\n <nav className={levelClasses} {...rest}>\n {children}\n </nav>\n );\n};\n\n/**\n * Props for the LevelLeft component.\n */\nexport interface LevelLeftProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Bulma color modifier. */\n color?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Text color. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Additional CSS classes. */\n className?: string;\n /** Content. */\n children?: React.ReactNode;\n}\n\n/**\n * Left-aligned content.\n *\n * @function\n * @param {LevelLeftProps} props - Props for the LevelLeft component.\n * @returns {JSX.Element} The rendered level left section.\n */\nexport const LevelLeft: React.FC<LevelLeftProps> = ({\n className,\n children,\n color,\n bgColor,\n textColor,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n const mainClass = usePrefixedClassNames('level-left');\n const levelLeftClasses = classNames(mainClass, bulmaHelperClasses, className);\n return (\n <div className={levelLeftClasses} {...rest}>\n {children}\n </div>\n );\n};\n\n/**\n * Props for the LevelRight component.\n */\nexport interface LevelRightProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Bulma color modifier. */\n color?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Text color. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Additional CSS classes. */\n className?: string;\n /** Content. */\n children?: React.ReactNode;\n}\n\n/**\n * Right-aligned content.\n *\n * @function\n * @param {LevelRightProps} props - Props for the LevelRight component.\n * @returns {JSX.Element} The rendered level right section.\n */\nexport const LevelRight: React.FC<LevelRightProps> = ({\n className,\n children,\n color,\n bgColor,\n textColor,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n const mainClass = usePrefixedClassNames('level-right');\n const levelRightClasses = classNames(\n mainClass,\n bulmaHelperClasses,\n className\n );\n return (\n <div className={levelRightClasses} {...rest}>\n {children}\n </div>\n );\n};\n\n/**\n * The derived set plus `rel`.\n *\n * `rel` is not an anchor-only attribute — React declares it on every element, so\n * `AnchorOnlyAttributes` excludes it — but this component has always withheld it\n * from a non-anchor, so it is named separately rather than folded into the shared\n * set. That separation is what says which names come from where.\n *\n * The annotation is load-bearing: without it a typo adds a key nobody strips, and\n * widening the key type to `string` also erases `omitAttrs`'s return type.\n */\nconst STRIP_FROM_NON_ANCHOR: Readonly<\n Record<keyof AnchorOnlyAttributes | 'rel', true>\n> = { ...ANCHOR_ONLY_ATTRS, rel: true };\n\n/**\n * Props for the LevelItem component.\n *\n * The anchor attributes arrive through `AnchorOnlyAttributes`, at every `as`, and\n * are forwarded only when the tag is an `<a>` — so `<Level.Item as=\"p\" download>` compiles and\n * renders a `<p>` without it. That asymmetry is deliberate for now: deriving\n * them from `as` instead is what makes the dead pair a type error, and it also\n * stops `const p: LevelItemProps = { href }` compiling for consumers who write\n * it today. #672 carries that half, labelled `next-major`.\n *\n * What that set must NOT become is a hand-written list. Enumerating only `href`,\n * `target` and `rel` made every other anchor attribute a type error even at\n * `as=\"a\"`, which is what #641 reported; `helpers/anchorAttrs.ts` derives it from\n * React instead, and `ANCHOR_ONLY_ATTRS` there is the guard to protect.\n */\nexport interface LevelItemProps\n extends\n AnchorOnlyAttributes,\n React.HTMLAttributes<\n HTMLDivElement | HTMLParagraphElement | HTMLAnchorElement\n >,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Element type to render. */\n as?: 'div' | 'p' | 'a';\n /** Center the text in the item. */\n hasTextCentered?: boolean;\n /** Bulma color modifier. */\n color?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Text color. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Additional CSS classes. */\n className?: string;\n /** Content. */\n children?: React.ReactNode;\n}\n\n/**\n * Individual item, can be rendered as `div`, `p`, or `a`.\n *\n * @function\n * @param {LevelItemProps} props - Props for the LevelItem component.\n * @returns {JSX.Element} The rendered level item.\n */\nexport const LevelItem: React.FC<LevelItemProps> = ({\n as = 'div',\n hasTextCentered,\n className,\n children,\n color,\n bgColor,\n textColor,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n const Tag = as;\n\n const mainClass = usePrefixedClassNames('level-item', {\n 'has-text-centered': hasTextCentered,\n });\n const levelItemClasses = classNames(mainClass, bulmaHelperClasses, className);\n\n // The anchor's own attributes reach an `<a>` and nothing else. The type\n // declares them at every `as` — narrowing that is source-breaking (#672) — so\n // the runtime is what keeps `<Level.Item as=\"p\" download>` from rendering a\n // dead attribute.\n // `STRIP_FROM_NON_ANCHOR` above names the set and why `rel` is in it.\n\n if (Tag === 'a') {\n return (\n <a className={levelItemClasses} {...rest}>\n {children}\n </a>\n );\n }\n\n const withoutAnchorAttrs = omitAttrs(rest, STRIP_FROM_NON_ANCHOR);\n\n return (\n <Tag className={levelItemClasses} {...withoutAnchorAttrs}>\n {children}\n </Tag>\n );\n};\n\nexport const Level = withSubComponents(\n LevelComponent,\n {\n Left: LevelLeft,\n Right: LevelRight,\n Item: LevelItem,\n },\n 'Level'\n);\n\nexport default Level;\n","import React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { withSubComponents } from '../helpers/withSubComponents';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n} from '../helpers/useBulmaClasses';\n\n/**\n * Props for the Media component.\n */\nexport interface MediaProps\n extends\n React.HTMLAttributes<HTMLElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Element type for the root Media container. */\n as?: 'article' | 'div';\n /** Bulma color modifier. */\n color?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Bulma background color helper. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Bulma text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Additional CSS classes. */\n className?: string;\n /** Content inside the media container. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Media` component implements Bulma’s powerful media object layout for React.\n *\n * @function\n * @param {MediaProps} props - Props for the Media component.\n * @returns {JSX.Element} The rendered media container.\n * @see {@link https://bulma.io/documentation/layout/media-object/ | Bulma Media documentation}\n */\nconst MediaComponent: React.FC<MediaProps> = ({\n as = 'article',\n className,\n children,\n color,\n bgColor,\n textColor,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n const Tag = as;\n const mainClass = usePrefixedClassNames('media');\n const mediaClasses = classNames(mainClass, bulmaHelperClasses, className);\n return (\n <Tag className={mediaClasses} {...rest}>\n {children}\n </Tag>\n );\n};\n\n/**\n * Props for the MediaLeft component.\n */\nexport interface MediaLeftProps\n extends\n React.HTMLAttributes<HTMLElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Element type to render. */\n as?: 'figure' | 'div';\n /** Bulma color modifier. */\n color?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Text color. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Additional CSS classes. */\n className?: string;\n /** Content. */\n children?: React.ReactNode;\n}\n\n/**\n * For avatars, thumbnails, icons (renders as `figure` or `div`)\n *\n * @function\n * @param {MediaLeftProps} props - Props for the MediaLeft component.\n * @returns {JSX.Element} The rendered media left section.\n */\nexport const MediaLeft: React.FC<MediaLeftProps> = ({\n as = 'figure',\n className,\n children,\n color,\n bgColor,\n textColor,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n const Tag = as;\n const mainClass = usePrefixedClassNames('media-left');\n const mediaLeftClasses = classNames(mainClass, bulmaHelperClasses, className);\n return (\n <Tag className={mediaLeftClasses} {...rest}>\n {children}\n </Tag>\n );\n};\n\n/**\n * Props for the MediaContent component.\n */\nexport interface MediaContentProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Bulma color modifier. */\n color?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Text color. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Additional CSS classes. */\n className?: string;\n /** Content. */\n children?: React.ReactNode;\n}\n\n/**\n * Main content (renders as `div`)\n *\n * @function\n * @param {MediaContentProps} props - Props for the MediaContent component.\n * @returns {JSX.Element} The rendered media content section.\n */\nexport const MediaContent: React.FC<MediaContentProps> = ({\n className,\n children,\n color,\n bgColor,\n textColor,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n const mainClass = usePrefixedClassNames('media-content');\n const mediaContentClasses = classNames(\n mainClass,\n bulmaHelperClasses,\n className\n );\n return (\n <div className={mediaContentClasses} {...rest}>\n {children}\n </div>\n );\n};\n\n/**\n * Props for the MediaRight component.\n */\nexport interface MediaRightProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {\n /** Bulma color modifier. */\n color?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Background color. */\n bgColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Text color. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Additional CSS classes. */\n className?: string;\n /** Content. */\n children?: React.ReactNode;\n}\n\n/**\n * Actions or controls (renders as `div`)\n *\n * @function\n * @param {MediaRightProps} props - Props for the MediaRight component.\n * @returns {JSX.Element} The rendered media right section.\n */\nexport const MediaRight: React.FC<MediaRightProps> = ({\n className,\n children,\n color,\n bgColor,\n textColor,\n ...props\n}) => {\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n const mainClass = usePrefixedClassNames('media-right');\n const mediaRightClasses = classNames(\n mainClass,\n bulmaHelperClasses,\n className\n );\n return (\n <div className={mediaRightClasses} {...rest}>\n {children}\n </div>\n );\n};\n\n/** Media component with Left, Content, and Right sub-components. */\nexport const Media = withSubComponents(\n MediaComponent,\n {\n Left: MediaLeft,\n Content: MediaContent,\n Right: MediaRight,\n },\n 'Media'\n);\n\nexport default Media;\n","import React from 'react';\nimport classNames, { usePrefixedClassNames } from '../helpers/classNames';\nimport {\n useBulmaClasses,\n BulmaClassesProps,\n validColors,\n validSchemeColors,\n} from '../helpers/useBulmaClasses';\nimport { mergeBulmaStyles } from '../helpers/mergeBulmaStyles';\n\n/**\n * Section size values for Bulma.\n */\ntype SectionSize = 'medium' | 'large';\n\n/**\n * Props for the Section component.\n */\nexport interface SectionProps\n extends\n React.HTMLAttributes<HTMLElement>,\n Omit<BulmaClassesProps, 'backgroundColor' | 'color'> {\n /** Bulma color modifier for text. */\n color?: (typeof validColors)[number] | 'inherit' | 'current';\n /**\n * Bulma background color helper. `scheme-*` values render as a\n * dark-mode-safe inline `background-color: var(--bulma-scheme-*)` instead\n * of a class. The `scheme-invert*` values do not change text color — pair\n * them with a contrasting foreground.\n */\n bgColor?:\n | (typeof validColors)[number]\n | (typeof validSchemeColors)[number]\n | 'inherit'\n | 'current';\n /** Bulma text color helper. */\n textColor?: (typeof validColors)[number] | 'inherit' | 'current';\n /** Section size for extra vertical spacing. */\n size?: SectionSize;\n /** Additional CSS classes. */\n className?: string;\n /** Section content. */\n children?: React.ReactNode;\n}\n\n/**\n * The `Section` component provides vertical spacing and visual separation for your Bulma React UI.\n *\n * @function\n * @param {SectionProps} props - Props for the Section component.\n * @returns {JSX.Element} The rendered section.\n * @see {@link https://bulma.io/documentation/layout/section/ | Bulma Section documentation}\n */\nexport const Section: React.FC<SectionProps> = ({\n size,\n className,\n children,\n color,\n bgColor,\n textColor,\n style,\n ...props\n}) => {\n const { bulmaHelperClasses, bulmaHelperStyles, rest } = useBulmaClasses({\n color: textColor ?? color,\n backgroundColor: bgColor,\n ...props,\n });\n\n const mainClass = usePrefixedClassNames('section');\n const sectionModifiers = usePrefixedClassNames('', {\n [`is-${size}`]: size,\n });\n const sectionClasses = classNames(\n mainClass,\n sectionModifiers,\n className,\n bulmaHelperClasses\n );\n\n return (\n <section\n className={sectionClasses}\n style={mergeBulmaStyles(bulmaHelperStyles, style)}\n {...rest}\n >\n {children}\n </section>\n );\n};\n"],"names":["createContext","useContext","_jsx","validSizes","validAlignments","useMemo","forwardRef","useState","useRef","useEffect","_jsxs","isBrowser","useCallback","STRIP_FROM_NON_ANCHOR","useSyncExternalStore","FOCUSABLE_SELECTOR","useId","createPortal","_Fragment","useLayoutEffect","Children","isValidElement","cloneElement","wrap","fireTickHaptic"],"mappings":";;;;;;;AAgBA,MAAM,aAAa,GAAGA,mBAAa,CAAqB,EAAE,CAAC;AAE3D;;;;;AAKG;AACI,MAAM,SAAS,GAAG,MAAMC,gBAAU,CAAC,aAAa;AAevD;;;;;;;;;;;AAWG;AACI,MAAM,cAAc,GAAkC,CAAC,EAC5D,WAAW,EACX,WAAW,EACX,QAAQ,GACT,KAAI;AACH,IAAA,QACEC,cAAA,CAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,YACxD,QAAQ,EAAA,CACc;AAE7B;AAEA;;;;;AAKG;AACI,MAAM,cAAc,GAAG,MAAK;AACjC,IAAA,MAAM,EAAE,WAAW,EAAE,GAAG,SAAS,EAAE;IACnC,OAAO,WAAW,IAAI,EAAE;AAC1B;AAEA;;;;;AAKG;AACI,MAAM,gBAAgB,GAAG,MAAK;AACnC,IAAA,MAAM,EAAE,WAAW,EAAE,GAAG,SAAS,EAAE;AACnC,IAAA,OAAO,CAAC,SAAiB,KACvB,WAAW,GAAG,CAAA,EAAG,WAAW,GAAG,SAAS,CAAA,CAAE,GAAG,SAAS;AAC1D;AAEA;;;;;AAKG;AACI,MAAM,cAAc,GAAG,MAAK;AACjC,IAAA,MAAM,EAAE,WAAW,EAAE,GAAG,SAAS,EAAE;AACnC,IAAA,OAAO,WAAW;AACpB;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