xc-computent 0.1.0
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 +121 -0
- package/dist/components/Badge/Badge.vue.d.ts +45 -0
- package/dist/components/Badge/index.d.ts +4 -0
- package/dist/components/Button/Button.vue.d.ts +54 -0
- package/dist/components/Button/index.d.ts +4 -0
- package/dist/computent.js +82 -0
- package/dist/computent.umd.cjs +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/style.css +1 -0
- package/package.json +46 -0
package/README.md
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Computent Component Library
|
|
2
|
+
|
|
3
|
+
A premium, responsive, and performance-focused Vue 3 component library built with Vite, TypeScript, and native CSS custom properties.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- ⚡ **Vite-powered**: Extremely fast hot-module replacement (HMR) for development and rollup-based bundles.
|
|
10
|
+
- 📦 **Tree-shakeable**: Import only the components you use.
|
|
11
|
+
- 🎨 **Premium Styling**: Sleek, customizable modern dark-theme/slate design tokens.
|
|
12
|
+
- 🏷️ **Type Safe**: First-class TypeScript support with auto-generated declaration (`.d.ts`) files.
|
|
13
|
+
- 🧩 **Zero Globals Leakage**: Component isolation scoped styles.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 🛠️ Local Development & Playground
|
|
18
|
+
|
|
19
|
+
To run the interactive component playground and test your changes:
|
|
20
|
+
|
|
21
|
+
### 1. Install Dependencies
|
|
22
|
+
```bash
|
|
23
|
+
pnpm install
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### 2. Run Local Development Server
|
|
27
|
+
Starts the playground on `http://localhost:5173` using Vite:
|
|
28
|
+
```bash
|
|
29
|
+
pnpm dev
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### 3. Build the Library
|
|
33
|
+
Bundles the components into ESM and UMD formats under the `dist/` folder, and generates all `.d.ts` declaration files:
|
|
34
|
+
```bash
|
|
35
|
+
pnpm build
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### 4. Local Build Preview
|
|
39
|
+
Previews the bundled output locally:
|
|
40
|
+
```bash
|
|
41
|
+
pnpm preview
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 🚀 How to Publish to npm
|
|
47
|
+
|
|
48
|
+
Follow these step-by-step instructions to publish this library to the npm registry:
|
|
49
|
+
|
|
50
|
+
### Step 1: Customize Your Package Name
|
|
51
|
+
Before publishing, open `package.json` and change the `"name"` property to your desired name (e.g. `"my-awesome-components"`). Ensure the name is unique on npm.
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"name": "computent",
|
|
55
|
+
"version": "0.1.0",
|
|
56
|
+
...
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Step 2: Log In to npm
|
|
61
|
+
Run the following command in your terminal and follow the prompts to log in (or register):
|
|
62
|
+
```bash
|
|
63
|
+
npm login
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Step 3: Run the Build
|
|
67
|
+
Always compile the latest code before publishing:
|
|
68
|
+
```bash
|
|
69
|
+
pnpm build
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Step 4: Publish to the Registry
|
|
73
|
+
Publish the package to the npm registry. Since we configured `"files": ["dist"]` in `package.json`, only the bundled production code will be uploaded:
|
|
74
|
+
```bash
|
|
75
|
+
npm publish
|
|
76
|
+
```
|
|
77
|
+
*Note: If you are using a scoped package name (e.g. `@my-org/computent`), you should publish it as public using:*
|
|
78
|
+
```bash
|
|
79
|
+
npm publish --access public
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 📦 How to Use the Published Library
|
|
85
|
+
|
|
86
|
+
### 1. Installation
|
|
87
|
+
Install the package from npm (replace `computent` with your published package name):
|
|
88
|
+
```bash
|
|
89
|
+
npm install computent
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 2. Usage Option A: Global Registration (Vue Plugin)
|
|
93
|
+
Import the library and its styles in your `main.ts` / `main.js`:
|
|
94
|
+
```typescript
|
|
95
|
+
import { createApp } from 'vue';
|
|
96
|
+
import App from './App.vue';
|
|
97
|
+
|
|
98
|
+
// Import the component library & its styles
|
|
99
|
+
import Computent from 'computent';
|
|
100
|
+
import 'computent/dist/style.css';
|
|
101
|
+
|
|
102
|
+
const app = createApp(App);
|
|
103
|
+
app.use(Computent); // Registers <CButton> and <CBadge> globally
|
|
104
|
+
app.mount('#app');
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### 3. Usage Option B: Individual Import (Tree-shaking)
|
|
108
|
+
Import only the components you need directly inside your `.vue` files:
|
|
109
|
+
```html
|
|
110
|
+
<template>
|
|
111
|
+
<div>
|
|
112
|
+
<Button variant="primary" size="md">Click Me</Button>
|
|
113
|
+
<Badge type="success" dot>Online</Badge>
|
|
114
|
+
</div>
|
|
115
|
+
</template>
|
|
116
|
+
|
|
117
|
+
<script setup lang="ts">
|
|
118
|
+
import { Button, Badge } from 'computent';
|
|
119
|
+
import 'computent/dist/style.css'; // Don't forget to import styles!
|
|
120
|
+
</script>
|
|
121
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
interface BadgeProps {
|
|
2
|
+
type?: 'default' | 'success' | 'warning' | 'danger' | 'info';
|
|
3
|
+
variant?: 'filled' | 'subtle' | 'outline';
|
|
4
|
+
dot?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
default?(_: {}): any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BadgeProps>, {
|
|
10
|
+
type: string;
|
|
11
|
+
variant: string;
|
|
12
|
+
dot: boolean;
|
|
13
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BadgeProps>, {
|
|
14
|
+
type: string;
|
|
15
|
+
variant: string;
|
|
16
|
+
dot: boolean;
|
|
17
|
+
}>>> & Readonly<{}>, {
|
|
18
|
+
type: "default" | "success" | "warning" | "danger" | "info";
|
|
19
|
+
variant: "filled" | "subtle" | "outline";
|
|
20
|
+
dot: boolean;
|
|
21
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
22
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
25
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
26
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
27
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
28
|
+
} : {
|
|
29
|
+
type: import('vue').PropType<T[K]>;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
type __VLS_WithDefaults<P, D> = {
|
|
34
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
35
|
+
default: D[K];
|
|
36
|
+
}> : P[K];
|
|
37
|
+
};
|
|
38
|
+
type __VLS_Prettify<T> = {
|
|
39
|
+
[K in keyof T]: T[K];
|
|
40
|
+
} & {};
|
|
41
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
interface ButtonProps {
|
|
2
|
+
variant?: 'primary' | 'secondary' | 'outline' | 'text' | 'danger';
|
|
3
|
+
size?: 'sm' | 'md' | 'lg';
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
icon?(_: {}): any;
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ButtonProps>, {
|
|
12
|
+
variant: string;
|
|
13
|
+
size: string;
|
|
14
|
+
loading: boolean;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
17
|
+
click: (event: MouseEvent) => void;
|
|
18
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ButtonProps>, {
|
|
19
|
+
variant: string;
|
|
20
|
+
size: string;
|
|
21
|
+
loading: boolean;
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
}>>> & Readonly<{
|
|
24
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
variant: "primary" | "secondary" | "outline" | "text" | "danger";
|
|
27
|
+
size: "sm" | "md" | "lg";
|
|
28
|
+
loading: boolean;
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
31
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
34
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
35
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
36
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
37
|
+
} : {
|
|
38
|
+
type: import('vue').PropType<T[K]>;
|
|
39
|
+
required: true;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
type __VLS_WithDefaults<P, D> = {
|
|
43
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
44
|
+
default: D[K];
|
|
45
|
+
}> : P[K];
|
|
46
|
+
};
|
|
47
|
+
type __VLS_Prettify<T> = {
|
|
48
|
+
[K in keyof T]: T[K];
|
|
49
|
+
} & {};
|
|
50
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
51
|
+
new (): {
|
|
52
|
+
$slots: S;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { defineComponent as m, openBlock as a, createElementBlock as s, normalizeClass as u, createCommentVNode as l, renderSlot as i, createElementVNode as r } from "vue";
|
|
2
|
+
const f = ["disabled"], p = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "comp-btn__spinner"
|
|
5
|
+
}, g = {
|
|
6
|
+
key: 1,
|
|
7
|
+
class: "comp-btn__icon"
|
|
8
|
+
}, _ = { class: "comp-btn__content" }, v = /* @__PURE__ */ m({
|
|
9
|
+
__name: "Button",
|
|
10
|
+
props: {
|
|
11
|
+
variant: { default: "primary" },
|
|
12
|
+
size: { default: "md" },
|
|
13
|
+
loading: { type: Boolean, default: !1 },
|
|
14
|
+
disabled: { type: Boolean, default: !1 }
|
|
15
|
+
},
|
|
16
|
+
emits: ["click"],
|
|
17
|
+
setup(t, { emit: o }) {
|
|
18
|
+
const e = t, d = o, c = (n) => {
|
|
19
|
+
!e.disabled && !e.loading && d("click", n);
|
|
20
|
+
};
|
|
21
|
+
return (n, z) => (a(), s("button", {
|
|
22
|
+
class: u([
|
|
23
|
+
"comp-btn",
|
|
24
|
+
`comp-btn--${t.variant}`,
|
|
25
|
+
`comp-btn--${t.size}`,
|
|
26
|
+
{
|
|
27
|
+
"comp-btn--loading": t.loading,
|
|
28
|
+
"comp-btn--disabled": t.disabled || t.loading
|
|
29
|
+
}
|
|
30
|
+
]),
|
|
31
|
+
disabled: t.disabled || t.loading,
|
|
32
|
+
onClick: c
|
|
33
|
+
}, [
|
|
34
|
+
t.loading ? (a(), s("span", p)) : l("", !0),
|
|
35
|
+
n.$slots.icon && !t.loading ? (a(), s("span", g, [
|
|
36
|
+
i(n.$slots, "icon", {}, void 0, !0)
|
|
37
|
+
])) : l("", !0),
|
|
38
|
+
r("span", _, [
|
|
39
|
+
i(n.$slots, "default", {}, void 0, !0)
|
|
40
|
+
])
|
|
41
|
+
], 10, f));
|
|
42
|
+
}
|
|
43
|
+
}), b = (t, o) => {
|
|
44
|
+
const e = t.__vccOpts || t;
|
|
45
|
+
for (const [d, c] of o)
|
|
46
|
+
e[d] = c;
|
|
47
|
+
return e;
|
|
48
|
+
}, B = /* @__PURE__ */ b(v, [["__scopeId", "data-v-7c40bef2"]]), $ = {
|
|
49
|
+
key: 0,
|
|
50
|
+
class: "comp-badge__dot"
|
|
51
|
+
}, h = { class: "comp-badge__content" }, k = /* @__PURE__ */ m({
|
|
52
|
+
__name: "Badge",
|
|
53
|
+
props: {
|
|
54
|
+
type: { default: "default" },
|
|
55
|
+
variant: { default: "subtle" },
|
|
56
|
+
dot: { type: Boolean, default: !1 }
|
|
57
|
+
},
|
|
58
|
+
setup(t) {
|
|
59
|
+
return (o, e) => (a(), s("span", {
|
|
60
|
+
class: u([
|
|
61
|
+
"comp-badge",
|
|
62
|
+
`comp-badge--${t.type}`,
|
|
63
|
+
`comp-badge--${t.variant}`,
|
|
64
|
+
{ "comp-badge--has-dot": t.dot }
|
|
65
|
+
])
|
|
66
|
+
}, [
|
|
67
|
+
t.dot ? (a(), s("span", $)) : l("", !0),
|
|
68
|
+
r("span", h, [
|
|
69
|
+
i(o.$slots, "default", {}, void 0, !0)
|
|
70
|
+
])
|
|
71
|
+
], 2));
|
|
72
|
+
}
|
|
73
|
+
}), y = /* @__PURE__ */ b(k, [["__scopeId", "data-v-158f78af"]]), C = (t) => {
|
|
74
|
+
t.component("CButton", B), t.component("CBadge", y);
|
|
75
|
+
}, I = {
|
|
76
|
+
install: C
|
|
77
|
+
};
|
|
78
|
+
export {
|
|
79
|
+
y as Badge,
|
|
80
|
+
B as Button,
|
|
81
|
+
I as default
|
|
82
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n.Computent={},n.Vue))})(this,function(n,e){"use strict";const r=["disabled"],f={key:0,class:"comp-btn__spinner"},p={key:1,class:"comp-btn__icon"},b={class:"comp-btn__content"},u=e.defineComponent({__name:"Button",props:{variant:{default:"primary"},size:{default:"md"},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:a}){const o=t,d=a,l=c=>{!o.disabled&&!o.loading&&d("click",c)};return(c,y)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["comp-btn",`comp-btn--${t.variant}`,`comp-btn--${t.size}`,{"comp-btn--loading":t.loading,"comp-btn--disabled":t.disabled||t.loading}]),disabled:t.disabled||t.loading,onClick:l},[t.loading?(e.openBlock(),e.createElementBlock("span",f)):e.createCommentVNode("",!0),c.$slots.icon&&!t.loading?(e.openBlock(),e.createElementBlock("span",p,[e.renderSlot(c.$slots,"icon",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("span",b,[e.renderSlot(c.$slots,"default",{},void 0,!0)])],10,r))}}),s=(t,a)=>{const o=t.__vccOpts||t;for(const[d,l]of a)o[d]=l;return o},i=s(u,[["__scopeId","data-v-7c40bef2"]]),B={key:0,class:"comp-badge__dot"},g={class:"comp-badge__content"},m=s(e.defineComponent({__name:"Badge",props:{type:{default:"default"},variant:{default:"subtle"},dot:{type:Boolean,default:!1}},setup(t){return(a,o)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["comp-badge",`comp-badge--${t.type}`,`comp-badge--${t.variant}`,{"comp-badge--has-dot":t.dot}])},[t.dot?(e.openBlock(),e.createElementBlock("span",B)):e.createCommentVNode("",!0),e.createElementVNode("span",g,[e.renderSlot(a.$slots,"default",{},void 0,!0)])],2))}}),[["__scopeId","data-v-158f78af"]]),k={install:t=>{t.component("CButton",i),t.component("CBadge",m)}};n.Badge=m,n.Button=i,n.default=k,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/index.d.ts
ADDED
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.comp-btn[data-v-7c40bef2]{display:inline-flex;align-items:center;justify-content:center;font-family:var(--comp-font-sans, system-ui, sans-serif);font-weight:600;border-radius:var(--comp-radius-md, 8px);border:1px solid transparent;cursor:pointer;outline:none;position:relative;overflow:hidden;-webkit-user-select:none;user-select:none;white-space:nowrap;vertical-align:middle;transition:all var(--comp-transition-fast, .2s)}.comp-btn--sm[data-v-7c40bef2]{padding:6px 12px;font-size:13px;border-radius:var(--comp-radius-sm, 6px)}.comp-btn--md[data-v-7c40bef2]{padding:10px 18px;font-size:14px;border-radius:var(--comp-radius-md, 10px)}.comp-btn--lg[data-v-7c40bef2]{padding:14px 24px;font-size:16px;border-radius:var(--comp-radius-lg, 14px)}.comp-btn--primary[data-v-7c40bef2]{background-color:var(--comp-primary);color:#fff;box-shadow:var(--comp-shadow-sm)}.comp-btn--primary[data-v-7c40bef2]:hover:not(.comp-btn--disabled){background-color:var(--comp-primary-hover);box-shadow:var(--comp-shadow-glow);transform:translateY(-1px)}.comp-btn--primary[data-v-7c40bef2]:active:not(.comp-btn--disabled){background-color:var(--comp-primary-active);transform:translateY(0)}.comp-btn--secondary[data-v-7c40bef2]{background-color:var(--comp-bg-card);border-color:var(--comp-border);color:var(--comp-text-primary)}.comp-btn--secondary[data-v-7c40bef2]:hover:not(.comp-btn--disabled){background-color:var(--comp-bg-hover);border-color:var(--comp-border-hover);transform:translateY(-1px)}.comp-btn--secondary[data-v-7c40bef2]:active:not(.comp-btn--disabled){background-color:var(--comp-bg-card);transform:translateY(0)}.comp-btn--outline[data-v-7c40bef2]{background-color:transparent;border-color:var(--comp-primary);color:var(--comp-primary)}.comp-btn--outline[data-v-7c40bef2]:hover:not(.comp-btn--disabled){background-color:#6366f114;transform:translateY(-1px)}.comp-btn--outline[data-v-7c40bef2]:active:not(.comp-btn--disabled){background-color:#6366f129;transform:translateY(0)}.comp-btn--text[data-v-7c40bef2]{background-color:transparent;border-color:transparent;color:var(--comp-text-secondary)}.comp-btn--text[data-v-7c40bef2]:hover:not(.comp-btn--disabled){color:var(--comp-text-primary);background-color:#ffffff0d}.comp-btn--text[data-v-7c40bef2]:active:not(.comp-btn--disabled){background-color:#ffffff1a}.comp-btn--danger[data-v-7c40bef2]{background-color:var(--comp-danger);color:#fff}.comp-btn--danger[data-v-7c40bef2]:hover:not(.comp-btn--disabled){background-color:var(--comp-danger-hover);transform:translateY(-1px)}.comp-btn--danger[data-v-7c40bef2]:active:not(.comp-btn--disabled){background-color:var(--comp-danger-active);transform:translateY(0)}.comp-btn--disabled[data-v-7c40bef2]{opacity:.6;cursor:not-allowed;transform:none!important;box-shadow:none!important}.comp-btn__icon[data-v-7c40bef2]{display:inline-flex;align-items:center;justify-content:center;margin-right:6px;font-size:1.1em}.comp-btn__content[data-v-7c40bef2]{display:inline-flex;align-items:center}.comp-btn__spinner[data-v-7c40bef2]{width:14px;height:14px;border:2px solid currentColor;border-bottom-color:transparent;border-radius:50%;display:inline-block;margin-right:8px;animation:comp-spin-7c40bef2 .75s linear infinite}@keyframes comp-spin-7c40bef2{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.comp-badge[data-v-158f78af]{display:inline-flex;align-items:center;justify-content:center;font-family:var(--comp-font-sans, system-ui, sans-serif);font-weight:600;font-size:11px;letter-spacing:.03em;text-transform:uppercase;padding:3px 8px;border-radius:var(--comp-radius-full, 9999px);line-height:1;border:1px solid transparent;-webkit-user-select:none;user-select:none;transition:all var(--comp-transition-fast, .2s)}.comp-badge--default.comp-badge--filled[data-v-158f78af]{background-color:var(--comp-text-secondary);color:var(--comp-bg-main)}.comp-badge--default.comp-badge--subtle[data-v-158f78af]{background-color:var(--comp-bg-hover);color:var(--comp-text-primary);border-color:var(--comp-border)}.comp-badge--default.comp-badge--outline[data-v-158f78af]{background-color:transparent;border-color:var(--comp-text-muted);color:var(--comp-text-secondary)}.comp-badge--success.comp-badge--filled[data-v-158f78af]{background-color:var(--comp-success);color:#fff}.comp-badge--success.comp-badge--subtle[data-v-158f78af]{background-color:#10b9811f;color:#34d399;border-color:#10b98133}.comp-badge--success.comp-badge--outline[data-v-158f78af]{background-color:transparent;border-color:var(--comp-success);color:var(--comp-success)}.comp-badge--warning.comp-badge--filled[data-v-158f78af]{background-color:var(--comp-warning);color:#fff}.comp-badge--warning.comp-badge--subtle[data-v-158f78af]{background-color:#f59e0b1f;color:#fbbf24;border-color:#f59e0b33}.comp-badge--warning.comp-badge--outline[data-v-158f78af]{background-color:transparent;border-color:var(--comp-warning);color:var(--comp-warning)}.comp-badge--danger.comp-badge--filled[data-v-158f78af]{background-color:var(--comp-danger);color:#fff}.comp-badge--danger.comp-badge--subtle[data-v-158f78af]{background-color:#ef44441f;color:#fca5a5;border-color:#ef444433}.comp-badge--danger.comp-badge--outline[data-v-158f78af]{background-color:transparent;border-color:var(--comp-danger);color:var(--comp-danger)}.comp-badge--info.comp-badge--filled[data-v-158f78af]{background-color:var(--comp-info);color:#fff}.comp-badge--info.comp-badge--subtle[data-v-158f78af]{background-color:#06b6d41f;color:#22d3ee;border-color:#06b6d433}.comp-badge--info.comp-badge--outline[data-v-158f78af]{background-color:transparent;border-color:var(--comp-info);color:var(--comp-info)}.comp-badge__dot[data-v-158f78af]{width:6px;height:6px;border-radius:50%;margin-right:5px;background-color:currentColor;display:inline-block;box-shadow:0 0 4px currentColor}.comp-badge[data-v-158f78af]:hover{transform:translateY(-.5px);filter:brightness(1.08)}:root{--comp-primary: #6366f1;--comp-primary-hover: #4f46e5;--comp-primary-active: #4338ca;--comp-primary-light: #e0e7ff;--comp-success: #10b981;--comp-success-hover: #059669;--comp-success-light: #d1fae5;--comp-warning: #f59e0b;--comp-warning-hover: #d97706;--comp-warning-light: #fef3c7;--comp-danger: #ef4444;--comp-danger-hover: #dc2626;--comp-danger-active: #b91c1c;--comp-danger-light: #fee2e2;--comp-info: #06b6d4;--comp-info-hover: #0891b2;--comp-info-light: #ecfeff;--comp-bg-main: #0b0f19;--comp-bg-card: #151d30;--comp-bg-hover: #1f293d;--comp-text-primary: #f3f4f6;--comp-text-secondary: #9ca3af;--comp-text-muted: #6b7280;--comp-border: #2d3748;--comp-border-hover: #4a5568;--comp-font-sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;--comp-radius-sm: 6px;--comp-radius-md: 10px;--comp-radius-lg: 16px;--comp-radius-full: 9999px;--comp-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, .05);--comp-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);--comp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .3), 0 4px 6px -4px rgba(0, 0, 0, .3);--comp-shadow-glow: 0 0 15px rgba(99, 102, 241, .3);--comp-transition-fast: .15s cubic-bezier(.4, 0, .2, 1);--comp-transition-normal: .25s cubic-bezier(.4, 0, .2, 1)}.comp-lib-root,.comp-lib-root *,.comp-lib-root *:before,.comp-lib-root *:after{box-sizing:border-box;font-family:var(--comp-font-sans)}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "xc-computent",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A premium Vue 3 component library built with Vite and TypeScript",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/computent.umd.cjs",
|
|
7
|
+
"module": "./dist/computent.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/computent.js",
|
|
13
|
+
"require": "./dist/computent.umd.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./dist/style.css": "./dist/style.css"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"dev": "node vite-shim.js",
|
|
22
|
+
"build": "vue-tsc --noEmit && node vite-shim.js build",
|
|
23
|
+
"preview": "node vite-shim.js preview"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"vue",
|
|
27
|
+
"vue3",
|
|
28
|
+
"component",
|
|
29
|
+
"library",
|
|
30
|
+
"vite",
|
|
31
|
+
"typescript"
|
|
32
|
+
],
|
|
33
|
+
"author": "",
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"vue": "^3.3.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@vitejs/plugin-vue": "^5.0.5",
|
|
40
|
+
"typescript": "^5.4.5",
|
|
41
|
+
"vite": "^5.2.11",
|
|
42
|
+
"vite-plugin-dts": "^3.9.1",
|
|
43
|
+
"vue": "^3.4.27",
|
|
44
|
+
"vue-tsc": "^2.0.19"
|
|
45
|
+
}
|
|
46
|
+
}
|