@byyuurin/ui 0.0.0 → 0.0.2

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
@@ -8,12 +8,46 @@ A collection of Vue.js components for my projects.
8
8
  [![JSDocs][jsdocs-src]][jsdocs-href]
9
9
  [![License][license-src]][license-href]
10
10
 
11
- ## Setup
11
+ ## Preview
12
+
13
+ https://byyuurin-ui.netlify.app/
14
+
15
+ ## Installation
12
16
 
13
17
  ```ssh
14
18
  pnpm i @byyuurin/ui
15
19
  ```
16
20
 
21
+ ## UnoCSS
22
+
23
+ ```ts
24
+ // uno.config.ts
25
+ import ui from '@byyuurin/ui/unocss-preset'
26
+ import { defineConfig, presetIcons, presetUno } from 'unocss'
27
+
28
+ export default defineConfig({
29
+ presets: [
30
+ presetUno(),
31
+ presetIcons(),
32
+ ui(),
33
+ ],
34
+ content: {
35
+ pipeline: {
36
+ include: [
37
+ /\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/,
38
+ /\/(?:theme).*\.(ts|m?js)($|\?)/,
39
+ ],
40
+ },
41
+ },
42
+ })
43
+ ```
44
+
45
+ ## Credits
46
+
47
+ - [UnoCSS](https://github.com/unocss/unocss)
48
+ - [daisyui](https://github.com/saadeghi/daisyui)
49
+ - [@nuxt/ui](https://github.com/nuxt/ui)
50
+
17
51
  ## License
18
52
 
19
53
  [MIT](./LICENSE) License © 2024-PRESENT [Yuurin](https://github.com/byyurin)
@@ -1,3 +1,3 @@
1
1
  import type { CRRule } from '@byyuurin/ui-kit';
2
- import type { ConfigBase } from '@unocss/core';
2
+ import type { ConfigBase } from 'unocss';
3
3
  export declare function transformUnoRules<Theme extends object = object>(config?: ConfigBase<Theme>): CRRule[];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@byyuurin/ui",
3
3
  "type": "module",
4
- "version": "0.0.0",
4
+ "version": "0.0.2",
5
5
  "description": "",
6
6
  "author": "Yuurin <byyuurin@gmail.com>",
7
7
  "license": "MIT",
@@ -46,28 +46,34 @@
46
46
  "dist"
47
47
  ],
48
48
  "peerDependencies": {
49
+ "nuxt": "^3.13.1",
50
+ "unocss": "^65.4.3",
49
51
  "vue": "^3.5.13"
50
52
  },
53
+ "peerDependenciesMeta": {
54
+ "nuxt": {
55
+ "optional": true
56
+ }
57
+ },
51
58
  "dependencies": {
52
59
  "@byyuurin/ui-kit": "^0.3.3",
60
+ "@nuxt/kit": "^3.15.4",
53
61
  "@unocss/core": "^65.4.3",
54
62
  "@unocss/preset-mini": "^65.4.3",
55
63
  "@unocss/preset-uno": "^65.4.3",
56
64
  "@vueuse/core": "^12.5.0",
57
65
  "defu": "^6.1.4",
58
- "nuxt": "^3.15.3",
59
66
  "ohash": "^1.1.4",
60
67
  "reka-ui": "1.0.0-alpha.8",
61
- "vaul-vue": "^0.2.0",
68
+ "vaul-vue": "^0.2.1",
62
69
  "vue-component-type-helpers": "^2.2.0"
63
70
  },
64
71
  "devDependencies": {
65
- "@antfu/ni": "^23.3.0",
72
+ "@antfu/ni": "^23.3.1",
66
73
  "@byyuurin/eslint-config": "^1.7.0",
67
- "@nuxt/kit": "^3.15.3",
68
- "@nuxt/schema": "^3.15.3",
69
- "@types/node": "^22.12.0",
70
- "bumpp": "^9.11.1",
74
+ "@nuxt/schema": "^3.15.4",
75
+ "@types/node": "^22.13.0",
76
+ "bumpp": "^10.0.1",
71
77
  "eslint": "^9.19.0",
72
78
  "eslint-plugin-format": "1.0.1",
73
79
  "esno": "^4.8.0",
@@ -76,7 +82,7 @@
76
82
  "typescript": "^5.7.3",
77
83
  "unbuild": "^3.3.1",
78
84
  "unplugin-vue-components": "^28.0.0",
79
- "vitest": "^2.1.8",
85
+ "vitest": "^3.0.4",
80
86
  "vue": "^3.5.13",
81
87
  "vue-tsc": "^2.2.0"
82
88
  },
@@ -1 +0,0 @@
1
- export {};
@@ -1,45 +0,0 @@
1
- import { describe, expect, it } from "vitest";
2
- import { link } from "../theme/index.mjs";
3
- import { extendTheme } from "./extend-theme.mjs";
4
- describe("check defu result", () => {
5
- it("should merge", () => {
6
- const ui = {
7
- base: "el-link",
8
- variants: {
9
- active: {
10
- true: "el-link--active",
11
- false: " "
12
- }
13
- }
14
- };
15
- const result = extendTheme(ui, link);
16
- expect(result).toMatchInlineSnapshot(`
17
- {
18
- "base": "border-y border-t-transparent focus-visible:outline-ui-cb el-link",
19
- "compoundVariants": undefined,
20
- "slots": undefined,
21
- "variants": {
22
- "active": {
23
- "false": [
24
- "color-ui-cb hover:color-ui-cb/80 transition-colors",
25
- "disabled:hover:color-ui-cb aria-disabled:hover:color-ui-cb",
26
- " ",
27
- ],
28
- "true": [
29
- "color-ui-fill",
30
- "disabled:color-ui-fill aria-disabled:color-ui-fill",
31
- "el-link--active",
32
- ],
33
- },
34
- "disabled": {
35
- "true": "cursor-not-allowed opacity-50",
36
- },
37
- "underline": {
38
- "false": "border-transparent",
39
- "true": "border-current",
40
- },
41
- },
42
- }
43
- `);
44
- });
45
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- import { cr } from "@byyuurin/ui-kit";
2
- import { describe, expect, it } from "vitest";
3
- import { mergeRules } from "../composables/useTheme.mjs";
4
- describe("check style merge", () => {
5
- const merge = cr(mergeRules, { debug: true });
6
- it("should...", () => {
7
- const result = merge("grid gap-10 grid-cols-10 scale-1 translate-y-full");
8
- expect(result).toMatchInlineSnapshot(`"grid gap grid-cols-10 scale translate-y"`);
9
- });
10
- });