@lightclub/ui 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 ADDED
@@ -0,0 +1,60 @@
1
+ <div align="center">
2
+
3
+ <img src="public/logo.png" alt="Logo" width="180" />
4
+
5
+ # @lightclub/ui
6
+
7
+ Vue 3 UI component library with TypeScript, Vite library mode, Tailwind CSS tokens, and generated declaration files.
8
+
9
+ </div>
10
+
11
+ ---
12
+
13
+ ## Usage
14
+
15
+ Install:
16
+
17
+ ```bash
18
+ bun add @lightclub/ui
19
+ ```
20
+
21
+ Import library styles once in your app entry:
22
+
23
+ ```ts
24
+ import "@lightclub/ui/style.css";
25
+ ```
26
+
27
+ Or import from CSS:
28
+
29
+ ```css
30
+ @import "@lightclub/ui/style.css";
31
+ ```
32
+
33
+ Use components in Vue:
34
+
35
+ ```vue
36
+ <script setup lang="ts">
37
+ import { BaseButton, BaseInput } from "@lightclub/ui";
38
+ </script>
39
+
40
+ <template>
41
+ <div class="space-y-3">
42
+ <BaseInput v-model="value" placeholder="Email" type="email" />
43
+ <BaseButton>Submit</BaseButton>
44
+ </div>
45
+ </template>
46
+ ```
47
+
48
+ You can override default design tokens by redefining the same `@theme` variables in your app CSS.
49
+
50
+ ## Available Scripts
51
+
52
+ - `bun run dev` - watch and rebuild with Vite library mode
53
+ - `bun run format` - format code with oxfmt
54
+ - `bun run lint` - run oxlint with auto-fix
55
+ - `bun run typecheck` - run TypeScript checks
56
+ - `bun run test` - run tests in watch mode
57
+ - `bun run test:ci` - run tests once for CI/publish checks
58
+ - `bun run build` - build library output to `dist/`
59
+
60
+ For architecture and release guidance, see `docs/`.
package/dist/index.js ADDED
@@ -0,0 +1,58 @@
1
+ import { defineComponent as a, openBlock as i, createElementBlock as n, normalizeClass as d, renderSlot as u, useModel as c, withDirectives as f, vModelDynamic as m, mergeModels as b } from "vue";
2
+ const p = ["type", "disabled"], g = "inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 focus-visible:ring-offset-bg disabled:cursor-not-allowed disabled:opacity-50", h = /* @__PURE__ */ a({
3
+ __name: "BaseButton",
4
+ props: {
5
+ variant: { default: "primary" },
6
+ size: { default: "md" },
7
+ type: { default: "button" },
8
+ disabled: { type: Boolean, default: !1 }
9
+ },
10
+ setup(e) {
11
+ const t = {
12
+ primary: "bg-accent text-accent-fg hover:bg-accent-hover",
13
+ secondary: "border border-border bg-surface text-fg hover:bg-surface-hover"
14
+ }, s = {
15
+ lg: "px-5 py-2.5 text-base",
16
+ md: "px-4 py-2 text-sm",
17
+ sm: "px-3 py-1.5 text-sm"
18
+ };
19
+ return (l, o) => (i(), n("button", {
20
+ type: e.type,
21
+ disabled: e.disabled,
22
+ class: d([g, t[e.variant], s[e.size]])
23
+ }, [
24
+ u(l.$slots, "default")
25
+ ], 10, p));
26
+ }
27
+ }), v = ["type", "placeholder"], y = "w-full rounded-md border bg-surface text-fg outline-none transition-colors placeholder:text-fg-muted focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 focus-visible:ring-offset-bg", B = /* @__PURE__ */ a({
28
+ __name: "BaseInput",
29
+ props: /* @__PURE__ */ b({
30
+ type: { default: "text" },
31
+ placeholder: { default: "" },
32
+ invalid: { type: Boolean, default: !1 },
33
+ size: { default: "md" }
34
+ }, {
35
+ modelValue: { default: "" },
36
+ modelModifiers: {}
37
+ }),
38
+ emits: ["update:modelValue"],
39
+ setup(e) {
40
+ const t = c(e, "modelValue"), s = {
41
+ lg: "px-4 py-2.5 text-base",
42
+ md: "px-3 py-2 text-sm",
43
+ sm: "px-2.5 py-1.5 text-sm"
44
+ };
45
+ return (l, o) => f((i(), n("input", {
46
+ "onUpdate:modelValue": o[0] || (o[0] = (r) => t.value = r),
47
+ type: e.type,
48
+ placeholder: e.placeholder,
49
+ class: d([y, s[e.size], e.invalid ? "border-danger" : "border-border"])
50
+ }, null, 10, v)), [
51
+ [m, t.value]
52
+ ]);
53
+ }
54
+ });
55
+ export {
56
+ h as BaseButton,
57
+ B as BaseInput
58
+ };
package/dist/logo.png ADDED
Binary file
@@ -0,0 +1,20 @@
1
+ type __VLS_Props = {
2
+ variant?: "primary" | "secondary";
3
+ size?: "sm" | "md" | "lg";
4
+ type?: "button" | "submit" | "reset";
5
+ disabled?: boolean;
6
+ };
7
+ declare var __VLS_1: {};
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_1) => any;
10
+ };
11
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
20
+ //# sourceMappingURL=BaseButton.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/BaseButton.vue"],"names":[],"mappings":"AAwCA,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAClC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAkDF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -0,0 +1,18 @@
1
+ type __VLS_Props = {
2
+ type?: "text" | "email" | "password" | "search" | "url" | "number";
3
+ placeholder?: string;
4
+ invalid?: boolean;
5
+ size?: "sm" | "md" | "lg";
6
+ };
7
+ type __VLS_ModelProps = {
8
+ modelValue?: string;
9
+ };
10
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
11
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
+ "update:modelValue": (value: string) => any;
13
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
14
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
18
+ //# sourceMappingURL=BaseInput.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/BaseInput.vue"],"names":[],"mappings":"AAoCA,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B,CAAC;AAwBF,KAAK,gBAAgB,GAAG;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AA8BxD,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,3 @@
1
+ export { default as BaseButton } from './components/BaseButton.vue';
2
+ export { default as BaseInput } from './components/BaseInput.vue';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,4BAA4B,CAAC"}
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, "Segoe UI", sans-serif;--font-mono:ui-monospace, "SFMono-Regular", "JetBrains Mono", monospace;--color-red-100:oklch(93.6% .032 17.717);--color-red-700:oklch(50.5% .213 27.518);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-700:oklch(55.5% .163 48.998);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-700:oklch(50.8% .118 165.612);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-700:oklch(51.4% .222 16.935);--color-rose-800:oklch(45.5% .188 13.697);--color-stone-50:oklch(98.5% .001 106.423);--color-stone-100:oklch(97% .001 106.424);--color-stone-400:oklch(70.9% .01 56.259);--color-stone-500:oklch(55.3% .013 58.071);--color-stone-700:oklch(37.4% .01 67.558);--color-stone-900:oklch(21.6% .006 56.043);--color-white:#fff;--spacing:.25rem;--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--font-weight-medium:500;--radius-md:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-bg:var(--color-stone-50);--color-surface:var(--color-white);--color-surface-hover:var(--color-stone-100);--color-fg:var(--color-stone-900);--color-fg-muted:var(--color-stone-700);--color-border:var(--color-stone-400);--color-accent:var(--color-rose-700);--color-accent-hover:var(--color-rose-800);--color-accent-fg:var(--color-white);--color-focus:var(--color-rose-500);--color-danger:var(--color-red-700)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.inline-flex{display:inline-flex}.w-full{width:100%}.items-center{align-items:center}.justify-center{justify-content:center}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-border{border-color:var(--color-border)}.border-danger{border-color:var(--color-danger)}.bg-accent{background-color:var(--color-accent)}.bg-surface{background-color:var(--color-surface)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-accent-fg{color:var(--color-accent-fg)}.text-fg{color:var(--color-fg)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.placeholder\:text-fg-muted::placeholder{color:var(--color-fg-muted)}@media(hover:hover){.hover\:bg-accent-hover:hover{background-color:var(--color-accent-hover)}.hover\:bg-surface-hover:hover{background-color:var(--color-surface-hover)}}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-focus:focus-visible{--tw-ring-color:var(--color-focus)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-bg:focus-visible{--tw-ring-offset-color:var(--color-bg)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}}@keyframes popupFadeIn{0%{opacity:0;scale:.95}to{opacity:1;scale:1}}@keyframes popupFadeOut{0%{opacity:1;scale:1}to{opacity:0;scale:.95}}.animate-fadeinout[data-state=open]{animation:75ms ease-out popupFadeIn}.animate-fadeinout[data-state=closed]{animation:75ms ease-in popupFadeOut}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@lightclub/ui",
3
+ "version": "0.1.0",
4
+ "private": false,
5
+ "files": [
6
+ "dist"
7
+ ],
8
+ "type": "module",
9
+ "types": "./dist/src/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/src/index.d.ts",
13
+ "import": "./dist/index.js"
14
+ },
15
+ "./style.css": "./dist/style.css"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "scripts": {
21
+ "dev": "vite build --watch",
22
+ "format": "oxfmt .",
23
+ "lint": "oxlint . --fix",
24
+ "typecheck": "vue-tsc",
25
+ "test": "vitest",
26
+ "test:ci": "vitest run",
27
+ "build": "vite build"
28
+ },
29
+ "devDependencies": {
30
+ "@ashd/oxc-config": "^0.2.0",
31
+ "@ashd/tsconfig": "^0.2.0",
32
+ "@tailwindcss/vite": "^4.0.0",
33
+ "@vitejs/plugin-vue": "^6.0.0",
34
+ "@vue/language-core": "^3.0.0",
35
+ "@vue/test-utils": "^2.4.6",
36
+ "happy-dom": "^20.0.10",
37
+ "oxfmt": "^0.34.0",
38
+ "oxlint": "^1.49.0",
39
+ "tailwindcss": "^4.0.0",
40
+ "typescript": "next",
41
+ "unplugin-dts": "^1.0.0-beta.6",
42
+ "vite": "^7.0.0",
43
+ "vitest": "^4.0.7",
44
+ "vue": "^3.0.0",
45
+ "vue-tsc": "^3.0.0"
46
+ },
47
+ "peerDependencies": {
48
+ "tailwindcss": ">=4.0.0",
49
+ "vue": ">=3.0.0"
50
+ }
51
+ }