Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d4064a1
feat(docs): migrate documentation to the shared Astro docs engine
mrholek Jun 19, 2026
3cc0a38
fix(docs): declare docs dependencies and remove old-generator leftovers
mrholek Jun 22, 2026
79b2422
refactor(docs): drop redundant <Example> attributes
mrholek Jun 22, 2026
9c5bfab
chore(docs): declare @coreui/coreui for standalone docs builds
mrholek Jun 22, 2026
2f9ee01
chore(docs): consume published @coreui/astro-docs and api-generator (…
mrholek Jun 22, 2026
1b8326d
chore(docs): bump @coreui/astro-docs to 0.1.0-beta.3
mrholek Jun 24, 2026
9d3c574
fix(docs): repair malformed https:// link in alert docs
mrholek Jun 24, 2026
f527a65
fix(docs): update stale coreui.io/docs links to current bootstrap/doc…
mrholek Jun 24, 2026
da59ad4
fix(docs): update stale coreui.io/4.0 carousel link to bootstrap/docs
mrholek Jun 24, 2026
c03cf64
chore(docs): bump @coreui/astro-docs to 0.1.0-beta.4
mrholek Jun 24, 2026
30f7fa9
chore(docs): bump @coreui/internal-links to ^5.2.0
mrholek Jun 24, 2026
d5cb486
fix(ci): yarn install --ignore-engines so the Node 20 lib job doesn't…
mrholek Jun 24, 2026
eae4939
chore(docs): bump @coreui/astro-docs to 0.1.0-beta.5
mrholek Jun 24, 2026
3f24b82
chore(docs): bump @coreui/astro-docs to 0.1.0-beta.6
mrholek Jun 25, 2026
4035ce0
refactor(docs): consume shared engine exports for content, sandbox, a…
mrholek Jun 27, 2026
0412a32
chore: update dependencies
mrholek Jun 28, 2026
44a96f0
chore: remove orphan docs package-lock.json
mrholek Jun 28, 2026
4d48633
refactor(docs): unify image assets under assets/
mrholek Jun 28, 2026
23f3c01
chore(docs): remove Gatsby/VuePress migration leftovers
mrholek Jun 28, 2026
1db8d00
docs(Icon): fix TabPanes example missing imports
mrholek Jun 28, 2026
0efe99b
docs(ChipInput): enable otherFrameworks cross-links
mrholek Jun 28, 2026
c797101
docs(Tabs): enable otherFrameworks cross-links
mrholek Jun 28, 2026
ab132e2
docs: use real per-component CSS variables in styling snippets
mrholek Jun 28, 2026
285cd59
fix(Accordion): correct third item body copy in docs example
mrholek Jun 28, 2026
d2ea965
fix(build): apply commonjs plugin to all node_modules
mrholek Jun 28, 2026
ef1a5d3
fix(docs): use role="toolbar" on Button Group toolbar examples
mrholek Jun 28, 2026
8a28deb
fix(docs): fix 'Calout' typo in React Callout styling page
mrholek Jun 28, 2026
db5bc21
fix(docs): vary per-slide copy in React Carousel caption examples
mrholek Jun 28, 2026
0712104
fix(docs): fix 'dimiss' typo in Alert dismissing example
mrholek Jun 28, 2026
02bb8b7
fix(docs): correct cols value in Card grid prose
mrholek Jun 28, 2026
de41a03
chore(docs): bump @coreui/astro-docs to 0.1.0-beta.10
mrholek Jun 28, 2026
d795f53
docs(Table): give examples semantic names and dedupe bootstrap variants
mrholek Jun 29, 2026
eb8b7ae
docs: autofix prettier formatting in React examples (eslint --fix)
mrholek Jun 29, 2026
f5adc7f
chore(docs): autofix unused imports in examples via eslint-plugin-unu…
mrholek Jun 29, 2026
cadbcc7
chore(docs): fix remaining lint in examples
mrholek Jun 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
node-version: ${{ matrix.node-version }}
# yarn.lock is gitignored in this repo, so there is no lockfile to pin
# against or to key a cache on — install resolves from package.json.
- run: yarn install
- run: yarn install --ignore-engines
- run: yarn lib:build
- run: yarn lib:test

Expand All @@ -40,5 +40,5 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 22.x
- run: yarn install
- run: yarn install --ignore-engines
- run: yarn lint
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
coverage/
dist/
node_modules/
public/
yarn.lock

# IDEs and editors
Expand Down Expand Up @@ -30,4 +29,5 @@ Thumbs.db
*.swp
*.vi
*.zip
*~
*~
.gstack/
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This is a **Lerna monorepo** with the following key packages:
- `packages/coreui-react/` - Main React components library (TypeScript)
- `packages/coreui-icons-react/` - Icon components for React
- `packages/coreui-react-chartjs/` - Chart.js integration for React
- `packages/docs/` - Gatsby-based documentation site
- `packages/docs/` - Astro-based documentation site

## Development Commands

Expand Down
13 changes: 13 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import eslintPluginUnicorn from 'eslint-plugin-unicorn'
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
import eslintPluginReact from 'eslint-plugin-react'
import eslintPluginReactHooks from 'eslint-plugin-react-hooks'
import eslintPluginUnusedImports from 'eslint-plugin-unused-imports'
import globals from 'globals'
import typescriptEslint from 'typescript-eslint'

Expand All @@ -19,6 +20,7 @@ export default typescriptEslint.config(
],
plugins: {
'react-hooks': eslintPluginReactHooks,
'unused-imports': eslintPluginUnusedImports,
},
files: ['packages/**/src/**/*.{js,ts,tsx}'],
languageOptions: {
Expand All @@ -43,6 +45,12 @@ export default typescriptEslint.config(
},
rules: {
...eslintPluginReactHooks.configs.recommended.rules,
'@typescript-eslint/no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'error',
{ vars: 'all', varsIgnorePattern: '^_', args: 'after-used', argsIgnorePattern: '^_' },
],
'no-console': 'off',
'no-debugger': 'off',
// the library compiles with the classic JSX transform (tsconfig "jsx": "react"),
Expand Down Expand Up @@ -103,7 +111,12 @@ export default typescriptEslint.config(
{
files: ['packages/docs/**'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-var-requires': 'off',
'react/no-unescaped-entities': 'off',
'react-hooks/refs': 'off',
'react-hooks/set-state-in-effect': 'off',
'unicorn/consistent-function-scoping': 'off',
'unicorn/prefer-module': 'off',
},
},
Expand Down
17 changes: 5 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"charts:test": "lerna run --scope \"@coreui/react-chartjs\" test --stream",
"charts:test:update": "lerna run --scope \"@coreui/react-chartjs\" test:update --stream",
"docs:api": "lerna run --scope \"@coreui/react-docs\" api --stream",
"docs:dev": "lerna run --scope \"@coreui/react-docs\" develop --stream",
"docs:dev": "lerna run --scope \"@coreui/react-docs\" dev --stream",
"docs:build": "lerna run --scope \"@coreui/react-docs\" build --stream",
"docs:clean": "lerna run --scope \"@coreui/react-docs\" clean",
"icons:build": "lerna run --scope \"@coreui/icons-react\" build --stream",
Expand All @@ -22,25 +22,18 @@
"test:update": "npm-run-all charts:test:update icons:test:update lib:test:update"
},
"devDependencies": {
"@typescript-eslint/parser": "^8.61.0",
"@typescript-eslint/parser": "^8.62.0",
"eslint": "^9.39.4",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.6",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-unicorn": "^62.0.0",
"eslint-plugin-unused-imports": "^4.4.1",
"globals": "^16.5.0",
"lerna": "^9.0.7",
"npm-run-all": "^4.1.5",
"prettier": "^3.8.4",
"typescript-eslint": "^8.61.0"
},
"overrides": {
"gatsby-remark-external-links": {
"unist-util-find": "1.0.2"
}
},
"resolutions": {
"**/gatsby-remark-external-links/unist-util-find": "1.0.2"
"prettier": "^3.9.1",
"typescript-eslint": "^8.62.0"
}
}
2 changes: 1 addition & 1 deletion packages/coreui-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-transition-group": "^4.4.5",
"rollup": "^4.62.0",
"rollup": "^4.62.2",
"ts-jest": "^29.4.11",
"tslib": "^2.8.1",
"typescript": "^5.9.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/coreui-react/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const plugins = [
},
}),
commonjs({
include: ['../../node_modules/**'],
include: [/node_modules/],
}),
]

Expand Down
3 changes: 3 additions & 0 deletions packages/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
dist/
.astro/
16 changes: 16 additions & 0 deletions packages/docs/api.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Components to document. The @coreui/astro-docs-api-generator CLI (`yarn api`) runs the
// React extractor (react-docgen-typescript) and writes one <Name>.api.json per component
// into outDir — the shared ApiData shape the engine's <Api> renders. createApiConfig
// scans each root for source components (`C*.tsx`, minus declarations/specs/tests).
import { createApiConfig } from '@coreui/astro-docs-api-generator/config'

export default createApiConfig({
framework: 'react',
configUrl: import.meta.url,
importPackage: '@coreui/react',
roots: [
'../coreui-react/src/components',
'../coreui-react-chartjs/src',
'../coreui-icons-react/src',
],
})
45 changes: 45 additions & 0 deletions packages/docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { defineConfig } from 'astro/config'
import react from '@astrojs/react'
import mdx from '@astrojs/mdx'
import { coreuiDocs } from '@coreui/astro-docs/integration'
import { fileURLToPath } from 'node:url'
import { createRequire } from 'node:module'

const require = createRequire(import.meta.url)

// Live-src: point @coreui/react and its icon/chart submodules at their source in this
// repo. The icon data set (@coreui/icons) and chart.js stay published deps.
const reactSrc = fileURLToPath(new URL('../coreui-react/src/index.ts', import.meta.url))
const iconsReactSrc = fileURLToPath(new URL('../coreui-icons-react/src/index.ts', import.meta.url))
const reactChartjsSrc = fileURLToPath(new URL('../coreui-react-chartjs/src/index.ts', import.meta.url))
// @coreui/chartjs ships CJS `main` + a separate esm build; point imports at the esm
// so the named `customTooltips` export resolves under SSR.
const chartjsEsm = require.resolve('@coreui/chartjs/dist/js/coreui-chartjs.esm.js')
// Depth-independent imports for example + generated API data, so docs pages can
// move freely without rewriting relative paths.
const examples = fileURLToPath(new URL('./src/examples', import.meta.url))
const api = fileURLToPath(new URL('./src/api', import.meta.url))

export default defineConfig({
// Publish URL (site + base) is config-driven: coreuiDocs() reads `seo.url` from
// src/data/config.yml and sets Astro's `site` + `base` from it, so the versioned
// (…/react/docs/5.x) and current (…/react/docs) builds differ by one config value.
// coreuiDocs() detects the edition + wires styling; it returns an array (incl.
// global component auto-import), so spread it — and place it before mdx().
integrations: [react(), ...coreuiDocs(), mdx()],
vite: {
resolve: {
// Array form: the icons-react `/src/index` subpath import must match before the
// bare `@coreui/icons-react` entry.
alias: [
{ find: '@coreui/icons-react/src/index', replacement: iconsReactSrc },
{ find: '@coreui/icons-react', replacement: iconsReactSrc },
{ find: '@coreui/react-chartjs', replacement: reactChartjsSrc },
{ find: '@coreui/chartjs', replacement: chartjsEsm },
{ find: '@coreui/react', replacement: reactSrc },
{ find: '@examples', replacement: examples },
{ find: '@api', replacement: api },
],
},
},
})
Loading
Loading