{"version":3,"file":"LoadingAnimate.cjs","sources":["../../../../src/components/theme/LoadingAnimate.tsx"],"sourcesContent":["import React from \"react\";\n\nexport interface LoadingAnimateProps {\n  /**\n   * \"page\" (default): the full-viewport overlay, for a whole page loading.\n   * \"inline\": stays inside its container, for a panel, card, modal section or\n   * expanded table row. Never use \"page\" for part of a screen: it is\n   * `position: fixed` and blanks everything while that one part loads.\n   */\n  variant?: \"page\" | \"inline\";\n  /** Screen-reader text for the inline variant. Defaults to \"Loading\". */\n  label?: string;\n}\n\nfunction Ellipsis() {\n  return (\n    <div className=\"lds-ellipsis\" aria-hidden=\"true\">\n      <div></div>\n      <div></div>\n      <div></div>\n      <div></div>\n    </div>\n  );\n}\n\n/**\n * Animated three-dot loader.\n * @param props - {@link LoadingAnimateProps}\n * @example\n * <LoadingAnimate />                                  // whole page\n * <LoadingAnimate variant=\"inline\" label=\"Loading people\" />  // one section\n */\nexport default function LoadingAnimate({ variant = \"page\", label = \"Loading\" }: LoadingAnimateProps = {}) {\n  if (variant === \"inline\") {\n    return (\n      <div className=\"ihub-loading-inline\" role=\"status\" aria-live=\"polite\">\n        <Ellipsis />\n        <span className=\"ihub-loading-inline__label\">{label}</span>\n      </div>\n    );\n  }\n  return (\n    <div className=\"react_loading container\">\n      <div>\n        <Ellipsis />\n      </div>\n    </div>\n  );\n}\n"],"names":["Ellipsis","_jsxs","className","children","_jsx","jsx","_ref","arguments","length","undefined","_ref$variant","variant","_ref$label","label","role"],"mappings":"uGAcA,SAASA,IACP,OACEC,EAAAA,KAAK,MAAA,CAAAC,UAAU,6BAA2B,OAAMC,SAAA,CAC9CC,EAAAA,IAAW,MAAA,CAAA,GACXA,gBACAA,EAAAC,IAAA,MAAA,CAAA,GACAD,EAAAA,IAAW,MAAA,CAAA,KAGjB,iBASwB,WAAgF,IAAAE,EAAAC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAF,CAAE,EAAAG,EAAAJ,EAA/DK,QAAAA,OAAU,IAAHD,EAAG,OAAMA,EAAAE,EAAAN,EAAEO,MAAAA,OAAQ,IAAHD,EAAG,UAASA,EAC1E,MAAgB,WAAZD,EAEAV,EAAAA,KAAK,MAAA,CAAAC,UAAU,sBAAsBY,KAAK,SAAQ,YAAW,SAAQX,SAAA,CACnEC,EAAAA,IAACJ,EAAQ,CAAA,GACTI,EAAAC,IAAA,OAAA,CAAMH,UAAU,6BAA4BC,SAAEU,OAKlDT,EAAAA,IAAA,MAAA,CAAKF,UAAU,0BAAyBC,SACtCC,EACEC,IAAA,MAAA,CAAAF,SAAAC,EAAAA,IAACJ,EAAQ,OAIjB"}