@bluerobotics/bluevue 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Blue Robotics Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,113 @@
1
+ # BlueVue
2
+
3
+ Blue Robotics Vue components for common UI.
4
+
5
+ A small set of Vue 3 controls built with Tailwind, with no UI-framework dependency: they need
6
+ Vue, the Material Design Icons font, and nothing else.
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ npm install @bluerobotics/bluevue
12
+ ```
13
+
14
+ Vue and [`@mdi/font`](https://pictogrammers.com/library/mdi/) are peer dependencies, so the app
15
+ provides them:
16
+
17
+ ```bash
18
+ npm install vue @mdi/font
19
+ ```
20
+
21
+ ## Use
22
+
23
+ ```ts
24
+ import '@mdi/font/css/materialdesignicons.css'
25
+ import '@bluerobotics/bluevue/style.css'
26
+ ```
27
+
28
+ ```vue
29
+ <script setup lang="ts">
30
+ import { BlueInput, BlueSelect } from '@bluerobotics/bluevue'
31
+ import { ref } from 'vue'
32
+
33
+ const name = ref('BlueBoat')
34
+ const vehicle = ref('boat')
35
+ </script>
36
+
37
+ <template>
38
+ <BlueInput v-model="name" label="Name" theme="dark" />
39
+ <BlueSelect v-model="vehicle" label="Vehicle" theme="dark" :items="[{ name: 'Boat', value: 'boat' }]" />
40
+ </template>
41
+ ```
42
+
43
+ Every control takes a `theme` of `light` or `dark`.
44
+
45
+ ## Styles
46
+
47
+ There are two ways to get the styles in, depending on whether your app runs Tailwind.
48
+
49
+ **Without Tailwind**, import the ready-made stylesheet. It carries the tokens, the component
50
+ classes and the Tailwind utilities the components use, and deliberately leaves out Tailwind's
51
+ Preflight so it cannot reset your app's base styles:
52
+
53
+ ```ts
54
+ import '@bluerobotics/bluevue/style.css'
55
+ ```
56
+
57
+ **With Tailwind v4**, let your own build compile the utilities, and import only the tokens and
58
+ component classes. This avoids shipping a second copy of the utilities you already have:
59
+
60
+ ```css
61
+ @import "tailwindcss";
62
+ @import "@bluerobotics/bluevue/bluevue.css";
63
+
64
+ @source "../node_modules/@bluerobotics/bluevue/dist";
65
+ ```
66
+
67
+ The `@source` line is required: Tailwind does not scan `node_modules` unless it is told to, and
68
+ without it the components' classes are never generated.
69
+
70
+ Doing both works and costs only the duplicated utility bytes.
71
+
72
+ ### Theming
73
+
74
+ The colours and shadows are CSS custom properties, so an app can restate them:
75
+
76
+ ```css
77
+ :root {
78
+ --bluevue-primary: #0B5087;
79
+ --bluevue-error: #CF6679;
80
+ --bluevue-surface: #363636;
81
+ --bluevue-accent: #6699CC;
82
+ }
83
+ ```
84
+
85
+ ## Components
86
+
87
+ | Component | What it is |
88
+ | --- | --- |
89
+ | `BlueButtonGroup` | Segmented switch or multi-toggle, with an optional overflow menu |
90
+ | `BlueExpansiblePanel` | Titled section that collapses |
91
+ | `BlueInput` | Text or number field, with a suffix, bounds and validation messages |
92
+ | `BlueLoadingDialog` | Blocking overlay, under a turning propeller, for an operation in progress |
93
+ | `BlueMenu` | Action dropdown, anchored to an activator or to a pointer position |
94
+ | `BluePromptDialog` | Asks for a name, and optionally a note |
95
+ | `BlueSelect` | Single or multiple selection from a list |
96
+ | `BlueSlider` | Range with a value pill, editable on double-click |
97
+ | `BlueSwitch` | Two-state switch with its own labels |
98
+
99
+ `useBluePopover` is also exported, for building further dropdowns on the same top-layer
100
+ placement the menus use.
101
+
102
+ ## Browser support
103
+
104
+ The menus use the [popover API](https://developer.mozilla.org/docs/Web/API/Popover_API) and the
105
+ dialogs use `<dialog>`, so they need Chrome 114, Edge 114, Firefox 125 or Safari 17 and up.
106
+
107
+ ## Develop
108
+
109
+ ```bash
110
+ npm install
111
+ npm run dev # playground on http://localhost:8090
112
+ npm run build # dist/bluevue.js, dist/index.d.ts and dist/style.css
113
+ ```