{"version":3,"sources":["../src/Modal/Modal.tsx"],"sourcesContent":["import * as React from 'react';\nimport { clsx } from 'clsx';\n\nexport interface ModalProps {\n  /**\n   * The content of the modal (typically ModalHeader, content, and ModalFooter)\n   */\n  children: React.ReactNode;\n  /**\n   * Width of the modal\n   * @default 584\n   */\n  width?: number | string;\n  /**\n   * Additional CSS class name\n   */\n  className?: string;\n  /**\n   * Additional inline styles\n   */\n  style?: React.CSSProperties;\n}\n\nexport interface ModalContentProps {\n  /**\n   * The content to display in the modal body\n   */\n  children: React.ReactNode;\n  /**\n   * Additional CSS class name\n   */\n  className?: string;\n  /**\n   * Additional inline styles\n   */\n  style?: React.CSSProperties;\n}\n\n// Arbor Design System modal styles\nconst modalStyles = {\n  container: {\n    display: 'flex',\n    flexDirection: 'column' as const,\n    alignItems: 'flex-start',\n    backgroundColor: '#f8f8f8', // grey-050\n    borderRadius: '8px',\n    boxShadow: '0px 8px 24px 0px rgba(32, 32, 32, 0.12)',\n    overflow: 'hidden',\n    boxSizing: 'border-box' as const,\n    fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n  },\n  content: {\n    display: 'flex',\n    alignItems: 'center',\n    justifyContent: 'center',\n    width: '100%',\n    padding: '32px 16px',\n    backgroundColor: '#f8f8f8', // grey-050\n    boxSizing: 'border-box' as const,\n  },\n  contentText: {\n    flex: 1,\n    fontSize: '13px',\n    fontWeight: '400',\n    color: '#2f2f2f',\n    lineHeight: '1.5',\n  },\n};\n\n/**\n * Modal component - Arbor Design System\n *\n * A modal dialog container that wraps ModalHeader, content, and ModalFooter.\n *\n * @example\n * ```tsx\n * <Modal width={584}>\n *   <ModalHeader\n *     title=\"Delete postal address?\"\n *     onClose={() => setIsOpen(false)}\n *   />\n *   <ModalContent>\n *     <p>This will delete the postal address. Are you sure?</p>\n *   </ModalContent>\n *   <ModalFooter>\n *     <Button variant=\"tertiary\">Cancel</Button>\n *     <Button variant=\"destructive-secondary\">Confirm</Button>\n *   </ModalFooter>\n * </Modal>\n * ```\n */\nexport const Modal = React.forwardRef<HTMLDivElement, ModalProps>(\n  ({ children, width = 584, className, style, ...props }, ref) => {\n    return (\n      <div\n        ref={ref}\n        className={clsx('arbor-modal', className)}\n        style={{\n          ...modalStyles.container,\n          width: typeof width === 'number' ? `${width}px` : width,\n          ...style,\n        }}\n        role=\"dialog\"\n        aria-modal=\"true\"\n        {...props}\n      >\n        {children}\n      </div>\n    );\n  }\n);\n\nModal.displayName = 'Modal';\n\n/**\n * ModalContent component - Arbor Design System\n *\n * The content/body area of a modal dialog.\n *\n * @example\n * ```tsx\n * <ModalContent>\n *   <p>Your content here</p>\n * </ModalContent>\n * ```\n */\nexport const ModalContent = React.forwardRef<HTMLDivElement, ModalContentProps>(\n  ({ children, className, style, ...props }, ref) => {\n    return (\n      <div\n        ref={ref}\n        className={clsx('arbor-modal-content', className)}\n        style={{ ...modalStyles.content, ...style }}\n        {...props}\n      >\n        <div style={modalStyles.contentText}>{children}</div>\n      </div>\n    );\n  }\n);\n\nModalContent.displayName = 'ModalContent';\n"],"mappings":";AAAA,YAAY,WAAW;AACvB,SAAS,YAAY;AA6Ff;AAvDN,IAAM,cAAc;AAAA,EAClB,WAAW;AAAA,IACT,SAAS;AAAA,IACT,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,iBAAiB;AAAA;AAAA,IACjB,cAAc;AAAA,IACd,WAAW;AAAA,IACX,UAAU;AAAA,IACV,WAAW;AAAA,IACX,YAAY;AAAA,EACd;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,OAAO;AAAA,IACP,SAAS;AAAA,IACT,iBAAiB;AAAA;AAAA,IACjB,WAAW;AAAA,EACb;AAAA,EACA,aAAa;AAAA,IACX,MAAM;AAAA,IACN,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,YAAY;AAAA,EACd;AACF;AAwBO,IAAM,QAAc;AAAA,EAC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