@salla.sa/twilight 1.0.5 → 1.0.7

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.
@@ -19,7 +19,8 @@
19
19
  "unpkg": "dist/atoms/atoms.js",
20
20
  "files": [
21
21
  "dist/",
22
- "loader/"
22
+ "loader/",
23
+ "src/plugins"
23
24
  ],
24
25
  "repository": {
25
26
  "type": "git",
@@ -0,0 +1,32 @@
1
+ const plugin = require('tailwindcss/plugin');
2
+ const fs = require('fs');
3
+ const path = require('path');
4
+
5
+ module.exports = plugin.withOptions(() => {
6
+
7
+
8
+ return function({addUtilities}) {
9
+ addUtilities({
10
+ // TODO :: find if there are used and defined them here if its.
11
+ '.anime-item': {},
12
+ '.text-md': {},
13
+ '.items-top': {},
14
+ '.error': {},
15
+ '.search-box': {},
16
+ '.spinner-loader-wrap': {}
17
+ });
18
+
19
+ // todo :: move it to global
20
+ addUtilities({
21
+ '.spinner-loader': {
22
+ 'border-right-color': 'var(--main-color) !important',
23
+ '&.reverse': {
24
+ 'border-right-color': '#9f7171 !important',
25
+ 'background-color': '#f98181'
26
+ }
27
+ }
28
+ });
29
+
30
+ addUtilities(JSON.parse(fs.readFileSync(path.resolve(__dirname, 'utilities.json'), 'UTF-8')));
31
+ };
32
+ });
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@salla.sa/twilight-tailwind-theme",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "keywords": [
6
+ "Salla twilight",
7
+ "tailwind",
8
+ "tailwind-theme",
9
+ "Salla",
10
+ "web component"
11
+ ],
12
+ "description": "Tailwind theme for twilight (Salla Themes)",
13
+ "homepage": "https://salla.dev",
14
+ "scripts": {
15
+ "generate": "node scripts/generator.js",
16
+ "publish": "npm version patch && generate && npm publish --access private"
17
+ },
18
+ "files": [
19
+ "index.js",
20
+ "package.json",
21
+ "safe-list-css.txt",
22
+ "utilities.json"
23
+ ],
24
+ "devDependencies": {
25
+ "lodash": "^4.17.21",
26
+ "tailwindcss": "^2.2.19"
27
+ }
28
+ }
@@ -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
+ ```
@@ -0,0 +1,19 @@
1
+ s-search-modal-search-button-icon
2
+ s-search-modal-container
3
+ s-search-modal-wrapper
4
+ s-search-modal-inner
5
+ s-search-modal-search-box-container
6
+ s-search-modal-search-box-inner
7
+ s-search-modal-search-box-inner-open
8
+ s-search-modal-input
9
+ s-search-modal-search-icon
10
+ s-search-modal-spinner
11
+ s-search-modal-spinner-loader
12
+ s-search-modal-search-results
13
+ s-search-modal-no-results
14
+ s-search-modal-product
15
+ s-search-modal-product-image-container
16
+ s-search-modal-product-image
17
+ s-search-modal-product-details
18
+ s-search-modal-product-title
19
+ s-search-modal-product-price
@@ -0,0 +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-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":{}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salla.sa/twilight",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Salla Theme Toolkit, Webcomponents, Events, Requests, Utils",
5
5
  "main": "dist/twilight.js",
6
6
  "scripts": {