@shuriken-ui/tailwind 2.0.0-next.9 → 2.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/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  <p align="center">
2
2
  <picture>
3
- <source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/3911343/232132279-8d8bf0ad-b1d7-4802-984e-a696763dc6cd.png">
4
- <source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/3911343/232132309-62971744-dcdb-429c-aa93-6ba0c1caac42.png">
5
- <img alt="Shuriken UI logo" src="https://user-images.githubusercontent.com/3911343/232132309-62971744-dcdb-429c-aa93-6ba0c1caac42.png">
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://github.com/shuriken-ui/.github/assets/86636408/278e3026-1997-4e01-9457-20772adbce31">
4
+ <source media="(prefers-color-scheme: light)" srcset="https://github.com/shuriken-ui/.github/assets/86636408/06f9d8e2-38aa-45b2-b91e-1c891a20e271">
5
+ <img alt="Shuriken UI logo" src="https://github.com/shuriken-ui/.github/assets/86636408/06f9d8e2-38aa-45b2-b91e-1c891a20e271">
6
6
  </picture>
7
7
  </p>
8
8
 
@@ -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)) {