@hjmds/react 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +12 -6
- package/dist/actions.js.map +1 -1
- package/dist/advanced-display.d.ts +21 -0
- package/dist/advanced-display.d.ts.map +1 -1
- package/dist/advanced-display.js +11 -0
- package/dist/advanced-display.js.map +1 -1
- package/dist/advanced-navigation.d.ts +2 -23
- package/dist/advanced-navigation.d.ts.map +1 -1
- package/dist/advanced-navigation.js +3 -24
- package/dist/advanced-navigation.js.map +1 -1
- package/dist/agreement.d.ts +20 -0
- package/dist/agreement.d.ts.map +1 -0
- package/dist/agreement.js +29 -0
- package/dist/agreement.js.map +1 -0
- package/dist/anchor.d.ts +24 -0
- package/dist/anchor.d.ts.map +1 -0
- package/dist/anchor.js +110 -0
- package/dist/anchor.js.map +1 -0
- package/dist/asset.d.ts +40 -0
- package/dist/asset.d.ts.map +1 -0
- package/dist/asset.js +26 -0
- package/dist/asset.js.map +1 -0
- package/dist/bottom-cta.d.ts +32 -0
- package/dist/bottom-cta.d.ts.map +1 -0
- package/dist/bottom-cta.js +30 -0
- package/dist/bottom-cta.js.map +1 -0
- package/dist/bottom-info.d.ts +16 -0
- package/dist/bottom-info.d.ts.map +1 -0
- package/dist/bottom-info.js +12 -0
- package/dist/bottom-info.js.map +1 -0
- package/dist/breadcrumb.d.ts +9 -0
- package/dist/breadcrumb.d.ts.map +1 -0
- package/dist/breadcrumb.js +12 -0
- package/dist/breadcrumb.js.map +1 -0
- package/dist/calendar.d.ts +30 -0
- package/dist/calendar.d.ts.map +1 -0
- package/dist/calendar.js +69 -0
- package/dist/calendar.js.map +1 -0
- package/dist/carousel.d.ts +20 -0
- package/dist/carousel.d.ts.map +1 -0
- package/dist/carousel.js +70 -0
- package/dist/carousel.js.map +1 -0
- package/dist/clipboard.d.ts +33 -0
- package/dist/clipboard.d.ts.map +1 -0
- package/dist/clipboard.js +40 -0
- package/dist/clipboard.js.map +1 -0
- package/dist/collapsible.d.ts +11 -0
- package/dist/collapsible.d.ts.map +1 -0
- package/dist/collapsible.js +18 -0
- package/dist/collapsible.js.map +1 -0
- package/dist/command-palette.d.ts +25 -0
- package/dist/command-palette.d.ts.map +1 -0
- package/dist/command-palette.js +82 -0
- package/dist/command-palette.js.map +1 -0
- package/dist/context-menu.d.ts +12 -0
- package/dist/context-menu.d.ts.map +1 -0
- package/dist/context-menu.js +111 -0
- package/dist/context-menu.js.map +1 -0
- package/dist/data-table.d.ts +30 -0
- package/dist/data-table.d.ts.map +1 -0
- package/dist/data-table.js +57 -0
- package/dist/data-table.js.map +1 -0
- package/dist/date-picker.d.ts +3 -1
- package/dist/date-picker.d.ts.map +1 -1
- package/dist/date-picker.js +16 -31
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range.d.ts +24 -0
- package/dist/date-range.d.ts.map +1 -0
- package/dist/date-range.js +29 -0
- package/dist/date-range.js.map +1 -0
- package/dist/display.d.ts +16 -0
- package/dist/display.d.ts.map +1 -1
- package/dist/display.js +13 -1
- package/dist/display.js.map +1 -1
- package/dist/evidence.d.ts +481 -1
- package/dist/evidence.d.ts.map +1 -1
- package/dist/evidence.js +47 -2
- package/dist/evidence.js.map +1 -1
- package/dist/feedback.d.ts +18 -2
- package/dist/feedback.d.ts.map +1 -1
- package/dist/feedback.js +10 -2
- package/dist/feedback.js.map +1 -1
- package/dist/floating-action-button.d.ts +32 -0
- package/dist/floating-action-button.d.ts.map +1 -0
- package/dist/floating-action-button.js +58 -0
- package/dist/floating-action-button.js.map +1 -0
- package/dist/forms.d.ts +3 -3
- package/dist/forms.d.ts.map +1 -1
- package/dist/forms.js +18 -7
- package/dist/forms.js.map +1 -1
- package/dist/heading.d.ts +12 -0
- package/dist/heading.d.ts.map +1 -0
- package/dist/heading.js +25 -0
- package/dist/heading.js.map +1 -0
- package/dist/index.d.ts +35 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +35 -2
- package/dist/index.js.map +1 -1
- package/dist/layout.d.ts +1 -1
- package/dist/mentions.d.ts +28 -0
- package/dist/mentions.d.ts.map +1 -0
- package/dist/mentions.js +84 -0
- package/dist/mentions.js.map +1 -0
- package/dist/menubar.d.ts +11 -0
- package/dist/menubar.d.ts.map +1 -0
- package/dist/menubar.js +137 -0
- package/dist/menubar.js.map +1 -0
- package/dist/modal.d.ts +67 -0
- package/dist/modal.d.ts.map +1 -0
- package/dist/modal.js +307 -0
- package/dist/modal.js.map +1 -0
- package/dist/overlay-stack.d.ts +28 -0
- package/dist/overlay-stack.d.ts.map +1 -0
- package/dist/overlay-stack.js +47 -0
- package/dist/overlay-stack.js.map +1 -0
- package/dist/overlays.d.ts +26 -43
- package/dist/overlays.d.ts.map +1 -1
- package/dist/overlays.js +62 -302
- package/dist/overlays.js.map +1 -1
- package/dist/pagination.d.ts +17 -0
- package/dist/pagination.d.ts.map +1 -0
- package/dist/pagination.js +21 -0
- package/dist/pagination.js.map +1 -0
- package/dist/popover.d.ts +25 -0
- package/dist/popover.d.ts.map +1 -0
- package/dist/popover.js +226 -0
- package/dist/popover.js.map +1 -0
- package/dist/portal.d.ts +5 -1
- package/dist/portal.d.ts.map +1 -1
- package/dist/portal.js +24 -1
- package/dist/portal.js.map +1 -1
- package/dist/provider-button.d.ts +21 -0
- package/dist/provider-button.d.ts.map +1 -0
- package/dist/provider-button.js +26 -0
- package/dist/provider-button.js.map +1 -0
- package/dist/provider.d.ts +13 -1
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +12 -2
- package/dist/provider.js.map +1 -1
- package/dist/selection.d.ts +5 -1
- package/dist/selection.d.ts.map +1 -1
- package/dist/selection.js +2 -2
- package/dist/selection.js.map +1 -1
- package/dist/side-panel.d.ts +34 -0
- package/dist/side-panel.d.ts.map +1 -0
- package/dist/side-panel.js +95 -0
- package/dist/side-panel.js.map +1 -0
- package/dist/sidebar.d.ts +22 -0
- package/dist/sidebar.d.ts.map +1 -0
- package/dist/sidebar.js +29 -0
- package/dist/sidebar.js.map +1 -0
- package/dist/skip-nav.d.ts +12 -0
- package/dist/skip-nav.d.ts.map +1 -0
- package/dist/skip-nav.js +29 -0
- package/dist/skip-nav.js.map +1 -0
- package/dist/splitter.d.ts +45 -0
- package/dist/splitter.d.ts.map +1 -0
- package/dist/splitter.js +116 -0
- package/dist/splitter.js.map +1 -0
- package/dist/styles.css +1068 -26
- package/dist/supplemental-display.d.ts +12 -0
- package/dist/supplemental-display.d.ts.map +1 -1
- package/dist/supplemental-display.js +6 -2
- package/dist/supplemental-display.js.map +1 -1
- package/dist/tags-input.d.ts +60 -0
- package/dist/tags-input.d.ts.map +1 -0
- package/dist/tags-input.js +90 -0
- package/dist/tags-input.js.map +1 -0
- package/dist/text-formats.d.ts +16 -0
- package/dist/text-formats.d.ts.map +1 -0
- package/dist/text-formats.js +24 -0
- package/dist/text-formats.js.map +1 -0
- package/dist/toast.d.ts +1 -1
- package/dist/toggle-group.d.ts +13 -0
- package/dist/toggle-group.d.ts.map +1 -0
- package/dist/toggle-group.js +21 -0
- package/dist/toggle-group.js.map +1 -0
- package/dist/top-bar.d.ts +27 -0
- package/dist/top-bar.d.ts.map +1 -0
- package/dist/top-bar.js +30 -0
- package/dist/top-bar.js.map +1 -0
- package/dist/top.d.ts +15 -0
- package/dist/top.d.ts.map +1 -0
- package/dist/top.js +18 -0
- package/dist/top.js.map +1 -0
- package/dist/tour.d.ts +21 -0
- package/dist/tour.d.ts.map +1 -0
- package/dist/tour.js +122 -0
- package/dist/tour.js.map +1 -0
- package/dist/transfer-list.d.ts +24 -0
- package/dist/transfer-list.d.ts.map +1 -0
- package/dist/transfer-list.js +109 -0
- package/dist/transfer-list.js.map +1 -0
- package/dist/tree.d.ts +29 -0
- package/dist/tree.d.ts.map +1 -0
- package/dist/tree.js +120 -0
- package/dist/tree.js.map +1 -0
- package/package.json +173 -3
package/dist/forms.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-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C,GACE,IACF,GACK,CACd,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import {\n fieldRecipe,\n type FieldAlign,\n type FieldShape,\n type FieldVariant,\n} from \"@hjmds/design-contracts/recipes/base\";\nimport {\n iconRecipe,\n searchFieldRecipe,\n type SearchFieldSize,\n} from \"@hjmds/design-contracts/recipes\";\nimport {\n passwordFieldRecipe,\n resolvePasswordFieldDescriptor,\n type PasswordFieldAutofillHint,\n type PasswordFieldSize,\n} from \"@hjmds/design-contracts/components/password-field\";\nimport {\n getOtpFieldSlotValues,\n otpFieldRecipe,\n resolveOtpFieldValue,\n type OtpFieldSize,\n} from \"@hjmds/design-contracts/components/otp-field\";\nimport {\n forwardRef,\n useEffect,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n type CSSProperties,\n type FocusEvent,\n type HTMLAttributes,\n type InputHTMLAttributes,\n type ReactNode,\n type TextareaHTMLAttributes,\n} from \"react\";\nimport { composeRefs, classNames, useControllableState } from \"./internal.js\";\n\ntype FieldCopyProps = Readonly<{\n label?: ReactNode;\n description?: ReactNode;\n error?: ReactNode;\n required?: boolean;\n}>;\n\ntype FieldFrameProps = HTMLAttributes<HTMLDivElement> &\n FieldCopyProps &\n Readonly<{\n controlId: string;\n descriptionId?: string;\n errorId?: string;\n disabled?: boolean;\n focused?: boolean;\n variant?: FieldVariant;\n shape?: FieldShape;\n align?: FieldAlign;\n children: ReactNode;\n }>;\n\nfunction FieldFrame({\n controlId,\n label,\n description,\n error,\n descriptionId,\n errorId,\n required = false,\n disabled = false,\n focused = false,\n variant = fieldRecipe.defaults.variant,\n shape = fieldRecipe.defaults.shape,\n align = fieldRecipe.defaults.align,\n className,\n children,\n ...props\n}: FieldFrameProps) {\n const state = disabled ? \"disabled\" : error ? \"invalid\" : focused ? \"focused\" : \"idle\";\n return (\n <div\n {...props}\n className={classNames(\"hjm-field\", className)}\n data-state={state}\n data-variant={variant}\n data-shape={shape}\n data-align={align}\n >\n {label !== undefined && label !== null ? (\n <label className=\"hjm-field__label\" htmlFor={controlId}>\n {label}\n {required ? <span aria-hidden=\"true\"> *</span> : null}\n </label>\n ) : null}\n {children}\n {description && !error ? (\n <div id={descriptionId} className=\"hjm-field__description\">\n {description}\n </div>\n ) : null}\n {error ? (\n <div id={errorId} className=\"hjm-field__error\">\n {error}\n </div>\n ) : null}\n </div>\n );\n}\n\nexport type FieldControlProps = Readonly<{\n id: string;\n required: boolean;\n disabled: boolean;\n \"aria-invalid\"?: true;\n \"aria-describedby\"?: string;\n}>;\n\nexport type FieldProps = Omit<\n FieldFrameProps,\n \"children\" | \"descriptionId\" | \"errorId\"\n> &\n Readonly<{\n label: ReactNode;\n children: ReactNode | ((props: FieldControlProps) => ReactNode);\n }>;\n\n/** Generic frame for custom native controls; `controlId` keeps the label explicit. */\nexport function Field({\n controlId,\n description,\n error,\n required = false,\n disabled = false,\n children,\n ...props\n}: FieldProps) {\n const descriptionId = `${controlId}-description`;\n const errorId = `${controlId}-error`;\n const controlProps: FieldControlProps = {\n id: controlId,\n required,\n disabled,\n ...(error ? { \"aria-invalid\": true as const } : {}),\n ...(error\n ? { \"aria-describedby\": errorId }\n : description\n ? { \"aria-describedby\": descriptionId }\n : {}),\n };\n return (\n <FieldFrame\n {...props}\n controlId={controlId}\n description={description}\n error={error}\n required={required}\n disabled={disabled}\n {...(description ? { descriptionId } : {})}\n {...(error ? { errorId } : {})}\n >\n {typeof children === \"function\" ? children(controlProps) : children}\n </FieldFrame>\n );\n}\n\nfunction useFieldIds(id: string | undefined) {\n const generatedId = useId();\n const controlId = id ?? `hjm-${generatedId.replaceAll(\":\", \"\")}`;\n return {\n controlId,\n descriptionId: `${controlId}-description`,\n errorId: `${controlId}-error`,\n } as const;\n}\n\nfunction describedBy(\n own: string | undefined,\n description: ReactNode | undefined,\n error: ReactNode | undefined,\n descriptionId: string,\n errorId: string,\n): string | undefined {\n return [own, error ? errorId : description ? descriptionId : undefined]\n .filter(Boolean)\n .join(\" \") || undefined;\n}\n\nfunction requireFieldAccessibleName(label: ReactNode | undefined, ariaLabel: string | undefined) {\n if ((label === undefined || label === null) && !ariaLabel?.trim()) {\n throw new TypeError(\"Field controls require either label or aria-label\");\n }\n}\n\ntype SharedInputProps = FieldCopyProps &\n Readonly<{\n variant?: FieldVariant;\n shape?: FieldShape;\n /**\n * Text placement inside the control. `start` follows the resolved\n * direction; `center` suits a short, ceremonial single value such as a\n * nickname or a code. Replaces a `text-align` override.\n */\n align?: FieldAlign;\n leading?: ReactNode;\n trailing?: ReactNode;\n fieldClassName?: string;\n }>;\n\nexport type TextFieldProps = Omit<InputHTMLAttributes<HTMLInputElement>, \"size\"> &\n SharedInputProps;\n\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n function TextField(\n {\n id,\n label,\n description,\n error,\n required,\n disabled,\n variant,\n shape,\n align,\n leading,\n trailing,\n fieldClassName,\n className,\n onFocus,\n onBlur,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-invalid\": ariaInvalid,\n \"aria-label\": ariaLabel,\n ...props\n },\n ref,\n ) {\n const ids = useFieldIds(id);\n const [focused, setFocused] = useState(false);\n requireFieldAccessibleName(label, ariaLabel);\n const handleFocus = (event: FocusEvent<HTMLInputElement>) => {\n setFocused(true);\n onFocus?.(event);\n };\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n setFocused(false);\n onBlur?.(event);\n };\n return (\n <FieldFrame\n controlId={ids.controlId}\n label={label}\n description={description}\n error={error}\n required={required ?? false}\n disabled={disabled ?? false}\n focused={focused}\n variant={variant ?? fieldRecipe.defaults.variant}\n shape={shape ?? fieldRecipe.defaults.shape}\n align={align ?? fieldRecipe.defaults.align}\n className={fieldClassName}\n {...(description ? { descriptionId: ids.descriptionId } : {})}\n {...(error ? { errorId: ids.errorId } : {})}\n >\n <div className=\"hjm-field__control\">\n {leading ? <span className=\"hjm-field__affix\">{leading}</span> : null}\n <input\n {...props}\n ref={ref}\n id={ids.controlId}\n className={classNames(\"hjm-field__input\", className)}\n required={required}\n disabled={disabled}\n aria-invalid={error ? true : ariaInvalid}\n aria-label={ariaLabel}\n aria-describedby={describedBy(\n ariaDescribedBy,\n description,\n error,\n ids.descriptionId,\n ids.errorId,\n )}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n {trailing ? <span className=\"hjm-field__affix\">{trailing}</span> : null}\n </div>\n </FieldFrame>\n );\n },\n);\n\nexport type TextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement> &\n Omit<SharedInputProps, \"leading\" | \"trailing\"> &\n Readonly<{\n /**\n * Lower bound for a growing multiline field, in visible lines. Height is\n * recipe-owned, so this semantic axis replaces a `min-height` override.\n */\n minVisibleLines?: number;\n /** Upper bound for a growing multiline field, in visible lines. */\n maxVisibleLines?: number;\n }>;\n\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n function TextArea(\n {\n id,\n label,\n description,\n error,\n required,\n disabled,\n variant,\n shape,\n align,\n fieldClassName,\n className,\n onFocus,\n onBlur,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-invalid\": ariaInvalid,\n \"aria-label\": ariaLabel,\n minVisibleLines,\n maxVisibleLines,\n style,\n ...props\n },\n ref,\n ) {\n const ids = useFieldIds(id);\n const [focused, setFocused] = useState(false);\n requireFieldAccessibleName(label, ariaLabel);\n // Bounds are expressed in lines so the recipe keeps line height and padding.\n const lineBounds = {\n ...(minVisibleLines === undefined\n ? {}\n : { \"--hjm-field-min-visible-lines\": minVisibleLines }),\n ...(maxVisibleLines === undefined\n ? {}\n : { \"--hjm-field-max-visible-lines\": maxVisibleLines }),\n } as CSSProperties;\n return (\n <FieldFrame\n controlId={ids.controlId}\n label={label}\n description={description}\n error={error}\n required={required ?? false}\n disabled={disabled ?? false}\n focused={focused}\n variant={variant ?? fieldRecipe.defaults.variant}\n shape={shape ?? fieldRecipe.defaults.shape}\n align={align ?? fieldRecipe.defaults.align}\n className={fieldClassName}\n {...(description ? { descriptionId: ids.descriptionId } : {})}\n {...(error ? { errorId: ids.errorId } : {})}\n >\n <div className=\"hjm-field__control hjm-field__control--multiline\">\n <textarea\n {...props}\n ref={ref}\n id={ids.controlId}\n className={classNames(\"hjm-field__input\", className)}\n style={{ ...style, ...lineBounds }}\n required={required}\n disabled={disabled}\n aria-invalid={error ? true : ariaInvalid}\n aria-label={ariaLabel}\n aria-describedby={describedBy(\n ariaDescribedBy,\n description,\n error,\n ids.descriptionId,\n ids.errorId,\n )}\n onFocus={(event) => {\n setFocused(true);\n onFocus?.(event);\n }}\n onBlur={(event) => {\n setFocused(false);\n onBlur?.(event);\n }}\n />\n </div>\n </FieldFrame>\n );\n },\n);\n\nexport type SearchFieldProps = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n \"type\" | \"size\" | \"value\" | \"defaultValue\"\n> &\n SharedInputProps &\n Readonly<{\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n size?: SearchFieldSize;\n /** Localized accessible name for the clear action. */\n clearLabel: string;\n onClear?: () => void;\n /** Keeps the input mounted and named while replacing trailing actions with progress. */\n loading?: boolean;\n /** Product icon adapter; the renderer owns size and inherited color. */\n renderSearchIcon?: (props: SearchFieldIconRenderProps) => ReactNode;\n /** Product icon adapter for the clear action. */\n renderClearIcon?: (props: SearchFieldIconRenderProps) => ReactNode;\n /** Optional progress adapter. The default is the canonical CSS spinner. */\n renderLoadingIndicator?: (props: SearchFieldIconRenderProps) => ReactNode;\n }>;\n\nexport type SearchFieldIconRenderProps = Readonly<{\n color: \"currentColor\";\n size: number;\n}>;\n\nexport const SearchField = forwardRef<HTMLInputElement, SearchFieldProps>(\n function SearchField(\n {\n value: valueProp,\n defaultValue = \"\",\n onValueChange,\n onChange,\n size = searchFieldRecipe.defaults.size,\n clearLabel,\n onClear,\n loading = false,\n renderSearchIcon,\n renderClearIcon,\n renderLoadingIndicator,\n leading,\n trailing,\n fieldClassName,\n disabled,\n \"aria-busy\": ariaBusy,\n ...props\n },\n forwardedRef,\n ) {\n const [value, setValue] = useControllableState({\n ...(valueProp === undefined ? {} : { value: valueProp }),\n defaultValue,\n ...(onValueChange === undefined ? {} : { onChange: onValueChange }),\n });\n const inputRef = useRef<HTMLInputElement>(null);\n const iconAppearance: SearchFieldIconRenderProps = {\n color: \"currentColor\",\n size: iconRecipe.sizes[searchFieldRecipe.sizes[size].glyph],\n };\n const canClear = value.length > 0 && !disabled;\n return (\n <TextField\n {...props}\n ref={composeRefs(inputRef, forwardedRef)}\n type=\"search\"\n value={value}\n data-size={size}\n data-loading={loading || undefined}\n disabled={disabled}\n aria-busy={loading || ariaBusy || undefined}\n fieldClassName={classNames(\"hjm-search-field\", fieldClassName)!}\n leading={\n leading ?? (renderSearchIcon ? renderSearchIcon(iconAppearance) : undefined)\n }\n onChange={(event) => {\n setValue(event.currentTarget.value);\n onChange?.(event);\n }}\n trailing={\n loading ? (\n <span className=\"hjm-search-field__spinner\" aria-hidden=\"true\">\n {renderLoadingIndicator?.(iconAppearance)}\n </span>\n ) : canClear ? (\n <button\n type=\"button\"\n className=\"hjm-search-field__clear\"\n aria-label={clearLabel}\n onMouseDown={(event) => event.preventDefault()}\n onClick={() => {\n setValue(\"\");\n onClear?.();\n inputRef.current?.focus();\n }}\n >\n {renderClearIcon?.(iconAppearance) ?? \"×\"}\n </button>\n ) : trailing\n }\n />\n );\n },\n);\n\nexport type PasswordFieldToggleRenderProps = Readonly<{\n name: \"visibility\" | \"visibilityOff\";\n color: \"currentColor\";\n size: number;\n revealed: boolean;\n disabled: boolean;\n}>;\n\nexport type PasswordFieldProps = Omit<\n TextFieldProps,\n \"autoComplete\" | \"defaultValue\" | \"size\" | \"trailing\" | \"type\" | \"value\"\n> &\n Readonly<{\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n revealed?: boolean;\n defaultRevealed?: boolean;\n onRevealedChange?: (revealed: boolean) => void;\n autofillHint: PasswordFieldAutofillHint;\n revealLabel: string;\n concealLabel: string;\n size?: PasswordFieldSize;\n renderToggleIcon?: (props: PasswordFieldToggleRenderProps) => ReactNode;\n }>;\n\n/** Password input with an independently controlled, selection-safe reveal action. */\nexport const PasswordField = forwardRef<HTMLInputElement, PasswordFieldProps>(\n function PasswordField(\n {\n value: valueProp,\n defaultValue = \"\",\n onValueChange,\n onChange,\n revealed: revealedProp,\n defaultRevealed = false,\n onRevealedChange,\n autofillHint,\n revealLabel,\n concealLabel,\n size = passwordFieldRecipe.defaults.size,\n renderToggleIcon,\n fieldClassName,\n className,\n disabled,\n readOnly,\n ...props\n },\n forwardedRef,\n ) {\n const [value, setValue] = useControllableState({\n ...(valueProp === undefined ? {} : { value: valueProp }),\n defaultValue,\n ...(onValueChange === undefined ? {} : { onChange: onValueChange }),\n });\n const [revealed, setRevealed] = useControllableState({\n ...(revealedProp === undefined ? {} : { value: revealedProp }),\n defaultValue: defaultRevealed,\n ...(onRevealedChange === undefined ? {} : { onChange: onRevealedChange }),\n });\n const resolved = resolvePasswordFieldDescriptor(\n { revealed, autofillHint },\n {\n composeToggleAccessibleName: ({ willReveal }) =>\n willReveal ? revealLabel : concealLabel,\n },\n );\n const inputRef = useRef<HTMLInputElement>(null);\n const selectionRef = useRef<Readonly<{ start: number; end: number }> | null>(null);\n\n useLayoutEffect(() => {\n const selection = selectionRef.current;\n if (!selection || !inputRef.current) return;\n inputRef.current.setSelectionRange(selection.start, selection.end);\n selectionRef.current = null;\n }, [revealed]);\n\n const toggleAppearance: PasswordFieldToggleRenderProps = {\n name: revealed\n ? passwordFieldRecipe.toggle.icons.revealed\n : passwordFieldRecipe.toggle.icons.concealed,\n color: \"currentColor\",\n size: iconRecipe.sizes.sm,\n revealed,\n disabled: disabled ?? false,\n };\n\n return (\n <TextField\n {...props}\n ref={composeRefs(inputRef, forwardedRef)}\n autoComplete={autofillHint === \"current\" ? \"current-password\" : \"new-password\"}\n className={classNames(\"hjm-password-field__input\", className)}\n disabled={disabled}\n fieldClassName={classNames(\n \"hjm-password-field\",\n `hjm-password-field--${size}`,\n fieldClassName,\n )!}\n onChange={(event) => {\n setValue(event.currentTarget.value);\n onChange?.(event);\n }}\n readOnly={readOnly}\n trailing={(\n <button\n aria-label={resolved.toggleAccessibleName}\n aria-pressed={revealed}\n className=\"hjm-password-field__toggle\"\n data-revealed={revealed || undefined}\n disabled={disabled}\n onClick={() => {\n const input = inputRef.current;\n if (input && input.selectionStart !== null && input.selectionEnd !== null) {\n selectionRef.current = {\n start: input.selectionStart,\n end: input.selectionEnd,\n };\n }\n setRevealed(!revealed);\n }}\n type=\"button\"\n >\n {renderToggleIcon?.(toggleAppearance) ?? <span aria-hidden=\"true\" />}\n </button>\n )}\n type={resolved.webInputType}\n value={value}\n />\n );\n },\n);\n\nexport type OtpFieldProps = Omit<\n TextFieldProps,\n | \"autoComplete\"\n | \"defaultValue\"\n | \"leading\"\n | \"maxLength\"\n | \"shape\"\n | \"size\"\n | \"trailing\"\n | \"type\"\n | \"value\"\n | \"variant\"\n> &\n Readonly<{\n length: number;\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n onComplete?: (value: string) => void;\n size?: OtpFieldSize;\n busy?: boolean;\n }>;\n\n/** One accessible numeric input rendered as decorative OTP slots. */\nexport const OtpField = forwardRef<HTMLInputElement, OtpFieldProps>(\n function OtpField(\n {\n id,\n label,\n description,\n error,\n required,\n disabled,\n readOnly,\n busy = false,\n length,\n value: valueProp,\n defaultValue = \"\",\n onValueChange,\n onComplete,\n onChange,\n size = otpFieldRecipe.defaults.size,\n fieldClassName,\n className,\n onFocus,\n onBlur,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-invalid\": ariaInvalid,\n \"aria-label\": ariaLabel,\n ...props\n },\n ref,\n ) {\n const ids = useFieldIds(id);\n const [focused, setFocused] = useState(false);\n requireFieldAccessibleName(label, ariaLabel);\n const [value, setValue] = useControllableState({\n ...(valueProp === undefined ? {} : { value: valueProp }),\n defaultValue: resolveOtpFieldValue(length, defaultValue),\n ...(onValueChange === undefined ? {} : { onChange: onValueChange }),\n });\n const slots = getOtpFieldSlotValues({ length, value });\n const complete = value.length === length;\n const wasCompleteRef = useRef(complete);\n useEffect(() => {\n if (complete && !wasCompleteRef.current) onComplete?.(value);\n wasCompleteRef.current = complete;\n }, [complete, onComplete, value]);\n const activeIndex = Math.min(value.length, length - 1);\n\n return (\n <FieldFrame\n className={classNames(\"hjm-otp-field\", fieldClassName)}\n controlId={ids.controlId}\n description={description}\n disabled={(disabled ?? false) || busy}\n error={error}\n focused={focused}\n label={label}\n required={required ?? false}\n {...(description ? { descriptionId: ids.descriptionId } : {})}\n {...(error ? { errorId: ids.errorId } : {})}\n >\n <div\n className=\"hjm-otp-field__control\"\n data-complete={complete || undefined}\n data-size={size}\n style={{ \"--hjm-otp-length\": length } as CSSProperties}\n >\n <input\n {...props}\n ref={ref}\n aria-busy={busy || undefined}\n aria-describedby={describedBy(\n ariaDescribedBy,\n description,\n error,\n ids.descriptionId,\n ids.errorId,\n )}\n aria-invalid={error ? true : ariaInvalid}\n aria-label={ariaLabel}\n autoComplete=\"one-time-code\"\n className={classNames(\"hjm-otp-field__input\", className)}\n disabled={disabled || busy}\n id={ids.controlId}\n inputMode=\"numeric\"\n maxLength={length}\n onBlur={(event) => {\n setFocused(false);\n onBlur?.(event);\n }}\n onChange={(event) => {\n setValue(resolveOtpFieldValue(length, event.currentTarget.value));\n onChange?.(event);\n }}\n onFocus={(event) => {\n setFocused(true);\n onFocus?.(event);\n }}\n pattern=\"[0-9]*\"\n readOnly={readOnly}\n required={required}\n type=\"text\"\n value={value}\n />\n <div aria-hidden=\"true\" className=\"hjm-otp-field__slots\">\n {slots.map((digit, index) => (\n <span\n className=\"hjm-otp-field__slot\"\n data-state={error\n ? \"invalid\"\n : focused && index === activeIndex\n ? \"focused\"\n : digit\n ? \"filled\"\n : \"idle\"}\n key={index}\n >\n {digit}\n </span>\n ))}\n </div>\n </div>\n </FieldFrame>\n );\n },\n);\n"]}
|
|
1
|
+
{"version":3,"file":"forms.js","sourceRoot":"","sources":["../src/forms.tsx"],"names":[],"mappings":";AAAA,OA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oCACL,CAAC,CAAC,QAAQ;oCACV,CAAC,CAAC,MAAM,YAGb,KAAK,IAFD,KAAK,CAGL,CACR,CAAC,GACE,IACF,GACK,CACd,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import {\n fieldRecipe,\n type FieldAlign,\n type FieldShape,\n type FieldVariant,\n} from \"@hjmds/design-contracts/recipes/base\";\nimport {\n iconRecipe,\n searchFieldRecipe,\n type SearchFieldSize,\n} from \"@hjmds/design-contracts/recipes\";\nimport {\n passwordFieldRecipe,\n resolvePasswordFieldDescriptor,\n type PasswordFieldAutofillHint,\n type PasswordFieldSize,\n} from \"@hjmds/design-contracts/components/password-field\";\nimport {\n getOtpFieldSlotValues,\n otpFieldRecipe,\n resolveOtpFieldValue,\n type OtpFieldSize,\n} from \"@hjmds/design-contracts/components/otp-field\";\nimport {\n forwardRef,\n useEffect,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n type CSSProperties,\n type FocusEvent,\n type HTMLAttributes,\n type InputHTMLAttributes,\n type ReactNode,\n type TextareaHTMLAttributes,\n} from \"react\";\nimport { composeRefs, classNames, useControllableState } from \"./internal.js\";\n\ntype FieldCopyProps = Readonly<{\n label?: ReactNode;\n description?: ReactNode;\n error?: ReactNode;\n required?: boolean;\n}>;\n\ntype FieldFrameProps = HTMLAttributes<HTMLDivElement> &\n FieldCopyProps &\n Readonly<{\n controlId: string;\n descriptionId?: string;\n errorId?: string;\n disabled?: boolean;\n focused?: boolean;\n variant?: FieldVariant;\n shape?: FieldShape;\n align?: FieldAlign;\n children: ReactNode;\n }>;\n\nfunction FieldFrame({\n controlId,\n label,\n description,\n error,\n descriptionId,\n errorId,\n required = false,\n disabled = false,\n focused = false,\n variant = fieldRecipe.defaults.variant,\n shape = fieldRecipe.defaults.shape,\n align = fieldRecipe.defaults.align,\n className,\n children,\n ...props\n}: FieldFrameProps) {\n const state = disabled ? \"disabled\" : error ? \"invalid\" : focused ? \"focused\" : \"idle\";\n return (\n <div\n {...props}\n className={classNames(\"hjm-field\", className)}\n data-state={state}\n data-variant={variant}\n data-shape={shape}\n data-align={align}\n >\n {label !== undefined && label !== null ? (\n <label className=\"hjm-field__label\" htmlFor={controlId}>\n {label}\n {required ? <span aria-hidden=\"true\"> *</span> : null}\n </label>\n ) : null}\n {children}\n {/*\n Support text stays visible under an error instead of being replaced by\n it: the guidance (a length or format hint) is what tells the user how to clear the\n error, and hiding it is why a product copied that sentence into its own\n error string. Both are also referenced by aria-describedby.\n */}\n {description ? (\n <div id={descriptionId} className=\"hjm-field__description\">\n {description}\n </div>\n ) : null}\n {error ? (\n <div id={errorId} className=\"hjm-field__error\">\n {error}\n </div>\n ) : null}\n </div>\n );\n}\n\nexport type FieldControlProps = Readonly<{\n id: string;\n required: boolean;\n disabled: boolean;\n \"aria-invalid\"?: true;\n \"aria-describedby\"?: string;\n}>;\n\nexport type FieldProps = Omit<\n FieldFrameProps,\n \"children\" | \"descriptionId\" | \"errorId\"\n> &\n Readonly<{\n label: ReactNode;\n children: ReactNode | ((props: FieldControlProps) => ReactNode);\n }>;\n\n/** Generic frame for custom native controls; `controlId` keeps the label explicit. */\nexport function Field({\n controlId,\n description,\n error,\n required = false,\n disabled = false,\n children,\n ...props\n}: FieldProps) {\n const descriptionId = `${controlId}-description`;\n const errorId = `${controlId}-error`;\n const controlProps: FieldControlProps = {\n id: controlId,\n required,\n disabled,\n ...(error ? { \"aria-invalid\": true as const } : {}),\n // Same merge as the built-in fields: support text stays referenced once an\n // error appears, so a custom control does not have to re-derive the ids.\n ...(description || error\n ? {\n \"aria-describedby\": [description ? descriptionId : undefined, error ? errorId : undefined]\n .filter(Boolean)\n .join(\" \"),\n }\n : {}),\n };\n return (\n <FieldFrame\n {...props}\n controlId={controlId}\n description={description}\n error={error}\n required={required}\n disabled={disabled}\n {...(description ? { descriptionId } : {})}\n {...(error ? { errorId } : {})}\n >\n {typeof children === \"function\" ? children(controlProps) : children}\n </FieldFrame>\n );\n}\n\nfunction useFieldIds(id: string | undefined) {\n const generatedId = useId();\n const controlId = id ?? `hjm-${generatedId.replaceAll(\":\", \"\")}`;\n return {\n controlId,\n descriptionId: `${controlId}-description`,\n errorId: `${controlId}-error`,\n } as const;\n}\n\n/*\n Support text and the error are both referenced when both exist, in DOM reading\n order, and the consumer's own `aria-describedby` is kept in front of them.\n Announcing only the error (the earlier behaviour) dropped the guidance that\n explains how to fix it — exactly the text a product then duplicated into the\n error string by hand.\n*/\nfunction describedBy(\n own: string | undefined,\n description: ReactNode | undefined,\n error: ReactNode | undefined,\n descriptionId: string,\n errorId: string,\n): string | undefined {\n return [own, description ? descriptionId : undefined, error ? errorId : undefined]\n .filter(Boolean)\n .join(\" \") || undefined;\n}\n\nfunction requireFieldAccessibleName(label: ReactNode | undefined, ariaLabel: string | undefined) {\n if ((label === undefined || label === null) && !ariaLabel?.trim()) {\n throw new TypeError(\"Field controls require either label or aria-label\");\n }\n}\n\ntype SharedInputProps = FieldCopyProps &\n Readonly<{\n variant?: FieldVariant;\n shape?: FieldShape;\n /**\n * Text placement inside the control. `start` follows the resolved\n * direction; `center` suits a short, ceremonial single value such as a\n * nickname or a code. Replaces a `text-align` override.\n */\n align?: FieldAlign;\n leading?: ReactNode;\n trailing?: ReactNode;\n fieldClassName?: string;\n }>;\n\nexport type TextFieldProps = Omit<InputHTMLAttributes<HTMLInputElement>, \"size\"> &\n SharedInputProps;\n\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n function TextField(\n {\n id,\n label,\n description,\n error,\n required,\n disabled,\n variant,\n shape,\n align,\n leading,\n trailing,\n fieldClassName,\n className,\n onFocus,\n onBlur,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-invalid\": ariaInvalid,\n \"aria-label\": ariaLabel,\n ...props\n },\n ref,\n ) {\n const ids = useFieldIds(id);\n const [focused, setFocused] = useState(false);\n requireFieldAccessibleName(label, ariaLabel);\n const handleFocus = (event: FocusEvent<HTMLInputElement>) => {\n setFocused(true);\n onFocus?.(event);\n };\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n setFocused(false);\n onBlur?.(event);\n };\n return (\n <FieldFrame\n controlId={ids.controlId}\n label={label}\n description={description}\n error={error}\n required={required ?? false}\n disabled={disabled ?? false}\n focused={focused}\n variant={variant ?? fieldRecipe.defaults.variant}\n shape={shape ?? fieldRecipe.defaults.shape}\n align={align ?? fieldRecipe.defaults.align}\n className={fieldClassName}\n {...(description ? { descriptionId: ids.descriptionId } : {})}\n {...(error ? { errorId: ids.errorId } : {})}\n >\n <div className=\"hjm-field__control\">\n {leading ? <span className=\"hjm-field__affix\">{leading}</span> : null}\n <input\n {...props}\n ref={ref}\n id={ids.controlId}\n className={classNames(\"hjm-field__input\", className)}\n required={required}\n disabled={disabled}\n aria-invalid={error ? true : ariaInvalid}\n aria-label={ariaLabel}\n aria-describedby={describedBy(\n ariaDescribedBy,\n description,\n error,\n ids.descriptionId,\n ids.errorId,\n )}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n {trailing ? <span className=\"hjm-field__affix\">{trailing}</span> : null}\n </div>\n </FieldFrame>\n );\n },\n);\n\nexport type TextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement> &\n Omit<SharedInputProps, \"leading\" | \"trailing\"> &\n Readonly<{\n /**\n * Lower bound for a growing multiline field, in visible lines. Height is\n * recipe-owned, so this semantic axis replaces a `min-height` override.\n */\n minVisibleLines?: number;\n /** Upper bound for a growing multiline field, in visible lines. */\n maxVisibleLines?: number;\n }>;\n\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n function TextArea(\n {\n id,\n label,\n description,\n error,\n required,\n disabled,\n variant,\n shape,\n align,\n fieldClassName,\n className,\n onFocus,\n onBlur,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-invalid\": ariaInvalid,\n \"aria-label\": ariaLabel,\n minVisibleLines,\n maxVisibleLines,\n style,\n ...props\n },\n ref,\n ) {\n const ids = useFieldIds(id);\n const [focused, setFocused] = useState(false);\n requireFieldAccessibleName(label, ariaLabel);\n // Bounds are expressed in lines so the recipe keeps line height and padding.\n const lineBounds = {\n ...(minVisibleLines === undefined\n ? {}\n : { \"--hjm-field-min-visible-lines\": minVisibleLines }),\n ...(maxVisibleLines === undefined\n ? {}\n : { \"--hjm-field-max-visible-lines\": maxVisibleLines }),\n } as CSSProperties;\n return (\n <FieldFrame\n controlId={ids.controlId}\n label={label}\n description={description}\n error={error}\n required={required ?? false}\n disabled={disabled ?? false}\n focused={focused}\n variant={variant ?? fieldRecipe.defaults.variant}\n shape={shape ?? fieldRecipe.defaults.shape}\n align={align ?? fieldRecipe.defaults.align}\n className={fieldClassName}\n {...(description ? { descriptionId: ids.descriptionId } : {})}\n {...(error ? { errorId: ids.errorId } : {})}\n >\n <div className=\"hjm-field__control hjm-field__control--multiline\">\n <textarea\n {...props}\n ref={ref}\n id={ids.controlId}\n className={classNames(\"hjm-field__input\", className)}\n style={{ ...style, ...lineBounds }}\n required={required}\n disabled={disabled}\n aria-invalid={error ? true : ariaInvalid}\n aria-label={ariaLabel}\n aria-describedby={describedBy(\n ariaDescribedBy,\n description,\n error,\n ids.descriptionId,\n ids.errorId,\n )}\n onFocus={(event) => {\n setFocused(true);\n onFocus?.(event);\n }}\n onBlur={(event) => {\n setFocused(false);\n onBlur?.(event);\n }}\n />\n </div>\n </FieldFrame>\n );\n },\n);\n\nexport type SearchFieldProps = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n \"type\" | \"size\" | \"value\" | \"defaultValue\"\n> &\n SharedInputProps &\n Readonly<{\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n size?: SearchFieldSize;\n /** Localized accessible name for the clear action. */\n clearLabel: string;\n onClear?: () => void;\n /** Keeps the input mounted and named while replacing trailing actions with progress. */\n loading?: boolean;\n /** Product icon adapter; the renderer owns size and inherited color. */\n renderSearchIcon?: (props: SearchFieldIconRenderProps) => ReactNode;\n /** Product icon adapter for the clear action. */\n renderClearIcon?: (props: SearchFieldIconRenderProps) => ReactNode;\n /** Optional progress adapter. The default is the canonical CSS spinner. */\n renderLoadingIndicator?: (props: SearchFieldIconRenderProps) => ReactNode;\n }>;\n\nexport type SearchFieldIconRenderProps = Readonly<{\n color: \"currentColor\";\n size: number;\n}>;\n\nexport const SearchField = forwardRef<HTMLInputElement, SearchFieldProps>(\n function SearchField(\n {\n value: valueProp,\n defaultValue = \"\",\n onValueChange,\n onChange,\n size = searchFieldRecipe.defaults.size,\n clearLabel,\n onClear,\n loading = false,\n renderSearchIcon,\n renderClearIcon,\n renderLoadingIndicator,\n leading,\n trailing,\n fieldClassName,\n disabled,\n \"aria-busy\": ariaBusy,\n ...props\n },\n forwardedRef,\n ) {\n const [value, setValue] = useControllableState({\n ...(valueProp === undefined ? {} : { value: valueProp }),\n defaultValue,\n ...(onValueChange === undefined ? {} : { onChange: onValueChange }),\n });\n const inputRef = useRef<HTMLInputElement>(null);\n const iconAppearance: SearchFieldIconRenderProps = {\n color: \"currentColor\",\n size: iconRecipe.sizes[searchFieldRecipe.sizes[size].glyph],\n };\n const canClear = value.length > 0 && !disabled;\n return (\n <TextField\n {...props}\n ref={composeRefs(inputRef, forwardedRef)}\n type=\"search\"\n value={value}\n data-size={size}\n data-loading={loading || undefined}\n disabled={disabled}\n aria-busy={loading || ariaBusy || undefined}\n fieldClassName={classNames(\"hjm-search-field\", fieldClassName)!}\n leading={\n leading ?? (renderSearchIcon ? renderSearchIcon(iconAppearance) : undefined)\n }\n onChange={(event) => {\n setValue(event.currentTarget.value);\n onChange?.(event);\n }}\n trailing={\n loading ? (\n <span className=\"hjm-search-field__spinner\" aria-hidden=\"true\">\n {renderLoadingIndicator?.(iconAppearance)}\n </span>\n ) : canClear ? (\n <button\n type=\"button\"\n className=\"hjm-search-field__clear\"\n aria-label={clearLabel}\n onMouseDown={(event) => event.preventDefault()}\n onClick={() => {\n setValue(\"\");\n onClear?.();\n inputRef.current?.focus();\n }}\n >\n {renderClearIcon?.(iconAppearance) ?? \"×\"}\n </button>\n ) : trailing\n }\n />\n );\n },\n);\n\nexport type PasswordFieldToggleRenderProps = Readonly<{\n name: \"visibility\" | \"visibilityOff\";\n color: \"currentColor\";\n size: number;\n revealed: boolean;\n disabled: boolean;\n}>;\n\nexport type PasswordFieldProps = Omit<\n TextFieldProps,\n \"autoComplete\" | \"defaultValue\" | \"size\" | \"trailing\" | \"type\" | \"value\"\n> &\n Readonly<{\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n revealed?: boolean;\n defaultRevealed?: boolean;\n onRevealedChange?: (revealed: boolean) => void;\n autofillHint: PasswordFieldAutofillHint;\n revealLabel: string;\n concealLabel: string;\n size?: PasswordFieldSize;\n renderToggleIcon?: (props: PasswordFieldToggleRenderProps) => ReactNode;\n }>;\n\n/** Password input with an independently controlled, selection-safe reveal action. */\nexport const PasswordField = forwardRef<HTMLInputElement, PasswordFieldProps>(\n function PasswordField(\n {\n value: valueProp,\n defaultValue = \"\",\n onValueChange,\n onChange,\n revealed: revealedProp,\n defaultRevealed = false,\n onRevealedChange,\n autofillHint,\n revealLabel,\n concealLabel,\n size = passwordFieldRecipe.defaults.size,\n renderToggleIcon,\n fieldClassName,\n className,\n disabled,\n readOnly,\n ...props\n },\n forwardedRef,\n ) {\n const [value, setValue] = useControllableState({\n ...(valueProp === undefined ? {} : { value: valueProp }),\n defaultValue,\n ...(onValueChange === undefined ? {} : { onChange: onValueChange }),\n });\n const [revealed, setRevealed] = useControllableState({\n ...(revealedProp === undefined ? {} : { value: revealedProp }),\n defaultValue: defaultRevealed,\n ...(onRevealedChange === undefined ? {} : { onChange: onRevealedChange }),\n });\n const resolved = resolvePasswordFieldDescriptor(\n { revealed, autofillHint },\n {\n composeToggleAccessibleName: ({ willReveal }) =>\n willReveal ? revealLabel : concealLabel,\n },\n );\n const inputRef = useRef<HTMLInputElement>(null);\n const selectionRef = useRef<Readonly<{ start: number; end: number }> | null>(null);\n\n useLayoutEffect(() => {\n const selection = selectionRef.current;\n if (!selection || !inputRef.current) return;\n inputRef.current.setSelectionRange(selection.start, selection.end);\n selectionRef.current = null;\n }, [revealed]);\n\n const toggleAppearance: PasswordFieldToggleRenderProps = {\n name: revealed\n ? passwordFieldRecipe.toggle.icons.revealed\n : passwordFieldRecipe.toggle.icons.concealed,\n color: \"currentColor\",\n size: iconRecipe.sizes.sm,\n revealed,\n disabled: disabled ?? false,\n };\n\n return (\n <TextField\n {...props}\n ref={composeRefs(inputRef, forwardedRef)}\n autoComplete={autofillHint === \"current\" ? \"current-password\" : \"new-password\"}\n className={classNames(\"hjm-password-field__input\", className)}\n disabled={disabled}\n fieldClassName={classNames(\n \"hjm-password-field\",\n `hjm-password-field--${size}`,\n fieldClassName,\n )!}\n onChange={(event) => {\n setValue(event.currentTarget.value);\n onChange?.(event);\n }}\n readOnly={readOnly}\n trailing={(\n <button\n aria-label={resolved.toggleAccessibleName}\n aria-pressed={revealed}\n className=\"hjm-password-field__toggle\"\n data-revealed={revealed || undefined}\n disabled={disabled}\n onClick={() => {\n const input = inputRef.current;\n if (input && input.selectionStart !== null && input.selectionEnd !== null) {\n selectionRef.current = {\n start: input.selectionStart,\n end: input.selectionEnd,\n };\n }\n setRevealed(!revealed);\n }}\n type=\"button\"\n >\n {renderToggleIcon?.(toggleAppearance) ?? <span aria-hidden=\"true\" />}\n </button>\n )}\n type={resolved.webInputType}\n value={value}\n />\n );\n },\n);\n\nexport type OtpFieldProps = Omit<\n TextFieldProps,\n | \"autoComplete\"\n | \"defaultValue\"\n | \"leading\"\n | \"maxLength\"\n | \"shape\"\n | \"size\"\n | \"trailing\"\n | \"type\"\n | \"value\"\n | \"variant\"\n> &\n Readonly<{\n length: number;\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n onComplete?: (value: string) => void;\n size?: OtpFieldSize;\n busy?: boolean;\n }>;\n\n/** One accessible numeric input rendered as decorative OTP slots. */\nexport const OtpField = forwardRef<HTMLInputElement, OtpFieldProps>(\n function OtpField(\n {\n id,\n label,\n description,\n error,\n required,\n disabled,\n readOnly,\n busy = false,\n length,\n value: valueProp,\n defaultValue = \"\",\n onValueChange,\n onComplete,\n onChange,\n size = otpFieldRecipe.defaults.size,\n fieldClassName,\n className,\n onFocus,\n onBlur,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-invalid\": ariaInvalid,\n \"aria-label\": ariaLabel,\n ...props\n },\n ref,\n ) {\n const ids = useFieldIds(id);\n const [focused, setFocused] = useState(false);\n requireFieldAccessibleName(label, ariaLabel);\n const [value, setValue] = useControllableState({\n ...(valueProp === undefined ? {} : { value: valueProp }),\n defaultValue: resolveOtpFieldValue(length, defaultValue),\n ...(onValueChange === undefined ? {} : { onChange: onValueChange }),\n });\n const slots = getOtpFieldSlotValues({ length, value });\n const complete = value.length === length;\n const wasCompleteRef = useRef(complete);\n useEffect(() => {\n if (complete && !wasCompleteRef.current) onComplete?.(value);\n wasCompleteRef.current = complete;\n }, [complete, onComplete, value]);\n const activeIndex = Math.min(value.length, length - 1);\n\n return (\n <FieldFrame\n className={classNames(\"hjm-otp-field\", fieldClassName)}\n controlId={ids.controlId}\n description={description}\n disabled={(disabled ?? false) || busy}\n error={error}\n focused={focused}\n label={label}\n required={required ?? false}\n {...(description ? { descriptionId: ids.descriptionId } : {})}\n {...(error ? { errorId: ids.errorId } : {})}\n >\n <div\n className=\"hjm-otp-field__control\"\n data-complete={complete || undefined}\n data-size={size}\n style={{ \"--hjm-otp-length\": length } as CSSProperties}\n >\n <input\n {...props}\n ref={ref}\n aria-busy={busy || undefined}\n aria-describedby={describedBy(\n ariaDescribedBy,\n description,\n error,\n ids.descriptionId,\n ids.errorId,\n )}\n aria-invalid={error ? true : ariaInvalid}\n aria-label={ariaLabel}\n autoComplete=\"one-time-code\"\n className={classNames(\"hjm-otp-field__input\", className)}\n disabled={disabled || busy}\n id={ids.controlId}\n inputMode=\"numeric\"\n maxLength={length}\n onBlur={(event) => {\n setFocused(false);\n onBlur?.(event);\n }}\n onChange={(event) => {\n setValue(resolveOtpFieldValue(length, event.currentTarget.value));\n onChange?.(event);\n }}\n onFocus={(event) => {\n setFocused(true);\n onFocus?.(event);\n }}\n pattern=\"[0-9]*\"\n readOnly={readOnly}\n required={required}\n type=\"text\"\n value={value}\n />\n <div aria-hidden=\"true\" className=\"hjm-otp-field__slots\">\n {slots.map((digit, index) => (\n <span\n className=\"hjm-otp-field__slot\"\n data-state={error\n ? \"invalid\"\n : focused && index === activeIndex\n ? \"focused\"\n : digit\n ? \"filled\"\n : \"idle\"}\n key={index}\n >\n {digit}\n </span>\n ))}\n </div>\n </div>\n </FieldFrame>\n );\n },\n);\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type HeadingDescriptor } from "@hjmds/design-contracts/components/heading";
|
|
2
|
+
import { type HTMLAttributes, type ReactNode } from "react";
|
|
3
|
+
export type HeadingProps = Omit<HTMLAttributes<HTMLHeadingElement>, "children"> & HeadingDescriptor & Readonly<{
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const Heading: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLHeadingElement>, "children"> & Readonly<{
|
|
7
|
+
level: import("@hjmds/design-contracts/foundations").HeadingLevel;
|
|
8
|
+
semanticLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
9
|
+
}> & Readonly<{
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
12
|
+
//# sourceMappingURL=heading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../src/heading.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE,UAAU,CAAC,GAC7E,iBAAiB,GACjB,QAAQ,CAAC;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CAAC,CAAC;AAEpC,eAAO,MAAM,OAAO;;;;cAFG,SAAS;uDA6B9B,CAAC"}
|
package/dist/heading.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { headingRecipe, resolveHeadingSemanticLevel, validateHeadingDescriptor, } from "@hjmds/design-contracts/components/heading";
|
|
2
|
+
import { createElement, forwardRef, } from "react";
|
|
3
|
+
import { classNames } from "./internal.js";
|
|
4
|
+
export const Heading = forwardRef(function Heading({ level, semanticLevel, children, className, ...props }, forwardedRef) {
|
|
5
|
+
const descriptor = {
|
|
6
|
+
level,
|
|
7
|
+
...(semanticLevel === undefined ? {} : { semanticLevel }),
|
|
8
|
+
};
|
|
9
|
+
validateHeadingDescriptor(descriptor);
|
|
10
|
+
const metrics = headingRecipe.levels[level];
|
|
11
|
+
// Visual size and document level are separate axes: the element comes from
|
|
12
|
+
// the semantic level, the type comes from the visual one.
|
|
13
|
+
return createElement(`h${resolveHeadingSemanticLevel(descriptor)}`, {
|
|
14
|
+
...props,
|
|
15
|
+
ref: forwardedRef,
|
|
16
|
+
className: classNames("hjm-heading", className),
|
|
17
|
+
"data-level": level,
|
|
18
|
+
style: {
|
|
19
|
+
"--hjm-heading-size": `${metrics.fontSize}px`,
|
|
20
|
+
"--hjm-heading-line-height": `${metrics.lineHeight}px`,
|
|
21
|
+
"--hjm-heading-weight": metrics.fontWeight,
|
|
22
|
+
},
|
|
23
|
+
}, children);
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=heading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heading.js","sourceRoot":"","sources":["../src/heading.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,2BAA2B,EAC3B,yBAAyB,GAE1B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACL,aAAa,EACb,UAAU,GAIX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAmC,SAAS,OAAO,CAClF,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EACvD,YAAY;IAEZ,MAAM,UAAU,GAAsB;QACpC,KAAK;QACL,GAAG,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC;KAC1D,CAAC;IACF,yBAAyB,CAAC,UAAU,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC5C,2EAA2E;IAC3E,0DAA0D;IAC1D,OAAO,aAAa,CAClB,IAAI,2BAA2B,CAAC,UAAU,CAAC,EAAE,EAC7C;QACE,GAAG,KAAK;QACR,GAAG,EAAE,YAAY;QACjB,SAAS,EAAE,UAAU,CAAC,aAAa,EAAE,SAAS,CAAC;QAC/C,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE;YACL,oBAAoB,EAAE,GAAG,OAAO,CAAC,QAAQ,IAAI;YAC7C,2BAA2B,EAAE,GAAG,OAAO,CAAC,UAAU,IAAI;YACtD,sBAAsB,EAAE,OAAO,CAAC,UAAU;SAC1B;KACnB,EACD,QAAQ,CACT,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import {\n headingRecipe,\n resolveHeadingSemanticLevel,\n validateHeadingDescriptor,\n type HeadingDescriptor,\n} from \"@hjmds/design-contracts/components/heading\";\nimport {\n createElement,\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { classNames } from \"./internal.js\";\n\nexport type HeadingProps = Omit<HTMLAttributes<HTMLHeadingElement>, \"children\"> &\n HeadingDescriptor &\n Readonly<{ children: ReactNode }>;\n\nexport const Heading = forwardRef<HTMLHeadingElement, HeadingProps>(function Heading(\n { level, semanticLevel, children, className, ...props },\n forwardedRef,\n) {\n const descriptor: HeadingDescriptor = {\n level,\n ...(semanticLevel === undefined ? {} : { semanticLevel }),\n };\n validateHeadingDescriptor(descriptor);\n const metrics = headingRecipe.levels[level];\n // Visual size and document level are separate axes: the element comes from\n // the semantic level, the type comes from the visual one.\n return createElement(\n `h${resolveHeadingSemanticLevel(descriptor)}`,\n {\n ...props,\n ref: forwardedRef,\n className: classNames(\"hjm-heading\", className),\n \"data-level\": level,\n style: {\n \"--hjm-heading-size\": `${metrics.fontSize}px`,\n \"--hjm-heading-line-height\": `${metrics.lineHeight}px`,\n \"--hjm-heading-weight\": metrics.fontWeight,\n } as CSSProperties,\n },\n children,\n );\n});\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { HjmProvider, useHjmTheme, type HjmProviderHost, type HjmProviderProps, } from "./provider.js";
|
|
2
|
+
export { TopBar, type TopBarProps } from "./top-bar.js";
|
|
3
|
+
export { BottomCTA, type BottomCTAAction, type BottomCTAProps } from "./bottom-cta.js";
|
|
2
4
|
export { hjmCompositionStyleKeys, type HjmCompositionStyle, type HjmCompositionStyleKey, type HjmCompositionStyleProp, } from "./composition-style.js";
|
|
3
5
|
export { AspectRatio, Container, Grid, Layout, Section, Stack, Surface, Text, VisuallyHidden, type AspectRatioProps, type AspectRatioValue, type ContainerGutter, type ContainerProps, type ContainerSize, type GridGap, type GridProps, type LayoutProps, type LayoutSidebar, type SectionProps, type StackAlign, type StackAxis, type StackGap, type StackJustify, type StackProps, type SurfacePadding, type SurfaceProps, type SurfaceRadius, type SurfaceTone, type TextEmphasis, type TextProps, type TextTone, type VisuallyHiddenProps, } from "./layout.js";
|
|
4
6
|
export { Button, IconButton, Link, type ButtonAlign, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonTone, type IconButtonProps, type IconButtonShape, type IconButtonSize, type IconButtonTone, type LinkRenderProps, type LinkProps, } from "./actions.js";
|
|
@@ -11,15 +13,46 @@ export { DatePicker, type DatePickerMonthAction, type DatePickerProps, } from ".
|
|
|
11
13
|
export { FilePicker, type FilePickerProps, } from "./file-picker.js";
|
|
12
14
|
export { Checkbox, CheckboxGroup, Chip, Radio, RadioGroup, SegmentedControl, Switch, type CheckboxProps, type CheckboxGroupItem, type CheckboxGroupProps, type ChipProps, type ChoiceLeadingRenderProps, type RadioProps, type RadioGroupItem, type RadioGroupProps, type SegmentedControlItem, type SegmentedControlProps, type SwitchProps, type SwitchSize, } from "./selection.js";
|
|
13
15
|
export { TabPanel, Tabs, getDynamicTabPanelId, getTabId, getTabPanelId, type TabLeadingRenderProps, type TabItem, type TabPanelProps, type TabsProps, } from "./navigation.js";
|
|
14
|
-
export { Breadcrumb,
|
|
16
|
+
export { Breadcrumb, type BreadcrumbProps } from "./breadcrumb.js";
|
|
17
|
+
export { Pagination, type PaginationProps } from "./pagination.js";
|
|
15
18
|
export { LoadMore, type LoadMoreProps, } from "./supplemental-navigation.js";
|
|
16
19
|
export { Steps, type StepsProps, } from "./steps.js";
|
|
17
20
|
export { BottomNavigation, getBottomNavigationGridColumn, isUnmodifiedPrimaryBottomNavigationClick, shouldHideBottomNavigationForKeyboard, type BottomNavigationIconRenderProps, type BottomNavigationLinkRenderProps, type BottomNavigationProps, } from "./bottom-navigation.js";
|
|
18
21
|
export { Badge, Card, ListRow, Tag, type BadgeProps, type BadgeVariant, type CardHeadingLevel, type CardProps, type ListRowProps, type TagProps, type TagTone, } from "./display.js";
|
|
19
22
|
export { CounterBadge, Icon, Image, type CounterBadgeProps, type IconProps, type ImageAdapterProps, type ImageProps, } from "./supplemental-display.js";
|
|
20
|
-
export { Accordion, Avatar, DescriptionList, Divider, List, Statistic, StatisticGroup, Table, Timeline, type AccordionItem, type AccordionProps, type AvatarProps, type DescriptionListProps, type DividerInset, type DividerOrientation, type DividerProps, type ListAppearance, type ListProps, type StatisticProps, type StatisticGroupProps, type StatisticTrendMarkRenderProps, type ComposeStatisticAccessibilityLabel, type TableColumn, type TableProps, type TableSortDirection, type TimelineProps, } from "./advanced-display.js";
|
|
23
|
+
export { Accordion, Avatar, AvatarGroup, type AvatarGroupProps, DescriptionList, Divider, List, Statistic, StatisticGroup, Table, Timeline, type AccordionItem, type AccordionProps, type AvatarProps, type DescriptionListProps, type DividerInset, type DividerOrientation, type DividerProps, type ListAppearance, type ListProps, type StatisticProps, type StatisticGroupProps, type StatisticTrendMarkRenderProps, type ComposeStatisticAccessibilityLabel, type TableColumn, type TableProps, type TableSortDirection, type TimelineProps, } from "./advanced-display.js";
|
|
21
24
|
export { UploadItem, type UploadItemProps, } from "./upload-item.js";
|
|
22
25
|
export { EmptyState, Notice, Progress, Result, Skeleton, Spinner, type EmptyStateProps, type NoticeProps, type ProgressProps, type ResultProps, type SkeletonProps, type SpinnerProps, } from "./feedback.js";
|
|
23
26
|
export { Toast, ToastProvider, useToast, type ToastApi, type ToastProps, type ToastProviderProps, } from "./toast.js";
|
|
24
27
|
export { AlertDialog, Dialog, Menu, Sheet, Tooltip, type AlertDialogProps, type DialogOpenChangeReason, type DialogProps, type MenuItem, type MenuAsyncState, type MenuOpenChangeReason, type MenuProps, type MenuSection, type OverlayTrigger, type SheetPlacement, type SheetProps, type TooltipProps, } from "./overlays.js";
|
|
28
|
+
export { Carousel, type CarouselProps, type CarouselLabels } from "./carousel.js";
|
|
29
|
+
export { FloatingActionButton, useFloatingActionButtonScroll, resolveFloatingActionButtonContentClearance, type FloatingActionButtonProps } from "./floating-action-button.js";
|
|
30
|
+
export { Calendar, type CalendarProps, type CalendarMonthAction, type CalendarHandle, type CalendarOverflow } from "./calendar.js";
|
|
31
|
+
export { Anchor, type AnchorProps } from "./anchor.js";
|
|
32
|
+
export { Popover, type PopoverProps, type PopoverContentActions } from "./popover.js";
|
|
33
|
+
export { SidePanel, type SidePanelProps } from "./side-panel.js";
|
|
34
|
+
export { Splitter, type SplitterProps } from "./splitter.js";
|
|
35
|
+
export { Tour, type TourProps } from "./tour.js";
|
|
36
|
+
export { Tree, type TreeProps } from "./tree.js";
|
|
37
|
+
export { TransferList, type TransferListProps, type TransferListLabels } from "./transfer-list.js";
|
|
38
|
+
export { Mentions, type MentionsProps, type MentionCandidate } from "./mentions.js";
|
|
39
|
+
export { CommandPalette, type CommandPaletteProps } from "./command-palette.js";
|
|
40
|
+
export { Agreement, type AgreementProps } from "./agreement.js";
|
|
41
|
+
export { Top, type TopProps } from "./top.js";
|
|
42
|
+
export { Heading, type HeadingProps } from "./heading.js";
|
|
43
|
+
export { TextFormat, type TextFormatProps } from "./text-formats.js";
|
|
44
|
+
export { ClipboardButton, type ClipboardButtonProps } from "./clipboard.js";
|
|
45
|
+
export { ToggleGroup, type ToggleGroupProps } from "./toggle-group.js";
|
|
46
|
+
export { TagsInput, type TagsInputProps } from "./tags-input.js";
|
|
47
|
+
export { SkipNav, type SkipNavProps } from "./skip-nav.js";
|
|
48
|
+
export { BottomInfo, type BottomInfoProps } from "./bottom-info.js";
|
|
49
|
+
export { Sidebar, type SidebarProps } from "./sidebar.js";
|
|
50
|
+
export { DateRangePicker, type DateRangePickerProps } from "./date-range.js";
|
|
51
|
+
export { OverlayStackProvider, useOverlayStack, useDialog, useSheet, type OverlayStackApi, type OverlayStackProviderProps, type OverlayHandle, } from "./overlay-stack.js";
|
|
52
|
+
export { AuthProviderButton, type AuthProviderButtonProps } from "./provider-button.js";
|
|
53
|
+
export { DataTable, type DataTableProps, type DataTableLabels } from "./data-table.js";
|
|
54
|
+
export { Collapsible, type CollapsibleProps } from "./collapsible.js";
|
|
55
|
+
export { ContextMenu, type ContextMenuProps } from "./context-menu.js";
|
|
56
|
+
export { Menubar, type MenubarProps } from "./menubar.js";
|
|
57
|
+
export { Asset, AssetGroup, type AssetProps, type AssetGroupProps } from "./asset.js";
|
|
25
58
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../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AE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,SAAS,EACT,QAAQ,EACR,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,aAAa,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { HjmProvider, useHjmTheme, } from "./provider.js";
|
|
2
|
+
export { TopBar } from "./top-bar.js";
|
|
3
|
+
export { BottomCTA } from "./bottom-cta.js";
|
|
2
4
|
export { hjmCompositionStyleKeys, } from "./composition-style.js";
|
|
3
5
|
export { AspectRatio, Container, Grid, Layout, Section, Stack, Surface, Text, VisuallyHidden, } from "./layout.js";
|
|
4
6
|
export { Button, IconButton, Link, } from "./actions.js";
|
|
@@ -11,15 +13,46 @@ export { DatePicker, } from "./date-picker.js";
|
|
|
11
13
|
export { FilePicker, } from "./file-picker.js";
|
|
12
14
|
export { Checkbox, CheckboxGroup, Chip, Radio, RadioGroup, SegmentedControl, Switch, } from "./selection.js";
|
|
13
15
|
export { TabPanel, Tabs, getDynamicTabPanelId, getTabId, getTabPanelId, } from "./navigation.js";
|
|
14
|
-
export { Breadcrumb
|
|
16
|
+
export { Breadcrumb } from "./breadcrumb.js";
|
|
17
|
+
export { Pagination } from "./pagination.js";
|
|
15
18
|
export { LoadMore, } from "./supplemental-navigation.js";
|
|
16
19
|
export { Steps, } from "./steps.js";
|
|
17
20
|
export { BottomNavigation, getBottomNavigationGridColumn, isUnmodifiedPrimaryBottomNavigationClick, shouldHideBottomNavigationForKeyboard, } from "./bottom-navigation.js";
|
|
18
21
|
export { Badge, Card, ListRow, Tag, } from "./display.js";
|
|
19
22
|
export { CounterBadge, Icon, Image, } from "./supplemental-display.js";
|
|
20
|
-
export { Accordion, Avatar, DescriptionList, Divider, List, Statistic, StatisticGroup, Table, Timeline, } from "./advanced-display.js";
|
|
23
|
+
export { Accordion, Avatar, AvatarGroup, DescriptionList, Divider, List, Statistic, StatisticGroup, Table, Timeline, } from "./advanced-display.js";
|
|
21
24
|
export { UploadItem, } from "./upload-item.js";
|
|
22
25
|
export { EmptyState, Notice, Progress, Result, Skeleton, Spinner, } from "./feedback.js";
|
|
23
26
|
export { Toast, ToastProvider, useToast, } from "./toast.js";
|
|
24
27
|
export { AlertDialog, Dialog, Menu, Sheet, Tooltip, } from "./overlays.js";
|
|
28
|
+
export { Carousel } from "./carousel.js";
|
|
29
|
+
export { FloatingActionButton, useFloatingActionButtonScroll, resolveFloatingActionButtonContentClearance } from "./floating-action-button.js";
|
|
30
|
+
export { Calendar } from "./calendar.js";
|
|
31
|
+
export { Anchor } from "./anchor.js";
|
|
32
|
+
export { Popover } from "./popover.js";
|
|
33
|
+
export { SidePanel } from "./side-panel.js";
|
|
34
|
+
export { Splitter } from "./splitter.js";
|
|
35
|
+
export { Tour } from "./tour.js";
|
|
36
|
+
export { Tree } from "./tree.js";
|
|
37
|
+
export { TransferList } from "./transfer-list.js";
|
|
38
|
+
export { Mentions } from "./mentions.js";
|
|
39
|
+
export { CommandPalette } from "./command-palette.js";
|
|
40
|
+
export { Agreement } from "./agreement.js";
|
|
41
|
+
export { Top } from "./top.js";
|
|
42
|
+
export { Heading } from "./heading.js";
|
|
43
|
+
export { TextFormat } from "./text-formats.js";
|
|
44
|
+
export { ClipboardButton } from "./clipboard.js";
|
|
45
|
+
export { ToggleGroup } from "./toggle-group.js";
|
|
46
|
+
export { TagsInput } from "./tags-input.js";
|
|
47
|
+
export { SkipNav } from "./skip-nav.js";
|
|
48
|
+
export { BottomInfo } from "./bottom-info.js";
|
|
49
|
+
export { Sidebar } from "./sidebar.js";
|
|
50
|
+
export { DateRangePicker } from "./date-range.js";
|
|
51
|
+
export { OverlayStackProvider, useOverlayStack, useDialog, useSheet, } from "./overlay-stack.js";
|
|
52
|
+
export { AuthProviderButton } from "./provider-button.js";
|
|
53
|
+
export { DataTable } from "./data-table.js";
|
|
54
|
+
export { Collapsible } from "./collapsible.js";
|
|
55
|
+
export { ContextMenu } from "./context-menu.js";
|
|
56
|
+
export { Menubar } from "./menubar.js";
|
|
57
|
+
export { Asset, AssetGroup } from "./asset.js";
|
|
25
58
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,WAAW,GAGZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,GAIxB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,WAAW,EACX,SAAS,EACT,IAAI,EACJ,MAAM,EACN,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,EACJ,c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,SAAS,EACT,cAAc,EACd,KAAK,EACL,QAAQ,GAkBT,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,UAAU,GAEX,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,UAAU,EACV,MAAM,EACN,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,OAAO,GAOR,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,EACL,aAAa,EACb,QAAQ,GAIT,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,WAAW,EACX,MAAM,EACN,IAAI,EACJ,KAAK,EACL,OAAO,GAaR,MAAM,eAAe,CAAC","sourcesContent":["export {\n HjmProvider,\n useHjmTheme,\n type HjmProviderHost,\n type HjmProviderProps,\n} from \"./provider.js\";\n\nexport {\n hjmCompositionStyleKeys,\n type HjmCompositionStyle,\n type HjmCompositionStyleKey,\n type HjmCompositionStyleProp,\n} from \"./composition-style.js\";\n\nexport {\n AspectRatio,\n Container,\n Grid,\n Layout,\n Section,\n Stack,\n Surface,\n Text,\n VisuallyHidden,\n type AspectRatioProps,\n type AspectRatioValue,\n type ContainerGutter,\n type ContainerProps,\n type ContainerSize,\n type GridGap,\n type GridProps,\n type LayoutProps,\n type LayoutSidebar,\n type SectionProps,\n type StackAlign,\n type StackAxis,\n type StackGap,\n type StackJustify,\n type StackProps,\n type SurfacePadding,\n type SurfaceProps,\n type SurfaceRadius,\n type SurfaceTone,\n type TextEmphasis,\n type TextProps,\n type TextTone,\n type VisuallyHiddenProps,\n} from \"./layout.js\";\n\nexport {\n Button,\n IconButton,\n Link,\n type ButtonAlign,\n type ButtonProps,\n type ButtonShape,\n type ButtonSize,\n type ButtonTone,\n type IconButtonProps,\n type IconButtonShape,\n type IconButtonSize,\n type IconButtonTone,\n type LinkRenderProps,\n type LinkProps,\n} from \"./actions.js\";\n\nexport {\n Field,\n OtpField,\n PasswordField,\n SearchField,\n TextArea,\n TextField,\n type FieldControlProps,\n type FieldProps,\n type OtpFieldProps,\n type PasswordFieldProps,\n type PasswordFieldToggleRenderProps,\n type SearchFieldProps,\n type SearchFieldIconRenderProps,\n type TextAreaProps,\n type TextFieldProps,\n} from \"./forms.js\";\n\nexport {\n Combobox,\n Form,\n type ComboboxItem,\n type ComboboxOpenChangeReason,\n type ComboboxProps,\n type FormProps,\n type FormSubmitHandler,\n NativeSelect,\n type NativeSelectProps,\n type SelectOption,\n} from \"./advanced-forms.js\";\n\nexport {\n Select,\n type SelectItem,\n type SelectLeadingRenderProps,\n type SelectOptionLeadingRenderProps,\n type SelectProps,\n type SelectSection,\n} from \"./select.js\";\n\nexport {\n NumberField,\n type NumberFieldProps,\n} from \"./number-field.js\";\n\nexport {\n Slider,\n type SliderProps,\n} from \"./slider.js\";\n\nexport {\n DatePicker,\n type DatePickerMonthAction,\n type DatePickerProps,\n} from \"./date-picker.js\";\n\nexport {\n FilePicker,\n type FilePickerProps,\n} from \"./file-picker.js\";\n\nexport {\n Checkbox,\n CheckboxGroup,\n Chip,\n Radio,\n RadioGroup,\n SegmentedControl,\n Switch,\n type CheckboxProps,\n type CheckboxGroupItem,\n type CheckboxGroupProps,\n type ChipProps,\n type ChoiceLeadingRenderProps,\n type RadioProps,\n type RadioGroupItem,\n type RadioGroupProps,\n type SegmentedControlItem,\n type SegmentedControlProps,\n type SwitchProps,\n type SwitchSize,\n} from \"./selection.js\";\n\nexport {\n TabPanel,\n Tabs,\n getDynamicTabPanelId,\n getTabId,\n getTabPanelId,\n type TabLeadingRenderProps,\n type TabItem,\n type TabPanelProps,\n type TabsProps,\n} from \"./navigation.js\";\n\nexport {\n Breadcrumb,\n Pagination,\n type BreadcrumbProps,\n type PaginationProps,\n} from \"./advanced-navigation.js\";\n\nexport {\n LoadMore,\n type LoadMoreProps,\n} from \"./supplemental-navigation.js\";\n\nexport {\n Steps,\n type StepsProps,\n} from \"./steps.js\";\n\nexport {\n BottomNavigation,\n getBottomNavigationGridColumn,\n isUnmodifiedPrimaryBottomNavigationClick,\n shouldHideBottomNavigationForKeyboard,\n type BottomNavigationIconRenderProps,\n type BottomNavigationLinkRenderProps,\n type BottomNavigationProps,\n} from \"./bottom-navigation.js\";\n\nexport {\n Badge,\n Card,\n ListRow,\n Tag,\n type BadgeProps,\n type BadgeVariant,\n type CardHeadingLevel,\n type CardProps,\n type ListRowProps,\n type TagProps,\n type TagTone,\n} from \"./display.js\";\n\nexport {\n CounterBadge,\n Icon,\n Image,\n type CounterBadgeProps,\n type IconProps,\n type ImageAdapterProps,\n type ImageProps,\n} from \"./supplemental-display.js\";\n\nexport {\n Accordion,\n Avatar,\n DescriptionList,\n Divider,\n List,\n Statistic,\n StatisticGroup,\n Table,\n Timeline,\n type AccordionItem,\n type AccordionProps,\n type AvatarProps,\n type DescriptionListProps,\n type DividerInset,\n type DividerOrientation,\n type DividerProps,\n type ListAppearance,\n type ListProps,\n type StatisticProps,\n type StatisticGroupProps,\n type StatisticTrendMarkRenderProps,\n type ComposeStatisticAccessibilityLabel,\n type TableColumn,\n type TableProps,\n type TableSortDirection,\n type TimelineProps,\n} from \"./advanced-display.js\";\n\nexport {\n UploadItem,\n type UploadItemProps,\n} from \"./upload-item.js\";\n\nexport {\n EmptyState,\n Notice,\n Progress,\n Result,\n Skeleton,\n Spinner,\n type EmptyStateProps,\n type NoticeProps,\n type ProgressProps,\n type ResultProps,\n type SkeletonProps,\n type SpinnerProps,\n} from \"./feedback.js\";\n\nexport {\n Toast,\n ToastProvider,\n useToast,\n type ToastApi,\n type ToastProps,\n type ToastProviderProps,\n} from \"./toast.js\";\n\nexport {\n AlertDialog,\n Dialog,\n Menu,\n Sheet,\n Tooltip,\n type AlertDialogProps,\n type DialogOpenChangeReason,\n type DialogProps,\n type MenuItem,\n type MenuAsyncState,\n type MenuOpenChangeReason,\n type MenuProps,\n type MenuSection,\n type OverlayTrigger,\n type SheetPlacement,\n type SheetProps,\n type TooltipProps,\n} from \"./overlays.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names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n} from \"./provider.js\";\n\nexport { TopBar, type TopBarProps } from \"./top-bar.js\";\nexport { BottomCTA, type BottomCTAAction, type BottomCTAProps } from \"./bottom-cta.js\";\n\nexport {\n hjmCompositionStyleKeys,\n type HjmCompositionStyle,\n type HjmCompositionStyleKey,\n type HjmCompositionStyleProp,\n} from \"./composition-style.js\";\n\nexport {\n AspectRatio,\n Container,\n Grid,\n Layout,\n Section,\n Stack,\n Surface,\n Text,\n VisuallyHidden,\n type AspectRatioProps,\n type AspectRatioValue,\n type ContainerGutter,\n type ContainerProps,\n type ContainerSize,\n type GridGap,\n type GridProps,\n type LayoutProps,\n type LayoutSidebar,\n type SectionProps,\n type StackAlign,\n type StackAxis,\n type StackGap,\n type StackJustify,\n type StackProps,\n type SurfacePadding,\n type SurfaceProps,\n type SurfaceRadius,\n type SurfaceTone,\n type TextEmphasis,\n type TextProps,\n type TextTone,\n type VisuallyHiddenProps,\n} from \"./layout.js\";\n\nexport {\n Button,\n IconButton,\n Link,\n type ButtonAlign,\n type ButtonProps,\n type ButtonShape,\n type ButtonSize,\n type ButtonTone,\n type IconButtonProps,\n type IconButtonShape,\n type IconButtonSize,\n type IconButtonTone,\n type LinkRenderProps,\n type LinkProps,\n} from \"./actions.js\";\n\nexport {\n Field,\n OtpField,\n PasswordField,\n SearchField,\n TextArea,\n TextField,\n type FieldControlProps,\n type FieldProps,\n type OtpFieldProps,\n type PasswordFieldProps,\n type PasswordFieldToggleRenderProps,\n type SearchFieldProps,\n type SearchFieldIconRenderProps,\n type TextAreaProps,\n type TextFieldProps,\n} from \"./forms.js\";\n\nexport {\n Combobox,\n Form,\n type ComboboxItem,\n type ComboboxOpenChangeReason,\n type ComboboxProps,\n type FormProps,\n type FormSubmitHandler,\n NativeSelect,\n type NativeSelectProps,\n type SelectOption,\n} from \"./advanced-forms.js\";\n\nexport {\n Select,\n type SelectItem,\n type SelectLeadingRenderProps,\n type SelectOptionLeadingRenderProps,\n type SelectProps,\n type SelectSection,\n} from \"./select.js\";\n\nexport {\n NumberField,\n type NumberFieldProps,\n} from \"./number-field.js\";\n\nexport {\n Slider,\n type SliderProps,\n} from \"./slider.js\";\n\nexport {\n DatePicker,\n type DatePickerMonthAction,\n type DatePickerProps,\n} from \"./date-picker.js\";\n\nexport {\n FilePicker,\n type FilePickerProps,\n} from \"./file-picker.js\";\n\nexport {\n Checkbox,\n CheckboxGroup,\n Chip,\n Radio,\n RadioGroup,\n SegmentedControl,\n Switch,\n type CheckboxProps,\n type CheckboxGroupItem,\n type CheckboxGroupProps,\n type ChipProps,\n type ChoiceLeadingRenderProps,\n type RadioProps,\n type RadioGroupItem,\n type RadioGroupProps,\n type SegmentedControlItem,\n type SegmentedControlProps,\n type SwitchProps,\n type SwitchSize,\n} from \"./selection.js\";\n\nexport {\n TabPanel,\n Tabs,\n getDynamicTabPanelId,\n getTabId,\n getTabPanelId,\n type TabLeadingRenderProps,\n type TabItem,\n type TabPanelProps,\n type TabsProps,\n} from \"./navigation.js\";\n\nexport { Breadcrumb, type BreadcrumbProps } from \"./breadcrumb.js\";\nexport { Pagination, type PaginationProps } from \"./pagination.js\";\n\nexport {\n LoadMore,\n type LoadMoreProps,\n} from \"./supplemental-navigation.js\";\n\nexport {\n Steps,\n type StepsProps,\n} from \"./steps.js\";\n\nexport {\n BottomNavigation,\n getBottomNavigationGridColumn,\n isUnmodifiedPrimaryBottomNavigationClick,\n shouldHideBottomNavigationForKeyboard,\n type BottomNavigationIconRenderProps,\n type BottomNavigationLinkRenderProps,\n type BottomNavigationProps,\n} from \"./bottom-navigation.js\";\n\nexport {\n Badge,\n Card,\n ListRow,\n Tag,\n type BadgeProps,\n type BadgeVariant,\n type CardHeadingLevel,\n type CardProps,\n type ListRowProps,\n type TagProps,\n type TagTone,\n} from \"./display.js\";\n\nexport {\n CounterBadge,\n Icon,\n Image,\n type CounterBadgeProps,\n type IconProps,\n type ImageAdapterProps,\n type ImageProps,\n} from \"./supplemental-display.js\";\n\nexport {\n Accordion,\n Avatar,\n AvatarGroup,\n type AvatarGroupProps,\n DescriptionList,\n Divider,\n List,\n Statistic,\n StatisticGroup,\n Table,\n Timeline,\n type AccordionItem,\n type AccordionProps,\n type AvatarProps,\n type DescriptionListProps,\n type DividerInset,\n type DividerOrientation,\n type DividerProps,\n type ListAppearance,\n type ListProps,\n type StatisticProps,\n type StatisticGroupProps,\n type StatisticTrendMarkRenderProps,\n type ComposeStatisticAccessibilityLabel,\n type TableColumn,\n type TableProps,\n type TableSortDirection,\n type TimelineProps,\n} from \"./advanced-display.js\";\n\nexport {\n UploadItem,\n type UploadItemProps,\n} from \"./upload-item.js\";\n\nexport {\n EmptyState,\n Notice,\n Progress,\n Result,\n Skeleton,\n Spinner,\n type EmptyStateProps,\n type NoticeProps,\n type ProgressProps,\n type ResultProps,\n type SkeletonProps,\n type SpinnerProps,\n} from \"./feedback.js\";\n\nexport {\n Toast,\n ToastProvider,\n useToast,\n type ToastApi,\n type ToastProps,\n type ToastProviderProps,\n} from \"./toast.js\";\n\nexport {\n AlertDialog,\n Dialog,\n Menu,\n Sheet,\n Tooltip,\n type AlertDialogProps,\n type DialogOpenChangeReason,\n type DialogProps,\n type MenuItem,\n type MenuAsyncState,\n type MenuOpenChangeReason,\n type MenuProps,\n type MenuSection,\n type OverlayTrigger,\n type SheetPlacement,\n type SheetProps,\n type TooltipProps,\n} from \"./overlays.js\";\n\nexport { Carousel, type CarouselProps, type CarouselLabels } from \"./carousel.js\";\n\nexport { FloatingActionButton, useFloatingActionButtonScroll, resolveFloatingActionButtonContentClearance, type FloatingActionButtonProps } from \"./floating-action-button.js\";\n\nexport { Calendar, type CalendarProps, type CalendarMonthAction, type CalendarHandle, type CalendarOverflow } from \"./calendar.js\";\n\nexport { Anchor, type AnchorProps } from \"./anchor.js\";\n\nexport { Popover, type PopoverProps, type PopoverContentActions } from \"./popover.js\";\nexport { SidePanel, type SidePanelProps } from \"./side-panel.js\";\nexport { Splitter, type SplitterProps } from \"./splitter.js\";\nexport { Tour, type TourProps } from \"./tour.js\";\nexport { Tree, type TreeProps } from \"./tree.js\";\nexport { TransferList, type TransferListProps, type TransferListLabels } from \"./transfer-list.js\";\nexport { Mentions, type MentionsProps, type MentionCandidate } from \"./mentions.js\";\nexport { CommandPalette, type CommandPaletteProps } from \"./command-palette.js\";\nexport { Agreement, type AgreementProps } from \"./agreement.js\";\nexport { Top, type TopProps } from \"./top.js\";\nexport { Heading, type HeadingProps } from \"./heading.js\";\nexport { TextFormat, type TextFormatProps } from \"./text-formats.js\";\nexport { ClipboardButton, type ClipboardButtonProps } from \"./clipboard.js\";\nexport { ToggleGroup, type ToggleGroupProps } from \"./toggle-group.js\";\nexport { TagsInput, type TagsInputProps } from \"./tags-input.js\";\nexport { SkipNav, type SkipNavProps } from \"./skip-nav.js\";\nexport { BottomInfo, type BottomInfoProps } from \"./bottom-info.js\";\nexport { Sidebar, type SidebarProps } from \"./sidebar.js\";\nexport { DateRangePicker, type DateRangePickerProps } from \"./date-range.js\";\nexport {\n OverlayStackProvider,\n useOverlayStack,\n useDialog,\n useSheet,\n type OverlayStackApi,\n type OverlayStackProviderProps,\n type OverlayHandle,\n} from \"./overlay-stack.js\";\nexport { AuthProviderButton, type AuthProviderButtonProps } from \"./provider-button.js\";\nexport { DataTable, type DataTableProps, type DataTableLabels } from \"./data-table.js\";\nexport { Collapsible, type CollapsibleProps } from \"./collapsible.js\";\nexport { ContextMenu, type ContextMenuProps } from \"./context-menu.js\";\nexport { Menubar, type MenubarProps } from \"./menubar.js\";\nexport { Asset, AssetGroup, type AssetProps, type AssetGroupProps } from \"./asset.js\";\n"]}
|
package/dist/layout.d.ts
CHANGED
|
@@ -173,7 +173,7 @@ export type SectionProps = Omit<HTMLAttributes<HTMLElement>, "children" | "title
|
|
|
173
173
|
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
174
174
|
}>;
|
|
175
175
|
/** Large-text-safe semantic content section with an optional header action. */
|
|
176
|
-
export declare const Section: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "
|
|
176
|
+
export declare const Section: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "title" | "children"> & Readonly<{
|
|
177
177
|
title?: ReactNode;
|
|
178
178
|
description?: ReactNode;
|
|
179
179
|
action?: ReactNode;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type MentionMatch, type MentionTriggerConfig } from "@hjmds/design-contracts/components/mentions";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { type TextAreaProps } from "./forms.js";
|
|
4
|
+
export type MentionCandidate = Readonly<{
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
/** Text inserted after the trigger character; defaults to `label`. */
|
|
8
|
+
insertText?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
}>;
|
|
11
|
+
export type MentionsProps<TriggerId extends string = string> = Omit<TextAreaProps, "value" | "defaultValue" | "onChange" | "children"> & Readonly<{
|
|
12
|
+
value: string;
|
|
13
|
+
onValueChange: (value: string) => void;
|
|
14
|
+
triggers: readonly MentionTriggerConfig<TriggerId>[];
|
|
15
|
+
/** Candidates for the active query; the product owns filtering and loading. */
|
|
16
|
+
candidates: readonly MentionCandidate[];
|
|
17
|
+
/** Fires whenever the active trigger match changes, including to null. */
|
|
18
|
+
onMentionQueryChange?: (match: MentionMatch<TriggerId> | null) => void;
|
|
19
|
+
/** Localized message shown when the popup is open with no candidates. */
|
|
20
|
+
emptyMessage: string;
|
|
21
|
+
/** Localized accessible name for the candidate list. */
|
|
22
|
+
listLabel: string;
|
|
23
|
+
renderCandidate?: (candidate: MentionCandidate) => ReactNode;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const Mentions: <TriggerId extends string = string>(props: MentionsProps<TriggerId> & {
|
|
26
|
+
ref?: React.Ref<HTMLTextAreaElement>;
|
|
27
|
+
}) => React.ReactElement | null;
|
|
28
|
+
//# sourceMappingURL=mentions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;CAAE,KACvE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC"}
|
package/dist/mentions.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { findActiveMentionTrigger, resolveMentionInsertion, } from "@hjmds/design-contracts/components/mentions";
|
|
3
|
+
import { forwardRef, useEffect, useId, useRef, useState, } from "react";
|
|
4
|
+
import { TextArea } from "./forms.js";
|
|
5
|
+
import { classNames, composeRefs } from "./internal.js";
|
|
6
|
+
import { AnchoredPortal, useAnchoredPopup } from "./portal.js";
|
|
7
|
+
export const Mentions = forwardRef(function Mentions({ value, onValueChange, triggers, candidates, onMentionQueryChange, emptyMessage, listLabel, renderCandidate, className, ...textAreaProps }, forwardedRef) {
|
|
8
|
+
const inputRef = useRef(null);
|
|
9
|
+
const [match, setMatch] = useState(null);
|
|
10
|
+
const [activeIndex, setActiveIndex] = useState(0);
|
|
11
|
+
const [list, setList] = useState(null);
|
|
12
|
+
const id = `${useId().replaceAll(":", "")}-mentions`;
|
|
13
|
+
const open = match !== null;
|
|
14
|
+
const activeCandidate = candidates[Math.min(activeIndex, Math.max(candidates.length - 1, 0))];
|
|
15
|
+
const notifyRef = useRef(onMentionQueryChange);
|
|
16
|
+
notifyRef.current = onMentionQueryChange;
|
|
17
|
+
useEffect(() => { notifyRef.current?.(match); }, [match]);
|
|
18
|
+
const syncMatch = (text, cursor) => {
|
|
19
|
+
// The contract owns trigger detection, including "a space closes it" and
|
|
20
|
+
// "the nearer trigger wins"; this component only reports the cursor.
|
|
21
|
+
const next = findActiveMentionTrigger(text, cursor, triggers);
|
|
22
|
+
setMatch((previous) => (previous?.triggerStart === next?.triggerStart && previous?.query === next?.query ? previous : next));
|
|
23
|
+
if (next === null || next.query !== match?.query)
|
|
24
|
+
setActiveIndex(0);
|
|
25
|
+
};
|
|
26
|
+
const commit = (candidate) => {
|
|
27
|
+
const input = inputRef.current;
|
|
28
|
+
if (!match || !input)
|
|
29
|
+
return;
|
|
30
|
+
const result = resolveMentionInsertion(value, match, input.selectionStart ?? value.length, candidate.insertText ?? candidate.label);
|
|
31
|
+
onValueChange(result.text);
|
|
32
|
+
setMatch(null);
|
|
33
|
+
queueMicrotask(() => {
|
|
34
|
+
input.focus();
|
|
35
|
+
input.setSelectionRange(result.cursorPosition, result.cursorPosition);
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
const onKeyDown = (event) => {
|
|
39
|
+
if (!open)
|
|
40
|
+
return;
|
|
41
|
+
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
42
|
+
if (candidates.length === 0)
|
|
43
|
+
return;
|
|
44
|
+
event.preventDefault();
|
|
45
|
+
setActiveIndex((previous) => {
|
|
46
|
+
const next = event.key === "ArrowDown" ? previous + 1 : previous - 1;
|
|
47
|
+
return (next + candidates.length) % candidates.length;
|
|
48
|
+
});
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (event.key === "Escape") {
|
|
52
|
+
// Dismissing the popup must not touch the text the user already typed.
|
|
53
|
+
event.preventDefault();
|
|
54
|
+
event.stopPropagation();
|
|
55
|
+
setMatch(null);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (event.key === "Enter" && activeCandidate && candidates.length > 0) {
|
|
59
|
+
event.preventDefault();
|
|
60
|
+
commit(activeCandidate);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const position = useAnchoredPopup(inputRef, open ? list : null, {
|
|
64
|
+
placement: "bottom", align: "start", matchAnchorWidth: true, zIndex: 900,
|
|
65
|
+
});
|
|
66
|
+
return (_jsxs("div", { className: classNames("hjm-mentions", className), children: [_jsx(TextArea, { ...textAreaProps, ref: composeRefs(inputRef, forwardedRef), value: value, role: "combobox", "aria-expanded": open, "aria-controls": open ? id : undefined, "aria-autocomplete": "list", "aria-activedescendant": open && activeCandidate ? `${id}-${activeCandidate.id}` : undefined, onChange: (event) => {
|
|
67
|
+
onValueChange(event.target.value);
|
|
68
|
+
syncMatch(event.target.value, event.target.selectionStart ?? event.target.value.length);
|
|
69
|
+
}, onKeyUp: (event) => {
|
|
70
|
+
// Caret moves without an edit (arrows, clicks) change which trigger is
|
|
71
|
+
// active, so the match is re-read from the caret, not only from input.
|
|
72
|
+
if (open && (event.key === "ArrowDown" || event.key === "ArrowUp"))
|
|
73
|
+
return;
|
|
74
|
+
const input = event.currentTarget;
|
|
75
|
+
syncMatch(input.value, input.selectionStart ?? input.value.length);
|
|
76
|
+
}, onClick: (event) => {
|
|
77
|
+
const input = event.currentTarget;
|
|
78
|
+
syncMatch(input.value, input.selectionStart ?? input.value.length);
|
|
79
|
+
}, onBlur: (event) => { textAreaProps.onBlur?.(event); setMatch(null); }, onKeyDown: (event) => { textAreaProps.onKeyDown?.(event); onKeyDown(event); } }), open ? (_jsx(AnchoredPortal, { anchorRef: inputRef, children: _jsx("div", { ref: setList, id: id, role: "listbox", "aria-label": listLabel, className: "hjm-mentions__list", style: position.style, children: candidates.length === 0 ? (_jsx("p", { className: "hjm-mentions__empty", role: "status", children: emptyMessage })) : candidates.map((candidate, index) => (_jsx("div", { id: `${id}-${candidate.id}`, role: "option", "aria-selected": candidate.id === activeCandidate?.id, className: "hjm-mentions__option",
|
|
80
|
+
// Pointer commit must not blur the textarea first, or the caret
|
|
81
|
+
// position the insertion depends on would already be gone.
|
|
82
|
+
onMouseDown: (event) => { event.preventDefault(); commit(candidate); }, onMouseEnter: () => setActiveIndex(index), children: renderCandidate?.(candidate) ?? (_jsxs(_Fragment, { children: [_jsx("span", { children: candidate.label }), candidate.description ? _jsx("span", { className: "hjm-mentions__description", children: candidate.description }) : null] })) }, candidate.id))) }) })) : null] }));
|
|
83
|
+
});
|
|
84
|
+
//# sourceMappingURL=mentions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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AE,CAAC,SAAS,CAAC,IAAI,CAC/B,8BACE,yBAAO,SAAS,CAAC,KAAK,GAAQ,EAC7B,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,2BAA2B,YAAE,SAAS,CAAC,WAAW,GAAQ,CAAC,CAAC,CAAC,IAAI,IACzG,CACJ,IAfI,SAAS,CAAC,EAAE,CAgBb,CACP,CAAC,GACE,GACS,CAClB,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC,CAE6B,CAAC","sourcesContent":["import {\n findActiveMentionTrigger,\n resolveMentionInsertion,\n type MentionMatch,\n type MentionTriggerConfig,\n} from \"@hjmds/design-contracts/components/mentions\";\nimport {\n forwardRef,\n useEffect,\n useId,\n useRef,\n useState,\n type CSSProperties,\n type KeyboardEvent,\n type ReactNode,\n} from \"react\";\nimport { TextArea, type TextAreaProps } from \"./forms.js\";\nimport { classNames, composeRefs } from \"./internal.js\";\nimport { AnchoredPortal, useAnchoredPopup } from \"./portal.js\";\n\nexport type MentionCandidate = Readonly<{\n id: string;\n label: string;\n /** Text inserted after the trigger character; defaults to `label`. */\n insertText?: string;\n description?: string;\n}>;\n\nexport type MentionsProps<TriggerId extends string = string> =\n Omit<TextAreaProps, \"value\" | \"defaultValue\" | \"onChange\" | \"children\"> &\n Readonly<{\n value: string;\n onValueChange: (value: string) => void;\n triggers: readonly MentionTriggerConfig<TriggerId>[];\n /** Candidates for the active query; the product owns filtering and loading. */\n candidates: readonly MentionCandidate[];\n /** Fires whenever the active trigger match changes, including to null. */\n onMentionQueryChange?: (match: MentionMatch<TriggerId> | null) => void;\n /** Localized message shown when the popup is open with no candidates. */\n emptyMessage: string;\n /** Localized accessible name for the candidate list. */\n listLabel: string;\n renderCandidate?: (candidate: MentionCandidate) => ReactNode;\n }>;\n\nexport const Mentions = forwardRef(function Mentions<TriggerId extends string = string>(\n {\n value,\n onValueChange,\n triggers,\n candidates,\n onMentionQueryChange,\n emptyMessage,\n listLabel,\n renderCandidate,\n className,\n ...textAreaProps\n }: MentionsProps<TriggerId>,\n forwardedRef: React.Ref<HTMLTextAreaElement>,\n) {\n const inputRef = useRef<HTMLTextAreaElement>(null);\n const [match, setMatch] = useState<MentionMatch<TriggerId> | null>(null);\n const [activeIndex, setActiveIndex] = useState(0);\n const [list, setList] = useState<HTMLDivElement | null>(null);\n const id = `${useId().replaceAll(\":\", \"\")}-mentions`;\n const open = match !== null;\n const activeCandidate = candidates[Math.min(activeIndex, Math.max(candidates.length - 1, 0))];\n\n const notifyRef = useRef(onMentionQueryChange);\n notifyRef.current = onMentionQueryChange;\n useEffect(() => { notifyRef.current?.(match); }, [match]);\n\n const syncMatch = (text: string, cursor: number) => {\n // The contract owns trigger detection, including \"a space closes it\" and\n // \"the nearer trigger wins\"; this component only reports the cursor.\n const next = findActiveMentionTrigger(text, cursor, triggers);\n setMatch((previous) => (previous?.triggerStart === next?.triggerStart && previous?.query === next?.query ? previous : next));\n if (next === null || next.query !== match?.query) setActiveIndex(0);\n };\n const commit = (candidate: MentionCandidate) => {\n const input = inputRef.current;\n if (!match || !input) return;\n const result = resolveMentionInsertion(value, match, input.selectionStart ?? value.length, candidate.insertText ?? candidate.label);\n onValueChange(result.text);\n setMatch(null);\n queueMicrotask(() => {\n input.focus();\n input.setSelectionRange(result.cursorPosition, result.cursorPosition);\n });\n };\n\n const onKeyDown = (event: KeyboardEvent<HTMLTextAreaElement>) => {\n if (!open) return;\n if (event.key === \"ArrowDown\" || event.key === \"ArrowUp\") {\n if (candidates.length === 0) return;\n event.preventDefault();\n setActiveIndex((previous) => {\n const next = event.key === \"ArrowDown\" ? previous + 1 : previous - 1;\n return (next + candidates.length) % candidates.length;\n });\n return;\n }\n if (event.key === \"Escape\") {\n // Dismissing the popup must not touch the text the user already typed.\n event.preventDefault();\n event.stopPropagation();\n setMatch(null);\n return;\n }\n if (event.key === \"Enter\" && activeCandidate && candidates.length > 0) {\n event.preventDefault();\n commit(activeCandidate);\n }\n };\n\n const position = useAnchoredPopup(inputRef, open ? list : null, {\n placement: \"bottom\", align: \"start\", matchAnchorWidth: true, zIndex: 900,\n });\n\n return (\n <div className={classNames(\"hjm-mentions\", className)}>\n <TextArea\n {...textAreaProps}\n ref={composeRefs(inputRef, forwardedRef)}\n value={value}\n role=\"combobox\"\n aria-expanded={open}\n aria-controls={open ? id : undefined}\n aria-autocomplete=\"list\"\n aria-activedescendant={open && activeCandidate ? `${id}-${activeCandidate.id}` : undefined}\n onChange={(event) => {\n onValueChange(event.target.value);\n syncMatch(event.target.value, event.target.selectionStart ?? event.target.value.length);\n }}\n onKeyUp={(event) => {\n // Caret moves without an edit (arrows, clicks) change which trigger is\n // active, so the match is re-read from the caret, not only from input.\n if (open && (event.key === \"ArrowDown\" || event.key === \"ArrowUp\")) return;\n const input = event.currentTarget;\n syncMatch(input.value, input.selectionStart ?? input.value.length);\n }}\n onClick={(event) => {\n const input = event.currentTarget;\n syncMatch(input.value, input.selectionStart ?? input.value.length);\n }}\n onBlur={(event) => { textAreaProps.onBlur?.(event); setMatch(null); }}\n onKeyDown={(event) => { textAreaProps.onKeyDown?.(event); onKeyDown(event); }}\n />\n {open ? (\n <AnchoredPortal anchorRef={inputRef}>\n <div\n ref={setList}\n id={id}\n role=\"listbox\"\n aria-label={listLabel}\n className=\"hjm-mentions__list\"\n style={position.style as CSSProperties}\n >\n {candidates.length === 0 ? (\n <p className=\"hjm-mentions__empty\" role=\"status\">{emptyMessage}</p>\n ) : candidates.map((candidate, index) => (\n <div\n key={candidate.id}\n id={`${id}-${candidate.id}`}\n role=\"option\"\n aria-selected={candidate.id === activeCandidate?.id}\n className=\"hjm-mentions__option\"\n // Pointer commit must not blur the textarea first, or the caret\n // position the insertion depends on would already be gone.\n onMouseDown={(event) => { event.preventDefault(); commit(candidate); }}\n onMouseEnter={() => setActiveIndex(index)}\n >\n {renderCandidate?.(candidate) ?? (\n <>\n <span>{candidate.label}</span>\n {candidate.description ? <span className=\"hjm-mentions__description\">{candidate.description}</span> : null}\n </>\n )}\n </div>\n ))}\n </div>\n </AnchoredPortal>\n ) : null}\n </div>\n );\n}) as <TriggerId extends string = string>(\n props: MentionsProps<TriggerId> & { ref?: React.Ref<HTMLTextAreaElement> },\n) => React.ReactElement | null;\n"]}
|