npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@biugle/react-components

v2.0.3

Published

Composable UI primitives, enterprise Pro components and body-mounted fire utilities for React.

Readme

@biugle/react-components

React UI primitives, enterprise Pro components and fire body mounting utilities. The package root exports Pro components; @biugle/react-components/ui exports composable UI parts.

pnpm add @biugle/react-components react react-dom
import { Button, Dialog, PageBox, biuMessage, fire } from "@biugle/react-components";
import "@biugle/react-components/styles.css";

<PageBox title="用户管理" actions={<Button>新增</Button>} />;
fire(Dialog)({ title: "详情", children: <p>业务内容由调用方提供。</p> });
biuMessage.success("保存成功");

The stylesheet is intentionally split by ownership. src/ui/<component>/styles.css contains the visual contract for one UI primitive, src/pro/<component>/styles.css contains Pro-only layout or preset rules, and src/styles.css is only the public import boundary for shared contracts and those files. Design tokens and shared animations live in src/theme.default.css, which is also published as @biugle/react-components/theme.default.css for theme extension.

The default entry is the Pro layer with stable presets and component-prefixed classes. Use the UI entry when you need to assemble a structure yourself. Every catalog group has a matching Pro entry directory, so the boundary is explicit and can grow without changing the low-level import:

import { Dialog, DialogBody, DialogFooter, DialogHeader, DialogTitle } from "@biugle/react-components/ui";
import { Dialog as ProDialog } from "@biugle/react-components/pro";

fire(Component)(props) mounts any React component under body and returns { update, close, destroy }. fire.node(node) mounts an existing node, while fire.render(({ close, update }) => node) is intended for fully custom content.

The published theme.default.css defines the shared --biu-z-index-* ladder for fixed widgets (200), fullscreen content (250), loading (300), Drawer (600), Dialog (601), Fire hosts (650), image previews (675), Popover/Dropdown/Select (700), context menus (720), Message/Notification (750) and Tooltip (800). Preset and Table styles use the same tokens. Override a token on :root when an embedding application needs a different layer contract; avoid assigning extreme per-component values.

UI Popover, Popconfirm and DropdownMenu accept Button-like interactive triggers and manage toggle, outside click, Escape and accessibility state. Popover/Popconfirm support width constraints; DropdownMenu supports checkbox/radio/submenu items, header/footer slots and a dropdownRender wrapper. Popover, DropdownMenu, Select, Cascader, Date/Time pickers, Autocomplete and ContextMenu cap panel height to the viewport or Radix collision space and scroll overflowing content inside the panel. Ellipsis includes overflow detection and Tooltip. CopyText composes Ellipsis with a copy action: text is the exact clipboard value, content can customize the rendered value, and copyOnHover hides the action until hover/focus on hover-capable devices while keeping it visible on touch-first devices. Copying prefers navigator.clipboard.writeText and falls back to a temporary textarea with document.execCommand("copy") for older webviews. Pro Dialog and Drawer add preset sizes, async confirmation, footer, mask closing, four-way placement and fullscreen Drawer behavior.

Dialog is draggable by default: hold a non-interactive area of its header to move it within the browser viewport. Its initial position still comes from position and offsets; close/reopen restores that position. Buttons, links and inputs do not start a drag, and fullscreen Dialogs ignore dragging. Set draggable={false} to disable it; Drawer remains non-draggable by default. Menu, Alert, Notification and biuMessage accept explicit dir="ltr" | "rtl", defaulting to LTR. Callers choose direction on each instance; these components do not read Runtime or ConfigProvider direction. Menu arrowPosition="left" | "right" selects the logical start or end and mirrors with dir. RTL mirrors reading order, menu hierarchy, message layout and the Notification stack's logical-end placement.

Tooltip.touchActivation defaults to true: a touch long-press of about 700ms opens the hint, movement beyond 10px cancels it, and it closes about 1.5s after release. Short taps still reach the wrapped action; the synthetic click after a long-press is consumed to prevent accidental activation. Set touchActivation={false} when a wrapped control must not use long-press. Ellipsis only opens its touch Tooltip when the text actually overflows unless alwaysTooltip is enabled; overflow checks include clipping ancestors such as Detail value containers.

DatePicker and RangeDatePicker allow direct year entry and month selection in the calendar header, so historical dates do not require repeated month navigation. The showcase includes explicit 12-hour YYYY-MM-DD hh:mm A date-time and hh:mm A time examples; A formats the meridiem marker, and the AM/PM toggle follows the component locale.

The UI entry includes the main catalog used by the Demo: controls (TextField, Textarea, InputNumber, Select, Cascader, DatePicker, RangeDatePicker, TimePicker, RangeTimePicker, Checkbox, CheckboxGroup, Radio, RadioGroup, Switch), navigation and data display (Tabs, DropdownMenu, Menu, Tree, Transfer, Pagination, Tag, Progress, Anchor, ScrollProgress, Detail), overlays and feedback (Tooltip, Ellipsis, CopyText, Popover, Popconfirm, Dialog, Drawer, Alert, Empty, Loading), layout (Box, Stack, Grid, Card, Divider, ScrollArea, Collapsible, Steps) and file capabilities (Upload, FileList, FileCard, FilePreview, FilePreviewDialog, FileRender). TextField.inputRule supports number, letter and alphanumeric filtering, while inputPattern accepts an incremental string | RegExp filter for custom codes; use Form rules for final fixed-length validation. InputNumber limits absolute values to Number.MAX_SAFE_INTEGER and fractional precision to 15 places. It rejects decimal text that changes when converted to a JavaScript Number and back, so larger integer portions may leave fewer safe decimal places. Unsafe values keep the last valid value and prompt users to use TextField; stringMode changes the callback type but does not enable arbitrary precision. Use TextField for larger values, high-precision decimal strings, identifiers, or codes. InputNumber uses decimal-safe arithmetic for button, keyboard and wheel steps, so values such as 0.1 + 0.2 do not expose binary floating-point tails. SearchTextField, Autocomplete and Skeleton remain deprecated compatibility exports only; they are not part of the new main catalog or Demo order. The root/Pro entry re-exports the UI components and adds PageBox, PageFilter (with the floating-label PageFilterItem / PageFilter.Item), Result and Confirm presets.

Responsive Pagination keeps the standard page list and configured page-size/jump widths (90px by default) at 800px and wider. At 560–799px it hides the optional range/total and uses 45px controls while keeping the full page list; below 560px it keeps those controls and shows only the current page with previous/next actions. Set responsive={false} to keep the standard layout at every viewport width.

File preview/download actions use the small button geometry, download links have no browser underline, and their text is optically centered inside the button frame. Text previews render in script-disabled sandboxed frames; PDF frames use a sandbox without same-origin access, and file URLs with executable schemes are ignored.

Switch keeps checkedChildren and unCheckedChildren as compatibility props, but its visual track intentionally never renders text: provide aria-label (or a nearby label) for the accessible state name. Caller-supplied values are never silently discarded: an unknown Select value renders as-is, unknown multi-values remain removable disabled tags, unknown Cascader path segments stay visible, and target values absent from Transfer source stay at the top of the right list as disabled removable items. Select multi-value tags and dropdown/menu labels use shrinkable content layers so long values remain inside their collision-constrained panels. With maxTagCount="responsive", the first tag remains visible once it fits beside the +N badge and trailing controls; narrower triggers keep the badge alone. Select lazy loading supports loadMoreTrigger="scroll" | "click" | "both"; click and both render the component-owned outlined 加载更多 action outside the scroll list. Cascader search is independent per column; use searchLevels to limit search to selected zero-based columns, loadChildren for the first page, loadMoreChildren with hasMore/loadMoreTrigger for incremental pages, and loadSearchChildren for remote filtering in the active column. Mark loaded leaves with isLeaf: true. Cascader renders at most six levels; deeper child nodes are intentionally ignored so the panel remains usable. The panel expands to its content width and scrolls horizontally when six columns do not fit. Transfer uses oneWay to disable the middle move-back operation and itemActions(item, direction) for custom far-right item actions; in two-way mode, the right list defaults to an icon-only remove action. Date preset labels use Ellipsis and inherit its Tooltip behavior.

PageBox accepts header for a caller-owned header region such as full-width Tabs, while still rendering the stable PageHeader/Body/Footer frame. PageFilterItem.tooltip renders a question-mark action after the floating label and uses the shared Tooltip; it does not add another field border. The same contract is available on table Column.tooltip, where the question mark is vertically aligned with the header title. Both props accept any ReactNode.

Detail renders configuration-driven read-only records. Pass data and sections; each DetailSection supports title, icon, items, columns and bordered, while each DetailItem supports key/dataIndex (including dotted paths), title, render, span, tooltip, ellipsis, className and classNames. Values default to - when empty, long values use the shared Ellipsis contract, and responsive layouts collapse from four columns to two and then one column. Item spans clamp to the visible column count, and touch long-press reveals clipped values.

Select accepts size="small" | "medium" | "large"; small is the compact geometry used by PageFilter and table toolbars. Button accepts onlyIcon for independent icon actions; Button owns the square geometry, icon centering, removal of the visible label node and Tooltip rendering. Pass tooltip to override the Tooltip content. ButtonList accepts a semantic items array and maxCount; when the list reaches maxCount, the last slot is reserved for the overflow menu. Text actions render their icon and label by default; pass iconOnly for table-row actions and it delegates to Button onlyIcon. The overflow trigger is also a Button-owned icon-only action, and its DropdownMenu items intentionally render text labels without duplicate icons while invoking the same onClick callback.

Textarea owns one resize contract: resize="both" | "horizontal" | "vertical" | "none". The visible control and its outer frame update together. A contained 24px corner target (data-biu-resize-handle="true") with a small bottom-right drag mark is the only affordance; the browser-native second handle is disabled, so resizing cannot escape the component frame and className="w-full" remains stable.

The package uses Radix primitives for overlay behavior and Tailwind CSS for the compiled style layer while retaining biu-ui-*/biu-pro-* classes, CSS variables and className/classNames overrides. Group controls support vertical layout and optionRender; Alert supports custom icon, description, action and close slots. Textarea uses one component-owned resize contract (resize="both" | "horizontal" | "vertical" | "none") with a max-width boundary, a small bottom-right drag mark, and no browser-native second handle. Range date/time controls use a direct range interaction: dates are chosen in two consecutive clicks and normalized into start/end order; time controls keep the opposite value or fill its visible default when one side is edited. PageFilter supports PageFilter.Item floating labels plus moreFields in a body-mounted Drawer. Each direct field control receives w-full while preserving caller classes, so it fills its responsive Grid track; the action cluster occupies the final track without extra padding, the inline area is limited to two rows by default (maxRows), and overflow fields are automatically exposed through the Drawer (autoCollapse). The Drawer includes visible filter items by default (includeVisibleFieldsInDrawer) so controlled field state stays synchronized, defaults to the wider large preset, and supports controlled drawerOpen, drawerTitle, drawerWidth, drawerFooter and Drawer class-name overrides. Chart, RichText, Editor and Preview Server are intentionally excluded from this base package and may be added later as optional adapters.

Tabs defaults to the full width of its parent; the tab bar and divider stretch across that row while tab labels keep their natural widths. Anchor scans a configurable content container for h1–h5, generates missing stable ids, highlights the current heading while the window or a specified scroll container moves, and scrolls to a selected heading with offsetTop support. Smooth clicks and incoming URL hashes remeasure the live target while content above it lays out, keeping deep links aligned when skipped sections materialize. With collapsible, the catalog header and the configured heading levels (level one and two by default) can be collapsed independently through controlled or uncontrolled keys. arrowPosition and fixed position accept physical left/right or logical start/end; logical values follow ConfigProvider.direction or inherited dir, and fixed mode defaults to logical end (right in LTR, left in RTL). In fixed mode, draggable adds a dedicated handle for moving the whole catalog within the browser viewport by pointer or arrow keys, while closable adds a close action that hides it until the page is fully reloaded. A stable root id keeps it dismissed across SPA route unmount/remounts. The close action releases observers and listeners, and drag/collapse/close use separate controls. Static mode stays in normal flow without these floating controls. Header alignment, nesting, connector and logical arrows adapt to LTR/RTL. The fixed catalog caps its height below the viewport and scrolls only its list; hideOnMobile is a logical render guard (enabled by default). ScrollProgress measures the same window/container boundary, renders a compact percentage progress indicator and exposes a thresholded smooth “回到顶部” button. Its label can be hidden with showLabel, overflowing labels use the shared Ellipsis Tooltip, and backTopMode="always" keeps the button visible even at 0%. It supports all four fixed viewport corners and mode="static" for embedding inside cards or custom layouts. Both components keep stable root/slot classes, accept className/classNames, clean up observers/listeners on unmount, and use the component locale contract for default labels.

Default visible text is Chinese. Use ConfigProvider locale="en-US" for built-in English resources, or pass locale and localeText directly to a component, for example Dialog localeText={{ "确定": "Continue" }}. Chinese source text is always the resource key; visible labels, dynamic messages, aria-label and title use the same resources. The package publishes locale/zh-CN.json and locale/en-US.json from its local src/locale/ directory.

Slider supports a single value or a range tuple, decimal-safe min/max/step snapping, marks, dots, tooltip="hover" | "always" | "never", vertical/reverse layouts, disabled state, controlled/uncontrolled values, opacity and onChange/onChangeComplete. hover shows the value while hovering, keyboard focusing or dragging a handle on touch, always keeps it visible, and never hides it; legacy auto is treated as hover. Native range inputs provide keyboard and accessibility semantics while the shared track handles click and drag updates. The value tooltip uses a light surface and the visible rail and native handle share the same endpoints.

Ownership and performance

Use @biugle/react-components/ui when composing a primitive yourself. Use the root or @biugle/react-components/pro entry when you need the stable business preset, default geometry, locale wiring, page layout or body-mounted overlay behavior. Keeping those boundaries explicit lets applications wrap UI components without importing page-level assumptions.

The package avoids work that is not visible: disabled Tooltips do not mount an interaction tree, Ellipsis measures overflow on first hover/focus rather than for every render, and shared observers/listeners are released on unmount. Notification hosts are created under body and stay outside document flow, so the first message does not resize or flash the page. These are implementation details, not a replacement for virtualizing a genuinely long list; callers should opt into the Table virtual contract when the row count requires it.

maxCount applies at every viewport unless compactMaxCount overrides it below 800px. Without either explicit limit, standalone lists default to 3 slots below 800px and 1 below 560px. Inside a Table actionColumn, an icon-only ButtonList with no explicit limit receives a table-computed default: 1 slot below 560px, 3 from 560px through 799px, and 5 at 800px and above. These counts include the overflow button and are capped to fit the resolved cell width; explicit caller limits always win. Small icon-only actions keep a 30px square target and 15px icon; DropdownMenu options use compact 12px text, with long labels handled by the shared Ellipsis Tooltip.

PageFilter layout and batch input

PageFilter computes equal explicit Grid tracks from the available container width, with at most six columns and two collapsed rows by default. Actions occupy the last explicit track (grid-column: -2 / -1), avoiding an additional intrinsic-width column. The default minimum track width is 170px; explicit item widths and action content also participate in capacity calculation. Controls fill their track, while an explicit PageFilterItem.width still opts into a fixed item width bounded by its container. Container, item-width, locale and action-size changes recalculate layout without mounting hidden copies of inputs. Mobile uses one track; a one-row narrow layout may keep only actions and expose every field in the Drawer. An empty filter reserves no space. An open Drawer stays mounted when the window grows; closing removes an unneeded entry, and narrowing does not reopen it automatically.

| Component | Property | TypeScript type | Default | Values / parameters | Behavior | Example | | ---------- | ---------------------------- | ----------------- | --------- | ------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------ | | PageFilter | itemMinWidth | number | 170 | Positive pixels | Minimum track width. Invalid values fall back to 170; small containers retain one shrinkable track. | itemMinWidth={280} | | PageFilter | maxRows | number | 2 | 1, 2 | Maximum rows when automatic collapsing is enabled. Finite values normalize to 1..2; invalid values fall back to 2. | maxRows={1} | | PageFilter | autoCollapse | boolean | true | true, false | True moves overflow fields to advanced filters; false retains every field and allows natural additional rows. | autoCollapse={false} | | PageFilter | actions | React.ReactNode | undefined | ReactNode | Right-aligns actions in the final explicit track and includes their width in capacity calculations. | actions={<Button size="small">Search</Button>} | | PageFilter | includeVisibleFieldsInDrawer | boolean | true | true, false | Includes inline fields in the Drawer; false keeps only collapsed fields and moreFields. | includeVisibleFieldsInDrawer={false} |

Form.Item.tooltip, Form.List.columns[].tooltip, PageFilterItem.tooltip, Column.tooltip and DetailItem.tooltip use explicit text spans. Each component owns the centered layout of its Tooltip root, trigger, button and SVG with the adjacent text, without icon offsets. Standard Table pages demonstrate filter hints and batch keywords.

ProTextField

The root and /pro entries export ProTextField; /ui retains the primitive TextField. Draft edits are separate from committed text. Cancel, Escape and outside dismissal discard drafts without changing field values. Multiline paste opens a draft; Apply parses it using the active rules and joins non-empty items with line breaks while preserving order and duplicates. Direct typing immediately calls onChange; blur parses enabled separators, removes empty items and formats changed text before reporting it through onChange again. The clear and batch icons use a compact 20px hit area, one size smaller than the regular TextField clear action. An asynchronous onApply returning false retains the draft without committing; rejection retains it and shows a retry message. The component fits directly inside PageFilter.Item, sharing caller-controlled state between inline and Drawer fields.

import { useRef, useState } from "react";
import { PageFilter, PageFilterItem, ProTextField } from "@biugle/react-components";
import "@biugle/react-components/styles.css";

export function BatchFilter() {
  const [value, setValue] = useState("");
  const inputRef = useRef<HTMLInputElement>(null);
  return (
    <PageFilter onReset={() => setValue("")} onSearch={() => console.info(value)}>
      <PageFilterItem label="批量编号" tooltip="换行与中英文逗号均可分隔。">
        <ProTextField
          ref={inputRef}
          value={value}
          onChange={(next) => setValue(next)}
          separatorIncludesComma
          onApply={async (_next, items) => items.length <= 100}
        />
      </PageFilterItem>
    </PageFilter>
  );
}

The preceding example is runnable with React and this package. The table lists the Pro extensions and inherited custom TextField properties individually. Other standard React.InputHTMLAttributes<HTMLInputElement> properties retain native forwarding semantics, including name, id and aria-*; onChange uses this component's string/list contract. Each example is a prop for that component; full interactive states are in Demo /ComponentCapabilities/ComponentUIShowcase.

| Component | Property | TypeScript type | Default | Values / parameters | Behavior | Example | | -------------- | ------------------------ | ------------------------------------------------------------------------------------------ | ---------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------ | | ProTextField | value | string | undefined | Any text | Controlled text, taking precedence over inputProps.value. Multiline values appear as a summary; click or Enter opens the source text. | value={value} | | ProTextField | defaultValue | string | "" | Any text | Initial uncontrolled text; inputProps.defaultValue is a compatibility fallback when omitted. | defaultValue="A\nB" | | ProTextField | onChange | (value: string, items: string[]) => void | undefined | value, items | Reports ordinary input and parsed items immediately. Blur splits enabled separators, removes empty items and formats changed text; batch Apply reports newline-joined normalized text and items. | onChange={(next, items) => setValue(next)} | | ProTextField | expandable | boolean | true | true | false | Enables the batch entry and multiline-paste draft. False hides the editor entry; blur still formats ordinary input using enabled separators. | expandable={false} | | ProTextField | separatorIncludesSpace | boolean | false | true | false | Treats all whitespace as separators when enabled; internal phrase spaces are preserved by default. | separatorIncludesSpace | | ProTextField | separatorIncludesComma | boolean | false | true | false | Enables Chinese and English comma splitting independently of whitespace splitting. | separatorIncludesComma | | ProTextField | onApply | (value: string, items: string[]) => void \| boolean \| Promise<void \| boolean> | undefined | value, items | Receives newline-joined normalized text and items before commit. False or rejection keeps the draft uncommitted. Pending work blocks duplicate submission and closing; rejection shows a retry hint. | onApply={async (_next, items) => items.length <= 100} | | ProTextField | onCancel | () => void | undefined | No arguments | Notifies when Cancel, an outside click or Escape discards the draft; does not call onChange. | onCancel={() => console.info("cancel")} | | ProTextField | onOpenChange | (open: boolean) => void | undefined | open | Reports editor opening and closing. | onOpenChange={(open) => console.info(open)} | | ProTextField | popoverWidth | number \| string | 420 | Pixels or CSS width | Editor width, bounded by its overlay styles to available viewport space. | popoverWidth={520} | | ProTextField | textareaProps | Omit<TextareaProps, "value" \| "defaultValue" \| "onChange" \| "disabled" \| "readOnly"> | undefined | Textarea properties | Sets draft rows, resize, maxLength, placeholder, onKeyDown and styles. Defaults to rows=7 and resize=vertical; maxLength inherits the main input. The component owns draft value and submission state. | textareaProps={{ rows: 10, resize: "none" }} | | ProTextField | expandText | React.ReactNode | 批量输入 / Batch input | ReactNode | Tooltip for the compact 20px batch-entry icon button, smaller than the ordinary input clear action. | expandText="批量输入编号" | | ProTextField | applyText | React.ReactNode | 应用 / Apply | ReactNode | Apply button label. | applyText="确认条件" | | ProTextField | cancelText | React.ReactNode | 取消 / Cancel | ReactNode | Cancel button label. | cancelText="放弃修改" | | ProTextField | clearText | React.ReactNode | 清除 / Clear | ReactNode | Label for draft clearing and multiline-value clearing. Clearing a draft commits only after Apply. | clearText="清空内容" | | ProTextField | classNames | ProTextFieldClassNames | undefined | ControlClassNames & { editor?: string; description?: string; actions?: string } | Independent root, input and editor-region class overrides. | classNames={{ editor: "batch-editor" }} | | ProTextField | size | "small" \| "medium" \| "large" | "small" | small | medium | large | Defaults to small to match PageFilter control height. | size="small" | | ProTextField | allowClear | boolean | true | true | false | Shows committed-value clearing; disabled, readOnly and loading block it. | allowClear={false} | | ProTextField | locale | BiuComponentsLocale | Provider / zh-CN | zh-CN | en-US | Overrides built-in hints, buttons and item-count language. | locale="en-US" | | ProTextField | localeText | BiuComponentsLocaleTextOverrides | undefined | Chinese source keys | Overrides built-in labels using Chinese source keys without changing parsing. | localeText={{ 应用: "确认" }} | | ProTextField | inputRule | "number" \| "letter" \| "alphanumeric" | undefined | number | letter | alphanumeric | Direct and batch edits share TextField character filtering per item and preserve enabled separators; use onApply for business validation. | inputRule="alphanumeric" | | ProTextField | inputPattern | string \| RegExp | undefined | Incremental regular expression | Direct and batch edits share incremental filtering per item and preserve enabled separators; it does not replace onApply business validation. | inputPattern={/^[A-Z0-9-]*$/} | | ProTextField | error | React.ReactNode | undefined | ReactNode | Input error state and message; batch rejection has a separate retry message. | error="请检查编号" | | ProTextField | loading | boolean | false | true | false | Shows loading and blocks typing, clearing and opening the editor. | loading | | ProTextField | onClear | () => void | undefined | No arguments | Runs when the committed value is cleared; draft clearing does not immediately call it. | onClear={() => console.info("cleared")} | | ProTextField | showCount | boolean | false | true | false | Inherits the main TextField character count; the editor separately displays parsed item count. | showCount | | ProTextField | addonBefore | React.ReactNode | undefined | ReactNode | Main-input leading content. | addonBefore="ID" | | ProTextField | addonAfter | React.ReactNode | undefined | ReactNode | Custom trailing content composed with the batch entry. | addonAfter="项" | | ProTextField | inputProps | React.InputHTMLAttributes<HTMLInputElement> | undefined | Native input attributes | Forwards main-input attributes. value/defaultValue are compatibility fallbacks for omitted top-level values; ProTextField owns batch state. | inputProps={{ autoComplete: "off" }} | | ProTextField | className | string | undefined | CSS class | Appended to the Pro root; PageFilter.Item adds w-full. | className="w-full" | | ProTextField | disabled | boolean | false | true | false | Blocks typing, clearing and editing; an open editor closes. | disabled | | ProTextField | readOnly | boolean | false | true | false | Displays text without allowing clearing or opening batch editing. | readOnly | | ProTextField | placeholder | string | undefined | Any text | Empty main-input hint; textareaProps.placeholder controls the draft hint. | placeholder="输入编号" | | ProTextField | maxLength | number | undefined | Nonnegative character limit | Native main-input length limit, inherited by the draft unless textareaProps.maxLength overrides it. | maxLength={2000} | | ProTextField | onPaste | (event: React.ClipboardEvent<HTMLInputElement>) => void | undefined | event | Runs before main-input paste processing; preventDefault blocks automatic multiline-paste draft handling. | onPaste={(event) => console.info(event.clipboardData.getData("text"))} | | ProTextField | onKeyDown | (event: React.KeyboardEvent<HTMLInputElement>) => void | undefined | event | Main-input keyboard callback; Enter opens a multiline summary. Ctrl/Command+Enter applies the editor draft. | onKeyDown={(event) => console.info(event.key)} | | ProTextField | onBlur | (event: React.FocusEvent<HTMLInputElement>) => void | undefined | event | Calls blur handlers first, then parses enabled separators and formats changed text; reports the formatted value and items through onChange. | onBlur={(event) => console.info(event.currentTarget.value)} | | ProTextField | onClick | (event: React.MouseEvent<HTMLInputElement>) => void | undefined | event | Main-input click callback; unless prevented, clicking a multiline summary opens the editor. | onClick={() => console.info("input")} | | ProTextField | onInput | (event: React.FormEvent<HTMLInputElement>) => void | undefined | event | Forwards TextField's native input observation event; synchronize values through onChange(value, items). | onInput={(event) => console.info(event.currentTarget.value)} | | ProTextField | ref | React.Ref<HTMLInputElement> | undefined | HTMLInputElement | Forwarded to the main input for focus and selection access. | ref={inputRef} |

ProTextFieldClassNames extends ControlClassNames with these independent editor slots:

| Component | Property | TypeScript type | Default | Values / parameters | Behavior | Example | | ---------------------- | ----------- | --------------- | --------- | ------------------- | ------------------------------------ | -------------------------------------------- | | ProTextFieldClassNames | editor | string | undefined | CSS class | Body-mounted editor surface class. | classNames={{ editor: "batch-editor" }} | | ProTextFieldClassNames | description | string | undefined | CSS class | Separator-description region class. | classNames={{ description: "batch-hint" }} | | ProTextFieldClassNames | actions | string | undefined | CSS class | Draft-count and action region class. | classNames={{ actions: "batch-actions" }} |

splitString API

The root and /pro entries export splitString(str, separatorIncludesSpace = false, separatorIncludesComma = false): string[]. Existing one- and two-argument calls remain valid; the third argument independently enables Chinese and English comma splitting. Line breaks and carriage returns always split items, every item is trimmed, and empty items are removed. Internal spaces, tabs and commas are preserved by default. Order and duplicates are retained; empty, whitespace-only and runtime non-string input returns an empty list.

| Module | Property / parameter | TypeScript type | Default | Values / parameters | Behavior | Example | | ----------- | ---------------------- | ----------------------------------------------------------------------------------------------- | ------------ | ----------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | splitString | splitString | (str: string, separatorIncludesSpace?: boolean, separatorIncludesComma?: boolean) => string[] | false, false | str and separator flags | Returns parsed items in original order, including duplicates. | splitString("A\nA") // ["A", "A"] | | splitString | str | string | Required | Input text | Parses text without mutating the input. | splitString(" Hello world\nGood luck! ") // ["Hello world", "Good luck!"] | | splitString | separatorIncludesSpace | boolean | false | true, false | Includes all whitespace in separators. | splitString("Hello world\nGood luck!", true) // ["Hello", "world", "Good", "luck!"] | | splitString | separatorIncludesComma | boolean | false | true, false | Includes Chinese and English commas independently of the whitespace flag. | splitString("A,B,C\nD", false, true) // ["A", "B", "C", "D"] |