@pandacss/preset-base 1.7.1 → 1.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +25 -11
- package/dist/index.mjs +25 -11
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1619,6 +1619,7 @@ var linearGradientDirectionMap = /* @__PURE__ */ new Map([
|
|
|
1619
1619
|
["to-l", "to left"],
|
|
1620
1620
|
["to-tl", "to top left"]
|
|
1621
1621
|
]);
|
|
1622
|
+
var isGradientShortcut = (value) => linearGradientDirectionMap.has(value);
|
|
1622
1623
|
var linearGradientValues = (theme) => {
|
|
1623
1624
|
return {
|
|
1624
1625
|
...theme("gradients"),
|
|
@@ -1633,14 +1634,17 @@ var backgroundGradients = {
|
|
|
1633
1634
|
className: "bg-grad",
|
|
1634
1635
|
group: "Background Gradient",
|
|
1635
1636
|
values: linearGradientValues,
|
|
1636
|
-
transform(
|
|
1637
|
-
const tokenValue = token(`gradients.${
|
|
1637
|
+
transform(value, { raw, token }) {
|
|
1638
|
+
const tokenValue = token(`gradients.${raw}`);
|
|
1638
1639
|
if (tokenValue) {
|
|
1639
1640
|
return { backgroundImage: tokenValue };
|
|
1640
1641
|
}
|
|
1642
|
+
if (!isGradientShortcut(raw)) {
|
|
1643
|
+
return { backgroundImage: value };
|
|
1644
|
+
}
|
|
1641
1645
|
return {
|
|
1642
1646
|
"--gradient-stops": gradientStops,
|
|
1643
|
-
"--gradient-position": linearGradientDirectionMap.get(
|
|
1647
|
+
"--gradient-position": linearGradientDirectionMap.get(raw),
|
|
1644
1648
|
backgroundImage: `linear-gradient(var(--gradient-stops))`
|
|
1645
1649
|
};
|
|
1646
1650
|
}
|
|
@@ -1650,14 +1654,17 @@ var backgroundGradients = {
|
|
|
1650
1654
|
className: "bg-linear",
|
|
1651
1655
|
group: "Background Gradient",
|
|
1652
1656
|
values: linearGradientValues,
|
|
1653
|
-
transform(
|
|
1654
|
-
const tokenValue = token(`gradients.${
|
|
1657
|
+
transform(value, { raw, token }) {
|
|
1658
|
+
const tokenValue = token(`gradients.${raw}`);
|
|
1655
1659
|
if (tokenValue) {
|
|
1656
1660
|
return { backgroundImage: tokenValue };
|
|
1657
1661
|
}
|
|
1662
|
+
if (!isGradientShortcut(raw)) {
|
|
1663
|
+
return { backgroundImage: value };
|
|
1664
|
+
}
|
|
1658
1665
|
return {
|
|
1659
1666
|
"--gradient-stops": gradientStops,
|
|
1660
|
-
"--gradient-position": linearGradientDirectionMap.get(
|
|
1667
|
+
"--gradient-position": linearGradientDirectionMap.get(raw),
|
|
1661
1668
|
backgroundImage: `linear-gradient(var(--gradient-stops))`
|
|
1662
1669
|
};
|
|
1663
1670
|
}
|
|
@@ -1667,8 +1674,8 @@ var backgroundGradients = {
|
|
|
1667
1674
|
className: "bg-radial",
|
|
1668
1675
|
group: "Background Gradient",
|
|
1669
1676
|
values: "gradients",
|
|
1670
|
-
transform(
|
|
1671
|
-
const tokenValue = token(`gradients.${
|
|
1677
|
+
transform(value, { raw, token }) {
|
|
1678
|
+
const tokenValue = token(`gradients.${raw}`);
|
|
1672
1679
|
if (tokenValue) {
|
|
1673
1680
|
return { backgroundImage: tokenValue };
|
|
1674
1681
|
}
|
|
@@ -1695,8 +1702,8 @@ var backgroundGradients = {
|
|
|
1695
1702
|
className: "txt-grad",
|
|
1696
1703
|
group: "Background Gradient",
|
|
1697
1704
|
values: linearGradientValues,
|
|
1698
|
-
transform(
|
|
1699
|
-
const tokenValue = token(`gradients.${
|
|
1705
|
+
transform(value, { raw, token }) {
|
|
1706
|
+
const tokenValue = token(`gradients.${raw}`);
|
|
1700
1707
|
if (tokenValue) {
|
|
1701
1708
|
return {
|
|
1702
1709
|
backgroundImage: tokenValue,
|
|
@@ -1704,9 +1711,16 @@ var backgroundGradients = {
|
|
|
1704
1711
|
color: "transparent"
|
|
1705
1712
|
};
|
|
1706
1713
|
}
|
|
1714
|
+
if (!isGradientShortcut(raw)) {
|
|
1715
|
+
return {
|
|
1716
|
+
backgroundImage: value,
|
|
1717
|
+
WebkitBackgroundClip: "text",
|
|
1718
|
+
color: "transparent"
|
|
1719
|
+
};
|
|
1720
|
+
}
|
|
1707
1721
|
return {
|
|
1708
1722
|
"--gradient-stops": gradientStops,
|
|
1709
|
-
"--gradient-position": linearGradientDirectionMap.get(
|
|
1723
|
+
"--gradient-position": linearGradientDirectionMap.get(raw),
|
|
1710
1724
|
backgroundImage: `linear-gradient(var(--gradient-stops))`,
|
|
1711
1725
|
WebkitBackgroundClip: "text",
|
|
1712
1726
|
color: "transparent"
|
package/dist/index.mjs
CHANGED
|
@@ -1592,6 +1592,7 @@ var linearGradientDirectionMap = /* @__PURE__ */ new Map([
|
|
|
1592
1592
|
["to-l", "to left"],
|
|
1593
1593
|
["to-tl", "to top left"]
|
|
1594
1594
|
]);
|
|
1595
|
+
var isGradientShortcut = (value) => linearGradientDirectionMap.has(value);
|
|
1595
1596
|
var linearGradientValues = (theme) => {
|
|
1596
1597
|
return {
|
|
1597
1598
|
...theme("gradients"),
|
|
@@ -1606,14 +1607,17 @@ var backgroundGradients = {
|
|
|
1606
1607
|
className: "bg-grad",
|
|
1607
1608
|
group: "Background Gradient",
|
|
1608
1609
|
values: linearGradientValues,
|
|
1609
|
-
transform(
|
|
1610
|
-
const tokenValue = token(`gradients.${
|
|
1610
|
+
transform(value, { raw, token }) {
|
|
1611
|
+
const tokenValue = token(`gradients.${raw}`);
|
|
1611
1612
|
if (tokenValue) {
|
|
1612
1613
|
return { backgroundImage: tokenValue };
|
|
1613
1614
|
}
|
|
1615
|
+
if (!isGradientShortcut(raw)) {
|
|
1616
|
+
return { backgroundImage: value };
|
|
1617
|
+
}
|
|
1614
1618
|
return {
|
|
1615
1619
|
"--gradient-stops": gradientStops,
|
|
1616
|
-
"--gradient-position": linearGradientDirectionMap.get(
|
|
1620
|
+
"--gradient-position": linearGradientDirectionMap.get(raw),
|
|
1617
1621
|
backgroundImage: `linear-gradient(var(--gradient-stops))`
|
|
1618
1622
|
};
|
|
1619
1623
|
}
|
|
@@ -1623,14 +1627,17 @@ var backgroundGradients = {
|
|
|
1623
1627
|
className: "bg-linear",
|
|
1624
1628
|
group: "Background Gradient",
|
|
1625
1629
|
values: linearGradientValues,
|
|
1626
|
-
transform(
|
|
1627
|
-
const tokenValue = token(`gradients.${
|
|
1630
|
+
transform(value, { raw, token }) {
|
|
1631
|
+
const tokenValue = token(`gradients.${raw}`);
|
|
1628
1632
|
if (tokenValue) {
|
|
1629
1633
|
return { backgroundImage: tokenValue };
|
|
1630
1634
|
}
|
|
1635
|
+
if (!isGradientShortcut(raw)) {
|
|
1636
|
+
return { backgroundImage: value };
|
|
1637
|
+
}
|
|
1631
1638
|
return {
|
|
1632
1639
|
"--gradient-stops": gradientStops,
|
|
1633
|
-
"--gradient-position": linearGradientDirectionMap.get(
|
|
1640
|
+
"--gradient-position": linearGradientDirectionMap.get(raw),
|
|
1634
1641
|
backgroundImage: `linear-gradient(var(--gradient-stops))`
|
|
1635
1642
|
};
|
|
1636
1643
|
}
|
|
@@ -1640,8 +1647,8 @@ var backgroundGradients = {
|
|
|
1640
1647
|
className: "bg-radial",
|
|
1641
1648
|
group: "Background Gradient",
|
|
1642
1649
|
values: "gradients",
|
|
1643
|
-
transform(
|
|
1644
|
-
const tokenValue = token(`gradients.${
|
|
1650
|
+
transform(value, { raw, token }) {
|
|
1651
|
+
const tokenValue = token(`gradients.${raw}`);
|
|
1645
1652
|
if (tokenValue) {
|
|
1646
1653
|
return { backgroundImage: tokenValue };
|
|
1647
1654
|
}
|
|
@@ -1668,8 +1675,8 @@ var backgroundGradients = {
|
|
|
1668
1675
|
className: "txt-grad",
|
|
1669
1676
|
group: "Background Gradient",
|
|
1670
1677
|
values: linearGradientValues,
|
|
1671
|
-
transform(
|
|
1672
|
-
const tokenValue = token(`gradients.${
|
|
1678
|
+
transform(value, { raw, token }) {
|
|
1679
|
+
const tokenValue = token(`gradients.${raw}`);
|
|
1673
1680
|
if (tokenValue) {
|
|
1674
1681
|
return {
|
|
1675
1682
|
backgroundImage: tokenValue,
|
|
@@ -1677,9 +1684,16 @@ var backgroundGradients = {
|
|
|
1677
1684
|
color: "transparent"
|
|
1678
1685
|
};
|
|
1679
1686
|
}
|
|
1687
|
+
if (!isGradientShortcut(raw)) {
|
|
1688
|
+
return {
|
|
1689
|
+
backgroundImage: value,
|
|
1690
|
+
WebkitBackgroundClip: "text",
|
|
1691
|
+
color: "transparent"
|
|
1692
|
+
};
|
|
1693
|
+
}
|
|
1680
1694
|
return {
|
|
1681
1695
|
"--gradient-stops": gradientStops,
|
|
1682
|
-
"--gradient-position": linearGradientDirectionMap.get(
|
|
1696
|
+
"--gradient-position": linearGradientDirectionMap.get(raw),
|
|
1683
1697
|
backgroundImage: `linear-gradient(var(--gradient-stops))`,
|
|
1684
1698
|
WebkitBackgroundClip: "text",
|
|
1685
1699
|
color: "transparent"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/preset-base",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.3",
|
|
4
4
|
"description": "The base preset for Panda CSS that contains the conditions and utilities",
|
|
5
5
|
"author": "Segun Adebayo <joseshegs@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dist"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@pandacss/types": "1.7.
|
|
36
|
+
"@pandacss/types": "1.7.3"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "tsup src/index.ts --format=esm,cjs --dts",
|