@roku-ui/vue 0.30.0 → 0.31.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 CHANGED
@@ -1,33 +1,92 @@
1
- # Max Min Vue
1
+ # Roku UI Vue
2
2
 
3
- ## Usage
3
+ Vue 3 component library for the Roku UI design system. Every component is written in TypeScript, themed by shared tokens, and works with UnoCSS for consistent light and dark schemes.
4
4
 
5
- ### Install
5
+ ## Installation
6
6
 
7
7
  ```bash
8
- pnpm install
8
+ pnpm add @roku-ui/vue
9
+ # Optional: enable utility classes and theme tokens
10
+ pnpm add -D unocss @roku-ui/preset
9
11
  ```
10
12
 
11
- ### Development
13
+ ## UnoCSS setup (recommended)
12
14
 
13
- ```bash
14
- pnpm dev
15
+ Add the Roku preset to your UnoCSS config and enable the Vite plugin so `virtual:uno.css` is generated:
16
+
17
+ ```ts
18
+ import { rokuPreset } from '@roku-ui/preset'
19
+ // uno.config.ts
20
+ import { defineConfig } from 'unocss'
21
+
22
+ export default defineConfig({
23
+ presets: [rokuPreset()],
24
+ })
15
25
  ```
16
26
 
17
- ### Build
27
+ ```ts
28
+ import vue from '@vitejs/plugin-vue'
29
+ import Unocss from 'unocss/vite'
30
+ // vite.config.ts
31
+ import { defineConfig } from 'vite'
18
32
 
19
- ```bash
20
- pnpm build
33
+ export default defineConfig({
34
+ plugins: [vue(), Unocss()],
35
+ })
21
36
  ```
22
37
 
23
- ### Lint
38
+ If you cannot run UnoCSS, import the prebuilt styles instead:
24
39
 
25
- ```bash
26
- pnpm lint
40
+ ```ts
41
+ import '@roku-ui/vue/style.css'
27
42
  ```
28
43
 
29
- ### Test
44
+ ## Basic usage
45
+
46
+ Wrap your app with `RokuProvider` to supply theme values and use components with the provided tokens such as `bg-base`, `text-default`, and `border-container`.
47
+
48
+ ```vue
49
+ <script setup lang="ts">
50
+ import { Btn, RokuProvider } from '@roku-ui/vue'
51
+ </script>
52
+
53
+ <template>
54
+ <RokuProvider :theme-obj="{ colors: { primary: '#0f6bff', surface: '#121212' } }">
55
+ <div class="text-default bg-base border-container p-6 border rounded-lg">
56
+ <h1 class="text-2xl font-semibold mb-4">
57
+ Roku UI Vue
58
+ </h1>
59
+ <Btn color="primary">
60
+ Get started
61
+ </Btn>
62
+ </div>
63
+ </RokuProvider>
64
+ </template>
65
+ ```
66
+
67
+ ## Nuxt integration
68
+
69
+ Use the Nuxt module to auto-register components with the `R` prefix:
30
70
 
31
71
  ```bash
32
- pnpm test
72
+ pnpm add @roku-ui/nuxt @roku-ui/vue
33
73
  ```
74
+
75
+ ```ts
76
+ // nuxt.config.ts
77
+ export default defineNuxtConfig({
78
+ modules: ['@roku-ui/nuxt'],
79
+ rokuUi: {
80
+ // Optional: customize the prefix
81
+ prefix: 'R',
82
+ },
83
+ })
84
+ ```
85
+
86
+ ## Local development
87
+
88
+ - Install dependencies: `pnpm install`
89
+ - Start the component playground: `pnpm --filter @roku-ui/vue dev`
90
+ - Build the library: `pnpm --filter @roku-ui/vue build`
91
+ - Run unit tests: `pnpm --filter @roku-ui/vue test --run`
92
+ - Lint all packages: `pnpm lint`
@@ -1,5 +1,5 @@
1
1
  import { Component } from 'vue';
2
- import { Color, ContainerVariant, Rounded } from '../types';
2
+ import { Color, ContainerVariant, CornerShape, Rounded } from '../types';
3
3
  type __VLS_Props = {
4
4
  is?: string | Component;
5
5
  src?: string | null;
@@ -8,6 +8,7 @@ type __VLS_Props = {
8
8
  variant?: ContainerVariant;
9
9
  color?: Color;
10
10
  rounded?: Rounded;
11
+ cornerShape?: CornerShape;
11
12
  skeleton?: boolean;
12
13
  };
13
14
  declare function __VLS_template(): {
@@ -0,0 +1,37 @@
1
+ import { BtnVariant, Color, IconSource, Rounded, Size } from '../types';
2
+ type __VLS_Props = {
3
+ icon?: IconSource;
4
+ size?: Size;
5
+ variant?: BtnVariant;
6
+ color?: Color;
7
+ rounded?: Rounded;
8
+ outlineColor?: Color;
9
+ skeleton?: boolean;
10
+ };
11
+ declare function __VLS_template(): {
12
+ attrs: Partial<{}>;
13
+ slots: Readonly<{
14
+ default?: () => any;
15
+ }> & {
16
+ default?: () => any;
17
+ };
18
+ refs: {};
19
+ rootEl: any;
20
+ };
21
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
22
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
23
+ color: Color;
24
+ icon: IconSource;
25
+ size: Size;
26
+ variant: BtnVariant;
27
+ rounded: Rounded;
28
+ skeleton: boolean;
29
+ outlineColor: Color;
30
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
31
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
32
+ export default _default;
33
+ type __VLS_WithTemplateSlots<T, S> = T & {
34
+ new (): {
35
+ $slots: S;
36
+ };
37
+ };
@@ -1,4 +1,4 @@
1
- import { IconSource, Color, Rounded } from '../types';
1
+ import { Color, IconSource, Rounded } from '../types';
2
2
  export interface StepItem {
3
3
  title: string;
4
4
  description?: string;
@@ -21,6 +21,7 @@ export { default as ColorSwatch } from './ColorSwatch.vue';
21
21
  export { default as Drawer } from './Drawer.vue';
22
22
  export { default as Dropzone } from './Dropzone.vue';
23
23
  export { default as FullscreenOverlay } from './FullscreenOverlay.vue';
24
+ export { default as Icon } from './Icon.vue';
24
25
  export { default as Image } from './Image.vue';
25
26
  export { default as Indicator } from './Indicator.vue';
26
27
  export { default as Menu } from './Menu.vue';