tailwind-to-style 2.6.2 → 2.6.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.browser.js +29 -28
- package/dist/index.cjs.js +29 -28
- package/dist/index.esm.js +2097 -2342
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +2 -1
- package/dist/index.d.ts +0 -2
package/dist/index.browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tailwind-to-style v2.6.
|
|
2
|
+
* tailwind-to-style v2.6.3
|
|
3
3
|
* Convert tailwind classes to inline style
|
|
4
4
|
*
|
|
5
5
|
* @author Bigetion
|
|
@@ -5832,10 +5832,10 @@ var tailwindToStyle = (function (exports) {
|
|
|
5832
5832
|
return null;
|
|
5833
5833
|
}
|
|
5834
5834
|
|
|
5835
|
-
/**
|
|
5836
|
-
* Resolve all CSS custom properties (var) in a CSS string and output only clear CSS (no custom property)
|
|
5837
|
-
* @param {string} cssString
|
|
5838
|
-
* @returns {string} e.g. 'color: rgba(255,255,255,1); background: #fff;'
|
|
5835
|
+
/**
|
|
5836
|
+
* Resolve all CSS custom properties (var) in a CSS string and output only clear CSS (no custom property)
|
|
5837
|
+
* @param {string} cssString
|
|
5838
|
+
* @returns {string} e.g. 'color: rgba(255,255,255,1); background: #fff;'
|
|
5839
5839
|
*/
|
|
5840
5840
|
function resolveCssToClearCss(cssString) {
|
|
5841
5841
|
const customVars = {};
|
|
@@ -6065,11 +6065,11 @@ var tailwindToStyle = (function (exports) {
|
|
|
6065
6065
|
};
|
|
6066
6066
|
}
|
|
6067
6067
|
|
|
6068
|
-
/**
|
|
6069
|
-
* Mengkonversi string kelas Tailwind menjadi inline styles CSS atau objek JSON
|
|
6070
|
-
* @param {string} classNames - String berisi kelas Tailwind yang akan dikonversi
|
|
6071
|
-
* @param {boolean} convertToJson - Jika true, hasil akan menjadi objek JSON, jika false menjadi string CSS
|
|
6072
|
-
* @returns {string|Object} String CSS inline atau objek style JSON
|
|
6068
|
+
/**
|
|
6069
|
+
* Mengkonversi string kelas Tailwind menjadi inline styles CSS atau objek JSON
|
|
6070
|
+
* @param {string} classNames - String berisi kelas Tailwind yang akan dikonversi
|
|
6071
|
+
* @param {boolean} convertToJson - Jika true, hasil akan menjadi objek JSON, jika false menjadi string CSS
|
|
6072
|
+
* @returns {string|Object} String CSS inline atau objek style JSON
|
|
6073
6073
|
*/
|
|
6074
6074
|
function tws(classNames, convertToJson) {
|
|
6075
6075
|
if ([!classNames, typeof classNames !== "string", classNames.trim() === ""].includes(true)) {
|
|
@@ -6111,12 +6111,12 @@ var tailwindToStyle = (function (exports) {
|
|
|
6111
6111
|
return cssResult;
|
|
6112
6112
|
}
|
|
6113
6113
|
|
|
6114
|
-
/**
|
|
6115
|
-
* Menghasilkan string CSS dari objek style dengan sintaks mirip SCSS
|
|
6116
|
-
* Mendukung nested selectors, state variants, responsive variants, dan @css directives
|
|
6117
|
-
* @param {Object} obj - Objek dengan format style mirip SCSS
|
|
6118
|
-
* @param {Object} [options] - Opsi tambahan, misal { inject: true/false }
|
|
6119
|
-
* @returns {string} String CSS yang dihasilkan
|
|
6114
|
+
/**
|
|
6115
|
+
* Menghasilkan string CSS dari objek style dengan sintaks mirip SCSS
|
|
6116
|
+
* Mendukung nested selectors, state variants, responsive variants, dan @css directives
|
|
6117
|
+
* @param {Object} obj - Objek dengan format style mirip SCSS
|
|
6118
|
+
* @param {Object} [options] - Opsi tambahan, misal { inject: true/false }
|
|
6119
|
+
* @returns {string} String CSS yang dihasilkan
|
|
6120
6120
|
*/
|
|
6121
6121
|
function twsx(obj, options = {}) {
|
|
6122
6122
|
if (!obj || typeof obj !== "object") {
|
|
@@ -6277,9 +6277,10 @@ var tailwindToStyle = (function (exports) {
|
|
|
6277
6277
|
}
|
|
6278
6278
|
let result;
|
|
6279
6279
|
if (selector.includes("@css")) {
|
|
6280
|
+
var _parts$;
|
|
6280
6281
|
const parts = selector.split("@css");
|
|
6281
6282
|
const baseSelector = parts[0].trim();
|
|
6282
|
-
const cssProperty = parts[1] ?
|
|
6283
|
+
const cssProperty = (_parts$ = parts[1]) === null || _parts$ === void 0 ? void 0 : _parts$.trim();
|
|
6283
6284
|
result = {
|
|
6284
6285
|
baseSelector,
|
|
6285
6286
|
cssProperty
|
|
@@ -6419,20 +6420,20 @@ var tailwindToStyle = (function (exports) {
|
|
|
6419
6420
|
}
|
|
6420
6421
|
|
|
6421
6422
|
// Daftarkan versi debounced dari fungsi-fungsi export
|
|
6422
|
-
/**
|
|
6423
|
-
* Versi debounced dari fungsi tws
|
|
6424
|
-
* Membantu mengoptimalkan performa ketika memanggil tws berulang kali
|
|
6425
|
-
* @param {string} classNames - String berisi kelas Tailwind yang akan dikonversi
|
|
6426
|
-
* @param {boolean} convertToJson - Jika true, hasil akan menjadi objek JSON, jika false menjadi string CSS
|
|
6427
|
-
* @returns {string|Object} String CSS inline atau objek style JSON
|
|
6423
|
+
/**
|
|
6424
|
+
* Versi debounced dari fungsi tws
|
|
6425
|
+
* Membantu mengoptimalkan performa ketika memanggil tws berulang kali
|
|
6426
|
+
* @param {string} classNames - String berisi kelas Tailwind yang akan dikonversi
|
|
6427
|
+
* @param {boolean} convertToJson - Jika true, hasil akan menjadi objek JSON, jika false menjadi string CSS
|
|
6428
|
+
* @returns {string|Object} String CSS inline atau objek style JSON
|
|
6428
6429
|
*/
|
|
6429
6430
|
const debouncedTws = debounce(tws);
|
|
6430
6431
|
|
|
6431
|
-
/**
|
|
6432
|
-
* Versi debounced dari fungsi twsx
|
|
6433
|
-
* Membantu mengoptimalkan performa ketika memanggil twsx berulang kali
|
|
6434
|
-
* @param {Object} obj - Objek dengan format style mirip SCSS
|
|
6435
|
-
* @returns {string} String CSS yang dihasilkan
|
|
6432
|
+
/**
|
|
6433
|
+
* Versi debounced dari fungsi twsx
|
|
6434
|
+
* Membantu mengoptimalkan performa ketika memanggil twsx berulang kali
|
|
6435
|
+
* @param {Object} obj - Objek dengan format style mirip SCSS
|
|
6436
|
+
* @returns {string} String CSS yang dihasilkan
|
|
6436
6437
|
*/
|
|
6437
6438
|
const debouncedTwsx = debounce(twsx);
|
|
6438
6439
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tailwind-to-style v2.6.
|
|
2
|
+
* tailwind-to-style v2.6.3
|
|
3
3
|
* Convert tailwind classes to inline style
|
|
4
4
|
*
|
|
5
5
|
* @author Bigetion
|
|
@@ -5833,10 +5833,10 @@ function parseCustomClassWithPatterns(className) {
|
|
|
5833
5833
|
return null;
|
|
5834
5834
|
}
|
|
5835
5835
|
|
|
5836
|
-
/**
|
|
5837
|
-
* Resolve all CSS custom properties (var) in a CSS string and output only clear CSS (no custom property)
|
|
5838
|
-
* @param {string} cssString
|
|
5839
|
-
* @returns {string} e.g. 'color: rgba(255,255,255,1); background: #fff;'
|
|
5836
|
+
/**
|
|
5837
|
+
* Resolve all CSS custom properties (var) in a CSS string and output only clear CSS (no custom property)
|
|
5838
|
+
* @param {string} cssString
|
|
5839
|
+
* @returns {string} e.g. 'color: rgba(255,255,255,1); background: #fff;'
|
|
5840
5840
|
*/
|
|
5841
5841
|
function resolveCssToClearCss(cssString) {
|
|
5842
5842
|
const customVars = {};
|
|
@@ -6066,11 +6066,11 @@ function debounce(func, wait = 100) {
|
|
|
6066
6066
|
};
|
|
6067
6067
|
}
|
|
6068
6068
|
|
|
6069
|
-
/**
|
|
6070
|
-
* Mengkonversi string kelas Tailwind menjadi inline styles CSS atau objek JSON
|
|
6071
|
-
* @param {string} classNames - String berisi kelas Tailwind yang akan dikonversi
|
|
6072
|
-
* @param {boolean} convertToJson - Jika true, hasil akan menjadi objek JSON, jika false menjadi string CSS
|
|
6073
|
-
* @returns {string|Object} String CSS inline atau objek style JSON
|
|
6069
|
+
/**
|
|
6070
|
+
* Mengkonversi string kelas Tailwind menjadi inline styles CSS atau objek JSON
|
|
6071
|
+
* @param {string} classNames - String berisi kelas Tailwind yang akan dikonversi
|
|
6072
|
+
* @param {boolean} convertToJson - Jika true, hasil akan menjadi objek JSON, jika false menjadi string CSS
|
|
6073
|
+
* @returns {string|Object} String CSS inline atau objek style JSON
|
|
6074
6074
|
*/
|
|
6075
6075
|
function tws(classNames, convertToJson) {
|
|
6076
6076
|
if ([!classNames, typeof classNames !== "string", classNames.trim() === ""].includes(true)) {
|
|
@@ -6112,12 +6112,12 @@ function tws(classNames, convertToJson) {
|
|
|
6112
6112
|
return cssResult;
|
|
6113
6113
|
}
|
|
6114
6114
|
|
|
6115
|
-
/**
|
|
6116
|
-
* Menghasilkan string CSS dari objek style dengan sintaks mirip SCSS
|
|
6117
|
-
* Mendukung nested selectors, state variants, responsive variants, dan @css directives
|
|
6118
|
-
* @param {Object} obj - Objek dengan format style mirip SCSS
|
|
6119
|
-
* @param {Object} [options] - Opsi tambahan, misal { inject: true/false }
|
|
6120
|
-
* @returns {string} String CSS yang dihasilkan
|
|
6115
|
+
/**
|
|
6116
|
+
* Menghasilkan string CSS dari objek style dengan sintaks mirip SCSS
|
|
6117
|
+
* Mendukung nested selectors, state variants, responsive variants, dan @css directives
|
|
6118
|
+
* @param {Object} obj - Objek dengan format style mirip SCSS
|
|
6119
|
+
* @param {Object} [options] - Opsi tambahan, misal { inject: true/false }
|
|
6120
|
+
* @returns {string} String CSS yang dihasilkan
|
|
6121
6121
|
*/
|
|
6122
6122
|
function twsx(obj, options = {}) {
|
|
6123
6123
|
if (!obj || typeof obj !== "object") {
|
|
@@ -6278,9 +6278,10 @@ function twsx(obj, options = {}) {
|
|
|
6278
6278
|
}
|
|
6279
6279
|
let result;
|
|
6280
6280
|
if (selector.includes("@css")) {
|
|
6281
|
+
var _parts$;
|
|
6281
6282
|
const parts = selector.split("@css");
|
|
6282
6283
|
const baseSelector = parts[0].trim();
|
|
6283
|
-
const cssProperty = parts[1] ?
|
|
6284
|
+
const cssProperty = (_parts$ = parts[1]) === null || _parts$ === void 0 ? void 0 : _parts$.trim();
|
|
6284
6285
|
result = {
|
|
6285
6286
|
baseSelector,
|
|
6286
6287
|
cssProperty
|
|
@@ -6420,20 +6421,20 @@ function autoInjectCss(cssString) {
|
|
|
6420
6421
|
}
|
|
6421
6422
|
|
|
6422
6423
|
// Daftarkan versi debounced dari fungsi-fungsi export
|
|
6423
|
-
/**
|
|
6424
|
-
* Versi debounced dari fungsi tws
|
|
6425
|
-
* Membantu mengoptimalkan performa ketika memanggil tws berulang kali
|
|
6426
|
-
* @param {string} classNames - String berisi kelas Tailwind yang akan dikonversi
|
|
6427
|
-
* @param {boolean} convertToJson - Jika true, hasil akan menjadi objek JSON, jika false menjadi string CSS
|
|
6428
|
-
* @returns {string|Object} String CSS inline atau objek style JSON
|
|
6424
|
+
/**
|
|
6425
|
+
* Versi debounced dari fungsi tws
|
|
6426
|
+
* Membantu mengoptimalkan performa ketika memanggil tws berulang kali
|
|
6427
|
+
* @param {string} classNames - String berisi kelas Tailwind yang akan dikonversi
|
|
6428
|
+
* @param {boolean} convertToJson - Jika true, hasil akan menjadi objek JSON, jika false menjadi string CSS
|
|
6429
|
+
* @returns {string|Object} String CSS inline atau objek style JSON
|
|
6429
6430
|
*/
|
|
6430
6431
|
const debouncedTws = debounce(tws);
|
|
6431
6432
|
|
|
6432
|
-
/**
|
|
6433
|
-
* Versi debounced dari fungsi twsx
|
|
6434
|
-
* Membantu mengoptimalkan performa ketika memanggil twsx berulang kali
|
|
6435
|
-
* @param {Object} obj - Objek dengan format style mirip SCSS
|
|
6436
|
-
* @returns {string} String CSS yang dihasilkan
|
|
6433
|
+
/**
|
|
6434
|
+
* Versi debounced dari fungsi twsx
|
|
6435
|
+
* Membantu mengoptimalkan performa ketika memanggil twsx berulang kali
|
|
6436
|
+
* @param {Object} obj - Objek dengan format style mirip SCSS
|
|
6437
|
+
* @returns {string} String CSS yang dihasilkan
|
|
6437
6438
|
*/
|
|
6438
6439
|
const debouncedTwsx = debounce(twsx);
|
|
6439
6440
|
|