@metamask-previews/design-system-tailwind-preset 0.0.0-preview.909f2e9
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/CHANGELOG.md +10 -0
- package/LICENSE +20 -0
- package/README.md +63 -0
- package/dist/colors.cjs +70 -0
- package/dist/colors.cjs.map +1 -0
- package/dist/colors.d.cts +67 -0
- package/dist/colors.d.cts.map +1 -0
- package/dist/colors.d.mts +67 -0
- package/dist/colors.d.mts.map +1 -0
- package/dist/colors.mjs +67 -0
- package/dist/colors.mjs.map +1 -0
- package/dist/index.cjs +36 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +34 -0
- package/dist/index.mjs.map +1 -0
- package/dist/shadows.cjs +46 -0
- package/dist/shadows.cjs.map +1 -0
- package/dist/shadows.d.cts +30 -0
- package/dist/shadows.d.cts.map +1 -0
- package/dist/shadows.d.mts +30 -0
- package/dist/shadows.d.mts.map +1 -0
- package/dist/shadows.mjs +47 -0
- package/dist/shadows.mjs.map +1 -0
- package/dist/typography.cjs +168 -0
- package/dist/typography.cjs.map +1 -0
- package/dist/typography.d.cts +149 -0
- package/dist/typography.d.cts.map +1 -0
- package/dist/typography.d.mts +149 -0
- package/dist/typography.d.mts.map +1 -0
- package/dist/typography.mjs +165 -0
- package/dist/typography.mjs.map +1 -0
- package/package.json +72 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
[Unreleased]: https://github.com/MetaMask/metamask-design-system/
|
package/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 MetaMask
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
package/README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# `@metamask/design-system-tailwind-preset`
|
|
2
|
+
|
|
3
|
+
Design System Tailwind CSS preset for MetaMask projects
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
`yarn add @metamask/design-system-tailwind-preset`
|
|
8
|
+
|
|
9
|
+
or
|
|
10
|
+
|
|
11
|
+
`npm install @metamask/design-system-tailwind-preset`
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
To use the MetaMask Design System Tailwind CSS preset in your project, follow these steps:
|
|
16
|
+
|
|
17
|
+
1. Install the package as described in the Installation section above.
|
|
18
|
+
|
|
19
|
+
2. In your `tailwind.config.js` file, import and use the preset:
|
|
20
|
+
|
|
21
|
+
```javascript
|
|
22
|
+
module.exports = {
|
|
23
|
+
presets: [require('@metamask/design-system-tailwind-preset')],
|
|
24
|
+
// ...
|
|
25
|
+
};
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
```html
|
|
29
|
+
<div class="bg-background-default text-text-default">
|
|
30
|
+
<h1 class="font-s-heading-lg sm:font-l-heading-lg">Welcome to MetaMask</h1>
|
|
31
|
+
<p class="font-s-body-md sm:font-l-body">
|
|
32
|
+
Enjoy our consistent design across projects!
|
|
33
|
+
</p>
|
|
34
|
+
</div>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Customization
|
|
38
|
+
|
|
39
|
+
You can override or extend the preset's configurations in your `tailwind.config.js` file:
|
|
40
|
+
|
|
41
|
+
```javascript
|
|
42
|
+
module.exports = {
|
|
43
|
+
presets: [require('@metamask/design-system-tailwind-preset')],
|
|
44
|
+
theme: {
|
|
45
|
+
extend: {
|
|
46
|
+
// Your custom extensions...
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
// Other Tailwind configurations...
|
|
50
|
+
};
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Documentation
|
|
54
|
+
|
|
55
|
+
For more information on how to use Tailwind CSS and configure your project, refer to the official Tailwind CSS documentation:
|
|
56
|
+
|
|
57
|
+
- [Tailwind CSS Documentation](https://tailwindcss.com/docs)
|
|
58
|
+
- [Customizing Your Tailwind Configuration](https://tailwindcss.com/docs/configuration)
|
|
59
|
+
- [Presets in Tailwind CSS](https://tailwindcss.com/docs/presets)
|
|
60
|
+
|
|
61
|
+
## Contributing
|
|
62
|
+
|
|
63
|
+
This package is part of a monorepo. Instructions for contributing can be found in the [monorepo README](https://github.com/MetaMask/metamask-design-system#readme).
|
package/dist/colors.cjs
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.colors = void 0;
|
|
4
|
+
exports.colors = {
|
|
5
|
+
background: {
|
|
6
|
+
default: 'var(--color-background-default)',
|
|
7
|
+
'default-hover': 'var(--color-background-default-hover)',
|
|
8
|
+
'default-pressed': 'var(--color-background-default-pressed)',
|
|
9
|
+
alternative: 'var(--color-background-alternative)',
|
|
10
|
+
'alternative-hover': 'var(--color-background-alternative-hover)',
|
|
11
|
+
'alternative-pressed': 'var(--color-background-alternative-pressed)',
|
|
12
|
+
hover: 'var(--color-background-hover)',
|
|
13
|
+
pressed: 'var(--color-background-pressed)',
|
|
14
|
+
},
|
|
15
|
+
text: {
|
|
16
|
+
default: 'var(--color-text-default)',
|
|
17
|
+
alternative: 'var(--color-text-alternative)',
|
|
18
|
+
muted: 'var(--color-text-muted)',
|
|
19
|
+
},
|
|
20
|
+
border: {
|
|
21
|
+
default: 'var(--color-border-default)',
|
|
22
|
+
muted: 'var(--color-border-muted)',
|
|
23
|
+
},
|
|
24
|
+
icon: {
|
|
25
|
+
default: 'var(--color-icon-default)',
|
|
26
|
+
alternative: 'var(--color-icon-alternative)',
|
|
27
|
+
muted: 'var(--color-icon-muted)',
|
|
28
|
+
},
|
|
29
|
+
overlay: {
|
|
30
|
+
default: 'var(--color-overlay-default)',
|
|
31
|
+
alternative: 'var(--color-overlay-alternative)',
|
|
32
|
+
inverse: 'var(--color-overlay-inverse)',
|
|
33
|
+
},
|
|
34
|
+
primary: {
|
|
35
|
+
default: 'var(--color-primary-default)',
|
|
36
|
+
'default-hover': 'var(--color-primary-default-hover)',
|
|
37
|
+
'default-pressed': 'var(--color-primary-default-pressed)',
|
|
38
|
+
alternative: 'var(--color-primary-alternative)',
|
|
39
|
+
muted: 'var(--color-primary-muted)',
|
|
40
|
+
inverse: 'var(--color-primary-inverse)',
|
|
41
|
+
},
|
|
42
|
+
error: {
|
|
43
|
+
default: 'var(--color-error-default)',
|
|
44
|
+
'default-hover': 'var(--color-error-default-hover)',
|
|
45
|
+
'default-pressed': 'var(--color-error-default-pressed)',
|
|
46
|
+
alternative: 'var(--color-error-alternative)',
|
|
47
|
+
muted: 'var(--color-error-muted)',
|
|
48
|
+
inverse: 'var(--color-error-inverse)',
|
|
49
|
+
},
|
|
50
|
+
warning: {
|
|
51
|
+
default: 'var(--color-warning-default)',
|
|
52
|
+
'default-hover': 'var(--color-warning-default-hover)',
|
|
53
|
+
'default-pressed': 'var(--color-warning-default-pressed)',
|
|
54
|
+
muted: 'var(--color-warning-muted)',
|
|
55
|
+
inverse: 'var(--color-warning-inverse)',
|
|
56
|
+
},
|
|
57
|
+
success: {
|
|
58
|
+
default: 'var(--color-success-default)',
|
|
59
|
+
'default-hover': 'var(--color-success-default-hover)',
|
|
60
|
+
'default-pressed': 'var(--color-success-default-pressed)',
|
|
61
|
+
muted: 'var(--color-success-muted)',
|
|
62
|
+
inverse: 'var(--color-success-inverse)',
|
|
63
|
+
},
|
|
64
|
+
info: {
|
|
65
|
+
default: 'var(--color-info-default)',
|
|
66
|
+
muted: 'var(--color-info-muted)',
|
|
67
|
+
inverse: 'var(--color-info-inverse)',
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=colors.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.cjs","sourceRoot":"","sources":["../src/colors.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GAAG;IACpB,UAAU,EAAE;QACV,OAAO,EAAE,iCAAiC;QAC1C,eAAe,EAAE,uCAAuC;QACxD,iBAAiB,EAAE,yCAAyC;QAC5D,WAAW,EAAE,qCAAqC;QAClD,mBAAmB,EAAE,2CAA2C;QAChE,qBAAqB,EAAE,6CAA6C;QACpE,KAAK,EAAE,+BAA+B;QACtC,OAAO,EAAE,iCAAiC;KAC3C;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,2BAA2B;QACpC,WAAW,EAAE,+BAA+B;QAC5C,KAAK,EAAE,yBAAyB;KACjC;IACD,MAAM,EAAE;QACN,OAAO,EAAE,6BAA6B;QACtC,KAAK,EAAE,2BAA2B;KACnC;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,2BAA2B;QACpC,WAAW,EAAE,+BAA+B;QAC5C,KAAK,EAAE,yBAAyB;KACjC;IACD,OAAO,EAAE;QACP,OAAO,EAAE,8BAA8B;QACvC,WAAW,EAAE,kCAAkC;QAC/C,OAAO,EAAE,8BAA8B;KACxC;IACD,OAAO,EAAE;QACP,OAAO,EAAE,8BAA8B;QACvC,eAAe,EAAE,oCAAoC;QACrD,iBAAiB,EAAE,sCAAsC;QACzD,WAAW,EAAE,kCAAkC;QAC/C,KAAK,EAAE,4BAA4B;QACnC,OAAO,EAAE,8BAA8B;KACxC;IACD,KAAK,EAAE;QACL,OAAO,EAAE,4BAA4B;QACrC,eAAe,EAAE,kCAAkC;QACnD,iBAAiB,EAAE,oCAAoC;QACvD,WAAW,EAAE,gCAAgC;QAC7C,KAAK,EAAE,0BAA0B;QACjC,OAAO,EAAE,4BAA4B;KACtC;IACD,OAAO,EAAE;QACP,OAAO,EAAE,8BAA8B;QACvC,eAAe,EAAE,oCAAoC;QACrD,iBAAiB,EAAE,sCAAsC;QACzD,KAAK,EAAE,4BAA4B;QACnC,OAAO,EAAE,8BAA8B;KACxC;IACD,OAAO,EAAE;QACP,OAAO,EAAE,8BAA8B;QACvC,eAAe,EAAE,oCAAoC;QACrD,iBAAiB,EAAE,sCAAsC;QACzD,KAAK,EAAE,4BAA4B;QACnC,OAAO,EAAE,8BAA8B;KACxC;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,2BAA2B;QACpC,KAAK,EAAE,yBAAyB;QAChC,OAAO,EAAE,2BAA2B;KACrC;CACF,CAAC","sourcesContent":["export const colors = {\n background: {\n default: 'var(--color-background-default)',\n 'default-hover': 'var(--color-background-default-hover)',\n 'default-pressed': 'var(--color-background-default-pressed)',\n alternative: 'var(--color-background-alternative)',\n 'alternative-hover': 'var(--color-background-alternative-hover)',\n 'alternative-pressed': 'var(--color-background-alternative-pressed)',\n hover: 'var(--color-background-hover)',\n pressed: 'var(--color-background-pressed)',\n },\n text: {\n default: 'var(--color-text-default)',\n alternative: 'var(--color-text-alternative)',\n muted: 'var(--color-text-muted)',\n },\n border: {\n default: 'var(--color-border-default)',\n muted: 'var(--color-border-muted)',\n },\n icon: {\n default: 'var(--color-icon-default)',\n alternative: 'var(--color-icon-alternative)',\n muted: 'var(--color-icon-muted)',\n },\n overlay: {\n default: 'var(--color-overlay-default)',\n alternative: 'var(--color-overlay-alternative)',\n inverse: 'var(--color-overlay-inverse)',\n },\n primary: {\n default: 'var(--color-primary-default)',\n 'default-hover': 'var(--color-primary-default-hover)',\n 'default-pressed': 'var(--color-primary-default-pressed)',\n alternative: 'var(--color-primary-alternative)',\n muted: 'var(--color-primary-muted)',\n inverse: 'var(--color-primary-inverse)',\n },\n error: {\n default: 'var(--color-error-default)',\n 'default-hover': 'var(--color-error-default-hover)',\n 'default-pressed': 'var(--color-error-default-pressed)',\n alternative: 'var(--color-error-alternative)',\n muted: 'var(--color-error-muted)',\n inverse: 'var(--color-error-inverse)',\n },\n warning: {\n default: 'var(--color-warning-default)',\n 'default-hover': 'var(--color-warning-default-hover)',\n 'default-pressed': 'var(--color-warning-default-pressed)',\n muted: 'var(--color-warning-muted)',\n inverse: 'var(--color-warning-inverse)',\n },\n success: {\n default: 'var(--color-success-default)',\n 'default-hover': 'var(--color-success-default-hover)',\n 'default-pressed': 'var(--color-success-default-pressed)',\n muted: 'var(--color-success-muted)',\n inverse: 'var(--color-success-inverse)',\n },\n info: {\n default: 'var(--color-info-default)',\n muted: 'var(--color-info-muted)',\n inverse: 'var(--color-info-inverse)',\n },\n};\n"]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export declare const colors: {
|
|
2
|
+
background: {
|
|
3
|
+
default: string;
|
|
4
|
+
'default-hover': string;
|
|
5
|
+
'default-pressed': string;
|
|
6
|
+
alternative: string;
|
|
7
|
+
'alternative-hover': string;
|
|
8
|
+
'alternative-pressed': string;
|
|
9
|
+
hover: string;
|
|
10
|
+
pressed: string;
|
|
11
|
+
};
|
|
12
|
+
text: {
|
|
13
|
+
default: string;
|
|
14
|
+
alternative: string;
|
|
15
|
+
muted: string;
|
|
16
|
+
};
|
|
17
|
+
border: {
|
|
18
|
+
default: string;
|
|
19
|
+
muted: string;
|
|
20
|
+
};
|
|
21
|
+
icon: {
|
|
22
|
+
default: string;
|
|
23
|
+
alternative: string;
|
|
24
|
+
muted: string;
|
|
25
|
+
};
|
|
26
|
+
overlay: {
|
|
27
|
+
default: string;
|
|
28
|
+
alternative: string;
|
|
29
|
+
inverse: string;
|
|
30
|
+
};
|
|
31
|
+
primary: {
|
|
32
|
+
default: string;
|
|
33
|
+
'default-hover': string;
|
|
34
|
+
'default-pressed': string;
|
|
35
|
+
alternative: string;
|
|
36
|
+
muted: string;
|
|
37
|
+
inverse: string;
|
|
38
|
+
};
|
|
39
|
+
error: {
|
|
40
|
+
default: string;
|
|
41
|
+
'default-hover': string;
|
|
42
|
+
'default-pressed': string;
|
|
43
|
+
alternative: string;
|
|
44
|
+
muted: string;
|
|
45
|
+
inverse: string;
|
|
46
|
+
};
|
|
47
|
+
warning: {
|
|
48
|
+
default: string;
|
|
49
|
+
'default-hover': string;
|
|
50
|
+
'default-pressed': string;
|
|
51
|
+
muted: string;
|
|
52
|
+
inverse: string;
|
|
53
|
+
};
|
|
54
|
+
success: {
|
|
55
|
+
default: string;
|
|
56
|
+
'default-hover': string;
|
|
57
|
+
'default-pressed': string;
|
|
58
|
+
muted: string;
|
|
59
|
+
inverse: string;
|
|
60
|
+
};
|
|
61
|
+
info: {
|
|
62
|
+
default: string;
|
|
63
|
+
muted: string;
|
|
64
|
+
inverse: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=colors.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.cts","sourceRoot":"","sources":["../src/colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiElB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export declare const colors: {
|
|
2
|
+
background: {
|
|
3
|
+
default: string;
|
|
4
|
+
'default-hover': string;
|
|
5
|
+
'default-pressed': string;
|
|
6
|
+
alternative: string;
|
|
7
|
+
'alternative-hover': string;
|
|
8
|
+
'alternative-pressed': string;
|
|
9
|
+
hover: string;
|
|
10
|
+
pressed: string;
|
|
11
|
+
};
|
|
12
|
+
text: {
|
|
13
|
+
default: string;
|
|
14
|
+
alternative: string;
|
|
15
|
+
muted: string;
|
|
16
|
+
};
|
|
17
|
+
border: {
|
|
18
|
+
default: string;
|
|
19
|
+
muted: string;
|
|
20
|
+
};
|
|
21
|
+
icon: {
|
|
22
|
+
default: string;
|
|
23
|
+
alternative: string;
|
|
24
|
+
muted: string;
|
|
25
|
+
};
|
|
26
|
+
overlay: {
|
|
27
|
+
default: string;
|
|
28
|
+
alternative: string;
|
|
29
|
+
inverse: string;
|
|
30
|
+
};
|
|
31
|
+
primary: {
|
|
32
|
+
default: string;
|
|
33
|
+
'default-hover': string;
|
|
34
|
+
'default-pressed': string;
|
|
35
|
+
alternative: string;
|
|
36
|
+
muted: string;
|
|
37
|
+
inverse: string;
|
|
38
|
+
};
|
|
39
|
+
error: {
|
|
40
|
+
default: string;
|
|
41
|
+
'default-hover': string;
|
|
42
|
+
'default-pressed': string;
|
|
43
|
+
alternative: string;
|
|
44
|
+
muted: string;
|
|
45
|
+
inverse: string;
|
|
46
|
+
};
|
|
47
|
+
warning: {
|
|
48
|
+
default: string;
|
|
49
|
+
'default-hover': string;
|
|
50
|
+
'default-pressed': string;
|
|
51
|
+
muted: string;
|
|
52
|
+
inverse: string;
|
|
53
|
+
};
|
|
54
|
+
success: {
|
|
55
|
+
default: string;
|
|
56
|
+
'default-hover': string;
|
|
57
|
+
'default-pressed': string;
|
|
58
|
+
muted: string;
|
|
59
|
+
inverse: string;
|
|
60
|
+
};
|
|
61
|
+
info: {
|
|
62
|
+
default: string;
|
|
63
|
+
muted: string;
|
|
64
|
+
inverse: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=colors.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.mts","sourceRoot":"","sources":["../src/colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiElB,CAAC"}
|
package/dist/colors.mjs
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export const colors = {
|
|
2
|
+
background: {
|
|
3
|
+
default: 'var(--color-background-default)',
|
|
4
|
+
'default-hover': 'var(--color-background-default-hover)',
|
|
5
|
+
'default-pressed': 'var(--color-background-default-pressed)',
|
|
6
|
+
alternative: 'var(--color-background-alternative)',
|
|
7
|
+
'alternative-hover': 'var(--color-background-alternative-hover)',
|
|
8
|
+
'alternative-pressed': 'var(--color-background-alternative-pressed)',
|
|
9
|
+
hover: 'var(--color-background-hover)',
|
|
10
|
+
pressed: 'var(--color-background-pressed)',
|
|
11
|
+
},
|
|
12
|
+
text: {
|
|
13
|
+
default: 'var(--color-text-default)',
|
|
14
|
+
alternative: 'var(--color-text-alternative)',
|
|
15
|
+
muted: 'var(--color-text-muted)',
|
|
16
|
+
},
|
|
17
|
+
border: {
|
|
18
|
+
default: 'var(--color-border-default)',
|
|
19
|
+
muted: 'var(--color-border-muted)',
|
|
20
|
+
},
|
|
21
|
+
icon: {
|
|
22
|
+
default: 'var(--color-icon-default)',
|
|
23
|
+
alternative: 'var(--color-icon-alternative)',
|
|
24
|
+
muted: 'var(--color-icon-muted)',
|
|
25
|
+
},
|
|
26
|
+
overlay: {
|
|
27
|
+
default: 'var(--color-overlay-default)',
|
|
28
|
+
alternative: 'var(--color-overlay-alternative)',
|
|
29
|
+
inverse: 'var(--color-overlay-inverse)',
|
|
30
|
+
},
|
|
31
|
+
primary: {
|
|
32
|
+
default: 'var(--color-primary-default)',
|
|
33
|
+
'default-hover': 'var(--color-primary-default-hover)',
|
|
34
|
+
'default-pressed': 'var(--color-primary-default-pressed)',
|
|
35
|
+
alternative: 'var(--color-primary-alternative)',
|
|
36
|
+
muted: 'var(--color-primary-muted)',
|
|
37
|
+
inverse: 'var(--color-primary-inverse)',
|
|
38
|
+
},
|
|
39
|
+
error: {
|
|
40
|
+
default: 'var(--color-error-default)',
|
|
41
|
+
'default-hover': 'var(--color-error-default-hover)',
|
|
42
|
+
'default-pressed': 'var(--color-error-default-pressed)',
|
|
43
|
+
alternative: 'var(--color-error-alternative)',
|
|
44
|
+
muted: 'var(--color-error-muted)',
|
|
45
|
+
inverse: 'var(--color-error-inverse)',
|
|
46
|
+
},
|
|
47
|
+
warning: {
|
|
48
|
+
default: 'var(--color-warning-default)',
|
|
49
|
+
'default-hover': 'var(--color-warning-default-hover)',
|
|
50
|
+
'default-pressed': 'var(--color-warning-default-pressed)',
|
|
51
|
+
muted: 'var(--color-warning-muted)',
|
|
52
|
+
inverse: 'var(--color-warning-inverse)',
|
|
53
|
+
},
|
|
54
|
+
success: {
|
|
55
|
+
default: 'var(--color-success-default)',
|
|
56
|
+
'default-hover': 'var(--color-success-default-hover)',
|
|
57
|
+
'default-pressed': 'var(--color-success-default-pressed)',
|
|
58
|
+
muted: 'var(--color-success-muted)',
|
|
59
|
+
inverse: 'var(--color-success-inverse)',
|
|
60
|
+
},
|
|
61
|
+
info: {
|
|
62
|
+
default: 'var(--color-info-default)',
|
|
63
|
+
muted: 'var(--color-info-muted)',
|
|
64
|
+
inverse: 'var(--color-info-inverse)',
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=colors.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.mjs","sourceRoot":"","sources":["../src/colors.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,UAAU,EAAE;QACV,OAAO,EAAE,iCAAiC;QAC1C,eAAe,EAAE,uCAAuC;QACxD,iBAAiB,EAAE,yCAAyC;QAC5D,WAAW,EAAE,qCAAqC;QAClD,mBAAmB,EAAE,2CAA2C;QAChE,qBAAqB,EAAE,6CAA6C;QACpE,KAAK,EAAE,+BAA+B;QACtC,OAAO,EAAE,iCAAiC;KAC3C;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,2BAA2B;QACpC,WAAW,EAAE,+BAA+B;QAC5C,KAAK,EAAE,yBAAyB;KACjC;IACD,MAAM,EAAE;QACN,OAAO,EAAE,6BAA6B;QACtC,KAAK,EAAE,2BAA2B;KACnC;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,2BAA2B;QACpC,WAAW,EAAE,+BAA+B;QAC5C,KAAK,EAAE,yBAAyB;KACjC;IACD,OAAO,EAAE;QACP,OAAO,EAAE,8BAA8B;QACvC,WAAW,EAAE,kCAAkC;QAC/C,OAAO,EAAE,8BAA8B;KACxC;IACD,OAAO,EAAE;QACP,OAAO,EAAE,8BAA8B;QACvC,eAAe,EAAE,oCAAoC;QACrD,iBAAiB,EAAE,sCAAsC;QACzD,WAAW,EAAE,kCAAkC;QAC/C,KAAK,EAAE,4BAA4B;QACnC,OAAO,EAAE,8BAA8B;KACxC;IACD,KAAK,EAAE;QACL,OAAO,EAAE,4BAA4B;QACrC,eAAe,EAAE,kCAAkC;QACnD,iBAAiB,EAAE,oCAAoC;QACvD,WAAW,EAAE,gCAAgC;QAC7C,KAAK,EAAE,0BAA0B;QACjC,OAAO,EAAE,4BAA4B;KACtC;IACD,OAAO,EAAE;QACP,OAAO,EAAE,8BAA8B;QACvC,eAAe,EAAE,oCAAoC;QACrD,iBAAiB,EAAE,sCAAsC;QACzD,KAAK,EAAE,4BAA4B;QACnC,OAAO,EAAE,8BAA8B;KACxC;IACD,OAAO,EAAE;QACP,OAAO,EAAE,8BAA8B;QACvC,eAAe,EAAE,oCAAoC;QACrD,iBAAiB,EAAE,sCAAsC;QACzD,KAAK,EAAE,4BAA4B;QACnC,OAAO,EAAE,8BAA8B;KACxC;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,2BAA2B;QACpC,KAAK,EAAE,yBAAyB;QAChC,OAAO,EAAE,2BAA2B;KACrC;CACF,CAAC","sourcesContent":["export const colors = {\n background: {\n default: 'var(--color-background-default)',\n 'default-hover': 'var(--color-background-default-hover)',\n 'default-pressed': 'var(--color-background-default-pressed)',\n alternative: 'var(--color-background-alternative)',\n 'alternative-hover': 'var(--color-background-alternative-hover)',\n 'alternative-pressed': 'var(--color-background-alternative-pressed)',\n hover: 'var(--color-background-hover)',\n pressed: 'var(--color-background-pressed)',\n },\n text: {\n default: 'var(--color-text-default)',\n alternative: 'var(--color-text-alternative)',\n muted: 'var(--color-text-muted)',\n },\n border: {\n default: 'var(--color-border-default)',\n muted: 'var(--color-border-muted)',\n },\n icon: {\n default: 'var(--color-icon-default)',\n alternative: 'var(--color-icon-alternative)',\n muted: 'var(--color-icon-muted)',\n },\n overlay: {\n default: 'var(--color-overlay-default)',\n alternative: 'var(--color-overlay-alternative)',\n inverse: 'var(--color-overlay-inverse)',\n },\n primary: {\n default: 'var(--color-primary-default)',\n 'default-hover': 'var(--color-primary-default-hover)',\n 'default-pressed': 'var(--color-primary-default-pressed)',\n alternative: 'var(--color-primary-alternative)',\n muted: 'var(--color-primary-muted)',\n inverse: 'var(--color-primary-inverse)',\n },\n error: {\n default: 'var(--color-error-default)',\n 'default-hover': 'var(--color-error-default-hover)',\n 'default-pressed': 'var(--color-error-default-pressed)',\n alternative: 'var(--color-error-alternative)',\n muted: 'var(--color-error-muted)',\n inverse: 'var(--color-error-inverse)',\n },\n warning: {\n default: 'var(--color-warning-default)',\n 'default-hover': 'var(--color-warning-default-hover)',\n 'default-pressed': 'var(--color-warning-default-pressed)',\n muted: 'var(--color-warning-muted)',\n inverse: 'var(--color-warning-inverse)',\n },\n success: {\n default: 'var(--color-success-default)',\n 'default-hover': 'var(--color-success-default-hover)',\n 'default-pressed': 'var(--color-success-default-pressed)',\n muted: 'var(--color-success-muted)',\n inverse: 'var(--color-success-inverse)',\n },\n info: {\n default: 'var(--color-info-default)',\n muted: 'var(--color-info-muted)',\n inverse: 'var(--color-info-inverse)',\n },\n};\n"]}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const colors_1 = require("./colors.cjs");
|
|
4
|
+
const shadows_1 = require("./shadows.cjs");
|
|
5
|
+
const typography_1 = require("./typography.cjs");
|
|
6
|
+
const tailwindConfig = {
|
|
7
|
+
content: [],
|
|
8
|
+
theme: {
|
|
9
|
+
extend: {
|
|
10
|
+
colors: {
|
|
11
|
+
...colors_1.colors,
|
|
12
|
+
},
|
|
13
|
+
// Reduces redundancy by enabling shorter Tailwind class names
|
|
14
|
+
textColor: ({ theme }) => ({
|
|
15
|
+
...theme('colors'),
|
|
16
|
+
...colors_1.colors.text, // e.g. text-default instead of text-text-default
|
|
17
|
+
}),
|
|
18
|
+
backgroundColor: ({ theme }) => ({
|
|
19
|
+
...theme('colors'),
|
|
20
|
+
...colors_1.colors.background, // e.g. bg-default instead of bg-background-default
|
|
21
|
+
}),
|
|
22
|
+
borderColor: ({ theme }) => ({
|
|
23
|
+
...theme('colors'),
|
|
24
|
+
...colors_1.colors.border, // e.g. border-default instead of border-border-default
|
|
25
|
+
}),
|
|
26
|
+
...typography_1.typography,
|
|
27
|
+
boxShadow: shadows_1.shadows,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
plugins: [
|
|
31
|
+
shadows_1.shadowPlugin, // Allows for combination of size and color shadow utilities
|
|
32
|
+
],
|
|
33
|
+
};
|
|
34
|
+
exports.default = tailwindConfig;
|
|
35
|
+
module.exports = tailwindConfig;
|
|
36
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAEA,yCAAkC;AAClC,2CAAkD;AAClD,iDAA0C;AAE1C,MAAM,cAAc,GAAW;IAC7B,OAAO,EAAE,EAAE;IACX,KAAK,EAAE;QACL,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,GAAG,eAAM;aACV;YACD,8DAA8D;YAC9D,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;gBACzB,GAAG,KAAK,CAAC,QAAQ,CAAC;gBAClB,GAAG,eAAM,CAAC,IAAI,EAAE,iDAAiD;aAClE,CAAC;YACF,eAAe,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;gBAC/B,GAAG,KAAK,CAAC,QAAQ,CAAC;gBAClB,GAAG,eAAM,CAAC,UAAU,EAAE,mDAAmD;aAC1E,CAAC;YACF,WAAW,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;gBAC3B,GAAG,KAAK,CAAC,QAAQ,CAAC;gBAClB,GAAG,eAAM,CAAC,MAAM,EAAE,uDAAuD;aAC1E,CAAC;YACF,GAAG,uBAAU;YACb,SAAS,EAAE,iBAAO;SACnB;KACF;IACD,OAAO,EAAE;QACP,sBAAY,EAAE,4DAA4D;KAC3E;CACF,CAAC;AAEF,kBAAe,cAAc,CAAC;AAC9B,MAAM,CAAC,OAAO,GAAG,cAAc,CAAC","sourcesContent":["import type { Config } from 'tailwindcss';\n\nimport { colors } from './colors';\nimport { shadows, shadowPlugin } from './shadows';\nimport { typography } from './typography';\n\nconst tailwindConfig: Config = {\n content: [],\n theme: {\n extend: {\n colors: {\n ...colors,\n },\n // Reduces redundancy by enabling shorter Tailwind class names\n textColor: ({ theme }) => ({\n ...theme('colors'), // Incorporate existing color utilities like text-primary-default\n ...colors.text, // e.g. text-default instead of text-text-default\n }),\n backgroundColor: ({ theme }) => ({\n ...theme('colors'), // Incorporate existing color utilities like bg-primary-default\n ...colors.background, // e.g. bg-default instead of bg-background-default\n }),\n borderColor: ({ theme }) => ({\n ...theme('colors'), // Incorporate existing color utilities like border-primary-default\n ...colors.border, // e.g. border-default instead of border-border-default\n }),\n ...typography,\n boxShadow: shadows,\n },\n },\n plugins: [\n shadowPlugin, // Allows for combination of size and color shadow utilities\n ],\n};\n\nexport default tailwindConfig;\nmodule.exports = tailwindConfig;\n"]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,oBAAoB;AAM1C,QAAA,MAAM,cAAc,EAAE,MA2BrB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,oBAAoB;AAM1C,QAAA,MAAM,cAAc,EAAE,MA2BrB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { colors } from "./colors.mjs";
|
|
2
|
+
import { shadows, shadowPlugin } from "./shadows.mjs";
|
|
3
|
+
import { typography } from "./typography.mjs";
|
|
4
|
+
const tailwindConfig = {
|
|
5
|
+
content: [],
|
|
6
|
+
theme: {
|
|
7
|
+
extend: {
|
|
8
|
+
colors: {
|
|
9
|
+
...colors,
|
|
10
|
+
},
|
|
11
|
+
// Reduces redundancy by enabling shorter Tailwind class names
|
|
12
|
+
textColor: ({ theme }) => ({
|
|
13
|
+
...theme('colors'),
|
|
14
|
+
...colors.text, // e.g. text-default instead of text-text-default
|
|
15
|
+
}),
|
|
16
|
+
backgroundColor: ({ theme }) => ({
|
|
17
|
+
...theme('colors'),
|
|
18
|
+
...colors.background, // e.g. bg-default instead of bg-background-default
|
|
19
|
+
}),
|
|
20
|
+
borderColor: ({ theme }) => ({
|
|
21
|
+
...theme('colors'),
|
|
22
|
+
...colors.border, // e.g. border-default instead of border-border-default
|
|
23
|
+
}),
|
|
24
|
+
...typography,
|
|
25
|
+
boxShadow: shadows,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
plugins: [
|
|
29
|
+
shadowPlugin, // Allows for combination of size and color shadow utilities
|
|
30
|
+
],
|
|
31
|
+
};
|
|
32
|
+
export default tailwindConfig;
|
|
33
|
+
module.exports = tailwindConfig;
|
|
34
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,qBAAiB;AAClC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,sBAAkB;AAClD,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAE1C,MAAM,cAAc,GAAW;IAC7B,OAAO,EAAE,EAAE;IACX,KAAK,EAAE;QACL,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,GAAG,MAAM;aACV;YACD,8DAA8D;YAC9D,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;gBACzB,GAAG,KAAK,CAAC,QAAQ,CAAC;gBAClB,GAAG,MAAM,CAAC,IAAI,EAAE,iDAAiD;aAClE,CAAC;YACF,eAAe,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;gBAC/B,GAAG,KAAK,CAAC,QAAQ,CAAC;gBAClB,GAAG,MAAM,CAAC,UAAU,EAAE,mDAAmD;aAC1E,CAAC;YACF,WAAW,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;gBAC3B,GAAG,KAAK,CAAC,QAAQ,CAAC;gBAClB,GAAG,MAAM,CAAC,MAAM,EAAE,uDAAuD;aAC1E,CAAC;YACF,GAAG,UAAU;YACb,SAAS,EAAE,OAAO;SACnB;KACF;IACD,OAAO,EAAE;QACP,YAAY,EAAE,4DAA4D;KAC3E;CACF,CAAC;AAEF,eAAe,cAAc,CAAC;AAC9B,MAAM,CAAC,OAAO,GAAG,cAAc,CAAC","sourcesContent":["import type { Config } from 'tailwindcss';\n\nimport { colors } from './colors';\nimport { shadows, shadowPlugin } from './shadows';\nimport { typography } from './typography';\n\nconst tailwindConfig: Config = {\n content: [],\n theme: {\n extend: {\n colors: {\n ...colors,\n },\n // Reduces redundancy by enabling shorter Tailwind class names\n textColor: ({ theme }) => ({\n ...theme('colors'), // Incorporate existing color utilities like text-primary-default\n ...colors.text, // e.g. text-default instead of text-text-default\n }),\n backgroundColor: ({ theme }) => ({\n ...theme('colors'), // Incorporate existing color utilities like bg-primary-default\n ...colors.background, // e.g. bg-default instead of bg-background-default\n }),\n borderColor: ({ theme }) => ({\n ...theme('colors'), // Incorporate existing color utilities like border-primary-default\n ...colors.border, // e.g. border-default instead of border-border-default\n }),\n ...typography,\n boxShadow: shadows,\n },\n },\n plugins: [\n shadowPlugin, // Allows for combination of size and color shadow utilities\n ],\n};\n\nexport default tailwindConfig;\nmodule.exports = tailwindConfig;\n"]}
|
package/dist/shadows.cjs
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.shadowPlugin = exports.shadowColors = exports.shadows = void 0;
|
|
7
|
+
const plugin_1 = __importDefault(require("tailwindcss/plugin.js"));
|
|
8
|
+
/**
|
|
9
|
+
* We want to allow for the combination of shadow size and color utilities.
|
|
10
|
+
* Shadow size should default to --color-shadow-default.
|
|
11
|
+
* e.g. className="shadow-md" (size medium / color default)
|
|
12
|
+
* We also want to allow for the combination of shadow size and color utilities.
|
|
13
|
+
* e.g. className="shadow-md shadow-primary" (size medium / color primary)
|
|
14
|
+
*
|
|
15
|
+
* To achieve this we define the following order:
|
|
16
|
+
* size / (color placeholder / color default fallback)
|
|
17
|
+
*/
|
|
18
|
+
exports.shadows = {
|
|
19
|
+
xs: 'var(--shadow-size-xs) var(--shadow-color, var(--color-shadow-default))',
|
|
20
|
+
sm: 'var(--shadow-size-sm) var(--shadow-color, var(--color-shadow-default))',
|
|
21
|
+
md: 'var(--shadow-size-md) var(--shadow-color, var(--color-shadow-default))',
|
|
22
|
+
lg: 'var(--shadow-size-lg) var(--shadow-color, var(--color-shadow-default))',
|
|
23
|
+
};
|
|
24
|
+
exports.shadowColors = {
|
|
25
|
+
default: 'var(--color-shadow-default)',
|
|
26
|
+
primary: 'var(--color-shadow-primary)',
|
|
27
|
+
error: 'var(--color-shadow-error)',
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* The shadowPlugin is a Tailwind CSS plugin that allows the --shadow-color CSS variable to be set based on the shadow color utility class.
|
|
31
|
+
* This enables the combination of shadow size and color utilities.
|
|
32
|
+
*/
|
|
33
|
+
exports.shadowPlugin = (0, plugin_1.default)(function ({ addUtilities, }) {
|
|
34
|
+
const shadowColorUtilities = {};
|
|
35
|
+
Object.entries(exports.shadowColors).forEach(([key, value]) => {
|
|
36
|
+
shadowColorUtilities[`.shadow-${key}`] = {
|
|
37
|
+
'--shadow-color': value, // This ensures that --shadow-color is set to the correct color value
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
// Add the utilities with Tailwind’s addUtilities method
|
|
41
|
+
addUtilities(shadowColorUtilities, {
|
|
42
|
+
respectPrefix: false,
|
|
43
|
+
respectImportant: true,
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=shadows.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shadows.cjs","sourceRoot":"","sources":["../src/shadows.ts"],"names":[],"mappings":";;;;;;AAAA,mEAAwC;AAExC;;;;;;;;;GASG;AAEU,QAAA,OAAO,GAAG;IACrB,EAAE,EAAE,wEAAwE;IAC5E,EAAE,EAAE,wEAAwE;IAC5E,EAAE,EAAE,wEAAwE;IAC5E,EAAE,EAAE,wEAAwE;CAC7E,CAAC;AAEW,QAAA,YAAY,GAAG;IAC1B,OAAO,EAAE,6BAA6B;IACtC,OAAO,EAAE,6BAA6B;IACtC,KAAK,EAAE,2BAA2B;CACnC,CAAC;AAEF;;;GAGG;AACU,QAAA,YAAY,GAAG,IAAA,gBAAM,EAAC,UAAU,EAC3C,YAAY,GASb;IACC,MAAM,oBAAoB,GAA2C,EAAE,CAAC;IAExE,MAAM,CAAC,OAAO,CAAC,oBAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACpD,oBAAoB,CAAC,WAAW,GAAG,EAAE,CAAC,GAAG;YACvC,gBAAgB,EAAE,KAAK,EAAE,qEAAqE;SAC/F,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,wDAAwD;IACxD,YAAY,CAAC,oBAAoB,EAAE;QACjC,aAAa,EAAE,KAAK;QACpB,gBAAgB,EAAE,IAAI;KACvB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import plugin from 'tailwindcss/plugin';\n\n/**\n * We want to allow for the combination of shadow size and color utilities.\n * Shadow size should default to --color-shadow-default.\n * e.g. className=\"shadow-md\" (size medium / color default)\n * We also want to allow for the combination of shadow size and color utilities.\n * e.g. className=\"shadow-md shadow-primary\" (size medium / color primary)\n *\n * To achieve this we define the following order:\n * size / (color placeholder / color default fallback)\n */\n\nexport const shadows = {\n xs: 'var(--shadow-size-xs) var(--shadow-color, var(--color-shadow-default))',\n sm: 'var(--shadow-size-sm) var(--shadow-color, var(--color-shadow-default))',\n md: 'var(--shadow-size-md) var(--shadow-color, var(--color-shadow-default))',\n lg: 'var(--shadow-size-lg) var(--shadow-color, var(--color-shadow-default))',\n};\n\nexport const shadowColors = {\n default: 'var(--color-shadow-default)',\n primary: 'var(--color-shadow-primary)',\n error: 'var(--color-shadow-error)',\n};\n\n/**\n * The shadowPlugin is a Tailwind CSS plugin that allows the --shadow-color CSS variable to be set based on the shadow color utility class.\n * This enables the combination of shadow size and color utilities.\n */\nexport const shadowPlugin = plugin(function ({\n addUtilities,\n}: {\n addUtilities: (\n utilities: Record<string, Record<string, string>>,\n options?: Partial<{\n respectPrefix: boolean;\n respectImportant: boolean;\n }>,\n ) => void;\n}) {\n const shadowColorUtilities: Record<string, Record<string, string>> = {};\n\n Object.entries(shadowColors).forEach(([key, value]) => {\n shadowColorUtilities[`.shadow-${key}`] = {\n '--shadow-color': value, // This ensures that --shadow-color is set to the correct color value\n };\n });\n\n // Add the utilities with Tailwind’s addUtilities method\n addUtilities(shadowColorUtilities, {\n respectPrefix: false,\n respectImportant: true,\n });\n});\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* We want to allow for the combination of shadow size and color utilities.
|
|
3
|
+
* Shadow size should default to --color-shadow-default.
|
|
4
|
+
* e.g. className="shadow-md" (size medium / color default)
|
|
5
|
+
* We also want to allow for the combination of shadow size and color utilities.
|
|
6
|
+
* e.g. className="shadow-md shadow-primary" (size medium / color primary)
|
|
7
|
+
*
|
|
8
|
+
* To achieve this we define the following order:
|
|
9
|
+
* size / (color placeholder / color default fallback)
|
|
10
|
+
*/
|
|
11
|
+
export declare const shadows: {
|
|
12
|
+
xs: string;
|
|
13
|
+
sm: string;
|
|
14
|
+
md: string;
|
|
15
|
+
lg: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const shadowColors: {
|
|
18
|
+
default: string;
|
|
19
|
+
primary: string;
|
|
20
|
+
error: string;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* The shadowPlugin is a Tailwind CSS plugin that allows the --shadow-color CSS variable to be set based on the shadow color utility class.
|
|
24
|
+
* This enables the combination of shadow size and color utilities.
|
|
25
|
+
*/
|
|
26
|
+
export declare const shadowPlugin: {
|
|
27
|
+
handler: import("tailwindcss/types/config").PluginCreator;
|
|
28
|
+
config?: Partial<import("tailwindcss/types/config").Config> | undefined;
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=shadows.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shadows.d.cts","sourceRoot":"","sources":["../src/shadows.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AAEH,eAAO,MAAM,OAAO;;;;;CAKnB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;CAIxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY;;;CAwBvB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* We want to allow for the combination of shadow size and color utilities.
|
|
3
|
+
* Shadow size should default to --color-shadow-default.
|
|
4
|
+
* e.g. className="shadow-md" (size medium / color default)
|
|
5
|
+
* We also want to allow for the combination of shadow size and color utilities.
|
|
6
|
+
* e.g. className="shadow-md shadow-primary" (size medium / color primary)
|
|
7
|
+
*
|
|
8
|
+
* To achieve this we define the following order:
|
|
9
|
+
* size / (color placeholder / color default fallback)
|
|
10
|
+
*/
|
|
11
|
+
export declare const shadows: {
|
|
12
|
+
xs: string;
|
|
13
|
+
sm: string;
|
|
14
|
+
md: string;
|
|
15
|
+
lg: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const shadowColors: {
|
|
18
|
+
default: string;
|
|
19
|
+
primary: string;
|
|
20
|
+
error: string;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* The shadowPlugin is a Tailwind CSS plugin that allows the --shadow-color CSS variable to be set based on the shadow color utility class.
|
|
24
|
+
* This enables the combination of shadow size and color utilities.
|
|
25
|
+
*/
|
|
26
|
+
export declare const shadowPlugin: {
|
|
27
|
+
handler: import("tailwindcss/types/config").PluginCreator;
|
|
28
|
+
config?: Partial<import("tailwindcss/types/config").Config> | undefined;
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=shadows.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shadows.d.mts","sourceRoot":"","sources":["../src/shadows.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AAEH,eAAO,MAAM,OAAO;;;;;CAKnB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;CAIxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY;;;CAwBvB,CAAC"}
|