@shuriken-ui/tailwind 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
package/README.md ADDED
@@ -0,0 +1,53 @@
1
+ <p align="center">
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">
6
+ </picture>
7
+ </p>
8
+
9
+
10
+ <p align="center">
11
+ <a href="https://cssninja.io" title="Our official website">by <strong>cssninja.io</strong></a>
12
+ </p>
13
+
14
+ ---
15
+
16
+ ## Shuriken UI - Tailwind CSS
17
+
18
+ Shuriken UI is a free and open-source Tailwind CSS UI Kit. It is a collection of components and templates that you can use to build your next Tailwind CSS project.
19
+
20
+ This package contains the Tailwind CSS preset, components, and shared utils like custom colors used in Shuriken UI.
21
+
22
+ ## Installation
23
+
24
+ ```bash
25
+ pnpm install -D @shuriken-ui/tailwind
26
+ ```
27
+
28
+ ## Usage
29
+
30
+ The simplest way to register Shuriken UI is to use `withShurikenUI` helper function.
31
+
32
+ ```ts
33
+ // tailwind.config.ts
34
+ import { withShurikenUI } from '@shuriken-ui/tailwind'
35
+
36
+ export default withShurikenUI({
37
+ // your config
38
+ })
39
+ ```
40
+
41
+
42
+ You can also direcly import the preset and use it in your config.
43
+
44
+ ```ts
45
+ // tailwind.config.ts
46
+ import type { Config } from 'tailwindcss'
47
+ import preset from '@shuriken-ui/tailwind/preset'
48
+
49
+ export default {
50
+ presets: [shurikenUIPreset],
51
+ // your config
52
+ } satisfies Config
53
+ ```
package/dist/config.d.ts CHANGED
@@ -18,10 +18,10 @@ declare const _default: {
18
18
  })[];
19
19
  theme: {
20
20
  fontFamily: {
21
- sans: [string, string];
22
- heading: [string, string];
23
- alt: [string, string];
24
- mono: [string, string];
21
+ sans: string[];
22
+ heading: string[];
23
+ alt: string[];
24
+ mono: string[];
25
25
  };
26
26
  extend: {
27
27
  colors: {
package/dist/index.d.ts CHANGED
@@ -18,10 +18,10 @@ declare function withShurikenUI(userConfig: Config): Omit<Config, "presets" | "c
18
18
  })[];
19
19
  theme: {
20
20
  fontFamily: {
21
- sans: [string, string];
22
- heading: [string, string];
23
- alt: [string, string];
24
- mono: [string, string];
21
+ sans: string[];
22
+ heading: string[];
23
+ alt: string[];
24
+ mono: string[];
25
25
  };
26
26
  extend: {
27
27
  colors: {
@@ -235,10 +235,10 @@ declare function withShurikenUI(userConfig: Config): Omit<Config, "presets" | "c
235
235
  })[];
236
236
  theme: {
237
237
  fontFamily: {
238
- sans: [string, string];
239
- heading: [string, string];
240
- alt: [string, string];
241
- mono: [string, string];
238
+ sans: string[];
239
+ heading: string[];
240
+ alt: string[];
241
+ mono: string[];
242
242
  };
243
243
  extend: {
244
244
  colors: {
@@ -450,10 +450,10 @@ declare function withShurikenUI(userConfig: Config): Omit<Config, "presets" | "c
450
450
  })[];
451
451
  theme: {
452
452
  fontFamily: {
453
- sans: [string, string];
454
- heading: [string, string];
455
- alt: [string, string];
456
- mono: [string, string];
453
+ sans: string[];
454
+ heading: string[];
455
+ alt: string[];
456
+ mono: string[];
457
457
  };
458
458
  extend: {
459
459
  colors: {
package/dist/preset.cjs CHANGED
@@ -164,16 +164,42 @@ const shurikenUIComponents = plugin__default.withOptions(
164
164
  }
165
165
  );
166
166
 
167
+ const sansSystemFont = [
168
+ "ui-sans-serif",
169
+ "system-ui",
170
+ "-apple-system",
171
+ "BlinkMacSystemFont",
172
+ '"Segoe UI"',
173
+ "Roboto",
174
+ '"Helvetica Neue"',
175
+ "Arial",
176
+ '"Noto Sans"',
177
+ "sans-serif",
178
+ '"Apple Color Emoji"',
179
+ '"Segoe UI Emoji"',
180
+ '"Segoe UI Symbol"',
181
+ '"Noto Color Emoji"'
182
+ ];
183
+ const monoSystemFont = [
184
+ "ui-monospace",
185
+ "SFMono-Regular",
186
+ "Menlo",
187
+ "Monaco",
188
+ "Consolas",
189
+ '"Liberation Mono"',
190
+ '"Courier New"',
191
+ "monospace"
192
+ ];
167
193
  const shurikenUIPreset = {
168
194
  darkMode: "class",
169
195
  content: [],
170
196
  plugins: [typography__default, aspectRatio__default, shurikenUIComponents],
171
197
  theme: {
172
198
  fontFamily: {
173
- sans: ["Roboto Flex", "sans-serif"],
174
- heading: ["Inter", "sans-serif"],
175
- alt: ["Karla", "sans-serif"],
176
- mono: ["ui-monospace", "monospace"]
199
+ sans: sansSystemFont,
200
+ heading: sansSystemFont,
201
+ alt: sansSystemFont,
202
+ mono: monoSystemFont
177
203
  },
178
204
  extend: {
179
205
  colors: {
package/dist/preset.d.ts CHANGED
@@ -16,10 +16,10 @@ declare const _default: {
16
16
  })[];
17
17
  theme: {
18
18
  fontFamily: {
19
- sans: [string, string];
20
- heading: [string, string];
21
- alt: [string, string];
22
- mono: [string, string];
19
+ sans: string[];
20
+ heading: string[];
21
+ alt: string[];
22
+ mono: string[];
23
23
  };
24
24
  extend: {
25
25
  colors: {
package/dist/preset.mjs CHANGED
@@ -155,16 +155,42 @@ const shurikenUIComponents = plugin.withOptions(
155
155
  }
156
156
  );
157
157
 
158
+ const sansSystemFont = [
159
+ "ui-sans-serif",
160
+ "system-ui",
161
+ "-apple-system",
162
+ "BlinkMacSystemFont",
163
+ '"Segoe UI"',
164
+ "Roboto",
165
+ '"Helvetica Neue"',
166
+ "Arial",
167
+ '"Noto Sans"',
168
+ "sans-serif",
169
+ '"Apple Color Emoji"',
170
+ '"Segoe UI Emoji"',
171
+ '"Segoe UI Symbol"',
172
+ '"Noto Color Emoji"'
173
+ ];
174
+ const monoSystemFont = [
175
+ "ui-monospace",
176
+ "SFMono-Regular",
177
+ "Menlo",
178
+ "Monaco",
179
+ "Consolas",
180
+ '"Liberation Mono"',
181
+ '"Courier New"',
182
+ "monospace"
183
+ ];
158
184
  const shurikenUIPreset = {
159
185
  darkMode: "class",
160
186
  content: [],
161
187
  plugins: [typography, aspectRatio, shurikenUIComponents],
162
188
  theme: {
163
189
  fontFamily: {
164
- sans: ["Roboto Flex", "sans-serif"],
165
- heading: ["Inter", "sans-serif"],
166
- alt: ["Karla", "sans-serif"],
167
- mono: ["ui-monospace", "monospace"]
190
+ sans: sansSystemFont,
191
+ heading: sansSystemFont,
192
+ alt: sansSystemFont,
193
+ mono: monoSystemFont
168
194
  },
169
195
  extend: {
170
196
  colors: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shuriken-ui/tailwind",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "license": "MIT",
5
5
  "author": "Css Ninja <hello@cssninja.io> (https://cssninja.io)",
6
6
  "repository": "shuriken-ui/tailwind",