@chassis-ui/docs 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/components/DocsSidebar.astro +6 -0
- package/src/components/FeatureCard.astro +64 -0
- package/src/components/NavLink.astro +13 -3
- package/src/components/ResponsiveImage.astro +12 -0
- package/src/components/TableOfContents.astro +10 -0
- package/src/components/ThemeToggler.astro +7 -0
- package/src/components/shortcodes/AddedIn.astro +5 -2
- package/src/components/shortcodes/Callout.astro +6 -0
- package/src/components/shortcodes/CxTable.astro +6 -0
- package/src/layouts/BaseLayout.astro +6 -0
- package/src/layouts/DocsLayout.astro +10 -0
- package/src/layouts/IconsLayout.astro +6 -0
- package/src/layouts/RedirectLayout.astro +7 -0
- package/src/layouts/SingleLayout.astro +8 -0
- package/src/layouts/footer/Footer.astro +20 -15
- package/src/layouts/footer/Scripts.astro +7 -0
- package/src/layouts/head/Analytics.astro +6 -5
- package/src/layouts/head/Favicons.astro +6 -0
- package/src/layouts/head/Head.astro +12 -0
- package/src/layouts/head/Social.astro +10 -0
- package/src/layouts/head/Stylesheet.astro +8 -0
- package/src/layouts/header/Header.astro +10 -2
- package/src/layouts/header/Navigation.astro +27 -10
- package/src/layouts/header/Skippy.astro +7 -0
- package/src/libs/layout.ts +1 -1
- package/src/scss/_docsearch.scss +3 -3
- package/src/scss/_settings.scss +0 -9
- package/src/scss/_syntax.scss +34 -32
- package/src/scss/main.scss +70 -5
- package/src/components/Card.astro +0 -19
- package/src/components/NavDocsMenu.astro +0 -26
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ pnpm add @chassis-ui/docs
|
|
|
23
23
|
This package requires the following peer dependencies:
|
|
24
24
|
|
|
25
25
|
- `@chassis-ui/css`: Chassis CSS framework
|
|
26
|
-
- `@chassis-ui/icons`: Chassis icon library
|
|
26
|
+
- `@chassis-ui/icons`: Chassis icon library
|
|
27
27
|
- `@chassis-ui/tokens`: Chassis design tokens
|
|
28
28
|
- `astro`: ^4.0.0 || ^5.0.0
|
|
29
29
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* Feature Card Component
|
|
4
|
+
*
|
|
5
|
+
* A reusable card component for displaying features with icon, title, body, and optional content.
|
|
6
|
+
*
|
|
7
|
+
* @slot title - Feature title (required)
|
|
8
|
+
* @slot body - Feature description (required)
|
|
9
|
+
* @slot default - Optional additional content (images, code blocks, etc.)
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
interface Props {
|
|
13
|
+
/** Icon ID from the SVG sprite (e.g., "cx-folder-tree") */
|
|
14
|
+
icon?: string
|
|
15
|
+
/** Additional CSS classes to apply to the card */
|
|
16
|
+
classes?: string
|
|
17
|
+
/** Whether to display the header in horizontal layout (icon + text side by side) */
|
|
18
|
+
horizontal?: boolean
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const { icon, classes, horizontal = false } = Astro.props
|
|
22
|
+
|
|
23
|
+
// Check if default slot has content without rendering it
|
|
24
|
+
const hasContent = Astro.slots.has('default')
|
|
25
|
+
|
|
26
|
+
// Build class strings
|
|
27
|
+
const cardClasses = [
|
|
28
|
+
'feature-item bg-even d-flex flex-column rounded-large',
|
|
29
|
+
'p-medium p-large-xlarge gap-medium gap-medium-xlarge',
|
|
30
|
+
horizontal ? 'h-auto' : 'h-100',
|
|
31
|
+
classes
|
|
32
|
+
]
|
|
33
|
+
.filter(Boolean)
|
|
34
|
+
.join(' ')
|
|
35
|
+
|
|
36
|
+
const headerClasses = [
|
|
37
|
+
'feature-header d-flex',
|
|
38
|
+
'gap-medium gap-medium-xlarge',
|
|
39
|
+
horizontal ? 'flex-column flex-medium-row' : 'flex-column'
|
|
40
|
+
].join(' ')
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
<div class={cardClasses}>
|
|
44
|
+
<div class={headerClasses}>
|
|
45
|
+
{
|
|
46
|
+
icon && (
|
|
47
|
+
<div class="feature-thumb">
|
|
48
|
+
<svg class="icon feature-icon icon-3xlarge icon-medium-4xlarge" aria-hidden="true">
|
|
49
|
+
<use href={`#${icon}`} />
|
|
50
|
+
</svg>
|
|
51
|
+
</div>
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
<div>
|
|
55
|
+
<h3 class="feature-title font-large font-medium-xlarge mb-3xsmall mb-medium-2xsmall">
|
|
56
|
+
<slot name="title" />
|
|
57
|
+
</h3>
|
|
58
|
+
<p class="feature-body font-medium-large mb-0">
|
|
59
|
+
<slot name="body" />
|
|
60
|
+
</p>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
{hasContent && <slot />}
|
|
64
|
+
</div>
|
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* Nav Link
|
|
4
|
+
*
|
|
5
|
+
* Navigation link component with active state support.
|
|
6
|
+
*/
|
|
7
|
+
|
|
2
8
|
interface Props {
|
|
9
|
+
/** Whether the link is currently active */
|
|
3
10
|
active?: boolean
|
|
11
|
+
/** Additional CSS classes */
|
|
4
12
|
class?: string
|
|
13
|
+
/** Link destination URL */
|
|
5
14
|
href: string
|
|
15
|
+
/** Link relationship attribute */
|
|
6
16
|
rel?: HTMLAnchorElement['rel']
|
|
17
|
+
/** Link target attribute */
|
|
7
18
|
target?: HTMLAnchorElement['target']
|
|
19
|
+
/** Enable analytics tracking */
|
|
8
20
|
track?: boolean
|
|
9
21
|
}
|
|
10
22
|
|
|
11
|
-
const { active, class: className,
|
|
12
|
-
|
|
13
|
-
const content = await Astro.slots.render('default')
|
|
23
|
+
const { active, class: className, ...props } = Astro.props
|
|
14
24
|
---
|
|
15
25
|
|
|
16
26
|
<li class="nav-item col-6 col-large-auto">
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* Responsive Image
|
|
4
|
+
*
|
|
5
|
+
* Render responsive images with 1x and 2x resolution variants.
|
|
6
|
+
*/
|
|
7
|
+
|
|
2
8
|
interface Props {
|
|
9
|
+
/** Path to the image file */
|
|
3
10
|
imgPath: string
|
|
11
|
+
/** Alternative text for the image */
|
|
4
12
|
alt: string
|
|
13
|
+
/** Additional CSS classes */
|
|
5
14
|
classes?: string
|
|
15
|
+
/** Enable lazy loading */
|
|
6
16
|
lazyload?: boolean
|
|
17
|
+
/** Image width in pixels */
|
|
7
18
|
width?: number
|
|
19
|
+
/** Image height in pixels */
|
|
8
20
|
height?: number
|
|
9
21
|
}
|
|
10
22
|
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* Table of Contents
|
|
4
|
+
*
|
|
5
|
+
* Generate and render a hierarchical table of contents from headings.
|
|
6
|
+
*/
|
|
7
|
+
|
|
2
8
|
import type { MarkdownHeading } from 'astro'
|
|
3
9
|
import { generateToc, type TocEntry } from '../libs/toc'
|
|
4
10
|
|
|
5
11
|
interface Props {
|
|
12
|
+
/** Markdown headings to generate TOC from */
|
|
6
13
|
headings?: MarkdownHeading[]
|
|
14
|
+
/** Pre-generated TOC entries */
|
|
7
15
|
entries?: TocEntry[]
|
|
16
|
+
/** Current nesting level */
|
|
8
17
|
level?: number
|
|
18
|
+
/** TOC generation configuration */
|
|
9
19
|
config?: any
|
|
10
20
|
}
|
|
11
21
|
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
*
|
|
2
|
+
/**
|
|
3
|
+
* Added In
|
|
4
|
+
*
|
|
5
|
+
* Display a badge showing the version when a feature was added.
|
|
4
6
|
*/
|
|
5
7
|
|
|
6
8
|
interface Props {
|
|
9
|
+
/** Version number when the feature was added */
|
|
7
10
|
version: string
|
|
8
11
|
}
|
|
9
12
|
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* Callout
|
|
4
|
+
*
|
|
5
|
+
* Display informational callout boxes with different types (info, danger, warning).
|
|
6
|
+
*/
|
|
7
|
+
|
|
2
8
|
import { getCalloutByName, type CalloutName } from '@libs/content'
|
|
3
9
|
import { render } from 'astro:content'
|
|
4
10
|
import type { MarkdownInstance } from 'astro'
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* Base Layout
|
|
4
|
+
*
|
|
5
|
+
* Main layout wrapper for all pages with configurable HTML attributes and layout modes.
|
|
6
|
+
*/
|
|
7
|
+
|
|
2
8
|
import type { CollectionEntry } from 'astro:content'
|
|
3
9
|
import { getConfig } from '@libs/config'
|
|
4
10
|
import type { Layout, LayoutOverridesHTMLAttributes } from '../libs/layout'
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* Docs Layout
|
|
4
|
+
*
|
|
5
|
+
* Layout for documentation pages with sidebar navigation and table of contents.
|
|
6
|
+
*/
|
|
7
|
+
|
|
2
8
|
import type { MarkdownHeading } from 'astro'
|
|
3
9
|
import type { CollectionEntry } from 'astro:content'
|
|
4
10
|
import { getConfig } from '@libs/config'
|
|
@@ -10,8 +16,11 @@ import DocsSidebar from '../components/DocsSidebar.astro'
|
|
|
10
16
|
import TableOfContents from '../components/TableOfContents.astro'
|
|
11
17
|
|
|
12
18
|
interface Props {
|
|
19
|
+
/** Frontmatter data from the docs collection */
|
|
13
20
|
frontmatter: CollectionEntry<'docs'>['data']
|
|
21
|
+
/** Markdown headings for table of contents */
|
|
14
22
|
headings?: MarkdownHeading[]
|
|
23
|
+
/** Document ID from the docs collection */
|
|
15
24
|
id: CollectionEntry<'docs'>['id']
|
|
16
25
|
}
|
|
17
26
|
|
|
@@ -23,6 +32,7 @@ const parentDirectory = id.includes('/') ? id.split('/')[0] : ''
|
|
|
23
32
|
const bodyProps: LayoutOverridesHTMLAttributes<'body'> = {}
|
|
24
33
|
|
|
25
34
|
if (frontmatter.toc) {
|
|
35
|
+
bodyProps['class'] = 'docs-body'
|
|
26
36
|
bodyProps['data-cx-spy'] = 'scroll'
|
|
27
37
|
bodyProps['data-cx-target'] = '#TableOfContents'
|
|
28
38
|
}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* Single Layout
|
|
4
|
+
*
|
|
5
|
+
* Simple single-column layout for standalone pages.
|
|
6
|
+
*/
|
|
7
|
+
|
|
2
8
|
import BaseLayout from './BaseLayout.astro'
|
|
3
9
|
|
|
4
10
|
interface Props {
|
|
11
|
+
/** Page description */
|
|
5
12
|
description: string
|
|
13
|
+
/** Page title */
|
|
6
14
|
title: string
|
|
7
15
|
}
|
|
8
16
|
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Footer
|
|
4
|
+
*
|
|
5
|
+
* Site footer with logo, license information, and navigation links.
|
|
6
|
+
*/
|
|
3
7
|
---
|
|
4
8
|
|
|
5
9
|
<footer class="cxd-footer py-6xlarge">
|
|
6
|
-
<div class="container-
|
|
10
|
+
<div class="container-2xlarge fg-subtle">
|
|
7
11
|
<div class="row">
|
|
8
12
|
<div class="col-medium-10 col-large-5 mb-medium">
|
|
9
13
|
<a
|
|
@@ -21,29 +25,30 @@
|
|
|
21
25
|
<div class="col-small-4 col-large-2 offset-large-1 mb-medium">
|
|
22
26
|
<h5>Docs</h5>
|
|
23
27
|
<ul class="nav">
|
|
24
|
-
<li><a href="/
|
|
25
|
-
<li><a href="/
|
|
26
|
-
<li><a href="/
|
|
27
|
-
<li><a href="/
|
|
28
|
-
<li><a href="/
|
|
28
|
+
<li><a href="/tokens">Design Tokens</a></li>
|
|
29
|
+
<li><a href="/assets">Asset Distributor</a></li>
|
|
30
|
+
<li><a href="/figma">Figma Library</a></li>
|
|
31
|
+
<li><a href="/css">CSS Framework</a></li>
|
|
32
|
+
<li><a href="/icons">Icon Generator</a></li>
|
|
29
33
|
</ul>
|
|
30
34
|
</div>
|
|
31
35
|
<div class="col-small-4 col-large-2 mb-medium">
|
|
32
36
|
<h5>Github</h5>
|
|
33
37
|
<ul class="nav">
|
|
34
|
-
<li><a href="/
|
|
35
|
-
<li><a href="/
|
|
36
|
-
<li><a href="/
|
|
37
|
-
<li><a href="/
|
|
38
|
+
<li><a href="https://github.com/chassis-ui/tokens">Chassis Tokens</a></li>
|
|
39
|
+
<li><a href="https://github.com/chassis-ui/assets">Chassis Assets</a></li>
|
|
40
|
+
<li><a href="https://github.com/chassis-ui/figma">Chassis Figma</a></li>
|
|
41
|
+
<li><a href="https://github.com/chassis-ui/css">Chassis CSS</a></li>
|
|
42
|
+
<li><a href="https://github.com/chassis-ui/icons">Chassis Icons</a></li>
|
|
38
43
|
</ul>
|
|
39
44
|
</div>
|
|
40
45
|
<div class="col-small-4 col-large-2 mb-medium">
|
|
41
46
|
<h5>About</h5>
|
|
42
47
|
<ul class="nav">
|
|
43
|
-
<li><a href="/
|
|
44
|
-
<li><a href="/
|
|
45
|
-
<li><a href="/
|
|
46
|
-
<li><a href="/
|
|
48
|
+
<li><a href="/blog">Blog</a></li>
|
|
49
|
+
<li><a href="https://x.com/chassis_ui">Chassis UI</a></li>
|
|
50
|
+
<li><a href="https://github.com/chassis-ui">Contribute</a></li>
|
|
51
|
+
<li><a href="https://github.com/ozgurgunes">Developer</a></li>
|
|
47
52
|
</ul>
|
|
48
53
|
</div>
|
|
49
54
|
</div>
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* Scripts
|
|
4
|
+
*
|
|
5
|
+
* JavaScript imports for site functionality.
|
|
6
|
+
*/
|
|
7
|
+
|
|
2
8
|
import { getChassisJsProps } from '../../libs/chassis'
|
|
3
9
|
import type { Layout } from '../../libs/layout'
|
|
4
10
|
|
|
5
11
|
interface Props {
|
|
12
|
+
/** Current layout context */
|
|
6
13
|
layout: Layout
|
|
7
14
|
}
|
|
8
15
|
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* Analytics
|
|
4
|
+
*
|
|
5
|
+
* Analytics script tags for Fathom and Google Analytics.
|
|
6
|
+
*/
|
|
7
|
+
|
|
2
8
|
import { getConfig } from '@libs/config'
|
|
3
9
|
const googleId = getConfig().analytics.google_id
|
|
4
10
|
---
|
|
5
11
|
|
|
6
|
-
<script
|
|
7
|
-
is:inline
|
|
8
|
-
defer
|
|
9
|
-
src="https://cdn.usefathom.com/script.js"
|
|
10
|
-
data-site={getConfig().analytics.fathom_site}></script>
|
|
11
12
|
<!-- Google tag (gtag.js) -->
|
|
12
13
|
<script is:inline async src={`https://www.googletagmanager.com/gtag/js?id=${googleId}`}></script>
|
|
13
14
|
<script
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* Head
|
|
4
|
+
*
|
|
5
|
+
* HTML head section with meta tags, stylesheets, and SEO configuration.
|
|
6
|
+
*/
|
|
7
|
+
|
|
2
8
|
import { getConfig } from '@libs/config'
|
|
3
9
|
import type { Layout } from '../../libs/layout'
|
|
4
10
|
import Stylesheet from './Stylesheet.astro'
|
|
@@ -8,11 +14,17 @@ import Analytics from './Analytics.astro'
|
|
|
8
14
|
import '@scss/docs.scss'
|
|
9
15
|
|
|
10
16
|
interface Props {
|
|
17
|
+
/** Page description for meta tags */
|
|
11
18
|
description: string
|
|
19
|
+
/** Text direction (for RTL languages) */
|
|
12
20
|
direction?: 'rtl'
|
|
21
|
+
/** Current layout context */
|
|
13
22
|
layout: Layout
|
|
23
|
+
/** Robots meta tag value */
|
|
14
24
|
robots: string | undefined
|
|
25
|
+
/** Social media thumbnail image */
|
|
15
26
|
thumbnail: string
|
|
27
|
+
/** Page title */
|
|
16
28
|
title: string
|
|
17
29
|
}
|
|
18
30
|
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* Social
|
|
4
|
+
*
|
|
5
|
+
* Social media meta tags (Open Graph, Twitter Cards).
|
|
6
|
+
*/
|
|
7
|
+
|
|
2
8
|
import path from 'node:path'
|
|
3
9
|
import { getConfig } from '@libs/config'
|
|
4
10
|
import { getDocsPublicFsPath } from '@libs/path'
|
|
@@ -6,9 +12,13 @@ import { getStaticImageSize } from '../../libs/image'
|
|
|
6
12
|
import type { Layout } from '../../libs/layout'
|
|
7
13
|
|
|
8
14
|
interface Props {
|
|
15
|
+
/** Page description */
|
|
9
16
|
description: string
|
|
17
|
+
/** Current layout context */
|
|
10
18
|
layout: Layout
|
|
19
|
+
/** Social media thumbnail image */
|
|
11
20
|
thumbnail: string
|
|
21
|
+
/** Page title */
|
|
12
22
|
title: string
|
|
13
23
|
}
|
|
14
24
|
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* Stylesheet
|
|
4
|
+
*
|
|
5
|
+
* Stylesheet link tags for external CSS resources.
|
|
6
|
+
*/
|
|
7
|
+
|
|
2
8
|
import { getChassisCssProps } from '../../libs/chassis'
|
|
3
9
|
import type { Layout } from '../../libs/layout'
|
|
4
10
|
|
|
5
11
|
interface Props {
|
|
12
|
+
/** Text direction (for RTL languages) */
|
|
6
13
|
direction?: 'rtl'
|
|
14
|
+
/** Current layout context */
|
|
7
15
|
layout: Layout
|
|
8
16
|
}
|
|
9
17
|
|
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* Header
|
|
4
|
+
*
|
|
5
|
+
* Site header with navigation and page title.
|
|
6
|
+
*/
|
|
7
|
+
|
|
2
8
|
import type { CollectionEntry } from 'astro:content'
|
|
3
9
|
import type { Layout } from '../../libs/layout'
|
|
4
10
|
import Skippy from './Skippy.astro'
|
|
5
11
|
import Navigation from './Navigation.astro'
|
|
6
12
|
|
|
7
13
|
interface Props {
|
|
14
|
+
/** Version when the feature was added */
|
|
8
15
|
addedIn?: CollectionEntry<'docs'>['data']['added']
|
|
16
|
+
/** Current layout context */
|
|
9
17
|
layout: Layout
|
|
18
|
+
/** Page title */
|
|
10
19
|
title: string
|
|
11
20
|
}
|
|
12
21
|
|
|
13
|
-
const {
|
|
14
|
-
const { pathname } = Astro.url
|
|
22
|
+
const { layout, title } = Astro.props
|
|
15
23
|
---
|
|
16
24
|
|
|
17
25
|
<Skippy layout={layout} />
|
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* Navigation
|
|
4
|
+
*
|
|
5
|
+
* Main site navigation bar with menu items and theme toggler.
|
|
6
|
+
*/
|
|
7
|
+
|
|
2
8
|
import { getConfig } from '@libs/config'
|
|
3
9
|
import type { Layout } from '../../libs/layout'
|
|
4
10
|
import NavLink from '../../components/NavLink.astro'
|
|
5
11
|
import ThemeToggler from '../../components/ThemeToggler.astro'
|
|
6
|
-
import NavDocsMenu from '../../components/NavDocsMenu.astro'
|
|
7
12
|
|
|
8
13
|
interface Props {
|
|
14
|
+
/** Current layout context */
|
|
9
15
|
layout: Layout
|
|
16
|
+
/** Page title for the navbar */
|
|
10
17
|
title: string
|
|
11
18
|
}
|
|
12
19
|
|
|
13
20
|
const { layout, title } = Astro.props
|
|
14
|
-
const { pathname } = Astro.url
|
|
15
21
|
---
|
|
16
22
|
|
|
17
23
|
<header class="navbar navbar-expand-large cxd-navbar sticky-top">
|
|
18
|
-
<nav class="container-
|
|
24
|
+
<nav class="container-2xlarge" aria-label="Main navigation">
|
|
19
25
|
{
|
|
20
26
|
layout === 'docs' && (
|
|
21
27
|
<div class="cxd-navbar-toggle">
|
|
@@ -75,14 +81,25 @@ const { pathname } = Astro.url
|
|
|
75
81
|
<div class="offcanvas-body p-large pt-0 p-large-0">
|
|
76
82
|
<hr class="d-large-none text-white-50" />
|
|
77
83
|
<ul class="navbar-nav flex-row flex-wrap cxd-navbar-nav mx-0 mx-large-medium">
|
|
78
|
-
<NavLink active={
|
|
79
|
-
<li class="nav-item dropdown">
|
|
80
|
-
<NavDocsMenu layout={layout} />
|
|
81
|
-
</li>
|
|
82
|
-
<NavLink active={layout === 'icons'} href="/icons" track>Icons</NavLink>
|
|
84
|
+
<NavLink active={layout === 'docs'} href="/docs" track>Docs</NavLink>
|
|
83
85
|
<NavLink active={title === 'Tokens'} href="/tokens" track>Tokens</NavLink>
|
|
84
|
-
<NavLink active={title === '
|
|
85
|
-
<NavLink active={
|
|
86
|
+
<NavLink active={title === 'Assets'} href="/assets" track>Assets</NavLink>
|
|
87
|
+
<NavLink active={title === 'Figma'} href="/figma" track>Figma</NavLink>
|
|
88
|
+
<NavLink active={layout === 'icons'} href="/icons" track>Icons</NavLink>
|
|
89
|
+
<NavLink active={title === 'CSS'} href="/css" track>CSS</NavLink>
|
|
90
|
+
<li class="nav-item dropdown ms-medium">
|
|
91
|
+
<a
|
|
92
|
+
class="nav-link dropdown-toggle"
|
|
93
|
+
href="/#"
|
|
94
|
+
role="button"
|
|
95
|
+
data-cx-toggle="dropdown"
|
|
96
|
+
aria-expanded="false">More</a
|
|
97
|
+
>
|
|
98
|
+
<ul class="dropdown-menu">
|
|
99
|
+
<li><a class="dropdown-item" href="/examples">Examples</a></li>
|
|
100
|
+
<li><a class="dropdown-item" href="/blog">Blog</a></li>
|
|
101
|
+
</ul>
|
|
102
|
+
</li>
|
|
86
103
|
</ul>
|
|
87
104
|
|
|
88
105
|
<hr class="d-large-none" />
|
package/src/libs/layout.ts
CHANGED
|
@@ -3,5 +3,5 @@ import type { HTMLAttributes, HTMLTag } from 'astro/types'
|
|
|
3
3
|
export type Layout = 'docs' | 'icons' | 'examples' | 'single' | 'blog' | undefined
|
|
4
4
|
|
|
5
5
|
export type LayoutOverridesHTMLAttributes<TTag extends HTMLTag> = HTMLAttributes<TTag> & {
|
|
6
|
-
[key in `data-${string}`]: string
|
|
6
|
+
[key in `data-${string}`]: string //eslint-disable-line no-unused-vars
|
|
7
7
|
}
|
package/src/scss/_docsearch.scss
CHANGED
package/src/scss/_settings.scss
CHANGED
|
@@ -26,12 +26,3 @@ $enable-table-font-tokens: true !default;
|
|
|
26
26
|
$enable-transitions: true !default;
|
|
27
27
|
$enable-validation-icons: true !default;
|
|
28
28
|
$enable-visited-links: false !default;
|
|
29
|
-
|
|
30
|
-
//
|
|
31
|
-
// Icons
|
|
32
|
-
//
|
|
33
|
-
$icon-url-prefix: "/icons/svgs/" !default;
|
|
34
|
-
$icon-url-suffix: ".svg" !default;
|
|
35
|
-
|
|
36
|
-
// Import tokens from the Chassis Tokens package
|
|
37
|
-
// @import "../node_modules/@chassis-ui/tokens/dist/tokens/web/chassis-docs/allTokens";
|
package/src/scss/_syntax.scss
CHANGED
|
@@ -1,40 +1,42 @@
|
|
|
1
1
|
:root,
|
|
2
2
|
[data-cx-theme="light"] {
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
--
|
|
6
|
-
--
|
|
7
|
-
--
|
|
8
|
-
--
|
|
9
|
-
--
|
|
10
|
-
--
|
|
11
|
-
--
|
|
12
|
-
--
|
|
13
|
-
--
|
|
14
|
-
--
|
|
15
|
-
--
|
|
16
|
-
--
|
|
17
|
-
--
|
|
18
|
-
--
|
|
3
|
+
// GitHub Light Theme
|
|
4
|
+
--base00: #fff;
|
|
5
|
+
--base01: #f6f8fa;
|
|
6
|
+
--base02: #e1e4e8;
|
|
7
|
+
--base03: #6a737d; // Comments
|
|
8
|
+
--base04: #586069;
|
|
9
|
+
--base05: #24292e; // Default text
|
|
10
|
+
--base06: #24292e;
|
|
11
|
+
--base07: #22863a; // Tags/Classes
|
|
12
|
+
--base08: #d73a49; // Keywords/Important
|
|
13
|
+
--base09: #005cc5; // Numbers/Properties
|
|
14
|
+
--base0A: #005cc5; // Variables
|
|
15
|
+
--base0B: #6f42c1; // Functions
|
|
16
|
+
--base0C: #032f62; // Strings
|
|
17
|
+
--base0D: #6f42c1; // Attributes
|
|
18
|
+
--base0E: #d73a49; // Keywords
|
|
19
|
+
--base0F: #e36209; // References
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
@include color-mode(dark, true) {
|
|
22
|
-
//
|
|
23
|
-
|
|
24
|
-
--
|
|
25
|
-
--
|
|
26
|
-
--
|
|
27
|
-
--
|
|
28
|
-
--
|
|
29
|
-
--
|
|
30
|
-
--
|
|
31
|
-
--
|
|
32
|
-
--
|
|
33
|
-
--
|
|
34
|
-
--
|
|
35
|
-
--
|
|
36
|
-
--
|
|
37
|
-
--
|
|
23
|
+
// GitHub Dark Theme
|
|
24
|
+
--base00: #0d1117;
|
|
25
|
+
--base01: #161b22;
|
|
26
|
+
--base02: #21262d;
|
|
27
|
+
--base03: #8b949e; // Comments
|
|
28
|
+
--base04: #6e7681;
|
|
29
|
+
--base05: #c9d1d9; // Default text
|
|
30
|
+
--base06: #c9d1d9;
|
|
31
|
+
--base07: #7ee787; // Tags/Classes
|
|
32
|
+
--base08: #ff7b72; // Keywords/Important
|
|
33
|
+
--base09: #79c0ff; // Numbers/Properties
|
|
34
|
+
--base0A: #79c0ff; // Variables
|
|
35
|
+
--base0B: #d2a8ff; // Functions
|
|
36
|
+
--base0C: #a5d6ff; // Strings
|
|
37
|
+
--base0D: #d2a8ff; // Attributes
|
|
38
|
+
--base0E: #ff7b72; // Keywords
|
|
39
|
+
--base0F: #ffa657; // References
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
// Shell prompts
|
package/src/scss/main.scss
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
@import "fonts";
|
|
6
6
|
|
|
7
7
|
@import "navbar";
|
|
8
|
-
@import "masthead";
|
|
8
|
+
// @import "masthead";
|
|
9
9
|
@import "content";
|
|
10
10
|
@import "skippy";
|
|
11
11
|
@import "sidebar";
|
|
@@ -27,11 +27,76 @@
|
|
|
27
27
|
@import "docsearch";
|
|
28
28
|
|
|
29
29
|
/* Hide light-mode things when in dark mode */
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
.visible-light {
|
|
31
|
+
[data-cx-theme="dark"] &:not([data-cx-theme="dark"] [data-cx-theme="light"] &) {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
/* Hide dark-mode things when in light mode */
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
.visible-dark {
|
|
38
|
+
[data-cx-theme="light"] &:not([data-cx-theme="light"] [data-cx-theme="dark"] &) {
|
|
39
|
+
display: none;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.docs-body .navbar,
|
|
44
|
+
.docs-body .cxd-footer {
|
|
45
|
+
.container-2xlarge {
|
|
46
|
+
max-width: 100%;
|
|
47
|
+
}
|
|
48
|
+
.cxd-search {
|
|
49
|
+
@include media-breakpoint-up(2xlarge) {
|
|
50
|
+
right: 12rem;
|
|
51
|
+
left: auto;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.home-section {
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.section-content:has(.gallery-image) > div {
|
|
61
|
+
height: var(--gallery-image-height, 256px);
|
|
62
|
+
border: var(--#{$prefix}border-width-medium) solid var(--#{$prefix}bg-evident);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.gallery-image {
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
|
|
69
|
+
@include media-breakpoint-down(medium) {
|
|
70
|
+
margin-top: -25%;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
> img {
|
|
74
|
+
vertical-align: middle;
|
|
75
|
+
zoom: 1.5;
|
|
76
|
+
transform: rotate(30deg) skewX(-30deg) scaleY(.866);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.feature-item .cxd-code-snippet {
|
|
81
|
+
--cxicon-color: var(--#{$prefix}fg-color);
|
|
82
|
+
--cx-icon-size: 1em;
|
|
83
|
+
margin-bottom: 0;
|
|
84
|
+
background-color: var(--#{$prefix}bg-even);
|
|
85
|
+
border: 0;
|
|
86
|
+
|
|
87
|
+
.highlight {
|
|
88
|
+
padding: var(--#{$prefix}space-medium);
|
|
89
|
+
background-color: var(--#{$prefix}bg-even);
|
|
90
|
+
}
|
|
91
|
+
pre {
|
|
92
|
+
padding: 0;
|
|
93
|
+
margin: 0;
|
|
94
|
+
}
|
|
95
|
+
> .cxd-clipboard {
|
|
96
|
+
display: none;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.token.comment {
|
|
100
|
+
color: var(--#{$prefix}fg-subtle);
|
|
101
|
+
}
|
|
37
102
|
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
const { title, body, icon } = Astro.props
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
<div class="card large border-0">
|
|
6
|
-
<div class="card-content">
|
|
7
|
-
{
|
|
8
|
-
icon && (
|
|
9
|
-
<svg class="icon card-icon icon-4xlarge mb-medium">
|
|
10
|
-
<use xlink:href={`#${icon}`} />
|
|
11
|
-
</svg>
|
|
12
|
-
)
|
|
13
|
-
}
|
|
14
|
-
<h4 class="card-title">{title}</h4>
|
|
15
|
-
<p class="card-body">
|
|
16
|
-
{body}
|
|
17
|
-
</p>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { Layout } from '../libs/layout'
|
|
3
|
-
|
|
4
|
-
interface Props {
|
|
5
|
-
layout: Layout
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const { layout } = Astro.props
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
<a
|
|
12
|
-
class="nav-link dropdown-toggle"
|
|
13
|
-
href="/docs"
|
|
14
|
-
role="button"
|
|
15
|
-
data-cx-toggle="dropdown"
|
|
16
|
-
aria-expanded="false">Docs</a
|
|
17
|
-
>
|
|
18
|
-
<ul class="dropdown-menu">
|
|
19
|
-
<li><a class="dropdown-item" href="/css">CSS</a></li>
|
|
20
|
-
<li><a class="dropdown-item" href="/tokens">Tokens</a></li>
|
|
21
|
-
<li><a class="dropdown-item" href="/icons">Icons</a></li>
|
|
22
|
-
<li><a class="dropdown-item" href="/figma">Figma</a></li>
|
|
23
|
-
<li><a class="dropdown-item" href="/assets">Assets</a></li>
|
|
24
|
-
<li><hr class="dropdown-separator" /></li>
|
|
25
|
-
<li><a class="dropdown-item" href="/docs">Docs Index</a></li>
|
|
26
|
-
</ul>
|