@brickflow/ui 0.0.26 → 0.0.28

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.
Files changed (54) hide show
  1. package/dist/module.d.mts +4 -1
  2. package/dist/module.json +2 -2
  3. package/dist/module.mjs +409 -11
  4. package/dist/runtime/components/Button/icons.demo.d.vue.ts +8 -0
  5. package/dist/runtime/components/Button/icons.demo.vue +25 -0
  6. package/dist/runtime/components/Button/icons.demo.vue.d.ts +8 -0
  7. package/dist/runtime/components/Button/index.d.vue.ts +45 -0
  8. package/dist/runtime/components/Button/index.vue +162 -0
  9. package/dist/runtime/components/Button/index.vue.d.ts +45 -0
  10. package/dist/runtime/components/Button/size.demo.d.vue.ts +7 -0
  11. package/dist/runtime/components/Button/size.demo.vue +78 -0
  12. package/dist/runtime/components/Button/size.demo.vue.d.ts +7 -0
  13. package/dist/runtime/components/Button/slots.demo.d.vue.ts +7 -0
  14. package/dist/runtime/components/Button/slots.demo.vue +23 -0
  15. package/dist/runtime/components/Button/slots.demo.vue.d.ts +7 -0
  16. package/dist/runtime/components/Button/state.demo.d.vue.ts +7 -0
  17. package/dist/runtime/components/Button/state.demo.vue +18 -0
  18. package/dist/runtime/components/Button/state.demo.vue.d.ts +7 -0
  19. package/dist/runtime/components/Button/variants.demo.d.vue.ts +7 -0
  20. package/dist/runtime/components/Button/variants.demo.vue +207 -0
  21. package/dist/runtime/components/Button/variants.demo.vue.d.ts +7 -0
  22. package/dist/runtime/components/Icon/basic.demo.d.vue.ts +8 -0
  23. package/dist/runtime/components/Icon/basic.demo.vue +44 -0
  24. package/dist/runtime/components/Icon/basic.demo.vue.d.ts +8 -0
  25. package/dist/runtime/components/Icon/index.d.vue.ts +7 -0
  26. package/dist/runtime/components/Icon/index.vue +18 -0
  27. package/dist/runtime/components/Icon/index.vue.d.ts +7 -0
  28. package/dist/runtime/components/Link/basic.demo.d.vue.ts +8 -0
  29. package/dist/runtime/components/Link/basic.demo.vue +27 -0
  30. package/dist/runtime/components/Link/basic.demo.vue.d.ts +8 -0
  31. package/dist/runtime/components/Link/index.d.vue.ts +51 -0
  32. package/dist/runtime/components/Link/index.vue +62 -0
  33. package/dist/runtime/components/Link/index.vue.d.ts +51 -0
  34. package/dist/runtime/composables/useScreen.d.ts +18 -0
  35. package/dist/runtime/composables/useScreen.js +68 -0
  36. package/dist/runtime/composables/useTheme.d.ts +17 -0
  37. package/dist/runtime/composables/useTheme.js +77 -0
  38. package/dist/runtime/composables/useTranslate.d.ts +20 -0
  39. package/dist/runtime/composables/useTranslate.js +17 -0
  40. package/dist/runtime/icon-font.d.ts +4 -0
  41. package/dist/runtime/pages/ui.d.vue.ts +4 -0
  42. package/dist/runtime/pages/ui.vue +717 -0
  43. package/dist/runtime/pages/ui.vue.d.ts +4 -0
  44. package/dist/runtime/tailwind.d.ts +4 -1
  45. package/dist/runtime/tailwind.js +2 -1
  46. package/dist/runtime/ui-catalog.d.ts +39 -0
  47. package/dist/runtime/ui-options.d.ts +3 -0
  48. package/dist/types.d.mts +2 -0
  49. package/package.json +10 -10
  50. package/dist/runtime/components/Button.d.vue.ts +0 -23
  51. package/dist/runtime/components/Button.vue +0 -29
  52. package/dist/runtime/components/Button.vue.d.ts +0 -23
  53. package/dist/runtime/composables/useBrickme.d.ts +0 -9
  54. package/dist/runtime/composables/useBrickme.js +0 -14
@@ -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=ui.vue.d.ts.map
@@ -8,6 +8,9 @@ declare global {
8
8
  readonly [key: string]: BrickflowUiStyleObject | string;
9
9
  };
10
10
  }
11
+ export interface BrickflowUiConfigContext {
12
+ value<const TValue extends string>(value: TValue): TValue;
13
+ }
11
14
  export type BrickflowUiConfigInput<TStyles extends BrickflowUiStyleObject = BrickflowUiStyles> = {
12
15
  readonly uiStyles?: TStyles;
13
16
  };
@@ -19,7 +22,7 @@ export type BrickflowUiStyles = BrickflowUiStyleObject;
19
22
  export declare const emptyUiStyles: {};
20
23
  export declare const emptyBrickflowUiConfig: BrickflowUiConfig<typeof emptyUiStyles>;
21
24
  export declare function defineBrickflowUiConfig(): BrickflowUiConfig<typeof emptyUiStyles>;
22
- export declare function defineBrickflowUiConfig<const TStyles extends BrickflowUiConfigStylePaths>(config: BrickflowUiConfigInput<BrickflowUiStrictStyles<TStyles>>): BrickflowUiConfig<TStyles>;
25
+ export declare function defineBrickflowUiConfig<const TStyles extends BrickflowUiConfigStylePaths>(configOrFactory: ((context: BrickflowUiConfigContext) => BrickflowUiConfigInput<BrickflowUiStrictStyles<TStyles>>) | BrickflowUiConfigInput<BrickflowUiStrictStyles<TStyles>>): BrickflowUiConfig<TStyles>;
23
26
  export declare const uiStyles: {};
24
27
  export default emptyBrickflowUiConfig;
25
28
  //# sourceMappingURL=tailwind.d.ts.map
@@ -2,7 +2,8 @@ export const emptyUiStyles = {};
2
2
  export const emptyBrickflowUiConfig = {
3
3
  uiStyles: emptyUiStyles
4
4
  };
5
- export function defineBrickflowUiConfig(config = {}) {
5
+ export function defineBrickflowUiConfig(configOrFactory = {}) {
6
+ const config = typeof configOrFactory === "function" ? configOrFactory({ value: (value) => value }) : configOrFactory;
6
7
  const uiStyles2 = config.uiStyles ?? emptyUiStyles;
7
8
  validateUiStyles(uiStyles2);
8
9
  return {
@@ -0,0 +1,39 @@
1
+ declare module '#brickflow-ui-catalog' {
2
+ import type { Component } from 'vue'
3
+
4
+ export interface BrickflowUiComponent {
5
+ component: Component
6
+ demos: BrickflowUiDemo[]
7
+ id: string
8
+ name: string
9
+ props: BrickflowUiProp[]
10
+ slots: string[]
11
+ styles: BrickflowUiStyleValue[]
12
+ }
13
+
14
+ export interface BrickflowUiDemo {
15
+ code: string
16
+ component: Component
17
+ description?: string
18
+ id: string
19
+ title: string
20
+ }
21
+
22
+ export interface BrickflowUiDemoMeta {
23
+ description?: string
24
+ title?: string
25
+ }
26
+
27
+ export interface BrickflowUiProp {
28
+ name: string
29
+ required: boolean
30
+ type: string
31
+ }
32
+
33
+ export interface BrickflowUiStyleValue {
34
+ path: string
35
+ value?: string
36
+ }
37
+
38
+ export const uiComponents: BrickflowUiComponent[]
39
+ }
@@ -0,0 +1,3 @@
1
+ declare module '#brickflow-ui-options' {
2
+ export const uiThemeEnabled: boolean
3
+ }
package/dist/types.d.mts CHANGED
@@ -1,3 +1,5 @@
1
+ export { type BrickflowConfig, type BrickflowI18n, type BrickflowRouteLocationParam } from '../dist/runtime/composables/useTranslate.js'
2
+
1
3
  export { default } from './module.mjs'
2
4
 
3
5
  export { type ModuleOptions } from './module.mjs'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brickflow/ui",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "type": "module",
5
5
  "description": "brickflow UI Nuxt module.",
6
6
  "files": [
@@ -29,19 +29,19 @@
29
29
  "access": "public"
30
30
  },
31
31
  "dependencies": {
32
- "@brickflow/utils": "workspace:*",
33
- "@tailwindcss/vite": "4.3.2",
34
- "jiti": "^2.7.0",
35
- "tailwindcss": "4.3.2"
32
+ "@tailwindcss/vite": "4.3.3",
33
+ "fantasticon": "4.1.0",
34
+ "jiti": "2.7.0",
35
+ "tailwindcss": "4.3.3"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@brickflow/lint": "workspace:*",
39
39
  "@brickflow/prettier": "workspace:*",
40
- "@nuxt/kit": "4.4.8",
41
- "@nuxt/module-builder": "1.0.2",
42
- "nuxt": "4.4.8",
43
- "vue": "3.5.39",
44
- "vue-tsc": "3.3.5"
40
+ "@nuxt/kit": "4.5.1",
41
+ "@nuxt/module-builder": "1.0.3",
42
+ "nuxt": "4.5.1",
43
+ "vue": "3.5.40",
44
+ "vue-tsc": "3.3.9"
45
45
  },
46
46
  "author": "",
47
47
  "license": "ISC"
@@ -1,23 +0,0 @@
1
- interface Props {
2
- size?: 'md' | 'sm';
3
- type?: 'button' | 'reset' | 'submit';
4
- variant?: 'primary' | 'secondary';
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
- size: "md" | "sm";
12
- type: "button" | "reset" | "submit";
13
- variant: "primary" | "secondary";
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
@@ -1,29 +0,0 @@
1
- <script setup>
2
- import { computed } from "vue";
3
- const props = defineProps({
4
- size: { type: String, required: false, default: "md" },
5
- type: { type: String, required: false, default: "button" },
6
- variant: { type: String, required: false, default: "primary" }
7
- });
8
- const sizeClasses = {
9
- md: UI_STYLE.size.md,
10
- sm: UI_STYLE.size.lol
11
- };
12
- const variantClasses = {
13
- primary: UI_STYLE.variant.primary,
14
- secondary: UI_STYLE.variant.secondary
15
- };
16
- const sizeClass = computed(() => sizeClasses[props.size]);
17
- const variantClass = computed(() => variantClasses[props.variant]);
18
- </script>
19
-
20
- <template>
21
- <button
22
- :type="props.type"
23
- :class="[UI_STYLE.base, sizeClass, variantClass]"
24
- data-testid="brick-button"
25
- >
26
- <span :class="UI_STYLE.size.kio">LOL</span>
27
- <slot />
28
- </button>
29
- </template>
@@ -1,23 +0,0 @@
1
- interface Props {
2
- size?: 'md' | 'sm';
3
- type?: 'button' | 'reset' | 'submit';
4
- variant?: 'primary' | 'secondary';
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
- size: "md" | "sm";
12
- type: "button" | "reset" | "submit";
13
- variant: "primary" | "secondary";
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
@@ -1,9 +0,0 @@
1
- import { type ComputedRef } from 'vue';
2
- interface brickflowComposable {
3
- className: ComputedRef<string>;
4
- message: ComputedRef<string>;
5
- target: ComputedRef<string>;
6
- }
7
- export declare const usebrickflow: () => brickflowComposable;
8
- export {};
9
- //# sourceMappingURL=useBrickme.d.ts.map
@@ -1,14 +0,0 @@
1
- import { useRuntimeConfig } from "nuxt/app";
2
- import { computed } from "vue";
3
- export const usebrickflow = () => {
4
- const config = useRuntimeConfig();
5
- const brickflowConfig = computed(() => config.public.brickflowUi ?? {});
6
- const target = computed(() => brickflowConfig.value.target ?? "world");
7
- const message = computed(() => brickflowConfig.value.message ?? `Hello ${target.value}`);
8
- const className = computed(() => target.value === "world" ? UI_STYLE.state.world : "");
9
- return {
10
- className,
11
- message,
12
- target
13
- };
14
- };