{"version":3,"sources":["../src/ListRowMultiLine/ListRowMultiLine.tsx"],"sourcesContent":["import * as React from 'react';\nimport { clsx } from 'clsx';\n\nexport interface ListRowMultiLineProps {\n  /**\n   * The heading/title text (displayed on line 1, larger and bold)\n   */\n  title: string;\n  /**\n   * The description text (displayed on line 2, smaller and regular weight)\n   */\n  description: string;\n  /**\n   * Show the right arrow icon - enables hover state and indicates row is clickable\n   * @default false\n   */\n  icon?: boolean;\n  /**\n   * Click handler - typically used with icon prop for navigation\n   */\n  onClick?: () => void;\n  /**\n   * Additional CSS class name\n   */\n  className?: string;\n  /**\n   * Additional inline styles\n   */\n  style?: React.CSSProperties;\n}\n\n// Caret/Arrow icon - transforms on hover\nconst CaretIcon = ({ isHovered }: { isHovered: boolean }) => {\n  if (isHovered) {\n    // Arrow pointing right on hover\n    return (\n      <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n        <path\n          d=\"M6 4L10 8L6 12\"\n          stroke=\"#2f2f2f\"\n          strokeWidth=\"1.2\"\n          strokeLinecap=\"round\"\n          strokeLinejoin=\"round\"\n        />\n      </svg>\n    );\n  }\n  // Default caret (chevron right)\n  return (\n    <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n      <path\n        d=\"M6 4L10 8L6 12\"\n        stroke=\"#b3b3b3\"\n        strokeWidth=\"1.2\"\n        strokeLinecap=\"round\"\n        strokeLinejoin=\"round\"\n      />\n    </svg>\n  );\n};\n\n// Arbor Design System list row multiple lines styles\nconst listRowMultiLineStyles = {\n  container: {\n    display: 'flex',\n    alignItems: 'center',\n    width: '100%',\n    borderBottom: '1px solid #f8f8f8',\n    fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n    boxSizing: 'border-box' as const,\n    borderRadius: '8px',\n    transition: 'background-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out',\n    outline: 'none',\n  },\n  containerHover: {\n    backgroundColor: '#f8f8f8',\n  },\n  containerFocus: {\n    outline: '3px solid #3cad51',\n    outlineOffset: '-3px',\n  },\n  containerClickable: {\n    cursor: 'pointer',\n  },\n  content: {\n    display: 'flex',\n    alignItems: 'center',\n    justifyContent: 'space-between',\n    width: '100%',\n    padding: '4px 8px',\n    minHeight: '44px',\n  },\n  textContent: {\n    display: 'flex',\n    flexDirection: 'column' as const,\n    alignItems: 'flex-start',\n    justifyContent: 'center',\n    flex: 1,\n    gap: '0px',\n  },\n  title: {\n    fontSize: '16px',\n    fontWeight: '600',\n    color: '#2f2f2f',\n    lineHeight: '1.5',\n    margin: 0,\n  },\n  description: {\n    fontSize: '13px',\n    fontWeight: '400',\n    color: '#2f2f2f',\n    lineHeight: '1.5',\n    margin: 0,\n  },\n  iconWrapper: {\n    display: 'flex',\n    alignItems: 'center',\n    justifyContent: 'center',\n    width: '16px',\n    height: '16px',\n    flexShrink: 0,\n    marginLeft: '8px',\n  },\n};\n\n/**\n * ListRowMultiLine component - Arbor Design System\n *\n * A list row component with content displayed on two vertical lines.\n * Cannot be mixed with single-line ListRow in the same section.\n * Hover state is only enabled when icon is present (indicating clickable row).\n *\n * @example\n * ```tsx\n * // Basic multi-line row (not clickable)\n * <ListRowMultiLine\n *   title=\"Section Title\"\n *   description=\"A brief description of this section\"\n * />\n *\n * // Clickable multi-line row with icon\n * <ListRowMultiLine\n *   title=\"View Details\"\n *   description=\"Click to see more information\"\n *   icon\n *   onClick={() => navigate('/details')}\n * />\n * ```\n */\nexport const ListRowMultiLine = React.forwardRef<HTMLDivElement, ListRowMultiLineProps>(\n  ({ title, description, icon = false, onClick, className, style, ...props }, ref) => {\n    const [isHovered, setIsHovered] = React.useState(false);\n    const [isFocused, setIsFocused] = React.useState(false);\n\n    // Only enable hover state when icon is present\n    const showHoverState = icon && isHovered;\n    const isClickable = icon && onClick;\n\n    const containerStyle: React.CSSProperties = {\n      ...listRowMultiLineStyles.container,\n      ...(showHoverState && listRowMultiLineStyles.containerHover),\n      ...(isFocused && listRowMultiLineStyles.containerFocus),\n      ...(isClickable && listRowMultiLineStyles.containerClickable),\n      ...style,\n    };\n\n    const handleClick = () => {\n      if (isClickable && onClick) {\n        onClick();\n      }\n    };\n\n    const handleKeyDown = (event: React.KeyboardEvent) => {\n      if (isClickable && (event.key === 'Enter' || event.key === ' ')) {\n        event.preventDefault();\n        onClick?.();\n      }\n    };\n\n    return (\n      <div\n        ref={ref}\n        className={clsx('arbor-list-row-multi-line', className)}\n        style={containerStyle}\n        onClick={handleClick}\n        onMouseEnter={() => icon && setIsHovered(true)}\n        onMouseLeave={() => setIsHovered(false)}\n        onFocus={() => setIsFocused(true)}\n        onBlur={() => setIsFocused(false)}\n        onKeyDown={handleKeyDown}\n        tabIndex={isClickable ? 0 : undefined}\n        role={isClickable ? 'button' : undefined}\n        {...props}\n      >\n        <div style={listRowMultiLineStyles.content}>\n          <div style={listRowMultiLineStyles.textContent}>\n            <span style={listRowMultiLineStyles.title}>{title}</span>\n            <span style={listRowMultiLineStyles.description}>{description}</span>\n          </div>\n          {icon && (\n            <div style={listRowMultiLineStyles.iconWrapper}>\n              <CaretIcon isHovered={isHovered} />\n            </div>\n          )}\n        </div>\n      </div>\n    );\n  }\n);\n\nListRowMultiLine.displayName = 'ListRowMultiLine';\n"],"mappings":";AAAA,YAAY,WAAW;AACvB,SAAS,YAAY;AAoCb,cA8JE,YA9JF;AALR,IAAM,YAAY,CAAC,EAAE,UAAU,MAA8B;AAC3D,MAAI,WAAW;AAEb,WACE,oBAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAChE;AAAA,MAAC;AAAA;AAAA,QACC,GAAE;AAAA,QACF,QAAO;AAAA,QACP,aAAY;AAAA,QACZ,eAAc;AAAA,QACd,gBAAe;AAAA;AAAA,IACjB,GACF;AAAA,EAEJ;AAEA,SACE,oBAAC,SAAI,OAAM,MAAK,QAAO,MAAK,S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