@brickflow/ui 0.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.
@@ -0,0 +1,10 @@
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+
3
+ interface ModuleOptions {
4
+ target?: string;
5
+ componentPrefix?: string;
6
+ }
7
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
8
+
9
+ export { _default as default };
10
+ export type { ModuleOptions };
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "@brickflow/ui",
3
+ "configKey": "brickflowUi",
4
+ "compatibility": {
5
+ "nuxt": ">=4.0.0"
6
+ },
7
+ "version": "0.0.1",
8
+ "builder": {
9
+ "@nuxt/module-builder": "1.0.2",
10
+ "unbuild": "3.6.1"
11
+ }
12
+ }
@@ -0,0 +1,40 @@
1
+ import { defineNuxtModule, createResolver, addImportsDir, addComponentsDir } from '@nuxt/kit';
2
+ import tailwindcss from '@tailwindcss/vite';
3
+ import { createBrickGreeting } from '@brickflow/utils';
4
+
5
+ const module$1 = defineNuxtModule({
6
+ meta: {
7
+ name: "@brickflow/ui",
8
+ configKey: "brickflowUi",
9
+ compatibility: {
10
+ nuxt: ">=4.0.0"
11
+ }
12
+ },
13
+ defaults: {
14
+ target: "world",
15
+ componentPrefix: "Brick"
16
+ },
17
+ setup(options, nuxt) {
18
+ const resolver = createResolver(import.meta.url);
19
+ const currentConfig = nuxt.options.runtimeConfig.public.brickflowUi ?? {};
20
+ nuxt.options.runtimeConfig.public.brickflowUi = {
21
+ ...currentConfig,
22
+ target: options.target ?? "world",
23
+ message: createBrickGreeting(options.target ?? "world")
24
+ };
25
+ nuxt.options.css.push(resolver.resolve("./runtime/assets/css/main.css"));
26
+ nuxt.hook("vite:extendConfig", (config) => {
27
+ const viteConfig = config;
28
+ viteConfig.plugins ??= [];
29
+ viteConfig.plugins.push(tailwindcss());
30
+ });
31
+ addImportsDir(resolver.resolve("./runtime/composables"));
32
+ addComponentsDir({
33
+ path: resolver.resolve("./runtime/components"),
34
+ prefix: options.componentPrefix ?? "Brick",
35
+ pathPrefix: false
36
+ });
37
+ }
38
+ });
39
+
40
+ export { module$1 as default };
@@ -0,0 +1 @@
1
+ @import "tailwindcss";@source "../../components";@theme{--font-sans:"Manrope","Inter",ui-sans-serif,system-ui,sans-serif;--color-brick-50:oklch(0.98 0.01 30);--color-brick-100:oklch(0.95 0.02 30);--color-brick-200:oklch(0.9 0.04 30);--color-brick-400:oklch(0.72 0.15 28);--color-brick-500:oklch(0.64 0.18 28);--color-brick-600:oklch(0.57 0.17 28);--color-ink-950:oklch(0.18 0.02 260);--shadow-brick:0 18px 40px -24px rgba(145,63,43,.55)}
@@ -0,0 +1,23 @@
1
+ interface Props {
2
+ variant?: 'primary' | 'secondary';
3
+ size?: 'sm' | 'md';
4
+ type?: 'button' | 'submit' | 'reset';
5
+ }
6
+ declare var __VLS_1: {};
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_1) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
11
+ variant: "primary" | "secondary";
12
+ size: "sm" | "md";
13
+ type: "button" | "submit" | "reset";
14
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
18
+ type __VLS_WithSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
23
+ //# sourceMappingURL=Button.vue.d.ts.map
@@ -0,0 +1,25 @@
1
+ <script setup>
2
+ import { computed } from "vue";
3
+ const props = defineProps({
4
+ variant: { type: String, required: false, default: "primary" },
5
+ size: { type: String, required: false, default: "md" },
6
+ type: { type: String, required: false, default: "button" }
7
+ });
8
+ const sizeClass = computed(
9
+ () => props.size === "sm" ? "min-h-10 px-4 text-sm" : "min-h-12 px-5 text-sm/6"
10
+ );
11
+ const variantClass = computed(
12
+ () => props.variant === "secondary" ? "border border-brick-200/80 bg-white/70 text-ink-950 shadow-[inset_0_1px_0_rgba(255,255,255,0.85)] hover:border-brick-400/50 hover:bg-brick-50" : "border border-brick-500/80 bg-linear-to-r from-brick-500 to-brick-600 text-white shadow-brick hover:from-brick-400 hover:to-brick-500"
13
+ );
14
+ </script>
15
+
16
+ <template>
17
+ <button
18
+ :type="props.type"
19
+ class="inline-flex items-center justify-center gap-2 rounded-full font-semibold tracking-[-0.01em] transition-all duration-200 ease-out focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brick-500 disabled:pointer-events-none disabled:opacity-50"
20
+ :class="[sizeClass, variantClass]"
21
+ data-testid="brick-button"
22
+ >
23
+ <slot />
24
+ </button>
25
+ </template>
@@ -0,0 +1,23 @@
1
+ interface Props {
2
+ variant?: 'primary' | 'secondary';
3
+ size?: 'sm' | 'md';
4
+ type?: 'button' | 'submit' | 'reset';
5
+ }
6
+ declare var __VLS_1: {};
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_1) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
11
+ variant: "primary" | "secondary";
12
+ size: "sm" | "md";
13
+ type: "button" | "submit" | "reset";
14
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
18
+ type __VLS_WithSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
23
+ //# sourceMappingURL=Button.vue.d.ts.map
@@ -0,0 +1,4 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
4
+ //# sourceMappingURL=Demo.vue.d.ts.map
@@ -0,0 +1,24 @@
1
+ <script setup>
2
+ import Button from "./Button.vue";
3
+ import { usebrickflow } from "../composables/usebrickflow";
4
+ const brickflow = usebrickflow();
5
+ </script>
6
+
7
+ <template>
8
+ <section
9
+ class="grid gap-4 rounded-3xl border border-brick-200/70 bg-white/75 p-6 shadow-brick backdrop-blur"
10
+ :class="brickflow.className"
11
+ data-testid="brick-demo"
12
+ >
13
+ <div class="grid gap-1">
14
+ <strong class="text-base font-semibold tracking-[-0.02em] text-ink-950">
15
+ {{ brickflow.message }}
16
+ </strong>
17
+ <span class="text-sm text-zinc-600">Component from @brickflow/ui</span>
18
+ </div>
19
+ <div class="flex flex-wrap gap-3">
20
+ <Button>Primary action</Button>
21
+ <Button variant="secondary">Secondary action</Button>
22
+ </div>
23
+ </section>
24
+ </template>
@@ -0,0 +1,4 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
4
+ //# sourceMappingURL=Demo.vue.d.ts.map
@@ -0,0 +1,6 @@
1
+ export declare const usebrickflow: () => {
2
+ target: import("vue").ComputedRef<string>;
3
+ className: import("vue").ComputedRef<string>;
4
+ message: import("vue").ComputedRef<string>;
5
+ };
6
+ //# sourceMappingURL=useBrickme.d.ts.map
@@ -0,0 +1,15 @@
1
+ import { computed } from "vue";
2
+ import { useRuntimeConfig } from "nuxt/app";
3
+ import { createBrickGreeting, toBrickClassName } from "@brickflow/utils";
4
+ export const usebrickflow = () => {
5
+ const config = useRuntimeConfig();
6
+ const brickflowConfig = computed(
7
+ () => config.public.brickflowUi ?? {}
8
+ );
9
+ const target = computed(() => brickflowConfig.value.target ?? "world");
10
+ return {
11
+ target,
12
+ className: computed(() => `brick-demo--${toBrickClassName(target.value)}`),
13
+ message: computed(() => createBrickGreeting(target.value))
14
+ };
15
+ };
@@ -0,0 +1,3 @@
1
+ export { default } from './module.mjs'
2
+
3
+ export { type ModuleOptions } from './module.mjs'
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@brickflow/ui",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "description": "brickflow UI Nuxt module.",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "main": "./dist/module.mjs",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/module.d.mts",
13
+ "import": "./dist/module.mjs"
14
+ }
15
+ },
16
+ "scripts": {
17
+ "build": "nuxt-module-build",
18
+ "typecheck": "vue-tsc --project tsconfig.json --noEmit",
19
+ "lint": "pnpm exec eslint .",
20
+ "lint:fix": "pnpm exec eslint . --fix",
21
+ "format": "pnpm exec prettier . --ignore-path ../../.prettierignore --write",
22
+ "format:check": "pnpm exec prettier . --ignore-path ../../.prettierignore --check"
23
+ },
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "dependencies": {
28
+ "@brickflow/utils": "workspace:*",
29
+ "@tailwindcss/vite": "^4.3.0",
30
+ "tailwindcss": "^4.3.0"
31
+ },
32
+ "devDependencies": {
33
+ "@brickflow/lint": "workspace:*",
34
+ "@brickflow/prettier": "workspace:*",
35
+ "@nuxt/kit": "^4.3.1",
36
+ "@nuxt/module-builder": "^1.0.1",
37
+ "nuxt": "^4.3.1",
38
+ "vue": "^3.5.13",
39
+ "vue-tsc": "^3.1.1"
40
+ },
41
+ "author": "",
42
+ "license": "ISC"
43
+ }