1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-21 17:34:25 +04:00

Compare commits

...

58 Commits

Author SHA1 Message Date
codecalm
f1d27158d9 Merge branch 'dev' of https://github.com/tabler/tabler into dev-form-controls 2025-12-11 20:11:38 +01:00
ethancrawford
94e1a95ffb Allow Offcanvas docs page to scroll properly (#2565) 2025-12-11 20:07:12 +01:00
Paweł Kuna
83ec6f8bcc feat: add Tour component using Driver.js (#2549) 2025-12-08 21:08:22 +01:00
ethancrawford
e3d86c519b feat: upgrade apexcharts to v5 and add CSS variables for dynamic chart colors (#2555)
Co-authored-by: codecalm <codecalm@gmail.com>
2025-12-08 21:08:03 +01:00
codecalm
e2cc7da8fe refactor: Consolidate SCSS utility definitions and improve Bootstrap component exports for consistency 2025-12-08 21:01:24 +01:00
Paweł Kuna
f9d6076014 refactor: Update build scripts and asset management across packages (#2558) 2025-12-02 18:51:54 +01:00
dependabot[bot]
f264470d8f chore(deps): bump actions/checkout from 5 to 6 (#2550)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-30 23:52:18 +01:00
codecalm
127448661b feat: Enhance segmented navigation component with new options for items and icons in all-elements and logs pages 2025-11-30 23:15:21 +01:00
codecalm
f90b7547fb refactor: Update SCSS variables for alerts and avatars, enhance card and progress background styles 2025-11-30 21:37:59 +01:00
codecalm
e5585b65fb refactor: Update SCSS variables for avatars and alerts, enhance card layout and tab functionality 2025-11-29 20:30:37 +01:00
codecalm
e292c201f0 refactor: Update SCSS variables and button styles 2025-11-29 19:34:30 +01:00
Paweł Kuna
ec9469332e feat: Add card gradients page and gradient card components (#2554) 2025-11-29 11:58:51 +01:00
codecalm
deb887b4aa fix: update appData function to use dynamic path resolution for core files 2025-11-28 15:11:12 +01:00
codecalm
f9551c3b8e fix: sort illustration filenames and update illustrations.json content 2025-11-27 03:07:08 +01:00
Aastha Gupta
3aba62e652 fix: add border-top-radius to card table first/last cells (#2505)
Co-authored-by: Paweł Kuna <1282324+codecalm@users.noreply.github.com>
2025-11-26 19:31:42 +01:00
Paweł Kuna
059bae1cf6 fix: refactor Bootstrap exports for consistency (#2545) 2025-11-26 19:31:11 +01:00
Igor Bezlepkin
41ed22a128 Remove redundant nullish coalescing operators in popover and tooltip (#2553)
Co-authored-by: codecalm <codecalm@gmail.com>
2025-11-26 19:30:55 +01:00
Paweł Kuna
e206d7a908 fix: Fix white space on left side when scrollbar is present (#2548) 2025-11-26 19:30:27 +01:00
Paweł Kuna
2dc7edae36 fix: update dark theme SCSS variables (#2546) 2025-11-26 19:30:15 +01:00
Paweł Kuna
8bc6fa7fd1 fix: Use CSS variables for status colors and include social colors (#2547) 2025-11-26 19:29:46 +01:00
Paweł Kuna
a198b0c7c5 Init Geist font (#2552) 2025-11-26 19:29:27 +01:00
codecalm
b1f711635b fix: remove sticky-top class from icons banner card 2025-11-26 19:24:42 +01:00
codecalm
d0fe913453 Refactor SCSS utilities to use logical properties for border-radius 2025-11-24 00:06:57 +01:00
Paweł Kuna
0106d6b7d2 Update SCSS to use logical properties (#2537) 2025-11-23 22:05:45 +01:00
Paweł Kuna
14ed4693a5 Refactor SCSS imports, remove compile warnings (#2536) 2025-11-17 21:25:16 +01:00
codecalm
3bcd82ae9f Update illustrations for dark and light themes 2025-11-15 16:41:49 +01:00
Paweł Kuna
40a9b5ac27 Update Bootstrap and other dependencies to latest versions (#2521) 2025-11-15 16:38:19 +01:00
Paweł Kuna
99b9ea45f6 feat: Add Task List page (#2528) 2025-11-15 13:45:53 +01:00
Paweł Kuna
4ce08cad53 feat: Add Crypto Dashboard with dynamic data and menu updates (#2527) 2025-11-15 13:43:48 +01:00
Paweł Kuna
b0fa6559da feat: Add four new modals (new task, edit profile, confirm delete, change password) (#2529) 2025-11-15 13:42:27 +01:00
Paweł Kuna
c7070180dc feat: add All Elements UI components page (#2524) 2025-11-15 13:42:11 +01:00
Paweł Kuna
9a17b72a60 Update dependencies (#2519) 2025-11-15 13:39:45 +01:00
Paweł Kuna
0c7996321b feat: Add print styles using media-print mixin (#2531) 2025-11-15 13:37:23 +01:00
codecalm
ba7bb880c4 style: Update badge positioning and size in navbar and adjust SCSS variables for consistency 2025-11-15 13:37:14 +01:00
Paweł Kuna
5018aa9113 fix: Fix .btn-icon size by aligning min-width calculation (#2530) 2025-11-15 13:15:12 +01:00
Paweł Kuna
8d8727f587 feat: Add language selector dropdown to navbar (#2526) 2025-11-02 20:49:13 +01:00
Paweł Kuna
6e656ad1de fix: Input Icon Z-Index Issue with Form Validation (#2525) 2025-11-02 20:48:36 +01:00
codecalm
0042472f9a feat: add new statistics cards to widgets page and update card styles 2025-11-02 18:57:51 +01:00
codecalm
21eb18f918 refactor: remove GitHub source code button from sidebar navbar 2025-11-01 22:34:20 +01:00
Paweł Kuna
cf04a00f8e Update Tabler Icons to v3.35.0 (#2520) 2025-10-24 00:27:39 +02:00
dependabot[bot]
41bcebc0a7 chore(deps): bump actions/setup-node from 5 to 6 (#2516)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-24 00:14:05 +02:00
dependabot[bot]
7475114ef1 chore(deps): bump xalvarez/prevent-file-change-action from 2 to 3 (#2504)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-24 00:13:54 +02:00
Kam
8ce84e0f2f Fix deprecated install command for Yarn in docs (#2497) 2025-10-24 00:09:46 +02:00
codecalm
496704b163 Merge branch 'main' of https://github.com/tabler/tabler into dev 2025-10-24 00:08:42 +02:00
codecalm
e098fdfaa6 fix: ensure generated IDs do not start with a number in headings 2025-10-06 20:18:50 +02:00
codecalm
58417be796 Merge branch 'main' of https://github.com/tabler/tabler into dev 2025-09-23 23:39:09 +02:00
codecalm
a7fccda74c fix: remove analytics environment variables and adjust layout inclusion 2025-09-23 23:15:32 +02:00
codecalm
dbb5e7d2ed fix: restore analytics environment variables in appData 2025-09-23 23:07:40 +02:00
codecalm
5da9078f55 fix: add domains 2025-09-23 23:06:26 +02:00
codecalm
1cd1fcaf28 refactor: clean up comments in analytics script 2025-09-23 23:03:57 +02:00
codecalm
b4ab1100ef fix: update PostHog initialization to use dynamic API key 2025-09-23 23:02:22 +02:00
codecalm
af41699e84 remove old analytics 2025-09-23 22:59:55 +02:00
codecalm
6e2e4e3317 add analytics to docs 2025-09-23 22:57:04 +02:00
codecalm
d8077f438c clean prettier comments 2025-09-23 22:55:26 +02:00
codecalm
0c07677606 clean prettier comments 2025-09-23 22:54:13 +02:00
codecalm
14418a1c08 fix posthog 2025-09-23 22:28:41 +02:00
codecalm
7b74fee012 init posthog stats 2025-09-23 22:24:36 +02:00
codecalm
9893b11ed2 init posthog stats 2025-09-23 22:19:25 +02:00
340 changed files with 9994 additions and 3515 deletions

View File

@@ -0,0 +1,5 @@
---
"@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

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

View File

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

View File

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

View File

@@ -0,0 +1,6 @@
---
"@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

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,5 @@
---
"@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

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

View File

@@ -0,0 +1,5 @@
---
"@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

@@ -0,0 +1,5 @@
---
"@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

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,6 @@
---
"@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

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

View File

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

View File

@@ -0,0 +1,7 @@
---
"@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

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

View File

@@ -0,0 +1,7 @@
---
"@tabler/core": patch
"@tabler/preview": patch
---
Added Driver.js library integration and Tour demo page for interactive product tours and onboarding guides.

View File

@@ -0,0 +1,6 @@
---
"@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

@@ -0,0 +1,7 @@
---
"@tabler/core": minor
"@tabler/preview": minor
---
Upgraded `apexcharts` from `3.54.1` to `5.3.6` and added CSS variables (`--chart-{id}-color-{index}`) for dynamic chart colors to fix compatibility with the new version.

View File

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

View File

@@ -26,7 +26,7 @@ jobs:
if: false
steps:
- name: Clone repository
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Cache turbo build setup
uses: actions/cache@v4
@@ -40,7 +40,7 @@ jobs:
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version: "${{ env.NODE }}"
cache: 'pnpm'

View File

@@ -17,7 +17,7 @@ jobs:
steps:
- name: Clone repository
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Cache turbo build setup
uses: actions/cache@v4
@@ -31,7 +31,7 @@ jobs:
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version: "${{ env.NODE }}"
cache: 'pnpm'

View File

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

View File

@@ -12,9 +12,9 @@ jobs:
name: Verify lock file integrity
steps:
- name: Clone Tabler
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Prevent lock file change
uses: xalvarez/prevent-file-change-action@v2
uses: xalvarez/prevent-file-change-action@v3
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
pattern: Gemfile.lock|pnpm-lock.json|pnpm-lock.yaml

View File

@@ -21,13 +21,13 @@ jobs:
pull-requests: write # to create pull request
steps:
- name: Checkout Repo
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Install PNPM
uses: pnpm/action-setup@v4
- name: Setup Node.js 18
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version: "${{ env.NODE }}"
cache: 'pnpm'

View File

@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Cache turbo build setup
uses: actions/cache@v4
@@ -28,7 +28,7 @@ jobs:
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version: "${{ env.NODE }}"
cache: 'pnpm'

View File

@@ -4,7 +4,17 @@
"printWidth": 320,
"proseWrap": "always",
"semi": false,
"singleQuote": false,
"singleQuote": true,
"quoteProps": "consistent",
"tabWidth": 2,
"trailingComma": "all"
"useTabs": false,
"trailingComma": "all",
"overrides": [
{
"files": "*.scss",
"options": {
"parser": "scss"
}
}
]
}

View File

@@ -0,0 +1,82 @@
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

@@ -0,0 +1,55 @@
#!/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}`)
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,7 +1,8 @@
// Autosize plugin
const elements = document.querySelectorAll('[data-bs-toggle="autosize"]');
const elements = document.querySelectorAll('[data-bs-toggle="autosize"]')
if (elements.length) {
elements.forEach(function (element) {
window.autosize && window.autosize(element);
});
}
elements.forEach(function (element) {
window.autosize && window.autosize(element)
})
}

View File

@@ -1,3 +1,7 @@
export * as Popper from '@popperjs/core';
export * as Popper from '@popperjs/core'
export { Dropdown, Tooltip, Popover, Tab, Toast } from 'bootstrap';
// Export all Bootstrap components directly for consistent usage
export { Alert, Button, Carousel, Collapse, Dropdown, Modal, Offcanvas, Popover, ScrollSpy, Tab, Toast, Tooltip } from 'bootstrap'
// Re-export everything as namespace for backward compatibility
export * as bootstrap from 'bootstrap'

View File

@@ -1,23 +1,25 @@
const elements = document.querySelectorAll('[data-countup]');
const elements = document.querySelectorAll('[data-countup]')
if (elements.length) {
elements.forEach(function (element) {
let options = {};
try {
const dataOptions = element.getAttribute('data-countup') ? JSON.parse(element.getAttribute('data-countup')) : {};
options = Object.assign({
'enableScrollSpy': true
}, dataOptions);
} catch (error) {}
elements.forEach(function (element) {
let options = {}
try {
const dataOptions = element.getAttribute('data-countup') ? JSON.parse(element.getAttribute('data-countup')) : {}
options = Object.assign(
{
enableScrollSpy: true,
},
dataOptions,
)
} catch (error) {}
const value = parseInt(element.innerHTML, 10);
const value = parseInt(element.innerHTML, 10)
if (window.countUp && window.countUp.CountUp) {
const countUp = new window.countUp.CountUp(element, value, options);
if (!countUp.error) {
countUp.start();
}
}
});
if (window.countUp && window.countUp.CountUp) {
const countUp = new window.countUp.CountUp(element, value, options)
if (!countUp.error) {
countUp.start()
}
}
})
}

View File

@@ -1,12 +1,12 @@
import { Dropdown } from './bootstrap';
import { Dropdown } from './bootstrap'
/*
Core dropdowns
*/
let dropdownTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="dropdown"]'));
let dropdownTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="dropdown"]'))
dropdownTriggerList.map(function (dropdownTriggerEl) {
let options = {
boundary: dropdownTriggerEl.getAttribute('data-bs-boundary') === 'viewport' ? document.querySelector('.btn') : 'clippingParents',
}
return new Dropdown(dropdownTriggerEl, options);
});
let options = {
boundary: dropdownTriggerEl.getAttribute('data-bs-boundary') === 'viewport' ? document.querySelector('.btn') : 'clippingParents',
}
return new Dropdown(dropdownTriggerEl, options)
})

View File

@@ -1,9 +1,10 @@
// Input mask plugin
var maskElementList = [].slice.call(document.querySelectorAll('[data-mask]'));
var maskElementList = [].slice.call(document.querySelectorAll('[data-mask]'))
maskElementList.map(function (maskEl) {
window.IMask && new window.IMask(maskEl, {
mask: maskEl.dataset.mask,
lazy: maskEl.dataset['mask-visible'] === 'true'
})
});
window.IMask &&
new window.IMask(maskEl, {
mask: maskEl.dataset.mask,
lazy: maskEl.dataset['mask-visible'] === 'true',
})
})

View File

@@ -1,14 +1,14 @@
import { Popover } from './bootstrap';
import { Popover } from './bootstrap'
/*
Core popovers
*/
let popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'));
let popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'))
popoverTriggerList.map(function (popoverTriggerEl) {
let options = {
delay: {show: 50, hide: 50},
html: popoverTriggerEl.getAttribute('data-bs-html') === "true" ?? false,
placement: popoverTriggerEl.getAttribute('data-bs-placement') ?? 'auto'
};
return new Popover(popoverTriggerEl, options);
});
let options = {
delay: { show: 50, hide: 50 },
html: popoverTriggerEl.getAttribute('data-bs-html') === 'true',
placement: popoverTriggerEl.getAttribute('data-bs-placement') ?? 'auto',
}
return new Popover(popoverTriggerEl, options)
})

View File

@@ -2,24 +2,22 @@
// Initializes Sortable on elements marked with [data-sortable]
// Allows options via JSON in data attribute: data-sortable='{"animation":150}'
const sortableElements = document.querySelectorAll('[data-sortable]');
const sortableElements = document.querySelectorAll('[data-sortable]')
if (sortableElements.length) {
sortableElements.forEach(function (element) {
let options = {};
let options = {}
try {
const rawOptions = element.getAttribute('data-sortable');
options = rawOptions ? JSON.parse(rawOptions) : {};
const rawOptions = element.getAttribute('data-sortable')
options = rawOptions ? JSON.parse(rawOptions) : {}
} catch (e) {
// ignore invalid JSON
}
if (window.Sortable) {
// eslint-disable-next-line no-new
new window.Sortable(element, options);
new window.Sortable(element, options)
}
});
})
}

View File

@@ -1,11 +1,11 @@
/*
Switch icons
*/
let switchesTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="switch-icon"]'));
let switchesTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="switch-icon"]'))
switchesTriggerList.map(function (switchTriggerEl) {
switchTriggerEl.addEventListener('click', (e) => {
e.stopPropagation();
switchTriggerEl.addEventListener('click', (e) => {
e.stopPropagation()
switchTriggerEl.classList.toggle('active');
});
});
switchTriggerEl.classList.toggle('active')
})
})

View File

@@ -1,15 +1,15 @@
import { Tab } from './bootstrap';
import { Tab } from './bootstrap'
export const EnableActivationTabsFromLocationHash = () => {
const locationHash = window.location.hash;
const locationHash = window.location.hash
if (locationHash) {
const tabsList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tab"]'));
const matchedTabs = tabsList.filter(tab => tab.hash === locationHash);
const tabsList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tab"]'))
const matchedTabs = tabsList.filter((tab) => tab.hash === locationHash)
matchedTabs.map(tab => {
new Tab(tab).show();
});
matchedTabs.map((tab) => {
new Tab(tab).show()
})
}
}

View File

@@ -10,8 +10,8 @@ export const getColor = (color, opacity = 1) => {
const c = getComputedStyle(document.body).getPropertyValue(`--${prefix}${color}`).trim()
if (opacity !== 1) {
return hexToRgba(c, opacity)
return hexToRgba(c, opacity)
}
return c
}
}

View File

@@ -1,17 +1,17 @@
import { Toast } from './bootstrap';
import { Toast } from './bootstrap'
/*
Toasts
*/
let toastsTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="toast"]'));
let toastsTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="toast"]'))
toastsTriggerList.map(function (toastTriggerEl) {
if (!toastTriggerEl.hasAttribute('data-bs-target')) {
return;
}
if (!toastTriggerEl.hasAttribute('data-bs-target')) {
return
}
const toastEl = new Toast(toastTriggerEl.getAttribute('data-bs-target'));
const toastEl = new Toast(toastTriggerEl.getAttribute('data-bs-target'))
toastTriggerEl.addEventListener('click', () => {
toastEl.show()
});
});
toastTriggerEl.addEventListener('click', () => {
toastEl.show()
})
})

View File

@@ -1,11 +1,11 @@
import { Tooltip } from './bootstrap';
import { Tooltip } from './bootstrap'
let tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
let tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
tooltipTriggerList.map(function (tooltipTriggerEl) {
let options = {
delay: {show: 50, hide: 50},
html: tooltipTriggerEl.getAttribute("data-bs-html") === "true" ?? false,
placement: tooltipTriggerEl.getAttribute('data-bs-placement') ?? 'auto'
};
return new Tooltip(tooltipTriggerEl, options);
});
let options = {
delay: { show: 50, hide: 50 },
html: tooltipTriggerEl.getAttribute('data-bs-html') === 'true',
placement: tooltipTriggerEl.getAttribute('data-bs-placement') ?? 'auto',
}
return new Tooltip(tooltipTriggerEl, options)
})

View File

@@ -4,32 +4,32 @@
* This will prevent any flashes of the light theme (default) before switching.
*/
const themeConfig = {
"theme": "light",
"theme-base": "gray",
"theme-font": "sans-serif",
"theme-primary": "blue",
"theme-radius": "1",
'theme': 'light',
'theme-base': 'gray',
'theme-font': 'sans-serif',
'theme-primary': 'blue',
'theme-radius': '1',
}
const params = new Proxy(new URLSearchParams(window.location.search), {
get: (searchParams, prop) => searchParams.get(prop),
get: (searchParams, prop) => searchParams.get(prop),
})
for (const key in themeConfig) {
const param = params[key]
let selectedValue
const param = params[key]
let selectedValue
if (!!param) {
localStorage.setItem('tabler-' + key, param)
selectedValue = param
} else {
const storedTheme = localStorage.getItem('tabler-' + key)
selectedValue = storedTheme ? storedTheme : themeConfig[key]
}
if (!!param) {
localStorage.setItem('tabler-' + key, param)
selectedValue = param
} else {
const storedTheme = localStorage.getItem('tabler-' + key)
selectedValue = storedTheme ? storedTheme : themeConfig[key]
}
if (selectedValue !== themeConfig[key]) {
document.documentElement.setAttribute('data-bs-' + key, selectedValue)
} else {
document.documentElement.removeAttribute('data-bs-' + key)
}
}
if (selectedValue !== themeConfig[key]) {
document.documentElement.setAttribute('data-bs-' + key, selectedValue)
} else {
document.documentElement.removeAttribute('data-bs-' + key)
}
}

View File

@@ -1,28 +1,16 @@
import "./src/autosize"
import "./src/countup"
import "./src/input-mask"
import "./src/dropdown"
import "./src/tooltip"
import "./src/popover"
import "./src/switch-icon"
import "./src/tab"
import "./src/toast"
import "./src/sortable"
import './src/autosize'
import './src/countup'
import './src/input-mask'
import './src/dropdown'
import './src/tooltip'
import './src/popover'
import './src/switch-icon'
import './src/tab'
import './src/toast'
import './src/sortable'
export * as bootstrap from "bootstrap"
export * as tabler from "./src/tabler"
// Re-export everything from bootstrap.js (single source of truth)
export * from './src/bootstrap'
export {
Alert,
Modal,
Toast,
Tooltip,
Tab,
Button,
Carousel,
Collapse,
Dropdown,
Popover,
ScrollSpy,
Offcanvas
} from 'bootstrap'
// Re-export tabler namespace
export * as tabler from './src/tabler'

View File

@@ -166,5 +166,14 @@
"dist/turbo.es2017-umd.js"
],
"head": true
},
"driver.js": {
"npm": "driver.js",
"js": [
"dist/driver.js.iife.js"
],
"css": [
"dist/driver.css"
]
}
}

View File

@@ -5,37 +5,42 @@
"homepage": "https://tabler.io",
"scripts": {
"dev": "pnpm run clean && pnpm run copy && pnpm run watch",
"build": "pnpm run clean && pnpm run css && pnpm run js && pnpm run copy && pnpm run generate-sri",
"build": "pnpm run clean && pnpm run build-assets && pnpm run copy && pnpm run generate-sri",
"build-assets": "concurrently \"pnpm run css\" \"pnpm run js\"",
"clean": "shx rm -rf dist demo",
"css": "pnpm run css-compile && pnpm run css-prefix && pnpm run css-rtl && pnpm run css-minify && pnpm run css-banner",
"css-compile": "sass --no-source-map --load-path=node_modules --style expanded scss/:dist/css/",
"css-banner": "node .build/add-banner.mjs",
"css-prefix": "postcss --config .build/postcss.config.mjs --replace \"dist/css/*.css\" \"!dist/css/*.rtl*.css\" \"!dist/css/*.min.css\"",
"css-rtl": "cross-env NODE_ENV=RTL postcss --config .build/postcss.config.mjs --dir \"dist/css\" --ext \".rtl.css\" \"dist/css/*.css\" \"!dist/css/*.min.css\" \"!dist/css/*.rtl.css\"",
"css-minify": "pnpm run css-minify-main && pnpm run css-minify-rtl",
"css-minify": "concurrently \"pnpm run css-minify-main\" \"pnpm run css-minify-rtl\"",
"css-minify-main": "cleancss -O1 --format breakWith=lf --with-rebase --source-map --source-map-inline-sources --output dist/css/ --batch --batch-suffix \".min\" \"dist/css/*.css\" \"!dist/css/*.min.css\" \"!dist/css/*rtl*.css\"",
"css-minify-rtl": "cleancss -O1 --format breakWith=lf --with-rebase --source-map --source-map-inline-sources --output dist/css/ --batch --batch-suffix \".min\" \"dist/css/*rtl.css\" \"!dist/css/*.min.css\"",
"css-lint": "pnpm run css-lint-variables",
"css-lint-variables": "find-unused-sass-variables scss/ node_modules/bootstrap/scss/",
"js": "pnpm run js-compile && pnpm run js-minify",
"js-compile": "pnpm run js-compile-standalone && pnpm run js-compile-standalone-esm && pnpm run js-compile-theme && pnpm run js-compile-theme-esm",
"js-compile": "concurrently \"pnpm run js-compile-standalone\" \"pnpm run js-compile-standalone-esm\" \"pnpm run js-compile-theme\" \"pnpm run js-compile-theme-esm\"",
"js-compile-theme-esm": "rollup --environment THEME:true --environment ESM:true --config .build/rollup.config.mjs --sourcemap",
"js-compile-theme": "rollup --environment THEME:true --config .build/rollup.config.mjs --sourcemap",
"js-compile-standalone": "rollup --config .build/rollup.config.mjs --sourcemap",
"js-compile-standalone-esm": "rollup --environment ESM:true --config .build/rollup.config.mjs --sourcemap",
"js-minify": "pnpm run js-minify-standalone && pnpm run js-minify-standalone-esm && pnpm run js-minify-theme && pnpm run js-minify-theme-esm",
"js-minify": "concurrently \"pnpm run js-minify-standalone\" \"pnpm run js-minify-standalone-esm\" \"pnpm run js-minify-theme\" \"pnpm run js-minify-theme-esm\"",
"js-minify-standalone": "terser --compress passes=2 --mangle --comments \"/^!/\" --source-map \"content=dist/js/tabler.js.map,includeSources,url=tabler.min.js.map\" --output dist/js/tabler.min.js dist/js/tabler.js",
"js-minify-standalone-esm": "terser --compress passes=2 --mangle --comments \"/^!/\" --source-map \"content=dist/js/tabler.esm.js.map,includeSources,url=tabler.esm.min.js.map\" --output dist/js/tabler.esm.min.js dist/js/tabler.esm.js",
"js-minify-theme": "terser --compress passes=2 --mangle --comments \"/^!/\" --source-map \"content=dist/js/tabler-theme.js.map,includeSources,url=tabler-theme.min.js.map\" --output dist/js/tabler-theme.min.js dist/js/tabler-theme.js",
"js-minify-theme-esm": "terser --compress passes=2 --mangle --comments \"/^!/\" --source-map \"content=dist/js/tabler-theme.esm.js.map,includeSources,url=tabler-theme.esm.min.js.map\" --output dist/js/tabler-theme.esm.min.js dist/js/tabler-theme.esm.js",
"copy": "pnpm run copy-img && pnpm run copy-libs",
"copy": "concurrently \"pnpm run copy-img\" \"pnpm run copy-libs\" \"pnpm run copy-fonts\"",
"copy-img": "shx mkdir -p dist/img && shx cp -rf img/* dist/img",
"copy-libs": "node .build/copy-libs.mjs",
"copy-fonts": "shx mkdir -p dist/fonts && shx cp -rf fonts/* dist/fonts",
"import-fonts": "node .build/import-fonts.mjs",
"watch": "concurrently \"pnpm run watch-css\" \"pnpm run watch-js\"",
"watch-css": "nodemon --watch scss/ --ext scss --exec \"pnpm run css-compile && pnpm run css-prefix\"",
"watch-js": "nodemon --watch js/ --ext js --exec \"pnpm run js-compile\"",
"bundlewatch": "bundlewatch",
"generate-sri": "node .build/generate-sri.js",
"format:check": "prettier --check src/**/*.{js,scss} --cache",
"format:write": "prettier --write src/**/*.{js,scss} --cache"
"format:check": "prettier --check \"scss/**/*.scss\" \"js/**/*.js\" --cache",
"format:write": "prettier --write \"scss/**/*.scss\" \"js/**/*.js\" --cache"
},
"repository": {
"type": "git",
@@ -149,17 +154,19 @@
"bootstrap": "5.3.8"
},
"devDependencies": {
"@hotwired/turbo": "^8.0.13",
"@hotwired/turbo": "^8.0.18",
"@melloware/coloris": "^0.25.0",
"apexcharts": "3.54.1",
"apexcharts": "^5.3.6",
"autosize": "^6.0.1",
"choices.js": "^11.1.0",
"clipboard": "^2.0.11",
"countup.js": "^2.9.0",
"dropzone": "^6.0.0-beta.2",
"find-unused-sass-variables": "^6.1.0",
"flatpickr": "^4.6.13",
"fslightbox": "^3.7.4",
"fullcalendar": "^6.1.19",
"geist": "^1.5.1",
"hugerte": "^1.0.9",
"imask": "^7.6.1",
"jsvectormap": "^1.7.0",
@@ -171,7 +178,8 @@
"sortablejs": "^1.15.6",
"star-rating.js": "^4.3.1",
"tom-select": "^2.4.3",
"typed.js": "^2.1.0"
"typed.js": "^2.1.0",
"driver.js": "^1.0.0"
},
"directories": {
"doc": "docs"

View File

@@ -1,30 +1,30 @@
// Layout & components
@import "bootstrap/scss/root";
@import "bootstrap/scss/reboot";
@import "bootstrap/scss/type";
@import "bootstrap/scss/images";
@import "bootstrap/scss/containers";
@import "bootstrap/scss/grid";
@import "bootstrap/scss/tables";
@import "bootstrap/scss/forms";
@import "bootstrap/scss/buttons";
@import "bootstrap/scss/transitions";
@import "bootstrap/scss/dropdown";
@import "bootstrap/scss/button-group";
@import "bootstrap/scss/nav";
@import "bootstrap/scss/navbar";
@import "bootstrap/scss/card";
@import "bootstrap/scss/pagination";
@import "bootstrap/scss/progress";
@import "bootstrap/scss/list-group";
@import "bootstrap/scss/toasts";
@import "bootstrap/scss/modal";
@import "bootstrap/scss/tooltip";
@import "bootstrap/scss/popover";
@import "bootstrap/scss/carousel";
@import "bootstrap/scss/spinners";
@import "bootstrap/scss/offcanvas";
@import "bootstrap/scss/placeholders";
@import 'bootstrap/scss/root';
@import 'bootstrap/scss/reboot';
@import 'bootstrap/scss/type';
@import 'bootstrap/scss/images';
@import 'bootstrap/scss/containers';
@import 'bootstrap/scss/grid';
@import 'bootstrap/scss/tables';
@import 'bootstrap/scss/forms';
@import 'bootstrap/scss/buttons';
@import 'bootstrap/scss/transitions';
@import 'bootstrap/scss/dropdown';
@import 'bootstrap/scss/button-group';
@import 'bootstrap/scss/nav';
@import 'bootstrap/scss/navbar';
@import 'bootstrap/scss/card';
@import 'bootstrap/scss/pagination';
@import 'bootstrap/scss/progress';
@import 'bootstrap/scss/list-group';
@import 'bootstrap/scss/toasts';
@import 'bootstrap/scss/modal';
@import 'bootstrap/scss/tooltip';
@import 'bootstrap/scss/popover';
@import 'bootstrap/scss/carousel';
@import 'bootstrap/scss/spinners';
@import 'bootstrap/scss/offcanvas';
@import 'bootstrap/scss/placeholders';
// Utilities
@import "bootstrap/scss/utilities/api";
@import 'bootstrap/scss/utilities/api';

View File

@@ -1,6 +1,6 @@
// Config
@import "bootstrap/scss/variables";
@import "bootstrap/scss/variables-dark";
@import "bootstrap/scss/maps";
@import "bootstrap/scss/mixins";
@import "bootstrap/scss/utilities";
// @import "bootstrap/scss/variables";
// @import "bootstrap/scss/variables-dark";
// @import "bootstrap/scss/maps";
@import 'bootstrap/scss/mixins';
// @import "bootstrap/scss/utilities";

View File

@@ -1,26 +1,26 @@
@use "sass:color";
@use 'sass:color';
@mixin caret($direction: down) {
$selector: "after";
$selector: 'after';
@if $direction == "left" {
$selector: "before";
@if $direction == 'left' {
$selector: 'before';
}
&:#{$selector} {
content: "";
content: '';
display: inline-block;
vertical-align: $caret-vertical-align;
width: $caret-width;
height: $caret-width;
border-bottom: 1px var(--#{$prefix}border-style);
border-left: 1px var(--#{$prefix}border-style);
margin-right: 0.1em;
border-inline-start: 1px var(--#{$prefix}border-style);
margin-inline-end: 0.1em;
@if $direction != "left" {
margin-left: $caret-spacing;
@if $direction != 'left' {
margin-inline-start: $caret-spacing;
} @else {
margin-right: $caret-spacing;
margin-inline-end: $caret-spacing;
}
@if $direction == down {
@@ -34,7 +34,7 @@
}
}
@if $direction == "left" {
@if $direction == 'left' {
&:after {
content: none;
}
@@ -45,30 +45,11 @@
// Override bootstrap core
}
@mixin button-variant(
$background: null,
$border: null,
$color: null,
$hover-background: null,
$hover-border: null,
$hover-color: null,
$active-background: null,
$active-border: null,
$active-color: null,
$disabled-background: null,
$disabled-border: null,
$disabled-color: null
) {
@mixin button-variant($background: null, $border: null, $color: null, $hover-background: null, $hover-border: null, $hover-color: null, $active-background: null, $active-border: null, $active-color: null, $disabled-background: null, $disabled-border: null, $disabled-color: null) {
// Override bootstrap core
}
@mixin button-outline-variant(
$color: null,
$color-hover: null,
$active-background: null,
$active-border: null,
$active-color: null
) {
@mixin button-outline-variant($color: null, $color-hover: null, $active-background: null, $active-border: null, $active-color: null) {
// Override bootstrap core
}

View File

@@ -1,9 +1,8 @@
@import 'mixins';
@import 'variables';
@import 'variables-dark';
@import 'maps';
@import 'utilities';
@import "mixins";
@import "variables";
@import "variables-dark";
@import "utilities";
@import "bootstrap-config";
@import "bootstrap-override";
@import 'bootstrap-config';
@import 'bootstrap-override';

View File

@@ -1,84 +1,80 @@
@import "config";
@import "bootstrap-components";
@import 'config';
@import 'bootstrap-components';
@import "props";
@import 'props';
@import "fonts/webfonts";
@import 'fonts/webfonts';
@import 'fonts/geist';
@import "layout/root";
@import "layout/animations";
@import "layout/core";
@import "layout/navbar";
@import "layout/page";
@import "layout/footer";
@import "layout/dark";
@import 'layout/root';
@import 'layout/animations';
@import 'layout/core';
@import 'layout/navbar';
@import 'layout/page';
@import 'layout/footer';
@import 'layout/dark';
@import "ui/accordion";
@import "ui/alerts";
@import "ui/avatars";
@import "ui/badges";
@import "ui/breadcrumbs";
@import "ui/buttons";
@import "ui/button-group";
@import "ui/calendars";
@import "ui/carousel";
@import "ui/cards";
@import "ui/close";
@import "ui/dropdowns";
@import "ui/datagrid";
@import "ui/empty";
@import "ui/grid";
@import "ui/icons";
@import "ui/images";
@import "ui/forms";
@import "ui/forms/form-icon";
@import "ui/forms/form-colorinput";
@import "ui/forms/form-imagecheck";
@import "ui/forms/form-selectgroup";
@import "ui/forms/form-custom";
@import "ui/forms/form-check";
@import "ui/forms/validation";
@import "ui/legend";
@import "ui/lists";
@import "ui/loaders";
@import "ui/login";
@import "ui/modals";
@import "ui/nav";
@import "ui/stars";
@import "ui/pagination";
@import "ui/popovers";
@import "ui/progress";
@import "ui/ribbons";
@import "ui/markdown";
@import "ui/placeholder";
@import "ui/segmented";
@import "ui/steps";
@import "ui/status";
@import "ui/switch-icon";
@import "ui/tables";
@import "ui/tags";
@import "ui/toasts";
@import "ui/toolbar";
@import "ui/tracking";
@import "ui/timeline";
@import "ui/type";
@import "ui/charts";
@import "ui/offcanvas";
@import "ui/chat";
@import "ui/signature";
@import 'ui/accordion';
@import 'ui/alerts';
@import 'ui/avatars';
@import 'ui/badges';
@import 'ui/breadcrumbs';
@import 'ui/buttons';
@import 'ui/button-group';
@import 'ui/calendars';
@import 'ui/carousel';
@import 'ui/cards';
@import 'ui/close';
@import 'ui/dropdowns';
@import 'ui/datagrid';
@import 'ui/empty';
@import 'ui/grid';
@import 'ui/icons';
@import 'ui/images';
@import 'ui/forms';
@import 'ui/forms/form-icon';
@import 'ui/forms/form-colorinput';
@import 'ui/forms/form-imagecheck';
@import 'ui/forms/form-selectgroup';
@import 'ui/forms/form-custom';
@import 'ui/forms/form-check';
@import 'ui/forms/validation';
@import 'ui/legend';
@import 'ui/lists';
@import 'ui/loaders';
@import 'ui/login';
@import 'ui/modals';
@import 'ui/nav';
@import 'ui/stars';
@import 'ui/pagination';
@import 'ui/popovers';
@import 'ui/progress';
@import 'ui/ribbons';
@import 'ui/markdown';
@import 'ui/placeholder';
@import 'ui/segmented';
@import 'ui/steps';
@import 'ui/status';
@import 'ui/switch-icon';
@import 'ui/tables';
@import 'ui/tags';
@import 'ui/toasts';
@import 'ui/toolbar';
@import 'ui/tracking';
@import 'ui/timeline';
@import 'ui/type';
@import 'ui/charts';
@import 'ui/offcanvas';
@import 'ui/chat';
@import 'ui/signature';
@import "helpers/index";
@import 'helpers/index';
@import "utils/background";
@import "utils/colors";
@import "utils/scroll";
@import "utils/sizing";
@import "utils/opacity";
@import "utils/shadow";
@import "utils/text";
@import "utils/hover";
@import "debug";
@import "debug";
@import 'utils/background';
@import 'utils/colors';
@import 'utils/scroll';
@import 'utils/sizing';
@import 'utils/opacity';
@import 'utils/shadow';
@import 'utils/text';
@import 'utils/hover';

View File

@@ -1,49 +0,0 @@
$debug: false;
@if $debug {
$colors: (
"blue": $blue,
"azure": $azure,
"indigo": $indigo,
"purple": $purple,
"pink": $pink,
"red": $red,
"orange": $orange,
"yellow": $yellow,
"lime": $lime,
"green": $green,
"teal": $teal,
"cyan": $cyan,
);
@each $name, $color in $colors {
@debug ("#{$name}: '#{$color}'");
@debug ("#{$name}-100: '#{tint-color($color, 8)}'");
@debug ("#{$name}-200: '#{tint-color($color, 6)}'");
@debug ("#{$name}-300: '#{tint-color($color, 4)}'");
@debug ("#{$name}-400: '#{tint-color($color, 2)}'");
@debug ("#{$name}-500: '#{$color}'");
@debug ("#{$name}-600: '#{shade-color($color, 2)}'");
@debug ("#{$name}-700: '#{shade-color($color, 4)}'");
@debug ("#{$name}-800: '#{shade-color($color, 6)}'");
@debug ("#{$name}-900: '#{shade-color($color, 8)}'");
}
@debug ("gray: '#{$gray-500}'");
@debug ("gray-100: '#{$gray-100}'");
@debug ("gray-200: '#{$gray-200}'");
@debug ("gray-300: '#{$gray-300}'");
@debug ("gray-400: '#{$gray-400}'");
@debug ("gray-500: '#{$gray-500}'");
@debug ("gray-600: '#{$gray-600}'");
@debug ("gray-700: '#{$gray-700}'");
@debug ("gray-800: '#{$gray-800}'");
@debug ("gray-900: '#{$gray-900}'");
@debug ("border-color: '#{$border-color}'");
@debug ("text-secondary: '#{$text-secondary}'");
@each $name, $color in $social-colors {
@debug ("#{$name}: '#{$color}'");
}
}

155
core/scss/_maps.scss Normal file
View File

@@ -0,0 +1,155 @@
@use 'sass:map';
// Re-assigned maps
//
// Placed here so that others can override the default Sass maps and see automatic updates to utilities and more.
$theme-colors-rgb: map-loop($theme-colors, to-rgb, '$value') !default;
$theme-colors-text: (
'primary': $primary-text-emphasis,
'secondary': $secondary-text-emphasis,
'success': $success-text-emphasis,
'info': $info-text-emphasis,
'warning': $warning-text-emphasis,
'danger': $danger-text-emphasis,
'light': $light-text-emphasis,
'dark': $dark-text-emphasis,
) !default;
$theme-colors-bg-subtle: (
'primary': $primary-bg-subtle,
'secondary': $secondary-bg-subtle,
'success': $success-bg-subtle,
'info': $info-bg-subtle,
'warning': $warning-bg-subtle,
'danger': $danger-bg-subtle,
'light': $light-bg-subtle,
'dark': $dark-bg-subtle,
) !default;
$theme-colors-border-subtle: (
'primary': $primary-border-subtle,
'secondary': $secondary-border-subtle,
'success': $success-border-subtle,
'info': $info-border-subtle,
'warning': $warning-border-subtle,
'danger': $danger-border-subtle,
'light': $light-border-subtle,
'dark': $dark-border-subtle,
) !default;
$theme-colors-text-dark: null !default;
$theme-colors-bg-subtle-dark: null !default;
$theme-colors-border-subtle-dark: null !default;
@if $enable-dark-mode {
$theme-colors-text-dark: (
'primary': $primary-text-emphasis-dark,
'secondary': $secondary-text-emphasis-dark,
'success': $success-text-emphasis-dark,
'info': $info-text-emphasis-dark,
'warning': $warning-text-emphasis-dark,
'danger': $danger-text-emphasis-dark,
'light': $light-text-emphasis-dark,
'dark': $dark-text-emphasis-dark,
) !default;
$theme-colors-bg-subtle-dark: (
'primary': $primary-bg-subtle-dark,
'secondary': $secondary-bg-subtle-dark,
'success': $success-bg-subtle-dark,
'info': $info-bg-subtle-dark,
'warning': $warning-bg-subtle-dark,
'danger': $danger-bg-subtle-dark,
'light': $light-bg-subtle-dark,
'dark': $dark-bg-subtle-dark,
) !default;
$theme-colors-border-subtle-dark: (
'primary': $primary-border-subtle-dark,
'secondary': $secondary-border-subtle-dark,
'success': $success-border-subtle-dark,
'info': $info-border-subtle-dark,
'warning': $warning-border-subtle-dark,
'danger': $danger-border-subtle-dark,
'light': $light-border-subtle-dark,
'dark': $dark-border-subtle-dark,
) !default;
}
// Utilities maps
//
// Extends the default `$theme-colors` maps to help create our utilities.
// Come v6, we'll de-dupe these variables. Until then, for backward compatibility, we keep them to reassign.
$utilities-colors: $theme-colors-rgb !default;
$utilities-text: map.merge(
$utilities-colors,
(
'black': to-rgb($black),
'white': to-rgb($white),
'body': to-rgb($body-color),
)
) !default;
$utilities-text-colors: map-loop($utilities-text, rgba-css-var, '$key', 'text') !default;
$utilities-text-emphasis-colors: (
'primary-emphasis': var(--#{$prefix}primary-text-emphasis),
'secondary-emphasis': var(--#{$prefix}secondary-text-emphasis),
'success-emphasis': var(--#{$prefix}success-text-emphasis),
'info-emphasis': var(--#{$prefix}info-text-emphasis),
'warning-emphasis': var(--#{$prefix}warning-text-emphasis),
'danger-emphasis': var(--#{$prefix}danger-text-emphasis),
'light-emphasis': var(--#{$prefix}light-text-emphasis),
'dark-emphasis': var(--#{$prefix}dark-text-emphasis),
) !default;
$utilities-bg: map.merge(
$utilities-colors,
(
'black': to-rgb($black),
'white': to-rgb($white),
'body': to-rgb($body-bg),
)
) !default;
$utilities-bg-colors: map-loop($utilities-bg, rgba-css-var, '$key', 'bg') !default;
$utilities-bg-subtle: (
'primary-subtle': var(--#{$prefix}primary-bg-subtle),
'secondary-subtle': var(--#{$prefix}secondary-bg-subtle),
'success-subtle': var(--#{$prefix}success-bg-subtle),
'info-subtle': var(--#{$prefix}info-bg-subtle),
'warning-subtle': var(--#{$prefix}warning-bg-subtle),
'danger-subtle': var(--#{$prefix}danger-bg-subtle),
'light-subtle': var(--#{$prefix}light-bg-subtle),
'dark-subtle': var(--#{$prefix}dark-bg-subtle),
) !default;
$utilities-border: map.merge(
$utilities-colors,
(
'black': to-rgb($black),
'white': to-rgb($white),
)
) !default;
$utilities-border-colors: map-loop($utilities-border, rgba-css-var, '$key', 'border') !default;
$utilities-border-subtle: (
'primary-subtle': var(--#{$prefix}primary-border-subtle),
'secondary-subtle': var(--#{$prefix}secondary-border-subtle),
'success-subtle': var(--#{$prefix}success-border-subtle),
'info-subtle': var(--#{$prefix}info-border-subtle),
'warning-subtle': var(--#{$prefix}warning-border-subtle),
'danger-subtle': var(--#{$prefix}danger-border-subtle),
'light-subtle': var(--#{$prefix}light-border-subtle),
'dark-subtle': var(--#{$prefix}dark-border-subtle),
) !default;
$utilities-links-underline: map-loop($utilities-colors, rgba-css-var, '$key', 'link-underline') !default;
$negative-spacers: if($enable-negative-margins, negativify-map($spacers), null) !default;
$gutters: $spacers !default;

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