reverse ESM changes 💩
This commit is contained in:
parent
aa57e97a39
commit
7e08b37be1
|
@ -14,8 +14,8 @@ on:
|
|||
type: choice
|
||||
description: Release type
|
||||
options:
|
||||
- ":patch"
|
||||
- ":minor"
|
||||
- " -- --patch"
|
||||
- " -- --minor"
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
|
40
CHANGELOG.md
40
CHANGELOG.md
|
@ -2,21 +2,49 @@
|
|||
|
||||
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
||||
|
||||
## 4.0.9 (2023-11-16)
|
||||
## [4.2.3](https://github.com/saadeghi/daisyui/compare/v4.2.2...v4.2.3) (2023-11-16)
|
||||
|
||||
## 4.2.2 (2023-11-16)
|
||||
|
||||
## 4.2.1 (2023-11-16)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* divider default color not being visible on dark themes ([fffd021](https://github.com/saadeghi/daisyui/commit/fffd02162d4d5fd80895ad1256a59bccd07f71aa))
|
||||
* [#2543](https://github.com/saadeghi/daisyui/issues/2543) ([6a9b9ac](https://github.com/saadeghi/daisyui/commit/6a9b9ac3cd2ddce07481d294929d807461a1e68e))
|
||||
|
||||
## 4.2.0 (2023-11-16)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* rename CDN .js files to .cjs ([d0e6aec](https://github.com/saadeghi/daisyui/commit/d0e6aec10dc576f4171bcb1050aae74640255d42))
|
||||
|
||||
## 4.1.1 (2023-11-16)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* missing utility classes in CDN ([c31f445](https://github.com/saadeghi/daisyui/commit/c31f44569d9c3f58ce69525b995058d9a5d6d4d4))
|
||||
|
||||
## 4.1.0 (2023-11-16)
|
||||
|
||||
### Features
|
||||
|
||||
- Convert package to ESM ([aed8cd5](https://github.com/saadeghi/daisyui/commit/aed8cd5e7523569dd56ef035cbda6da86f5d422a))
|
||||
If you're imporing any JS file from daisyUI, make sure you're importing the exported object or funtion correctly.
|
||||
|
||||
## 4.0.9 (2023-11-16)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- divider default color not being visible on dark themes ([fffd021](https://github.com/saadeghi/daisyui/commit/fffd02162d4d5fd80895ad1256a59bccd07f71aa))
|
||||
|
||||
## 4.0.8 (2023-11-16)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* footer text opacity ([f4be765](https://github.com/saadeghi/daisyui/commit/f4be7652472e478a2a336e0321b4c21b63872d52))
|
||||
|
||||
## 4.0.7 (2023-11-14)
|
||||
- footer text opacity ([f4be765](https://github.com/saadeghi/daisyui/commit/f4be7652472e478a2a336e0321b4c21b63872d52))
|
||||
|
||||
## 4.0.6 (2023-11-14)
|
||||
|
||||
|
|
13
package.json
13
package.json
|
@ -62,10 +62,9 @@
|
|||
"build:skipfullcss": "node src/build --skipfullcss",
|
||||
"dev": "cd src/docs && npm run dev",
|
||||
"playground": "cd src/experiments/playground && npm run dev",
|
||||
"release": "rm -f package-lock.json && commit-and-tag-version",
|
||||
"release:patch": "rm -f package-lock.json && commit-and-tag-version --release-as patch",
|
||||
"release:minor": "rm -f package-lock.json && commit-and-tag-version --release-as minor",
|
||||
"release:major": "rm -f package-lock.json && commit-and-tag-version --release-as major"
|
||||
"release": "node src/release",
|
||||
"publish:alpha": "npm publish --tag=alpha",
|
||||
"alpha": "npm run release -- --alpha && npm publish --tag=alpha"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^10.4.16",
|
||||
|
@ -73,9 +72,9 @@
|
|||
"postcss-cli": "10.1.0",
|
||||
"postcss-import": "15.1.0",
|
||||
"prejss-cli": "0.3.3",
|
||||
"prettier": "^3.0.3",
|
||||
"prettier-plugin-svelte": "^3.0.3",
|
||||
"prettier-plugin-tailwindcss": "^0.5.6",
|
||||
"prettier": "^3.1.0",
|
||||
"prettier-plugin-svelte": "^3.1.0",
|
||||
"prettier-plugin-tailwindcss": "^0.5.7",
|
||||
"tailwindcss": "^3.3.5"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
101
src/build.js
101
src/build.js
|
@ -1,34 +1,71 @@
|
|||
const { execSync } = require("child_process")
|
||||
import { exec } from "child_process"
|
||||
|
||||
execSync("node_modules/.bin/postcss --config src/base src/base/*.css --base src --dir dist")
|
||||
execSync("cat dist/base/*.css > dist/base.css")
|
||||
execSync("node_modules/.bin/prejss-cli dist/base.css --format commonjs")
|
||||
execSync(
|
||||
"node_modules/.bin/postcss --config src/utilities/global src/utilities/global/*.css --base src --dir dist"
|
||||
)
|
||||
execSync("cat dist/utilities/global/*.css > dist/utilities.css")
|
||||
execSync("node_modules/.bin/prejss-cli dist/utilities.css --format commonjs")
|
||||
execSync(
|
||||
"node_modules/.bin/postcss --config src/utilities/unstyled src/utilities/unstyled/*.css --base src --dir dist",
|
||||
{ stdio: [] }
|
||||
)
|
||||
execSync("cat dist/utilities/unstyled/*.css > dist/utilities-unstyled.css")
|
||||
execSync("node_modules/.bin/prejss-cli dist/utilities-unstyled.css --format commonjs")
|
||||
execSync(
|
||||
"node_modules/.bin/postcss --config src/utilities/styled src/utilities/styled/*.css --base src --dir dist",
|
||||
{ stdio: [] }
|
||||
)
|
||||
execSync("cat dist/utilities/styled/*.css > dist/utilities-styled.css")
|
||||
execSync("node_modules/.bin/prejss-cli dist/utilities-styled.css --format commonjs")
|
||||
execSync(
|
||||
"node_modules/.bin/postcss --config src/components src/components/**/*.css --base src --dir dist"
|
||||
)
|
||||
execSync("cat dist/components/unstyled/*.css > dist/unstyled.css")
|
||||
execSync("cat dist/components/unstyled/*.css dist/components/styled/*.css > dist/styled.css")
|
||||
execSync("node_modules/.bin/prejss-cli dist/{unstyled,styled}.css --format commonjs")
|
||||
execSync("node_modules/.bin/postcss src/themes/index.css -o dist/themes.css --config src/themes", {
|
||||
stdio: [],
|
||||
})
|
||||
if (!process.argv.includes("--skipfullcss")) {
|
||||
execSync("node_modules/.bin/postcss src/full/index.css -o dist/full.css --config src/full")
|
||||
function runCommand(command) {
|
||||
return new Promise((resolve, reject) => {
|
||||
exec(command, (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
reject(error)
|
||||
} else {
|
||||
resolve({ stdout, stderr })
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
async function executeCommands() {
|
||||
try {
|
||||
await runCommand(
|
||||
"node_modules/.bin/postcss --config src/base src/base/*.css --base src --dir dist"
|
||||
)
|
||||
await runCommand("cat dist/base/*.css > dist/base.css")
|
||||
await runCommand("node_modules/.bin/prejss-cli dist/base.css --format commonjs")
|
||||
await runCommand("mv dist/base.js dist/base.cjs")
|
||||
await runCommand(
|
||||
"node_modules/.bin/postcss --config src/utilities/global src/utilities/global/*.css --base src --dir dist"
|
||||
)
|
||||
await runCommand("cat dist/utilities/global/*.css > dist/utilities.css")
|
||||
await runCommand("node_modules/.bin/prejss-cli dist/utilities.css --format commonjs")
|
||||
await runCommand("mv dist/utilities.js dist/utilities.cjs")
|
||||
|
||||
await runCommand(
|
||||
"node_modules/.bin/postcss --config src/utilities/unstyled src/utilities/unstyled/*.css --base src --dir dist",
|
||||
{ stdio: [] }
|
||||
)
|
||||
await runCommand("cat dist/utilities/unstyled/*.css > dist/utilities-unstyled.css")
|
||||
await runCommand("node_modules/.bin/prejss-cli dist/utilities-unstyled.css --format commonjs")
|
||||
await runCommand("mv dist/utilities-unstyled.js dist/utilities-unstyled.cjs")
|
||||
await runCommand(
|
||||
"node_modules/.bin/postcss --config src/utilities/styled src/utilities/styled/*.css --base src --dir dist",
|
||||
{ stdio: [] }
|
||||
)
|
||||
await runCommand("cat dist/utilities/styled/*.css > dist/utilities-styled.css")
|
||||
await runCommand("node_modules/.bin/prejss-cli dist/utilities-styled.css --format commonjs")
|
||||
await runCommand("mv dist/utilities-styled.js dist/utilities-styled.cjs")
|
||||
await runCommand(
|
||||
"node_modules/.bin/postcss --config src/components src/components/**/*.css --base src --dir dist"
|
||||
)
|
||||
await runCommand("cat dist/components/unstyled/*.css > dist/unstyled.css")
|
||||
await runCommand(
|
||||
"cat dist/components/unstyled/*.css dist/components/styled/*.css > dist/styled.css"
|
||||
)
|
||||
await runCommand("node_modules/.bin/prejss-cli dist/{unstyled,styled}.css --format commonjs")
|
||||
await runCommand("mv dist/unstyled.js dist/unstyled.cjs")
|
||||
await runCommand("mv dist/styled.js dist/styled.cjs")
|
||||
await runCommand(
|
||||
"node_modules/.bin/postcss src/themes/index.css -o dist/themes.css --config src/themes",
|
||||
{
|
||||
stdio: [],
|
||||
}
|
||||
)
|
||||
if (!process.argv.includes("--skipfullcss")) {
|
||||
await runCommand(
|
||||
"node_modules/.bin/postcss src/full/index.css -o dist/full.css --config src/full"
|
||||
)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error executing commands:", error)
|
||||
}
|
||||
}
|
||||
|
||||
// Run the commands asynchronously
|
||||
executeCommands()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.btn {
|
||||
@apply rounded-btn inline-flex h-12 min-h-[3rem] flex-shrink-0 cursor-pointer select-none flex-wrap items-center justify-center border-transparent px-4 text-center;
|
||||
@apply rounded-btn inline-flex h-12 min-h-[3rem] shrink-0 cursor-pointer select-none flex-wrap items-center justify-center border-transparent px-4 text-center;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1em;
|
||||
/* disabled */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.file-input {
|
||||
@apply h-12 flex-shrink pe-4 text-sm leading-loose;
|
||||
@apply h-12 shrink pe-4 text-sm leading-loose;
|
||||
&::file-selector-button {
|
||||
@apply me-4 inline-flex h-full flex-shrink-0 cursor-pointer select-none flex-wrap items-center justify-center px-4 text-center text-sm transition duration-200 ease-out;
|
||||
@apply me-4 inline-flex h-full shrink-0 cursor-pointer select-none flex-wrap items-center justify-center px-4 text-center text-sm transition duration-200 ease-out;
|
||||
line-height: 1em;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.input {
|
||||
@apply flex-shrink;
|
||||
@apply shrink;
|
||||
@apply h-12 px-4 text-sm leading-loose;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
justify-content: flex-start;
|
||||
}
|
||||
.navbar-center {
|
||||
flex-shrink: 0;
|
||||
@apply shrink-0;
|
||||
}
|
||||
.navbar-end {
|
||||
width: 50%;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.textarea {
|
||||
@apply min-h-[3rem] flex-shrink;
|
||||
@apply min-h-[3rem] shrink;
|
||||
@apply px-4 py-2 text-sm leading-loose;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
class="stroke-info-content h-4 w-4 flex-shrink-0">
|
||||
class="stroke-info-content h-4 w-4 shrink-0">
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<span class="flex-grow text-sm">
|
||||
{theme}
|
||||
</span>
|
||||
<span class="flex h-full flex-shrink-0 flex-wrap gap-1">
|
||||
<span class="flex h-full shrink-0 flex-wrap gap-1">
|
||||
<span class="bg-primary w-2 rounded" />
|
||||
<span class="bg-secondary w-2 rounded" />
|
||||
<span class="bg-accent w-2 rounded" />
|
||||
|
|
|
@ -154,7 +154,7 @@
|
|||
<br />
|
||||
<span class="inline-grid">
|
||||
<span
|
||||
class="pointer-events-none col-start-1 row-start-1 bg-[linear-gradient(90deg,theme(colors.error)_0%,theme(colors.secondary)_9%,theme(colors.secondary)_42%,theme(colors.primary)_47%,theme(colors.accent)_100%)] bg-clip-text blur-2xl [-webkit-text-fill-color:transparent] [transform:translate3d(0,0,0)] [@supports(color:oklch(0_0_0))]:bg-[linear-gradient(90deg,oklch(var(--s))_4%,color-mix(in_oklch,oklch(var(--s)),oklch(var(--er)))_22%,oklch(var(--p))_45%,color-mix(in_oklch,oklch(var(--p)),oklch(var(--a)))_67%,oklch(var(--a))_100.2%)]"
|
||||
class="pointer-events-none col-start-1 row-start-1 bg-[linear-gradient(90deg,theme(colors.error)_0%,theme(colors.secondary)_9%,theme(colors.secondary)_42%,theme(colors.primary)_47%,theme(colors.accent)_100%)] bg-clip-text blur-2xl [transform:translate3d(0,0,0)] [-webkit-text-fill-color:transparent] [@supports(color:oklch(0_0_0))]:bg-[linear-gradient(90deg,oklch(var(--s))_4%,color-mix(in_oklch,oklch(var(--s)),oklch(var(--er)))_22%,oklch(var(--p))_45%,color-mix(in_oklch,oklch(var(--p)),oklch(var(--a)))_67%,oklch(var(--a))_100.2%)]"
|
||||
aria-hidden="true">
|
||||
{@html $t("component library")}
|
||||
</span>
|
||||
|
@ -766,7 +766,7 @@
|
|||
{$t("Take Tailwind CSS")}
|
||||
<br />
|
||||
<span
|
||||
class="bg-[linear-gradient(90deg,theme(colors.error)_0%,theme(colors.secondary)_9%,theme(colors.secondary)_42%,theme(colors.primary)_47%,theme(colors.accent)_100%)] bg-clip-text will-change-auto [-webkit-text-fill-color:transparent] [transform:translate3d(0,0,0)] motion-reduce:!tracking-normal max-[1280px]:!tracking-normal [@supports(color:oklch(0_0_0))]:bg-[linear-gradient(90deg,oklch(var(--s))_4%,color-mix(in_oklch,oklch(var(--s)),oklch(var(--er)))_22%,oklch(var(--p))_45%,color-mix(in_oklch,oklch(var(--p)),oklch(var(--a)))_67%,oklch(var(--a))_100.2%)]"
|
||||
class="bg-[linear-gradient(90deg,theme(colors.error)_0%,theme(colors.secondary)_9%,theme(colors.secondary)_42%,theme(colors.primary)_47%,theme(colors.accent)_100%)] bg-clip-text will-change-auto [transform:translate3d(0,0,0)] [-webkit-text-fill-color:transparent] motion-reduce:!tracking-normal max-[1280px]:!tracking-normal [@supports(color:oklch(0_0_0))]:bg-[linear-gradient(90deg,oklch(var(--s))_4%,color-mix(in_oklch,oklch(var(--s)),oklch(var(--er)))_22%,oklch(var(--p))_45%,color-mix(in_oklch,oklch(var(--p)),oklch(var(--a)))_67%,oklch(var(--a))_100.2%)]"
|
||||
style={`letter-spacing:${animateValue(section["nextlevel"], [-100, 20], [0, 1])}rem`}>
|
||||
{$t("to the next level")}
|
||||
</span>
|
||||
|
@ -1458,7 +1458,7 @@
|
|||
<span class="inline-grid">
|
||||
{#if Math.trunc(animateValue(section["possibilities"], [-10, 0], [0, 1])) !== 0}
|
||||
<span
|
||||
class="pointer-events-none col-start-1 row-start-1 bg-[linear-gradient(90deg,theme(colors.error)_0%,theme(colors.secondary)_9%,theme(colors.secondary)_42%,theme(colors.primary)_47%,theme(colors.accent)_100%)] bg-clip-text opacity-70 blur-3xl [-webkit-text-fill-color:transparent] [transform:translate3d(0,0,0)] [:root[dir=rtl]_&]:leading-[1.35] [@supports(color:oklch(0_0_0))]:bg-[linear-gradient(90deg,oklch(var(--s))_4%,color-mix(in_oklch,oklch(var(--s)),oklch(var(--er)))_22%,oklch(var(--p))_45%,color-mix(in_oklch,oklch(var(--p)),oklch(var(--a)))_67%,oklch(var(--a))_100.2%)]"
|
||||
class="pointer-events-none col-start-1 row-start-1 bg-[linear-gradient(90deg,theme(colors.error)_0%,theme(colors.secondary)_9%,theme(colors.secondary)_42%,theme(colors.primary)_47%,theme(colors.accent)_100%)] bg-clip-text opacity-70 blur-3xl [transform:translate3d(0,0,0)] [-webkit-text-fill-color:transparent] [:root[dir=rtl]_&]:leading-[1.35] [@supports(color:oklch(0_0_0))]:bg-[linear-gradient(90deg,oklch(var(--s))_4%,color-mix(in_oklch,oklch(var(--s)),oklch(var(--er)))_22%,oklch(var(--p))_45%,color-mix(in_oklch,oklch(var(--p)),oklch(var(--a)))_67%,oklch(var(--a))_100.2%)]"
|
||||
aria-hidden="true">
|
||||
{$t("endless possibilities")}
|
||||
</span>
|
||||
|
|
|
@ -26,7 +26,7 @@ data="{[
|
|||
/>
|
||||
|
||||
<div class="alert alert-info text-sm mb-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-info-content flex-shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-info-content shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
||||
The <meta name="viewport" content="viewport-fit=cover"> is required for responsive of the bottom navigation in iOS.
|
||||
</div>
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ data="{[
|
|||
<h3 class="text-5xl font-bold">Login now!</h3>
|
||||
<p class="py-6">Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda excepturi exercitationem quasi. In deleniti eaque aut repudiandae et a id nisi.</p>
|
||||
</div>
|
||||
<div class="card flex-shrink-0 w-full max-w-sm shadow-2xl bg-base-100">
|
||||
<div class="card shrink-0 w-full max-w-sm shadow-2xl bg-base-100">
|
||||
<div class="card-body">
|
||||
<div class="form-control">
|
||||
<label class="label" for="input1">
|
||||
|
@ -132,7 +132,7 @@ data="{[
|
|||
<h1 class="text-5xl font-bold">Login now!</h1>
|
||||
<p class="py-6">Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda excepturi exercitationem quasi. In deleniti eaque aut repudiandae et a id nisi.</p>
|
||||
</div>
|
||||
<div class="$$card flex-shrink-0 w-full max-w-sm shadow-2xl bg-base-100">
|
||||
<div class="$$card shrink-0 w-full max-w-sm shadow-2xl bg-base-100">
|
||||
<form class="$$card-body">
|
||||
<div class="$$form-control">
|
||||
<label class="$$label">
|
||||
|
|
|
@ -40,7 +40,7 @@ data="{[
|
|||
</div>
|
||||
|
||||
<div class="alert text-sm mt-4">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-current flex-shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-current shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
||||
<div><Translate text="Make sure you're using unique IDs for each modal" /></div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ layout: components
|
|||
<Translate text="Radial progress needs `--value` CSS variable to work.<br />To change the size, use `--size` CSS variable which has a default value of `4rem`.<br />To change the thickness, use `--thickness` CSS variable which is 10% of the size by default.<br />" />
|
||||
|
||||
<div class="alert alert-info text-sm mt-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-info-content flex-shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-info-content shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
||||
For radial progress we use <div> instead of <progress> tag because Browsers are unable to show the text inside <progress> tag and Firefox doesn't show the pseudo elements inside <progress> bar at all.
|
||||
For accessibility, a role of 'progressbar' is given to each <div> explicitly, while
|
||||
<progress> receives this role implicitly.
|
||||
|
|
|
@ -29,7 +29,7 @@ data="{[
|
|||
/>
|
||||
|
||||
<div class="alert text-sm mt-4">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-current flex-shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-current shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
||||
<div><Translate text="The <span class=badge>hr</span> tag at the start or end of each item, displays a line to connect items." /></div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ published: true
|
|||
<Translate text="daisyUI adds some style to @tailwindcss/typography so it will use the same theme as other elements." />
|
||||
|
||||
<div class="alert alert-info max-w-3xl text-sm not-prose">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-info-content flex-shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-info-content shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
||||
<p><Translate text="Make sure you require <span class='badge badge-outline'>daisyui</span> AFTER <span class='badge badge-outline'>@tailwindcss/typography</span> in tailwind.config.js" /></p>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ module.exports = {
|
|||
<Translate text="In the below example, I have the required colors. All other colors will be generated automatically (Like the color of button when you focus on it or the color of text on a <code>primary</code> button)." />
|
||||
|
||||
<div class="alert alert-info text-sm mb-2 max-w-3xl not-prose">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-info-content flex-shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-info-content shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
||||
<p>
|
||||
<Translate text="You can also add <a href='/docs/colors/' class='link'>optional color names</a> to have full control over all colors." />
|
||||
</p>
|
||||
|
|
|
@ -338,7 +338,7 @@
|
|||
</p>
|
||||
</div>
|
||||
<div class="flex flex-col gap-4 xl:flex-row">
|
||||
<div class="flex-shrink-0 xl:min-w-[29rem]">
|
||||
<div class="shrink-0 xl:min-w-[29rem]">
|
||||
<div class="sticky top-[5.5rem]">
|
||||
<h2 class="px-2 pb-4 text-xl font-bold">tailwind.config.js</h2>
|
||||
{#if browser}
|
||||
|
@ -597,7 +597,7 @@
|
|||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
class="stroke-info h-6 w-6 flex-shrink-0">
|
||||
class="stroke-info h-6 w-6 shrink-0">
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
|
@ -611,7 +611,7 @@
|
|||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
class="h-6 w-6 flex-shrink-0 stroke-current">
|
||||
class="h-6 w-6 shrink-0 stroke-current">
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
|
@ -623,7 +623,7 @@
|
|||
<div class="alert alert-success">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-6 w-6 flex-shrink-0 stroke-current"
|
||||
class="h-6 w-6 shrink-0 stroke-current"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24">
|
||||
<path
|
||||
|
@ -637,7 +637,7 @@
|
|||
<div class="alert alert-warning">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-6 w-6 flex-shrink-0 stroke-current"
|
||||
class="h-6 w-6 shrink-0 stroke-current"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24">
|
||||
<path
|
||||
|
@ -651,7 +651,7 @@
|
|||
<div class="alert alert-error">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-6 w-6 flex-shrink-0 stroke-current"
|
||||
class="h-6 w-6 shrink-0 stroke-current"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24">
|
||||
<path
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
import { execSync } from "child_process"
|
||||
|
||||
// available flags:
|
||||
// npm run release -- --alpha
|
||||
// npm run release -- --patch
|
||||
// npm run release -- --minor
|
||||
// npm run release -- --major
|
||||
|
||||
execSync(
|
||||
`node_modules/.bin/commit-and-tag-version${
|
||||
process.argv.includes("--alpha") ? " --skip.changelog --prerelease alpha" : ""
|
||||
}${process.argv.includes("--patch") ? " --release-as patch" : ""}${
|
||||
process.argv.includes("--minor") ? " --release-as minor" : ""
|
||||
}${process.argv.includes("--major") ? " --release-as major" : ""}`
|
||||
)
|
|
@ -3,8 +3,8 @@ const themeDefaults = require("./themeDefaults")
|
|||
|
||||
const { toGamut, interpolate, wcagContrast } = require("culori")
|
||||
|
||||
const cutNumber = (number) => (number ? +number.toFixed(6) : 0);
|
||||
const toGamutOKLCH = toGamut("oklch");
|
||||
const cutNumber = (number) => (number ? +number.toFixed(6) : 0)
|
||||
const toGamutOKLCH = toGamut("oklch")
|
||||
|
||||
module.exports = {
|
||||
isDark: (color) => {
|
||||
|
@ -32,13 +32,13 @@ module.exports = {
|
|||
convertColorFormat: function (input) {
|
||||
if (typeof input !== "object" || input === null) {
|
||||
return input
|
||||
const colorObj = toGamutOKLCH(value)
|
||||
}
|
||||
|
||||
const resultObj = {}
|
||||
|
||||
Object.entries(input).forEach(([rule, value]) => {
|
||||
if (colorNames.hasOwnProperty(rule)) {
|
||||
const colorObj = toGamutOKLCH(value)
|
||||
resultObj[colorNames[rule]] = this.colorObjToString(colorObj)
|
||||
} else {
|
||||
resultObj[rule] = value
|
||||
|
|
|
@ -433,9 +433,9 @@ module.exports = {
|
|||
"accent": "#C792E9",
|
||||
"neutral": "#162135",
|
||||
"neutral-content": "#B2CCD6",
|
||||
"base-100": "#3f495d",
|
||||
"base-200": "#2a303c",
|
||||
"base-300": "#222730",
|
||||
"base-100": "#2A303C",
|
||||
"base-200": "#242933",
|
||||
"base-300": "#20252E",
|
||||
"base-content": "#B2CCD6",
|
||||
"info": "#28ebff",
|
||||
"success": "#62efbd",
|
||||
|
|
Loading…
Reference in New Issue