@lax-wp/design-system 0.14.16 → 0.14.18

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.
@@ -1 +1 @@
1
- {"version":3,"file":"FloatingBar.es.js","sources":["../../../src/components/floating-bar/FloatingBar.tsx"],"sourcesContent":["import { Dropdown } from \"antd\";\nimport cn from \"classnames\";\nimport { motion } from \"framer-motion\";\nimport { useEffect, useRef, useState, type FC, type ReactNode } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Typography } from \"../data-display/typography/Typography\";\nimport { OptionButton } from \"../buttons/option-button/OptionButton\";\nimport IconButton from \"../button/IconButton\";\nimport Tooltip from \"../tooltip/Tooltip\";\nimport { DeleteIcon } from \"../icon\";\n\n/**\n * Close icon component\n */\nconst CloseIcon: FC<{ size?: number; fill?: string; className?: string }> = ({\n size = 24,\n fill = \"currentColor\",\n className,\n}) => (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 20 20\"\n fill={fill}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M10.0002 11.1666L5.91683 15.2499C5.76405 15.4027 5.56961 15.4791 5.3335 15.4791C5.09739 15.4791 4.90294 15.4027 4.75016 15.2499C4.59738 15.0971 4.521 14.9027 4.521 14.6666C4.521 14.4305 4.59738 14.236 4.75016 14.0833L8.8335 9.99992L4.75016 5.91659C4.59738 5.76381 4.521 5.56936 4.521 5.33325C4.521 5.09714 4.59738 4.9027 4.75016 4.74992C4.90294 4.59714 5.09739 4.52075 5.3335 4.52075C5.56961 4.52075 5.76405 4.59714 5.91683 4.74992L10.0002 8.83325L14.0835 4.74992C14.2363 4.59714 14.4307 4.52075 14.6668 4.52075C14.9029 4.52075 15.0974 4.59714 15.2502 4.74992C15.4029 4.9027 15.4793 5.09714 15.4793 5.33325C15.4793 5.56936 15.4029 5.76381 15.2502 5.91659L11.1668 9.99992L15.2502 14.0833C15.4029 14.236 15.4793 14.4305 15.4793 14.6666C15.4793 14.9027 15.4029 15.0971 15.2502 15.2499C15.0974 15.4027 14.9029 15.4791 14.6668 15.4791C14.4307 15.4791 14.2363 15.4027 14.0835 15.2499L10.0002 11.1666Z\" />\n </svg>\n);\n\n/**\n * Dropdown arrow icon component\n */\nconst DropdownArrowIcon: FC<{ fill?: string; className?: string }> = ({\n fill = \"#cccccc\",\n className,\n}) => (\n <svg\n height=\"20\"\n width=\"20\"\n viewBox=\"0 0 20 20\"\n focusable=\"false\"\n className={className}\n >\n <path\n fill={fill}\n d=\"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z\"\n />\n </svg>\n);\n\n/**\n * Configuration for action buttons in the floating bar\n */\nexport type ButtonConfig = {\n /** Button label text */\n label?: string;\n /** Icon element to display */\n icon: ReactNode;\n /** Click handler for the action */\n onClick?: () => void;\n /** Icon for dropdown mode */\n dropdownIcon?: ReactNode;\n /** Whether the action is visible */\n visible?: boolean;\n /** Whether the action is disabled */\n disabled?: boolean;\n /** Tooltip text */\n tooltip?: string;\n /** Whether to hide the label text */\n hideLabel?: boolean;\n /** Action type */\n type?: \"button\" | \"dropdown\";\n /** Dropdown trigger mode */\n dropdownTrigger?: \"click\" | \"hover\";\n /** Dropdown menu items */\n dropdownItems?: Array<{\n label: ReactNode;\n key: string;\n disabled?: boolean;\n }>;\n};\n\n/**\n * Props for the FloatingBar component\n */\nexport type TFloatingBar = {\n /** Whether the floating bar is visible */\n show?: boolean;\n /** Close handler */\n onClose: () => void;\n /** Whether this is used in flow dashboard layout */\n isFlowDashboard?: boolean;\n /** Array of action configurations */\n actionItems: ButtonConfig[];\n /** Number of selected items */\n selectedItemsCount?: number;\n /** Delete action configuration */\n deleteConfig?: {\n label?: string;\n disabled?: boolean;\n onClick?: () => void;\n };\n /** Whether to show action background */\n showActionBg?: boolean;\n};\n\n/**\n * FloatingBar component provides a floating action bar for bulk operations.\n * Drop-in replacement matching the lax-web-portal implementation.\n *\n * @example\n * ```tsx\n * <FloatingBar\n * show={selectedItems.length > 0}\n * onClose={() => setSelectedItems([])}\n * selectedItemsCount={selectedItems.length}\n * actionItems={[\n * {\n * label: \"Edit\",\n * icon: <EditIcon size={16} />,\n * onClick: handleEdit,\n * },\n * {\n * label: \"Archive\",\n * icon: <ArchiveIcon size={16} />,\n * onClick: handleArchive,\n * },\n * ]}\n * deleteConfig={{\n * label: \"Delete\",\n * onClick: handleDelete,\n * }}\n * />\n * ```\n */\nexport const FloatingBar: FC<TFloatingBar> = (props) => {\n const {\n show,\n isFlowDashboard,\n onClose,\n actionItems,\n selectedItemsCount,\n deleteConfig,\n showActionBg,\n } = props;\n\n const { t } = useTranslation();\n const [showDropdown, setShowDropdown] = useState<boolean>(false);\n const [showButtons, setShowButtons] = useState<boolean>(true);\n\n const containerRef = useRef<HTMLDivElement>(null);\n const actionContainerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const observer = new ResizeObserver(() => {\n if (containerRef.current && actionContainerRef.current) {\n const containerWidth = containerRef.current.scrollWidth - 100;\n const totalActionItemsWidth = actionItems.length * 180 + 100;\n if (totalActionItemsWidth > containerWidth) {\n setShowButtons(false);\n } else {\n setShowButtons(true);\n }\n }\n });\n\n if (containerRef.current) {\n observer.observe(containerRef.current);\n }\n\n return () => {\n if (containerRef.current) {\n observer.unobserve(containerRef.current);\n }\n };\n });\n\n const deleteButtonConfig = {\n label: t(\"Delete\"),\n icon: <DeleteIcon className=\"text-error-500 w-icon h-icon\" />,\n color: \"text-error-500 dark:text-error-500\",\n onClick: deleteConfig?.onClick,\n ...deleteConfig,\n };\n\n const dropDownItems = actionItems\n .filter((button) => button.visible !== false)\n .map((button, index) => ({\n key: index,\n label: (\n <OptionButton\n icon={button.dropdownIcon}\n text={button?.label || \"\"}\n onClick={button.onClick}\n className=\"font-inter text-base font-medium text-black-900 dark:text-black-200 gap-1.5\"\n />\n ),\n children: button.dropdownItems,\n disabled: false,\n }));\n\n return !show ? null : (\n <motion.div\n initial={{ y: 20, opacity: 0 }}\n animate={{ y: 0, opacity: 1 }}\n exit={{ y: 20, opacity: 0 }}\n transition={{\n duration: 0.2,\n ease: [0.4, 0, 0.2, 1],\n opacity: { duration: 0.15 },\n }}\n ref={containerRef}\n className={cn(\"h-[40px]\", isFlowDashboard ? \"ml-60 w-1/2\" : \"w-full\")}\n >\n <div\n className={cn(\n \"h-[40px] border py-1.5 px-2 text-white bg-primary-800 dark:bg-black-700 flex justify-between items-center\"\n )}\n >\n <div className=\"flex items-center\">\n <IconButton\n tooltip=\"Close\"\n variant=\"ghost\"\n onClick={onClose}\n className=\"!p-0 text-white hover:opacity-80 hover:rotate-90 transition-all duration-200\"\n >\n <CloseIcon size={20} />\n </IconButton>\n <div className=\"flex items-center gap-1.5 ml-2\">\n <span className=\"text-primary-600 dark:text-black-100 bg-primary-50 dark:bg-black-800 border-primary-200 dark:border-black-800 text-xs leading-4 font-normal border rounded-full pr-2 pl-2\">\n {selectedItemsCount || 0}\n </span>\n <Typography\n size=\"extra-small\"\n appearance=\"custom\"\n className=\"text-white\"\n >\n {t(\"Selected\")}\n </Typography>\n </div>\n </div>\n <div\n ref={actionContainerRef}\n className={cn(\n \"h-[36px] flex items-center rounded-full font-inter\",\n showActionBg\n ? \"bg-primary-900 dark:bg-black-800 px-[10px] rounded-[43px]\"\n : \"\"\n )}\n >\n {showButtons ? (\n <motion.div\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n transition={{ duration: 0.2 }}\n className=\"flex bg-primary-800 dark:bg-black-800 px-4 rounded-full\"\n >\n {actionItems.map(\n (button, index) =>\n button.visible !== false && (\n <div key={index}>\n {button.type === \"dropdown\" ? (\n <Dropdown\n menu={{\n items: button.dropdownItems,\n }}\n trigger={[button.dropdownTrigger || \"click\"]}\n overlayClassName=\"!min-w-[148px]\"\n placement=\"bottomRight\"\n getPopupContainer={(trigger) =>\n trigger.parentElement as HTMLElement\n }\n open={showDropdown}\n onOpenChange={setShowDropdown}\n >\n <button\n key={index}\n id={`btn-floating-bar-${button.label}`}\n onClick={button.onClick}\n disabled={button.disabled}\n className={cn(\n !button?.label\n ? \"bg-transparent p-1.5 rounded-xl transition-all duration-200 hover:scale-105 hover:opacity-80\"\n : \"flex items-center mx-1 gap-1.5 py-1 pr-3 pl-2 rounded-md text-white hover:text-primary-50 hover:scale-105 transition-all duration-200 bg-transparent\",\n button?.hideLabel && \"!p-1.5\",\n (button.label === \"Delete\" ||\n button.label === \"Remove\" ||\n button.label === \"Delete user\" ||\n button.label === \"Move to trash\" ||\n button.label === \"Delete Permanently\") &&\n \"!text-error-500\",\n button.disabled && \"opacity-70\"\n )}\n >\n <Tooltip\n hideTooltip={!button.tooltip}\n title={button.tooltip}\n className=\"flex items-center\"\n >\n {button.icon}\n {!button?.hideLabel && button.label && (\n <Typography\n size=\"small\"\n variant=\"medium\"\n className={\"text-inherit ml-1.5\"}\n appearance=\"custom\"\n >\n {button.label}\n </Typography>\n )}\n </Tooltip>\n </button>\n </Dropdown>\n ) : (\n <button\n id={`btn-floating-bar-${button.label}`}\n onClick={button.onClick}\n disabled={button.disabled}\n className={cn(\n !button?.label\n ? \"bg-transparent p-1.5 rounded-xl transition-all duration-200 hover:scale-105 hover:opacity-80\"\n : \"flex items-center mx-1 gap-1.5 py-1 pr-3 pl-2 rounded-md text-white hover:text-primary-50 hover:scale-105 transition-all duration-200 bg-transparent\",\n button?.hideLabel && \"!p-1.5\",\n (button.label === \"Delete\" ||\n button.label === \"Remove\" ||\n button.label === \"Move to trash\" ||\n button.label === \"Delete Permanently\") &&\n \"!text-error-500\",\n button.disabled && \"opacity-70\"\n )}\n >\n <Tooltip\n hideTooltip={!button.tooltip}\n title={button.tooltip}\n className=\"flex items-center\"\n >\n {button.icon}\n\n {!button?.hideLabel && button.label && (\n <Typography\n size=\"small\"\n variant=\"medium\"\n className={\"text-inherit ml-1.5\"}\n appearance=\"custom\"\n >\n {button.label}\n </Typography>\n )}\n </Tooltip>\n </button>\n )}\n </div>\n )\n )}\n {deleteConfig ? (\n <button\n id={`btn-floating-bar-${deleteButtonConfig.label}`}\n onClick={deleteButtonConfig.onClick}\n disabled={deleteButtonConfig.disabled}\n className={cn(\n \"flex items-center gap-1.5 py-1 pr-3 pl-2 rounded-md hover:scale-105 hover:opacity-80 transition-all duration-200\",\n deleteButtonConfig.disabled && \"opacity-70\"\n )}\n >\n {deleteButtonConfig.icon}\n <Typography\n size=\"small\"\n variant=\"medium\"\n className=\"text-error-500\"\n appearance=\"custom\"\n >\n {deleteButtonConfig.label}\n </Typography>\n </button>\n ) : null}\n </motion.div>\n ) : (\n <motion.div\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n transition={{ duration: 0.2 }}\n className=\"minw-[150px] p-1.5 flex items-center\"\n >\n <Dropdown\n menu={{\n items: dropDownItems,\n }}\n trigger={[\"click\"]}\n overlayClassName=\"!min-w-[148px]\"\n placement=\"bottomRight\"\n getPopupContainer={(trigger) =>\n trigger.parentElement as HTMLElement\n }\n open={showDropdown}\n onOpenChange={setShowDropdown}\n >\n <button\n id={`btn-floating-bar-actions`}\n disabled={dropDownItems.length === 0}\n className={cn(\n \"flex items-center gap-1.5 px-2 py-1 w-22 h-7 rounded-full bg-primary-700 hover:scale-105 hover:opacity-80 transition-all duration-200\",\n dropDownItems.length === 0 &&\n \"opacity-60 hover:scale-100 hover:opacity-60\"\n )}\n type=\"button\"\n >\n <Typography\n size=\"small\"\n variant=\"medium\"\n className=\"text-white\"\n >\n {t(\"Actions\")}\n </Typography>\n <DropdownArrowIcon\n fill=\"#FFFFFF\"\n className=\"w-[16px] h-[16px]\"\n />\n </button>\n </Dropdown>\n {deleteConfig ? (\n <button\n id={`btn-floating-bar-${deleteButtonConfig.label}`}\n onClick={deleteButtonConfig.onClick}\n disabled={deleteButtonConfig.disabled}\n className={cn(\n \"flex items-center gap-1.5 py-1 pr-3 pl-2 rounded-md hover:scale-105 hover:opacity-80 transition-all duration-200\",\n deleteButtonConfig.disabled && \"opacity-70\"\n )}\n type=\"button\"\n >\n {deleteButtonConfig.icon}\n <Typography\n size=\"small\"\n variant=\"medium\"\n className=\"text-error-500\"\n appearance=\"custom\"\n >\n {deleteButtonConfig.label}\n </Typography>\n </button>\n ) : null}\n </motion.div>\n )}\n </div>\n </div>\n </motion.div>\n );\n};\n\nFloatingBar.displayName = \"FloatingBar\";\n\n// Re-export types for convenience\nexport type { ButtonConfig as FloatingBarActionConfig };\nexport type FloatingBarDeleteConfig = TFloatingBar[\"deleteConfig\"];\nexport type FloatingBarProps = TFloatingBar;\n\n// Legacy type exports for backwards compatibility\nexport type FloatingBarSize = \"small\" | \"medium\" | \"large\";\nexport type FloatingBarPosition = \"top\" | \"bottom\";\nexport type FloatingBarTheme = \"primary\" | \"dark\" | \"light\";\n"],"names":["CloseIcon","size","fill","className","jsx","DropdownArrowIcon","FloatingBar","props","show","isFlowDashboard","onClose","actionItems","selectedItemsCount","deleteConfig","showActionBg","t","useTranslation","showDropdown","setShowDropdown","useState","showButtons","setShowButtons","containerRef","useRef","actionContainerRef","useEffect","observer","containerWidth","deleteButtonConfig","DeleteIcon","dropDownItems","button","index","OptionButton","motion","cn","jsxs","IconButton","Typography","Dropdown","trigger","Tooltip"],"mappings":";;;;;;;;;;;AAcA,MAAMA,IAAsE,CAAC;AAAA,EAC3E,MAAAC,IAAO;AAAA,EACP,MAAAC,IAAO;AAAA,EACP,WAAAC;AACF,MACE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAAD;AAAA,IACA,OAAOF;AAAA,IACP,QAAQA;AAAA,IACR,SAAQ;AAAA,IACR,MAAAC;AAAA,IACA,OAAM;AAAA,IAEN,UAAA,gBAAAE,EAAC,QAAA,EAAK,GAAE,i4BAAA,CAAi4B;AAA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AY,cAAc;"}
1
+ {"version":3,"file":"FloatingBar.es.js","sources":["../../../src/components/floating-bar/FloatingBar.tsx"],"sourcesContent":["import { Dropdown } from \"antd\";\nimport cn from \"classnames\";\nimport { motion } from \"framer-motion\";\nimport { useEffect, useRef, useState, type FC, type ReactNode } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Typography } from \"../data-display/typography/Typography\";\nimport { OptionButton } from \"../buttons/option-button/OptionButton\";\nimport IconButton from \"../button/IconButton\";\nimport Tooltip from \"../tooltip/Tooltip\";\nimport { DeleteIcon } from \"../icon\";\n\n/**\n * Close icon component\n */\nconst CloseIcon: FC<{ size?: number; fill?: string; className?: string }> = ({\n size = 24,\n fill = \"currentColor\",\n className,\n}) => (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 20 20\"\n fill={fill}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M10.0002 11.1666L5.91683 15.2499C5.76405 15.4027 5.56961 15.4791 5.3335 15.4791C5.09739 15.4791 4.90294 15.4027 4.75016 15.2499C4.59738 15.0971 4.521 14.9027 4.521 14.6666C4.521 14.4305 4.59738 14.236 4.75016 14.0833L8.8335 9.99992L4.75016 5.91659C4.59738 5.76381 4.521 5.56936 4.521 5.33325C4.521 5.09714 4.59738 4.9027 4.75016 4.74992C4.90294 4.59714 5.09739 4.52075 5.3335 4.52075C5.56961 4.52075 5.76405 4.59714 5.91683 4.74992L10.0002 8.83325L14.0835 4.74992C14.2363 4.59714 14.4307 4.52075 14.6668 4.52075C14.9029 4.52075 15.0974 4.59714 15.2502 4.74992C15.4029 4.9027 15.4793 5.09714 15.4793 5.33325C15.4793 5.56936 15.4029 5.76381 15.2502 5.91659L11.1668 9.99992L15.2502 14.0833C15.4029 14.236 15.4793 14.4305 15.4793 14.6666C15.4793 14.9027 15.4029 15.0971 15.2502 15.2499C15.0974 15.4027 14.9029 15.4791 14.6668 15.4791C14.4307 15.4791 14.2363 15.4027 14.0835 15.2499L10.0002 11.1666Z\" />\n </svg>\n);\n\n/**\n * Dropdown arrow icon component\n */\nconst DropdownArrowIcon: FC<{ fill?: string; className?: string }> = ({\n fill = \"#cccccc\",\n className,\n}) => (\n <svg\n height=\"20\"\n width=\"20\"\n viewBox=\"0 0 20 20\"\n focusable=\"false\"\n className={className}\n >\n <path\n fill={fill}\n d=\"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z\"\n />\n </svg>\n);\n\n/**\n * Configuration for action buttons in the floating bar\n */\nexport type ButtonConfig = {\n /** Button label text */\n label?: string;\n /** Icon element to display */\n icon: ReactNode;\n /** Click handler for the action */\n onClick?: () => void;\n /** Icon for dropdown mode */\n dropdownIcon?: ReactNode;\n /** Whether the action is visible */\n visible?: boolean;\n /** Whether the action is disabled */\n disabled?: boolean;\n /** Tooltip text */\n tooltip?: string;\n /** Whether to hide the label text */\n hideLabel?: boolean;\n /** Action type */\n type?: \"button\" | \"dropdown\";\n /** Dropdown trigger mode */\n dropdownTrigger?: \"click\" | \"hover\";\n /** Dropdown menu items */\n dropdownItems?: Array<{\n label: ReactNode;\n key: string;\n disabled?: boolean;\n }>;\n};\n\n/**\n * Props for the FloatingBar component\n */\nexport type TFloatingBar = {\n /** Whether the floating bar is visible */\n show?: boolean;\n /** Close handler */\n onClose: () => void;\n /** Whether this is used in flow dashboard layout */\n isFlowDashboard?: boolean;\n /** Array of action configurations */\n actionItems: ButtonConfig[];\n /** Number of selected items */\n selectedItemsCount?: number;\n /** Delete action configuration */\n deleteConfig?: {\n label?: string;\n disabled?: boolean;\n onClick?: () => void;\n };\n /** Whether to show action background */\n showActionBg?: boolean;\n};\n\n/**\n * FloatingBar component provides a floating action bar for bulk operations.\n * Drop-in replacement matching the lax-web-portal implementation.\n *\n * @example\n * ```tsx\n * <FloatingBar\n * show={selectedItems.length > 0}\n * onClose={() => setSelectedItems([])}\n * selectedItemsCount={selectedItems.length}\n * actionItems={[\n * {\n * label: \"Edit\",\n * icon: <EditIcon size={16} />,\n * onClick: handleEdit,\n * },\n * {\n * label: \"Archive\",\n * icon: <ArchiveIcon size={16} />,\n * onClick: handleArchive,\n * },\n * ]}\n * deleteConfig={{\n * label: \"Delete\",\n * onClick: handleDelete,\n * }}\n * />\n * ```\n */\nexport const FloatingBar: FC<TFloatingBar> = (props) => {\n const {\n show,\n isFlowDashboard,\n onClose,\n actionItems,\n selectedItemsCount,\n deleteConfig,\n showActionBg,\n } = props;\n\n const { t } = useTranslation();\n const [showDropdown, setShowDropdown] = useState<boolean>(false);\n const [showButtons, setShowButtons] = useState<boolean>(true);\n\n const containerRef = useRef<HTMLDivElement>(null);\n const actionContainerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const observer = new ResizeObserver(() => {\n if (containerRef.current && actionContainerRef.current) {\n const containerWidth = containerRef.current.scrollWidth - 100;\n const totalActionItemsWidth = actionItems.length * 180 + 100;\n if (totalActionItemsWidth > containerWidth) {\n setShowButtons(false);\n } else {\n setShowButtons(true);\n }\n }\n });\n\n if (containerRef.current) {\n observer.observe(containerRef.current);\n }\n\n return () => {\n if (containerRef.current) {\n observer.unobserve(containerRef.current);\n }\n };\n });\n\n const deleteButtonConfig = {\n label: t(\"Delete\"),\n icon: <DeleteIcon className=\"text-error-700 w-icon h-icon\" />,\n color: \"text-error-700 dark:text-error-700\",\n onClick: deleteConfig?.onClick,\n ...deleteConfig,\n };\n\n const dropDownItems = actionItems\n .filter((button) => button.visible !== false)\n .map((button, index) => ({\n key: index,\n label: (\n <OptionButton\n icon={button.dropdownIcon}\n text={button?.label || \"\"}\n onClick={button.onClick}\n className=\"font-inter text-base font-medium text-black-900 dark:text-black-200 gap-1.5\"\n />\n ),\n children: button.dropdownItems,\n disabled: false,\n }));\n\n return !show ? null : (\n <motion.div\n initial={{ y: 20, opacity: 0 }}\n animate={{ y: 0, opacity: 1 }}\n exit={{ y: 20, opacity: 0 }}\n transition={{\n duration: 0.2,\n ease: [0.4, 0, 0.2, 1],\n opacity: { duration: 0.15 },\n }}\n ref={containerRef}\n className={cn(\"h-[48px]\", isFlowDashboard ? \"ml-60 w-1/2\" : \"w-full\")}\n >\n <div\n className={cn(\n \"h-[48px] border-y border-neutral-900 dark:border-[#0d1014] py-[6px] px-[12px] text-white bg-neutral-900 dark:bg-black-900 flex justify-between items-center\"\n )}\n >\n <div className=\"flex items-center gap-[12px]\">\n <div className=\"flex items-center gap-[8px]\">\n <IconButton\n tooltip=\"Close\"\n variant=\"ghost\"\n onClick={onClose}\n className=\"!p-0 text-white hover:opacity-80 hover:rotate-90 transition-all duration-200\"\n >\n <CloseIcon size={16} />\n </IconButton>\n <div className=\"w-px h-[14px] rounded-[1px] bg-neutral-700 dark:bg-[#1d242c]\" />\n </div>\n <div className=\"flex items-center gap-[6px]\">\n <span className=\"inline-flex items-center justify-center min-w-[20px] h-[16px] px-[8px] rounded-[9px] border text-[12px] leading-[18px] font-normal text-primary-600 dark:text-primary-400 bg-primary-50 dark:bg-[rgba(0,50,95,0.3)] border-primary-200 dark:border-primary-800\">\n {selectedItemsCount || 0}\n </span>\n <Typography\n size=\"extra-small\"\n appearance=\"custom\"\n className=\"text-white dark:text-neutral-50\"\n >\n {t(\"Selected\")}\n </Typography>\n </div>\n </div>\n <div\n ref={actionContainerRef}\n className={cn(\n \"h-[36px] flex items-center rounded-[43px] font-inter\",\n showActionBg\n ? \"bg-neutral-800 dark:bg-black-800 px-[10px] rounded-[43px]\"\n : \"\"\n )}\n >\n {showButtons ? (\n <motion.div\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n transition={{ duration: 0.2 }}\n className=\"flex items-center h-[36px] bg-neutral-800 dark:bg-black-800 px-[10px] rounded-[43px]\"\n >\n {actionItems.map(\n (button, index) =>\n button.visible !== false && (\n <div key={index}>\n {button.type === \"dropdown\" ? (\n <Dropdown\n menu={{\n items: button.dropdownItems,\n }}\n trigger={[button.dropdownTrigger || \"click\"]}\n overlayClassName=\"!min-w-[148px]\"\n placement=\"bottomRight\"\n getPopupContainer={(trigger) =>\n trigger.parentElement as HTMLElement\n }\n open={showDropdown}\n onOpenChange={setShowDropdown}\n >\n <button\n key={index}\n id={`btn-floating-bar-${button.label}`}\n onClick={button.onClick}\n disabled={button.disabled}\n className={cn(\n !button?.label\n ? \"bg-transparent p-1.5 rounded-xl transition-all duration-200 hover:scale-105 hover:opacity-80\"\n : \"flex items-center gap-[6px] pl-[8px] pr-[12px] py-[4px] rounded-[6px] text-white dark:text-neutral-50 hover:opacity-80 hover:scale-105 transition-all duration-200 bg-transparent\",\n button?.hideLabel && \"!p-1.5\",\n (button.label === \"Delete\" ||\n button.label === \"Remove\" ||\n button.label === \"Delete user\" ||\n button.label === \"Move to trash\" ||\n button.label === \"Delete Permanently\") &&\n \"!text-error-700\",\n button.disabled && \"opacity-70\"\n )}\n >\n <Tooltip\n hideTooltip={!button.tooltip}\n title={button.tooltip}\n className=\"flex items-center\"\n >\n {button.icon}\n {!button?.hideLabel && button.label && (\n <Typography\n size=\"small\"\n variant=\"medium\"\n className={\"text-inherit\"}\n appearance=\"custom\"\n >\n {button.label}\n </Typography>\n )}\n </Tooltip>\n </button>\n </Dropdown>\n ) : (\n <button\n id={`btn-floating-bar-${button.label}`}\n onClick={button.onClick}\n disabled={button.disabled}\n className={cn(\n !button?.label\n ? \"bg-transparent p-1.5 rounded-xl transition-all duration-200 hover:scale-105 hover:opacity-80\"\n : \"flex items-center gap-[6px] pl-[8px] pr-[12px] py-[4px] rounded-[6px] text-white dark:text-neutral-50 hover:opacity-80 hover:scale-105 transition-all duration-200 bg-transparent\",\n button?.hideLabel && \"!p-1.5\",\n (button.label === \"Delete\" ||\n button.label === \"Remove\" ||\n button.label === \"Move to trash\" ||\n button.label === \"Delete Permanently\") &&\n \"!text-error-700\",\n button.disabled && \"opacity-70\"\n )}\n >\n <Tooltip\n hideTooltip={!button.tooltip}\n title={button.tooltip}\n className=\"flex items-center\"\n >\n {button.icon}\n\n {!button?.hideLabel && button.label && (\n <Typography\n size=\"small\"\n variant=\"medium\"\n className={\"text-inherit\"}\n appearance=\"custom\"\n >\n {button.label}\n </Typography>\n )}\n </Tooltip>\n </button>\n )}\n </div>\n )\n )}\n {deleteConfig ? (\n <button\n id={`btn-floating-bar-${deleteButtonConfig.label}`}\n onClick={deleteButtonConfig.onClick}\n disabled={deleteButtonConfig.disabled}\n className={cn(\n \"flex items-center gap-[6px] pl-[8px] pr-[12px] py-[4px] rounded-[6px] hover:scale-105 hover:opacity-80 transition-all duration-200\",\n deleteButtonConfig.disabled && \"opacity-70\"\n )}\n >\n {deleteButtonConfig.icon}\n <Typography\n size=\"small\"\n variant=\"medium\"\n className=\"text-error-700\"\n appearance=\"custom\"\n >\n {deleteButtonConfig.label}\n </Typography>\n </button>\n ) : null}\n </motion.div>\n ) : (\n <motion.div\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n transition={{ duration: 0.2 }}\n className=\"minw-[150px] p-1.5 flex items-center\"\n >\n <Dropdown\n menu={{\n items: dropDownItems,\n }}\n trigger={[\"click\"]}\n overlayClassName=\"!min-w-[148px]\"\n placement=\"bottomRight\"\n getPopupContainer={(trigger) =>\n trigger.parentElement as HTMLElement\n }\n open={showDropdown}\n onOpenChange={setShowDropdown}\n >\n <button\n id={`btn-floating-bar-actions`}\n disabled={dropDownItems.length === 0}\n className={cn(\n \"flex items-center gap-1.5 px-2 py-1 w-22 h-7 rounded-full bg-primary-700 hover:scale-105 hover:opacity-80 transition-all duration-200\",\n dropDownItems.length === 0 &&\n \"opacity-60 hover:scale-100 hover:opacity-60\"\n )}\n type=\"button\"\n >\n <Typography\n size=\"small\"\n variant=\"medium\"\n className=\"text-white\"\n >\n {t(\"Actions\")}\n </Typography>\n <DropdownArrowIcon\n fill=\"#FFFFFF\"\n className=\"w-[16px] h-[16px]\"\n />\n </button>\n </Dropdown>\n {deleteConfig ? (\n <button\n id={`btn-floating-bar-${deleteButtonConfig.label}`}\n onClick={deleteButtonConfig.onClick}\n disabled={deleteButtonConfig.disabled}\n className={cn(\n \"flex items-center gap-[6px] pl-[8px] pr-[12px] py-[4px] rounded-[6px] hover:scale-105 hover:opacity-80 transition-all duration-200\",\n deleteButtonConfig.disabled && \"opacity-70\"\n )}\n type=\"button\"\n >\n {deleteButtonConfig.icon}\n <Typography\n size=\"small\"\n variant=\"medium\"\n className=\"text-error-700\"\n appearance=\"custom\"\n >\n {deleteButtonConfig.label}\n </Typography>\n </button>\n ) : null}\n </motion.div>\n )}\n </div>\n </div>\n </motion.div>\n );\n};\n\nFloatingBar.displayName = \"FloatingBar\";\n\n// Re-export types for convenience\nexport type { ButtonConfig as FloatingBarActionConfig };\nexport type FloatingBarDeleteConfig = TFloatingBar[\"deleteConfig\"];\nexport type FloatingBarProps = TFloatingBar;\n\n// Legacy type exports for backwards compatibility\nexport type FloatingBarSize = \"small\" | \"medium\" | \"large\";\nexport type FloatingBarPosition = \"top\" | \"bottom\";\nexport type FloatingBarTheme = \"primary\" | \"dark\" | \"light\";\n"],"names":["CloseIcon","size","fill","className","jsx","DropdownArrowIcon","FloatingBar","props","show","isFlowDashboard","onClose","actionItems","selectedItemsCount","deleteConfig","showActionBg","t","useTranslation","showDropdown","setShowDropdown","useState","showButtons","setShowButtons","containerRef","useRef","actionContainerRef","useEffect","observer","containerWidth","deleteButtonConfig","DeleteIcon","dropDownItems","button","index","OptionButton","motion","cn","jsxs","IconButton","Typography","Dropdown","trigger","Tooltip"],"mappings":";;;;;;;;;;;AAcA,MAAMA,IAAsE,CAAC;AAAA,EAC3E,MAAAC,IAAO;AAAA,EACP,MAAAC,IAAO;AAAA,EACP,WAAAC;AACF,MACE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAAD;AAAA,IACA,OAAOF;A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ACR,WAAU;AAAA,gCACV,YAAW;AAAA,gCAEV,UAAAV,EAAmB;AAAA,8BAAA;AAAA,4BAAA;AAAA,0BACtB;AAAA,wBAAA;AAAA,sBAAA,IAEA;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACN;AAAA,YAAA;AAAA,UAEJ;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA,IAtPW;AAyPjB;AAEAtB,EAAY,cAAc;"}
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),p=require("react"),a=require("../../../_virtual/index.cjs.js"),m=require("framer-motion"),ne=require("react-i18next"),_=require("antd"),P=require("../../data-display/typography/Typography.cjs.js"),de=require("../../data-display/label/Label.cjs.js"),D=require("@mui/icons-material"),le=require("../../icons/AIExtractedIndicator.cjs.js"),ce=require("../../icons/AIStarIcon.cjs.js"),ue=require("../shared/InputLabel.cjs.js"),be=require("../../tooltip/Tooltip.cjs.js"),d=require("../../../utils/confidenceScoreUtils.cjs.js"),xe=require("../../icons/HelpIcon.cjs.js"),pe=({className:o,size:r=16})=>e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o,children:[e.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),e.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),me=({className:o,size:r=16})=>e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o,children:[e.jsx("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"}),e.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}),he=({className:o,size:r=16})=>e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o,children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),fe=({className:o,size:r=16})=>e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o,children:[e.jsx("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),e.jsx("path",{d:"M3 3v5h5"})]}),F=p.forwardRef(({id:o,label:r,labelExtra:S,onChange:h,errorMessage:i,successMessage:s,required:f,isRequiredConditional:N=!1,bg:C,tags:$,color:E,className:H,isPasswordField:z,setIsPasswordVisible:O,inputRef:R,tooltip:I,suffixIcon:B,revertBackValue:c,originalCase:M=!1,textSize:A,isAiExtracted:T=!1,isGTN:k=!1,confidenceScore:g,confidenceType:l="high",confidenceTooltip:K,gtnName:U=null,inputClassName:q="",inputStyle:J={},labelClassName:Q,onBlur:X,isLiveField:Y=!1,isClearable:Z=!1,riskDetails:n,isRiskAnalysisOpen:L=!1,RiskDetailsCard:W,onAddGTNToDocument:v,sourceMeta:V=[],inputEmphasis:y="default",onConfidenceScoreClick:G,...u},ee)=>{const{t:re}=ne.useTranslation(),b=!!(L&&n?.color),oe=y==="modified"&&!i&&!s&&!b,te=y==="deleted"&&!i&&!s&&!b,ae=y==="success"&&!i&&!s&&!b,[j,ie]=p.useState(!1),[x,w]=p.useState(!1),se=t=>{v&&v({key:U,value:t})};return e.jsxs("div",{className:a("flex gap-0.5 relative",x&&k?"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":""),onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),children:[k&&!x?e.jsx("div",{className:"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5"}):null,e.jsxs("div",{className:a("flex flex-col w-full",H),children:[e.jsx("style",{children:`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),p=require("react"),a=require("../../../_virtual/index.cjs.js"),h=require("framer-motion"),ne=require("react-i18next"),_=require("antd"),P=require("../../data-display/typography/Typography.cjs.js"),le=require("../../data-display/label/Label.cjs.js"),D=require("@mui/icons-material"),de=require("../../icons/AIExtractedIndicator.cjs.js"),ce=require("../../icons/AIStarIcon.cjs.js"),ue=require("../shared/InputLabel.cjs.js"),be=require("../../tooltip/Tooltip.cjs.js"),l=require("../../../utils/confidenceScoreUtils.cjs.js"),xe=require("../../icons/HelpIcon.cjs.js"),pe=({className:o,size:r=16})=>e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o,children:[e.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),e.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),he=({className:o,size:r=16})=>e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o,children:[e.jsx("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"}),e.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}),me=({className:o,size:r=16})=>e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o,children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),fe=({className:o,size:r=16})=>e.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o,children:[e.jsx("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),e.jsx("path",{d:"M3 3v5h5"})]}),F=p.forwardRef(({id:o,label:r,labelExtra:S,onChange:m,errorMessage:i,successMessage:s,required:f,isRequiredConditional:N=!1,bg:C,tags:$,color:E,className:H,isPasswordField:z,setIsPasswordVisible:O,inputRef:R,tooltip:I,suffixIcon:B,revertBackValue:c,originalCase:M=!1,textSize:A,isAiExtracted:T=!1,isGTN:k=!1,confidenceScore:g,confidenceType:d="high",confidenceTooltip:K,gtnName:U=null,inputClassName:q="",inputStyle:J={},labelClassName:Q,onBlur:X,isLiveField:Y=!1,isClearable:Z=!1,riskDetails:n,isRiskAnalysisOpen:L=!1,RiskDetailsCard:W,onAddGTNToDocument:v,sourceMeta:V=[],inputEmphasis:y="default",onConfidenceScoreClick:G,...u},ee)=>{const{t:re}=ne.useTranslation(),b=!!(L&&n?.color),oe=y==="modified"&&!i&&!s&&!b,te=y==="deleted"&&!i&&!s&&!b,ae=y==="success"&&!i&&!s&&!b,[j,ie]=p.useState(!1),[x,w]=p.useState(!1),se=t=>{v&&v({key:U,value:t})};return e.jsxs("div",{className:a("flex gap-0.5 relative",x&&k?"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":""),onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),children:[k&&!x?e.jsx("div",{className:"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5"}):null,e.jsxs("div",{className:a("flex flex-col w-full",H),children:[e.jsx("style",{children:`
2
2
  .dark input:-webkit-autofill,
3
3
  .dark input:-webkit-autofill:hover,
4
4
  .dark input:-webkit-autofill:focus {
@@ -14,5 +14,5 @@
14
14
  -webkit-box-shadow: 0 0 0px 1000px white inset !important;
15
15
  transition: background-color 5000s ease-in-out 0s;
16
16
  }
17
- `}),(r||S)&&e.jsx("label",{id:o,htmlFor:"text",className:`mb-1 text-xs font-medium text-gray-600 inline-flex items-center gap-1 ${M?"":"capitalize"} ${Q||"!uppercse"}`,children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between w-full",children:[e.jsxs("div",{className:"inline-flex flex-wrap items-center gap-1",children:[(r||f||N)&&e.jsx(ue.InputLabel,{label:r??"",required:f||!1,isRequiredConditional:N||!1}),c?.length>0&&c!==u.value&&e.jsx(_.Tooltip,{placement:"top",title:c,children:e.jsx("button",{className:"cursor-pointer",onClick:()=>h(c),type:"button",children:e.jsx(fe,{className:"cursor-pointer pb-0.5 text-primary-600 w-4 h-4"})})}),Y&&e.jsx(D.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),T&&!d.shouldShowConfidenceScore(g)&&e.jsx(le.AIExtractedIndicator,{}),e.jsx(de.Label,{labels:$}),I&&e.jsx(_.Tooltip,{placement:"top",title:I,children:e.jsx("div",{className:"cursor-pointer",children:e.jsx(xe.HelpIcon,{className:"w-icon-sm h-icon-sm"})})}),S]}),e.jsxs("div",{className:"flex items-center gap-1",children:[d.shouldShowConfidenceScore(g)&&l?e.jsx(be,{placement:"top-end",title:K||"",className:"cursor-pointer",children:e.jsxs("div",{className:a("inline-flex min-w-12 items-center gap-1 rounded-md px-1 py-0.5",d.getConfidenceScoreBadgeClass(l)),onClick:()=>G?.(V),children:[e.jsx(ce.AIStarIcon,{size:12,fill:d.getConfidenceScoreBadgeColor(l),fillSecondary:d.getConfidenceScoreBadgeFill(l)}),e.jsxs("span",{className:a("text-xs font-medium leading-4",d.getConfidenceScoreBadgeTextColor(l)),children:[g,"%"]})]})}):null,k&&x&&v?e.jsx("button",{id:`btn-base-input-field-add-to-document-${o}`,className:"cursor-pointer",onClick:()=>se(u?.value),type:"button",children:e.jsx(_.Tooltip,{placement:"top",title:re("Add to document"),children:e.jsx(D.NoteAddOutlined,{className:"text-primary-600",sx:{fontSize:16}})})}):null]})]})}),e.jsx("label",{className:"relative block",children:e.jsxs("div",{className:"relative",children:[p.createElement("input",{...u,ref:R||ee,id:o||r,key:o,required:f,style:{"--input-bg-color":"var(--tw-bg-opacity, 1) rgb(var(--bg-color))",...J},className:a("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",A||"text-sm",E||"text-neutral-900 dark:text-black-100",C&&C,q||"",i?a("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)]"):s?a("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"):b&&n?.color?a("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)]",`bg-${n.color}-50 border-${n.color}-300`):te?"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)]":oe?"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)]":ae?"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"),onChange:t=>{h(t.target.value)},onClick:t=>t.stopPropagation(),autoComplete:"off",onBlur:X}),z?e.jsx("button",{className:"absolute inset-y-0 flex items-center cursor-pointer right-2",onClick:()=>{ie(!j),O?.(!j)},type:"button",children:j?e.jsx(pe,{className:"text-gray-400 w-4 h-4"}):e.jsx(me,{className:"text-gray-400 w-4 h-4"})}):Z&&u.value?e.jsx("button",{id:`btn-input-field-clear-${o}`,className:"absolute inset-y-0 flex items-center cursor-pointer right-2 focus:outline-none",onClick:t=>{t.stopPropagation(),h("")},type:"button",children:e.jsx(he,{className:"text-neutral-200 dark:text-black-500 w-4 h-4"})}):B?e.jsx("div",{className:"absolute inset-y-0 flex items-center right-2",children:B}):null]})}),e.jsx(m.AnimatePresence,{children:i&&e.jsx(m.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:e.jsx(P.Typography,{className:"mt-1 text-error-500",appearance:"custom",size:"extra-small",variant:"medium",children:i})})}),e.jsx(m.AnimatePresence,{children:s&&e.jsx(m.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:e.jsx(P.Typography,{className:"mt-1 text-success-500 dark:text-success-300",appearance:"custom",size:"extra-small",variant:"medium",children:s})})})]}),x&&n&&L&&W&&e.jsx("div",{role:"tooltip",tabIndex:0,className:"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",onClick:t=>t.stopPropagation(),onMouseDown:t=>t.preventDefault(),onKeyDown:t=>{t.key==="Escape"&&w(!1)},children:e.jsx(W,{riskDetails:n})})]})});F.displayName="BaseInputField";exports.BaseInputField=F;exports.default=F;
17
+ `}),(r||S)&&e.jsx("label",{id:o,htmlFor:"text",className:`mb-1 text-xs font-medium text-gray-600 inline-flex items-center gap-1 ${M?"":"capitalize"} ${Q||"!uppercse"}`,children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between w-full",children:[e.jsxs("div",{className:"inline-flex flex-wrap items-center gap-1",children:[(r||f||N)&&e.jsx(ue.InputLabel,{label:r??"",required:f||!1,isRequiredConditional:N||!1}),c?.length>0&&c!==u.value&&e.jsx(_.Tooltip,{placement:"top",title:c,children:e.jsx("button",{className:"cursor-pointer",onClick:()=>m(c),type:"button",children:e.jsx(fe,{className:"cursor-pointer pb-0.5 text-primary-600 w-4 h-4"})})}),Y&&e.jsx(D.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),T&&!l.shouldShowConfidenceScore(g)&&e.jsx(de.AIExtractedIndicator,{}),e.jsx(le.Label,{labels:$}),I&&e.jsx(_.Tooltip,{placement:"top",title:I,children:e.jsx("div",{className:"cursor-pointer",children:e.jsx(xe.HelpIcon,{className:"w-icon-sm h-icon-sm"})})}),S]}),e.jsxs("div",{className:"flex items-center gap-1",children:[l.shouldShowConfidenceScore(g)&&d?e.jsx(be,{placement:"top-end",title:K||"",className:"cursor-pointer",children:e.jsxs("div",{className:a("inline-flex min-w-12 items-center gap-1 rounded-md px-1 py-0.5",l.getConfidenceScoreBadgeClass(d)),onClick:()=>G?.(V),children:[e.jsx(ce.AIStarIcon,{size:12,fill:l.getConfidenceScoreBadgeColor(d),fillSecondary:l.getConfidenceScoreBadgeFill(d)}),e.jsxs("span",{className:a("text-xs font-medium leading-4",l.getConfidenceScoreBadgeTextColor(d)),children:[g,"%"]})]})}):null,k&&x&&v?e.jsx("button",{id:`btn-base-input-field-add-to-document-${o}`,className:"cursor-pointer",onClick:()=>se(u?.value),type:"button",children:e.jsx(_.Tooltip,{placement:"top",title:re("Add to document"),children:e.jsx(D.NoteAddOutlined,{className:"text-primary-600",sx:{fontSize:16}})})}):null]})]})}),e.jsx("label",{className:"relative block",children:e.jsxs("div",{className:"relative",children:[p.createElement("input",{...u,ref:R||ee,id:o||r,key:o,required:f,style:{"--input-bg-color":"var(--tw-bg-opacity, 1) rgb(var(--bg-color))",...J},className:a("border border-solid h-8 text-neutral-900 dark:text-black-100 block w-full px-3 py-1.5 font-medium placeholder:font-light placeholder:text-neutral-300 disabled:opacity-70 focus:outline-none focus:ring-0 dark:disabled:placeholder:!text-black-400",A||"text-sm",E||"text-neutral-900 dark:text-black-100",C&&C,q||"",i?a("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)]"):s?a("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"):b&&n?.color?a("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)]",`bg-${n.color}-50 border-${n.color}-300`):te?"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)]":oe?"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)]":ae?"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"),onChange:t=>{m(t.target.value)},onClick:t=>t.stopPropagation(),autoComplete:"off",onBlur:X}),z?e.jsx("button",{className:"absolute inset-y-0 flex items-center cursor-pointer right-2",onClick:()=>{ie(!j),O?.(!j)},type:"button",children:j?e.jsx(pe,{className:"text-gray-400 w-4 h-4"}):e.jsx(he,{className:"text-gray-400 w-4 h-4"})}):Z&&u.value?e.jsx("button",{id:`btn-input-field-clear-${o}`,className:"absolute inset-y-0 flex items-center cursor-pointer right-2 focus:outline-none",onClick:t=>{t.stopPropagation(),m("")},type:"button",children:e.jsx(me,{className:"text-neutral-200 dark:text-black-500 w-4 h-4"})}):B?e.jsx("div",{className:"absolute inset-y-0 flex items-center right-2",children:B}):null]})}),e.jsx(h.AnimatePresence,{children:i&&e.jsx(h.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:e.jsx(P.Typography,{className:"mt-1 text-error-500",appearance:"custom",size:"extra-small",variant:"medium",children:i})})}),e.jsx(h.AnimatePresence,{children:s&&e.jsx(h.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:e.jsx(P.Typography,{className:"mt-1 text-success-500 dark:text-success-300",appearance:"custom",size:"extra-small",variant:"medium",children:s})})})]}),x&&n&&L&&W&&e.jsx("div",{role:"tooltip",tabIndex:0,className:"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",onClick:t=>t.stopPropagation(),onMouseDown:t=>t.preventDefault(),onKeyDown:t=>{t.key==="Escape"&&w(!1)},children:e.jsx(W,{riskDetails:n})})]})});F.displayName="BaseInputField";exports.BaseInputField=F;exports.default=F;
18
18
  //# sourceMappingURL=BaseInputField.cjs.js.map
@@ -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","An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A,EAAAA,IAAC4E,EAAAA,iBACE,SAAAlE,GACCV,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,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"}
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 placeholder:font-light placeholder:text-neutral-300 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,C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,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"}
@@ -2,10 +2,10 @@ import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
2
  import { forwardRef as lr, useState as W, createElement as nr } from "react";
3
3
  import i from "../../../_virtual/index.es.js";
4
4
  import { AnimatePresence as P, motion as j } from "framer-motion";
5
- import { useTranslation as sr } from "react-i18next";
5
+ import { useTranslation as cr } from "react-i18next";
6
6
  import { Tooltip as w } from "antd";
7
7
  import { Typography as D } from "../../data-display/typography/Typography.es.js";
8
- import { Label as cr } from "../../data-display/label/Label.es.js";
8
+ import { Label as sr } from "../../data-display/label/Label.es.js";
9
9
  import { BoltOutlined as ur, NoteAddOutlined as br } from "@mui/icons-material";
10
10
  import { AIExtractedIndicator as mr } from "../../icons/AIExtractedIndicator.es.js";
11
11
  import { AIStarIcon as pr } from "../../icons/AIStarIcon.es.js";
@@ -100,13 +100,13 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
100
100
  inputRef: R,
101
101
  tooltip: E,
102
102
  suffixIcon: S,
103
- revertBackValue: c,
103
+ revertBackValue: s,
104
104
  originalCase: J = !1,
105
105
  textSize: B,
106
106
  isAiExtracted: Q = !1,
107
107
  isGTN: h = !1,
108
108
  confidenceScore: k,
109
- confidenceType: s = "high",
109
+ confidenceType: c = "high",
110
110
  confidenceTooltip: U,
111
111
  gtnName: X = null,
112
112
  inputClassName: A = "",
@@ -124,7 +124,7 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
124
124
  onConfidenceScoreClick: T,
125
125
  ...u
126
126
  }, rr) => {
127
- const { t: er } = sr(), b = !!(I && n?.color), or = x === "modified" && !d && !l && !b, tr = x === "deleted" && !d && !l && !b, ar = x === "success" && !d && !l && !b, [v, ir] = W(!1), [m, y] = W(!1), dr = (t) => {
127
+ const { t: er } = cr(), b = !!(I && n?.color), or = x === "modified" && !d && !l && !b, tr = x === "deleted" && !d && !l && !b, ar = x === "success" && !d && !l && !b, [v, ir] = W(!1), [m, y] = W(!1), dr = (t) => {
128
128
  g && g({
129
129
  key: X,
130
130
  value: t
@@ -168,11 +168,11 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
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
170
  (e || f || _) && /* @__PURE__ */ r(fr, { label: e ?? "", required: f || !1, isRequiredConditional: _ || !1 }),
171
- c?.length > 0 && c !== u.value && /* @__PURE__ */ r(w, { placement: "top", title: c, children: /* @__PURE__ */ r(
171
+ s?.length > 0 && s !== u.value && /* @__PURE__ */ r(w, { placement: "top", title: s, children: /* @__PURE__ */ r(
172
172
  "button",
173
173
  {
174
174
  className: "cursor-pointer",
175
- onClick: () => p(c),
175
+ onClick: () => p(s),
176
176
  type: "button",
177
177
  children: /* @__PURE__ */ r(
178
178
  Nr,
@@ -193,12 +193,12 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
193
193
  }
194
194
  ),
195
195
  Q && !$(k) && /* @__PURE__ */ r(mr, {}),
196
- /* @__PURE__ */ r(cr, { labels: z }),
196
+ /* @__PURE__ */ r(sr, { labels: z }),
197
197
  E && /* @__PURE__ */ r(w, { placement: "top", title: E, children: /* @__PURE__ */ r("div", { className: "cursor-pointer", children: /* @__PURE__ */ r(yr, { className: "w-icon-sm h-icon-sm" }) }) }),
198
198
  F
199
199
  ] }),
200
200
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1", children: [
201
- $(k) && s ? /* @__PURE__ */ r(
201
+ $(k) && c ? /* @__PURE__ */ r(
202
202
  hr,
203
203
  {
204
204
  placement: "top-end",
@@ -209,7 +209,7 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
209
209
  {
210
210
  className: i(
211
211
  "inline-flex min-w-12 items-center gap-1 rounded-md px-1 py-0.5",
212
- vr(s)
212
+ vr(c)
213
213
  ),
214
214
  onClick: () => T?.(G),
215
215
  children: [
@@ -217,8 +217,8 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
217
217
  pr,
218
218
  {
219
219
  size: 12,
220
- fill: gr(s),
221
- fillSecondary: kr(s)
220
+ fill: gr(c),
221
+ fillSecondary: kr(c)
222
222
  }
223
223
  ),
224
224
  /* @__PURE__ */ a(
@@ -226,7 +226,7 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
226
226
  {
227
227
  className: i(
228
228
  "text-xs font-medium leading-4",
229
- xr(s)
229
+ xr(c)
230
230
  ),
231
231
  children: [
232
232
  k,
@@ -275,7 +275,7 @@ const wr = ({ className: o, size: e = 16 }) => /* @__PURE__ */ a(
275
275
  ...Y
276
276
  },
277
277
  className: i(
278
- "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",
278
+ "border border-solid h-8 text-neutral-900 dark:text-black-100 block w-full px-3 py-1.5 font-medium placeholder:font-light placeholder:text-neutral-300 disabled:opacity-70 focus:outline-none focus:ring-0 dark:disabled:placeholder:!text-black-400",
279
279
  B || "text-sm",
280
280
  C || "text-neutral-900 dark:text-black-100",
281
281
  N && N,