@lax-wp/design-system 0.13.33-beta.7 → 0.13.33
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/components/button/Button.cjs.js +5 -5
- package/dist/components/button/Button.cjs.js.map +1 -1
- package/dist/components/button/Button.es.js +18 -18
- package/dist/components/button/Button.es.js.map +1 -1
- package/dist/components/button/IconButton.cjs.js +1 -1
- package/dist/components/button/IconButton.cjs.js.map +1 -1
- package/dist/components/button/IconButton.es.js +8 -8
- package/dist/components/button/IconButton.es.js.map +1 -1
- package/dist/components/buttons/option-button/OptionButton.cjs.js +1 -1
- package/dist/components/buttons/option-button/OptionButton.cjs.js.map +1 -1
- package/dist/components/buttons/option-button/OptionButton.es.js +1 -1
- package/dist/components/buttons/option-button/OptionButton.es.js.map +1 -1
- package/dist/components/data-display/comparison/components/Header.cjs.js +1 -1
- package/dist/components/data-display/comparison/components/Header.cjs.js.map +1 -1
- package/dist/components/data-display/comparison/components/Header.es.js +13 -13
- package/dist/components/data-display/comparison/components/Header.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/ActionCell.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/body/cell/ActionCell.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/ActionCell.es.js +11 -11
- package/dist/components/data-display/infinite-table/body/cell/ActionCell.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/CheckboxCell.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/body/cell/CheckboxCell.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/CheckboxCell.es.js +10 -10
- package/dist/components/data-display/infinite-table/body/cell/CheckboxCell.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/DataCell.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/body/cell/DataCell.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/DataCell.es.js +23 -23
- package/dist/components/data-display/infinite-table/body/cell/DataCell.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/LoaderCell.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/body/cell/LoaderCell.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/LoaderCell.es.js +6 -6
- package/dist/components/data-display/infinite-table/body/cell/LoaderCell.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/PendingEditCell.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/body/cell/PendingEditCell.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/PendingEditCell.es.js +4 -4
- package/dist/components/data-display/infinite-table/body/cell/PendingEditCell.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/RowActionCell.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/body/cell/RowActionCell.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/RowActionCell.es.js +3 -3
- package/dist/components/data-display/infinite-table/body/cell/RowActionCell.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/RowOptionsCell.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/body/cell/RowOptionsCell.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/RowOptionsCell.es.js +24 -24
- package/dist/components/data-display/infinite-table/body/cell/RowOptionsCell.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/SpinnerCell.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/body/cell/SpinnerCell.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/SpinnerCell.es.js +1 -1
- package/dist/components/data-display/infinite-table/body/cell/SpinnerCell.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/rows/row.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/body/rows/row.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/rows/row.es.js +2 -2
- package/dist/components/data-display/infinite-table/body/rows/row.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/head/CheckAll.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/head/CheckAll.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/head/CheckAll.es.js +1 -1
- package/dist/components/data-display/infinite-table/head/CheckAll.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/head/cell/index.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/head/cell/index.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/head/cell/index.es.js +2 -2
- package/dist/components/data-display/infinite-table/head/cell/index.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/head/index.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/head/index.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/head/index.es.js +20 -20
- package/dist/components/data-display/infinite-table/head/index.es.js.map +1 -1
- package/dist/components/data-display/tag/Tag.cjs.js +1 -1
- package/dist/components/data-display/tag/Tag.cjs.js.map +1 -1
- package/dist/components/data-display/tag/Tag.es.js +9 -11
- package/dist/components/data-display/tag/Tag.es.js.map +1 -1
- package/dist/components/floating-bar/FloatingBar.cjs.js +1 -1
- package/dist/components/floating-bar/FloatingBar.cjs.js.map +1 -1
- package/dist/components/floating-bar/FloatingBar.es.js +9 -9
- package/dist/components/floating-bar/FloatingBar.es.js.map +1 -1
- package/dist/components/forms/base-input-field/BaseInputField.cjs.js +2 -2
- package/dist/components/forms/base-input-field/BaseInputField.cjs.js.map +1 -1
- package/dist/components/forms/base-input-field/BaseInputField.es.js +42 -40
- package/dist/components/forms/base-input-field/BaseInputField.es.js.map +1 -1
- package/dist/components/forms/creatable-select/CreatableSelect.cjs.js +1 -1
- package/dist/components/forms/creatable-select/CreatableSelect.cjs.js.map +1 -1
- package/dist/components/forms/creatable-select/CreatableSelect.es.js +15 -14
- package/dist/components/forms/creatable-select/CreatableSelect.es.js.map +1 -1
- package/dist/components/forms/currency-input/CurrencyInputField.cjs.js +1 -1
- package/dist/components/forms/currency-input/CurrencyInputField.cjs.js.map +1 -1
- package/dist/components/forms/currency-input/CurrencyInputField.es.js +65 -57
- package/dist/components/forms/currency-input/CurrencyInputField.es.js.map +1 -1
- package/dist/components/forms/date-time-field/DateTimeField.cjs.js +1 -1
- package/dist/components/forms/date-time-field/DateTimeField.cjs.js.map +1 -1
- package/dist/components/forms/date-time-field/DateTimeField.es.js +33 -33
- package/dist/components/forms/date-time-field/DateTimeField.es.js.map +1 -1
- package/dist/components/forms/debounce-input/DebounceInputField.cjs.js +1 -1
- package/dist/components/forms/debounce-input/DebounceInputField.cjs.js.map +1 -1
- package/dist/components/forms/debounce-input/DebounceInputField.es.js +2 -2
- package/dist/components/forms/debounce-input/DebounceInputField.es.js.map +1 -1
- package/dist/components/forms/dynamic-data-input/DynamicDataInput.cjs.js +1 -1
- package/dist/components/forms/dynamic-data-input/DynamicDataInput.cjs.js.map +1 -1
- package/dist/components/forms/dynamic-data-input/DynamicDataInput.es.js +7 -7
- package/dist/components/forms/dynamic-data-input/DynamicDataInput.es.js.map +1 -1
- package/dist/components/forms/dynamic-data-input/DynamicDataInputField.cjs.js +1 -1
- package/dist/components/forms/dynamic-data-input/DynamicDataInputField.cjs.js.map +1 -1
- package/dist/components/forms/dynamic-data-input/DynamicDataInputField.es.js +19 -17
- package/dist/components/forms/dynamic-data-input/DynamicDataInputField.es.js.map +1 -1
- package/dist/components/forms/field-options/Item.cjs.js +1 -1
- package/dist/components/forms/field-options/Item.cjs.js.map +1 -1
- package/dist/components/forms/field-options/Item.es.js +5 -5
- package/dist/components/forms/field-options/Item.es.js.map +1 -1
- package/dist/components/forms/formula-input/FormulaInput.cjs.js +1 -1
- package/dist/components/forms/formula-input/FormulaInput.cjs.js.map +1 -1
- package/dist/components/forms/formula-input/FormulaInput.es.js +10 -10
- package/dist/components/forms/formula-input/FormulaInput.es.js.map +1 -1
- package/dist/components/forms/icon-picker/IconPicker.cjs.js +1 -1
- package/dist/components/forms/icon-picker/IconPicker.cjs.js.map +1 -1
- package/dist/components/forms/icon-picker/IconPicker.es.js +57 -42
- package/dist/components/forms/icon-picker/IconPicker.es.js.map +1 -1
- package/dist/components/forms/input-field/InputField.cjs.js.map +1 -1
- package/dist/components/forms/input-field/InputField.es.js.map +1 -1
- package/dist/components/forms/master-data-input/MasterDataInputField.cjs.js +1 -1
- package/dist/components/forms/master-data-input/MasterDataInputField.cjs.js.map +1 -1
- package/dist/components/forms/master-data-input/MasterDataInputField.es.js +60 -54
- package/dist/components/forms/master-data-input/MasterDataInputField.es.js.map +1 -1
- package/dist/components/forms/md-input/RichMarkdownInput.cjs.js +3 -3
- package/dist/components/forms/md-input/RichMarkdownInput.cjs.js.map +1 -1
- package/dist/components/forms/md-input/RichMarkdownInput.es.js +63 -63
- package/dist/components/forms/md-input/RichMarkdownInput.es.js.map +1 -1
- package/dist/components/forms/number-input-field/NumberInputField.cjs.js +1 -1
- package/dist/components/forms/number-input-field/NumberInputField.cjs.js.map +1 -1
- package/dist/components/forms/number-input-field/NumberInputField.es.js +5 -5
- package/dist/components/forms/number-input-field/NumberInputField.es.js.map +1 -1
- package/dist/components/forms/percentage-input/PercentageInputField.cjs.js +2 -2
- package/dist/components/forms/percentage-input/PercentageInputField.cjs.js.map +1 -1
- package/dist/components/forms/percentage-input/PercentageInputField.es.js +20 -20
- package/dist/components/forms/percentage-input/PercentageInputField.es.js.map +1 -1
- package/dist/components/forms/search-bar/SearchBar.cjs.js +1 -1
- package/dist/components/forms/search-bar/SearchBar.cjs.js.map +1 -1
- package/dist/components/forms/search-bar/SearchBar.es.js +16 -16
- package/dist/components/forms/search-bar/SearchBar.es.js.map +1 -1
- package/dist/components/forms/select-field/SelectField.cjs.js +2 -2
- package/dist/components/forms/select-field/SelectField.cjs.js.map +1 -1
- package/dist/components/forms/select-field/SelectField.d.ts +0 -4
- package/dist/components/forms/select-field/SelectField.es.js +203 -202
- package/dist/components/forms/select-field/SelectField.es.js.map +1 -1
- package/dist/components/forms/text-area-field/TextAreaField.cjs.js +1 -1
- package/dist/components/forms/text-area-field/TextAreaField.cjs.js.map +1 -1
- package/dist/components/forms/text-area-field/TextAreaField.es.js +14 -14
- package/dist/components/forms/text-area-field/TextAreaField.es.js.map +1 -1
- package/dist/components/forms/toggle/Toggle.cjs.js +1 -1
- package/dist/components/forms/toggle/Toggle.cjs.js.map +1 -1
- package/dist/components/forms/toggle/Toggle.es.js +59 -65
- package/dist/components/forms/toggle/Toggle.es.js.map +1 -1
- package/dist/components/navigation/accordion/Accordion.cjs.js +1 -1
- package/dist/components/navigation/accordion/Accordion.cjs.js.map +1 -1
- package/dist/components/navigation/accordion/Accordion.es.js +5 -5
- package/dist/components/navigation/accordion/Accordion.es.js.map +1 -1
- package/dist/components/navigation/stepper/Stepper.cjs.js +1 -1
- package/dist/components/navigation/stepper/Stepper.cjs.js.map +1 -1
- package/dist/components/navigation/stepper/Stepper.es.js +1 -1
- package/dist/components/navigation/stepper/Stepper.es.js.map +1 -1
- package/dist/components/navigation/tabs/TabOptions.cjs.js +1 -1
- package/dist/components/navigation/tabs/TabOptions.cjs.js.map +1 -1
- package/dist/components/navigation/tabs/TabOptions.es.js +15 -15
- package/dist/components/navigation/tabs/TabOptions.es.js.map +1 -1
- package/dist/components/navigation/tabs/TabSwitch.cjs.js +1 -1
- package/dist/components/navigation/tabs/TabSwitch.cjs.js.map +1 -1
- package/dist/components/navigation/tabs/TabSwitch.es.js +7 -7
- package/dist/components/navigation/tabs/TabSwitch.es.js.map +1 -1
- package/dist/components/navigation/tabs/Tabs.cjs.js +1 -1
- package/dist/components/navigation/tabs/Tabs.cjs.js.map +1 -1
- package/dist/components/navigation/tabs/Tabs.es.js +1 -1
- package/dist/components/navigation/tabs/Tabs.es.js.map +1 -1
- package/dist/components/tooltip/Tooltip.cjs.js +1 -1
- package/dist/components/tooltip/Tooltip.cjs.js.map +1 -1
- package/dist/components/tooltip/Tooltip.es.js +19 -19
- package/dist/components/tooltip/Tooltip.es.js.map +1 -1
- package/dist/components/user-avatar/UserAvatar.cjs.js +1 -1
- package/dist/components/user-avatar/UserAvatar.cjs.js.map +1 -1
- package/dist/components/user-avatar/UserAvatar.d.ts +1 -1
- package/dist/components/user-avatar/UserAvatar.es.js +38 -40
- package/dist/components/user-avatar/UserAvatar.es.js.map +1 -1
- package/dist/components/user-avatar/constants.cjs.js +1 -1
- package/dist/components/user-avatar/constants.cjs.js.map +1 -1
- package/dist/components/user-avatar/constants.d.ts +0 -1
- package/dist/components/user-avatar/constants.es.js +9 -10
- package/dist/components/user-avatar/constants.es.js.map +1 -1
- package/dist/design-system.css +1 -1
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInputField.cjs.js","sources":["../../../../src/components/forms/base-input-field/BaseInputField.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport cn from \"classnames\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport React, { forwardRef, useState } from \"react\";\nimport { useTranslation } from 'react-i18next';\nimport { Tooltip as AntTooltip } from \"antd\";\nimport { Typography } from \"../../data-display/typography/Typography\";\nimport { Label } from \"../../data-display/label/Label\";\nimport type { LabelType } from \"../../data-display/label/Label\";\nimport { NoteAddOutlined, BoltOutlined } from \"@mui/icons-material\";\nimport { AIExtractedIndicator } from \"../../icons/AIExtractedIndicator\";\nimport { AIStarIcon } from \"../../icons/AIStarIcon\";\nimport { InputLabel } from \"../shared/InputLabel\";\nimport Tooltip from \"../../tooltip/Tooltip\";\nimport {\n getConfidenceScoreBadgeClass,\n getConfidenceScoreBadgeColor,\n getConfidenceScoreBadgeFill,\n getConfidenceScoreBadgeTextColor,\n shouldShowConfidenceScore,\n} from \"../../../utils/confidenceScoreUtils\";\nimport { HelpIcon } from \"../../icons/HelpIcon\";\n\n/**\n * Confidence score type\n */\nexport type ConfidenceScoreType = \"low\" | \"medium\" | \"high\";\n\n/**\n * Bounding boxes interface\n */\nexport type SourceMetaBBox = {\n b: number;\n l: number;\n r: number;\n t: number;\n};\n\nexport type SourceMetaItem = {\n bbox: SourceMetaBBox;\n confidence_score?: number;\n is_primary?: boolean;\n match_score?: number;\n match_type?: string;\n page_height: number;\n page_width: number;\n source_page: number;\n source_text?: string;\n};\n\n/**\n * Risk details interface\n */\nexport interface RiskDetails {\n color?: string;\n description?: string;\n hexBgColor?: string;\n hexBorderColor?: string;\n [key: string]: any;\n}\n\n/**\n * Risk details card component props\n */\nexport interface RiskDetailsCardProps {\n riskDetails: RiskDetails;\n maxWidth?: string;\n showAllRisksSuggestions?: boolean;\n}\n\n/**\n * Eye icon for password visibility toggle\n */\nconst EyeIcon = ({ className, size = 16 }: { className?: string; size?: number }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n >\n <path d=\"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\" />\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n </svg>\n);\n\n/**\n * Eye off icon for password visibility toggle\n */\nconst EyeOffIcon = ({ className, size = 16 }: { className?: string; size?: number }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n >\n <path d=\"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24\" />\n <line x1=\"1\" y1=\"1\" x2=\"23\" y2=\"23\" />\n </svg>\n);\n\n/**\n * Close icon for clearable input\n */\nconst CloseIcon = ({ className, size = 16 }: { className?: string; size?: number }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n);\n\n/**\n * Revert icon for revert back value\n */\nconst RevertIcon = ({ className, size = 16 }: { className?: string; size?: number }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n >\n <path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\" />\n <path d=\"M3 3v5h5\" />\n </svg>\n);\n\n/** Visual emphasis for the input surface (background + border) */\nexport type BaseInputFieldEmphasis = \"default\" | \"modified\" | \"deleted\" | \"success\";\n\n/**\n * Props for the BaseInputField component\n */\nexport type TBaseInputFieldProps = any & {\n /** Current value of the input */\n value: string;\n /** Callback function called when the input value changes */\n onChange(data: any): void;\n /** Callback function for key down events */\n onKeyDown?: void;\n /** Error message to display */\n errorMessage: string;\n /** Default value for the input */\n defaultValue?: string;\n /** Whether the input is disabled */\n disabled?: boolean;\n /** Maximum value for number inputs */\n max?: number;\n /** Minimum value for number inputs */\n min?: number;\n /** Whether the field is required */\n required?: boolean;\n /** Whether the required indicator shows as conditional */\n isRequiredConditional?: boolean;\n /** Background color class */\n bg?: string;\n /** Tags to display with the label */\n tags?: (string | LabelType)[];\n /** Text color class */\n color?: string;\n /** Unique identifier for the input */\n id: string;\n /** Label text for the input */\n label?: string;\n /** Optional extra content in the label row (e.g. actions, badges) */\n labelExtra?: React.ReactNode;\n /** Input type (text, email, password, number, etc.) */\n type?: string;\n /** Value to revert back to */\n revertBackValue?: any;\n /** Placeholder text */\n placeholder?: string;\n /** Whether this is a password field with visibility toggle */\n isPasswordField?: boolean;\n /** Callback to set password visibility */\n setIsPasswordVisible?: any;\n /** Tooltip text */\n tooltip?: string;\n /** Whether to preserve original case in the label */\n originalCase?: boolean;\n /** Icon or element to display at the end of the input */\n suffixIcon?: React.ReactNode;\n /** Text size class */\n textSize?: string;\n /** Whether the value was AI extracted */\n isAiExtracted?: boolean;\n /** Whether this is a GTN field */\n isGTN?: boolean;\n /** Confidence score shown as a compact badge */\n confidenceScore?: number;\n /** Confidence classification for badge styling */\n confidenceType?: ConfidenceScoreType;\n /** Optional tooltip content for confidence score badge */\n confidenceTooltip?: React.ReactNode;\n /** GTN name for document integration */\n gtnName?: any;\n /** Success message to display */\n successMessage?: string;\n /** Additional CSS classes for the input element */\n inputClassName?: string;\n /** Inline styles for the input element */\n inputStyle?: React.CSSProperties;\n /** Additional CSS classes for the label */\n labelClassName?: string;\n /** Whether this is a live field */\n isLiveField?: boolean;\n /** Callback function for blur events */\n onBlur?: () => void;\n /** Whether the input is clearable */\n isClearable?: boolean;\n /** Additional CSS classes for the wrapper */\n className?: string;\n /** Ref for the input element */\n inputRef?: React.RefObject<HTMLInputElement>;\n /** Risk details data */\n riskDetails?: RiskDetails;\n /** Whether risk analysis is open */\n isRiskAnalysisOpen?: boolean;\n /** Custom risk details card component */\n RiskDetailsCard?: React.ComponentType<RiskDetailsCardProps>;\n /** Bounding box for confidence score */\n sourceMeta?: SourceMetaItem[];\n /** Handler for adding GTN to document */\n onAddGTNToDocument?: (keyValuePair: { key: string; value: string }) => void;\n /** Callback function for confidence score click */\n onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;\n /** Input surface style: `'modified'` — `--Warning-50` / `--Warning-200`; `'deleted'` — `--Error-50` / `--Error-200`, text `#475467`; `'success'` — `--Success-50` / `--Success-200`, text `#101828`. */\n inputEmphasis?: BaseInputFieldEmphasis;\n};\n\n/**\n * A feature-rich input field component with label, validation, GTN integration,\n * risk analysis support, and comprehensive styling options.\n *\n * @example\n * ```tsx\n * <BaseInputField\n * id=\"email\"\n * label=\"Email Address\"\n * type=\"email\"\n * value={email}\n * onChange={setEmail}\n * placeholder=\"Enter your email\"\n * required\n * errorMessage={emailError}\n * />\n * ```\n */\nexport const BaseInputField = forwardRef<HTMLInputElement, TBaseInputFieldProps>(\n (\n {\n id,\n label,\n labelExtra,\n onChange,\n errorMessage,\n successMessage,\n required,\n isRequiredConditional = false,\n bg,\n tags,\n color,\n className,\n isPasswordField,\n setIsPasswordVisible,\n inputRef,\n tooltip,\n suffixIcon,\n revertBackValue,\n originalCase = false,\n textSize,\n isAiExtracted = false,\n isGTN = false,\n confidenceScore,\n confidenceType = \"high\",\n confidenceTooltip,\n gtnName = null,\n inputClassName = \"\",\n inputStyle = {},\n labelClassName,\n onBlur,\n isLiveField = false,\n isClearable = false,\n riskDetails,\n isRiskAnalysisOpen = false,\n RiskDetailsCard,\n onAddGTNToDocument,\n sourceMeta = [],\n inputEmphasis = \"default\",\n onConfidenceScoreClick,\n ...props\n },\n ref\n ) => {\n const { t } = useTranslation();\n const showRiskSkin = Boolean(isRiskAnalysisOpen && riskDetails?.color);\n const emphasisModifiedSkin =\n inputEmphasis === \"modified\" &&\n !errorMessage &&\n !successMessage &&\n !showRiskSkin;\n const emphasisDeletedSkin =\n inputEmphasis === \"deleted\" &&\n !errorMessage &&\n !successMessage &&\n !showRiskSkin;\n const emphasisSuccessSkin =\n inputEmphasis === \"success\" &&\n !errorMessage &&\n !successMessage &&\n !showRiskSkin;\n const [showPassword, setShowPassword] = useState(false);\n const [isHovered, setIsHovered] = useState(false);\n const handleAddGTNToDocument = (value: string) => {\n if (onAddGTNToDocument) {\n const keyValuePair = {\n key: gtnName,\n value,\n };\n onAddGTNToDocument(keyValuePair);\n }\n };\n\n return (\n <div\n className={cn(\n \"flex gap-0.5 relative\",\n isHovered && isGTN\n ? \"border rounded-lg border-primary-100 bg-primary-50 p-1 focus:ring-primary-500 focus:border-primary-500 dark:focus:ring-neutral-50 dark:focus:border-neutral-50\"\n : \"\"\n )}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n >\n {isGTN && !isHovered ? (\n <div className=\"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5\" />\n ) : null}\n <div className={cn(\"flex flex-col w-full\", className)}>\n <style>\n {`\n .dark input:-webkit-autofill,\n .dark input:-webkit-autofill:hover,\n .dark input:-webkit-autofill:focus {\n -webkit-text-fill-color: white !important;\n -webkit-box-shadow: 0 0 0px 1000px var(--input-bg-color) inset !important;\n transition: background-color 5000s ease-in-out 0s;\n }\n \n input:-webkit-autofill,\n input:-webkit-autofill:hover,\n input:-webkit-autofill:focus {\n -webkit-text-fill-color: #111827 !important;\n -webkit-box-shadow: 0 0 0px 1000px white inset !important;\n transition: background-color 5000s ease-in-out 0s;\n }\n `}\n </style>\n {(label || labelExtra) && (\n <label\n id={id}\n htmlFor=\"text\"\n className={`mb-1 text-xs font-medium text-gray-600 inline-flex items-center gap-1 ${!originalCase ? \"capitalize\" : \"\"\n } ${labelClassName || \"!uppercse\"}`}\n >\n <div className=\"flex flex-wrap items-center justify-between w-full\">\n <div className=\"inline-flex flex-wrap items-center gap-1\">\n {(label || required || isRequiredConditional) && (\n <InputLabel label={label ?? \"\"} required={required || false} isRequiredConditional={isRequiredConditional || false} />\n )}\n {revertBackValue?.length > 0 &&\n revertBackValue !== props.value && (\n <AntTooltip placement=\"top\" title={revertBackValue}>\n <button\n className=\"cursor-pointer\"\n onClick={() => onChange(revertBackValue)}\n type=\"button\"\n >\n <RevertIcon\n className=\"cursor-pointer pb-0.5 text-primary-600 w-4 h-4\"\n />\n </button>\n </AntTooltip>\n )}\n {isLiveField && (\n <BoltOutlined\n sx={{\n fontSize: 16,\n color: \"var(--color-primary-600)\",\n rotate: \"15deg\",\n }}\n />\n )}\n {isAiExtracted && !shouldShowConfidenceScore(confidenceScore) && <AIExtractedIndicator />}\n <Label labels={tags} />\n {tooltip && (\n <AntTooltip placement=\"top\" title={tooltip}>\n <div className=\"cursor-pointer\">\n <HelpIcon className=\"w-icon-sm h-icon-sm\" />\n </div>\n </AntTooltip>\n )}\n {labelExtra}\n </div>\n <div className=\"flex items-center gap-1\">\n {(shouldShowConfidenceScore(confidenceScore) && confidenceType) ? (\n <Tooltip\n placement=\"top-end\"\n title={confidenceTooltip || \"\"}\n className=\"cursor-pointer\"\n >\n <div\n className={cn(\n \"inline-flex min-w-12 items-center gap-1 rounded-md px-1 py-0.5\",\n getConfidenceScoreBadgeClass(confidenceType)\n )}\n onClick={() => onConfidenceScoreClick?.(sourceMeta)}\n >\n <AIStarIcon\n size={12}\n fill={getConfidenceScoreBadgeColor(confidenceType)}\n fillSecondary={getConfidenceScoreBadgeFill(confidenceType)}\n />\n <span\n className={cn(\n \"text-xs font-medium leading-4\",\n getConfidenceScoreBadgeTextColor(confidenceType)\n )}\n >\n {confidenceScore}%\n </span>\n </div>\n </Tooltip>\n ) : null}\n\n {isGTN && isHovered && onAddGTNToDocument ? (\n <button\n id={`btn-base-input-field-add-to-document-${id}`}\n className=\"cursor-pointer\"\n onClick={() => handleAddGTNToDocument(props?.value)}\n type=\"button\"\n >\n <AntTooltip placement=\"top\" title={t(\"Add to document\")}>\n <NoteAddOutlined\n className=\"text-primary-600\"\n sx={{\n fontSize: 16,\n }}\n />\n </AntTooltip>\n </button>\n ) : null}\n </div>\n </div>\n </label>\n )}\n <label className=\"relative block\">\n <div className=\"relative\">\n <input\n {...props}\n ref={inputRef || ref}\n id={id || label}\n key={id}\n required={required}\n style={\n {\n \"--input-bg-color\":\n \"var(--tw-bg-opacity, 1) rgb(var(--bg-color))\",\n ...inputStyle,\n } as React.CSSProperties\n }\n className={cn(\n \"border border-solid h-8 text-neutral-900 dark:text-black-100 block w-full px-3 py-1.5 font-medium disabled:opacity-70 focus:outline-none focus:ring-0 dark:disabled:placeholder:!text-black-400\",\n textSize ? textSize : \"text-sm\",\n color ? color : \"text-neutral-900 dark:text-black-100\",\n bg && bg,\n inputClassName ? inputClassName : \"\",\n errorMessage\n ? cn(\n \"rounded-md border-red-300 dark:border-red-500 bg-white hover:border-red-400 dark:bg-black-600 dark:hover:border-red-400 focus:border-red-600 focus:shadow-[0_0_0_1.5px_rgba(239,68,68,0.22)] dark:focus:border-red-500 dark:focus:shadow-[0_0_0_1.5px_rgba(248,113,113,0.25)]\",\n )\n : successMessage\n ? cn(\n \"rounded-md border-green-300 bg-white hover:border-green-400 dark:border-green-600 dark:bg-black-600 dark:hover:border-green-500 focus:border-green-600 focus:shadow-[0_0_0_1.5px_rgba(34,197,94,0.22)] dark:focus:border-green-500\",\n )\n : showRiskSkin && riskDetails?.color\n ? cn(\n \"rounded-md hover:border-primary-500 dark:hover:border-primary-400 focus:border-primary-600 dark:focus:border-primary-400 focus:shadow-[0_0_0_1.5px_var(--color-primary-100)] dark:focus:shadow-[0_0_0_1.5px_var(--color-primary-950)]\",\n `bg-${riskDetails.color}-50 border-${riskDetails.color}-300`,\n )\n : emphasisDeletedSkin\n ? \"rounded-lg border border-solid border-[var(--Error-200,#FECACA)] bg-[var(--Error-50,#FEF2F2)] !text-[#475467] focus:border-[var(--Error-200,#FECACA)] focus:shadow-[0_0_0_2px_rgba(254_202_202_/_0.45)] dark:border-[var(--Error-200,#FECACA)] dark:bg-[var(--Error-50,#FEF2F2)] dark:!text-[#475467] disabled:!opacity-100 disabled:!bg-[var(--Error-50,#FEF2F2)] dark:disabled:!bg-[var(--Error-50,#FEF2F2)]\"\n : emphasisModifiedSkin\n ? \"rounded-lg border border-solid border-[var(--Warning-200,#FEDF89)] bg-[var(--Warning-50,#FFFAEB)] text-neutral-900 dark:text-black-100 focus:border-[var(--Warning-200,#FEDF89)] focus:shadow-[0_0_0_2px_rgba(254_223_137_/_0.45)] dark:border-[var(--Warning-200,#FEDF89)] dark:bg-[var(--Warning-50,#FFFAEB)] disabled:!opacity-100 disabled:!bg-[var(--Warning-50,#FFFAEB)] dark:disabled:!bg-[var(--Warning-50,#FFFAEB)]\"\n : emphasisSuccessSkin\n ? \"rounded-lg border border-solid border-[var(--Success-200,#BBF7D0)] bg-[var(--Success-50,#F0FDF4)] !text-[#101828] focus:border-[var(--Success-200,#BBF7D0)] focus:shadow-[0_0_0_2px_rgba(187_247_208_/_0.45)] dark:border-[var(--Success-200,#BBF7D0)] dark:bg-[var(--Success-50,#F0FDF4)] dark:!text-[#101828] disabled:!opacity-100 disabled:!bg-[var(--Success-50,#F0FDF4)] dark:disabled:!bg-[var(--Success-50,#F0FDF4)] disabled:!text-[#101828] dark:disabled:!text-[#101828]\"\n : \"rounded-md border-neutral-200 bg-white hover:border-primary-500 dark:border-black-600 dark:bg-black-600 dark:hover:border-primary-400 focus:border-primary-600 dark:focus:border-primary-400 focus:shadow-[0_0_0_1.5px_var(--color-primary-100)] dark:focus:shadow-[0_0_0_1.5px_var(--color-primary-950)] disabled:!bg-neutral-50 dark:disabled:!bg-black-800\"\n )}\n onChange={(e) => {\n onChange(e.target.value);\n }}\n onClick={(e) => e.stopPropagation()}\n autoComplete=\"off\"\n onBlur={onBlur}\n />\n {isPasswordField ? (\n <button\n className=\"absolute inset-y-0 flex items-center cursor-pointer right-2\"\n onClick={() => {\n setShowPassword(!showPassword);\n setIsPasswordVisible?.(!showPassword);\n }}\n type=\"button\"\n >\n {showPassword ? (\n <EyeIcon className=\"text-gray-400 w-4 h-4\" />\n ) : (\n <EyeOffIcon className=\"text-gray-400 w-4 h-4\" />\n )}\n </button>\n ) : isClearable && props.value ? (\n <button\n id={`btn-input-field-clear-${id}`}\n className=\"absolute inset-y-0 flex items-center cursor-pointer right-2 focus:outline-none\"\n onClick={(e) => {\n e.stopPropagation();\n onChange(\"\");\n }}\n type=\"button\"\n >\n <CloseIcon\n className=\"text-neutral-200 dark:text-black-500 w-4 h-4\"\n />\n </button>\n ) : suffixIcon ? (\n <div className=\"absolute inset-y-0 flex items-center right-2\">\n {suffixIcon}\n </div>\n ) : null}\n </div>\n </label>\n <AnimatePresence>\n {errorMessage && (\n <motion.div\n initial={{ opacity: 0, y: -10 }}\n animate={{ opacity: 1, y: 0 }}\n exit={{ opacity: 0, y: -10 }}\n transition={{ duration: 0.2 }}\n >\n <Typography\n className=\"mt-1 text-error-500\"\n appearance=\"custom\"\n size=\"extra-small\"\n variant=\"medium\"\n >\n {errorMessage}\n </Typography>\n </motion.div>\n )}\n </AnimatePresence>\n <AnimatePresence>\n {successMessage && (\n <motion.div\n initial={{ opacity: 0, y: -10 }}\n animate={{ opacity: 1, y: 0 }}\n exit={{ opacity: 0, y: -10 }}\n transition={{ duration: 0.2 }}\n >\n <Typography\n className=\"mt-1 text-success-500 dark:text-success-300\"\n appearance=\"custom\"\n size=\"extra-small\"\n variant=\"medium\"\n >\n {successMessage}\n </Typography>\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n\n {isHovered &&\n riskDetails &&\n isRiskAnalysisOpen &&\n RiskDetailsCard && (\n <div\n role=\"tooltip\"\n tabIndex={0}\n className=\"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl\"\n onClick={(e) => e.stopPropagation()}\n onMouseDown={(e) => e.preventDefault()}\n onKeyDown={(e) => {\n if (e.key === \"Escape\") {\n setIsHovered(false);\n }\n }}\n >\n <RiskDetailsCard riskDetails={riskDetails} />\n </div>\n )}\n </div>\n );\n }\n);\n\nBaseInputField.displayName = \"BaseInputField\";\n\nexport default BaseInputField;\n\n"],"names":["EyeIcon","className","size","jsxs","jsx","EyeOffIcon","CloseIcon","RevertIcon","BaseInputField","forwardRef","id","label","labelExtra","onChange","errorMessage","successMessage","required","isRequiredConditional","bg","tags","color","isPasswordField","setIsPasswordVisible","inputRef","tooltip","suffixIcon","revertBackValue","originalCase","textSize","isAiExtracted","isGTN","confidenceScore","confidenceType","confidenceTooltip","gtnName","inputClassName","inputStyle","labelClassName","onBlur","isLiveField","isClearable","riskDetails","isRiskAnalysisOpen","RiskDetailsCard","onAddGTNToDocument","sourceMeta","inputEmphasis","onConfidenceScoreClick","props","ref","t","useTranslation","showRiskSkin","emphasisModifiedSkin","emphasisDeletedSkin","emphasisSuccessSkin","showPassword","setShowPassword","useState","isHovered","setIsHovered","handleAddGTNToDocument","value","cn","InputLabel","AntTooltip","BoltOutlined","shouldShowConfidenceScore","AIExtractedIndicator","Label","HelpIcon","Tooltip","getConfidenceScoreBadgeClass","AIStarIcon","getConfidenceScoreBadgeColor","getConfidenceScoreBadgeFill","getConfidenceScoreBadgeTextColor","NoteAddOutlined","createElement","e","AnimatePresence","motion","Typography"],"mappings":"osBAyEMA,GAAU,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAO,MACnCC,EAAAA,KAAC,MAAA,CACC,MAAOD,EACP,OAAQA,EACR,QAAQ,YACR,KAAK,OACL,OAAO,eACP,YAAY,IACZ,cAAc,QACd,eAAe,QACf,UAAAD,EAEA,SAAA,CAAAG,EAAAA,IAAC,OAAA,CAAK,EAAE,8CAAA,CAA+C,QACtD,SAAA,CAAO,GAAG,KAAK,GAAG,KAAK,EAAE,GAAA,CAAI,CAAA,CAAA,CAChC,EAMIC,GAAa,CAAC,CAAE,UAAAJ,EAAW,KAAAC,EAAO,MACtCC,EAAAA,KAAC,MAAA,CACC,MAAOD,EACP,OAAQA,EACR,QAAQ,YACR,KAAK,OACL,OAAO,eACP,YAAY,IACZ,cAAc,QACd,eAAe,QACf,UAAAD,EAEA,SAAA,CAAAG,EAAAA,IAAC,OAAA,CAAK,EAAE,sLAAA,CAAuL,EAC/LA,EAAAA,IAAC,QAAK,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,IAAA,CAAK,CAAA,CAAA,CACtC,EAMIE,GAAY,CAAC,CAAE,UAAAL,EAAW,KAAAC,EAAO,MACrCC,EAAAA,KAAC,MAAA,CACC,MAAOD,EACP,OAAQA,EACR,QAAQ,YACR,KAAK,OACL,OAAO,eACP,YAAY,IACZ,cAAc,QACd,eAAe,QACf,UAAAD,EAEA,SAAA,CAAAG,EAAAA,IAAC,OAAA,CAAK,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAA,CAAK,EACpCA,EAAAA,IAAC,QAAK,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,IA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7C,CAAA,CAAA,CAIV,CACF,EAEAjC,EAAe,YAAc"}
|
|
1
|
+
{"version":3,"file":"BaseInputField.cjs.js","sources":["../../../../src/components/forms/base-input-field/BaseInputField.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport cn from \"classnames\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport React, { forwardRef, useState } from \"react\";\nimport { useTranslation } from 'react-i18next';\nimport { Tooltip as AntTooltip } from \"antd\";\nimport { Typography } from \"../../data-display/typography/Typography\";\nimport { HelpIcon } from \"../../icons/HelpIcon\";\nimport { Label } from \"../../data-display/label/Label\";\nimport type { LabelType } from \"../../data-display/label/Label\";\nimport { NoteAddOutlined, BoltOutlined } from \"@mui/icons-material\";\nimport { AIExtractedIndicator } from \"../../icons/AIExtractedIndicator\";\nimport { AIStarIcon } from \"../../icons/AIStarIcon\";\nimport { InputLabel } from \"../shared/InputLabel\";\nimport Tooltip from \"../../tooltip/Tooltip\";\nimport {\n getConfidenceScoreBadgeClass,\n getConfidenceScoreBadgeColor,\n getConfidenceScoreBadgeFill,\n getConfidenceScoreBadgeTextColor,\n shouldShowConfidenceScore,\n} from \"../../../utils/confidenceScoreUtils\";\n\n/**\n * Confidence score type\n */\nexport type ConfidenceScoreType = \"low\" | \"medium\" | \"high\";\n\n/**\n * Bounding boxes interface\n */\nexport type SourceMetaBBox = {\n b: number;\n l: number;\n r: number;\n t: number;\n};\n\nexport type SourceMetaItem = {\n bbox: SourceMetaBBox;\n confidence_score?: number;\n is_primary?: boolean;\n match_score?: number;\n match_type?: string;\n page_height: number;\n page_width: number;\n source_page: number;\n source_text?: string;\n};\n\n/**\n * Risk details interface\n */\nexport interface RiskDetails {\n color?: string;\n description?: string;\n hexBgColor?: string;\n hexBorderColor?: string;\n [key: string]: any;\n}\n\n/**\n * Risk details card component props\n */\nexport interface RiskDetailsCardProps {\n riskDetails: RiskDetails;\n maxWidth?: string;\n showAllRisksSuggestions?: boolean;\n}\n\n/**\n * Eye icon for password visibility toggle\n */\nconst EyeIcon = ({ className, size = 16 }: { className?: string; size?: number }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n >\n <path d=\"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\" />\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n </svg>\n);\n\n/**\n * Eye off icon for password visibility toggle\n */\nconst EyeOffIcon = ({ className, size = 16 }: { className?: string; size?: number }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n >\n <path d=\"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24\" />\n <line x1=\"1\" y1=\"1\" x2=\"23\" y2=\"23\" />\n </svg>\n);\n\n/**\n * Close icon for clearable input\n */\nconst CloseIcon = ({ className, size = 16 }: { className?: string; size?: number }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n);\n\n/**\n * Revert icon for revert back value\n */\nconst RevertIcon = ({ className, size = 16 }: { className?: string; size?: number }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n >\n <path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\" />\n <path d=\"M3 3v5h5\" />\n </svg>\n);\n\n/** Visual emphasis for the input surface (background + border) */\nexport type BaseInputFieldEmphasis = \"default\" | \"modified\" | \"deleted\" | \"success\";\n\n/**\n * Props for the BaseInputField component\n */\nexport type TBaseInputFieldProps = any & {\n /** Current value of the input */\n value: string;\n /** Callback function called when the input value changes */\n onChange(data: any): void;\n /** Callback function for key down events */\n onKeyDown?: void;\n /** Error message to display */\n errorMessage: string;\n /** Default value for the input */\n defaultValue?: string;\n /** Whether the input is disabled */\n disabled?: boolean;\n /** Maximum value for number inputs */\n max?: number;\n /** Minimum value for number inputs */\n min?: number;\n /** Whether the field is required */\n required?: boolean;\n /** Whether the required indicator shows as conditional */\n isRequiredConditional?: boolean;\n /** Background color class */\n bg?: string;\n /** Tags to display with the label */\n tags?: (string | LabelType)[];\n /** Text color class */\n color?: string;\n /** Unique identifier for the input */\n id: string;\n /** Label text for the input */\n label?: string;\n /** Optional extra content in the label row (e.g. actions, badges) */\n labelExtra?: React.ReactNode;\n /** Input type (text, email, password, number, etc.) */\n type?: string;\n /** Value to revert back to */\n revertBackValue?: any;\n /** Placeholder text */\n placeholder?: string;\n /** Whether this is a password field with visibility toggle */\n isPasswordField?: boolean;\n /** Callback to set password visibility */\n setIsPasswordVisible?: any;\n /** Tooltip text */\n tooltip?: string;\n /** Whether to preserve original case in the label */\n originalCase?: boolean;\n /** Icon or element to display at the end of the input */\n suffixIcon?: React.ReactNode;\n /** Text size class */\n textSize?: string;\n /** Whether the value was AI extracted */\n isAiExtracted?: boolean;\n /** Whether this is a GTN field */\n isGTN?: boolean;\n /** Confidence score shown as a compact badge */\n confidenceScore?: number;\n /** Confidence classification for badge styling */\n confidenceType?: ConfidenceScoreType;\n /** Optional tooltip content for confidence score badge */\n confidenceTooltip?: React.ReactNode;\n /** GTN name for document integration */\n gtnName?: any;\n /** Success message to display */\n successMessage?: string;\n /** Additional CSS classes for the input element */\n inputClassName?: string;\n /** Inline styles for the input element */\n inputStyle?: React.CSSProperties;\n /** Additional CSS classes for the label */\n labelClassName?: string;\n /** Whether this is a live field */\n isLiveField?: boolean;\n /** Callback function for blur events */\n onBlur?: () => void;\n /** Whether the input is clearable */\n isClearable?: boolean;\n /** Additional CSS classes for the wrapper */\n className?: string;\n /** Ref for the input element */\n inputRef?: React.RefObject<HTMLInputElement>;\n /** Risk details data */\n riskDetails?: RiskDetails;\n /** Whether risk analysis is open */\n isRiskAnalysisOpen?: boolean;\n /** Custom risk details card component */\n RiskDetailsCard?: React.ComponentType<RiskDetailsCardProps>;\n /** Bounding box for confidence score */\n sourceMeta?: SourceMetaItem[];\n /** Handler for adding GTN to document */\n onAddGTNToDocument?: (keyValuePair: { key: string; value: string }) => void;\n /** Callback function for confidence score click */\n onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;\n /** Input surface style: `'modified'` — `--Warning-50` / `--Warning-200`; `'deleted'` — `--Error-50` / `--Error-200`, text `#475467`; `'success'` — `--Success-50` / `--Success-200`, text `#101828`. */\n inputEmphasis?: BaseInputFieldEmphasis;\n};\n\n/**\n * A feature-rich input field component with label, validation, GTN integration,\n * risk analysis support, and comprehensive styling options.\n *\n * @example\n * ```tsx\n * <BaseInputField\n * id=\"email\"\n * label=\"Email Address\"\n * type=\"email\"\n * value={email}\n * onChange={setEmail}\n * placeholder=\"Enter your email\"\n * required\n * errorMessage={emailError}\n * />\n * ```\n */\nexport const BaseInputField = forwardRef<HTMLInputElement, TBaseInputFieldProps>(\n (\n {\n id,\n label,\n labelExtra,\n onChange,\n errorMessage,\n successMessage,\n required,\n isRequiredConditional = false,\n bg,\n tags,\n color,\n className,\n isPasswordField,\n setIsPasswordVisible,\n inputRef,\n tooltip,\n suffixIcon,\n revertBackValue,\n originalCase = false,\n textSize,\n isAiExtracted = false,\n isGTN = false,\n confidenceScore,\n confidenceType = \"high\",\n confidenceTooltip,\n gtnName = null,\n inputClassName = \"\",\n inputStyle = {},\n labelClassName,\n onBlur,\n isLiveField = false,\n isClearable = false,\n riskDetails,\n isRiskAnalysisOpen = false,\n RiskDetailsCard,\n onAddGTNToDocument,\n sourceMeta = [],\n inputEmphasis = \"default\",\n onConfidenceScoreClick,\n ...props\n },\n ref\n ) => {\n const { t } = useTranslation();\n const showRiskSkin = Boolean(isRiskAnalysisOpen && riskDetails?.color);\n const emphasisModifiedSkin =\n inputEmphasis === \"modified\" &&\n !errorMessage &&\n !successMessage &&\n !showRiskSkin;\n const emphasisDeletedSkin =\n inputEmphasis === \"deleted\" &&\n !errorMessage &&\n !successMessage &&\n !showRiskSkin;\n const emphasisSuccessSkin =\n inputEmphasis === \"success\" &&\n !errorMessage &&\n !successMessage &&\n !showRiskSkin;\n const [showPassword, setShowPassword] = useState(false);\n const [isHovered, setIsHovered] = useState(false);\n const handleAddGTNToDocument = (value: string) => {\n if (onAddGTNToDocument) {\n const keyValuePair = {\n key: gtnName,\n value,\n };\n onAddGTNToDocument(keyValuePair);\n }\n };\n\n return (\n <div\n className={cn(\n \"flex gap-0.5 relative\",\n isHovered && isGTN\n ? \"border rounded-lg border-primary-100 bg-primary-50 p-1 focus:ring-primary-500 focus:border-primary-500 dark:focus:ring-neutral-50 dark:focus:border-neutral-50\"\n : \"\"\n )}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n >\n {isGTN && !isHovered ? (\n <div className=\"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5\" />\n ) : null}\n <div className={cn(\"flex flex-col w-full\", className)}>\n <style>\n {`\n .dark input:-webkit-autofill,\n .dark input:-webkit-autofill:hover,\n .dark input:-webkit-autofill:focus {\n -webkit-text-fill-color: white !important;\n -webkit-box-shadow: 0 0 0px 1000px var(--input-bg-color) inset !important;\n transition: background-color 5000s ease-in-out 0s;\n }\n \n input:-webkit-autofill,\n input:-webkit-autofill:hover,\n input:-webkit-autofill:focus {\n -webkit-text-fill-color: #111827 !important;\n -webkit-box-shadow: 0 0 0px 1000px white inset !important;\n transition: background-color 5000s ease-in-out 0s;\n }\n `}\n </style>\n {(label || labelExtra) && (\n <label\n id={id}\n htmlFor=\"text\"\n className={`mb-1 text-xs font-medium text-gray-600 inline-flex items-center gap-1 ${!originalCase ? \"capitalize\" : \"\"\n } ${labelClassName || \"!uppercse\"}`}\n >\n <div className=\"flex flex-wrap items-center justify-between w-full\">\n <div className=\"inline-flex flex-wrap items-center gap-1\">\n {(label || required || isRequiredConditional) && (\n <InputLabel label={label ?? \"\"} required={required || false} isRequiredConditional={isRequiredConditional || false} />\n )}\n {revertBackValue?.length > 0 &&\n revertBackValue !== props.value && (\n <AntTooltip placement=\"top\" title={revertBackValue}>\n <button\n className=\"cursor-pointer\"\n onClick={() => onChange(revertBackValue)}\n type=\"button\"\n >\n <RevertIcon\n size={16}\n className=\"cursor-pointer pb-0.5 text-primary-600\"\n />\n </button>\n </AntTooltip>\n )}\n {isLiveField && (\n <BoltOutlined\n sx={{\n fontSize: 16,\n color: \"var(--color-primary-600)\",\n rotate: \"15deg\",\n }}\n />\n )}\n {isAiExtracted && !shouldShowConfidenceScore(confidenceScore) && <AIExtractedIndicator />}\n <Label labels={tags} />\n {tooltip && (\n <AntTooltip placement=\"top\" title={tooltip}>\n <div className=\"cursor-pointer\">\n <HelpIcon />\n </div>\n </AntTooltip>\n )}\n {labelExtra}\n </div>\n <div className=\"flex items-center gap-1\">\n {(shouldShowConfidenceScore(confidenceScore) && confidenceType) ? (\n <Tooltip\n placement=\"top-end\"\n title={confidenceTooltip || \"\"}\n className=\"cursor-pointer\"\n >\n <div\n className={cn(\n \"inline-flex min-w-[50px] items-center gap-1 rounded-md px-1 py-0.5\",\n getConfidenceScoreBadgeClass(confidenceType)\n )}\n onClick={() => onConfidenceScoreClick?.(sourceMeta)}\n >\n <AIStarIcon\n size={12}\n fill={getConfidenceScoreBadgeColor(confidenceType)}\n fillSecondary={getConfidenceScoreBadgeFill(confidenceType)}\n />\n <span\n className={cn(\n \"text-xs font-medium leading-4\",\n getConfidenceScoreBadgeTextColor(confidenceType)\n )}\n >\n {confidenceScore}%\n </span>\n </div>\n </Tooltip>\n ) : null}\n\n {isGTN && isHovered && onAddGTNToDocument ? (\n <button\n id={`btn-base-input-field-add-to-document-${id}`}\n className=\"cursor-pointer\"\n onClick={() => handleAddGTNToDocument(props?.value)}\n type=\"button\"\n >\n <AntTooltip placement=\"top\" title={t(\"Add to document\")}>\n <NoteAddOutlined\n className=\"text-primary-600\"\n sx={{\n fontSize: 16,\n }}\n />\n </AntTooltip>\n </button>\n ) : null}\n </div>\n </div>\n </label>\n )}\n <label className=\"relative block\">\n <div className=\"relative\">\n <input\n {...props}\n ref={inputRef || ref}\n id={id || label}\n key={id}\n required={required}\n style={\n {\n \"--input-bg-color\":\n \"var(--tw-bg-opacity, 1) rgb(var(--bg-color))\",\n ...inputStyle,\n } as React.CSSProperties\n }\n className={cn(\n \"border border-solid h-[32px] text-neutral-900 dark:text-black-100 block w-full px-3 py-1.5 font-medium disabled:opacity-70 focus:outline-none focus:ring-0 dark:disabled:placeholder:!text-black-400\",\n textSize ? textSize : \"text-sm\",\n color ? color : \"text-neutral-900 dark:text-black-100\",\n bg && bg,\n inputClassName ? inputClassName : \"\",\n errorMessage\n ? cn(\n \"rounded-md border-red-300 dark:border-red-500 bg-white hover:border-red-400 dark:bg-black-600 dark:hover:border-red-400 focus:border-red-600 focus:shadow-[0_0_0_1.5px_rgba(239,68,68,0.22)] dark:focus:border-red-500 dark:focus:shadow-[0_0_0_1.5px_rgba(248,113,113,0.25)]\",\n )\n : successMessage\n ? cn(\n \"rounded-md border-green-300 bg-white hover:border-green-400 dark:border-green-600 dark:bg-black-600 dark:hover:border-green-500 focus:border-green-600 focus:shadow-[0_0_0_1.5px_rgba(34,197,94,0.22)] dark:focus:border-green-500\",\n )\n : showRiskSkin && riskDetails?.color\n ? cn(\n \"rounded-md hover:border-primary-500 dark:hover:border-primary-400 focus:border-primary-600 dark:focus:border-primary-400 focus:shadow-[0_0_0_1.5px_var(--color-primary-100)] dark:focus:shadow-[0_0_0_1.5px_var(--color-primary-950)]\",\n `bg-${riskDetails.color}-50 border-${riskDetails.color}-300`,\n )\n : emphasisDeletedSkin\n ? \"rounded-lg border border-solid border-[var(--Error-200,#FECACA)] bg-[var(--Error-50,#FEF2F2)] !text-[#475467] focus:border-[var(--Error-200,#FECACA)] focus:shadow-[0_0_0_2px_rgba(254_202_202_/_0.45)] dark:border-[var(--Error-200,#FECACA)] dark:bg-[var(--Error-50,#FEF2F2)] dark:!text-[#475467] disabled:!opacity-100 disabled:!bg-[var(--Error-50,#FEF2F2)] dark:disabled:!bg-[var(--Error-50,#FEF2F2)]\"\n : emphasisModifiedSkin\n ? \"rounded-lg border border-solid border-[var(--Warning-200,#FEDF89)] bg-[var(--Warning-50,#FFFAEB)] text-neutral-900 dark:text-black-100 focus:border-[var(--Warning-200,#FEDF89)] focus:shadow-[0_0_0_2px_rgba(254_223_137_/_0.45)] dark:border-[var(--Warning-200,#FEDF89)] dark:bg-[var(--Warning-50,#FFFAEB)] disabled:!opacity-100 disabled:!bg-[var(--Warning-50,#FFFAEB)] dark:disabled:!bg-[var(--Warning-50,#FFFAEB)]\"\n : emphasisSuccessSkin\n ? \"rounded-lg border border-solid border-[var(--Success-200,#BBF7D0)] bg-[var(--Success-50,#F0FDF4)] !text-[#101828] focus:border-[var(--Success-200,#BBF7D0)] focus:shadow-[0_0_0_2px_rgba(187_247_208_/_0.45)] dark:border-[var(--Success-200,#BBF7D0)] dark:bg-[var(--Success-50,#F0FDF4)] dark:!text-[#101828] disabled:!opacity-100 disabled:!bg-[var(--Success-50,#F0FDF4)] dark:disabled:!bg-[var(--Success-50,#F0FDF4)] disabled:!text-[#101828] dark:disabled:!text-[#101828]\"\n : \"rounded-md border-neutral-200 bg-white hover:border-primary-500 dark:border-black-600 dark:bg-black-600 dark:hover:border-primary-400 focus:border-primary-600 dark:focus:border-primary-400 focus:shadow-[0_0_0_1.5px_var(--color-primary-100)] dark:focus:shadow-[0_0_0_1.5px_var(--color-primary-950)] disabled:!bg-neutral-50 dark:disabled:!bg-black-800\"\n )}\n onChange={(e) => {\n onChange(e.target.value);\n }}\n onClick={(e) => e.stopPropagation()}\n autoComplete=\"off\"\n onBlur={onBlur}\n />\n {isPasswordField ? (\n <button\n className=\"absolute inset-y-0 flex items-center cursor-pointer right-2\"\n onClick={() => {\n setShowPassword(!showPassword);\n setIsPasswordVisible?.(!showPassword);\n }}\n type=\"button\"\n >\n {showPassword ? (\n <EyeIcon className=\"text-gray-400\" size={16} />\n ) : (\n <EyeOffIcon className=\"text-gray-400\" size={16} />\n )}\n </button>\n ) : isClearable && props.value ? (\n <button\n id={`btn-input-field-clear-${id}`}\n className=\"absolute inset-y-0 flex items-center cursor-pointer right-2 focus:outline-none\"\n onClick={(e) => {\n e.stopPropagation();\n onChange(\"\");\n }}\n type=\"button\"\n >\n <CloseIcon\n className=\"text-neutral-200 dark:text-black-500\"\n size={16}\n />\n </button>\n ) : suffixIcon ? (\n <div className=\"absolute inset-y-0 flex items-center right-2\">\n {suffixIcon}\n </div>\n ) : null}\n </div>\n </label>\n <AnimatePresence>\n {errorMessage && (\n <motion.div\n initial={{ opacity: 0, y: -10 }}\n animate={{ opacity: 1, y: 0 }}\n exit={{ opacity: 0, y: -10 }}\n transition={{ duration: 0.2 }}\n >\n <Typography\n className=\"mt-1 text-error-500\"\n appearance=\"custom\"\n size=\"extra-small\"\n variant=\"medium\"\n >\n {errorMessage}\n </Typography>\n </motion.div>\n )}\n </AnimatePresence>\n <AnimatePresence>\n {successMessage && (\n <motion.div\n initial={{ opacity: 0, y: -10 }}\n animate={{ opacity: 1, y: 0 }}\n exit={{ opacity: 0, y: -10 }}\n transition={{ duration: 0.2 }}\n >\n <Typography\n className=\"mt-1 text-success-500 dark:text-success-300\"\n appearance=\"custom\"\n size=\"extra-small\"\n variant=\"medium\"\n >\n {successMessage}\n </Typography>\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n\n {isHovered &&\n riskDetails &&\n isRiskAnalysisOpen &&\n RiskDetailsCard && (\n <div\n role=\"tooltip\"\n tabIndex={0}\n className=\"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl\"\n onClick={(e) => e.stopPropagation()}\n onMouseDown={(e) => e.preventDefault()}\n onKeyDown={(e) => {\n if (e.key === \"Escape\") {\n setIsHovered(false);\n }\n }}\n >\n <RiskDetailsCard riskDetails={riskDetails} />\n </div>\n )}\n </div>\n );\n }\n);\n\nBaseInputField.displayName = \"BaseInputField\";\n\nexport default BaseInputField;\n\n"],"names":["EyeIcon","className","size","jsxs","jsx","EyeOffIcon","CloseIcon","RevertIcon","BaseInputField","forwardRef","id","label","labelExtra","onChange","errorMessage","successMessage","required","isRequiredConditional","bg","tags","color","isPasswordField","setIsPasswordVisible","inputRef","tooltip","suffixIcon","revertBackValue","originalCase","textSize","isAiExtracted","isGTN","confidenceScore","confidenceType","confidenceTooltip","gtnName","inputClassName","inputStyle","labelClassName","onBlur","isLiveField","isClearable","riskDetails","isRiskAnalysisOpen","RiskDetailsCard","onAddGTNToDocument","sourceMeta","inputEmphasis","onConfidenceScoreClick","props","ref","t","useTranslation","showRiskSkin","emphasisModifiedSkin","emphasisDeletedSkin","emphasisSuccessSkin","showPassword","setShowPassword","useState","isHovered","setIsHovered","handleAddGTNToDocument","value","cn","InputLabel","AntTooltip","BoltOutlined","shouldShowConfidenceScore","AIExtractedIndicator","Label","HelpIcon","Tooltip","getConfidenceScoreBadgeClass","AIStarIcon","getConfidenceScoreBadgeColor","getConfidenceScoreBadgeFill","getConfidenceScoreBadgeTextColor","NoteAddOutlined","createElement","e","AnimatePresence","motion","Typography"],"mappings":"osBAyEMA,GAAU,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAO,MACnCC,EAAAA,KAAC,MAAA,CACC,MAAOD,EACP,OAAQA,EACR,QAA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,CACC,QAAS,CAAE,QAAS,EAAG,EAAG,GAAA,EAC1B,QAAS,CAAE,QAAS,EAAG,EAAG,CAAA,EAC1B,KAAM,CAAE,QAAS,EAAG,EAAG,GAAA,EACvB,WAAY,CAAE,SAAU,EAAA,EAExB,SAAA7E,EAAAA,IAAC8E,EAAAA,WAAA,CACC,UAAU,sBACV,WAAW,SACX,KAAK,cACL,QAAQ,SAEP,SAAApE,CAAA,CAAA,CACH,CAAA,EAGN,EACAV,EAAAA,IAAC4E,EAAAA,iBACE,SAAAjE,GACCX,EAAAA,IAAC6E,EAAAA,OAAO,IAAP,CACC,QAAS,CAAE,QAAS,EAAG,EAAG,GAAA,EAC1B,QAAS,CAAE,QAAS,EAAG,EAAG,CAAA,EAC1B,KAAM,CAAE,QAAS,EAAG,EAAG,GAAA,EACvB,WAAY,CAAE,SAAU,EAAA,EAExB,SAAA7E,EAAAA,IAAC8E,EAAAA,WAAA,CACC,UAAU,8CACV,WAAW,SACX,KAAK,cACL,QAAQ,SAEP,SAAAnE,CAAA,CAAA,CACH,CAAA,CACF,CAEJ,CAAA,EACF,EAEC4C,GACClB,GACAC,GACAC,GACEvC,EAAAA,IAAC,MAAA,CACC,KAAK,UACL,SAAU,EACV,UAAU,oFACV,QAAU2E,GAAMA,EAAE,gBAAA,EAClB,YAAcA,GAAMA,EAAE,eAAA,EACtB,UAAYA,GAAM,CACZA,EAAE,MAAQ,UACZnB,EAAa,EAAK,CAEtB,EAEA,SAAAxD,EAAAA,IAACuC,GAAgB,YAAAF,CAAA,CAA0B,CAAA,CAAA,CAC7C,CAAA,CAAA,CAIV,CACF,EAEAjC,EAAe,YAAc"}
|
|
@@ -4,15 +4,15 @@ import i from "../../../_virtual/index.es.js";
|
|
|
4
4
|
import { AnimatePresence as P, motion as j } from "framer-motion";
|
|
5
5
|
import { useTranslation as sr } from "react-i18next";
|
|
6
6
|
import { Tooltip as w } from "antd";
|
|
7
|
-
import { Typography as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { Typography as z } from "../../data-display/typography/Typography.es.js";
|
|
8
|
+
import { HelpIcon as cr } from "../../icons/HelpIcon.es.js";
|
|
9
|
+
import { Label as ur } from "../../data-display/label/Label.es.js";
|
|
10
|
+
import { BoltOutlined as br, NoteAddOutlined as pr } from "@mui/icons-material";
|
|
10
11
|
import { AIExtractedIndicator as mr } from "../../icons/AIExtractedIndicator.es.js";
|
|
11
|
-
import { AIStarIcon as
|
|
12
|
-
import { InputLabel as
|
|
13
|
-
import
|
|
14
|
-
import { shouldShowConfidenceScore as
|
|
15
|
-
import { HelpIcon as yr } from "../../icons/HelpIcon.es.js";
|
|
12
|
+
import { AIStarIcon as fr } from "../../icons/AIStarIcon.es.js";
|
|
13
|
+
import { InputLabel as hr } from "../shared/InputLabel.es.js";
|
|
14
|
+
import kr from "../../tooltip/Tooltip.es.js";
|
|
15
|
+
import { shouldShowConfidenceScore as D, getConfidenceScoreBadgeFill as xr, getConfidenceScoreBadgeColor as gr, getConfidenceScoreBadgeTextColor as vr, getConfidenceScoreBadgeClass as yr } from "../../../utils/confidenceScoreUtils.es.js";
|
|
16
16
|
const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
|
|
17
17
|
"svg",
|
|
18
18
|
{
|
|
@@ -86,13 +86,13 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
|
|
|
86
86
|
id: o,
|
|
87
87
|
label: e,
|
|
88
88
|
labelExtra: F,
|
|
89
|
-
onChange:
|
|
89
|
+
onChange: m,
|
|
90
90
|
errorMessage: d,
|
|
91
91
|
successMessage: l,
|
|
92
92
|
required: f,
|
|
93
93
|
isRequiredConditional: _ = !1,
|
|
94
94
|
bg: N,
|
|
95
|
-
tags:
|
|
95
|
+
tags: $,
|
|
96
96
|
color: C,
|
|
97
97
|
className: H,
|
|
98
98
|
isPasswordField: O,
|
|
@@ -118,14 +118,14 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
|
|
|
118
118
|
riskDetails: n,
|
|
119
119
|
isRiskAnalysisOpen: I = !1,
|
|
120
120
|
RiskDetailsCard: L,
|
|
121
|
-
onAddGTNToDocument:
|
|
121
|
+
onAddGTNToDocument: x,
|
|
122
122
|
sourceMeta: G = [],
|
|
123
|
-
inputEmphasis:
|
|
123
|
+
inputEmphasis: g = "default",
|
|
124
124
|
onConfidenceScoreClick: T,
|
|
125
125
|
...u
|
|
126
126
|
}, rr) => {
|
|
127
|
-
const { t: er } = sr(), b = !!(I && n?.color), or =
|
|
128
|
-
|
|
127
|
+
const { t: er } = sr(), b = !!(I && n?.color), or = g === "modified" && !d && !l && !b, tr = g === "deleted" && !d && !l && !b, ar = g === "success" && !d && !l && !b, [v, ir] = W(!1), [p, y] = W(!1), dr = (t) => {
|
|
128
|
+
x && x({
|
|
129
129
|
key: X,
|
|
130
130
|
value: t
|
|
131
131
|
});
|
|
@@ -135,12 +135,12 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
|
|
|
135
135
|
{
|
|
136
136
|
className: i(
|
|
137
137
|
"flex gap-0.5 relative",
|
|
138
|
-
|
|
138
|
+
p && h ? "border rounded-lg border-primary-100 bg-primary-50 p-1 focus:ring-primary-500 focus:border-primary-500 dark:focus:ring-neutral-50 dark:focus:border-neutral-50" : ""
|
|
139
139
|
),
|
|
140
140
|
onMouseEnter: () => y(!0),
|
|
141
141
|
onMouseLeave: () => y(!1),
|
|
142
142
|
children: [
|
|
143
|
-
h && !
|
|
143
|
+
h && !p ? /* @__PURE__ */ r("div", { className: "w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5" }) : null,
|
|
144
144
|
/* @__PURE__ */ a("div", { className: i("flex flex-col w-full", H), children: [
|
|
145
145
|
/* @__PURE__ */ r("style", { children: `
|
|
146
146
|
.dark input:-webkit-autofill,
|
|
@@ -167,23 +167,24 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
|
|
|
167
167
|
className: `mb-1 text-xs font-medium text-gray-600 inline-flex items-center gap-1 ${J ? "" : "capitalize"} ${Z || "!uppercse"}`,
|
|
168
168
|
children: /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center justify-between w-full", children: [
|
|
169
169
|
/* @__PURE__ */ a("div", { className: "inline-flex flex-wrap items-center gap-1", children: [
|
|
170
|
-
(e || f || _) && /* @__PURE__ */ r(
|
|
170
|
+
(e || f || _) && /* @__PURE__ */ r(hr, { label: e ?? "", required: f || !1, isRequiredConditional: _ || !1 }),
|
|
171
171
|
c?.length > 0 && c !== u.value && /* @__PURE__ */ r(w, { placement: "top", title: c, children: /* @__PURE__ */ r(
|
|
172
172
|
"button",
|
|
173
173
|
{
|
|
174
174
|
className: "cursor-pointer",
|
|
175
|
-
onClick: () =>
|
|
175
|
+
onClick: () => m(c),
|
|
176
176
|
type: "button",
|
|
177
177
|
children: /* @__PURE__ */ r(
|
|
178
178
|
Nr,
|
|
179
179
|
{
|
|
180
|
-
|
|
180
|
+
size: 16,
|
|
181
|
+
className: "cursor-pointer pb-0.5 text-primary-600"
|
|
181
182
|
}
|
|
182
183
|
)
|
|
183
184
|
}
|
|
184
185
|
) }),
|
|
185
186
|
M && /* @__PURE__ */ r(
|
|
186
|
-
|
|
187
|
+
br,
|
|
187
188
|
{
|
|
188
189
|
sx: {
|
|
189
190
|
fontSize: 16,
|
|
@@ -192,14 +193,14 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
|
|
|
192
193
|
}
|
|
193
194
|
}
|
|
194
195
|
),
|
|
195
|
-
Q &&
|
|
196
|
-
/* @__PURE__ */ r(
|
|
197
|
-
E && /* @__PURE__ */ r(w, { placement: "top", title: E, children: /* @__PURE__ */ r("div", { className: "cursor-pointer", children: /* @__PURE__ */ r(
|
|
196
|
+
Q && !D(k) && /* @__PURE__ */ r(mr, {}),
|
|
197
|
+
/* @__PURE__ */ r(ur, { labels: $ }),
|
|
198
|
+
E && /* @__PURE__ */ r(w, { placement: "top", title: E, children: /* @__PURE__ */ r("div", { className: "cursor-pointer", children: /* @__PURE__ */ r(cr, {}) }) }),
|
|
198
199
|
F
|
|
199
200
|
] }),
|
|
200
201
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-1", children: [
|
|
201
|
-
|
|
202
|
-
|
|
202
|
+
D(k) && s ? /* @__PURE__ */ r(
|
|
203
|
+
kr,
|
|
203
204
|
{
|
|
204
205
|
placement: "top-end",
|
|
205
206
|
title: U || "",
|
|
@@ -208,17 +209,17 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
|
|
|
208
209
|
"div",
|
|
209
210
|
{
|
|
210
211
|
className: i(
|
|
211
|
-
"inline-flex min-w-
|
|
212
|
-
|
|
212
|
+
"inline-flex min-w-[50px] items-center gap-1 rounded-md px-1 py-0.5",
|
|
213
|
+
yr(s)
|
|
213
214
|
),
|
|
214
215
|
onClick: () => T?.(G),
|
|
215
216
|
children: [
|
|
216
217
|
/* @__PURE__ */ r(
|
|
217
|
-
|
|
218
|
+
fr,
|
|
218
219
|
{
|
|
219
220
|
size: 12,
|
|
220
221
|
fill: gr(s),
|
|
221
|
-
fillSecondary:
|
|
222
|
+
fillSecondary: xr(s)
|
|
222
223
|
}
|
|
223
224
|
),
|
|
224
225
|
/* @__PURE__ */ a(
|
|
@@ -226,7 +227,7 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
|
|
|
226
227
|
{
|
|
227
228
|
className: i(
|
|
228
229
|
"text-xs font-medium leading-4",
|
|
229
|
-
|
|
230
|
+
vr(s)
|
|
230
231
|
),
|
|
231
232
|
children: [
|
|
232
233
|
k,
|
|
@@ -239,7 +240,7 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
|
|
|
239
240
|
)
|
|
240
241
|
}
|
|
241
242
|
) : null,
|
|
242
|
-
h &&
|
|
243
|
+
h && p && x ? /* @__PURE__ */ r(
|
|
243
244
|
"button",
|
|
244
245
|
{
|
|
245
246
|
id: `btn-base-input-field-add-to-document-${o}`,
|
|
@@ -247,7 +248,7 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
|
|
|
247
248
|
onClick: () => dr(u?.value),
|
|
248
249
|
type: "button",
|
|
249
250
|
children: /* @__PURE__ */ r(w, { placement: "top", title: er("Add to document"), children: /* @__PURE__ */ r(
|
|
250
|
-
|
|
251
|
+
pr,
|
|
251
252
|
{
|
|
252
253
|
className: "text-primary-600",
|
|
253
254
|
sx: {
|
|
@@ -275,7 +276,7 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
|
|
|
275
276
|
...Y
|
|
276
277
|
},
|
|
277
278
|
className: i(
|
|
278
|
-
"border border-solid h-
|
|
279
|
+
"border border-solid h-[32px] text-neutral-900 dark:text-black-100 block w-full px-3 py-1.5 font-medium disabled:opacity-70 focus:outline-none focus:ring-0 dark:disabled:placeholder:!text-black-400",
|
|
279
280
|
B || "text-sm",
|
|
280
281
|
C || "text-neutral-900 dark:text-black-100",
|
|
281
282
|
N && N,
|
|
@@ -290,7 +291,7 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
|
|
|
290
291
|
) : tr ? "rounded-lg border border-solid border-[var(--Error-200,#FECACA)] bg-[var(--Error-50,#FEF2F2)] !text-[#475467] focus:border-[var(--Error-200,#FECACA)] focus:shadow-[0_0_0_2px_rgba(254_202_202_/_0.45)] dark:border-[var(--Error-200,#FECACA)] dark:bg-[var(--Error-50,#FEF2F2)] dark:!text-[#475467] disabled:!opacity-100 disabled:!bg-[var(--Error-50,#FEF2F2)] dark:disabled:!bg-[var(--Error-50,#FEF2F2)]" : or ? "rounded-lg border border-solid border-[var(--Warning-200,#FEDF89)] bg-[var(--Warning-50,#FFFAEB)] text-neutral-900 dark:text-black-100 focus:border-[var(--Warning-200,#FEDF89)] focus:shadow-[0_0_0_2px_rgba(254_223_137_/_0.45)] dark:border-[var(--Warning-200,#FEDF89)] dark:bg-[var(--Warning-50,#FFFAEB)] disabled:!opacity-100 disabled:!bg-[var(--Warning-50,#FFFAEB)] dark:disabled:!bg-[var(--Warning-50,#FFFAEB)]" : ar ? "rounded-lg border border-solid border-[var(--Success-200,#BBF7D0)] bg-[var(--Success-50,#F0FDF4)] !text-[#101828] focus:border-[var(--Success-200,#BBF7D0)] focus:shadow-[0_0_0_2px_rgba(187_247_208_/_0.45)] dark:border-[var(--Success-200,#BBF7D0)] dark:bg-[var(--Success-50,#F0FDF4)] dark:!text-[#101828] disabled:!opacity-100 disabled:!bg-[var(--Success-50,#F0FDF4)] dark:disabled:!bg-[var(--Success-50,#F0FDF4)] disabled:!text-[#101828] dark:disabled:!text-[#101828]" : "rounded-md border-neutral-200 bg-white hover:border-primary-500 dark:border-black-600 dark:bg-black-600 dark:hover:border-primary-400 focus:border-primary-600 dark:focus:border-primary-400 focus:shadow-[0_0_0_1.5px_var(--color-primary-100)] dark:focus:shadow-[0_0_0_1.5px_var(--color-primary-950)] disabled:!bg-neutral-50 dark:disabled:!bg-black-800"
|
|
291
292
|
),
|
|
292
293
|
onChange: (t) => {
|
|
293
|
-
|
|
294
|
+
m(t.target.value);
|
|
294
295
|
},
|
|
295
296
|
onClick: (t) => t.stopPropagation(),
|
|
296
297
|
autoComplete: "off",
|
|
@@ -305,7 +306,7 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
|
|
|
305
306
|
ir(!v), K?.(!v);
|
|
306
307
|
},
|
|
307
308
|
type: "button",
|
|
308
|
-
children: v ? /* @__PURE__ */ r(wr, { className: "text-gray-400
|
|
309
|
+
children: v ? /* @__PURE__ */ r(wr, { className: "text-gray-400", size: 16 }) : /* @__PURE__ */ r(Fr, { className: "text-gray-400", size: 16 })
|
|
309
310
|
}
|
|
310
311
|
) : V && u.value ? /* @__PURE__ */ r(
|
|
311
312
|
"button",
|
|
@@ -313,13 +314,14 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
|
|
|
313
314
|
id: `btn-input-field-clear-${o}`,
|
|
314
315
|
className: "absolute inset-y-0 flex items-center cursor-pointer right-2 focus:outline-none",
|
|
315
316
|
onClick: (t) => {
|
|
316
|
-
t.stopPropagation(),
|
|
317
|
+
t.stopPropagation(), m("");
|
|
317
318
|
},
|
|
318
319
|
type: "button",
|
|
319
320
|
children: /* @__PURE__ */ r(
|
|
320
321
|
_r,
|
|
321
322
|
{
|
|
322
|
-
className: "text-neutral-200 dark:text-black-500
|
|
323
|
+
className: "text-neutral-200 dark:text-black-500",
|
|
324
|
+
size: 16
|
|
323
325
|
}
|
|
324
326
|
)
|
|
325
327
|
}
|
|
@@ -333,7 +335,7 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
|
|
|
333
335
|
exit: { opacity: 0, y: -10 },
|
|
334
336
|
transition: { duration: 0.2 },
|
|
335
337
|
children: /* @__PURE__ */ r(
|
|
336
|
-
|
|
338
|
+
z,
|
|
337
339
|
{
|
|
338
340
|
className: "mt-1 text-error-500",
|
|
339
341
|
appearance: "custom",
|
|
@@ -352,7 +354,7 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
|
|
|
352
354
|
exit: { opacity: 0, y: -10 },
|
|
353
355
|
transition: { duration: 0.2 },
|
|
354
356
|
children: /* @__PURE__ */ r(
|
|
355
|
-
|
|
357
|
+
z,
|
|
356
358
|
{
|
|
357
359
|
className: "mt-1 text-success-500 dark:text-success-300",
|
|
358
360
|
appearance: "custom",
|
|
@@ -364,7 +366,7 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
|
|
|
364
366
|
}
|
|
365
367
|
) })
|
|
366
368
|
] }),
|
|
367
|
-
|
|
369
|
+
p && n && I && L && /* @__PURE__ */ r(
|
|
368
370
|
"div",
|
|
369
371
|
{
|
|
370
372
|
role: "tooltip",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInputField.es.js","sources":["../../../../src/components/forms/base-input-field/BaseInputField.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport cn from \"classnames\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport React, { forwardRef, useState } from \"react\";\nimport { useTranslation } from 'react-i18next';\nimport { Tooltip as AntTooltip } from \"antd\";\nimport { Typography } from \"../../data-display/typography/Typography\";\nimport { Label } from \"../../data-display/label/Label\";\nimport type { LabelType } from \"../../data-display/label/Label\";\nimport { NoteAddOutlined, BoltOutlined } from \"@mui/icons-material\";\nimport { AIExtractedIndicator } from \"../../icons/AIExtractedIndicator\";\nimport { AIStarIcon } from \"../../icons/AIStarIcon\";\nimport { InputLabel } from \"../shared/InputLabel\";\nimport Tooltip from \"../../tooltip/Tooltip\";\nimport {\n getConfidenceScoreBadgeClass,\n getConfidenceScoreBadgeColor,\n getConfidenceScoreBadgeFill,\n getConfidenceScoreBadgeTextColor,\n shouldShowConfidenceScore,\n} from \"../../../utils/confidenceScoreUtils\";\nimport { HelpIcon } from \"../../icons/HelpIcon\";\n\n/**\n * Confidence score type\n */\nexport type ConfidenceScoreType = \"low\" | \"medium\" | \"high\";\n\n/**\n * Bounding boxes interface\n */\nexport type SourceMetaBBox = {\n b: number;\n l: number;\n r: number;\n t: number;\n};\n\nexport type SourceMetaItem = {\n bbox: SourceMetaBBox;\n confidence_score?: number;\n is_primary?: boolean;\n match_score?: number;\n match_type?: string;\n page_height: number;\n page_width: number;\n source_page: number;\n source_text?: string;\n};\n\n/**\n * Risk details interface\n */\nexport interface RiskDetails {\n color?: string;\n description?: string;\n hexBgColor?: string;\n hexBorderColor?: string;\n [key: string]: any;\n}\n\n/**\n * Risk details card component props\n */\nexport interface RiskDetailsCardProps {\n riskDetails: RiskDetails;\n maxWidth?: string;\n showAllRisksSuggestions?: boolean;\n}\n\n/**\n * Eye icon for password visibility toggle\n */\nconst EyeIcon = ({ className, size = 16 }: { className?: string; size?: number }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n >\n <path d=\"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\" />\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n </svg>\n);\n\n/**\n * Eye off icon for password visibility toggle\n */\nconst EyeOffIcon = ({ className, size = 16 }: { className?: string; size?: number }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n >\n <path d=\"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24\" />\n <line x1=\"1\" y1=\"1\" x2=\"23\" y2=\"23\" />\n </svg>\n);\n\n/**\n * Close icon for clearable input\n */\nconst CloseIcon = ({ className, size = 16 }: { className?: string; size?: number }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n);\n\n/**\n * Revert icon for revert back value\n */\nconst RevertIcon = ({ className, size = 16 }: { className?: string; size?: number }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n >\n <path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\" />\n <path d=\"M3 3v5h5\" />\n </svg>\n);\n\n/** Visual emphasis for the input surface (background + border) */\nexport type BaseInputFieldEmphasis = \"default\" | \"modified\" | \"deleted\" | \"success\";\n\n/**\n * Props for the BaseInputField component\n */\nexport type TBaseInputFieldProps = any & {\n /** Current value of the input */\n value: string;\n /** Callback function called when the input value changes */\n onChange(data: any): void;\n /** Callback function for key down events */\n onKeyDown?: void;\n /** Error message to display */\n errorMessage: string;\n /** Default value for the input */\n defaultValue?: string;\n /** Whether the input is disabled */\n disabled?: boolean;\n /** Maximum value for number inputs */\n max?: number;\n /** Minimum value for number inputs */\n min?: number;\n /** Whether the field is required */\n required?: boolean;\n /** Whether the required indicator shows as conditional */\n isRequiredConditional?: boolean;\n /** Background color class */\n bg?: string;\n /** Tags to display with the label */\n tags?: (string | LabelType)[];\n /** Text color class */\n color?: string;\n /** Unique identifier for the input */\n id: string;\n /** Label text for the input */\n label?: string;\n /** Optional extra content in the label row (e.g. actions, badges) */\n labelExtra?: React.ReactNode;\n /** Input type (text, email, password, number, etc.) */\n type?: string;\n /** Value to revert back to */\n revertBackValue?: any;\n /** Placeholder text */\n placeholder?: string;\n /** Whether this is a password field with visibility toggle */\n isPasswordField?: boolean;\n /** Callback to set password visibility */\n setIsPasswordVisible?: any;\n /** Tooltip text */\n tooltip?: string;\n /** Whether to preserve original case in the label */\n originalCase?: boolean;\n /** Icon or element to display at the end of the input */\n suffixIcon?: React.ReactNode;\n /** Text size class */\n textSize?: string;\n /** Whether the value was AI extracted */\n isAiExtracted?: boolean;\n /** Whether this is a GTN field */\n isGTN?: boolean;\n /** Confidence score shown as a compact badge */\n confidenceScore?: number;\n /** Confidence classification for badge styling */\n confidenceType?: ConfidenceScoreType;\n /** Optional tooltip content for confidence score badge */\n confidenceTooltip?: React.ReactNode;\n /** GTN name for document integration */\n gtnName?: any;\n /** Success message to display */\n successMessage?: string;\n /** Additional CSS classes for the input element */\n inputClassName?: string;\n /** Inline styles for the input element */\n inputStyle?: React.CSSProperties;\n /** Additional CSS classes for the label */\n labelClassName?: string;\n /** Whether this is a live field */\n isLiveField?: boolean;\n /** Callback function for blur events */\n onBlur?: () => void;\n /** Whether the input is clearable */\n isClearable?: boolean;\n /** Additional CSS classes for the wrapper */\n className?: string;\n /** Ref for the input element */\n inputRef?: React.RefObject<HTMLInputElement>;\n /** Risk details data */\n riskDetails?: RiskDetails;\n /** Whether risk analysis is open */\n isRiskAnalysisOpen?: boolean;\n /** Custom risk details card component */\n RiskDetailsCard?: React.ComponentType<RiskDetailsCardProps>;\n /** Bounding box for confidence score */\n sourceMeta?: SourceMetaItem[];\n /** Handler for adding GTN to document */\n onAddGTNToDocument?: (keyValuePair: { key: string; value: string }) => void;\n /** Callback function for confidence score click */\n onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;\n /** Input surface style: `'modified'` — `--Warning-50` / `--Warning-200`; `'deleted'` — `--Error-50` / `--Error-200`, text `#475467`; `'success'` — `--Success-50` / `--Success-200`, text `#101828`. */\n inputEmphasis?: BaseInputFieldEmphasis;\n};\n\n/**\n * A feature-rich input field component with label, validation, GTN integration,\n * risk analysis support, and comprehensive styling options.\n *\n * @example\n * ```tsx\n * <BaseInputField\n * id=\"email\"\n * label=\"Email Address\"\n * type=\"email\"\n * value={email}\n * onChange={setEmail}\n * placeholder=\"Enter your email\"\n * required\n * errorMessage={emailError}\n * />\n * ```\n */\nexport const BaseInputField = forwardRef<HTMLInputElement, TBaseInputFieldProps>(\n (\n {\n id,\n label,\n labelExtra,\n onChange,\n errorMessage,\n successMessage,\n required,\n isRequiredConditional = false,\n bg,\n tags,\n color,\n className,\n isPasswordField,\n setIsPasswordVisible,\n inputRef,\n tooltip,\n suffixIcon,\n revertBackValue,\n originalCase = false,\n textSize,\n isAiExtracted = false,\n isGTN = false,\n confidenceScore,\n confidenceType = \"high\",\n confidenceTooltip,\n gtnName = null,\n inputClassName = \"\",\n inputStyle = {},\n labelClassName,\n onBlur,\n isLiveField = false,\n isClearable = false,\n riskDetails,\n isRiskAnalysisOpen = false,\n RiskDetailsCard,\n onAddGTNToDocument,\n sourceMeta = [],\n inputEmphasis = \"default\",\n onConfidenceScoreClick,\n ...props\n },\n ref\n ) => {\n const { t } = useTranslation();\n const showRiskSkin = Boolean(isRiskAnalysisOpen && riskDetails?.color);\n const emphasisModifiedSkin =\n inputEmphasis === \"modified\" &&\n !errorMessage &&\n !successMessage &&\n !showRiskSkin;\n const emphasisDeletedSkin =\n inputEmphasis === \"deleted\" &&\n !errorMessage &&\n !successMessage &&\n !showRiskSkin;\n const emphasisSuccessSkin =\n inputEmphasis === \"success\" &&\n !errorMessage &&\n !successMessage &&\n !showRiskSkin;\n const [showPassword, setShowPassword] = useState(false);\n const [isHovered, setIsHovered] = useState(false);\n const handleAddGTNToDocument = (value: string) => {\n if (onAddGTNToDocument) {\n const keyValuePair = {\n key: gtnName,\n value,\n };\n onAddGTNToDocument(keyValuePair);\n }\n };\n\n return (\n <div\n className={cn(\n \"flex gap-0.5 relative\",\n isHovered && isGTN\n ? \"border rounded-lg border-primary-100 bg-primary-50 p-1 focus:ring-primary-500 focus:border-primary-500 dark:focus:ring-neutral-50 dark:focus:border-neutral-50\"\n : \"\"\n )}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n >\n {isGTN && !isHovered ? (\n <div className=\"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5\" />\n ) : null}\n <div className={cn(\"flex flex-col w-full\", className)}>\n <style>\n {`\n .dark input:-webkit-autofill,\n .dark input:-webkit-autofill:hover,\n .dark input:-webkit-autofill:focus {\n -webkit-text-fill-color: white !important;\n -webkit-box-shadow: 0 0 0px 1000px var(--input-bg-color) inset !important;\n transition: background-color 5000s ease-in-out 0s;\n }\n \n input:-webkit-autofill,\n input:-webkit-autofill:hover,\n input:-webkit-autofill:focus {\n -webkit-text-fill-color: #111827 !important;\n -webkit-box-shadow: 0 0 0px 1000px white inset !important;\n transition: background-color 5000s ease-in-out 0s;\n }\n `}\n </style>\n {(label || labelExtra) && (\n <label\n id={id}\n htmlFor=\"text\"\n className={`mb-1 text-xs font-medium text-gray-600 inline-flex items-center gap-1 ${!originalCase ? \"capitalize\" : \"\"\n } ${labelClassName || \"!uppercse\"}`}\n >\n <div className=\"flex flex-wrap items-center justify-between w-full\">\n <div className=\"inline-flex flex-wrap items-center gap-1\">\n {(label || required || isRequiredConditional) && (\n <InputLabel label={label ?? \"\"} required={required || false} isRequiredConditional={isRequiredConditional || false} />\n )}\n {revertBackValue?.length > 0 &&\n revertBackValue !== props.value && (\n <AntTooltip placement=\"top\" title={revertBackValue}>\n <button\n className=\"cursor-pointer\"\n onClick={() => onChange(revertBackValue)}\n type=\"button\"\n >\n <RevertIcon\n className=\"cursor-pointer pb-0.5 text-primary-600 w-4 h-4\"\n />\n </button>\n </AntTooltip>\n )}\n {isLiveField && (\n <BoltOutlined\n sx={{\n fontSize: 16,\n color: \"var(--color-primary-600)\",\n rotate: \"15deg\",\n }}\n />\n )}\n {isAiExtracted && !shouldShowConfidenceScore(confidenceScore) && <AIExtractedIndicator />}\n <Label labels={tags} />\n {tooltip && (\n <AntTooltip placement=\"top\" title={tooltip}>\n <div className=\"cursor-pointer\">\n <HelpIcon className=\"w-icon-sm h-icon-sm\" />\n </div>\n </AntTooltip>\n )}\n {labelExtra}\n </div>\n <div className=\"flex items-center gap-1\">\n {(shouldShowConfidenceScore(confidenceScore) && confidenceType) ? (\n <Tooltip\n placement=\"top-end\"\n title={confidenceTooltip || \"\"}\n className=\"cursor-pointer\"\n >\n <div\n className={cn(\n \"inline-flex min-w-12 items-center gap-1 rounded-md px-1 py-0.5\",\n getConfidenceScoreBadgeClass(confidenceType)\n )}\n onClick={() => onConfidenceScoreClick?.(sourceMeta)}\n >\n <AIStarIcon\n size={12}\n fill={getConfidenceScoreBadgeColor(confidenceType)}\n fillSecondary={getConfidenceScoreBadgeFill(confidenceType)}\n />\n <span\n className={cn(\n \"text-xs font-medium leading-4\",\n getConfidenceScoreBadgeTextColor(confidenceType)\n )}\n >\n {confidenceScore}%\n </span>\n </div>\n </Tooltip>\n ) : null}\n\n {isGTN && isHovered && onAddGTNToDocument ? (\n <button\n id={`btn-base-input-field-add-to-document-${id}`}\n className=\"cursor-pointer\"\n onClick={() => handleAddGTNToDocument(props?.value)}\n type=\"button\"\n >\n <AntTooltip placement=\"top\" title={t(\"Add to document\")}>\n <NoteAddOutlined\n className=\"text-primary-600\"\n sx={{\n fontSize: 16,\n }}\n />\n </AntTooltip>\n </button>\n ) : null}\n </div>\n </div>\n </label>\n )}\n <label className=\"relative block\">\n <div className=\"relative\">\n <input\n {...props}\n ref={inputRef || ref}\n id={id || label}\n key={id}\n required={required}\n style={\n {\n \"--input-bg-color\":\n \"var(--tw-bg-opacity, 1) rgb(var(--bg-color))\",\n ...inputStyle,\n } as React.CSSProperties\n }\n className={cn(\n \"border border-solid h-8 text-neutral-900 dark:text-black-100 block w-full px-3 py-1.5 font-medium disabled:opacity-70 focus:outline-none focus:ring-0 dark:disabled:placeholder:!text-black-400\",\n textSize ? textSize : \"text-sm\",\n color ? color : \"text-neutral-900 dark:text-black-100\",\n bg && bg,\n inputClassName ? inputClassName : \"\",\n errorMessage\n ? cn(\n \"rounded-md border-red-300 dark:border-red-500 bg-white hover:border-red-400 dark:bg-black-600 dark:hover:border-red-400 focus:border-red-600 focus:shadow-[0_0_0_1.5px_rgba(239,68,68,0.22)] dark:focus:border-red-500 dark:focus:shadow-[0_0_0_1.5px_rgba(248,113,113,0.25)]\",\n )\n : successMessage\n ? cn(\n \"rounded-md border-green-300 bg-white hover:border-green-400 dark:border-green-600 dark:bg-black-600 dark:hover:border-green-500 focus:border-green-600 focus:shadow-[0_0_0_1.5px_rgba(34,197,94,0.22)] dark:focus:border-green-500\",\n )\n : showRiskSkin && riskDetails?.color\n ? cn(\n \"rounded-md hover:border-primary-500 dark:hover:border-primary-400 focus:border-primary-600 dark:focus:border-primary-400 focus:shadow-[0_0_0_1.5px_var(--color-primary-100)] dark:focus:shadow-[0_0_0_1.5px_var(--color-primary-950)]\",\n `bg-${riskDetails.color}-50 border-${riskDetails.color}-300`,\n )\n : emphasisDeletedSkin\n ? \"rounded-lg border border-solid border-[var(--Error-200,#FECACA)] bg-[var(--Error-50,#FEF2F2)] !text-[#475467] focus:border-[var(--Error-200,#FECACA)] focus:shadow-[0_0_0_2px_rgba(254_202_202_/_0.45)] dark:border-[var(--Error-200,#FECACA)] dark:bg-[var(--Error-50,#FEF2F2)] dark:!text-[#475467] disabled:!opacity-100 disabled:!bg-[var(--Error-50,#FEF2F2)] dark:disabled:!bg-[var(--Error-50,#FEF2F2)]\"\n : emphasisModifiedSkin\n ? \"rounded-lg border border-solid border-[var(--Warning-200,#FEDF89)] bg-[var(--Warning-50,#FFFAEB)] text-neutral-900 dark:text-black-100 focus:border-[var(--Warning-200,#FEDF89)] focus:shadow-[0_0_0_2px_rgba(254_223_137_/_0.45)] dark:border-[var(--Warning-200,#FEDF89)] dark:bg-[var(--Warning-50,#FFFAEB)] disabled:!opacity-100 disabled:!bg-[var(--Warning-50,#FFFAEB)] dark:disabled:!bg-[var(--Warning-50,#FFFAEB)]\"\n : emphasisSuccessSkin\n ? \"rounded-lg border border-solid border-[var(--Success-200,#BBF7D0)] bg-[var(--Success-50,#F0FDF4)] !text-[#101828] focus:border-[var(--Success-200,#BBF7D0)] focus:shadow-[0_0_0_2px_rgba(187_247_208_/_0.45)] dark:border-[var(--Success-200,#BBF7D0)] dark:bg-[var(--Success-50,#F0FDF4)] dark:!text-[#101828] disabled:!opacity-100 disabled:!bg-[var(--Success-50,#F0FDF4)] dark:disabled:!bg-[var(--Success-50,#F0FDF4)] disabled:!text-[#101828] dark:disabled:!text-[#101828]\"\n : \"rounded-md border-neutral-200 bg-white hover:border-primary-500 dark:border-black-600 dark:bg-black-600 dark:hover:border-primary-400 focus:border-primary-600 dark:focus:border-primary-400 focus:shadow-[0_0_0_1.5px_var(--color-primary-100)] dark:focus:shadow-[0_0_0_1.5px_var(--color-primary-950)] disabled:!bg-neutral-50 dark:disabled:!bg-black-800\"\n )}\n onChange={(e) => {\n onChange(e.target.value);\n }}\n onClick={(e) => e.stopPropagation()}\n autoComplete=\"off\"\n onBlur={onBlur}\n />\n {isPasswordField ? (\n <button\n className=\"absolute inset-y-0 flex items-center cursor-pointer right-2\"\n onClick={() => {\n setShowPassword(!showPassword);\n setIsPasswordVisible?.(!showPassword);\n }}\n type=\"button\"\n >\n {showPassword ? (\n <EyeIcon className=\"text-gray-400 w-4 h-4\" />\n ) : (\n <EyeOffIcon className=\"text-gray-400 w-4 h-4\" />\n )}\n </button>\n ) : isClearable && props.value ? (\n <button\n id={`btn-input-field-clear-${id}`}\n className=\"absolute inset-y-0 flex items-center cursor-pointer right-2 focus:outline-none\"\n onClick={(e) => {\n e.stopPropagation();\n onChange(\"\");\n }}\n type=\"button\"\n >\n <CloseIcon\n className=\"text-neutral-200 dark:text-black-500 w-4 h-4\"\n />\n </button>\n ) : suffixIcon ? (\n <div className=\"absolute inset-y-0 flex items-center right-2\">\n {suffixIcon}\n </div>\n ) : null}\n </div>\n </label>\n <AnimatePresence>\n {errorMessage && (\n <motion.div\n initial={{ opacity: 0, y: -10 }}\n animate={{ opacity: 1, y: 0 }}\n exit={{ opacity: 0, y: -10 }}\n transition={{ duration: 0.2 }}\n >\n <Typography\n className=\"mt-1 text-error-500\"\n appearance=\"custom\"\n size=\"extra-small\"\n variant=\"medium\"\n >\n {errorMessage}\n </Typography>\n </motion.div>\n )}\n </AnimatePresence>\n <AnimatePresence>\n {successMessage && (\n <motion.div\n initial={{ opacity: 0, y: -10 }}\n animate={{ opacity: 1, y: 0 }}\n exit={{ opacity: 0, y: -10 }}\n transition={{ duration: 0.2 }}\n >\n <Typography\n className=\"mt-1 text-success-500 dark:text-success-300\"\n appearance=\"custom\"\n size=\"extra-small\"\n variant=\"medium\"\n >\n {successMessage}\n </Typography>\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n\n {isHovered &&\n riskDetails &&\n isRiskAnalysisOpen &&\n RiskDetailsCard && (\n <div\n role=\"tooltip\"\n tabIndex={0}\n className=\"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl\"\n onClick={(e) => e.stopPropagation()}\n onMouseDown={(e) => e.preventDefault()}\n onKeyDown={(e) => {\n if (e.key === \"Escape\") {\n setIsHovered(false);\n }\n }}\n >\n <RiskDetailsCard riskDetails={riskDetails} />\n </div>\n )}\n </div>\n );\n }\n);\n\nBaseInputField.displayName = \"BaseInputField\";\n\nexport default BaseInputField;\n\n"],"names":["EyeIcon","className","size","jsxs","jsx","EyeOffIcon","CloseIcon","RevertIcon","BaseInputField","forwardRef","id","label","labelExtra","onChange","errorMessage","successMessage","required","isRequiredConditional","bg","tags","color","isPasswordField","setIsPasswordVisible","inputRef","tooltip","suffixIcon","revertBackValue","originalCase","textSize","isAiExtracted","isGTN","confidenceScore","confidenceType","confidenceTooltip","gtnName","inputClassName","inputStyle","labelClassName","onBlur","isLiveField","isClearable","riskDetails","isRiskAnalysisOpen","RiskDetailsCard","onAddGTNToDocument","sourceMeta","inputEmphasis","onConfidenceScoreClick","props","ref","t","useTranslation","showRiskSkin","emphasisModifiedSkin","emphasisDeletedSkin","emphasisSuccessSkin","showPassword","setShowPassword","useState","isHovered","setIsHovered","handleAddGTNToDocument","value","cn","InputLabel","AntTooltip","BoltOutlined","shouldShowConfidenceScore","AIExtractedIndicator","Label","HelpIcon","Tooltip","getConfidenceScoreBadgeClass","AIStarIcon","getConfidenceScoreBadgeColor","getConfidenceScoreBadgeFill","getConfidenceScoreBadgeTextColor","NoteAddOutlined","createElement","e","AnimatePresence","motion","Typography"],"mappings":";;;;;;;;;;;;;;;AAyEA,MAAMA,KAAU,CAAC,EAAE,WAAAC,GAAW,MAAAC,IAAO,SACnC,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAOD;AAAA,IACP,QAAQA;AAAA,IACR,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,QAAO;AAAA,IACP,aAAY;AAAA,IACZ,eAAc;AAAA,IACd,gBAAe;AA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UAAAnE;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACH;AAAA,YAAA,EACF,CAEJ;AAAA,UAAA,GACF;AAAA,UAEC4C,KACClB,KACAC,KACAC,KACE,gBAAAvC;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,UAAU;AAAA,cACV,WAAU;AAAA,cACV,SAAS,CAAC2E,MAAMA,EAAE,gBAAA;AAAA,cAClB,aAAa,CAACA,MAAMA,EAAE,eAAA;AAAA,cACtB,WAAW,CAACA,MAAM;AAChB,gBAAIA,EAAE,QAAQ,YACZnB,EAAa,EAAK;AAAA,cAEtB;AAAA,cAEA,UAAA,gBAAAxD,EAACuC,KAAgB,aAAAF,EAAA,CAA0B;AAAA,YAAA;AAAA,UAAA;AAAA,QAC7C;AAAA,MAAA;AAAA,IAAA;AAAA,EAIV;AACF;AAEAjC,GAAe,cAAc;"}
|
|
1
|
+
{"version":3,"file":"BaseInputField.es.js","sources":["../../../../src/components/forms/base-input-field/BaseInputField.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport cn from \"classnames\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport React, { forwardRef, useState } from \"react\";\nimport { useTranslation } from 'react-i18next';\nimport { Tooltip as AntTooltip } from \"antd\";\nimport { Typography } from \"../../data-display/typography/Typography\";\nimport { HelpIcon } from \"../../icons/HelpIcon\";\nimport { Label } from \"../../data-display/label/Label\";\nimport type { LabelType } from \"../../data-display/label/Label\";\nimport { NoteAddOutlined, BoltOutlined } from \"@mui/icons-material\";\nimport { AIExtractedIndicator } from \"../../icons/AIExtractedIndicator\";\nimport { AIStarIcon } from \"../../icons/AIStarIcon\";\nimport { InputLabel } from \"../shared/InputLabel\";\nimport Tooltip from \"../../tooltip/Tooltip\";\nimport {\n getConfidenceScoreBadgeClass,\n getConfidenceScoreBadgeColor,\n getConfidenceScoreBadgeFill,\n getConfidenceScoreBadgeTextColor,\n shouldShowConfidenceScore,\n} from \"../../../utils/confidenceScoreUtils\";\n\n/**\n * Confidence score type\n */\nexport type ConfidenceScoreType = \"low\" | \"medium\" | \"high\";\n\n/**\n * Bounding boxes interface\n */\nexport type SourceMetaBBox = {\n b: number;\n l: number;\n r: number;\n t: number;\n};\n\nexport type SourceMetaItem = {\n bbox: SourceMetaBBox;\n confidence_score?: number;\n is_primary?: boolean;\n match_score?: number;\n match_type?: string;\n page_height: number;\n page_width: number;\n source_page: number;\n source_text?: string;\n};\n\n/**\n * Risk details interface\n */\nexport interface RiskDetails {\n color?: string;\n description?: string;\n hexBgColor?: string;\n hexBorderColor?: string;\n [key: string]: any;\n}\n\n/**\n * Risk details card component props\n */\nexport interface RiskDetailsCardProps {\n riskDetails: RiskDetails;\n maxWidth?: string;\n showAllRisksSuggestions?: boolean;\n}\n\n/**\n * Eye icon for password visibility toggle\n */\nconst EyeIcon = ({ className, size = 16 }: { className?: string; size?: number }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n >\n <path d=\"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\" />\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n </svg>\n);\n\n/**\n * Eye off icon for password visibility toggle\n */\nconst EyeOffIcon = ({ className, size = 16 }: { className?: string; size?: number }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n >\n <path d=\"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24\" />\n <line x1=\"1\" y1=\"1\" x2=\"23\" y2=\"23\" />\n </svg>\n);\n\n/**\n * Close icon for clearable input\n */\nconst CloseIcon = ({ className, size = 16 }: { className?: string; size?: number }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n);\n\n/**\n * Revert icon for revert back value\n */\nconst RevertIcon = ({ className, size = 16 }: { className?: string; size?: number }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n >\n <path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\" />\n <path d=\"M3 3v5h5\" />\n </svg>\n);\n\n/** Visual emphasis for the input surface (background + border) */\nexport type BaseInputFieldEmphasis = \"default\" | \"modified\" | \"deleted\" | \"success\";\n\n/**\n * Props for the BaseInputField component\n */\nexport type TBaseInputFieldProps = any & {\n /** Current value of the input */\n value: string;\n /** Callback function called when the input value changes */\n onChange(data: any): void;\n /** Callback function for key down events */\n onKeyDown?: void;\n /** Error message to display */\n errorMessage: string;\n /** Default value for the input */\n defaultValue?: string;\n /** Whether the input is disabled */\n disabled?: boolean;\n /** Maximum value for number inputs */\n max?: number;\n /** Minimum value for number inputs */\n min?: number;\n /** Whether the field is required */\n required?: boolean;\n /** Whether the required indicator shows as conditional */\n isRequiredConditional?: boolean;\n /** Background color class */\n bg?: string;\n /** Tags to display with the label */\n tags?: (string | LabelType)[];\n /** Text color class */\n color?: string;\n /** Unique identifier for the input */\n id: string;\n /** Label text for the input */\n label?: string;\n /** Optional extra content in the label row (e.g. actions, badges) */\n labelExtra?: React.ReactNode;\n /** Input type (text, email, password, number, etc.) */\n type?: string;\n /** Value to revert back to */\n revertBackValue?: any;\n /** Placeholder text */\n placeholder?: string;\n /** Whether this is a password field with visibility toggle */\n isPasswordField?: boolean;\n /** Callback to set password visibility */\n setIsPasswordVisible?: any;\n /** Tooltip text */\n tooltip?: string;\n /** Whether to preserve original case in the label */\n originalCase?: boolean;\n /** Icon or element to display at the end of the input */\n suffixIcon?: React.ReactNode;\n /** Text size class */\n textSize?: string;\n /** Whether the value was AI extracted */\n isAiExtracted?: boolean;\n /** Whether this is a GTN field */\n isGTN?: boolean;\n /** Confidence score shown as a compact badge */\n confidenceScore?: number;\n /** Confidence classification for badge styling */\n confidenceType?: ConfidenceScoreType;\n /** Optional tooltip content for confidence score badge */\n confidenceTooltip?: React.ReactNode;\n /** GTN name for document integration */\n gtnName?: any;\n /** Success message to display */\n successMessage?: string;\n /** Additional CSS classes for the input element */\n inputClassName?: string;\n /** Inline styles for the input element */\n inputStyle?: React.CSSProperties;\n /** Additional CSS classes for the label */\n labelClassName?: string;\n /** Whether this is a live field */\n isLiveField?: boolean;\n /** Callback function for blur events */\n onBlur?: () => void;\n /** Whether the input is clearable */\n isClearable?: boolean;\n /** Additional CSS classes for the wrapper */\n className?: string;\n /** Ref for the input element */\n inputRef?: React.RefObject<HTMLInputElement>;\n /** Risk details data */\n riskDetails?: RiskDetails;\n /** Whether risk analysis is open */\n isRiskAnalysisOpen?: boolean;\n /** Custom risk details card component */\n RiskDetailsCard?: React.ComponentType<RiskDetailsCardProps>;\n /** Bounding box for confidence score */\n sourceMeta?: SourceMetaItem[];\n /** Handler for adding GTN to document */\n onAddGTNToDocument?: (keyValuePair: { key: string; value: string }) => void;\n /** Callback function for confidence score click */\n onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;\n /** Input surface style: `'modified'` — `--Warning-50` / `--Warning-200`; `'deleted'` — `--Error-50` / `--Error-200`, text `#475467`; `'success'` — `--Success-50` / `--Success-200`, text `#101828`. */\n inputEmphasis?: BaseInputFieldEmphasis;\n};\n\n/**\n * A feature-rich input field component with label, validation, GTN integration,\n * risk analysis support, and comprehensive styling options.\n *\n * @example\n * ```tsx\n * <BaseInputField\n * id=\"email\"\n * label=\"Email Address\"\n * type=\"email\"\n * value={email}\n * onChange={setEmail}\n * placeholder=\"Enter your email\"\n * required\n * errorMessage={emailError}\n * />\n * ```\n */\nexport const BaseInputField = forwardRef<HTMLInputElement, TBaseInputFieldProps>(\n (\n {\n id,\n label,\n labelExtra,\n onChange,\n errorMessage,\n successMessage,\n required,\n isRequiredConditional = false,\n bg,\n tags,\n color,\n className,\n isPasswordField,\n setIsPasswordVisible,\n inputRef,\n tooltip,\n suffixIcon,\n revertBackValue,\n originalCase = false,\n textSize,\n isAiExtracted = false,\n isGTN = false,\n confidenceScore,\n confidenceType = \"high\",\n confidenceTooltip,\n gtnName = null,\n inputClassName = \"\",\n inputStyle = {},\n labelClassName,\n onBlur,\n isLiveField = false,\n isClearable = false,\n riskDetails,\n isRiskAnalysisOpen = false,\n RiskDetailsCard,\n onAddGTNToDocument,\n sourceMeta = [],\n inputEmphasis = \"default\",\n onConfidenceScoreClick,\n ...props\n },\n ref\n ) => {\n const { t } = useTranslation();\n const showRiskSkin = Boolean(isRiskAnalysisOpen && riskDetails?.color);\n const emphasisModifiedSkin =\n inputEmphasis === \"modified\" &&\n !errorMessage &&\n !successMessage &&\n !showRiskSkin;\n const emphasisDeletedSkin =\n inputEmphasis === \"deleted\" &&\n !errorMessage &&\n !successMessage &&\n !showRiskSkin;\n const emphasisSuccessSkin =\n inputEmphasis === \"success\" &&\n !errorMessage &&\n !successMessage &&\n !showRiskSkin;\n const [showPassword, setShowPassword] = useState(false);\n const [isHovered, setIsHovered] = useState(false);\n const handleAddGTNToDocument = (value: string) => {\n if (onAddGTNToDocument) {\n const keyValuePair = {\n key: gtnName,\n value,\n };\n onAddGTNToDocument(keyValuePair);\n }\n };\n\n return (\n <div\n className={cn(\n \"flex gap-0.5 relative\",\n isHovered && isGTN\n ? \"border rounded-lg border-primary-100 bg-primary-50 p-1 focus:ring-primary-500 focus:border-primary-500 dark:focus:ring-neutral-50 dark:focus:border-neutral-50\"\n : \"\"\n )}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n >\n {isGTN && !isHovered ? (\n <div className=\"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5\" />\n ) : null}\n <div className={cn(\"flex flex-col w-full\", className)}>\n <style>\n {`\n .dark input:-webkit-autofill,\n .dark input:-webkit-autofill:hover,\n .dark input:-webkit-autofill:focus {\n -webkit-text-fill-color: white !important;\n -webkit-box-shadow: 0 0 0px 1000px var(--input-bg-color) inset !important;\n transition: background-color 5000s ease-in-out 0s;\n }\n \n input:-webkit-autofill,\n input:-webkit-autofill:hover,\n input:-webkit-autofill:focus {\n -webkit-text-fill-color: #111827 !important;\n -webkit-box-shadow: 0 0 0px 1000px white inset !important;\n transition: background-color 5000s ease-in-out 0s;\n }\n `}\n </style>\n {(label || labelExtra) && (\n <label\n id={id}\n htmlFor=\"text\"\n className={`mb-1 text-xs font-medium text-gray-600 inline-flex items-center gap-1 ${!originalCase ? \"capitalize\" : \"\"\n } ${labelClassName || \"!uppercse\"}`}\n >\n <div className=\"flex flex-wrap items-center justify-between w-full\">\n <div className=\"inline-flex flex-wrap items-center gap-1\">\n {(label || required || isRequiredConditional) && (\n <InputLabel label={label ?? \"\"} required={required || false} isRequiredConditional={isRequiredConditional || false} />\n )}\n {revertBackValue?.length > 0 &&\n revertBackValue !== props.value && (\n <AntTooltip placement=\"top\" title={revertBackValue}>\n <button\n className=\"cursor-pointer\"\n onClick={() => onChange(revertBackValue)}\n type=\"button\"\n >\n <RevertIcon\n size={16}\n className=\"cursor-pointer pb-0.5 text-primary-600\"\n />\n </button>\n </AntTooltip>\n )}\n {isLiveField && (\n <BoltOutlined\n sx={{\n fontSize: 16,\n color: \"var(--color-primary-600)\",\n rotate: \"15deg\",\n }}\n />\n )}\n {isAiExtracted && !shouldShowConfidenceScore(confidenceScore) && <AIExtractedIndicator />}\n <Label labels={tags} />\n {tooltip && (\n <AntTooltip placement=\"top\" title={tooltip}>\n <div className=\"cursor-pointer\">\n <HelpIcon />\n </div>\n </AntTooltip>\n )}\n {labelExtra}\n </div>\n <div className=\"flex items-center gap-1\">\n {(shouldShowConfidenceScore(confidenceScore) && confidenceType) ? (\n <Tooltip\n placement=\"top-end\"\n title={confidenceTooltip || \"\"}\n className=\"cursor-pointer\"\n >\n <div\n className={cn(\n \"inline-flex min-w-[50px] items-center gap-1 rounded-md px-1 py-0.5\",\n getConfidenceScoreBadgeClass(confidenceType)\n )}\n onClick={() => onConfidenceScoreClick?.(sourceMeta)}\n >\n <AIStarIcon\n size={12}\n fill={getConfidenceScoreBadgeColor(confidenceType)}\n fillSecondary={getConfidenceScoreBadgeFill(confidenceType)}\n />\n <span\n className={cn(\n \"text-xs font-medium leading-4\",\n getConfidenceScoreBadgeTextColor(confidenceType)\n )}\n >\n {confidenceScore}%\n </span>\n </div>\n </Tooltip>\n ) : null}\n\n {isGTN && isHovered && onAddGTNToDocument ? (\n <button\n id={`btn-base-input-field-add-to-document-${id}`}\n className=\"cursor-pointer\"\n onClick={() => handleAddGTNToDocument(props?.value)}\n type=\"button\"\n >\n <AntTooltip placement=\"top\" title={t(\"Add to document\")}>\n <NoteAddOutlined\n className=\"text-primary-600\"\n sx={{\n fontSize: 16,\n }}\n />\n </AntTooltip>\n </button>\n ) : null}\n </div>\n </div>\n </label>\n )}\n <label className=\"relative block\">\n <div className=\"relative\">\n <input\n {...props}\n ref={inputRef || ref}\n id={id || label}\n key={id}\n required={required}\n style={\n {\n \"--input-bg-color\":\n \"var(--tw-bg-opacity, 1) rgb(var(--bg-color))\",\n ...inputStyle,\n } as React.CSSProperties\n }\n className={cn(\n \"border border-solid h-[32px] text-neutral-900 dark:text-black-100 block w-full px-3 py-1.5 font-medium disabled:opacity-70 focus:outline-none focus:ring-0 dark:disabled:placeholder:!text-black-400\",\n textSize ? textSize : \"text-sm\",\n color ? color : \"text-neutral-900 dark:text-black-100\",\n bg && bg,\n inputClassName ? inputClassName : \"\",\n errorMessage\n ? cn(\n \"rounded-md border-red-300 dark:border-red-500 bg-white hover:border-red-400 dark:bg-black-600 dark:hover:border-red-400 focus:border-red-600 focus:shadow-[0_0_0_1.5px_rgba(239,68,68,0.22)] dark:focus:border-red-500 dark:focus:shadow-[0_0_0_1.5px_rgba(248,113,113,0.25)]\",\n )\n : successMessage\n ? cn(\n \"rounded-md border-green-300 bg-white hover:border-green-400 dark:border-green-600 dark:bg-black-600 dark:hover:border-green-500 focus:border-green-600 focus:shadow-[0_0_0_1.5px_rgba(34,197,94,0.22)] dark:focus:border-green-500\",\n )\n : showRiskSkin && riskDetails?.color\n ? cn(\n \"rounded-md hover:border-primary-500 dark:hover:border-primary-400 focus:border-primary-600 dark:focus:border-primary-400 focus:shadow-[0_0_0_1.5px_var(--color-primary-100)] dark:focus:shadow-[0_0_0_1.5px_var(--color-primary-950)]\",\n `bg-${riskDetails.color}-50 border-${riskDetails.color}-300`,\n )\n : emphasisDeletedSkin\n ? \"rounded-lg border border-solid border-[var(--Error-200,#FECACA)] bg-[var(--Error-50,#FEF2F2)] !text-[#475467] focus:border-[var(--Error-200,#FECACA)] focus:shadow-[0_0_0_2px_rgba(254_202_202_/_0.45)] dark:border-[var(--Error-200,#FECACA)] dark:bg-[var(--Error-50,#FEF2F2)] dark:!text-[#475467] disabled:!opacity-100 disabled:!bg-[var(--Error-50,#FEF2F2)] dark:disabled:!bg-[var(--Error-50,#FEF2F2)]\"\n : emphasisModifiedSkin\n ? \"rounded-lg border border-solid border-[var(--Warning-200,#FEDF89)] bg-[var(--Warning-50,#FFFAEB)] text-neutral-900 dark:text-black-100 focus:border-[var(--Warning-200,#FEDF89)] focus:shadow-[0_0_0_2px_rgba(254_223_137_/_0.45)] dark:border-[var(--Warning-200,#FEDF89)] dark:bg-[var(--Warning-50,#FFFAEB)] disabled:!opacity-100 disabled:!bg-[var(--Warning-50,#FFFAEB)] dark:disabled:!bg-[var(--Warning-50,#FFFAEB)]\"\n : emphasisSuccessSkin\n ? \"rounded-lg border border-solid border-[var(--Success-200,#BBF7D0)] bg-[var(--Success-50,#F0FDF4)] !text-[#101828] focus:border-[var(--Success-200,#BBF7D0)] focus:shadow-[0_0_0_2px_rgba(187_247_208_/_0.45)] dark:border-[var(--Success-200,#BBF7D0)] dark:bg-[var(--Success-50,#F0FDF4)] dark:!text-[#101828] disabled:!opacity-100 disabled:!bg-[var(--Success-50,#F0FDF4)] dark:disabled:!bg-[var(--Success-50,#F0FDF4)] disabled:!text-[#101828] dark:disabled:!text-[#101828]\"\n : \"rounded-md border-neutral-200 bg-white hover:border-primary-500 dark:border-black-600 dark:bg-black-600 dark:hover:border-primary-400 focus:border-primary-600 dark:focus:border-primary-400 focus:shadow-[0_0_0_1.5px_var(--color-primary-100)] dark:focus:shadow-[0_0_0_1.5px_var(--color-primary-950)] disabled:!bg-neutral-50 dark:disabled:!bg-black-800\"\n )}\n onChange={(e) => {\n onChange(e.target.value);\n }}\n onClick={(e) => e.stopPropagation()}\n autoComplete=\"off\"\n onBlur={onBlur}\n />\n {isPasswordField ? (\n <button\n className=\"absolute inset-y-0 flex items-center cursor-pointer right-2\"\n onClick={() => {\n setShowPassword(!showPassword);\n setIsPasswordVisible?.(!showPassword);\n }}\n type=\"button\"\n >\n {showPassword ? (\n <EyeIcon className=\"text-gray-400\" size={16} />\n ) : (\n <EyeOffIcon className=\"text-gray-400\" size={16} />\n )}\n </button>\n ) : isClearable && props.value ? (\n <button\n id={`btn-input-field-clear-${id}`}\n className=\"absolute inset-y-0 flex items-center cursor-pointer right-2 focus:outline-none\"\n onClick={(e) => {\n e.stopPropagation();\n onChange(\"\");\n }}\n type=\"button\"\n >\n <CloseIcon\n className=\"text-neutral-200 dark:text-black-500\"\n size={16}\n />\n </button>\n ) : suffixIcon ? (\n <div className=\"absolute inset-y-0 flex items-center right-2\">\n {suffixIcon}\n </div>\n ) : null}\n </div>\n </label>\n <AnimatePresence>\n {errorMessage && (\n <motion.div\n initial={{ opacity: 0, y: -10 }}\n animate={{ opacity: 1, y: 0 }}\n exit={{ opacity: 0, y: -10 }}\n transition={{ duration: 0.2 }}\n >\n <Typography\n className=\"mt-1 text-error-500\"\n appearance=\"custom\"\n size=\"extra-small\"\n variant=\"medium\"\n >\n {errorMessage}\n </Typography>\n </motion.div>\n )}\n </AnimatePresence>\n <AnimatePresence>\n {successMessage && (\n <motion.div\n initial={{ opacity: 0, y: -10 }}\n animate={{ opacity: 1, y: 0 }}\n exit={{ opacity: 0, y: -10 }}\n transition={{ duration: 0.2 }}\n >\n <Typography\n className=\"mt-1 text-success-500 dark:text-success-300\"\n appearance=\"custom\"\n size=\"extra-small\"\n variant=\"medium\"\n >\n {successMessage}\n </Typography>\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n\n {isHovered &&\n riskDetails &&\n isRiskAnalysisOpen &&\n RiskDetailsCard && (\n <div\n role=\"tooltip\"\n tabIndex={0}\n className=\"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl\"\n onClick={(e) => e.stopPropagation()}\n onMouseDown={(e) => e.preventDefault()}\n onKeyDown={(e) => {\n if (e.key === \"Escape\") {\n setIsHovered(false);\n }\n }}\n >\n <RiskDetailsCard riskDetails={riskDetails} />\n </div>\n )}\n </div>\n );\n }\n);\n\nBaseInputField.displayName = \"BaseInputField\";\n\nexport default BaseInputField;\n\n"],"names":["EyeIcon","className","size","jsxs","jsx","EyeOffIcon","CloseIcon","RevertIcon","BaseInputField","forwardRef","id","label","labelExtra","onChange","errorMessage","successMessage","required","isRequiredConditional","bg","tags","color","isPasswordField","setIsPasswordVisible","inputRef","tooltip","suffixIcon","revertBackValue","originalCase","textSize","isAiExtracted","isGTN","confidenceScore","confidenceType","confidenceTooltip","gtnName","inputClassName","inputStyle","labelClassName","onBlur","isLiveField","isClearable","riskDetails","isRiskAnalysisOpen","RiskDetailsCard","onAddGTNToDocument","sourceMeta","inputEmphasis","onConfidenceScoreClick","props","ref","t","useTranslation","showRiskSkin","emphasisModifiedSkin","emphasisDeletedSkin","emphasisSuccessSkin","showPassword","setShowPassword","useState","isHovered","setIsHovered","handleAddGTNToDocument","value","cn","InputLabel","AntTooltip","BoltOutlined","shouldShowConfidenceScore","AIExtractedIndicator","Label","HelpIcon","Tooltip","getConfidenceScoreBadgeClass","AIStarIcon","getConfidenceScoreBadgeColor","getConfidenceScoreBadgeFill","getConfidenceScoreBadgeTextColor","NoteAddOutlined","createElement","e","AnimatePresence","motion","Typography"],"mappings":";;;;;;;;;;;;;;;AAyEA,MAAMA,KAAU,CAAC,EAAE,WAAAC,GAAW,MAAAC,IAAO,SACnC,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAOD;AAAA,IACP,QAAQA;AAAA,IACR,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,QAAO;AAAA,IACP,aAAY;AAAA,IACZ,eAAc;AAAA,IACd,gBAAe;AAAA,IACf,WAAAD;AAAA,IAEA,UAAA;AAAA,MAAA,gBAAAG,EAAC,QAAA,EAAK,GAAE,+CAAA,CAA+C;AAAA,wBACtD,UAAA,EAAO,IAAG,MAAK,IAAG,MAAK,GAAE,IAAA,CAAI;AAAA,IAAA;AAAA,EAAA;AAChC,GAMIC,KAAa,CAAC,EAAE,WAAAJ,GAAW,MAAAC,IAAO,SACtC,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAOD;AAAA,IACP,QAAQA;AAAA,IACR,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,QAAO;AAAA,IACP,aAAY;AAAA,IACZ,eAAc;AAAA,IACd,gBAAe;AAAA,IACf,WAAAD;AAAA,IAEA,UAAA;AAAA,MAAA,gBAAAG,EAAC,QAAA,EAAK,GAAE,uLAAA,CAAuL;AAAA,MAC/L,gBAAAA,EAAC,UAAK,IAAG,KAAI,IAAG,KAAI,IAAG,MAAK,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