Compare commits

...

20 Commits

Author SHA1 Message Date
Mikołaj
60e87c71c9 add husky with pre-commit script that check if package.json not changed then restore pnpm-lock.yaml 2025-03-23 14:01:38 +01:00
Mikołaj Sojka
2f8a37252d 1865-export-bootstrap-js-components (#2214)
Co-authored-by: Paweł Kuna <1282324+codecalm@users.noreply.github.com>
2025-03-17 22:44:00 +01:00
Yami Odymel
d73d78e76f Add missing "tw" entry in flags.json for tw.svg (#2217)
Co-authored-by: Paweł Kuna <1282324+codecalm@users.noreply.github.com>
Co-authored-by: codecalm <codecalm@gmail.com>
2025-03-17 22:41:49 +01:00
Paweł Kuna
f84e88116c Update package dependencies to latest versions (#2222) 2025-03-17 22:32:36 +01:00
Abdelrhman Said
473fa3850b Apply border radius to tom-select on focus (#2189)
Co-authored-by: Paweł Kuna <1282324+codecalm@users.noreply.github.com>
2025-03-17 22:20:16 +01:00
Paweł Kuna
f336275476 Add initial package.json for docs with build script (#2221) 2025-03-17 22:17:01 +01:00
Paweł Kuna
982bc5a09b Refactor script and modal captures (#2220) 2025-03-16 21:39:14 +01:00
codecalm
5fe99e0510 Remove unused preview patch from changesets and rollback accordion component structure 2025-03-16 20:48:38 +01:00
codecalm
1527157bfe Disable test job for draft pull requests in Argos workflow 2025-03-16 20:45:37 +01:00
ethancrawford
922bb0346a Minor spelling and grammar improvements to emails docs (#2191)
Co-authored-by: Paweł Kuna <1282324+codecalm@users.noreply.github.com>
2025-03-10 21:55:52 +01:00
Paweł Kuna
e3d68d6aab Refactor autosize and input mask plugins to use window scope (#2208) 2025-03-10 21:54:01 +01:00
Paweł Kuna
aea3b0a614 Rollback accordion component structure (#2207) 2025-03-10 21:53:44 +01:00
Robin1-23
cd592b4743 Replace HTML alt attribute to aria-title used on SVG element (#2196)
Co-authored-by: robin0556 <roobinxyz@gmail.com>
Co-authored-by: Paweł Kuna <1282324+codecalm@users.noreply.github.com>
2025-03-06 18:07:51 +01:00
codecalm
c59bc9d977 Add gradient background utilities to core package 2025-03-06 18:07:25 +01:00
Paweł Kuna
bc443ff4aa Add gradient background utilities (#2164) 2025-03-06 18:06:02 +01:00
codecalm
afd024f0b1 Merge branch 'dev' of https://github.com/tabler/tabler into dev 2025-03-06 18:01:56 +01:00
codecalm
d29b6f5675 Add zip script to package.json build process 2025-03-06 18:01:54 +01:00
ethancrawford
6b6617aae6 Improve README.md (#2165)
Co-authored-by: BG-Software <73077398+BG-Software-BG@users.noreply.github.com>
Co-authored-by: Paweł Kuna <1282324+codecalm@users.noreply.github.com>
2025-03-04 19:16:36 +01:00
Bartłomiej Gawęda
636fed5fe9 Remove wrong image from Tabler Emails docs 2025-03-02 16:39:15 +01:00
Paweł Kuna
d7f4f50986 Refactor modal component structure and update modal examples (#2138)
Co-authored-by: Kevin Papst <kevinpapst@users.noreply.github.com>
2025-03-02 13:16:17 +01:00
42 changed files with 3893 additions and 2803 deletions

5
.changeset/aaaa.md Normal file
View File

@@ -0,0 +1,5 @@
---
"@tabler/core": minor
---
Add gradient background utilities

View File

@@ -0,0 +1,5 @@
---
"@tabler/core": patch
---
Rollback accordion component structure

View File

@@ -0,0 +1,5 @@
---
"@tabler/core": patch
---
Add Bootstrap components to Tabler JS

View File

@@ -0,0 +1,4 @@
---
---
Replace HTML `alt` attribute to `aria-title` used on SVG element

View File

@@ -0,0 +1,4 @@
---
---
Update modal examples

View File

@@ -0,0 +1,5 @@
---
"@tabler/core": patch
---
Apply border radius to `tom-select` on focus

View File

@@ -0,0 +1,5 @@
---
"preview": patch
---
Add missing `tw` entry in `flags.json`

View File

@@ -0,0 +1,5 @@
---
"@tabler/core": patch
---
Minor spelling and grammar improvements to emails docs

View File

@@ -0,0 +1,5 @@
---
"@tabler/core": patch
---
Fix `autosize` and `input mask` plugins to use window scope

View File

@@ -0,0 +1,5 @@
---
"@tabler/core": patch
---
Improve README

View File

@@ -22,7 +22,8 @@ jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
# if: github.event.pull_request.draft == false
if: false
steps:
- name: Clone repository
uses: actions/checkout@v4

16
.husky/pre-commit Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/sh
if git diff --quiet --cached package.json; then
if git diff --quiet --cached pnpm-lock.yaml; then
echo "pnpm-lock.yaml not changed, nothing to do."
else
echo "pnpm-lock.yaml changed, restore..."
git restore --staged pnpm-lock.yaml
git checkout pnpm-lock.yaml
echo "Restored pnpm-lock.yaml."
fi
else
echo "package.json changed, pnpm-lock.yaml change"
fi
exit 0

204
README.md
View File

@@ -15,7 +15,7 @@ A premium and open source dashboard template with a responsive and high-quality
## Sponsors
**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) :)**
**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">
@@ -23,8 +23,24 @@ A premium and open source dashboard template with a responsive and high-quality
</a>
</p>
<p align="center">
<a href="https://github.com/sponsors/codecalm" target="_blank">
<img src="https://raw.githubusercontent.com/tabler/tabler/dev/preview/static/sponsor-banner-homepage.svg" alt="Sponsor Banner">
</a>
</p>
## Testing
<p align="center">Visual testing with:</p>
<p align="center">
<a href="https://argos-ci.com/" target="_blank">
<picture>
<img src="https://github.com/user-attachments/assets/7d231a26-eff5-4fc5-8392-b2a679a7c572" alt="Argos-CI" height="164" />
</picture>
</a>
</p>
<p align="center">Browser testing via:</p>
<p align="center">
@@ -32,7 +48,7 @@ A premium and open source dashboard template with a responsive and high-quality
<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">
<img src="https://github.com/user-attachments/assets/d3dede5a-d702-47c3-bb66-4d887948ed83" alt="labmdatest" width="296">
</picture>
</a>
</p>
@@ -56,116 +72,30 @@ 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
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).
The documentation is available at https://tabler.io/docs/
## 🪴 Project Activity
![Alt](https://repobeats.axiom.co/api/embed/61d1db34446967b0848af68198a392067e0f5870.svg "Repobeats analytics image")
## 💕 Sponsor Tabler
<p align="center">
<a href="https://github.com/sponsors/codecalm" target="_blank">
<img src="https://raw.githubusercontent.com/tabler/tabler/dev/preview/static/sponsor-banner-homepage.svg" alt="Sponsor Banner">
</a>
<img src="https://repobeats.axiom.co/api/embed/61d1db34446967b0848af68198a392067e0f5870.svg" alt="Repobeats analytics image" />
</p>
### 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**:
```sh
pnpm install
```
and then
```sh
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
Tabler is distributed via npm.
### Package Managers
Tabler is distributed via npm. You can install it with this or your preferred JavaScript package manager:
```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 available over a CDN.
All files included in `@tabler/core` npm package are also available over a CDN.
#### Javascript
@@ -179,24 +109,84 @@ All files included in `@tabler/core` npm package are available over a CDN.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tabler/core@latest/dist/css/tabler.min.css">
```
## Feature requests
## Building locally
https://tabler.canny.io/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.
### 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) in your browser, and voilà.
Any change in the `/src` directory 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://twitter.com/codecalm>
- <https://x.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
@@ -204,25 +194,11 @@ This project exists thanks to all the people who contribute.
<img src="https://opencollective.com/tabler/contributors.svg?width=890&button=false" />
## 🌸 Backers
## Social media
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>
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>
## 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!

View File

@@ -6,9 +6,3 @@ description: Customizable email templates for over 90 clients and devices.
summary: Tabler Emails is a set of 80 eye-catching, customizable HTML templates. They are compatible with over 90 email clients and devices.
seoDescription: Tabler Emails is a collection of 80 premium, customizable HTML templates. They are compatible with over 90 email clients and devices.
---
# Tabler Emails
*Change below image!*
![Tabler Emails](/docs/cover-illustrations.png)

View File

@@ -9,7 +9,7 @@ seoDescription: The compiled HTML files from the Tabler Emails package are ready
## Compiled version of the template
If you only want to change a content - text or images - of the email template, you can just use the compiled HTML files - `compiled.html`. They are ready to use, and you need only a basic knowledge of HTML to modify them.
If you only want to change content (text or images) of the email template, you can just use the compiled HTML files - `compiled.html`. They are ready to use, and you need only a basic knowledge of HTML to modify them.
## How to modify the compiled HTML files
@@ -26,4 +26,4 @@ If you only want to change a content - text or images - of the email template, y
## How to use the compiled HTML files
After changing the templates as needed, you can use them in your email campaigns.
The `compiled.html` file with the `assets/` folder should be sent to your email marketing tool, like Mailchimp, SendGrid, or any other.
The `compiled.html` file with the `assets/` folder should be sent to your email marketing tool, like Mailchimp, SendGrid, or any other.

View File

@@ -44,17 +44,17 @@ The **Tabler Emails** package is organized into a clear and efficient folder str
### 1. Email Templates: `emails/`
This folder contains <EmailsCount /> email subfolders, each with a specific template. Each email folder contains the following files:
* Compiled HTML files for light and dark themes. Read more about its usage in the [Compiled HTML](/docs/emails/compiled-html) section.
* Compiled HTML files for light and dark themes. Read more about their usage in the [Compiled HTML](/docs/emails/compiled-html) section.
* Source HTML files for light and dark themes. Find more information in the [Source HTML](/docs/emails/source-html) section.
* Screenshot images for desktop and mobile views.
* Assets folder with images used in the email template and the CSS file with styles
* Assets folder with images used in the email template and the CSS file with styles.
### 2. Images: `images/`
It contains 4 subfolders with images used across the different email templates:
* `chart-donuts/`: Images of donut charts with different fill.
* `chart-donuts/`: Images of donut charts with different fills.
* `icons/`: [Tabler Icons](/icons) used in the email templates, in PNG version.
* `illustrations/`: PNG versions of [Tabler Illustrations](/illustrations) for light and dark themes.
* `overlays/`: overlay images used in the email templates.
* `overlays/`: Overlay images used in the email templates.
### 3. License: `license.txt`
This file contains the license information for the Tabler Emails package.

View File

@@ -3,8 +3,8 @@ title: Source templates
order: 3
seoTitle: Tabler Emails - How to use the source HTML email templates
description: Learn how to use the source HTML email templates from the Tabler Emails package.
summary: The source HTML files from the Tabler Emails package needs a bit more work that the compiled ones. Learn how to use them.
seoDescription: The source HTML files from the Tabler Emails package needs a bit more work that the compiled ones. Learn how to use them.
summary: The source HTML files from the Tabler Emails package need a bit more work than the compiled ones. Learn how to use them.
seoDescription: The source HTML files from the Tabler Emails package need a bit more work than the compiled ones. Learn how to use them.
---
## Source version of the template
@@ -14,9 +14,9 @@ If you want to make more advanced changes to the email template, you can use the
## How to modify the source HTML files
1. Open the `source.html` file in your favorite code editor.
2. Open the `theme.css` file from `assets/`* directory in the same editor.
2. Open the `theme.css` file from the `assets/`* directory in the same editor.
3. Change all the content and styles as needed.
4. Use a selected tool to inline the CSS styles into the HTML file. There are a lot of options, like:
4. Use a selected tool to inline the CSS styles into the HTML file. There are a lot of options, such as:
* Online tools like [Juice](https://automattic.github.io/juice/) or [Mailchimp CSS Inliner Tool](https://templates.mailchimp.com/resources/inline-css/).
* NPM tools like [juice](https://www.npmjs.com/package/juice) or [inline-css](https://www.npmjs.com/package/inline-css).
5. Save the output HTML file.

View File

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

View File

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

View File

@@ -9,3 +9,18 @@ import "./src/toast"
export * as bootstrap from "bootstrap"
export * as tabler from "./src/tabler"
export {
Alert,
Modal,
Toast,
Tooltip,
Tab,
Button,
Carousel,
Collapse,
Dropdown,
Popover,
ScrollSpy,
Offcanvas
} from 'bootstrap'

View File

@@ -11,5 +11,20 @@ import "./src/toast"
import * as bootstrap from "bootstrap"
import * as tabler from "./src/tabler"
export {
Alert,
Modal,
Toast,
Tooltip,
Tab,
Button,
Carousel,
Collapse,
Dropdown,
Popover,
ScrollSpy,
Offcanvas
} from 'bootstrap'
globalThis.bootstrap = bootstrap
globalThis.tabler = tabler

View File

@@ -102,5 +102,34 @@ $utilities: (
'<svg width="16" height="16" viewBox="0 0 16 16"><rect x="0" y="0" width="8" height="8" fill="rgba(130, 130, 130, .1)" /><rect x="8" y="8" width="8" height="8" fill="rgba(130, 130, 130, .1)" /></svg>'
)} repeat center/16px 16px,
)
)
),
"bg-gradient": (
property: background,
class: bg-gradient,
values: (
null: linear-gradient(var(--#{$prefix}gradient-direction, to right), var(--#{$prefix}gradient-stops, var(--#{$prefix}gradient-from, transparent), var(--#{$prefix}gradient-to, transparent))) no-repeat,
),
),
"bg-gradient-direction": (
property: --#{$prefix}gradient-direction,
class: bg-gradient,
values: (
to-t: to top,
to-te: to top right,
to-e: to right,
to-be: to bottom right,
to-b: to bottom,
to-bs: to bottom left,
to-s: to left,
to-ts: to top left,
),
),
"table-layout": (
property: table-layout,
class: table,
values: (
auto: auto,
fixed: fixed,
),
),
) !default;

View File

@@ -3,41 +3,57 @@
--#{$prefix}accordion-border-color: var(--#{$prefix}border-color);
--#{$prefix}accordion-border-radius: #{$accordion-border-radius};
--#{$prefix}accordion-inner-border-radius: #{$accordion-inner-border-radius};
--#{$prefix}accordion-padding-x: #{$accordion-body-padding-x};
--#{$prefix}accordion-gap: 0;
--#{$prefix}accordion-active-color: #{$accordion-button-active-color};
--#{$prefix}accordion-btn-color: var(--#{$prefix}accordion-color);
--#{$prefix}accordion-btn-bg: #{$accordion-button-bg};
--#{$prefix}accordion-btn-toggle-width: 1.25rem;
--#{$prefix}accordion-padding-x: #{$accordion-body-padding-x};
--#{$prefix}accordion-btn-padding-x: var(--#{$prefix}accordion-padding-x);
--#{$prefix}accordion-btn-padding-y: #{$accordion-button-padding-y};
--#{$prefix}accordion-btn-font-weight: var(--#{$prefix}font-weight-medium);
--#{$prefix}accordion-body-padding-x: var(--#{$prefix}accordion-padding-x);
--#{$prefix}accordion-body-padding-y: #{$accordion-body-padding-y};
--#{$prefix}accordion-active-color: #{$accordion-button-active-color};
--#{$prefix}accordion-gap: 0;
display: flex;
flex-direction: column;
gap: var(--#{$prefix}accordion-gap);
}
.accordion-header {
.accordion-button {
position: relative;
display: flex;
gap: 1rem;
align-items: center;
width: 100%;
padding: var(--#{$prefix}accordion-btn-padding-y) var(--#{$prefix}accordion-padding-x);
color: var(--#{$prefix}accordion-btn-color);
text-align: left;
color: inherit;
text-align: inherit;
background-color: transparent;
border: 0;
overflow-anchor: none;
transition: transform $transition-time;
font-size: inherit;
font-weight: var(--#{$prefix}accordion-btn-font-weight);
gap: .75rem;
&:not(.collapsed) {
border-bottom-color: transparent;
box-shadow: none;
color: var(--#{$prefix}accordion-active-color);
}
}
.accordion-header {
margin: 0;
position: relative;
display: flex;
gap: 1rem;
align-items: center;
width: 100%;
color: var(--#{$prefix}accordion-btn-color);
text-align: left;
background-color: transparent;
border: 0;
overflow-anchor: none;
transition: transform $transition-time;
&:hover {
z-index: 2;
@@ -55,11 +71,11 @@
}
}
.accordion-header-icon {
.accordion-button-icon {
color: var(--#{$prefix}secondary);
}
.accordion-header-toggle {
.accordion-button-toggle {
display: flex;
line-height: 1;
transition: $transition-time transform;
@@ -69,7 +85,7 @@
width: var(--#{$prefix}accordion-btn-toggle-width);
height: var(--#{$prefix}accordion-btn-toggle-width);
.accordion-header:not(.collapsed) & {
.accordion-button:not(.collapsed) & {
transform: rotate(-180deg);
color: var(--#{$prefix}accordion-active-color);
}
@@ -79,23 +95,14 @@
}
}
.accordion-header-toggle-plus {
.accordion-header:not(.collapsed) & {
.accordion-button-toggle-plus {
.accordion-button:not(.collapsed) & {
path:first-child {
opacity: 0;
}
}
}
.accordion-header-text {
margin-bottom: 0;
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
margin-bottom: 0;
}
}
.accordion-item {
color: var(--#{$prefix}accordion-color);
border: var(--#{$prefix}border-width) solid var(--#{$prefix}accordion-border-color);
@@ -145,13 +152,11 @@
border-bottom: 0;
}
// stylelint-disable selector-max-class
> .accordion-collapse,
> .accordion-header .accordion-button,
> .accordion-header .accordion-button.collapsed {
@include border-radius(0);
}
// stylelint-enable selector-max-class
}
}
@@ -165,7 +170,7 @@
}
.accordion-inverted {
.accordion-header-toggle {
.accordion-button-toggle {
order: -1;
margin-left: 0;
}

View File

@@ -16,6 +16,19 @@
--#{$prefix}border-opacity: 1;
border-color: rgba(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}border-opacity)) !important;
}
.bg-gradient-from-#{"" + $color} {
--#{$prefix}gradient-from: var(--#{$prefix}#{$color});
}
.bg-gradient-to-#{"" + $color} {
--#{$prefix}gradient-to: var(--#{$prefix}#{$color});
}
.bg-gradient-via-#{"" + $color} {
--#{$prefix}gradient-via: var(--#{$prefix}#{$color});
--#{$prefix}gradient-stops: var(--#{$prefix}gradient-from, transparent), var(--#{$prefix}gradient-via, transparent), var(--#{$prefix}gradient-to, transparent);
}
}
@each $color, $value in $theme-colors {
@@ -50,4 +63,8 @@
.bg-surface-tertiary {
background-color: var(--#{$prefix}bg-surface-tertiary) !important;
}
.bg-surface-backdrop {
background-color: rgba($modal-backdrop-bg, $modal-backdrop-opacity) !important;
}

View File

@@ -13,6 +13,11 @@ $input-border-width: 1px;
color: inherit;
}
.focus .ts-control {
border-radius: var(--#{$prefix}border-radius);
}
.ts-control {
color: inherit;
@@ -75,4 +80,4 @@ $input-border-width: 1px;
&> div.item {
color: var(--#{$prefix}gray-500);
}
}
}

8
docs/package.json Normal file
View File

@@ -0,0 +1,8 @@
{
"private": true,
"name": "docs",
"version": "1.0.0",
"scripts": {
"build": "mkdir -p dist && echo '' > dist/index.html"
}
}

View File

@@ -3,7 +3,7 @@
"description": "Premium and Open Source dashboard template with responsive and high quality UI.",
"homepage": "https://tabler.io",
"scripts": {
"build": "turbo build",
"build": "turbo build && pnpm run zip",
"dev": "turbo dev",
"clean": "turbo clean",
"bundlewatch": "turbo bundlewatch",
@@ -12,33 +12,35 @@
"playwright": "pnpm run build && pnpm run vt",
"vt": "playwright test tests",
"reformat-mdx": "node .build/reformat-mdx.mjs",
"start": "pnpm dev"
"start": "pnpm dev",
"zip": "mkdir -p packages-zip && zip -qr9 packages-zip/tabler-$(node -p \"require('./core/package.json').version\").zip ./preview/dist/*"
},
"packageManager": "pnpm@10.5.1",
"packageManager": "pnpm@10.6.4",
"devDependencies": {
"@argos-ci/playwright": "^4.1.0",
"@changesets/changelog-github": "^0.5.1",
"@changesets/cli": "^2.28.1",
"@playwright/test": "^1.50.1",
"@playwright/test": "^1.51.1",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^28.0.2",
"@rollup/plugin-node-resolve": "^16.0.0",
"@rollup/plugin-commonjs": "^28.0.3",
"@rollup/plugin-node-resolve": "^16.0.1",
"@rollup/plugin-replace": "^6.0.2",
"autoprefixer": "^10.4.20",
"autoprefixer": "^10.4.21",
"bundlewatch": "^0.4.0",
"clean-css-cli": "^5.6.3",
"concurrently": "^9.1.2",
"cross-env": "^7.0.3",
"glob": "^11.0.1",
"husky": "^9.1.7",
"nodemon": "^3.1.9",
"pnpm": "10.5.1",
"pnpm": "10.6.4",
"postcss": "^8.5.3",
"postcss-cli": "^11.0.0",
"prettier": "^3.5.2",
"rollup": "4.34.8",
"postcss-cli": "^11.0.1",
"prettier": "^3.5.3",
"rollup": "4.36.0",
"rtlcss": "^4.3.0",
"sass": "1.71.0",
"shx": "^0.3.4",
"shx": "^0.4.0",
"terser": "^5.39.0",
"turbo": "^2.4.4"
}

5774
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,5 @@
packages:
- core
- preview
- docs
- 'shared/*'

View File

@@ -591,25 +591,34 @@ export default function (eleventyConfig) {
});
});
let _CAPTURES = {};
eleventyConfig.on('beforeBuild', () => {
_CAPTURES = {};
});
['script', 'modal'].forEach((tag) => {
eleventyConfig.addPairedShortcode(`capture_${tag}`, function (content) {
if (!this.page[tag]) {
this.page[tag] = []
}
if (!this.page[tag][this.page.url]) {
this.page[tag][this.page.url] = [];
eleventyConfig.addPairedShortcode(`capture_${tag}`, function (content, inline) {
if (inline) {
return content;
}
this.page[tag][this.page.url].push(content);
if (!_CAPTURES[tag]) {
_CAPTURES[tag] = []
}
if (!_CAPTURES[tag][this.page.inputPath]) {
_CAPTURES[tag][this.page.inputPath] = [];
}
_CAPTURES[tag][this.page.inputPath].push(content);
return ''
})
eleventyConfig.addShortcode(`${tag}s`, function () {
if (this.page[tag]) {
return this.page[tag][this.page.url] ? `<!-- BEGIN PAGE ${tag.toUpperCase()}S -->\n${this.page[tag][this.page.url].join('\n').trim()}\n<!-- END PAGE ${tag.toUpperCase()}S -->` : '';
if (_CAPTURES[tag] && _CAPTURES[tag][this.page.inputPath]) {
return _CAPTURES[tag][this.page.inputPath] ? `<!-- BEGIN PAGE ${tag.toUpperCase()}S -->\n${_CAPTURES[tag][this.page.inputPath].join('\n').trim()}\n<!-- END PAGE ${tag.toUpperCase()}S -->` : '';
}
return ''

View File

@@ -33,14 +33,14 @@
"dependencies": {
"@melloware/coloris": "^0.24.0",
"@tabler/core": "workspace:*",
"@tabler/icons": "^3.29.0",
"apexcharts": "^4.4.0",
"@tabler/icons": "^3.31.0",
"apexcharts": "^4.5.0",
"autosize": "^6.0.1",
"choices.js": "^11.0.3",
"choices.js": "^11.1.0",
"countup.js": "^2.8.0",
"dropzone": "^6.0.0-beta.2",
"flatpickr": "^4.6.13",
"fslightbox": "^3.4.2",
"fslightbox": "^3.5.1",
"imask": "^7.6.1",
"jsvectormap": "^1.6.0",
"list.js": "^2.3.1",
@@ -48,10 +48,10 @@
"nouislider": "^15.8.1",
"plyr": "^3.7.8",
"star-rating.js": "^4.3.1",
"tinymce": "^7.6.1",
"tom-select": "^2.4.2",
"tinymce": "^7.7.1",
"tom-select": "^2.4.3",
"typed.js": "^2.1.0",
"signature_pad": "^5.0.4"
"signature_pad": "^5.0.6"
},
"devDependencies": {
"@11ty/eleventy": "^3.0.0",

View File

@@ -915,6 +915,10 @@
"name": "Tuvalu",
"flag": "tv"
},
{
"name": "Taiwan",
"flag": "tw"
},
{
"name": "Tanzania",
"flag": "tz"
@@ -995,4 +999,4 @@
"name": "Zimbabwe",
"flag": "zw"
}
]
]

View File

@@ -6,6 +6,8 @@
"nouislider": "nouislider"
},
"js": {
"imask": "imask/dist/imask.min.js",
"autosize": "autosize/dist/autosize.min.js",
"apexcharts": "apexcharts/dist/apexcharts.min.js",
"nouislider": "nouislider/dist/nouislider.min.js",
"countup": "countup.js/dist/countUp.umd.js",

View File

@@ -132,7 +132,7 @@
},
"modals": {
"url": "modals.html",
"title": "Modal"
"title": "Modals"
},
"markdown": {
"title": "Markdown",

View File

@@ -12,7 +12,8 @@
{% endif %}
{% unless include.hide-logo %}
{% if include.small-logo %}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 68" width="32" height="32" alt="{{ site.title }}" class="navbar-brand-image{% if include.show-title %} me-3{% endif %}">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 68" width="32" height="32"
aria-label="{{ site.title }}" class="navbar-brand-image{% if include.show-title %} me-3{% endif %}">
<path d="M64.6 16.2C63 9.9 58.1 5 51.8 3.4 40 1.5 28 1.5 16.2 3.4 9.9 5 5 9.9 3.4 16.2 1.5 28 1.5 40 3.4 51.8 5 58.1 9.9 63 16.2 64.6c11.8 1.9 23.8 1.9 35.6 0C58.1 63 63 58.1 64.6 51.8c1.9-11.8 1.9-23.8 0-35.6zM33.3 36.3c-2.8 4.4-6.6 8.2-11.1 11-1.5.9-3.3.9-4.8.1s-2.4-2.3-2.5-4c0-1.7.9-3.3 2.4-4.1 2.3-1.4 4.4-3.2 6.1-5.3-1.8-2.1-3.8-3.8-6.1-5.3-2.3-1.3-3-4.2-1.7-6.4s4.3-2.9 6.5-1.6c4.5 2.8 8.2 6.5 11.1 10.9 1 1.4 1 3.3.1 4.7zM49.2 46H37.8c-2.1 0-3.8-1-3.8-3s1.7-3 3.8-3h11.4c2.1 0 3.8 1 3.8 3s-1.7 3-3.8 3z" fill="#066fd1" style="fill: var(--tblr-primary, #066fd1)" />
</svg>
{% else %}

View File

@@ -0,0 +1,23 @@
{% include "ui/modal/close.html" %}
<div class="modal-body">
<h3 class="card-title">Confirm transfer</h3>
<p class="card-subtitle">Please confirm the transfer of funds by signing below.</p>
<form action="">
<div class="mb-3">
<label class="form-label required">Signature</label>
<div class="position-relative select-none">
{% include "ui/signature.html" sample clear width=684 height=400 %}
</div>
</div>
</form>
<div class="text-secondary fs-5">
I agree that the signature and initials will be the electronic representation of my signature and initials for
all purposes when I (or my agent) use
them on documents, including legally binding contracts - just the same as a pen-and-paper signature or initial.
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn">Cancel</button>
<button type="button" class="btn btn-primary ms-auto">Confirm transfer</button>
</div>

View File

@@ -1,7 +1,6 @@
{% include "ui/modal/close.html" %}
<div class="modal-status bg-success"></div>
<div class="modal-body text-center py-4">
{% include "ui/icon.html" icon="circle-check" color="green" size="lg" class="mb-2" %}
<h3>Payment succedeed</h3>

View File

@@ -7,19 +7,21 @@
<div class="accordion{% for type in accordion-types %} accordion-{{ type }}{% endfor %}" id="accordion-{{ accordion-id }}">
{% for question in questions limit: accordion-count %}
<div class="accordion-item">
<button class="accordion-header {% unless forloop.index == 1 %}collapsed{% endunless %}" type="button" data-bs-toggle="collapse" data-bs-target="#collapse-{{ forloop.index }}-{{ accordion-id }}" aria-expanded="{% if forloop.index == 1 %}true{% else %}false{% endif %}">
{% if include.show-icon %}
<div class="accordion-header-icon">
{% include "ui/icon.html" icon="link" %}
</div>
{% endif %}
<div class="accordion-header-text">
<h4>{{ question.question }}</h4>
</div>
<div class="accordion-header-toggle{% if include.toggle-icon %} accordion-header-toggle-plus{% endif %}">
{% include "ui/icon.html" icon=accordion-toggle-icon %}
</div>
</button>
<div class="accordion-header">
<button class="accordion-button{% unless forloop.index == 1 %} collapsed{% endunless %}" type="button" data-bs-toggle="collapse" data-bs-target="#collapse-{{ forloop.index }}-{{ accordion-id }}" aria-expanded="{% if forloop.index == 1 %}true{% else %}false{% endif %}">
{% if include.show-icon %}
<div class="accordion-button-icon">
{% include "ui/icon.html" icon="link" %}
</div>
{% endif %}
{{ question.question }}
<div class="accordion-button-toggle{% if include.toggle-icon %} accordion-button-toggle-plus{% endif %}">
{% include "ui/icon.html" icon=accordion-toggle-icon %}
</div>
</button>
</div>
<div id="collapse-{{ forloop.index }}-{{ accordion-id }}" class="accordion-collapse collapse{% if forloop.index == 1 %} show{% endif %}" data-bs-parent="#accordion-{{ accordion-id }}">
<div class="accordion-body">
{{ question.answer }}

View File

@@ -1,9 +1,10 @@
<!-- BEGIN MODAL -->
{% assign modal-id = include.modal-id | default: 'simple' %}
{% assign size = include['size'] %}
{% assign inline = include.inline | default: false %}
{% capture_modal %}
<div class="modal modal-blur fade" id="modal-{{ modal-id }}" tabindex="-1" role="dialog" aria-hidden="true">
{% capture_modal inline %}
<div class="modal modal-blur fade{% if include.class %} {{ include.class }}{% endif %}" {% if include.style %} style="{{ include.style }}"{% endif %} id="modal-{{ modal-id }}" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog{% if size%} modal-{{ size }}{% endif %}{% unless include.top %} modal-dialog-centered{% endunless %}{% if include.scrollable %} modal-dialog-scrollable{% endif %}" role="document">
<div class="modal-content">
{% include "parts/modals/{{ modal-id }}.html" %}

View File

@@ -11,59 +11,196 @@ permalink: colors.html
{% assign colors = colors | push: color[0] %}
{% endfor %}
{% assign colors = colors | push: 'dark' %}
{% assign colors = colors | push: 'muted' %}
<div class="card">
<div class="card-body">
<div class="table-responsive">
<table class="table text-center">
<tr>
{% for color in colors %}
<td>
<div class="avatar bg-{{ color }} text-{{ color }}-fg" data-demo-color>{{ color | slice: 0, 2 }}
<div class="row row-cards">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="table-responsive">
<table class="table text-center">
<tr>
{% for color in colors %}
<td>
<div class="avatar bg-{{ color }} text-{{ color }}-fg" data-demo-color>{{ color | slice: 0, 2 }}
</div>
</td>
{% endfor %}
</tr>
<tr>
{% for color in colors %}
<td>
<div class="avatar bg-{{ color }}-lt" data-demo-color>{{ color | slice: 0, 2 }}</div>
</td>
{% endfor %}
</tr>
<tr>
{% for color in colors %}
<td>
<div class="avatar text-{{ color }} bg-transparent" data-demo-color>{{ color | slice: 0, 2 }}
</div>
</td>
{% endfor %}
</tr>
<tr class="bg-surface-tertiary">
{% for color in colors %}
<td>
<div class="avatar text-{{ color }} bg-transparent" data-demo-color>{{ color | slice: 0, 2 }}
</div>
</td>
{% endfor %}
</tr>
<tr class="bg-dark text-white">
{% for color in colors %}
<td>
{% if color == 'dark' %}{% assign c = 'white' %}{% else %}{% assign c = color %}{% endif %}
<div class="avatar text-{{ c }} bg-transparent" data-demo-color>{{ c | slice: 0, 2 }}</div>
</td>
{% endfor %}
</tr>
<tr class="bg-dark text-white">
{% for color in colors %}
<td>
{% if color == 'dark' %}{% assign c = 'white' %}{% else %}{% assign c = color %}{% endif %}
<div class="avatar bg-{{ c }}-lt" data-demo-color>{{ c | slice: 0, 2 }}</div>
<div class="mt-2" data-demo-color-contrast></div>
</td>
{% endfor %}
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="col-12">
{% assign colors = colors | push: 'inverted' %}
{% assign colors = colors | push: 'white' %}
{% assign colors = colors | push: 'transparent' %}
<div class="row">
<div class="col-6">
<div class="card">
<div class="card-body">
<h3 class="card-title">
Gradient
</h3>
<form action="">
<div class="row g-4">
<div class="col">
<div>
<label class="form-label">From</label>
<select class="form-select" data-demo-color-select name="color-from">
{% for color in colors %}
<option value="{{ color }}">{{ color }}</option>
{% endfor %}
</select>
</div>
<div class="mt-3">
<label class="form-label">To</label>
<select class="form-select" data-demo-color-select name="color-to">
{% for color in colors %}
<option value="{{ color }}" {% if color=='transparent' %} selected{% endif %}>
{{ color }}
</option>
{% endfor %}
</select>
</div>
</div>
<div class="col">
<div>
<label class="form-label">Via</label>
<select class="form-select" data-demo-color-select name="color-via">
<option></option>
{% for color in colors %}
<option value="{{ color }}">{{ color }}</option>
{% endfor %}
</select>
</div>
<div class="mt-3">
<label class="form-label">Direction</label>
<select class="form-select" data-demo-color-select name="color-direction">
<option value="to-t">to top</option>
<option value="to-te">to top right</option>
<option value="to-r" selected>to right</option>
<option value="to-be">to bottom right</option>
<option value="to-b">to bottom</option>
<option value="to-bs">to bottom left</option>
<option value="to-s">to left</option>
<option value="to-ts">to top left</option>
</select>
</div>
</div>
<div class="col-12">
<div class="border rounded bg-pattern-transparent overflow-hidden">
<div id="gradient-preview"
class="border rounded bg-gradient bg-gradient-from-primary bg-gradient-to-transparent">
<div class=" px-4 py-5"></div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="col-6">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col">
<div class="space-y">
{% for color in colors %}
<div
class="border rounded bg-gradient bg-gradient-from-{{ color }} bg-gradient-to-transparent px-4 py-2">
</div>
{% endfor %}
</div>
</div>
<div class="col">
<div class="space-y">
{% for color in colors %}
<div
class="border rounded bg-gradient bg-gradient-to-{{ color }} bg-gradient-from-transparent px-4 py-2">
</div>
{% endfor %}
</div>
</div>
</div>
</td>
{% endfor %}
</tr>
<tr>
{% for color in colors %}
<td>
<div class="avatar bg-{{ color }}-lt" data-demo-color>{{ color | slice: 0, 2 }}</div>
</td>
{% endfor %}
</tr>
<tr>
{% for color in colors %}
<td>
<div class="avatar text-{{ color }} bg-transparent" data-demo-color>{{ color | slice: 0, 2 }}</div>
</td>
{% endfor %}
</tr>
<tr class="bg-light">
{% for color in colors %}
<td>
<div class="avatar text-{{ color }} bg-transparent" data-demo-color>{{ color | slice: 0, 2 }}</div>
</td>
{% endfor %}
</tr>
<tr class="bg-dark text-white">
{% for color in colors %}
<td>
{% if color == 'dark' %}{% assign c = 'white' %}{% else %}{% assign c = color %}{% endif %}
<div class="avatar text-{{ c }} bg-transparent" data-demo-color>{{ c | slice: 0, 2 }}</div>
</td>
{% endfor %}
</tr>
<tr class="bg-dark text-white">
{% for color in colors %}
<td>
{% if color == 'dark' %}{% assign c = 'white' %}{% else %}{% assign c = color %}{% endif %}
<div class="avatar bg-{{ c }}-lt" data-demo-color>{{ c | slice: 0, 2 }}</div>
<div class="mt-2" data-demo-color-contrast></div>
</td>
{% endfor %}
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
var gradientPreview = document.getElementById('gradient-preview');
var colorFrom = document.querySelector('[name="color-from"]');
var colorTo = document.querySelector('[name="color-to"]');
var colorVia = document.querySelector('[name="color-via"]');
var colorDirection = document.querySelector('[name="color-direction"]');
function updateGradient() {
var from = colorFrom.value;
var to = colorTo.value;
var via = colorVia.value;
var direction = colorDirection.value;
var gradient = 'bg-gradient bg-gradient-from-' + from + ' bg-gradient-to-' + to;
if (via) {
gradient += ' bg-gradient-via-' + via;
}
gradient += ' bg-gradient-' + direction;
gradientPreview.className = gradient;
}
colorFrom.addEventListener('change', updateGradient);
colorTo.addEventListener('change', updateGradient);
colorVia.addEventListener('change', updateGradient);
colorDirection.addEventListener('change', updateGradient);
updateGradient();
});
</script>

View File

@@ -2,7 +2,7 @@
title: Form elements
page-header: Form elements
page-menu: forms
page-libs: [nouislider, autosize, tabler-flags, tabler-payments, litepicker, tom-select]
page-libs: [nouislider, autosize, tabler-flags, tabler-payments, litepicker, tom-select, imask]
layout: default
permalink: form-elements.html
---

View File

@@ -4,31 +4,70 @@ page-header: Modals
page-menu: base.modals
layout: default
permalink: modals.html
page-libs: [signature_pad]
---
<div class="card">
<div class="card-body">
<div class="btn-list">
{% include "ui/button.html" text="Simple modal" modal-id="simple" %}
{% include "ui/button.html" text="Large modal" modal-id="large" %}
{% include "ui/button.html" text="Small modal" modal-id="small" %}
{% include "ui/button.html" text="Full width modal" modal-id="full-width" %}
{% include "ui/button.html" text="Scrollable modal" modal-id="scrollable" %}
{% include "ui/button.html" text="Modal with form" modal-id="report" %}
{% include "ui/button.html" text="Success modal" modal-id="success" %}
{% include "ui/button.html" text="Danger modal" modal-id="danger" %}
{% include "ui/button.html" text="Modal with simple form" modal-id="team" %}
<div class="row g-5">
<div class="d-none d-md-block col-3">
<div class="nav nav-vertical sticky-top pt-4">
<a href="#modal-simple" class="nav-link">Simple modal</a>
<a href="#modal-large" class="nav-link">Large modal</a>
<a href="#modal-small" class="nav-link">Small modal</a>
<a href="#modal-full-width" class="nav-link">Full width modal</a>
<a href="#modal-scrollable" class="nav-link">Scrollable modal</a>
<a href="#modal-report" class="nav-link">Modal with form</a>
<a href="#modal-success" class="nav-link">Success modal</a>
<a href="#modal-danger" class="nav-link">Danger modal</a>
<a href="#modal-team" class="nav-link">Modal with simple form</a>
<a href="#modal-signature" class="nav-link">Modal with signature form</a>
</div>
</div>
<div class="col">
<div class="space-y-6">
<div>
<h3>Simple modal</h3>
{% include "ui/modal.html" class="position-relative rounded d-block show bg-surface-backdrop py-6 w-auto h-auto" modal-id="simple" inline %}
</div>
<div>
<h3>Large modal</h3>
{% include "ui/modal.html" class="position-relative rounded d-block show bg-surface-backdrop py-6 w-auto h-auto" modal-id="large" size="lg" inline %}
</div>
<div>
<h3>Small modal</h3>
{% include "ui/modal.html" class="position-relative rounded d-block show bg-surface-backdrop py-6 w-auto h-auto" modal-id="small" size="sm" inline %}
</div>
<div>
<h3>Full width modal</h3>
{% include "ui/modal.html" class="position-relative rounded d-block show bg-surface-backdrop py-6 w-auto h-auto" modal-id="full-width" size="full-width" inline %}
</div>
<div>
<h3>Scrollable modal</h3>
{% include "ui/modal.html" class="position-relative rounded d-block show bg-surface-backdrop py-6 w-auto h-auto" modal-id="scrollable" scrollable=true style="max-height: 30rem" inline %}
</div>
<div>
<h3>Modal with form</h3>
{% include "ui/modal.html" class="position-relative rounded d-block show bg-surface-backdrop py-6 w-auto h-auto" modal-id="report" size="lg" inline %}
</div>
<div>
<h3>Success modal</h3>
{% include "ui/modal.html" class="position-relative rounded d-block show bg-surface-backdrop py-6 w-auto h-auto" modal-id="success" size="sm" inline %}
</div>
<div>
<h3>Danger modal</h3>
{% include "ui/modal.html" class="position-relative rounded d-block show bg-surface-backdrop py-6 w-auto h-auto" modal-id="danger" size="sm" inline %}
</div>
<div>
<h3>Modal with simple form</h3>
{% include "ui/modal.html" class="position-relative rounded d-block show bg-surface-backdrop py-6 w-auto h-auto" modal-id="team" inline %}
</div>
<div>
<h3>Modal with signature form</h3>
{% include "ui/modal.html" class="position-relative rounded d-block show bg-surface-backdrop py-6 w-auto h-auto" modal-id="signature" inline %}
</div>
</div>
</div>
</div>
</div>
</div>
{% include "ui/modal.html" modal-id="simple" %}
{% include "ui/modal.html" modal-id="large" size="lg" %}
{% include "ui/modal.html" modal-id="small" size="sm" %}
{% include "ui/modal.html" modal-id="full-width" size="full-width" %}
{% include "ui/modal.html" modal-id="scrollable" scrollable=true %}
{% include "ui/modal.html" modal-id="report" size="lg" %}
{% include "ui/modal.html" modal-id="success" size="sm" %}
{% include "ui/modal.html" modal-id="danger" size="sm" %}
{% include "ui/modal.html" modal-id="team" %}
</div>