daisyui 2.3.7-alpha.0 → 2.3.7-alpha.1

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.
Files changed (2) hide show
  1. package/package.json +7 -7
  2. package/src/index.js +17 -27
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "daisyui",
3
- "version": "2.3.7-alpha.0",
3
+ "version": "2.3.7-alpha.1",
4
4
  "description": "daisyUI - Tailwind CSS Components",
5
5
  "author": "Pouya Saadeghi",
6
6
  "license": "MIT",
@@ -73,12 +73,12 @@
73
73
  },
74
74
  "devDependencies": {
75
75
  "@parcel/css-cli": "^1.5.0",
76
- "autoprefixer": "10.4.2",
77
- "postcss-cli": "9.1.0",
78
- "postcss-import": "14.0.2",
79
- "postcss-nested": "5.0.6",
76
+ "autoprefixer": "10.0.4",
77
+ "postcss-cli": "8.3.0",
78
+ "postcss-import": "13.0.0",
79
+ "postcss-nested": "5.0.1",
80
80
  "prejss-cli": "0.3.3",
81
- "rtlcss": "3.5.0"
81
+ "rtlcss": "3.0.0"
82
82
  },
83
83
  "dependencies": {
84
84
  "color": "^4.2",
@@ -90,4 +90,4 @@
90
90
  "peerDependencies": {
91
91
  "autoprefixer": "^10.0.2"
92
92
  }
93
- }
93
+ }
package/src/index.js CHANGED
@@ -10,6 +10,8 @@ let utilitiesUnstyled = require("../dist/utilities-unstyled");
10
10
  let utilitiesStyled = require("../dist/utilities-styled");
11
11
  const themes = require("./colors/themes");
12
12
  const colorFunctions = require("./colors/functions");
13
+ const postcssJs = require('postcss-js');
14
+ // const postcssPrefix = require('postcss-prefixer');
13
15
 
14
16
  const mainFunction = ({ addBase, addComponents, addUtilities, config }) => {
15
17
  let diasyuiIncludedItems = [];
@@ -63,24 +65,12 @@ const mainFunction = ({ addBase, addComponents, addUtilities, config }) => {
63
65
  }
64
66
 
65
67
  // add prefix to class names if specified
66
- const prefix = config("daisyui.prefix")
67
- let postcssJs, postcssPrefix
68
+ const prefix = config('daisyui.prefix');
68
69
  if (prefix) {
69
- try {
70
- postcssJs = require("postcss-js")
71
- postcssPrefix = require("postcss-prefixer")
72
- } catch (error) {
73
- if (logs) {
74
- console.error(`Error occurred and prevent applying the "prefix" option:`, error)
75
- }
76
- }
77
- }
78
- const shouldApplyPrefix = prefix && postcssPrefix && postcssJs;
79
- if (shouldApplyPrefix) {
80
- file = postcssJs.sync(postcssPrefix({
81
- prefix: prefix,
82
- ignore: []
83
- }))(file)
70
+ // file = postcssJs.sync(postcssPrefix({
71
+ // prefix: prefix,
72
+ // ignore: []
73
+ // }))(file)
84
74
  }
85
75
 
86
76
  addComponents(file);
@@ -93,18 +83,18 @@ const mainFunction = ({ addBase, addComponents, addUtilities, config }) => {
93
83
  // inject @utilities style needed by components
94
84
  if (config("daisyui.utils") != false) {
95
85
  addComponents(utilities, { variants: ["responsive"] });
96
- if (shouldApplyPrefix) {
97
- utilitiesUnstyled = postcssJs.sync(postcssPrefix({
98
- prefix: prefix,
99
- ignore: []
100
- }))(utilitiesUnstyled)
86
+ if (prefix) {
87
+ // utilitiesUnstyled = postcssJs.sync(postcssPrefix({
88
+ // prefix: prefix,
89
+ // ignore: []
90
+ // }))(utilitiesUnstyled)
101
91
  }
102
92
  addComponents(utilitiesUnstyled, { variants: ["responsive"] });
103
- if (shouldApplyPrefix) {
104
- utilitiesStyled = postcssJs.sync(postcssPrefix({
105
- prefix: prefix,
106
- ignore: []
107
- }))(utilitiesStyled)
93
+ if (prefix) {
94
+ // utilitiesStyled = postcssJs.sync(postcssPrefix({
95
+ // prefix: prefix,
96
+ // ignore: []
97
+ // }))(utilitiesStyled)
108
98
  }
109
99
  addComponents(utilitiesStyled, { variants: ["responsive"] });
110
100
  diasyuiIncludedItems.push("utilities");