1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-22 01:44:25 +04:00

Compare commits

..

1 Commits

Author SHA1 Message Date
codecalm
0a285384b7 Update test workflow to run on multiple operating systems 2025-02-03 03:04:30 +01:00
2110 changed files with 20100 additions and 36717 deletions

View File

@@ -1,63 +0,0 @@
#!/usr/bin/env node
'use strict'
import { readFileSync, writeFileSync } from 'node:fs';
import { join, dirname } from 'node:path';
import { fileURLToPath } from 'node:url'
import { sync } from 'glob';
import * as prettier from "prettier";
const __dirname = dirname(fileURLToPath(import.meta.url))
const docs = sync(join(__dirname, '..', 'docs', '**', '*.md'))
async function formatHTML(htmlString) {
try {
const formattedHtml = await prettier.format(htmlString, {
parser: "html",
printWidth: 100,
});
return formattedHtml;
} catch (error) {
console.error("Error formatting HTML:", error);
return htmlString; // Return original in case of an error
}
}
async function replaceAsync(str, regex, asyncFn) {
const matches = [...str.matchAll(regex)];
const replacements = await Promise.all(
matches.map(async (match) => asyncFn(...match))
);
let result = str;
matches.forEach((match, i) => {
result = result.replace(match[0], replacements[i]);
});
return result;
}
for (const file of docs) {
const oldContent = readFileSync(file, 'utf8')
// get codeblocks from markdown
const content = await replaceAsync(oldContent, /(```([a-z0-9]+).*?\n)(.*?)(```)/gs, async (m, m1, m2, m3, m4) => {
if (m2 === 'html') {
m3 = await formatHTML(m3);
// remove empty lines
m3 = m3.replace(/^\s*[\r\n]/gm, '');
return m1 + m3.trim() + "\n" + m4;
}
return m.trim();
})
if (content !== oldContent) {
writeFileSync(file, content, 'utf8')
console.log(`Reformatted ${file}`)
}
}

View File

@@ -1,30 +0,0 @@
#!/usr/bin/env node
import AdmZip from 'adm-zip';
import path from 'path';
import { fileURLToPath } from 'url';
import { readFileSync } from 'fs';
// Get __dirname in ESM
const __dirname = path.dirname(fileURLToPath(import.meta.url))
const pkg = JSON.parse(
readFileSync(path.join(__dirname, '../core', 'package.json'), 'utf8')
)
// Create zip instance and add folder
const zip = new AdmZip();
zip.addLocalFolder(path.join(__dirname, '../preview/dist'), 'dashboard');
zip.addLocalFile(path.join(__dirname, '../preview/static', 'og.png'), '.', 'preview.png');
zip.addFile("documentation.url", Buffer.from("[InternetShortcut]\nURL = https://tabler.io/docs"));
// Folder to zip and output path
const outputZipPath = path.join(__dirname, '../packages-zip', `tabler-${pkg.version}.zip`);
// Write the zip file
zip.writeZip(outputZipPath);
console.log(`Zipped folder to ${outputZipPath}`);

View File

@@ -1,6 +0,0 @@
---
"@tabler/core": minor
"@tabler/preview": minor
---
Added Pay page with dedicated layout, navigation link, and card/PayPal payment form.

View File

@@ -1,5 +0,0 @@
---
"@tabler/core": patch
---
Refactored Bootstrap exports to use single source of truth in `bootstrap.js` and removed duplicate exports from `tabler.js` for better maintainability.

View File

@@ -1,5 +0,0 @@
---
"@tabler/core": patch
---
Fixed `.btn-icon` to be square by aligning `min-width` calculation with base `.btn` formula.

View File

@@ -1,5 +0,0 @@
---
"@tabler/core": minor
---
Added `.btn-ghost` button variant with transparent background and hover effects.

View File

@@ -1,6 +0,0 @@
---
"@tabler/core": minor
---
Added `.card-gradient` component with gradient variants, direction modifiers, and animated backgrounds.

View File

@@ -1,6 +0,0 @@
---
"@tabler/preview": minor
---
Added new `card-gradients.html` page showcasing various gradient card styles and components.

View File

@@ -1,6 +0,0 @@
---
"@tabler/preview": minor
---
Added Change Password modal with current password, new password with strength indicator, confirm password validation, and show/hide password toggles.

View File

@@ -1,5 +0,0 @@
---
"@tabler/preview": minor
---
Added color palette to signing component.

View File

@@ -3,18 +3,8 @@
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [
[
"@tabler/core",
"@tabler/preview",
"@tabler/docs"
]
],
"linked": [],
"access": "public",
"baseBranch": "dev",
"ignore": [],
"privatePackages": {
"version": true,
"tag": false
}
"baseBranch": "main",
"ignore": []
}

View File

@@ -1,6 +0,0 @@
---
"@tabler/preview": minor
---
Added Confirm Delete modal with warning icon, confirmation checkbox, and JavaScript validation to enable delete button only when confirmed.

View File

@@ -1,6 +0,0 @@
---
"@tabler/preview": minor
---
Added new Crypto Dashboard page with cryptocurrency portfolio overview, market data, and order history.

View File

@@ -1,6 +0,0 @@
---
"@tabler/preview": patch
---
Added crypto markets and orders data files (`crypto-markets.json`, `crypto-orders.json`) for cryptocurrency dashboard functionality.

View File

@@ -1,5 +0,0 @@
---
"@tabler/core": patch
---
Fixed icon alignment for `.btn-sm` and `.btn-xl` sizes.

View File

@@ -1,6 +0,0 @@
---
"@tabler/preview": minor
---
Added Edit Profile modal with avatar upload, personal information fields, social links, and date of birth.

View File

@@ -1,5 +0,0 @@
---
"@tabler/preview": patch
---
Update Tabler Icons to v3.35.0

View File

@@ -0,0 +1,5 @@
---
"@tabler/core": patch
---
Enable `scrollSpy` in `countup` module

View File

@@ -1,5 +0,0 @@
---
"@tabler/core": patch
---
Updated `$border-color-translucent-dark` from `rgba(72, 110, 149, 0.14)` to `rgba(128, 150, 172, 0.2)` to improve visibility of form checkboxes and other form elements in dark mode.

View File

@@ -1,5 +0,0 @@
---
"@tabler/core": patch
---
Fixed `.input-icon-addon` z-index issue with form validation feedback and added default height.

View File

@@ -1,5 +0,0 @@
---
"@tabler/core": patch
---
Fixed status color classes to use CSS variables instead of hardcoded values and include social colors (bitbucket, facebook, etc.) in status class generation.

View File

@@ -1,5 +0,0 @@
---
"@tabler/core": patch
---
Fixed white space on left side when scrollbar is present by replacing `margin-inline-start: calc(100vw - 100%)` with `scrollbar-gutter: stable` on `html` element, with `overflow-y: scroll` fallback for unsupported browsers.

View File

@@ -1,6 +0,0 @@
---
"@tabler/core": patch
---
Updated flags and avatars styling for better visual consistency.

View File

@@ -1,5 +0,0 @@
---
"@tabler/core": patch
---
Fixed mixed declarations in SCSS.

View File

@@ -1,5 +0,0 @@
---
"@tabler/core": patch
---
Update SCSS to use logical properties

View File

@@ -1,7 +0,0 @@
---
"@tabler/core": minor
"@tabler/docs": patch
---
Added Geist font family integration.

View File

@@ -1,5 +0,0 @@
---
"@tabler/core": patch
---
Updated `stroke-width` for `.icon-sm` from `1` to `1.5` for better visibility.

View File

@@ -1,6 +0,0 @@
---
"@tabler/core": minor
"@tabler/preview": minor
---
Added language selector dropdown to navbar with flag indicators for multilingual support.

View File

@@ -1,6 +0,0 @@
---
"@tabler/core": patch
"@tabler/preview": patch
---
Added `bg-blur` utility and increased `container-tight` width for layout flexibility.

View File

@@ -1,5 +0,0 @@
---
"@tabler/preview": patch
---
Updated icons to v3.34.1 with 75 new icons.

View File

@@ -1,6 +0,0 @@
---
"@tabler/core": patch
---
Added `border-top-left-radius` and `border-top-right-radius` to first and last child elements in `.card-table` for proper corner rounding.

View File

@@ -1,5 +0,0 @@
---
"@tabler/core": patch
---
Added `media-print` mixin and print styles to hide interactive components during printing.

View File

@@ -1,6 +0,0 @@
---
"@tabler/preview": minor
---
Refactored page-menu structure for dashboards and updated navigation menu organization.

View File

@@ -0,0 +1,4 @@
---
---
Refactor bundlewatch workflow to use Turbo

View File

@@ -1,5 +0,0 @@
---
"@tabler/preview": patch
---
Updated activity messages.

View File

@@ -1,7 +0,0 @@
---
"@tabler/core": minor
"@tabler/preview": minor
---
Refactored navbar-side component by consolidating separate include files (apps, language, notifications, theme, user) into a single `navbar-side.html` file for better maintainability.

View File

@@ -1,6 +0,0 @@
---
"@tabler/preview": minor
---
Added New Task modal with fields for task name, description, assigned user, priority, due date, and category tags.

View File

@@ -0,0 +1,5 @@
---
"@tabler/core": patch
---
Fix size of `apexcharts` tooltip marker

View File

@@ -1,5 +0,0 @@
---
"@tabler/preview": minor
---
Added new onboarding page with progress indicator and navigation layout.

View File

@@ -1,5 +0,0 @@
---
"@tabler/core": patch
---
Fixed double bottom border in tables.

View File

@@ -1,6 +0,0 @@
---
"@tabler/core": minor
"@tabler/preview": minor
---
Added Progress Background component with text labels and value display.

View File

@@ -1,5 +0,0 @@
---
"@tabler/core": minor
---
Added `.progress-lg` and `.progress-xl` size variants for the progress component.

View File

@@ -1,6 +0,0 @@
---
"@tabler/core": minor
"@tabler/preview": minor
---
Added Progress Steps component for step-by-step navigation indicators.

View File

@@ -1,5 +0,0 @@
---
"@tabler/core": patch
---
Added smooth transitions for progress bar `width` and `background-color` changes.

View File

@@ -1,6 +0,0 @@
---
"@tabler/core": patch
---
Removed redundant nullish coalescing operator from `html` option in popover and tooltip initialization.

View File

@@ -0,0 +1,5 @@
---
"@tabler/core": patch
---
Refactored the project into a monorepo, removed Gulp, and introduced a new, more efficient build process.

View File

@@ -1,5 +0,0 @@
---
"@tabler/core": patch
---
Updated skip-link to use `visually-hidden` for improved accessibility.

View File

@@ -0,0 +1,5 @@
---
"@tabler/core": patch
---
Fix vertical alignment in single page and error layouts

View File

@@ -1,6 +0,0 @@
---
"@tabler/preview": minor
---
Added new Task List page with tables showing tasks organized by status (Upcoming, In Progress, Completed) and modal dialog for adding new tasks.

View File

@@ -1,5 +0,0 @@
---
"@tabler/core": patch
---
Updated deprecated global Sass functions to module equivalents (`map.merge`, `string.slice`, `math.percentage`, etc.).

View File

@@ -1,5 +0,0 @@
---
"@tabler/core": patch
---
Updated Bootstrap to v5.3.8.

View File

@@ -1,6 +0,0 @@
---
"@tabler/core": patch
"@tabler/preview": patch
---
Updated trending component to use `arrow-up`/`arrow-down` instead of `trending-up`/`trending-down`.

View File

@@ -1,5 +0,0 @@
---
"@tabler/docs": patch
---
Fixed Docs search display in dark mode.

View File

@@ -1,5 +0,0 @@
---
"@tabler/preview": patch
---
Fixed responsive layouts on the Form Elements page.

View File

@@ -1,5 +0,0 @@
---
"@tabler/preview": patch
---
Added comprehensive All Elements page with all UI components and Bootstrap elements

View File

@@ -1,100 +0,0 @@
---
description: Cursor Rules for Tabler Changesets
globs:
alwaysApply: true
---
### File Structure
- Each change must be in a separate changeset file in `.changeset/` directory
- Use descriptive kebab-case filenames (e.g., `progress-sizes.md`, `button-ghost.md`)
- Follow the standard changeset format with frontmatter and description
### Change Description Format
- **One sentence per changeset** - keep descriptions concise and focused
- Use **backticks for code elements**: classes (`.btn-ghost`), properties (`stroke-width`), values (`1.5`), icons (`arrow-up`)
- Start with action verbs: "Added", "Updated", "Fixed", "Removed"
- Be specific about what was changed
### Version Bump Guidelines
- **Major**: Breaking changes, complete rewrites
- **Minor**: New features, new components, new pages, significant enhancements
- **Patch**: Bug fixes, small improvements, style updates, accessibility fixes
### Package Selection
- `"@tabler/core"`: Changes to SCSS, core functionality, CSS classes
- `"@tabler/preview"`: New pages, demo updates, preview-specific changes
- `"@tabler/docs"`: Documentation updates
- Use multiple packages when change affects multiple areas
### Examples
#### New Feature (Minor)
```md
---
"@tabler/core": minor
"@tabler/preview": minor
---
Added Progress Steps component for step-by-step navigation indicators.
```
#### Bug Fix (Patch)
```md
---
"@tabler/core": patch
---
Updated `stroke-width` for `.icon-sm` from `1` to `1.5` for better visibility.
```
#### New Page (Minor)
```md
---
"@tabler/preview": minor
---
Added new onboarding page with progress indicator and navigation layout.
```
#### Style Enhancement (Patch)
```md
---
"@tabler/core": patch
---
Added smooth transitions for progress bar width and background color changes.
```
### Code Formatting Rules
- Class names: `.btn-ghost`, `.progress-lg`, `.icon-sm`
- CSS properties: `stroke-width`, `background-color`, `width`
- Values: `1.5`, `transparent`, `100%`
- Icon names: `arrow-up`, `arrow-down`, `trending-up`
- HTML attributes: `aria-label`, `role`, `data-*`
- JavaScript functions: `addEventListener()`, `querySelector()`
### Common Patterns
- **Component additions**: "Added [ComponentName] component for [purpose]"
- **Size variants**: "Added [size] size variant for [component] (`.class-size`)"
- **Style fixes**: "Fixed [issue] in [component/element]"
- **Icon updates**: "Updated [component] to use `new-icon` instead of `old-icon`"
- **Accessibility**: "Improved accessibility by [specific change]"
### Commit Message Format
Use English for commit messages following conventional commit format when possible:
- `feat: add progress steps component`
- `fix: update icon stroke width for better visibility`
- `style: add smooth transitions to progress bars`

View File

@@ -1,171 +0,0 @@
---
description: Tabler Project HTML Elements Guidelines
globs: ["**/*.html", "**/*.liquid", "**/*.md"]
alwaysApply: true
---
## HTML Elements Guidelines
### 1. Icons
When you need to use an icon, always use the Tabler icon include syntax:
```html
{% include "ui/icon.html" icon="ICON_NAME" %}
```
**Examples:**
- `{% include "ui/icon.html" icon="home" %}`
- `{% include "ui/icon.html" icon="building-community" %}`
- `{% include "ui/icon.html" icon="map-pin" %}`
### 2. Page Links
When linking to other pages, always use the relative page syntax:
```html
href="{{ page | relative }}/url.html"
```
**Examples:**
- `href="{{ page | relative }}/job-post.html"`
- `href="{{ page | relative }}/job-listing.html"`
- `href="{{ page | relative }}/marketing/index.html"`
### 3. Static Generation
All pages are statically generated to HTML using Eleventy (11ty). Keep this in mind when:
- Writing frontmatter (must be static YAML, no Liquid templating)
- Creating dynamic content (use Liquid templating in the body, not frontmatter)
- Linking between pages (use relative paths)
### 4. Additional Guidelines
#### Frontmatter Rules
- Frontmatter must be static YAML
- Cannot use Liquid templating in frontmatter
- Use static values for title, permalink, etc.
#### Liquid Templating
- Use Liquid templating only in the HTML body
- Access data using `{{ variable }}` syntax
- Use `{% for %}` loops for dynamic content
- Use `{% if %}` conditions for conditional rendering
#### File Structure
- Pages go in `preview/pages/`
- Includes go in `shared/includes/`
- Data files go in `shared/data/`
- Documentation goes in `docs/content/`
#### CSS Classes
- Use Bootstrap 5 classes
- Use Tabler's custom CSS classes
- Follow the pattern: `--#{$prefix}component-property`
#### Accessibility
- Include proper ARIA labels
- Use semantic HTML elements
- Ensure proper heading hierarchy
- Add alt text for images
### 5. Component Usage
#### Cards
- Use `card` class for main containers
- Use `card-body` for content areas
- Use `card-header` for card headers
- Use `card-title` for card title
#### Buttons
- Use `btn` class for all buttons
- Use `btn-primary` for primary actions
- Use `btn` for secondary actions, don't use `btn-outline-secondary`
- Use `btn-sm` for smaller buttons
- Use `w-100` for full-width buttons
#### Forms
- Use `form-control` for input fields
- Use `form-label` for labels
- Use `form-check` for checkboxes/radio buttons
- Use `form-select` for dropdowns
#### Layout
- Use Bootstrap grid system (`row`, `col-*`)
- Use `container-xl` for main containers
- Use `page-wrapper` for page structure
- Use `page-body` for main content area
#### Badges
- Use `badge` class for badges
- Don't use `badge-outline` for badges, use `badge` class instead
- Don't use `badge-primary` for badges, use `badge` class instead
- Don't change the text color of badges
#### Markdown
- Use `markdown` class for markdown content
- Apply to containers that render markdown content
- Example: `<div class="markdown">...</div>`
#### Rest of the rules
- Read the rest of the rules in the `docs/content/ui/` folder
### 6. Data Integration
#### Using JSON Data
```liquid
{% for item in items %}
<div>{{ item.name }}</div>
{% endfor %}
```
#### Conditional Rendering
```liquid
{% if condition %}
<div>Content</div>
{% endif %}
```
#### Including Components
```liquid
{% include "ui/button.html" color="primary" text="Click me" %}
```
### 7. Best Practices
#### Performance
- Minimize nested loops
- Use `limit` filters when iterating large datasets
- Optimize images for web use
#### Code Organization
- Keep components modular and reusable
- Use consistent naming conventions
- Comment complex logic
- Group related functionality together
#### Error Handling
- Always check if data exists before using it
- Provide fallback content for missing data
- Use `{% if %}` guards for optional content

View File

@@ -1,56 +0,0 @@
---
description: Tabler Project Rules
globs:
alwaysApply: true
---
## Documentation Standards
- Always write documentation in English (not Polish) for technical content
- Use clear, descriptive headings with proper hierarchy (##, ###)
- Include practical examples with code snippets
- Add explanations for each component's purpose and usage
- Use consistent formatting for code blocks and examples
## CSS/SCSS Guidelines
- Follow Tabler's CSS custom properties pattern: `--#{$prefix}component-property`
- Use semantic class names that describe purpose, not appearance
- Maintain consistent spacing and indentation in SCSS files
- Group related styles together with clear comments
- Use Bootstrap-compatible class naming conventions
## Component Documentation Structure
- Start with a brief description of the component's purpose
- Show basic usage examples first
- Include variations and modifiers
- Add accessibility considerations where relevant
- Provide code examples that are copy-paste ready
## File Organization
- Keep documentation files in `docs/content/ui/components/`
- Use consistent naming: lowercase with hyphens
- Include frontmatter with title, summary, and description
- Link to Bootstrap documentation when relevant
## Code Examples
- Use Liquid templating syntax for dynamic examples
- Include both HTML and rendered output
- Show responsive behavior where applicable
- Demonstrate proper accessibility attributes
## Git Commit Messages
- Use English for commit messages
- Follow conventional commit format when possible
- Be descriptive about what was changed and why
## Project-Specific Conventions
- Tabler uses Bootstrap 5 as a foundation
- Custom components extend Bootstrap functionality
- Documentation should be comprehensive but concise
- Examples should be practical and immediately usable

View File

@@ -1,68 +0,0 @@
name: Argos Tests
on:
push:
branches:
- dev
pull_request:
paths:
- 'preview/**/*.js'
- 'preview/**/*.html'
- 'preview/**/*.scss'
- 'core/**/*.js'
- 'core/**/*.scss'
env:
NODE: 20
permissions:
contents: read
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
# if: github.event.pull_request.draft == false
if: false
steps:
- name: Clone repository
uses: actions/checkout@v5
- name: Cache turbo build setup
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Install PNPM
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "${{ env.NODE }}"
cache: 'pnpm'
- name: Get installed Playwright version
id: playwright-version
run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./package.json').devDependencies['@playwright/test'])")" >> $GITHUB_ENV
- name: Cache playwright binaries
uses: actions/cache@v4
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
- name: Install pnpm dependencies
run: pnpm install
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
- name: Run Playwright tests
run: pnpm run playwright

View File

@@ -17,7 +17,7 @@ jobs:
steps:
- name: Clone repository
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Cache turbo build setup
uses: actions/cache@v4
@@ -27,14 +27,13 @@ jobs:
restore-keys: |
${{ runner.os }}-turbo-
- name: Install PNPM
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@v4
with:
node-version: "${{ env.NODE }}"
cache: 'pnpm'
- name: Install PNPM
uses: pnpm/action-setup@v4
- name: Set up Bundler
uses: ruby/setup-ruby@v1

View File

@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false

View File

@@ -11,7 +11,7 @@ jobs:
pull-requests: write
issues: write
steps:
- uses: actions/stale@v10
- uses: actions/stale@v9
with:
days-before-issue-stale: 360
days-before-issue-close: 14

View File

@@ -1,7 +1,6 @@
name: Changed lock files
on:
pull_request_target:
types: [opened, reopened]
pull_request: null
permissions:
pull-requests: read
@@ -12,10 +11,11 @@ jobs:
name: Verify lock file integrity
steps:
- name: Clone Tabler
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Prevent lock file change
uses: xalvarez/prevent-file-change-action@v3
uses: xalvarez/prevent-file-change-action@v1
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
pattern: Gemfile.lock|pnpm-lock.json|pnpm-lock.yaml
trustedAuthors: codecalm, BG-Software-BG, dependabot
pattern: Gemfile.lock|pnpm-lock.json
trustedAuthors: codecalm, dependabot

View File

@@ -3,7 +3,7 @@ name: Release
on:
push:
branches:
- dev
- main
permissions:
contents: read
@@ -21,17 +21,16 @@ jobs:
pull-requests: write # to create pull request
steps:
- name: Checkout Repo
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Setup Node.js 18
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install PNPM
uses: pnpm/action-setup@v4
- name: Setup Node.js 18
uses: actions/setup-node@v6
with:
node-version: "${{ env.NODE }}"
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install

View File

@@ -11,10 +11,10 @@ permissions:
jobs:
test:
runs-on: ubuntu-latest
runs-on: [ubuntu-latest, window-latest, macos-latest]
steps:
- name: Clone repository
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Cache turbo build setup
uses: actions/cache@v4
@@ -24,14 +24,13 @@ jobs:
restore-keys: |
${{ runner.os }}-turbo-
- name: Install PNPM
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@v4
with:
node-version: "${{ env.NODE }}"
cache: 'pnpm'
- name: Install PNPM
uses: pnpm/action-setup@v4
- run: node --version

11
.gitignore vendored
View File

@@ -19,11 +19,9 @@ node_modules/
/svg-tmp/
/components/
/percy.sh
/preview/pages/playground.html
/preview/pages/screenshot.html
/preview/pages/screenshot-*.html
/preview/pages/playground-*.html
/preview/pages/features.html
/src/pages/playground.html
/src/pages/playground-*.html
/src/pages/features.html
.pnp.loader.mjs
.pnp.cjs
@@ -35,5 +33,4 @@ package-lock.json
demo/
dist/
packages-zip/
.env
packages-zip/

View File

@@ -1,20 +1,10 @@
{
"bracketSpacing": true,
"jsxSingleQuote": false,
"printWidth": 320,
"printWidth": 240,
"proseWrap": "always",
"semi": false,
"singleQuote": true,
"quoteProps": "consistent",
"singleQuote": false,
"tabWidth": 2,
"useTabs": false,
"trailingComma": "all",
"overrides": [
{
"files": "*.scss",
"options": {
"parser": "scss"
}
}
]
"trailingComma": "all"
}

View File

@@ -1,138 +1,4 @@
# @tabler/core
## 1.4.0
### Minor Changes
- 9951fe9: Enhance button and hover animations
- a200d30: Improve breadcrumb styles
- 49ab9ea: Add new Tabler Illustrations
### Patch Changes
- 6c4dd36: Update class names from `*-left`, `*-right` to `*-start`, `*-end`
- 6fec73a: Fix relative line heights in buttons
- db6200a: Remove `license_key` option from HugeRTE init object
- e96f055: Add different favicon to development environment
- 6c38a48: Update Bootstrap to v5.3.7
- 2a12f72: Update CSS calculations to use `calc()`
- 666a296: Fix list group item hoverable only with `.list-group-hoverable` class
- cfd4cb6: Fix `.pagination-link` hover styles to non-active items
## 1.3.2
### Patch Changes
- 446c34e: Fix README file in core package
## 1.3.1
### Patch Changes
- a7f73d7: Fix README file in core package
## 1.3.0
### Minor Changes
- a1af801: Add FullCalendar integration
- b9d434d: Add new charts to dashboard pages
- 79bd867: Add new form layout page
### Patch Changes
- cac5d92: Update illustrations to v1.7
- f94b153: Add SRI hashes to scripts and styles
- c127d65: Fix colour picker preview page not displaying correctly
- b6e9b18: Update icons to v3.31.0
- 8850f61: Enhance pagination component with new styles
- 9910dd0: Add "text features" menu item
- 638f36c: Refactor SCSS variable names for shadows
- 0d501e9: Correct `aria-label` of app menu link
- 3a02ef9: Fix some marketing site rows overflowing on mobile
- fd0fd47: Improve card footer layout and enhance entry display format in invoices
- 74e5d26: Fix color badge in navbar menu
- 72a1d67: Add clipboard functionality to Tabler documentation
- bb617b8: Fix colour swatches on small screens
- d73d78e: Add missing `tw` entry in `flags.json`
- 19a3d20: Delete missing demo RTL style
- b5e2f54: Enhance dropdown components for better accessibility
- a41c956: Remove unnecessary `!important` from body padding
- e675389: Fix missing border-radius to `.card-header-tabs`
- 9007e73: Fix FAQ accordion structure
## 1.2.0
### Minor Changes
- c59bc9d: Add gradient background utilities
- f9e4da2: Add new apps card with brand icons in navbar
- 92a3afe: Replaced TinyMCE with HugeRTE to address license violation
- 199f39a: Update Bootstrap to version 5.3.5
- 9bbcb99: Add theme settings wizard
- b17b488: Add steps light colors
- 215eaa4: Add Turbo library integration
### Patch Changes
- aea3b0a: Rollback accordion component structure
- 3fc7b84: Add space between page numbers in pagination
- 2f8a372: Add Bootstrap components to Tabler JS
- 9fceadd: Fix tooltip colors in vector maps
- 44250db: Update avatar size variable to support list size configuration
- be1f3d1: Fix broken shape in South Korea flag
- c20d076: Refactor `border-radius` in components to use CSS variables
- 042e50f: Update disabled color variables in navbars
- 473fa38: Apply border radius to `tom-select` on focus
- 8646192: Add avatars page with various demos of avatars
- 922bb03: Minor spelling and grammar improvements to emails docs
- 44250db: Update avatar size variable to support list size configuration
- ddcd3a7: Refactor SCSS for alerts and close button styles
- e3d68d6: Fix `autosize` and `input mask` plugins to use window scope
- 4846828: Fix scrollbar color mixin to use body color variable
- 6b6617a: Improve README
- 94bea00: Make scrollbar track transparent
- e14e492: Fix scrollbar jumps when content is higher than screen
- 6d6d1bd: Add responsive font size for form controls on mobile devices
- 6c566cf: Add new advanced table example
## 1.1.1
### Patch Changes
- f29c911: Fix Documentation structure
## 1.1.0
### Minor Changes
- a2640e2: Add Playwright configuration and visual regression tests
- d3ae77c: Enable `scrollSpy` in `countup` module
- bd3d959: Refactor SCSS files to replace divide function with calc
- cb278c7: Add Segmented Control component
- b47725d: Add new text features page with mentions: user, color and app.
- b4b4d1a: Add Scroll Spy page
- 9cd5327: Update border radius variables for consistency across components
- 4376968: Add Signature Pad feature and signatures page
- f95f250: Update color utility classes and replace background colors in pricing table
- eaa7f81: Refactored the project into a monorepo, removed Gulp, and introduced a new, more efficient build process.
- ea14462: Add documentation for segmented control component
- 1edaff4: Add new payment provider (Troy)
- edbaa1e: Add selectable table functionality with active background color
- 378fba8: Refactor badge styles, remove Bootstrap styles
- f3c409f: Refactor alert component styles and markup, remove Bootstrap styles
- c240b5a: Refactor accordion component styles and markup, remove Bootstrap styles
### Patch Changes
- 687267d: Fix overflow of `label` in a `floating-input`
- 06b1dec: Fix size of `apexcharts` tooltip marker
- afd0700: Fix apexcharts heatmap example in docs
- 78383ef: Fix negative margins in `.navbar-bordered` variant
- 11f4487: Use the full license agreement for illustrations in docs
- b28ce9f: Fix vertical alignment in single page and error layouts
- 24b944c: Fix `.avatar-upload` double borders
- ca4ba14: Fixes navbar styles with new hover effects and color variables
# Changelog
## 1.0.0 - 2025-01-28
@@ -150,8 +16,8 @@
- be14607: Add new color picker component using `coloris.js` library
- d046570: Update Tabler Icons to version 2.23 with 18 new icons added
- 5488c50: New page with payment providers: `payment-providers.html`
- 5488c50: Add support for new payment providers: 2c2p, Adyen, Affirm, Alipay Plus, Allegro Pay, Amazon Pay, Apple Pay, Autopay, Binance USD, Bkash, Cash App, Chime, EasyPaisa, Ethereum, Google Pay, HubSpot, iDeal, Litecoin, Mercado Pago, MetaMask, MoneyGram, OpenSea, Payconiq, Payka, Payline, PayPo, Paysafe, Poli,
Revolut Pay, Samsung Pay, Shop Pay, Solana, Spingo, Stax, Tether, True USD, Venmo, WeChat Pay, Wise, Zelle
- 5488c50: Add support for new payment providers: 2c2p, Adyen, Affirm, Alipay Plus, Allegro Pay, Amazon Pay, Apple Pay, Autopay, Binance USD, Bkash, Cash App, Chime, EasyPaisa, Ethereum, Google Pay, HubSpot, iDeal, Litecoin, Mercado Pago,
MetaMask, MoneyGram, OpenSea, Payconiq, Payka, Payline, PayPo, Paysafe, Poli, Revolut Pay, Samsung Pay, Shop Pay, Solana, Spingo, Stax, Tether, True USD, Venmo, WeChat Pay, Wise, Zelle
### Patch Changes

213
README.md
View File

@@ -1,5 +1,5 @@
<p align="center">
<a href="https://github.com/tabler/tabler"><img src="https://raw.githubusercontent.com/tabler/tabler/refs/heads/dev/shared/static/logo.svg" alt="A premium and open source dashboard template with a responsive and high-quality UI." width="300"></a><br><br>
<a href="https://github.com/tabler/tabler"><img src="https://raw.githubusercontent.com/tabler/tabler/dev/src/static/logo.svg" alt="A premium and open source dashboard template with a responsive and high-quality UI." width="300"></a><br><br>
A premium and open source dashboard template with a responsive and high-quality UI.
</p>
@@ -15,12 +15,12 @@ A premium and open source dashboard template with a responsive and high-quality
## Sponsors
**If you want to support our project and help us grow it, you can [become a sponsor on GitHub](https://github.com/sponsors/codecalm) or just [donate on PayPal](https://paypal.me/codecalm) :)**
**If you want to support our project and help me grow it, you can [become a sponsor on GitHub](https://github.com/sponsors/codecalm) or just [donate on PayPal](https://paypal.me/codecalm) :)**
<p align="center">
<a href="https://github.com/sponsors/codecalm">
<img src="https://cdn.jsdelivr.net/gh/tabler/sponsors@latest/sponsors.svg" alt="Tabler sponsors">
</a>
<a href="https://github.com/sponsors/codecalm">
<img src="https://cdn.jsdelivr.net/gh/tabler/sponsors@latest/sponsors.svg" alt="Tabler sponsors">
</a>
</p>
## Testing
@@ -28,24 +28,21 @@ A premium and open source dashboard template with a responsive and high-quality
<p align="center">Browser testing via:</p>
<p align="center">
<a href="https://www.lambdatest.com/" target="_blank">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/14dd2a0a-bafe-436e-a6cb-29636278c781">
<source media="(prefers-color-scheme: light)" srcset="https://github.com/user-attachments/assets/d3dede5a-d702-47c3-bb66-4d887948ed83">
<img src="https://github.com/user-attachments/assets/d3dede5a-d702-47c3-bb66-4d887948ed83" alt="labmdatest" width="296">
</picture>
</a>
<a href="https://www.lambdatest.com/" target="_blank">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/14dd2a0a-bafe-436e-a6cb-29636278c781">
<source media="(prefers-color-scheme: light)" srcset="https://github.com/user-attachments/assets/d3dede5a-d702-47c3-bb66-4d887948ed83">
<img src="https://github.com/user-attachments/assets/d3dede5a-d702-47c3-bb66-4d887948ed83" alt="Tabler Icons preview" width="296">
</picture>
</a>
</p>
## 🔎 Preview
Tabler is fully responsive and compatible with all modern browsers. Thanks to its modern and user-friendly design you can create a fully functional interface that users will love! Choose the layouts and components you need and customize them to make your design consistent and eye-catching. Every component has been created with attention to detail to make your interface beautiful! <a href="https://preview.tabler.io">Show me a demo</a>
<p align="center">
<a href="https://preview.tabler.io" target="_blank">
<img src="https://raw.githubusercontent.com/tabler/tabler/dev/shared/static/tabler-preview.png" alt="Tabler Preview">
</a>
</p>
<a href="https://preview.tabler.io" target="_blank"><img src="https://raw.githubusercontent.com/tabler/tabler/dev/src/static/tabler-preview.png" alt="Tabler preview"></a>
## 🚀 Features
@@ -56,30 +53,110 @@ We've created this admin panel for everyone who wants to create templates based
* **HTML5 & CSS3:** We use only modern web technologies, such as HTML5 and CSS3. Our theme includes some subtle CSS3 animations, which will help you attract attention.
* **Clean Code:** We followed Bootstraps guidelines carefully to make your integration as easy as possible. All code is handwritten and W3C valid.
* **Demo pages**: Tabler features over 20 individual pages using various components, which gives you the freedom to choose and combine. All components can vary in color and styling that you can easily modify using Sass. Sky is the limit!
* **Single Page Application versions:** [Tabler React](https://github.com/tabler/tabler-react) has React components for Tabler.
## 📖 Documentation
The documentation is available at https://docs.tabler.io/
Documentation is available as a part of Tabler preview: https://tabler.io/docs/
To run the documentation site locally, follow instructions in the [Documentation README](https://github.com/tabler/tabler/blob/dev/site/README.md).
## 🪴 Project Activity
<p align="center">
<img src="https://repobeats.axiom.co/api/embed/61d1db34446967b0848af68198a392067e0f5870.svg" alt="Repobeats analytics image" />
</p>
![Alt](https://repobeats.axiom.co/api/embed/61d1db34446967b0848af68198a392067e0f5870.svg "Repobeats analytics image")
## 💕 Sponsor Tabler
<a href="https://github.com/sponsors/codecalm" target="_blank"><img src="/src/static/sponsor-banner-readme.png?raw=true" alt="Sponsor Tabler" /></a>
### Sponsors
Support this project by becoming a sponsor. Your logo will show up in this README with a link to your website. [Become a sponsor!](https://opencollective.com/tabler#sponsor)
<a href="https://opencollective.com/tabler/tiers/sponsor/0/website" target="_blank"><img src="https://opencollective.com/tabler/tiers/sponsor/0/avatar.svg" /></a>
<a href="https://opencollective.com/tabler/tiers/sponsor/1/website" target="_blank"><img src="https://opencollective.com/tabler/tiers/sponsor/1/avatar.svg" /></a>
<a href="https://opencollective.com/tabler/tiers/sponsor/2/website" target="_blank"><img src="https://opencollective.com/tabler/tiers/sponsor/2/avatar.svg" /></a>
<a href="https://opencollective.com/tabler/tiers/sponsor/3/website" target="_blank"><img src="https://opencollective.com/tabler/tiers/sponsor/3/avatar.svg" /></a>
<a href="https://opencollective.com/tabler/tiers/sponsor/4/website" target="_blank"><img src="https://opencollective.com/tabler/tiers/sponsor/4/avatar.svg" /></a>
<a href="https://opencollective.com/tabler/tiers/sponsor/5/website" target="_blank"><img src="https://opencollective.com/tabler/tiers/sponsor/5/avatar.svg" /></a>
<a href="https://opencollective.com/tabler/tiers/sponsor/6/website" target="_blank"><img src="https://opencollective.com/tabler/tiers/sponsor/6/avatar.svg" /></a>
<a href="https://opencollective.com/tabler/tiers/sponsor/7/website" target="_blank"><img src="https://opencollective.com/tabler/tiers/sponsor/7/avatar.svg" /></a>
<a href="https://opencollective.com/tabler/tiers/sponsor/8/website" target="_blank"><img src="https://opencollective.com/tabler/tiers/sponsor/8/avatar.svg" /></a>
<a href="https://opencollective.com/tabler/tiers/sponsor/9/website" target="_blank"><img src="https://opencollective.com/tabler/tiers/sponsor/9/avatar.svg" /></a>
## 📦 Setup environment
To use our build system and run our documentation locally, you'll need a copy of Tabler's source files. Follow the steps below:
1. [Install Node.js](https://nodejs.org/download/), which we use to manage our dependencies.
2. Navigate to the root `/tabler` directory and run `pnpm install` to install our local dependencies listed in `package.json`.
**OSX users**:
```pnpm install```
and then
```npm run start```
**Windows users**:
[Install Git](https://git-scm.com/download/win) in `C:\Program Files\git\bin` directory and run `npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"` to change the default shell.
Once you complete the setup, you'll be able to run the various commands provided from the command line.
## Build locally
You need to have `pnpm` installed.
1. From the root `/tabler` directory, run installation in the command line: `pnpm install`
2. Then execute `pnpm run start` to start up the application stack.
3. Open [http://localhost:3000](http://localhost:3000) in your browser, and voilà.
4. Any change in the `/src` directory will build the application and refresh the page.
**Note**:
Run `pnpm run build` for reforms a one off build application without refresh.
Open [http://localhost:3001](http://localhost:3001) to configure the Web server.
## Installation
### Package Managers
Tabler is distributed via npm. You can install it with this or your preferred JavaScript package manager:
Tabler is distributed via npm.
```sh
npm install --save @tabler/core
```
## Running with Docker
**Plain Docker**
If you don't want to install node/npm and the dependencies on your local environment, you can use the provided Dockerfile to build a docker image.
This Dockerfile is provided as an example to spin-up a container running Tabler.
Example of how to use this image:
1. Build the tabler image : `docker build -t tabler .`
2. Run the tabler image while mounting the `src` directory as well as the `_config.yml` file into the container.
Don't forget to expose the port 3000 so you can browse the website locally.
You can also expose the port 3001 to have access to BrowserSync
```sh
docker run -p 3000:3000 -p 3001:3001 -v $(pwd)/src:/app/src -v $(pwd)/_config.yml:/app/_config.yml tabler
```
Now open your browser to [http://localhost:3000](http://localhost:3000). Edit anything in the `src/` folder and watch your browser refresh the page after it has been rebuilt.
**Docker Compose**
You can also use the docker compose config from this repo. Use `docker compose build && docker compose up` or `docker compose up --build` to build and start the container. Edit anything in the `src/` folder the same way as with plain docker and access the same URLs and ports in your browser.
### CDN support
All files included in `@tabler/core` npm package are also available over a CDN.
All files included in `@tabler/core` npm package are available over a CDN.
#### Javascript
@@ -93,84 +170,24 @@ All files included in `@tabler/core` npm package are also available over a CDN.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tabler/core@latest/dist/css/tabler.min.css">
```
## Building locally
## Feature requests
To build a copy of Tabler locally, you have two options. You can either set up your device directly with the development tools required to build Tabler, or if you would prefer not to install all the development dependencies directly onto your device, you can use a Dockerfile that Tabler provides to build a docker image. Instructions follow below.
https://tabler.canny.io/feature-requests
### First steps: Downloading the Tabler source files
With either method, the first thing you'll want to do is download a copy of the Tabler source files to your device.
#### From the Tabler GitHub releases page
If you don't want to edit the source code once you've downloaded it, and aren't interested in merging future project updates into your copy, you can just download the source files straight from the [Tabler releases on GitHub](https://github.com/tabler/tabler/releases) and extract the contents to a directory called `tabler`.
#### Cloning with Git
If you **do** wish to edit the source code after downloading it, for example to contribute changes back to the Tabler project, you'll want to do this by cloning it with Git:
1. If you don't have Git installed on your device, download and install it. You can find instructions at [https://git-scm.com/downloads](https://git-scm.com/downloads).
2. (Optional) **Windows users:** you could optionally install Git in the `C:\Program Files\git\bin` directory and run `npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"` to change the default shell.
3. Clone the Tabler project into a folder on your device. Instructions can be found at [cloning a repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository).
### Installing and running development tools directly
1. [Install Node.js](https://nodejs.org/download/), which we use to manage our dependencies.
2. [Install pnpm](https://pnpm.io/installation) (We recommend either by [Using Corepack](https://pnpm.io/installation#using-corepack) or by [Using npm](https://pnpm.io/installation#using-npm))
3. From the root `/tabler` directory where you downloaded the Tabler source files, run installation on the command line:
```sh
pnpm install
```
4. Then execute the following to start up the application stack:
```sh
pnpm run start
```
5. Open [http://localhost:3000](http://localhost:3000) to view the preview website in your browser, or [http://localhost:3010](http://localhost:3010) to view the documentation website - and voilà.
Changes to most of the source files of Tabler core, preview and docs will rebuild the application and refresh the page.
**Note**:
If you wish to perform a one-off build without auto-refresh on any changes, you can run:
```sh
pnpm run build
```
You can open [http://localhost:3001](http://localhost:3001) to configure the Web server.
### Installing and running development tools with Docker
**Plain Docker**
Here is an example of how to use this image:
1. From the root `/tabler` directory where you downloaded the Tabler source files, build the tabler image:
```sh
docker build -t tabler .
```
2. Run the tabler image. The following command mounts the `src` directory into the container, exposes port 3000 to browse the website locally, and exposes port 3001 to automatically sync changes:
```sh
docker run -p 3000:3000 -p 3001:3001 -v $(pwd)/src:/app/src tabler
```
3. Open your browser to [http://localhost:3000](http://localhost:3000). Edit anything in the `src/` folder and watch your browser refresh the page after it has been rebuilt.
**Docker Compose**
You can also use the docker compose config from this repo. From the root `/tabler` directory where you downloaded the Tabler source files, use `docker compose build && docker compose up` or `docker compose up --build` to build and start the container. Edit anything in the `src/` folder the same way as with plain docker and access the same URLs and ports in your browser.
## Bugs and feature requests
Found a bug or have a feature request? [Please open a new issue](https://github.com/tabler/tabler/issues/new).
## 🤓 Creators
**Paweł Kuna**
- <https://x.com/codecalm>
- <https://twitter.com/codecalm>
- <https://github.com/codecalm>
- <https://codecalm.net>
**Bartłomiej Gawęda**
- <https://x.com/B_Gaweda>
- <https://github.com/BG-Software-BG>
## 👨‍🚀 Contributors
@@ -178,11 +195,25 @@ This project exists thanks to all the people who contribute.
<img src="https://opencollective.com/tabler/contributors.svg?width=890&button=false" />
## Social media
## 🌸 Backers
Stay up to date by joining our community on <a href="https://x.com/tabler_io" >X</a> and <a href="https://www.facebook.com/tabler.io">Facebook</a>
Thank you to all our backers! 🙏 [Become a backer](https://opencollective.com/tabler#backer)
<a href="https://opencollective.com/tabler#backers" target="_blank"><img src="https://opencollective.com/tabler/tiers/backer.svg?width=890&button=false" /></a>
## License
See the [LICENSE](https://github.com/tabler/tabler/blob/master/LICENSE) file.
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

38
build/reformat-mdx.mjs Normal file
View File

@@ -0,0 +1,38 @@
#!/usr/bin/env node
'use strict'
import { readFileSync, writeFileSync } from 'node:fs';
import { join, dirname } from 'node:path';
import { fileURLToPath } from 'node:url'
import { sync } from 'glob';
import beautify from 'js-beautify';
const __dirname = dirname(fileURLToPath(import.meta.url))
const docs = sync(join(__dirname, '..', 'docs', '**', '*.mdx'))
docs.forEach((file, i) => {
const oldContent = readFileSync(file, 'utf8')
// get codeblocks from markdown
const content = oldContent.replace(/(```([a-z0-9]+).*?\n)(.*?)(```)/gs, (m, m1, m2, m3, m4) => {
if (m2 === 'html') {
// m3 = beautify.default.html(m3, {
// "indent_size": 2,
// "indent_char": " ",
// }).trim();
// remove empty lines
m3 = m3.replace(/^\s*[\r\n]/gm, '');
return m1 + m3 + "\n" + m4;
}
return m
})
if (content !== oldContent) {
writeFileSync(file, content, 'utf8')
console.log(`Reformatted ${file}`)
}
})

View File

@@ -1,82 +0,0 @@
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
// Get __dirname in ES modules
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
// File paths (relative to core/.build directory)
const bootstrapPath = path.join(__dirname, '../node_modules/bootstrap/scss/_variables.scss');
const tablerPath = path.join(__dirname, '../scss/_variables.scss');
// Function to extract variable names from SCSS file
function extractVariables(filePath) {
const content = fs.readFileSync(filePath, 'utf8');
const variables = new Set();
// Regex to find SCSS variables
// Looks for patterns like: $variable-name: value
// Includes variables in maps and lists
const variableRegex = /\$([a-zA-Z0-9_-]+)\s*[:=]/g;
let match;
while ((match = variableRegex.exec(content)) !== null) {
const varName = match[1];
variables.add(varName);
}
return variables;
}
// Main function
function compareVariables() {
console.log('Analyzing Bootstrap variables...');
const bootstrapVars = extractVariables(bootstrapPath);
console.log(`Found ${bootstrapVars.size} variables in Bootstrap\n`);
console.log('Analyzing Tabler variables...');
const tablerVars = extractVariables(tablerPath);
console.log(`Found ${tablerVars.size} variables in Tabler\n`);
// Find variables that are in Bootstrap but not in Tabler
const missingInTabler = [];
for (const varName of bootstrapVars) {
if (!tablerVars.has(varName)) {
missingInTabler.push(varName);
}
}
// Sort alphabetically
missingInTabler.sort();
console.log('='.repeat(60));
console.log(`Variables in Bootstrap that are missing in Tabler: ${missingInTabler.length}`);
console.log('='.repeat(60));
if (missingInTabler.length === 0) {
console.log('All Bootstrap variables are present in Tabler!');
} else {
console.log('\nList of missing variables:\n');
missingInTabler.forEach((varName, index) => {
console.log(`${(index + 1).toString().padStart(4)}. $${varName}`);
});
}
// Optionally: show statistics
console.log('\n' + '='.repeat(60));
console.log('Statistics:');
console.log(` Bootstrap: ${bootstrapVars.size} variables`);
console.log(` Tabler: ${tablerVars.size} variables`);
console.log(` Missing: ${missingInTabler.length} variables`);
console.log(` Coverage: ${((1 - missingInTabler.length / bootstrapVars.size) * 100).toFixed(1)}%`);
console.log('='.repeat(60));
}
// Run analysis
try {
compareVariables();
} catch (error) {
console.error('Error during analysis:', error.message);
process.exit(1);
}

View File

@@ -1,33 +0,0 @@
#!/usr/bin/env node
'use strict'
import { existsSync, mkdirSync, lstatSync } from 'fs'
import { emptyDirSync, copySync } from 'fs-extra/esm'
import libs from '../libs.json' with { type: 'json' }
import { fileURLToPath } from 'url'
import { join, dirname } from 'node:path';
const __dirname = dirname(fileURLToPath(import.meta.url))
emptyDirSync(join(__dirname, '..', 'dist/libs'))
for(const name in libs) {
const { npm } = libs[name]
if (npm) {
const from = join(__dirname, '..', `node_modules/${npm}`)
const to = join(__dirname, '..', `dist/libs/${npm}`)
// create dir in dist/libs
if (!existsSync(to)) {
mkdirSync(to, { recursive: true })
}
copySync(from, to, {
dereference: true,
})
console.log(`Successfully copied ${npm}`)
}
}

View File

@@ -1,107 +0,0 @@
const crypto = require('node:crypto');
const fs = require('node:fs');
const path = require('node:path');
const sh = require('shelljs');
sh.config.fatal = true
const configFile = path.join(__dirname, '../../shared/data/sri.json')
const files = [
{
file: 'dist/css/tabler.min.css',
configPropertyName: 'css'
},
{
file: 'dist/css/tabler.rtl.min.css',
configPropertyName: 'css-rtl'
},
{
file: 'dist/css/tabler-flags.min.css',
configPropertyName: 'css-flags'
},
{
file: 'dist/css/tabler-flags.rtl.min.css',
configPropertyName: 'css-flags-rtl'
},
{
file: 'dist/css/tabler-marketing.min.css',
configPropertyName: 'css-marketing'
},
{
file: 'dist/css/tabler-marketing.rtl.min.css',
configPropertyName: 'css-marketing-rtl'
},
{
file: 'dist/css/tabler-payments.min.css',
configPropertyName: 'css-payments'
},
{
file: 'dist/css/tabler-payments.rtl.min.css',
configPropertyName: 'css-payments-rtl'
},
{
file: 'dist/css/tabler-props.min.css',
configPropertyName: 'css-props'
},
{
file: 'dist/css/tabler-props.rtl.min.css',
configPropertyName: 'css-props-rtl'
},
{
file: 'dist/css/tabler-themes.min.css',
configPropertyName: 'css-themes'
},
{
file: 'dist/css/tabler-themes.rtl.min.css',
configPropertyName: 'css-themes-rtl'
},
{
file: 'dist/css/tabler-socials.min.css',
configPropertyName: 'css-socials'
},
{
file: 'dist/css/tabler-socials.rtl.min.css',
configPropertyName: 'css-socials-rtl'
},
{
file: 'dist/css/tabler-vendors.min.css',
configPropertyName: 'css-vendors'
},
{
file: 'dist/css/tabler-vendors.rtl.min.css',
configPropertyName: 'css-vendors-rtl'
},
{
file: 'dist/js/tabler.min.js',
configPropertyName: 'js'
},
{
file: 'dist/js/tabler-theme.min.js',
configPropertyName: 'js-theme'
},
// {
// file: 'dist/preview/css/demo.min.css',
// configPropertyName: 'demo-css'
// },
// {
// file: 'dist/preview/js/demo.min.js',
// configPropertyName: 'demo-js'
// },
]
for (const { file, configPropertyName } of files) {
fs.readFile(path.join(__dirname, '..', file), 'utf8', (error, data) => {
if (error) {
throw error
}
const algorithm = 'sha384'
const hash = crypto.createHash(algorithm).update(data, 'utf8').digest('base64')
const integrity = `${algorithm}-${hash}`
console.log(`${configPropertyName}: ${integrity}`)
sh.sed('-i', new RegExp(`^(\\s+"${configPropertyName}":\\s+["'])\\S*(["'])`), `$1${integrity}$2`, configFile)
})
}

View File

@@ -1,55 +0,0 @@
#!/usr/bin/env node
'use strict'
import { existsSync, mkdirSync } from 'fs'
import { copySync } from 'fs-extra/esm'
import { fileURLToPath } from 'url'
import { join, dirname } from 'node:path'
const __dirname = dirname(fileURLToPath(import.meta.url))
const fromDir = join(__dirname, '..', 'node_modules/geist/dist/fonts')
const toDir = join(__dirname, '..', 'fonts')
// Create fonts directory if it doesn't exist
if (!existsSync(toDir)) {
mkdirSync(toDir, { recursive: true })
}
// Copy geist-mono fonts
const monoFrom = join(fromDir, 'geist-mono')
const monoTo = join(toDir, 'geist-mono')
if (existsSync(monoFrom)) {
if (!existsSync(monoTo)) {
mkdirSync(monoTo, { recursive: true })
}
copySync(monoFrom, monoTo, {
dereference: true,
})
console.log(`Successfully copied geist-mono fonts`)
} else {
console.warn(`Warning: geist-mono fonts not found at ${monoFrom}`)
}
// Copy geist-sans fonts
const sansFrom = join(fromDir, 'geist-sans')
const sansTo = join(toDir, 'geist-sans')
if (existsSync(sansFrom)) {
if (!existsSync(sansTo)) {
mkdirSync(sansTo, { recursive: true })
}
copySync(sansFrom, sansTo, {
dereference: true,
})
console.log(`Successfully copied geist-sans fonts`)
} else {
console.warn(`Warning: geist-sans fonts not found at ${sansFrom}`)
}

View File

@@ -1,42 +0,0 @@
# Tabler Core
Tabler Core is a set of components and utilities for building web applications. It provides a collection of pre-designed components, such as buttons, forms, modals, and more, that can be easily customized and integrated into your projects.
## 🔎 Preview
Tabler is fully responsive and compatible with all modern browsers. Thanks to its modern and user-friendly design you can create a fully functional interface that users will love! Choose the layouts and components you need and customize them to make your design consistent and eye-catching. Every component has been created with attention to detail to make your interface beautiful!
<p align="center">
<a href="https://preview.tabler.io" target="_blank">
<img src="https://raw.githubusercontent.com/tabler/tabler/dev/shared/static/tabler-preview.png" alt="Tabler Preview">
</a>
</p>
## Installation
To install Tabler Core, you can use npm or yarn. Run one of the following commands in your terminal:
```bash
npm install @tabler/core
```
or
```bash
pnpm add @tabler/core
```
## Sponsors
**If you want to support our project and help us grow it, you can [become a sponsor on GitHub](https://github.com/sponsors/codecalm) or just [donate on PayPal](https://paypal.me/codecalm) :)**
<p align="center">
<a href="https://github.com/sponsors/codecalm">
<img src="https://cdn.jsdelivr.net/gh/tabler/sponsors@latest/sponsors.svg" alt="Tabler sponsors">
</a>
</p>
## License
See the [LICENSE](https://github.com/tabler/tabler/blob/master/LICENSE) file.

View File

@@ -6,7 +6,7 @@ import { readFileSync, writeFileSync } from 'node:fs';
import { join, dirname, basename } from 'node:path';
import { fileURLToPath } from 'node:url'
import { sync } from 'glob';
import banner from '../../shared/banner/index.mjs';
import banner from '@repo/banner';
const __dirname = dirname(fileURLToPath(import.meta.url))

View File

@@ -4,13 +4,13 @@ import { fileURLToPath } from 'node:url'
import { babel } from '@rollup/plugin-babel'
import { nodeResolve } from '@rollup/plugin-node-resolve'
import replace from '@rollup/plugin-replace'
import banner from '../../shared/banner/index.mjs'
import banner from '@repo/banner'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
const ESM = process.env.ESM === 'true'
const THEME = process.env.THEME === 'true'
let destinationFile = `tabler${ESM ? '.esm' : ''}`
const external = []
const plugins = [
babel({
@@ -27,9 +27,8 @@ plugins.push(
nodeResolve()
)
const destinationFile = `tabler${THEME ? '-theme' : ''}${ESM ? '.esm' : ''}`
const rollupConfig = {
input: path.resolve(__dirname, `../js/tabler${THEME ? '-theme' : ''}.js`),
input: path.resolve(__dirname, `../js/tabler.${ESM ? 'esm' : 'umd'}.js`),
output: {
banner: banner(),
file: path.resolve(__dirname, `../dist/js/${destinationFile}.js`),
@@ -41,7 +40,7 @@ const rollupConfig = {
}
if (!ESM) {
rollupConfig.output.name = `tabler${THEME ? '-theme' : ''}`
rollupConfig.output.name = 'tabler'
}
export default rollupConfig

Some files were not shown because too many files have changed in this diff Show More