<!-- @dsCard group="Components" viewport="700x360" name="Core 核心控件" subtitle="Button · IconButton · Badge · Kbd · ProgressBar · Card" -->
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="../../styles.css">
<script src="https://unpkg.com/react@18.3.1/umd/react.development.js" integrity="sha384-hD6/rw4ppMLGNu3tX5cjIb+uRZ7UkRJ6BPkLpg4hAu/6onKUg4lLsHAs9EBPT82L" crossorigin="anonymous"></script>
<script src="https://unpkg.com/react-dom@18.3.1/umd/react-dom.development.js" integrity="sha384-u6aeetuaXnQ38mYT8rp6sbXaQe3NL9t+IBXmnYxwkUI2Hw4bsp2Wvmx4yRQF1uAm" crossorigin="anonymous"></script>
<script src="https://unpkg.com/@babel/standalone@7.29.0/babel.min.js" integrity="sha384-m08KidiNqLdpJqLq95G/LEi8Qvjl/xUYll3QILypMoQ65QorJ9Lvtp2RXYGBFj1y" crossorigin="anonymous"></script>
<script src="../../_ds_bundle.js"></script>
<style>
  body { margin: 0; font-family: var(--font-sans); display: grid; grid-template-columns: 1fr 1fr; }
  .pane { padding: 20px 22px; background: var(--bg-app); color: var(--text-1); min-height: 360px; box-sizing: border-box; }
  .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
</style>
</head>
<body>
  <div class="pane" id="light"></div>
  <div class="pane" id="dark" data-theme="dark"></div>
  <script type="text/babel">
    const { Button, IconButton, Badge, Kbd, HotkeyCombo, Card, ProgressBar } = window.DuduDesignSystem_2e0172;
    const GearIcon = () => (
      <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
        <path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"></path>
        <circle cx="12" cy="12" r="3"></circle>
      </svg>
    );
    function Demo() {
      return (
        <div>
          <div className="row">
            <Button variant="primary">购买时长</Button>
            <Button variant="secondary">充值</Button>
            <Button variant="ghost">查看用量</Button>
            <Button variant="danger">退出登录</Button>
          </div>
          <div className="row">
            <Button variant="primary" size="sm">小按钮</Button>
            <Button variant="primary" size="lg">移动端 44px</Button>
            <Button variant="primary" disabled>禁用</Button>
            <IconButton label="设置"><GearIcon /></IconButton>
          </div>
          <div className="row">
            <Badge tone="green">余额充足</Badge>
            <Badge tone="blue">试用中</Badge>
            <Badge tone="orange">时长将用完</Badge>
            <Badge tone="red">连接失败</Badge>
            <Badge tone="neutral">免费版</Badge>
          </div>
          <div className="row">
            <HotkeyCombo keys={['⌘', '⇧', 'Space']} />
            <span style={{ fontSize: 'var(--text-sm)', color: 'var(--text-2)' }}>按住说话</span>
          </div>
          <Card padding="14px 16px">
            <div style={{ display: 'flex', justifyContent: 'space-between', fontSize: 'var(--text-sm)', color: 'var(--text-2)', marginBottom: 8 }}>
              <span>时长余额</span><span>472 / 600 分钟</span>
            </div>
            <ProgressBar value={472} max={600} />
          </Card>
        </div>
      );
    }
    ReactDOM.createRoot(document.getElementById('light')).render(<Demo />);
    ReactDOM.createRoot(document.getElementById('dark')).render(<Demo />);
  </script>
</body>
</html>
