@udixio/theme 1.0.0-beta.18 → 1.0.0-beta.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@udixio/theme",
3
- "version": "1.0.0-beta.18",
3
+ "version": "1.0.0-beta.19",
4
4
  "license": "MIT",
5
5
  "author": "vigreux-joël",
6
6
  "exports": {
@@ -7,8 +7,8 @@ import { FontPlugin } from '../font/font.plugin';
7
7
  import { font } from './plugins-tailwind/font';
8
8
 
9
9
  interface TailwindPluginOptions {
10
- darkMode: 'class' | 'media';
11
- responsiveBreakPoints: Record<string, number>;
10
+ darkMode?: 'class' | 'media';
11
+ responsiveBreakPoints?: Record<string, number>;
12
12
  }
13
13
 
14
14
  export class TailwindPlugin extends PluginAbstract {
@@ -17,6 +17,10 @@ export class TailwindPlugin extends PluginAbstract {
17
17
  protected appService: AppService,
18
18
  protected options: TailwindPluginOptions
19
19
  ) {
20
+ options.darkMode ??= 'class';
21
+ options.responsiveBreakPoints ??= {
22
+ lg: 1.125,
23
+ };
20
24
  super();
21
25
  }
22
26
  static config(options: TailwindPluginOptions): TailwindPluginOptions {
@@ -52,8 +56,8 @@ export class TailwindPlugin extends PluginAbstract {
52
56
  fontFamily: fontFamily,
53
57
  plugins: [
54
58
  state(Object.keys(colors)),
55
- themer(colors, this.options.darkMode),
56
- font(fontStyles, this.options.responsiveBreakPoints),
59
+ themer(colors, this.options.darkMode!),
60
+ font(fontStyles, this.options.responsiveBreakPoints!),
57
61
  ],
58
62
  };
59
63
  }