@salla.sa/twilight-tailwind-theme 1.0.0 → 1.0.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.
- package/index.js +6 -10
- package/package.json +2 -2
- package/readme.md +47 -0
- package/safe-list-css.txt +1 -4
- package/utilities.json +1 -1
package/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
const path = require('path');
|
|
1
|
+
import * as componentsClasses from './utilities.json';
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
let tailwind=require('tailwindcss/plugin').withOptions(() => {
|
|
6
4
|
return function({addUtilities}) {
|
|
7
5
|
addUtilities({
|
|
8
6
|
// TODO :: find if there are used and defined them here if its.
|
|
@@ -10,11 +8,6 @@ module.exports = plugin.withOptions(() => {
|
|
|
10
8
|
'.text-md': {},
|
|
11
9
|
'.items-top': {},
|
|
12
10
|
'.error': {},
|
|
13
|
-
|
|
14
|
-
// wrapper class
|
|
15
|
-
// todo :: rename it with the statnder
|
|
16
|
-
'.results__item': {},
|
|
17
|
-
|
|
18
11
|
'.search-box': {},
|
|
19
12
|
'.spinner-loader-wrap': {}
|
|
20
13
|
});
|
|
@@ -30,6 +23,9 @@ module.exports = plugin.withOptions(() => {
|
|
|
30
23
|
}
|
|
31
24
|
});
|
|
32
25
|
|
|
33
|
-
addUtilities(
|
|
26
|
+
addUtilities(componentsClasses);
|
|
34
27
|
};
|
|
35
28
|
});
|
|
29
|
+
export {
|
|
30
|
+
tailwind
|
|
31
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salla.sa/twilight-tailwind-theme",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Salla twilight",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"homepage": "https://salla.dev",
|
|
14
14
|
"scripts": {
|
|
15
15
|
"generate": "node scripts/generator.js",
|
|
16
|
-
"publish": "npm publish --access
|
|
16
|
+
"publish": "npm version patch && generate && npm publish --access private"
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
"index.js",
|
package/readme.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
## Usage
|
|
2
|
+
|
|
3
|
+
1. add the plugin to tailwaind plugins in `tailwind.config.js` file
|
|
4
|
+
```js
|
|
5
|
+
plugins: [
|
|
6
|
+
...
|
|
7
|
+
require('@salla.sa/twilight-tailwind-theme'),
|
|
8
|
+
....
|
|
9
|
+
]
|
|
10
|
+
```
|
|
11
|
+
2. (Optional) in case you are enabling the `purge` you should add the safe list css class to purge settings in `tailwind.config.js` file
|
|
12
|
+
|
|
13
|
+
### JIT Enabled
|
|
14
|
+
|
|
15
|
+
because of https://tailwindcss.com/docs/just-in-time-mode#limitations
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
purge : {
|
|
19
|
+
enabled: true,
|
|
20
|
+
content: ["views/**/*.twig", "node_modules/@salla.sa/twilight-tailwind-theme/safe-list-css.txt"]
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### JIT Disabled
|
|
25
|
+
|
|
26
|
+
You can easly add `/^s-.*/` to safelist
|
|
27
|
+
```js
|
|
28
|
+
purge : {
|
|
29
|
+
enabled: true,
|
|
30
|
+
content: ["views/**/*.twig"],
|
|
31
|
+
options: {
|
|
32
|
+
safelist: [/^s-.*/]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Add A new compnoent
|
|
38
|
+
|
|
39
|
+
1. create a new folder with the name of compnenet
|
|
40
|
+
2. create a `utilities.json` file with list of class as json
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
## Publish
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
npm run publish
|
|
47
|
+
```
|
package/safe-list-css.txt
CHANGED
|
@@ -11,12 +11,9 @@ s-search-modal-spinner
|
|
|
11
11
|
s-search-modal-spinner-loader
|
|
12
12
|
s-search-modal-search-results
|
|
13
13
|
s-search-modal-no-results
|
|
14
|
-
s-search-modal-results-item
|
|
15
14
|
s-search-modal-product
|
|
16
15
|
s-search-modal-product-image-container
|
|
17
16
|
s-search-modal-product-image
|
|
18
17
|
s-search-modal-product-details
|
|
19
18
|
s-search-modal-product-title
|
|
20
|
-
s-search-modal-product-
|
|
21
|
-
s-search-modal-product-price
|
|
22
|
-
s-search-modal-product-price-h4
|
|
19
|
+
s-search-modal-product-price
|
package/utilities.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{".s-search-modal-search-button-icon":{"@apply bg-gray-bg2 hover:bg-gray-150 dark:hover:bg-opacity-10 transition duration-300 mx-3 text-sm rounded-full w-9 h-9":{}},".s-search-modal-container":{"@apply fixed inset-0 z-50 flex items-top justify-center overflow-auto items-top":{}},".s-search-modal-wrapper":{"@apply bg-transparent w-full":{}},".s-search-modal-inner":{"@apply mx-auto w-11/12 lg:w-6/12":{}},".s-search-modal-search-box-container":{"@apply mt-36 search-box anime-item":{}},".s-search-modal-search-box-inner":{"@apply relative bg-white rounded-tiny border border-border-color":{}},".s-search-modal-search-box-inner-open":{"@apply relative bg-white rounded-tiny border border-border-color rounded-b-none":{}},".s-search-modal-input":{"@apply anime-item bg-transparent border-0 form-input w-full ps-10 pt-6 pb-7 rounded-tiny text-gray-600":{}},".s-search-modal-search-icon":{"@apply anime-item flex justify-end items-center absolute top-4 start-4 text-md text-gray-text":{}},".s-search-modal-spinner":{"@apply spinner-loader-wrap absolute top-1/2 transform -translate-y-1/2 start-4 w-4 h-4":{}},".s-search-modal-spinner-loader":{"@apply block spinner-loader w-4 h-4 animate-spin border-2 border-gray-300 rounded-full":{}},".s-search-modal-search-results":{"@apply m-auto max-h-96 overflow-y-auto bg-white rounded-b-tiny":{}},".s-search-modal-no-results":{"@apply error p-4 text-sm text-gray-text":{}},".s-search-modal-
|
|
1
|
+
{".s-search-modal-search-button-icon":{"@apply bg-gray-bg2 hover:bg-gray-150 dark:hover:bg-opacity-10 transition duration-300 mx-3 text-sm rounded-full w-9 h-9":{}},".s-search-modal-container":{"@apply fixed inset-0 z-50 flex items-top justify-center overflow-auto items-top":{}},".s-search-modal-wrapper":{"@apply bg-transparent w-full":{}},".s-search-modal-inner":{"@apply mx-auto w-11/12 lg:w-6/12":{}},".s-search-modal-search-box-container":{"@apply mt-36 search-box anime-item":{}},".s-search-modal-search-box-inner":{"@apply relative bg-white rounded-tiny border border-border-color":{}},".s-search-modal-search-box-inner-open":{"@apply relative bg-white rounded-tiny border border-border-color rounded-b-none":{}},".s-search-modal-input":{"@apply anime-item bg-transparent border-0 form-input w-full ps-10 pt-6 pb-7 rounded-tiny text-gray-600":{}},".s-search-modal-search-icon":{"@apply anime-item flex justify-end items-center absolute top-4 start-4 text-md text-gray-text":{}},".s-search-modal-spinner":{"@apply spinner-loader-wrap absolute top-1/2 transform -translate-y-1/2 start-4 w-4 h-4":{}},".s-search-modal-spinner-loader":{"@apply block spinner-loader w-4 h-4 animate-spin border-2 border-gray-300 rounded-full":{}},".s-search-modal-search-results":{"@apply m-auto max-h-96 overflow-y-auto bg-white rounded-b-tiny":{}},".s-search-modal-no-results":{"@apply error p-4 text-sm text-gray-text":{}},".s-search-modal-product":{"@apply h-full transition duration-500 bg-transparent justify-around overflow-hidden flex transition-colors duration-300 hover:bg-gray-bg2 px-4 xs:px-5 py-5 border-t-0":{}},".s-search-modal-product-image-container":{"@apply relative overflow-hidden w-20 h-20 sm:w-28 sm:h-28 rounded-md":{}},".s-search-modal-product-image":{"@apply h-full w-full object-cover":{}},".s-search-modal-product-details":{"@apply flex-1 ps-4 xs:ps-5 pt-1":{}},".s-search-modal-product-title":{"@apply flex flex-col justify-start items-baseline text-sm font-bold text-title-color leading-6 mb-2.5":{}},".s-search-modal-product-price":{"@apply w-full flex justify-between items-center mb-5 text-primary font-bold text-sm":{}}}
|