@pandacss/preset-base 0.6.0 → 0.8.0
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +47 -15
- package/dist/index.mjs +47 -15
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -104,7 +104,7 @@ var conditions = {
|
|
|
104
104
|
light: " &.light, .light &",
|
|
105
105
|
osDark: "@media (prefers-color-scheme: dark)",
|
|
106
106
|
osLight: "@media (prefers-color-scheme: light)",
|
|
107
|
-
|
|
107
|
+
highContrast: "@media (forced-colors: active)",
|
|
108
108
|
lessContrast: "@media (prefers-contrast: less)",
|
|
109
109
|
moreContrast: "@media (prefers-contrast: more)",
|
|
110
110
|
ltr: "[dir=ltr] &",
|
|
@@ -608,7 +608,7 @@ var effects = {
|
|
|
608
608
|
className: "contrast",
|
|
609
609
|
transform(value) {
|
|
610
610
|
return {
|
|
611
|
-
"--contrast": `
|
|
611
|
+
"--contrast": `contrast(${value})`
|
|
612
612
|
};
|
|
613
613
|
}
|
|
614
614
|
},
|
|
@@ -712,7 +712,7 @@ var effects = {
|
|
|
712
712
|
className: "backdrop-contrast",
|
|
713
713
|
transform(value) {
|
|
714
714
|
return {
|
|
715
|
-
"--backdrop-contrast": `
|
|
715
|
+
"--backdrop-contrast": `contrast(${value})`
|
|
716
716
|
};
|
|
717
717
|
}
|
|
718
718
|
},
|
|
@@ -1250,7 +1250,8 @@ var layout = {
|
|
|
1250
1250
|
}
|
|
1251
1251
|
},
|
|
1252
1252
|
zIndex: {
|
|
1253
|
-
className: "z"
|
|
1253
|
+
className: "z",
|
|
1254
|
+
values: "zIndex"
|
|
1254
1255
|
},
|
|
1255
1256
|
boxSizing: {
|
|
1256
1257
|
className: "box"
|
|
@@ -1767,10 +1768,32 @@ var transforms = {
|
|
|
1767
1768
|
};
|
|
1768
1769
|
|
|
1769
1770
|
// src/utilities/transitions.ts
|
|
1771
|
+
var createTransition = (value) => ({
|
|
1772
|
+
transitionProperty: `var(--transition-prop, ${value})`,
|
|
1773
|
+
transitionTimingFunction: "var(--transition-easing, cubic-bezier(0.4, 0, 0.2, 1))",
|
|
1774
|
+
transitionDuration: "var(--transition-duration, 150ms)"
|
|
1775
|
+
});
|
|
1776
|
+
var transitionMap = {
|
|
1777
|
+
all: createTransition("all"),
|
|
1778
|
+
common: createTransition(
|
|
1779
|
+
"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter"
|
|
1780
|
+
),
|
|
1781
|
+
background: createTransition("background, background-color"),
|
|
1782
|
+
colors: createTransition("color, background-color, border-color, outline-color, text-decoration-color, fill, stroke"),
|
|
1783
|
+
opacity: createTransition("opacity"),
|
|
1784
|
+
shadow: createTransition("box-shadow"),
|
|
1785
|
+
transform: createTransition("transform")
|
|
1786
|
+
};
|
|
1770
1787
|
var transitions = {
|
|
1771
1788
|
transitionTimingFunction: {
|
|
1772
1789
|
className: "ease",
|
|
1773
|
-
values: "easings"
|
|
1790
|
+
values: "easings",
|
|
1791
|
+
transform(value) {
|
|
1792
|
+
return {
|
|
1793
|
+
"--transition-easing": value,
|
|
1794
|
+
transitionTimingFunction: value
|
|
1795
|
+
};
|
|
1796
|
+
}
|
|
1774
1797
|
},
|
|
1775
1798
|
transitionDelay: {
|
|
1776
1799
|
className: "delay",
|
|
@@ -1778,19 +1801,28 @@ var transitions = {
|
|
|
1778
1801
|
},
|
|
1779
1802
|
transitionDuration: {
|
|
1780
1803
|
className: "duration",
|
|
1781
|
-
values: "durations"
|
|
1804
|
+
values: "durations",
|
|
1805
|
+
transform(value) {
|
|
1806
|
+
return {
|
|
1807
|
+
"--transition-duration": value,
|
|
1808
|
+
transitionDuration: value
|
|
1809
|
+
};
|
|
1810
|
+
}
|
|
1782
1811
|
},
|
|
1783
1812
|
transitionProperty: {
|
|
1813
|
+
className: "transition-prop",
|
|
1814
|
+
transform(value) {
|
|
1815
|
+
return {
|
|
1816
|
+
"--transition-prop": value,
|
|
1817
|
+
transitionProperty: value
|
|
1818
|
+
};
|
|
1819
|
+
}
|
|
1820
|
+
},
|
|
1821
|
+
transition: {
|
|
1784
1822
|
className: "transition",
|
|
1785
|
-
values:
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
opacity: "opacity",
|
|
1789
|
-
shadow: "box-shadow",
|
|
1790
|
-
transform: "transform",
|
|
1791
|
-
base: "color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",
|
|
1792
|
-
background: "background, background-color",
|
|
1793
|
-
colors: "color, background-color, border-color, outline-color, text-decoration-color, fill, stroke"
|
|
1823
|
+
values: Object.keys(transitionMap),
|
|
1824
|
+
transform(value) {
|
|
1825
|
+
return transitionMap[value] ?? { transition: value };
|
|
1794
1826
|
}
|
|
1795
1827
|
},
|
|
1796
1828
|
animation: {
|
package/dist/index.mjs
CHANGED
|
@@ -77,7 +77,7 @@ var conditions = {
|
|
|
77
77
|
light: " &.light, .light &",
|
|
78
78
|
osDark: "@media (prefers-color-scheme: dark)",
|
|
79
79
|
osLight: "@media (prefers-color-scheme: light)",
|
|
80
|
-
|
|
80
|
+
highContrast: "@media (forced-colors: active)",
|
|
81
81
|
lessContrast: "@media (prefers-contrast: less)",
|
|
82
82
|
moreContrast: "@media (prefers-contrast: more)",
|
|
83
83
|
ltr: "[dir=ltr] &",
|
|
@@ -581,7 +581,7 @@ var effects = {
|
|
|
581
581
|
className: "contrast",
|
|
582
582
|
transform(value) {
|
|
583
583
|
return {
|
|
584
|
-
"--contrast": `
|
|
584
|
+
"--contrast": `contrast(${value})`
|
|
585
585
|
};
|
|
586
586
|
}
|
|
587
587
|
},
|
|
@@ -685,7 +685,7 @@ var effects = {
|
|
|
685
685
|
className: "backdrop-contrast",
|
|
686
686
|
transform(value) {
|
|
687
687
|
return {
|
|
688
|
-
"--backdrop-contrast": `
|
|
688
|
+
"--backdrop-contrast": `contrast(${value})`
|
|
689
689
|
};
|
|
690
690
|
}
|
|
691
691
|
},
|
|
@@ -1223,7 +1223,8 @@ var layout = {
|
|
|
1223
1223
|
}
|
|
1224
1224
|
},
|
|
1225
1225
|
zIndex: {
|
|
1226
|
-
className: "z"
|
|
1226
|
+
className: "z",
|
|
1227
|
+
values: "zIndex"
|
|
1227
1228
|
},
|
|
1228
1229
|
boxSizing: {
|
|
1229
1230
|
className: "box"
|
|
@@ -1740,10 +1741,32 @@ var transforms = {
|
|
|
1740
1741
|
};
|
|
1741
1742
|
|
|
1742
1743
|
// src/utilities/transitions.ts
|
|
1744
|
+
var createTransition = (value) => ({
|
|
1745
|
+
transitionProperty: `var(--transition-prop, ${value})`,
|
|
1746
|
+
transitionTimingFunction: "var(--transition-easing, cubic-bezier(0.4, 0, 0.2, 1))",
|
|
1747
|
+
transitionDuration: "var(--transition-duration, 150ms)"
|
|
1748
|
+
});
|
|
1749
|
+
var transitionMap = {
|
|
1750
|
+
all: createTransition("all"),
|
|
1751
|
+
common: createTransition(
|
|
1752
|
+
"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter"
|
|
1753
|
+
),
|
|
1754
|
+
background: createTransition("background, background-color"),
|
|
1755
|
+
colors: createTransition("color, background-color, border-color, outline-color, text-decoration-color, fill, stroke"),
|
|
1756
|
+
opacity: createTransition("opacity"),
|
|
1757
|
+
shadow: createTransition("box-shadow"),
|
|
1758
|
+
transform: createTransition("transform")
|
|
1759
|
+
};
|
|
1743
1760
|
var transitions = {
|
|
1744
1761
|
transitionTimingFunction: {
|
|
1745
1762
|
className: "ease",
|
|
1746
|
-
values: "easings"
|
|
1763
|
+
values: "easings",
|
|
1764
|
+
transform(value) {
|
|
1765
|
+
return {
|
|
1766
|
+
"--transition-easing": value,
|
|
1767
|
+
transitionTimingFunction: value
|
|
1768
|
+
};
|
|
1769
|
+
}
|
|
1747
1770
|
},
|
|
1748
1771
|
transitionDelay: {
|
|
1749
1772
|
className: "delay",
|
|
@@ -1751,19 +1774,28 @@ var transitions = {
|
|
|
1751
1774
|
},
|
|
1752
1775
|
transitionDuration: {
|
|
1753
1776
|
className: "duration",
|
|
1754
|
-
values: "durations"
|
|
1777
|
+
values: "durations",
|
|
1778
|
+
transform(value) {
|
|
1779
|
+
return {
|
|
1780
|
+
"--transition-duration": value,
|
|
1781
|
+
transitionDuration: value
|
|
1782
|
+
};
|
|
1783
|
+
}
|
|
1755
1784
|
},
|
|
1756
1785
|
transitionProperty: {
|
|
1786
|
+
className: "transition-prop",
|
|
1787
|
+
transform(value) {
|
|
1788
|
+
return {
|
|
1789
|
+
"--transition-prop": value,
|
|
1790
|
+
transitionProperty: value
|
|
1791
|
+
};
|
|
1792
|
+
}
|
|
1793
|
+
},
|
|
1794
|
+
transition: {
|
|
1757
1795
|
className: "transition",
|
|
1758
|
-
values:
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
opacity: "opacity",
|
|
1762
|
-
shadow: "box-shadow",
|
|
1763
|
-
transform: "transform",
|
|
1764
|
-
base: "color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",
|
|
1765
|
-
background: "background, background-color",
|
|
1766
|
-
colors: "color, background-color, border-color, outline-color, text-decoration-color, fill, stroke"
|
|
1796
|
+
values: Object.keys(transitionMap),
|
|
1797
|
+
transform(value) {
|
|
1798
|
+
return transitionMap[value] ?? { transition: value };
|
|
1767
1799
|
}
|
|
1768
1800
|
},
|
|
1769
1801
|
animation: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/preset-base",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "The base preset for Panda CSS that contains the conditions and utilities",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"dist"
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@pandacss/types": "0.
|
|
17
|
+
"@pandacss/types": "0.8.0"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"build": "tsup src/index.ts --format=esm,cjs --dts",
|