@walidsj/react-ui 0.0.0-stage → 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,17 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Walid
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.
package/README.md CHANGED
@@ -1,3 +1,164 @@
1
- # Temporary Holding Version
1
+ # @walidsj/react-ui
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A customizable React design system built with Base UI, TypeScript, and
4
+ Tailwind CSS v4.
5
+
6
+ > Status: early development. Public APIs and visual tokens may change
7
+ > before `1.0.0`.
8
+
9
+ ## Features
10
+
11
+ - Typed React components with native prop and ref forwarding.
12
+ - Base UI primitives for interactive behavior where appropriate.
13
+ - Custom visual styling with Tailwind CSS v4.
14
+ - Semantic design tokens with light and dark themes.
15
+ - Compiled stylesheet distributed with the npm package.
16
+ - ESM output with TypeScript declarations and tree-shaking support.
17
+
18
+ ## Installation
19
+
20
+ ``` bash
21
+ npm install @walidsj/react-ui
22
+ ```
23
+
24
+ Requires React 19. The package is ESM-only.
25
+
26
+ ## Usage
27
+
28
+ Import the compiled stylesheet once, then use components from the package
29
+ root:
30
+
31
+ ``` tsx
32
+ import { Button, Input } from "@walidsj/react-ui";
33
+ import "@walidsj/react-ui/style.css";
34
+
35
+ export function Example() {
36
+ return (
37
+ <div style={{ display: "grid", gap: "1rem", maxWidth: "24rem" }}>
38
+ <Input aria-label="Full name" placeholder="Full name" />
39
+ <Button variant="primary" size="md">
40
+ Save changes
41
+ </Button>
42
+ </div>
43
+ );
44
+ }
45
+ ```
46
+
47
+ ## Components
48
+
49
+ ### Button
50
+
51
+ Renders a native `<button>`, defaults to `type="button"`, and forwards
52
+ native button props and refs.
53
+
54
+ | Prop | Type | Default |
55
+ | ----------- | ---------------------------------------------------------- | ----------- |
56
+ | `variant` | `primary \| secondary \| outline \| ghost \| danger` | `primary` |
57
+ | `size` | `sm \| md \| lg` | `md` |
58
+ | `type` | Native button type | `button` |
59
+ | `disabled` | `boolean` | `false` |
60
+ | `className` | `string` | — |
61
+
62
+ Icon-only buttons must receive an accessible name from the consumer,
63
+ for example `aria-label`.
64
+
65
+ ### Input
66
+
67
+ Renders a native `<input>` and forwards native input props and refs.
68
+
69
+ | Prop | Type | Default |
70
+ | ----------- | --------- | ------- |
71
+ | `invalid` | `boolean` | `false` |
72
+ | `className` | `string` | — |
73
+
74
+ `invalid` sets `aria-invalid="true"` and applies error styling. A
75
+ consumer-provided `aria-invalid` value is preserved when `invalid` is
76
+ not set. Labels, descriptions, and error messages are composed by the
77
+ consumer.
78
+
79
+ Both components merge `className` with their internal classes. Conflicting
80
+ Tailwind utilities are resolved with `tailwind-merge`.
81
+
82
+ ## Styling
83
+
84
+ The package ships a precompiled stylesheet at
85
+ `@walidsj/react-ui/style.css`. Consumers do not need Tailwind or a Tailwind
86
+ configuration to compile the library's CSS.
87
+
88
+ The stylesheet includes only the utilities used by the published
89
+ components and the semantic theme tokens. It intentionally does not
90
+ include Tailwind Preflight, and it does not set the host application's
91
+ global background, text color, or font family.
92
+
93
+ ### Theme tokens
94
+
95
+ Override these variables on a wrapping element to customize the theme:
96
+
97
+ | Token | Purpose |
98
+ | ---------------------------- | --------------------------- |
99
+ | `--ui-background` | Main component surface |
100
+ | `--ui-foreground` | Main text |
101
+ | `--ui-primary` | Primary action surface |
102
+ | `--ui-primary-foreground` | Text on primary surface |
103
+ | `--ui-secondary` | Secondary surface |
104
+ | `--ui-secondary-foreground` | Text on secondary surface |
105
+ | `--ui-muted` | Subtle surface |
106
+ | `--ui-muted-foreground` | Secondary text |
107
+ | `--ui-border` | Default border |
108
+ | `--ui-ring` | Focus ring |
109
+ | `--ui-danger` | Destructive action surface |
110
+ | `--ui-danger-foreground` | Text on destructive surface |
111
+ | `--ui-radius-sm` | Small radius |
112
+ | `--ui-radius-md` | Medium radius |
113
+ | `--ui-radius-lg` | Large radius |
114
+
115
+ ``` css
116
+ .brand-theme {
117
+ --ui-primary: oklch(0.55 0.18 150);
118
+ --ui-ring: oklch(0.55 0.18 150);
119
+ --ui-radius-md: 0.25rem;
120
+ }
121
+ ```
122
+
123
+ ### Dark mode
124
+
125
+ Apply the `dark` class to any ancestor of the components:
126
+
127
+ ``` tsx
128
+ <div className="dark">
129
+ <Button>Dark theme button</Button>
130
+ </div>
131
+ ```
132
+
133
+ ## Development
134
+
135
+ This repository uses Bun for dependency management and development
136
+ scripts.
137
+
138
+ ``` bash
139
+ bun install
140
+ bun run typecheck
141
+ bun run lint
142
+ bun run test
143
+ bun run build
144
+ npm pack --dry-run
145
+ ```
146
+
147
+ `bun run dev` watches the library build. `bun run test:watch` runs
148
+ Vitest in watch mode.
149
+
150
+ ## Documentation
151
+
152
+ - Product requirements: `PRD.md`
153
+ - Design tokens and component rules: `DESIGN.md`
154
+ - Architecture: `ARCHITECTURE.md`
155
+ - Testing: `TESTING.md`
156
+ - Contributing: `CONTRIBUTING.md`
157
+ - Release: `RELEASE.md`
158
+ - Agent instructions: `AGENTS.md`
159
+ - Security: `SECURITY.md`
160
+
161
+ ## License
162
+
163
+ MIT. See `LICENSE`.
164
+ # walid-ui
@@ -0,0 +1,8 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ export type ButtonVariant = "primary" | "secondary" | "outline" | "ghost" | "danger";
3
+ export type ButtonSize = "sm" | "md" | "lg";
4
+ export interface ButtonProps extends ComponentPropsWithoutRef<"button"> {
5
+ variant?: ButtonVariant;
6
+ size?: ButtonSize;
7
+ }
8
+ export declare const Button: import('react').ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,2 @@
1
+ export type { ButtonProps, ButtonSize, ButtonVariant } from './button';
2
+ export { Button } from './button';
@@ -0,0 +1,2 @@
1
+ export type { InputProps } from './input';
2
+ export { Input } from './input';
@@ -0,0 +1,5 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ export interface InputProps extends ComponentPropsWithoutRef<"input"> {
3
+ invalid?: boolean;
4
+ }
5
+ export declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,4 @@
1
+ export type { ButtonProps, ButtonSize, ButtonVariant, } from './components/button';
2
+ export { Button } from './components/button';
3
+ export type { InputProps } from './components/input';
4
+ export { Input } from './components/input';
package/dist/index.js ADDED
@@ -0,0 +1,44 @@
1
+ import { Button as Button$1 } from "@base-ui/react/button";
2
+ import { forwardRef } from "react";
3
+ import { clsx } from "clsx";
4
+ import { twMerge } from "tailwind-merge";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { Input as Input$1 } from "@base-ui/react/input";
7
+ // src/lib/cn.ts
8
+ function cn(...inputs) {
9
+ return twMerge(clsx(inputs));
10
+ }
11
+ // src/components/button/button.tsx
12
+ var baseClasses = "inline-flex select-none items-center justify-center whitespace-nowrap rounded-ui-md font-medium transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50";
13
+ var variantClasses = {
14
+ primary: "bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80",
15
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 active:bg-secondary/70",
16
+ outline: "border border-border bg-transparent text-foreground hover:bg-muted active:bg-muted/70",
17
+ ghost: "bg-transparent text-foreground hover:bg-muted active:bg-muted/70",
18
+ danger: "bg-danger text-danger-foreground hover:bg-danger/90 active:bg-danger/80"
19
+ };
20
+ var sizeClasses = {
21
+ sm: "h-8 gap-1.5 px-3 text-sm",
22
+ md: "h-10 gap-2 px-4 text-sm",
23
+ lg: "h-12 gap-2.5 px-6 text-base"
24
+ };
25
+ var Button = forwardRef(function Button({ className, variant = "primary", size = "md", type = "button", ...props }, ref) {
26
+ return /* @__PURE__ */ jsx(Button$1, {
27
+ ...props,
28
+ ref,
29
+ type,
30
+ className: cn(baseClasses, variantClasses[variant], sizeClasses[size], className)
31
+ });
32
+ });
33
+ // src/components/input/input.tsx
34
+ var Input = forwardRef(function Input({ className, invalid = false, "aria-invalid": ariaInvalid, ...props }, ref) {
35
+ return /* @__PURE__ */ jsx(Input$1, {
36
+ ...props,
37
+ ref,
38
+ "aria-invalid": invalid || ariaInvalid,
39
+ className: cn("flex h-10 w-full rounded-ui-md border border-border bg-background px-3 py-2 text-sm text-foreground shadow-sm outline-none transition-colors placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-[invalid=true]:border-danger aria-[invalid=true]:focus-visible:ring-danger/30", className)
40
+ });
41
+ });
42
+ export { Button, Input };
43
+
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["BaseButton","BaseInput"],"sources":["../src/lib/cn.ts","../src/components/button/button.tsx","../src/components/input/input.tsx"],"sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import { Button as BaseButton } from \"@base-ui/react/button\";\nimport { type ComponentPropsWithoutRef, forwardRef, type Ref } from \"react\";\nimport { cn } from \"../../lib/cn\";\n\nexport type ButtonVariant =\n | \"primary\"\n | \"secondary\"\n | \"outline\"\n | \"ghost\"\n | \"danger\";\n\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ButtonProps extends ComponentPropsWithoutRef<\"button\"> {\n variant?: ButtonVariant;\n size?: ButtonSize;\n}\n\nconst baseClasses =\n \"inline-flex select-none items-center justify-center whitespace-nowrap rounded-ui-md font-medium transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50\";\n\nconst variantClasses: Record<ButtonVariant, string> = {\n primary:\n \"bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80 active:bg-secondary/70\",\n outline:\n \"border border-border bg-transparent text-foreground hover:bg-muted active:bg-muted/70\",\n ghost: \"bg-transparent text-foreground hover:bg-muted active:bg-muted/70\",\n danger:\n \"bg-danger text-danger-foreground hover:bg-danger/90 active:bg-danger/80\",\n};\n\nconst sizeClasses: Record<ButtonSize, string> = {\n sm: \"h-8 gap-1.5 px-3 text-sm\",\n md: \"h-10 gap-2 px-4 text-sm\",\n lg: \"h-12 gap-2.5 px-6 text-base\",\n};\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n function Button(\n { className, variant = \"primary\", size = \"md\", type = \"button\", ...props },\n ref,\n ) {\n return (\n <BaseButton\n {...props}\n ref={ref as Ref<HTMLElement>}\n type={type}\n className={cn(\n baseClasses,\n variantClasses[variant],\n sizeClasses[size],\n className,\n )}\n />\n );\n },\n);\n","import { Input as BaseInput } from \"@base-ui/react/input\";\nimport { type ComponentPropsWithoutRef, forwardRef, type Ref } from \"react\";\nimport { cn } from \"../../lib/cn\";\n\nexport interface InputProps extends ComponentPropsWithoutRef<\"input\"> {\n invalid?: boolean;\n}\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(function Input(\n { className, invalid = false, \"aria-invalid\": ariaInvalid, ...props },\n ref,\n) {\n return (\n <BaseInput\n {...props}\n ref={ref as Ref<HTMLElement>}\n aria-invalid={invalid || ariaInvalid}\n className={cn(\n \"flex h-10 w-full rounded-ui-md border border-border bg-background px-3 py-2 text-sm text-foreground shadow-sm outline-none transition-colors placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-[invalid=true]:border-danger aria-[invalid=true]:focus-visible:ring-danger/30\",\n className,\n )}\n />\n );\n});\n"],"mappings":";;;;;;;AAGA,SAAgB,GAAG,GAAG,QAAsB;CAC1C,OAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;ACaA,IAAM,cACJ;AAEF,IAAM,iBAAgD;CACpD,SACE;CACF,WACE;CACF,SACE;CACF,OAAO;CACP,QACE;AACJ;AAEA,IAAM,cAA0C;CAC9C,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;AAEA,IAAa,SAAS,WACpB,SAAS,OACP,EAAE,WAAW,UAAU,WAAW,OAAO,MAAM,OAAO,UAAU,GAAG,SACnE,KACA;CACA,OACE,oBAACA,UAAD;EACE,GAAI;EACC;EACC;EACN,WAAW,GACT,aACA,eAAe,UACf,YAAY,OACZ,SACF;CACD,CAAA;AAEL,CACF;;AClDA,IAAa,QAAQ,WAAyC,SAAS,MACrE,EAAE,WAAW,UAAU,OAAO,gBAAgB,aAAa,GAAG,SAC9D,KACA;CACA,OACE,oBAACC,SAAD;EACE,GAAI;EACC;EACL,gBAAc,WAAW;EACzB,WAAW,GACT,+XACA,SACF;CACD,CAAA;AAEL,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { ClassValue } from 'clsx';
2
+ export declare function cn(...inputs: ClassValue[]): string;
package/dist/style.css ADDED
@@ -0,0 +1,457 @@
1
+ /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
2
+ @layer properties {
3
+ @supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
4
+ *, :before, :after, ::backdrop {
5
+ --tw-border-style: solid;
6
+ --tw-font-weight: initial;
7
+ --tw-shadow: 0 0 #0000;
8
+ --tw-shadow-color: initial;
9
+ --tw-shadow-alpha: 100%;
10
+ --tw-inset-shadow: 0 0 #0000;
11
+ --tw-inset-shadow-color: initial;
12
+ --tw-inset-shadow-alpha: 100%;
13
+ --tw-ring-color: initial;
14
+ --tw-ring-shadow: 0 0 #0000;
15
+ --tw-inset-ring-color: initial;
16
+ --tw-inset-ring-shadow: 0 0 #0000;
17
+ --tw-ring-inset: initial;
18
+ --tw-ring-offset-width: 0px;
19
+ --tw-ring-offset-color: #fff;
20
+ --tw-ring-offset-shadow: 0 0 #0000;
21
+ --tw-outline-style: solid;
22
+ }
23
+ }
24
+ }
25
+
26
+ @layer theme {
27
+ :root, :host {
28
+ --spacing: .25rem;
29
+ --text-sm: .875rem;
30
+ --text-sm--line-height: calc(1.25 / .875);
31
+ --text-base: 1rem;
32
+ --text-base--line-height: calc(1.5 / 1);
33
+ --font-weight-medium: 500;
34
+ --default-transition-duration: .15s;
35
+ --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);
36
+ }
37
+ }
38
+
39
+ @layer utilities {
40
+ .flex {
41
+ display: flex;
42
+ }
43
+
44
+ .inline-flex {
45
+ display: inline-flex;
46
+ }
47
+
48
+ .h-8 {
49
+ height: calc(var(--spacing) * 8);
50
+ }
51
+
52
+ .h-10 {
53
+ height: calc(var(--spacing) * 10);
54
+ }
55
+
56
+ .h-12 {
57
+ height: calc(var(--spacing) * 12);
58
+ }
59
+
60
+ .w-full {
61
+ width: 100%;
62
+ }
63
+
64
+ .items-center {
65
+ align-items: center;
66
+ }
67
+
68
+ .justify-center {
69
+ justify-content: center;
70
+ }
71
+
72
+ .gap-1\.5 {
73
+ gap: calc(var(--spacing) * 1.5);
74
+ }
75
+
76
+ .gap-2 {
77
+ gap: calc(var(--spacing) * 2);
78
+ }
79
+
80
+ .gap-2\.5 {
81
+ gap: calc(var(--spacing) * 2.5);
82
+ }
83
+
84
+ .rounded-ui-md {
85
+ border-radius: var(--ui-radius-md);
86
+ }
87
+
88
+ .border {
89
+ border-style: var(--tw-border-style);
90
+ border-width: 1px;
91
+ }
92
+
93
+ .border-border {
94
+ border-color: var(--ui-border);
95
+ }
96
+
97
+ .bg-background {
98
+ background-color: var(--ui-background);
99
+ }
100
+
101
+ .bg-danger {
102
+ background-color: var(--ui-danger);
103
+ }
104
+
105
+ .bg-primary {
106
+ background-color: var(--ui-primary);
107
+ }
108
+
109
+ .bg-secondary {
110
+ background-color: var(--ui-secondary);
111
+ }
112
+
113
+ .bg-transparent {
114
+ background-color: #0000;
115
+ }
116
+
117
+ .px-3 {
118
+ padding-inline: calc(var(--spacing) * 3);
119
+ }
120
+
121
+ .px-4 {
122
+ padding-inline: calc(var(--spacing) * 4);
123
+ }
124
+
125
+ .px-6 {
126
+ padding-inline: calc(var(--spacing) * 6);
127
+ }
128
+
129
+ .py-2 {
130
+ padding-block: calc(var(--spacing) * 2);
131
+ }
132
+
133
+ .text-base {
134
+ font-size: var(--text-base);
135
+ line-height: var(--tw-leading, var(--text-base--line-height));
136
+ }
137
+
138
+ .text-sm {
139
+ font-size: var(--text-sm);
140
+ line-height: var(--tw-leading, var(--text-sm--line-height));
141
+ }
142
+
143
+ .font-medium {
144
+ --tw-font-weight: var(--font-weight-medium);
145
+ font-weight: var(--font-weight-medium);
146
+ }
147
+
148
+ .whitespace-nowrap {
149
+ white-space: nowrap;
150
+ }
151
+
152
+ .text-danger-foreground {
153
+ color: var(--ui-danger-foreground);
154
+ }
155
+
156
+ .text-foreground {
157
+ color: var(--ui-foreground);
158
+ }
159
+
160
+ .text-primary-foreground {
161
+ color: var(--ui-primary-foreground);
162
+ }
163
+
164
+ .text-secondary-foreground {
165
+ color: var(--ui-secondary-foreground);
166
+ }
167
+
168
+ .shadow-sm {
169
+ --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, #0000001a), 0 1px 2px -1px var(--tw-shadow-color, #0000001a);
170
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
171
+ }
172
+
173
+ .outline {
174
+ outline-style: var(--tw-outline-style);
175
+ outline-width: 1px;
176
+ }
177
+
178
+ .transition-colors {
179
+ transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
180
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
181
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
182
+ }
183
+
184
+ .outline-none {
185
+ --tw-outline-style: none;
186
+ outline-style: none;
187
+ }
188
+
189
+ .select-none {
190
+ -webkit-user-select: none;
191
+ user-select: none;
192
+ }
193
+
194
+ .placeholder\:text-muted-foreground::placeholder {
195
+ color: var(--ui-muted-foreground);
196
+ }
197
+
198
+ @media (hover: hover) {
199
+ .hover\:bg-danger\/90:hover {
200
+ background-color: var(--ui-danger);
201
+ }
202
+
203
+ @supports (color: color-mix(in lab, red, red)) {
204
+ .hover\:bg-danger\/90:hover {
205
+ background-color: color-mix(in oklab, var(--ui-danger) 90%, transparent);
206
+ }
207
+ }
208
+
209
+ .hover\:bg-muted:hover {
210
+ background-color: var(--ui-muted);
211
+ }
212
+
213
+ .hover\:bg-primary\/90:hover {
214
+ background-color: var(--ui-primary);
215
+ }
216
+
217
+ @supports (color: color-mix(in lab, red, red)) {
218
+ .hover\:bg-primary\/90:hover {
219
+ background-color: color-mix(in oklab, var(--ui-primary) 90%, transparent);
220
+ }
221
+ }
222
+
223
+ .hover\:bg-secondary\/80:hover {
224
+ background-color: var(--ui-secondary);
225
+ }
226
+
227
+ @supports (color: color-mix(in lab, red, red)) {
228
+ .hover\:bg-secondary\/80:hover {
229
+ background-color: color-mix(in oklab, var(--ui-secondary) 80%, transparent);
230
+ }
231
+ }
232
+ }
233
+
234
+ .focus-visible\:border-ring:focus-visible {
235
+ border-color: var(--ui-ring);
236
+ }
237
+
238
+ .focus-visible\:ring-2:focus-visible {
239
+ --tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
240
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
241
+ }
242
+
243
+ .focus-visible\:ring-ring:focus-visible, .focus-visible\:ring-ring\/30:focus-visible {
244
+ --tw-ring-color: var(--ui-ring);
245
+ }
246
+
247
+ @supports (color: color-mix(in lab, red, red)) {
248
+ .focus-visible\:ring-ring\/30:focus-visible {
249
+ --tw-ring-color: color-mix(in oklab, var(--ui-ring) 30%, transparent);
250
+ }
251
+ }
252
+
253
+ .focus-visible\:ring-offset-2:focus-visible {
254
+ --tw-ring-offset-width: 2px;
255
+ --tw-ring-offset-shadow: var(--tw-ring-inset, ) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
256
+ }
257
+
258
+ .focus-visible\:ring-offset-background:focus-visible {
259
+ --tw-ring-offset-color: var(--ui-background);
260
+ }
261
+
262
+ .active\:bg-danger\/80:active {
263
+ background-color: var(--ui-danger);
264
+ }
265
+
266
+ @supports (color: color-mix(in lab, red, red)) {
267
+ .active\:bg-danger\/80:active {
268
+ background-color: color-mix(in oklab, var(--ui-danger) 80%, transparent);
269
+ }
270
+ }
271
+
272
+ .active\:bg-muted\/70:active {
273
+ background-color: var(--ui-muted);
274
+ }
275
+
276
+ @supports (color: color-mix(in lab, red, red)) {
277
+ .active\:bg-muted\/70:active {
278
+ background-color: color-mix(in oklab, var(--ui-muted) 70%, transparent);
279
+ }
280
+ }
281
+
282
+ .active\:bg-primary\/80:active {
283
+ background-color: var(--ui-primary);
284
+ }
285
+
286
+ @supports (color: color-mix(in lab, red, red)) {
287
+ .active\:bg-primary\/80:active {
288
+ background-color: color-mix(in oklab, var(--ui-primary) 80%, transparent);
289
+ }
290
+ }
291
+
292
+ .active\:bg-secondary\/70:active {
293
+ background-color: var(--ui-secondary);
294
+ }
295
+
296
+ @supports (color: color-mix(in lab, red, red)) {
297
+ .active\:bg-secondary\/70:active {
298
+ background-color: color-mix(in oklab, var(--ui-secondary) 70%, transparent);
299
+ }
300
+ }
301
+
302
+ .disabled\:pointer-events-none:disabled {
303
+ pointer-events: none;
304
+ }
305
+
306
+ .disabled\:cursor-not-allowed:disabled {
307
+ cursor: not-allowed;
308
+ }
309
+
310
+ .disabled\:opacity-50:disabled {
311
+ opacity: .5;
312
+ }
313
+
314
+ .aria-\[invalid\=true\]\:border-danger[aria-invalid="true"] {
315
+ border-color: var(--ui-danger);
316
+ }
317
+
318
+ .aria-\[invalid\=true\]\:focus-visible\:ring-danger\/30[aria-invalid="true"]:focus-visible {
319
+ --tw-ring-color: var(--ui-danger);
320
+ }
321
+
322
+ @supports (color: color-mix(in lab, red, red)) {
323
+ .aria-\[invalid\=true\]\:focus-visible\:ring-danger\/30[aria-invalid="true"]:focus-visible {
324
+ --tw-ring-color: color-mix(in oklab, var(--ui-danger) 30%, transparent);
325
+ }
326
+ }
327
+ }
328
+
329
+ :root {
330
+ --ui-background: oklch(100% 0 0);
331
+ --ui-foreground: oklch(24% .02 264);
332
+ --ui-primary: oklch(51% .23 277);
333
+ --ui-primary-foreground: oklch(99% 0 0);
334
+ --ui-secondary: oklch(95.5% .012 264);
335
+ --ui-secondary-foreground: oklch(30% .03 264);
336
+ --ui-muted: oklch(96% .008 264);
337
+ --ui-muted-foreground: oklch(50% .02 264);
338
+ --ui-border: oklch(89% .012 264);
339
+ --ui-ring: oklch(51% .23 277);
340
+ --ui-danger: oklch(55% .22 27);
341
+ --ui-danger-foreground: oklch(99% 0 0);
342
+ --ui-radius-sm: .375rem;
343
+ --ui-radius-md: .5rem;
344
+ --ui-radius-lg: .75rem;
345
+ }
346
+
347
+ .dark {
348
+ --ui-background: oklch(18% .02 264);
349
+ --ui-foreground: oklch(96% .006 264);
350
+ --ui-primary: oklch(68% .18 277);
351
+ --ui-primary-foreground: oklch(17% .03 277);
352
+ --ui-secondary: oklch(27% .02 264);
353
+ --ui-secondary-foreground: oklch(96% .006 264);
354
+ --ui-muted: oklch(25% .02 264);
355
+ --ui-muted-foreground: oklch(72% .02 264);
356
+ --ui-border: oklch(34% .015 264);
357
+ --ui-ring: oklch(68% .18 277);
358
+ --ui-danger: oklch(64% .2 27);
359
+ --ui-danger-foreground: oklch(17% .03 27);
360
+ }
361
+
362
+ @property --tw-border-style {
363
+ syntax: "*";
364
+ inherits: false;
365
+ initial-value: solid;
366
+ }
367
+
368
+ @property --tw-font-weight {
369
+ syntax: "*";
370
+ inherits: false
371
+ }
372
+
373
+ @property --tw-shadow {
374
+ syntax: "*";
375
+ inherits: false;
376
+ initial-value: 0 0 #0000;
377
+ }
378
+
379
+ @property --tw-shadow-color {
380
+ syntax: "*";
381
+ inherits: false
382
+ }
383
+
384
+ @property --tw-shadow-alpha {
385
+ syntax: "<percentage>";
386
+ inherits: false;
387
+ initial-value: 100%;
388
+ }
389
+
390
+ @property --tw-inset-shadow {
391
+ syntax: "*";
392
+ inherits: false;
393
+ initial-value: 0 0 #0000;
394
+ }
395
+
396
+ @property --tw-inset-shadow-color {
397
+ syntax: "*";
398
+ inherits: false
399
+ }
400
+
401
+ @property --tw-inset-shadow-alpha {
402
+ syntax: "<percentage>";
403
+ inherits: false;
404
+ initial-value: 100%;
405
+ }
406
+
407
+ @property --tw-ring-color {
408
+ syntax: "*";
409
+ inherits: false
410
+ }
411
+
412
+ @property --tw-ring-shadow {
413
+ syntax: "*";
414
+ inherits: false;
415
+ initial-value: 0 0 #0000;
416
+ }
417
+
418
+ @property --tw-inset-ring-color {
419
+ syntax: "*";
420
+ inherits: false
421
+ }
422
+
423
+ @property --tw-inset-ring-shadow {
424
+ syntax: "*";
425
+ inherits: false;
426
+ initial-value: 0 0 #0000;
427
+ }
428
+
429
+ @property --tw-ring-inset {
430
+ syntax: "*";
431
+ inherits: false
432
+ }
433
+
434
+ @property --tw-ring-offset-width {
435
+ syntax: "<length>";
436
+ inherits: false;
437
+ initial-value: 0;
438
+ }
439
+
440
+ @property --tw-ring-offset-color {
441
+ syntax: "*";
442
+ inherits: false;
443
+ initial-value: #fff;
444
+ }
445
+
446
+ @property --tw-ring-offset-shadow {
447
+ syntax: "*";
448
+ inherits: false;
449
+ initial-value: 0 0 #0000;
450
+ }
451
+
452
+ @property --tw-outline-style {
453
+ syntax: "*";
454
+ inherits: false;
455
+ initial-value: solid;
456
+ }
457
+ /*$vite$:1*/
package/package.json CHANGED
@@ -1,6 +1,89 @@
1
1
  {
2
2
  "name": "@walidsj/react-ui",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "Accessible React components styled with Tailwind CSS v4 and built on Base UI primitives.",
5
+ "license": "MIT",
6
+ "author": "walidsj (https://github.com/walidsj)",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/walidsj/walid-ui.git"
10
+ },
11
+ "homepage": "https://github.com/walidsj/walid-ui#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/walidsj/walid-ui/issues"
14
+ },
15
+ "type": "module",
16
+ "packageManager": "bun@1.4.4",
17
+ "main": "./dist/index.js",
18
+ "module": "./dist/index.js",
19
+ "types": "./dist/index.d.ts",
20
+ "exports": {
21
+ ".": {
22
+ "types": "./dist/index.d.ts",
23
+ "import": "./dist/index.js"
24
+ },
25
+ "./style.css": "./dist/style.css",
26
+ "./package.json": "./package.json"
27
+ },
28
+ "files": [
29
+ "dist"
30
+ ],
31
+ "sideEffects": [
32
+ "**/*.css"
33
+ ],
34
+ "publishConfig": {
35
+ "access": "public"
36
+ },
37
+ "engines": {
38
+ "node": ">=20.19.0"
39
+ },
40
+ "keywords": [
41
+ "react",
42
+ "design-system",
43
+ "component-library",
44
+ "tailwindcss",
45
+ "base-ui",
46
+ "typescript"
47
+ ],
48
+ "scripts": {
49
+ "dev": "vite build --watch",
50
+ "build": "vite build",
51
+ "typecheck": "tsc --noEmit",
52
+ "test": "vitest run",
53
+ "test:watch": "vitest",
54
+ "lint": "biome check .",
55
+ "format": "biome format --write .",
56
+ "format:check": "biome format .",
57
+ "clean": "rm -rf dist coverage",
58
+ "prepublishOnly": "bun run clean && bun run lint && bun run typecheck && bun run test && bun run build"
59
+ },
60
+ "peerDependencies": {
61
+ "react": "^19.0.0",
62
+ "react-dom": "^19.0.0"
63
+ },
64
+ "dependencies": {
65
+ "@base-ui/react": "^1.9.0",
66
+ "clsx": "^2.1.1",
67
+ "tailwind-merge": "^3.7.0"
68
+ },
69
+ "devDependencies": {
70
+ "@biomejs/biome": "2.6.3",
71
+ "@tailwindcss/vite": "4.3.3",
72
+ "@testing-library/dom": "10.4.2",
73
+ "@testing-library/jest-dom": "7.0.1",
74
+ "@testing-library/react": "16.3.3",
75
+ "@testing-library/user-event": "14.6.8",
76
+ "@types/node": "24.19.2",
77
+ "@types/react": "19.3.0",
78
+ "@types/react-dom": "19.3.0",
79
+ "@vitejs/plugin-react": "6.1.2",
80
+ "jsdom": "30.1.3",
81
+ "react": "19.3.1",
82
+ "react-dom": "19.3.1",
83
+ "tailwindcss": "4.3.3",
84
+ "typescript": "5.9.3",
85
+ "vite": "8.3.5",
86
+ "vite-plugin-dts": "5.1.2",
87
+ "vitest": "5.0.5"
88
+ }
89
+ }