@viliha/vui-ui 1.0.3 → 1.0.4

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
@@ -61,8 +61,8 @@ export function Example() {
61
61
 
62
62
  `avatar` · `badge` · `button` · `card` · `chart` (themed Recharts wrapper) ·
63
63
  `checkbox` · `dialog` · `confirm-dialog` · `dropdown-menu` · `input` · `menu` ·
64
- `select` · `table` · `record-view` (the full datatable) · plus the `utils`
65
- (`cn`) helper and the `theme.css` design tokens.
64
+ `required-mark` · `select` · `table` · `record-view` (the full datatable) · plus
65
+ the `utils` (`cn`) helper and the `theme.css` design tokens.
66
66
 
67
67
  ## Theming
68
68
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viliha/vui-ui",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Vui UI — a clean, token-driven React admin/CRM component library built on Tailwind CSS v4, shadcn-style patterns, and Radix Icons. Ships as TypeScript source (Just-in-Time), compiled by the consuming app.",
5
5
  "license": "MIT",
6
6
  "author": "Suman Bonakurthi",
@@ -42,6 +42,12 @@
42
42
  "publishConfig": {
43
43
  "access": "public"
44
44
  },
45
+ "scripts": {
46
+ "lint": "eslint . --max-warnings 0",
47
+ "generate:component": "turbo gen react-component",
48
+ "check-types": "tsc --noEmit",
49
+ "test": "vitest run"
50
+ },
45
51
  "peerDependencies": {
46
52
  "react": "^18 || ^19",
47
53
  "react-dom": "^18 || ^19"
@@ -53,6 +59,8 @@
53
59
  "tailwind-merge": "^3.6.0"
54
60
  },
55
61
  "devDependencies": {
62
+ "@repo/eslint-config": "workspace:*",
63
+ "@repo/typescript-config": "workspace:*",
56
64
  "@types/node": "^22.15.3",
57
65
  "@types/react": "19.2.2",
58
66
  "@types/react-dom": "19.2.2",
@@ -60,14 +68,6 @@
60
68
  "react": "^19.2.0",
61
69
  "react-dom": "^19.2.0",
62
70
  "typescript": "5.9.2",
63
- "vitest": "^4.1.10",
64
- "@repo/eslint-config": "0.0.0",
65
- "@repo/typescript-config": "0.0.0"
66
- },
67
- "scripts": {
68
- "lint": "eslint . --max-warnings 0",
69
- "generate:component": "turbo gen react-component",
70
- "check-types": "tsc --noEmit",
71
- "test": "vitest run"
71
+ "vitest": "^4.1.10"
72
72
  }
73
- }
73
+ }
package/src/dialog.tsx CHANGED
@@ -76,7 +76,9 @@ export function DialogHeader({
76
76
  children: React.ReactNode;
77
77
  }) {
78
78
  return (
79
- <div className={cn("border-b border-border px-5 py-3", className)}>
79
+ <div
80
+ className={cn("border-b border-border bg-muted/40 px-5 py-3", className)}
81
+ >
80
82
  {children}
81
83
  </div>
82
84
  );
@@ -127,7 +129,7 @@ export function DialogFooter({
127
129
  return (
128
130
  <div
129
131
  className={cn(
130
- "flex items-center justify-end gap-2 border-t border-border px-5 py-3",
132
+ "flex items-center justify-end gap-2 border-t border-border bg-muted/40 px-5 py-3",
131
133
  className,
132
134
  )}
133
135
  >
@@ -45,6 +45,7 @@ import {
45
45
  } from "./table";
46
46
  import { Dropdown, DropdownItem, DropdownLabel } from "./dropdown-menu";
47
47
  import { ConfirmDialog } from "./confirm-dialog";
48
+ import { RequiredMark } from "./required-mark";
48
49
  import {
49
50
  downloadFile,
50
51
  parseCSV,
@@ -123,26 +124,6 @@ function fieldDefaultWidth<T>(field: RecordField<T>): number {
123
124
  /** Shared icon component type (all Radix icons share this shape). */
124
125
  export type IconType = typeof Circle;
125
126
 
126
- /** Mandatory-field marker — an asterisk icon (Radix has no asterisk glyph, so
127
- it's an inline SVG) sized to the label text; no border chip (no width="15"). */
128
- function RequiredMark() {
129
- return (
130
- <svg
131
- viewBox="0 0 24 24"
132
- fill="none"
133
- stroke="currentColor"
134
- strokeWidth={2.5}
135
- strokeLinecap="round"
136
- className="size-3.5 shrink-0 self-center text-destructive"
137
- aria-label="required"
138
- >
139
- <line x1="12" y1="5" x2="12" y2="19" />
140
- <line x1="5.5" y1="8.5" x2="18.5" y2="15.5" />
141
- <line x1="18.5" y1="8.5" x2="5.5" y2="15.5" />
142
- </svg>
143
- );
144
- }
145
-
146
127
  export type PageMeta = { title: string; icon?: IconType };
147
128
 
148
129
  const PageChromeContext = React.createContext<{
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Required-field marker — a small asterisk drawn as an inline SVG (viewBox, not
3
+ * width=15) so it isn't wrapped by the global icon-chip rule. Use next to a
4
+ * label to mark a mandatory field, consistently across tables and forms.
5
+ */
6
+ export function RequiredMark() {
7
+ return (
8
+ <svg
9
+ viewBox="0 0 24 24"
10
+ fill="none"
11
+ stroke="currentColor"
12
+ strokeWidth={2.5}
13
+ strokeLinecap="round"
14
+ className="size-3.5 shrink-0 self-center text-destructive"
15
+ aria-label="required"
16
+ >
17
+ <line x1="12" y1="5" x2="12" y2="19" />
18
+ <line x1="5.5" y1="8.5" x2="18.5" y2="15.5" />
19
+ <line x1="18.5" y1="8.5" x2="5.5" y2="15.5" />
20
+ </svg>
21
+ );
22
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 VILIHA PTE. LTD.
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.