<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Kole UI · ProgressVariants（普通 H5）</title>
  <link rel="stylesheet" href="../.design_library/kole-ui/colors_and_type.css" />
  <link rel="stylesheet" href="ProgressVariants.css" />
  <style>body{margin:0;padding:24px;background: var(--kole-color-page-bg);display:flex;flex-direction:column;gap:24px;}
    .kole-card{background: var(--kole-color-card-bg);border: 1px solid var(--kole-color-border);border-radius:8px;padding:20px;max-width:420px;}</style>
</head>
<body>
  <div class="kole-card">
    <div class="kole-progress is-success" role="progressbar" style="margin-bottom:12px">
      <div class="kole-progress-line-wrap">
        <div class="kole-progress-line"><div class="kole-progress-line-fill" style="width:100%"></div></div>
        <span class="kole-progress-text">完成</span>
      </div>
    </div>
    <div class="kole-progress" role="progressbar">
      <div class="kole-progress-line-wrap">
        <div class="kole-progress-line"><div class="kole-progress-line-fill" style="width:60%"></div></div>
        <span class="kole-progress-text">60%</span>
      </div>
    </div>
  </div>

  <div class="kole-card" style="display:flex;gap:24px;align-items:center">
    <div class="kole-progress-circle" role="progressbar" id="c1"></div>
    <div class="kole-progress-circle" role="progressbar" id="c2"></div>
  </div>

  <script>
    var C = 2 * Math.PI * 42;
    function circle(el, percent, status) {
      var color = { success: '#2E7D0A', warning: '#8C5A00', error: '#CF1322', normal: '#2F54EB' }[status] || '#2F54EB';
      el.className = 'kole-progress-circle' + (status !== 'normal' ? ' is-' + status : '');
      el.innerHTML = '<svg width="100" height="100" viewBox="0 0 100 100">' +
        '<circle cx="50" cy="50" r="42" fill="none" stroke="#E8ECF1" stroke-width="8" />' +
        '<circle cx="50" cy="50" r="42" fill="none" stroke="' + color + '" stroke-width="8" stroke-linecap="round" ' +
        'stroke-dasharray="' + C + '" stroke-dashoffset="' + (C * (1 - percent / 100)).toFixed(2) + '" transform="rotate(-90 50 50)" /></svg>' +
        '<span class="kole-progress-circle-text">' + percent + '%</span>';
    }
    circle(document.getElementById('c1'), 72, 'normal');
    circle(document.getElementById('c2'), 88, 'success');
  </script>
</body>
</html>
