@shuriken-ui/tailwind 2.0.0-next.8 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -34,7 +34,8 @@ The simplest way to register Shuriken UI is to use `withShurikenUI` helper funct
34
34
  import { withShurikenUI } from '@shuriken-ui/tailwind'
35
35
 
36
36
  export default withShurikenUI({
37
- // your config
37
+ // your tailwind config
38
+ content: [],
38
39
  })
39
40
  ```
40
41
 
@@ -47,8 +48,45 @@ import type { Config } from 'tailwindcss'
47
48
  import preset from '@shuriken-ui/tailwind/preset'
48
49
 
49
50
  export default {
50
- presets: [shurikenUIPreset],
51
- // your config
51
+ // your tailwind config, with the preset
52
+ content: [],
53
+ presets: [preset],
54
+ } satisfies Config
55
+ ```
56
+
57
+
58
+ Also, you can import only the components and utils you needs.
59
+
60
+ ```ts
61
+ // tailwind.config.ts
62
+ import type { Config } from 'tailwindcss'
63
+ import { fontFamily } from 'tailwindcss/defaultTheme'
64
+ import colors from 'tailwindcss/colors'
65
+
66
+ import { input, button } from '@shuriken-ui/tailwind/plugins'
67
+
68
+ export default {
69
+ // your tailwind config, with only the components you need
70
+ plugins: [input, button],
71
+ theme: {
72
+ fontFamily: {
73
+ sans: fontFamily.sans,
74
+ heading: fontFamily.sans,
75
+ alt: fontFamily.sans,
76
+ mono: fontFamily.mono,
77
+ },
78
+ extend: {
79
+ colors: {
80
+ primary: colors.violet,
81
+ 'primary-invert': colors.white,
82
+ muted: colors.slate,
83
+ info: colors.sky,
84
+ success: colors.teal,
85
+ warning: colors.amber,
86
+ danger: colors.rose,
87
+ },
88
+ },
89
+ },
52
90
  } satisfies Config
53
91
  ```
54
92
 
@@ -60,7 +98,7 @@ Shuriken UI is fully customizable. You can override components by using the `the
60
98
  export default withShurikenUI({
61
99
  theme: {
62
100
  extend: {
63
- shurikenUi: {
101
+ nui: {
64
102
  // your customizations
65
103
  },
66
104
  },
package/dist/config.cjs CHANGED
@@ -1,12 +1,14 @@
1
1
  'use strict';
2
2
 
3
3
  const preset = require('./preset.cjs');
4
- require('tailwindcss/defaultTheme');
5
- require('tailwindcss/colors');
6
4
  require('@tailwindcss/typography');
7
5
  require('@tailwindcss/container-queries');
6
+ require('./plugins/index.cjs');
8
7
  require('tailwindcss/plugin');
9
8
  require('defu');
9
+ require('./themes.cjs');
10
+ require('tailwindcss/colors');
11
+ require('tailwindcss/defaultTheme');
10
12
 
11
13
  const config = {
12
14
  content: [],
package/dist/config.mjs CHANGED
@@ -1,10 +1,12 @@
1
1
  import { preset } from './preset.mjs';
2
- import 'tailwindcss/defaultTheme';
3
- import 'tailwindcss/colors';
4
2
  import '@tailwindcss/typography';
5
3
  import '@tailwindcss/container-queries';
4
+ import './plugins/index.mjs';
6
5
  import 'tailwindcss/plugin';
7
6
  import 'defu';
7
+ import './themes.mjs';
8
+ import 'tailwindcss/colors';
9
+ import 'tailwindcss/defaultTheme';
8
10
 
9
11
  const config = {
10
12
  content: [],
package/dist/index.cjs CHANGED
@@ -1,12 +1,14 @@
1
1
  'use strict';
2
2
 
3
3
  const preset = require('./preset.cjs');
4
- require('tailwindcss/defaultTheme');
5
- require('tailwindcss/colors');
6
4
  require('@tailwindcss/typography');
7
5
  require('@tailwindcss/container-queries');
6
+ require('./plugins/index.cjs');
8
7
  require('tailwindcss/plugin');
9
8
  require('defu');
9
+ require('./themes.cjs');
10
+ require('tailwindcss/colors');
11
+ require('tailwindcss/defaultTheme');
10
12
 
11
13
  function withShurikenUI(config) {
12
14
  if (preset.hasPreset(config)) {
package/dist/index.d.cts CHANGED
@@ -1,9 +1,11 @@
1
- import { S as ShurikenUIConfig } from './shared/tailwind.d65f80d7.cjs';
2
- export { c as createPreset, h as hasPreset, p as preset } from './shared/tailwind.d65f80d7.cjs';
1
+ import { S as ShurikenUIConfig } from './shared/tailwind.60db5be7.cjs';
2
+ export { c as createPreset, h as hasPreset, p as preset } from './shared/tailwind.60db5be7.cjs';
3
3
  import 'tailwindcss/types/config';
4
4
  import 'tailwindcss';
5
- import '@tailwindcss/typography';
6
5
 
6
+ /**
7
+ * Inject the shuriken-ui preset into a tailwind config if not already present
8
+ */
7
9
  declare function withShurikenUI(config: ShurikenUIConfig): ShurikenUIConfig;
8
10
 
9
11
  export { withShurikenUI };
package/dist/index.d.mts CHANGED
@@ -1,9 +1,11 @@
1
- import { S as ShurikenUIConfig } from './shared/tailwind.d65f80d7.mjs';
2
- export { c as createPreset, h as hasPreset, p as preset } from './shared/tailwind.d65f80d7.mjs';
1
+ import { S as ShurikenUIConfig } from './shared/tailwind.60db5be7.mjs';
2
+ export { c as createPreset, h as hasPreset, p as preset } from './shared/tailwind.60db5be7.mjs';
3
3
  import 'tailwindcss/types/config';
4
4
  import 'tailwindcss';
5
- import '@tailwindcss/typography';
6
5
 
6
+ /**
7
+ * Inject the shuriken-ui preset into a tailwind config if not already present
8
+ */
7
9
  declare function withShurikenUI(config: ShurikenUIConfig): ShurikenUIConfig;
8
10
 
9
11
  export { withShurikenUI };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
- import { S as ShurikenUIConfig } from './shared/tailwind.d65f80d7.js';
2
- export { c as createPreset, h as hasPreset, p as preset } from './shared/tailwind.d65f80d7.js';
1
+ import { S as ShurikenUIConfig } from './shared/tailwind.60db5be7.js';
2
+ export { c as createPreset, h as hasPreset, p as preset } from './shared/tailwind.60db5be7.js';
3
3
  import 'tailwindcss/types/config';
4
4
  import 'tailwindcss';
5
- import '@tailwindcss/typography';
6
5
 
6
+ /**
7
+ * Inject the shuriken-ui preset into a tailwind config if not already present
8
+ */
7
9
  declare function withShurikenUI(config: ShurikenUIConfig): ShurikenUIConfig;
8
10
 
9
11
  export { withShurikenUI };
package/dist/index.mjs CHANGED
@@ -1,11 +1,13 @@
1
1
  import { hasPreset, preset } from './preset.mjs';
2
2
  export { createPreset } from './preset.mjs';
3
- import 'tailwindcss/defaultTheme';
4
- import 'tailwindcss/colors';
5
3
  import '@tailwindcss/typography';
6
4
  import '@tailwindcss/container-queries';
5
+ import './plugins/index.mjs';
7
6
  import 'tailwindcss/plugin';
8
7
  import 'defu';
8
+ import './themes.mjs';
9
+ import 'tailwindcss/colors';
10
+ import 'tailwindcss/defaultTheme';
9
11
 
10
12
  function withShurikenUI(config) {
11
13
  if (hasPreset(config)) {