import { Meta, Markdown } from "@storybook/addon-docs/blocks";
import componentList from "./component-list.json";

<Meta title="Welcome" />

<style>{`
  .component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
  }
  .component-card {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1.25rem;
    background: #fff;
    transition: box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
  }
  .component-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
  }
  .component-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #003865;
  }
  .component-card-scope {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: #f5f5f5;
    border-radius: 3px;
    margin-bottom: 0.5rem;
  }
  .component-card-description {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
  }
  .category-section {
    margin-bottom: 3rem;
  }
  .category-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #003865;
  }
`}
</style>


## Welcome to the QGDS Bootstrap 5 library

This Storybook serves as the interactive documentation for the Bootstrap 5 implementation of the Queensland Government Design System (QGDS).

Whether you are starting a new project or updating an existing application, this library provides a robust, accessible, and compliant foundation for building digital services that look and feel like Queensland Government.

## How to navigate this Storybook

Use the sidebar to explore components organised by category.

Find component variations and other information on each Overview tab.

In each individual story, open the Actions panel to explore adjustable properties (Controls) and example code (Code references)

## Components

The following core components are available in this library.  Additional layout and utility components can be found in the sidebar.

<div className="component-grid">
  {componentList.map(component => (
    <a 
      key={component.id} 
      href={`/?path=${component.storyPath}`}
      className="component-card"
    >
      <div className="component-card-title">{component.title}</div>
    </a>
  ))}
</div>


## How to use
Use this guide to implement the QGDS Bootstrap 5 edition in your web page or application.<br /><br />
[How to use guide](?path=/docs/introduction-how-to-use--overview)


## How to contribute
Use this guide if working on or contributing to the QGDS Bootstrap 5 source code itself. It outlines the architecture, build processes, Github setup and repository forking.<br /><br />
[Project development guide](?path=/docs/introduction-development--overview)


## The QGDS Ecosystem
This library is part of a coordinated suite of tools designed to ensure visual and functional consistency across all Queensland Government digital touchpoints:

- [Figma UI Kit](https://www.figma.com/community/file/978450410021220739): The design source of truth and visual specification for all components.
- [QGDS Website](https://www.designsystem.qld.gov.au): The central hub for Design System and component guidance and documentation.
- [Design Tokens](https://github.com/qld-gov-au/design-tokens): (WIP) The foundational variables (colors, spacing, typography) that power our styles.
- [QGDS Web Components](https://github.com/qld-gov-au/qgds-web-components): (WIP) A framework-agnostic implementation of Design System by the Queensland Government.
- [Vanilla QGDS Component Library](https://github.com/Qld-Health-Online-Team/design-system): An independent framework-agnostic implementation of Design System by Queensland Health.