@aortl/admin-react 0.0.1
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 +69 -0
- package/dist/Button.d.ts +11 -0
- package/dist/Button.d.ts.map +1 -0
- package/dist/Card.d.ts +22 -0
- package/dist/Card.d.ts.map +1 -0
- package/dist/Field.d.ts +28 -0
- package/dist/Field.d.ts.map +1 -0
- package/dist/Input.d.ts +12 -0
- package/dist/Input.d.ts.map +1 -0
- package/dist/admin.css +710 -0
- package/dist/index.cjs +100 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +96 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +58 -0
package/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# @aortl/admin-react
|
|
2
|
+
|
|
3
|
+
React component library for the admin design system. Renders the same class names as `@aortl/admin-css`, so vanilla HTML and React look identical.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```fish
|
|
8
|
+
npm install @aortl/admin-react react react-dom
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Use
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import "@aortl/admin-react/styles.css";
|
|
15
|
+
import { Button, Card, Input } from "@aortl/admin-react";
|
|
16
|
+
|
|
17
|
+
export function App() {
|
|
18
|
+
return (
|
|
19
|
+
<Card>
|
|
20
|
+
<Card.Body>
|
|
21
|
+
<Card.Title>Sign in</Card.Title>
|
|
22
|
+
<Input placeholder="Email" />
|
|
23
|
+
<Input type="password" placeholder="Password" />
|
|
24
|
+
<Card.Actions>
|
|
25
|
+
<Button variant="primary">Sign in</Button>
|
|
26
|
+
<Button variant="ghost">Cancel</Button>
|
|
27
|
+
</Card.Actions>
|
|
28
|
+
</Card.Body>
|
|
29
|
+
</Card>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Components
|
|
35
|
+
|
|
36
|
+
| Component | Parts | Key props |
|
|
37
|
+
| ---------- | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
38
|
+
| `<Button>` | — | `variant`: `primary` (default) `\|` `secondary` `\|` `ghost` `\|` `danger` <br/> `size`: `sm` `\|` `md` (default) `\|` `lg` <br/> `block`: boolean |
|
|
39
|
+
| `<Input>` | — | `variant`: `bordered` (default) `\|` `ghost` `\|` `danger` <br/> `inputSize`: `sm` `\|` `md` (default) `\|` `lg` |
|
|
40
|
+
| `<Card>` | `Card.Body`, `Card.Title`, `Card.Description`, `Card.Actions` | `bordered`, `compact` (on root) |
|
|
41
|
+
| `<Field>` | `Field.Label`, `Field.Description`, `Field.Error` | `name`, `validate`, `validationMode` (on root) |
|
|
42
|
+
|
|
43
|
+
> `inputSize` is intentionally named instead of `size` because `<input>` has its own native `size` attribute.
|
|
44
|
+
|
|
45
|
+
All components forward `ref`, accept `className` (merged with the design-system classes), and pass through standard HTML attributes.
|
|
46
|
+
|
|
47
|
+
## Accessibility
|
|
48
|
+
|
|
49
|
+
`Button`, `Input`, and `Field` wrap [Base UI](https://base-ui.com) primitives:
|
|
50
|
+
|
|
51
|
+
- `Button` keeps focus when disabled (`focusableWhenDisabled` available), and can render as another element (`render` prop) while preserving keyboard semantics.
|
|
52
|
+
- `Input` auto-wires into `Field` for label/description/error association and validation state — without manual `id` / `aria-describedby` plumbing.
|
|
53
|
+
- `Field` handles HTML validation (`required`, `minLength`, `pattern`, ...) and surfaces matched errors via `<Field.Error match="..." />`.
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
<Field name="email" validationMode="onBlur">
|
|
57
|
+
<Field.Label>Email</Field.Label>
|
|
58
|
+
<Input type="email" required />
|
|
59
|
+
<Field.Description>We'll never share your email.</Field.Description>
|
|
60
|
+
<Field.Error match="valueMissing">Email is required.</Field.Error>
|
|
61
|
+
<Field.Error match="typeMismatch">Enter a valid email.</Field.Error>
|
|
62
|
+
</Field>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Build
|
|
66
|
+
|
|
67
|
+
```fish
|
|
68
|
+
pnpm build # produces dist/index.{mjs,cjs}, dist/index.d.ts, dist/admin.css
|
|
69
|
+
```
|
package/dist/Button.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Button as BaseButton } from '@base-ui/react/button';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
export type ButtonVariant = "primary" | "secondary" | "ghost" | "danger";
|
|
4
|
+
export type ButtonSize = "sm" | "md" | "lg";
|
|
5
|
+
export interface ButtonProps extends ComponentProps<typeof BaseButton> {
|
|
6
|
+
variant?: ButtonVariant;
|
|
7
|
+
size?: ButtonSize;
|
|
8
|
+
block?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function Button({ variant, size, block, className, type, ...rest }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../src/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,CAAC;AACzE,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,MAAM,WAAW,WAAY,SAAQ,cAAc,CAAC,OAAO,UAAU,CAAC;IACpE,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,MAAM,CAAC,EACrB,OAAmB,EACnB,IAAW,EACX,KAAK,EACL,SAAS,EACT,IAAe,EACf,GAAG,IAAI,EACR,EAAE,WAAW,2CAcb"}
|
package/dist/Card.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
export interface CardProps extends ComponentProps<"div"> {
|
|
3
|
+
bordered?: boolean;
|
|
4
|
+
compact?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare function CardRoot({ bordered, compact, className, ...rest }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export type CardBodyProps = ComponentProps<"div">;
|
|
8
|
+
declare function CardBody({ className, ...rest }: CardBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export type CardTitleProps = ComponentProps<"h3">;
|
|
10
|
+
declare function CardTitle({ className, children, ...rest }: CardTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export type CardDescriptionProps = ComponentProps<"p">;
|
|
12
|
+
declare function CardDescription({ className, ...rest }: CardDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export type CardActionsProps = ComponentProps<"div">;
|
|
14
|
+
declare function CardActions({ className, ...rest }: CardActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const Card: typeof CardRoot & {
|
|
16
|
+
Body: typeof CardBody;
|
|
17
|
+
Title: typeof CardTitle;
|
|
18
|
+
Description: typeof CardDescription;
|
|
19
|
+
Actions: typeof CardActions;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../src/Card.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,KAAK,CAAC;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,iBAAS,QAAQ,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,2CAOrE;AAED,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAClD,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,aAAa,2CAEtD;AAED,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;AAClD,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,2CAMlE;AAED,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;AACvD,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,oBAAoB,2CAEpE;AAED,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AACrD,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,gBAAgB,2CAE5D;AAED,eAAO,MAAM,IAAI;;;;;CAKf,CAAC"}
|
package/dist/Field.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Field as BaseField } from '@base-ui/react/field';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Thin wrappers around Base UI's Field primitives that apply the design
|
|
5
|
+
* system's class names. Compose for fully accessible labeled form fields:
|
|
6
|
+
*
|
|
7
|
+
* <Field name="email">
|
|
8
|
+
* <Field.Label>Email</Field.Label>
|
|
9
|
+
* <Input type="email" required />
|
|
10
|
+
* <Field.Description>We'll never share your email.</Field.Description>
|
|
11
|
+
* <Field.Error match="valueMissing">Email is required.</Field.Error>
|
|
12
|
+
* </Field>
|
|
13
|
+
*/
|
|
14
|
+
export type FieldProps = ComponentProps<typeof BaseField.Root>;
|
|
15
|
+
declare function FieldRoot({ className, ...rest }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export type FieldLabelProps = ComponentProps<typeof BaseField.Label>;
|
|
17
|
+
declare function FieldLabel({ className, ...rest }: FieldLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export type FieldDescriptionProps = ComponentProps<typeof BaseField.Description>;
|
|
19
|
+
declare function FieldDescription({ className, ...rest }: FieldDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export type FieldErrorProps = ComponentProps<typeof BaseField.Error>;
|
|
21
|
+
declare function FieldError({ className, ...rest }: FieldErrorProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const Field: typeof FieldRoot & {
|
|
23
|
+
Label: typeof FieldLabel;
|
|
24
|
+
Description: typeof FieldDescription;
|
|
25
|
+
Error: typeof FieldError;
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=Field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../src/Field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;AAE/D,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,UAAU,2CAOpD;AAED,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;AAErE,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,eAAe,2CAO1D;AAED,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,WAAW,CAAC,CAAC;AAEjF,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,qBAAqB,2CAOtE;AAED,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;AAErE,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,eAAe,2CAO1D;AAED,eAAO,MAAM,KAAK;;;;CAIhB,CAAC"}
|
package/dist/Input.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Input as BaseInput } from '@base-ui/react/input';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
export type InputVariant = "bordered" | "ghost" | "danger";
|
|
4
|
+
export type InputSize = "sm" | "md" | "lg";
|
|
5
|
+
type BaseInputProps = Omit<ComponentProps<typeof BaseInput>, "size">;
|
|
6
|
+
export interface InputProps extends BaseInputProps {
|
|
7
|
+
variant?: InputVariant;
|
|
8
|
+
inputSize?: InputSize;
|
|
9
|
+
}
|
|
10
|
+
export declare function Input({ variant, inputSize, className, type, ...rest }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../src/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC3D,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C,KAAK,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC;AAErE,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,wBAAgB,KAAK,CAAC,EACpB,OAAoB,EACpB,SAAgB,EAChB,SAAS,EACT,IAAa,EACb,GAAG,IAAI,EACR,EAAE,UAAU,2CAaZ"}
|
package/dist/admin.css
ADDED
|
@@ -0,0 +1,710 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties;
|
|
3
|
+
@layer theme, base, components, utilities;
|
|
4
|
+
@layer theme {
|
|
5
|
+
:root, :host {
|
|
6
|
+
--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
|
|
7
|
+
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
8
|
+
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
|
|
9
|
+
"Courier New", monospace;
|
|
10
|
+
--spacing: 0.25rem;
|
|
11
|
+
--text-xs: 0.75rem;
|
|
12
|
+
--text-xs--line-height: calc(1 / 0.75);
|
|
13
|
+
--text-sm: 0.875rem;
|
|
14
|
+
--text-sm--line-height: calc(1.25 / 0.875);
|
|
15
|
+
--text-base: 1rem;
|
|
16
|
+
--text-base--line-height: calc(1.5 / 1);
|
|
17
|
+
--text-lg: 1.125rem;
|
|
18
|
+
--text-lg--line-height: calc(1.75 / 1.125);
|
|
19
|
+
--font-weight-medium: 500;
|
|
20
|
+
--font-weight-semibold: 600;
|
|
21
|
+
--leading-tight: 1.25;
|
|
22
|
+
--leading-relaxed: 1.625;
|
|
23
|
+
--radius-lg: 0.5rem;
|
|
24
|
+
--radius-xl: 0.75rem;
|
|
25
|
+
--default-transition-duration: 150ms;
|
|
26
|
+
--default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
27
|
+
--default-font-family: var(--font-sans);
|
|
28
|
+
--default-mono-font-family: var(--font-mono);
|
|
29
|
+
--color-paper: #fffcf0;
|
|
30
|
+
--color-black: #100f0f;
|
|
31
|
+
--color-base-50: #f2f0e5;
|
|
32
|
+
--color-base-100: #e6e4d9;
|
|
33
|
+
--color-base-150: #dad8ce;
|
|
34
|
+
--color-base-200: #cecdc3;
|
|
35
|
+
--color-base-300: #b7b5ac;
|
|
36
|
+
--color-base-400: #9f9d96;
|
|
37
|
+
--color-base-500: #878580;
|
|
38
|
+
--color-base-600: #6f6e69;
|
|
39
|
+
--color-base-700: #575653;
|
|
40
|
+
--color-base-800: #403e3c;
|
|
41
|
+
--color-base-850: #343331;
|
|
42
|
+
--color-base-900: #282726;
|
|
43
|
+
--color-base-950: #1c1b1a;
|
|
44
|
+
--color-red-50: #ffe1d5;
|
|
45
|
+
--color-red-100: #ffcabb;
|
|
46
|
+
--color-red-150: #fdb2a2;
|
|
47
|
+
--color-red-200: #f89a8a;
|
|
48
|
+
--color-red-300: #e8705f;
|
|
49
|
+
--color-red-400: #d14d41;
|
|
50
|
+
--color-red-500: #c03e35;
|
|
51
|
+
--color-red-600: #af3029;
|
|
52
|
+
--color-red-700: #942822;
|
|
53
|
+
--color-red-800: #6c201c;
|
|
54
|
+
--color-red-850: #551b18;
|
|
55
|
+
--color-red-900: #3e1715;
|
|
56
|
+
--color-red-950: #261312;
|
|
57
|
+
--color-orange-50: #ffe7ce;
|
|
58
|
+
--color-orange-100: #fed3af;
|
|
59
|
+
--color-orange-150: #fcc192;
|
|
60
|
+
--color-orange-200: #f9ae77;
|
|
61
|
+
--color-orange-300: #ec8b49;
|
|
62
|
+
--color-orange-400: #da702c;
|
|
63
|
+
--color-orange-500: #cb6120;
|
|
64
|
+
--color-orange-600: #bc5215;
|
|
65
|
+
--color-orange-700: #9d4310;
|
|
66
|
+
--color-orange-800: #71320d;
|
|
67
|
+
--color-orange-850: #59290d;
|
|
68
|
+
--color-orange-900: #40200d;
|
|
69
|
+
--color-orange-950: #27180e;
|
|
70
|
+
--color-yellow-50: #faeec6;
|
|
71
|
+
--color-yellow-100: #f6e2a0;
|
|
72
|
+
--color-yellow-150: #f1d67e;
|
|
73
|
+
--color-yellow-200: #eccb60;
|
|
74
|
+
--color-yellow-300: #dfb431;
|
|
75
|
+
--color-yellow-400: #d0a215;
|
|
76
|
+
--color-yellow-500: #be9207;
|
|
77
|
+
--color-yellow-600: #ad8301;
|
|
78
|
+
--color-yellow-700: #8e6b01;
|
|
79
|
+
--color-yellow-800: #664d01;
|
|
80
|
+
--color-yellow-850: #503d02;
|
|
81
|
+
--color-yellow-900: #3a2d04;
|
|
82
|
+
--color-yellow-950: #241e08;
|
|
83
|
+
--color-green-50: #edeecf;
|
|
84
|
+
--color-green-100: #dde2b2;
|
|
85
|
+
--color-green-150: #cdd597;
|
|
86
|
+
--color-green-200: #bec97e;
|
|
87
|
+
--color-green-300: #a0af54;
|
|
88
|
+
--color-green-400: #879a39;
|
|
89
|
+
--color-green-500: #768d21;
|
|
90
|
+
--color-green-600: #66800b;
|
|
91
|
+
--color-green-700: #536907;
|
|
92
|
+
--color-green-800: #3d4c07;
|
|
93
|
+
--color-green-850: #313d07;
|
|
94
|
+
--color-green-900: #252d09;
|
|
95
|
+
--color-green-950: #1a1e0c;
|
|
96
|
+
--color-cyan-50: #ddf1e4;
|
|
97
|
+
--color-cyan-100: #bfe8d9;
|
|
98
|
+
--color-cyan-150: #a2dece;
|
|
99
|
+
--color-cyan-200: #87d3c3;
|
|
100
|
+
--color-cyan-300: #5abdac;
|
|
101
|
+
--color-cyan-400: #3aa99f;
|
|
102
|
+
--color-cyan-500: #2f968d;
|
|
103
|
+
--color-cyan-600: #24837b;
|
|
104
|
+
--color-cyan-700: #1c6c66;
|
|
105
|
+
--color-cyan-800: #164f4a;
|
|
106
|
+
--color-cyan-850: #143f3c;
|
|
107
|
+
--color-cyan-900: #122f2c;
|
|
108
|
+
--color-cyan-950: #101f1d;
|
|
109
|
+
--color-blue-50: #e1eceb;
|
|
110
|
+
--color-blue-100: #c6dde8;
|
|
111
|
+
--color-blue-150: #abcfe2;
|
|
112
|
+
--color-blue-200: #92bfdb;
|
|
113
|
+
--color-blue-300: #66a0c8;
|
|
114
|
+
--color-blue-400: #4385be;
|
|
115
|
+
--color-blue-500: #3171b2;
|
|
116
|
+
--color-blue-600: #205ea6;
|
|
117
|
+
--color-blue-700: #1a4f8c;
|
|
118
|
+
--color-blue-800: #163b66;
|
|
119
|
+
--color-blue-850: #133051;
|
|
120
|
+
--color-blue-900: #12253b;
|
|
121
|
+
--color-blue-950: #101a24;
|
|
122
|
+
--color-purple-50: #f0eaec;
|
|
123
|
+
--color-purple-100: #e2d9e9;
|
|
124
|
+
--color-purple-150: #d3cae6;
|
|
125
|
+
--color-purple-200: #c4b9e0;
|
|
126
|
+
--color-purple-300: #a699d0;
|
|
127
|
+
--color-purple-400: #8b7ec8;
|
|
128
|
+
--color-purple-500: #735eb5;
|
|
129
|
+
--color-purple-600: #5e409d;
|
|
130
|
+
--color-purple-700: #4f3685;
|
|
131
|
+
--color-purple-800: #3c2a62;
|
|
132
|
+
--color-purple-850: #31234e;
|
|
133
|
+
--color-purple-900: #261c39;
|
|
134
|
+
--color-purple-950: #1a1623;
|
|
135
|
+
--color-magenta-50: #fee4e5;
|
|
136
|
+
--color-magenta-100: #fccfda;
|
|
137
|
+
--color-magenta-150: #f9b9cf;
|
|
138
|
+
--color-magenta-200: #f4a4c2;
|
|
139
|
+
--color-magenta-300: #e47da8;
|
|
140
|
+
--color-magenta-400: #ce5d97;
|
|
141
|
+
--color-magenta-500: #b74583;
|
|
142
|
+
--color-magenta-600: #a02f6f;
|
|
143
|
+
--color-magenta-700: #87285e;
|
|
144
|
+
--color-magenta-800: #641f46;
|
|
145
|
+
--color-magenta-850: #4f1b39;
|
|
146
|
+
--color-magenta-900: #39172b;
|
|
147
|
+
--color-magenta-950: #24131d;
|
|
148
|
+
--color-surface: var(--color-paper);
|
|
149
|
+
--color-surface-muted: var(--color-base-50);
|
|
150
|
+
--color-surface-strong: var(--color-base-100);
|
|
151
|
+
--color-text: var(--color-black);
|
|
152
|
+
--color-text-muted: var(--color-base-600);
|
|
153
|
+
--color-border: var(--color-base-150);
|
|
154
|
+
--color-border-strong: var(--color-base-300);
|
|
155
|
+
--color-primary: var(--color-blue-600);
|
|
156
|
+
--color-primary-hover: var(--color-blue-700);
|
|
157
|
+
--color-primary-muted: var(--color-blue-50);
|
|
158
|
+
--color-primary-content: var(--color-paper);
|
|
159
|
+
--color-danger: var(--color-red-600);
|
|
160
|
+
--color-danger-hover: var(--color-red-700);
|
|
161
|
+
--color-danger-muted: var(--color-red-50);
|
|
162
|
+
--color-danger-content: var(--color-paper);
|
|
163
|
+
--color-success: var(--color-green-600);
|
|
164
|
+
--color-success-hover: var(--color-green-700);
|
|
165
|
+
--color-success-muted: var(--color-green-50);
|
|
166
|
+
--color-success-content: var(--color-paper);
|
|
167
|
+
--color-warning: var(--color-yellow-400);
|
|
168
|
+
--color-warning-hover: var(--color-yellow-500);
|
|
169
|
+
--color-warning-muted: var(--color-yellow-50);
|
|
170
|
+
--color-warning-content: var(--color-black);
|
|
171
|
+
--color-info: var(--color-cyan-600);
|
|
172
|
+
--color-info-hover: var(--color-cyan-700);
|
|
173
|
+
--color-info-muted: var(--color-cyan-50);
|
|
174
|
+
--color-info-content: var(--color-paper);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
@layer base {
|
|
178
|
+
*, ::after, ::before, ::backdrop, ::file-selector-button {
|
|
179
|
+
box-sizing: border-box;
|
|
180
|
+
margin: 0;
|
|
181
|
+
padding: 0;
|
|
182
|
+
border: 0 solid;
|
|
183
|
+
}
|
|
184
|
+
html, :host {
|
|
185
|
+
line-height: 1.5;
|
|
186
|
+
-webkit-text-size-adjust: 100%;
|
|
187
|
+
tab-size: 4;
|
|
188
|
+
font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
|
|
189
|
+
font-feature-settings: var(--default-font-feature-settings, normal);
|
|
190
|
+
font-variation-settings: var(--default-font-variation-settings, normal);
|
|
191
|
+
-webkit-tap-highlight-color: transparent;
|
|
192
|
+
}
|
|
193
|
+
hr {
|
|
194
|
+
height: 0;
|
|
195
|
+
color: inherit;
|
|
196
|
+
border-top-width: 1px;
|
|
197
|
+
}
|
|
198
|
+
abbr:where([title]) {
|
|
199
|
+
-webkit-text-decoration: underline dotted;
|
|
200
|
+
text-decoration: underline dotted;
|
|
201
|
+
}
|
|
202
|
+
h1, h2, h3, h4, h5, h6 {
|
|
203
|
+
font-size: inherit;
|
|
204
|
+
font-weight: inherit;
|
|
205
|
+
}
|
|
206
|
+
a {
|
|
207
|
+
color: inherit;
|
|
208
|
+
-webkit-text-decoration: inherit;
|
|
209
|
+
text-decoration: inherit;
|
|
210
|
+
}
|
|
211
|
+
b, strong {
|
|
212
|
+
font-weight: bolder;
|
|
213
|
+
}
|
|
214
|
+
code, kbd, samp, pre {
|
|
215
|
+
font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
|
|
216
|
+
font-feature-settings: var(--default-mono-font-feature-settings, normal);
|
|
217
|
+
font-variation-settings: var(--default-mono-font-variation-settings, normal);
|
|
218
|
+
font-size: 1em;
|
|
219
|
+
}
|
|
220
|
+
small {
|
|
221
|
+
font-size: 80%;
|
|
222
|
+
}
|
|
223
|
+
sub, sup {
|
|
224
|
+
font-size: 75%;
|
|
225
|
+
line-height: 0;
|
|
226
|
+
position: relative;
|
|
227
|
+
vertical-align: baseline;
|
|
228
|
+
}
|
|
229
|
+
sub {
|
|
230
|
+
bottom: -0.25em;
|
|
231
|
+
}
|
|
232
|
+
sup {
|
|
233
|
+
top: -0.5em;
|
|
234
|
+
}
|
|
235
|
+
table {
|
|
236
|
+
text-indent: 0;
|
|
237
|
+
border-color: inherit;
|
|
238
|
+
border-collapse: collapse;
|
|
239
|
+
}
|
|
240
|
+
:-moz-focusring {
|
|
241
|
+
outline: auto;
|
|
242
|
+
}
|
|
243
|
+
progress {
|
|
244
|
+
vertical-align: baseline;
|
|
245
|
+
}
|
|
246
|
+
summary {
|
|
247
|
+
display: list-item;
|
|
248
|
+
}
|
|
249
|
+
ol, ul, menu {
|
|
250
|
+
list-style: none;
|
|
251
|
+
}
|
|
252
|
+
img, svg, video, canvas, audio, iframe, embed, object {
|
|
253
|
+
display: block;
|
|
254
|
+
vertical-align: middle;
|
|
255
|
+
}
|
|
256
|
+
img, video {
|
|
257
|
+
max-width: 100%;
|
|
258
|
+
height: auto;
|
|
259
|
+
}
|
|
260
|
+
button, input, select, optgroup, textarea, ::file-selector-button {
|
|
261
|
+
font: inherit;
|
|
262
|
+
font-feature-settings: inherit;
|
|
263
|
+
font-variation-settings: inherit;
|
|
264
|
+
letter-spacing: inherit;
|
|
265
|
+
color: inherit;
|
|
266
|
+
border-radius: 0;
|
|
267
|
+
background-color: transparent;
|
|
268
|
+
opacity: 1;
|
|
269
|
+
}
|
|
270
|
+
:where(select:is([multiple], [size])) optgroup {
|
|
271
|
+
font-weight: bolder;
|
|
272
|
+
}
|
|
273
|
+
:where(select:is([multiple], [size])) optgroup option {
|
|
274
|
+
padding-inline-start: 20px;
|
|
275
|
+
}
|
|
276
|
+
::file-selector-button {
|
|
277
|
+
margin-inline-end: 4px;
|
|
278
|
+
}
|
|
279
|
+
::placeholder {
|
|
280
|
+
opacity: 1;
|
|
281
|
+
}
|
|
282
|
+
@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
|
|
283
|
+
::placeholder {
|
|
284
|
+
color: currentcolor;
|
|
285
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
286
|
+
color: color-mix(in oklab, currentcolor 50%, transparent);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
textarea {
|
|
291
|
+
resize: vertical;
|
|
292
|
+
}
|
|
293
|
+
::-webkit-search-decoration {
|
|
294
|
+
-webkit-appearance: none;
|
|
295
|
+
}
|
|
296
|
+
::-webkit-date-and-time-value {
|
|
297
|
+
min-height: 1lh;
|
|
298
|
+
text-align: inherit;
|
|
299
|
+
}
|
|
300
|
+
::-webkit-datetime-edit {
|
|
301
|
+
display: inline-flex;
|
|
302
|
+
}
|
|
303
|
+
::-webkit-datetime-edit-fields-wrapper {
|
|
304
|
+
padding: 0;
|
|
305
|
+
}
|
|
306
|
+
::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
|
|
307
|
+
padding-block: 0;
|
|
308
|
+
}
|
|
309
|
+
::-webkit-calendar-picker-indicator {
|
|
310
|
+
line-height: 1;
|
|
311
|
+
}
|
|
312
|
+
:-moz-ui-invalid {
|
|
313
|
+
box-shadow: none;
|
|
314
|
+
}
|
|
315
|
+
button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
|
|
316
|
+
appearance: button;
|
|
317
|
+
}
|
|
318
|
+
::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
|
|
319
|
+
height: auto;
|
|
320
|
+
}
|
|
321
|
+
[hidden]:where(:not([hidden="until-found"])) {
|
|
322
|
+
display: none !important;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
@layer utilities;
|
|
326
|
+
@layer base {
|
|
327
|
+
html {
|
|
328
|
+
color: var(--color-text);
|
|
329
|
+
background-color: var(--color-surface);
|
|
330
|
+
-webkit-text-size-adjust: 100%;
|
|
331
|
+
}
|
|
332
|
+
body {
|
|
333
|
+
font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
334
|
+
line-height: 1.5;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
@layer components {
|
|
338
|
+
.btn {
|
|
339
|
+
display: inline-flex;
|
|
340
|
+
cursor: pointer;
|
|
341
|
+
align-items: center;
|
|
342
|
+
justify-content: center;
|
|
343
|
+
gap: calc(var(--spacing) * 2);
|
|
344
|
+
border-radius: var(--radius-lg);
|
|
345
|
+
border-style: var(--tw-border-style);
|
|
346
|
+
border-width: 1px;
|
|
347
|
+
border-color: transparent;
|
|
348
|
+
padding-inline: calc(var(--spacing) * 4);
|
|
349
|
+
padding-block: calc(var(--spacing) * 2);
|
|
350
|
+
font-size: var(--text-sm);
|
|
351
|
+
line-height: var(--tw-leading, var(--text-sm--line-height));
|
|
352
|
+
--tw-leading: 1;
|
|
353
|
+
line-height: 1;
|
|
354
|
+
--tw-font-weight: var(--font-weight-medium);
|
|
355
|
+
font-weight: var(--font-weight-medium);
|
|
356
|
+
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
|
|
357
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
358
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
359
|
+
--tw-duration: 150ms;
|
|
360
|
+
transition-duration: 150ms;
|
|
361
|
+
-webkit-user-select: none;
|
|
362
|
+
user-select: none;
|
|
363
|
+
&:focus-visible {
|
|
364
|
+
outline-style: var(--tw-outline-style);
|
|
365
|
+
outline-width: 2px;
|
|
366
|
+
}
|
|
367
|
+
&:focus-visible {
|
|
368
|
+
outline-offset: 2px;
|
|
369
|
+
}
|
|
370
|
+
&:focus-visible {
|
|
371
|
+
outline-color: var(--color-primary);
|
|
372
|
+
}
|
|
373
|
+
&:disabled {
|
|
374
|
+
pointer-events: none;
|
|
375
|
+
}
|
|
376
|
+
&:disabled {
|
|
377
|
+
cursor: not-allowed;
|
|
378
|
+
}
|
|
379
|
+
&:disabled {
|
|
380
|
+
opacity: 50%;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
.btn-primary {
|
|
384
|
+
background-color: var(--color-primary);
|
|
385
|
+
color: var(--color-primary-content);
|
|
386
|
+
&:hover {
|
|
387
|
+
@media (hover: hover) {
|
|
388
|
+
background-color: var(--color-primary-hover);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
.btn-secondary {
|
|
393
|
+
border-color: var(--color-border);
|
|
394
|
+
background-color: var(--color-surface-muted);
|
|
395
|
+
color: var(--color-text);
|
|
396
|
+
&:hover {
|
|
397
|
+
@media (hover: hover) {
|
|
398
|
+
background-color: var(--color-surface-strong);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
.btn-ghost {
|
|
403
|
+
background-color: transparent;
|
|
404
|
+
color: var(--color-text);
|
|
405
|
+
&:hover {
|
|
406
|
+
@media (hover: hover) {
|
|
407
|
+
background-color: var(--color-surface-muted);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
.btn-danger {
|
|
412
|
+
background-color: var(--color-danger);
|
|
413
|
+
color: var(--color-danger-content);
|
|
414
|
+
&:hover {
|
|
415
|
+
@media (hover: hover) {
|
|
416
|
+
opacity: 90%;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
.btn-sm {
|
|
421
|
+
gap: calc(var(--spacing) * 1.5);
|
|
422
|
+
padding-inline: calc(var(--spacing) * 3);
|
|
423
|
+
padding-block: calc(var(--spacing) * 1.5);
|
|
424
|
+
font-size: var(--text-xs);
|
|
425
|
+
line-height: var(--tw-leading, var(--text-xs--line-height));
|
|
426
|
+
}
|
|
427
|
+
.btn-lg {
|
|
428
|
+
gap: calc(var(--spacing) * 2.5);
|
|
429
|
+
padding-inline: calc(var(--spacing) * 5);
|
|
430
|
+
padding-block: calc(var(--spacing) * 2.5);
|
|
431
|
+
font-size: var(--text-base);
|
|
432
|
+
line-height: var(--tw-leading, var(--text-base--line-height));
|
|
433
|
+
}
|
|
434
|
+
.btn-block {
|
|
435
|
+
width: 100%;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
@layer components {
|
|
439
|
+
.input {
|
|
440
|
+
display: inline-flex;
|
|
441
|
+
width: 100%;
|
|
442
|
+
align-items: center;
|
|
443
|
+
border-radius: var(--radius-lg);
|
|
444
|
+
border-style: var(--tw-border-style);
|
|
445
|
+
border-width: 1px;
|
|
446
|
+
border-color: transparent;
|
|
447
|
+
background-color: var(--color-surface);
|
|
448
|
+
padding-inline: calc(var(--spacing) * 3);
|
|
449
|
+
padding-block: calc(var(--spacing) * 2);
|
|
450
|
+
font-size: var(--text-sm);
|
|
451
|
+
line-height: var(--tw-leading, var(--text-sm--line-height));
|
|
452
|
+
--tw-leading: 1;
|
|
453
|
+
line-height: 1;
|
|
454
|
+
color: var(--color-text);
|
|
455
|
+
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
|
|
456
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
457
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
458
|
+
--tw-duration: 150ms;
|
|
459
|
+
transition-duration: 150ms;
|
|
460
|
+
&::placeholder {
|
|
461
|
+
color: var(--color-text-muted);
|
|
462
|
+
}
|
|
463
|
+
&:focus-visible {
|
|
464
|
+
outline-style: var(--tw-outline-style);
|
|
465
|
+
outline-width: 2px;
|
|
466
|
+
}
|
|
467
|
+
&:focus-visible {
|
|
468
|
+
outline-offset: 2px;
|
|
469
|
+
}
|
|
470
|
+
&:focus-visible {
|
|
471
|
+
outline-color: var(--color-primary);
|
|
472
|
+
}
|
|
473
|
+
&:disabled {
|
|
474
|
+
cursor: not-allowed;
|
|
475
|
+
}
|
|
476
|
+
&:disabled {
|
|
477
|
+
opacity: 50%;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
.input-bordered {
|
|
481
|
+
border-color: var(--color-border);
|
|
482
|
+
&:hover {
|
|
483
|
+
@media (hover: hover) {
|
|
484
|
+
border-color: var(--color-border-strong);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
.input-ghost {
|
|
489
|
+
background-color: transparent;
|
|
490
|
+
&:hover {
|
|
491
|
+
@media (hover: hover) {
|
|
492
|
+
background-color: var(--color-surface-muted);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
.input-danger {
|
|
497
|
+
border-color: var(--color-danger);
|
|
498
|
+
&:focus-visible {
|
|
499
|
+
outline-color: var(--color-danger);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
.input-sm {
|
|
503
|
+
padding-inline: calc(var(--spacing) * 2.5);
|
|
504
|
+
padding-block: calc(var(--spacing) * 1.5);
|
|
505
|
+
font-size: var(--text-xs);
|
|
506
|
+
line-height: var(--tw-leading, var(--text-xs--line-height));
|
|
507
|
+
}
|
|
508
|
+
.input-lg {
|
|
509
|
+
padding-inline: calc(var(--spacing) * 4);
|
|
510
|
+
padding-block: calc(var(--spacing) * 2.5);
|
|
511
|
+
font-size: var(--text-base);
|
|
512
|
+
line-height: var(--tw-leading, var(--text-base--line-height));
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
@layer components {
|
|
516
|
+
.card {
|
|
517
|
+
display: flex;
|
|
518
|
+
flex-direction: column;
|
|
519
|
+
overflow: hidden;
|
|
520
|
+
border-radius: var(--radius-xl);
|
|
521
|
+
border-style: var(--tw-border-style);
|
|
522
|
+
border-width: 1px;
|
|
523
|
+
border-color: var(--color-border);
|
|
524
|
+
background-color: var(--color-surface);
|
|
525
|
+
color: var(--color-text);
|
|
526
|
+
--tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.05));
|
|
527
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
528
|
+
}
|
|
529
|
+
.card-body {
|
|
530
|
+
display: flex;
|
|
531
|
+
flex-direction: column;
|
|
532
|
+
gap: calc(var(--spacing) * 3);
|
|
533
|
+
padding: calc(var(--spacing) * 5);
|
|
534
|
+
}
|
|
535
|
+
.card-title {
|
|
536
|
+
font-size: var(--text-lg);
|
|
537
|
+
line-height: var(--tw-leading, var(--text-lg--line-height));
|
|
538
|
+
--tw-leading: var(--leading-tight);
|
|
539
|
+
line-height: var(--leading-tight);
|
|
540
|
+
--tw-font-weight: var(--font-weight-semibold);
|
|
541
|
+
font-weight: var(--font-weight-semibold);
|
|
542
|
+
}
|
|
543
|
+
.card-description {
|
|
544
|
+
font-size: var(--text-sm);
|
|
545
|
+
line-height: var(--tw-leading, var(--text-sm--line-height));
|
|
546
|
+
color: var(--color-text-muted);
|
|
547
|
+
}
|
|
548
|
+
.card-actions {
|
|
549
|
+
margin-top: auto;
|
|
550
|
+
display: flex;
|
|
551
|
+
flex-wrap: wrap;
|
|
552
|
+
align-items: center;
|
|
553
|
+
gap: calc(var(--spacing) * 2);
|
|
554
|
+
padding-top: calc(var(--spacing) * 2);
|
|
555
|
+
}
|
|
556
|
+
.card-compact .card-body {
|
|
557
|
+
gap: calc(var(--spacing) * 2);
|
|
558
|
+
padding: calc(var(--spacing) * 3);
|
|
559
|
+
}
|
|
560
|
+
.card-bordered {
|
|
561
|
+
border-color: var(--color-border-strong);
|
|
562
|
+
--tw-shadow: 0 0 #0000;
|
|
563
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
@layer components {
|
|
567
|
+
.field {
|
|
568
|
+
display: flex;
|
|
569
|
+
flex-direction: column;
|
|
570
|
+
gap: calc(var(--spacing) * 1.5);
|
|
571
|
+
}
|
|
572
|
+
.field-label {
|
|
573
|
+
font-size: var(--text-sm);
|
|
574
|
+
line-height: var(--tw-leading, var(--text-sm--line-height));
|
|
575
|
+
--tw-leading: 1;
|
|
576
|
+
line-height: 1;
|
|
577
|
+
--tw-font-weight: var(--font-weight-medium);
|
|
578
|
+
font-weight: var(--font-weight-medium);
|
|
579
|
+
color: var(--color-text);
|
|
580
|
+
}
|
|
581
|
+
.field-description {
|
|
582
|
+
font-size: var(--text-xs);
|
|
583
|
+
line-height: var(--tw-leading, var(--text-xs--line-height));
|
|
584
|
+
--tw-leading: var(--leading-relaxed);
|
|
585
|
+
line-height: var(--leading-relaxed);
|
|
586
|
+
color: var(--color-text-muted);
|
|
587
|
+
}
|
|
588
|
+
.field-error {
|
|
589
|
+
font-size: var(--text-xs);
|
|
590
|
+
line-height: var(--tw-leading, var(--text-xs--line-height));
|
|
591
|
+
--tw-leading: var(--leading-relaxed);
|
|
592
|
+
line-height: var(--leading-relaxed);
|
|
593
|
+
color: var(--color-danger);
|
|
594
|
+
}
|
|
595
|
+
.field[data-invalid] .input {
|
|
596
|
+
border-color: var(--color-danger);
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
@property --tw-border-style {
|
|
600
|
+
syntax: "*";
|
|
601
|
+
inherits: false;
|
|
602
|
+
initial-value: solid;
|
|
603
|
+
}
|
|
604
|
+
@property --tw-leading {
|
|
605
|
+
syntax: "*";
|
|
606
|
+
inherits: false;
|
|
607
|
+
}
|
|
608
|
+
@property --tw-font-weight {
|
|
609
|
+
syntax: "*";
|
|
610
|
+
inherits: false;
|
|
611
|
+
}
|
|
612
|
+
@property --tw-duration {
|
|
613
|
+
syntax: "*";
|
|
614
|
+
inherits: false;
|
|
615
|
+
}
|
|
616
|
+
@property --tw-outline-style {
|
|
617
|
+
syntax: "*";
|
|
618
|
+
inherits: false;
|
|
619
|
+
initial-value: solid;
|
|
620
|
+
}
|
|
621
|
+
@property --tw-shadow {
|
|
622
|
+
syntax: "*";
|
|
623
|
+
inherits: false;
|
|
624
|
+
initial-value: 0 0 #0000;
|
|
625
|
+
}
|
|
626
|
+
@property --tw-shadow-color {
|
|
627
|
+
syntax: "*";
|
|
628
|
+
inherits: false;
|
|
629
|
+
}
|
|
630
|
+
@property --tw-shadow-alpha {
|
|
631
|
+
syntax: "<percentage>";
|
|
632
|
+
inherits: false;
|
|
633
|
+
initial-value: 100%;
|
|
634
|
+
}
|
|
635
|
+
@property --tw-inset-shadow {
|
|
636
|
+
syntax: "*";
|
|
637
|
+
inherits: false;
|
|
638
|
+
initial-value: 0 0 #0000;
|
|
639
|
+
}
|
|
640
|
+
@property --tw-inset-shadow-color {
|
|
641
|
+
syntax: "*";
|
|
642
|
+
inherits: false;
|
|
643
|
+
}
|
|
644
|
+
@property --tw-inset-shadow-alpha {
|
|
645
|
+
syntax: "<percentage>";
|
|
646
|
+
inherits: false;
|
|
647
|
+
initial-value: 100%;
|
|
648
|
+
}
|
|
649
|
+
@property --tw-ring-color {
|
|
650
|
+
syntax: "*";
|
|
651
|
+
inherits: false;
|
|
652
|
+
}
|
|
653
|
+
@property --tw-ring-shadow {
|
|
654
|
+
syntax: "*";
|
|
655
|
+
inherits: false;
|
|
656
|
+
initial-value: 0 0 #0000;
|
|
657
|
+
}
|
|
658
|
+
@property --tw-inset-ring-color {
|
|
659
|
+
syntax: "*";
|
|
660
|
+
inherits: false;
|
|
661
|
+
}
|
|
662
|
+
@property --tw-inset-ring-shadow {
|
|
663
|
+
syntax: "*";
|
|
664
|
+
inherits: false;
|
|
665
|
+
initial-value: 0 0 #0000;
|
|
666
|
+
}
|
|
667
|
+
@property --tw-ring-inset {
|
|
668
|
+
syntax: "*";
|
|
669
|
+
inherits: false;
|
|
670
|
+
}
|
|
671
|
+
@property --tw-ring-offset-width {
|
|
672
|
+
syntax: "<length>";
|
|
673
|
+
inherits: false;
|
|
674
|
+
initial-value: 0px;
|
|
675
|
+
}
|
|
676
|
+
@property --tw-ring-offset-color {
|
|
677
|
+
syntax: "*";
|
|
678
|
+
inherits: false;
|
|
679
|
+
initial-value: #fff;
|
|
680
|
+
}
|
|
681
|
+
@property --tw-ring-offset-shadow {
|
|
682
|
+
syntax: "*";
|
|
683
|
+
inherits: false;
|
|
684
|
+
initial-value: 0 0 #0000;
|
|
685
|
+
}
|
|
686
|
+
@layer properties {
|
|
687
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
688
|
+
*, ::before, ::after, ::backdrop {
|
|
689
|
+
--tw-border-style: solid;
|
|
690
|
+
--tw-leading: initial;
|
|
691
|
+
--tw-font-weight: initial;
|
|
692
|
+
--tw-duration: initial;
|
|
693
|
+
--tw-outline-style: solid;
|
|
694
|
+
--tw-shadow: 0 0 #0000;
|
|
695
|
+
--tw-shadow-color: initial;
|
|
696
|
+
--tw-shadow-alpha: 100%;
|
|
697
|
+
--tw-inset-shadow: 0 0 #0000;
|
|
698
|
+
--tw-inset-shadow-color: initial;
|
|
699
|
+
--tw-inset-shadow-alpha: 100%;
|
|
700
|
+
--tw-ring-color: initial;
|
|
701
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
702
|
+
--tw-inset-ring-color: initial;
|
|
703
|
+
--tw-inset-ring-shadow: 0 0 #0000;
|
|
704
|
+
--tw-ring-inset: initial;
|
|
705
|
+
--tw-ring-offset-width: 0px;
|
|
706
|
+
--tw-ring-offset-color: #fff;
|
|
707
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
let _base_ui_react_button = require("@base-ui/react/button");
|
|
3
|
+
let clsx = require("clsx");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let _base_ui_react_input = require("@base-ui/react/input");
|
|
6
|
+
let _base_ui_react_field = require("@base-ui/react/field");
|
|
7
|
+
//#region src/Button.tsx
|
|
8
|
+
function Button({ variant = "primary", size = "md", block, className, type = "button", ...rest }) {
|
|
9
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_button.Button, {
|
|
10
|
+
type,
|
|
11
|
+
className: (0, clsx.clsx)("btn", `btn-${variant}`, size !== "md" && `btn-${size}`, block && "btn-block", typeof className === "string" ? className : void 0),
|
|
12
|
+
...rest
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/Input.tsx
|
|
17
|
+
function Input({ variant = "bordered", inputSize = "md", className, type = "text", ...rest }) {
|
|
18
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_input.Input, {
|
|
19
|
+
type,
|
|
20
|
+
className: (0, clsx.clsx)("input", `input-${variant}`, inputSize !== "md" && `input-${inputSize}`, typeof className === "string" ? className : void 0),
|
|
21
|
+
...rest
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/Card.tsx
|
|
26
|
+
function CardRoot({ bordered, compact, className, ...rest }) {
|
|
27
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
28
|
+
className: (0, clsx.clsx)("card", bordered && "card-bordered", compact && "card-compact", className),
|
|
29
|
+
...rest
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function CardBody({ className, ...rest }) {
|
|
33
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
34
|
+
className: (0, clsx.clsx)("card-body", className),
|
|
35
|
+
...rest
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function CardTitle({ className, children, ...rest }) {
|
|
39
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
40
|
+
className: (0, clsx.clsx)("card-title", className),
|
|
41
|
+
...rest,
|
|
42
|
+
children
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function CardDescription({ className, ...rest }) {
|
|
46
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
47
|
+
className: (0, clsx.clsx)("card-description", className),
|
|
48
|
+
...rest
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function CardActions({ className, ...rest }) {
|
|
52
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
53
|
+
className: (0, clsx.clsx)("card-actions", className),
|
|
54
|
+
...rest
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
var Card = Object.assign(CardRoot, {
|
|
58
|
+
Body: CardBody,
|
|
59
|
+
Title: CardTitle,
|
|
60
|
+
Description: CardDescription,
|
|
61
|
+
Actions: CardActions
|
|
62
|
+
});
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/Field.tsx
|
|
65
|
+
function FieldRoot({ className, ...rest }) {
|
|
66
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_field.Field.Root, {
|
|
67
|
+
className: (0, clsx.clsx)("field", typeof className === "string" ? className : void 0),
|
|
68
|
+
...rest
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function FieldLabel({ className, ...rest }) {
|
|
72
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_field.Field.Label, {
|
|
73
|
+
className: (0, clsx.clsx)("field-label", typeof className === "string" ? className : void 0),
|
|
74
|
+
...rest
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function FieldDescription({ className, ...rest }) {
|
|
78
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_field.Field.Description, {
|
|
79
|
+
className: (0, clsx.clsx)("field-description", typeof className === "string" ? className : void 0),
|
|
80
|
+
...rest
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function FieldError({ className, ...rest }) {
|
|
84
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_field.Field.Error, {
|
|
85
|
+
className: (0, clsx.clsx)("field-error", typeof className === "string" ? className : void 0),
|
|
86
|
+
...rest
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
var Field = Object.assign(FieldRoot, {
|
|
90
|
+
Label: FieldLabel,
|
|
91
|
+
Description: FieldDescription,
|
|
92
|
+
Error: FieldError
|
|
93
|
+
});
|
|
94
|
+
//#endregion
|
|
95
|
+
exports.Button = Button;
|
|
96
|
+
exports.Card = Card;
|
|
97
|
+
exports.Field = Field;
|
|
98
|
+
exports.Input = Input;
|
|
99
|
+
|
|
100
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../src/Button.tsx","../src/Input.tsx","../src/Card.tsx","../src/Field.tsx"],"sourcesContent":["import { Button as BaseButton } from \"@base-ui/react/button\";\nimport { clsx } from \"clsx\";\nimport type { ComponentProps } from \"react\";\n\nexport type ButtonVariant = \"primary\" | \"secondary\" | \"ghost\" | \"danger\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ButtonProps extends ComponentProps<typeof BaseButton> {\n variant?: ButtonVariant;\n size?: ButtonSize;\n block?: boolean;\n}\n\nexport function Button({\n variant = \"primary\",\n size = \"md\",\n block,\n className,\n type = \"button\",\n ...rest\n}: ButtonProps) {\n return (\n <BaseButton\n type={type}\n className={clsx(\n \"btn\",\n `btn-${variant}`,\n size !== \"md\" && `btn-${size}`,\n block && \"btn-block\",\n typeof className === \"string\" ? className : undefined,\n )}\n {...rest}\n />\n );\n}\n","import { Input as BaseInput } from \"@base-ui/react/input\";\nimport { clsx } from \"clsx\";\nimport type { ComponentProps } from \"react\";\n\nexport type InputVariant = \"bordered\" | \"ghost\" | \"danger\";\nexport type InputSize = \"sm\" | \"md\" | \"lg\";\n\ntype BaseInputProps = Omit<ComponentProps<typeof BaseInput>, \"size\">;\n\nexport interface InputProps extends BaseInputProps {\n variant?: InputVariant;\n inputSize?: InputSize;\n}\n\nexport function Input({\n variant = \"bordered\",\n inputSize = \"md\",\n className,\n type = \"text\",\n ...rest\n}: InputProps) {\n return (\n <BaseInput\n type={type}\n className={clsx(\n \"input\",\n `input-${variant}`,\n inputSize !== \"md\" && `input-${inputSize}`,\n typeof className === \"string\" ? className : undefined,\n )}\n {...rest}\n />\n );\n}\n","import { clsx } from \"clsx\";\nimport type { ComponentProps } from \"react\";\n\nexport interface CardProps extends ComponentProps<\"div\"> {\n bordered?: boolean;\n compact?: boolean;\n}\n\nfunction CardRoot({ bordered, compact, className, ...rest }: CardProps) {\n return (\n <div\n className={clsx(\"card\", bordered && \"card-bordered\", compact && \"card-compact\", className)}\n {...rest}\n />\n );\n}\n\nexport type CardBodyProps = ComponentProps<\"div\">;\nfunction CardBody({ className, ...rest }: CardBodyProps) {\n return <div className={clsx(\"card-body\", className)} {...rest} />;\n}\n\nexport type CardTitleProps = ComponentProps<\"h3\">;\nfunction CardTitle({ className, children, ...rest }: CardTitleProps) {\n return (\n <h3 className={clsx(\"card-title\", className)} {...rest}>\n {children}\n </h3>\n );\n}\n\nexport type CardDescriptionProps = ComponentProps<\"p\">;\nfunction CardDescription({ className, ...rest }: CardDescriptionProps) {\n return <p className={clsx(\"card-description\", className)} {...rest} />;\n}\n\nexport type CardActionsProps = ComponentProps<\"div\">;\nfunction CardActions({ className, ...rest }: CardActionsProps) {\n return <div className={clsx(\"card-actions\", className)} {...rest} />;\n}\n\nexport const Card = Object.assign(CardRoot, {\n Body: CardBody,\n Title: CardTitle,\n Description: CardDescription,\n Actions: CardActions,\n});\n","import { Field as BaseField } from \"@base-ui/react/field\";\nimport { clsx } from \"clsx\";\nimport type { ComponentProps } from \"react\";\n\n/**\n * Thin wrappers around Base UI's Field primitives that apply the design\n * system's class names. Compose for fully accessible labeled form fields:\n *\n * <Field name=\"email\">\n * <Field.Label>Email</Field.Label>\n * <Input type=\"email\" required />\n * <Field.Description>We'll never share your email.</Field.Description>\n * <Field.Error match=\"valueMissing\">Email is required.</Field.Error>\n * </Field>\n */\n\nexport type FieldProps = ComponentProps<typeof BaseField.Root>;\n\nfunction FieldRoot({ className, ...rest }: FieldProps) {\n return (\n <BaseField.Root\n className={clsx(\"field\", typeof className === \"string\" ? className : undefined)}\n {...rest}\n />\n );\n}\n\nexport type FieldLabelProps = ComponentProps<typeof BaseField.Label>;\n\nfunction FieldLabel({ className, ...rest }: FieldLabelProps) {\n return (\n <BaseField.Label\n className={clsx(\"field-label\", typeof className === \"string\" ? className : undefined)}\n {...rest}\n />\n );\n}\n\nexport type FieldDescriptionProps = ComponentProps<typeof BaseField.Description>;\n\nfunction FieldDescription({ className, ...rest }: FieldDescriptionProps) {\n return (\n <BaseField.Description\n className={clsx(\"field-description\", typeof className === \"string\" ? className : undefined)}\n {...rest}\n />\n );\n}\n\nexport type FieldErrorProps = ComponentProps<typeof BaseField.Error>;\n\nfunction FieldError({ className, ...rest }: FieldErrorProps) {\n return (\n <BaseField.Error\n className={clsx(\"field-error\", typeof className === \"string\" ? className : undefined)}\n {...rest}\n />\n );\n}\n\nexport const Field = Object.assign(FieldRoot, {\n Label: FieldLabel,\n Description: FieldDescription,\n Error: FieldError,\n});\n"],"mappings":";;;;;;;AAaA,SAAgB,OAAO,EACrB,UAAU,WACV,OAAO,MACP,OACA,WACA,OAAO,UACP,GAAG,QACW;CACd,OACE,iBAAA,GAAA,kBAAA,KAAC,sBAAA,QAAD;EACQ;EACN,YAAA,GAAA,KAAA,MACE,OACA,OAAO,WACP,SAAS,QAAQ,OAAO,QACxB,SAAS,aACT,OAAO,cAAc,WAAW,YAAY,KAAA,CAC9C;EACA,GAAI;CACL,CAAA;AAEL;;;ACpBA,SAAgB,MAAM,EACpB,UAAU,YACV,YAAY,MACZ,WACA,OAAO,QACP,GAAG,QACU;CACb,OACE,iBAAA,GAAA,kBAAA,KAAC,qBAAA,OAAD;EACQ;EACN,YAAA,GAAA,KAAA,MACE,SACA,SAAS,WACT,cAAc,QAAQ,SAAS,aAC/B,OAAO,cAAc,WAAW,YAAY,KAAA,CAC9C;EACA,GAAI;CACL,CAAA;AAEL;;;ACzBA,SAAS,SAAS,EAAE,UAAU,SAAS,WAAW,GAAG,QAAmB;CACtE,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,YAAA,GAAA,KAAA,MAAgB,QAAQ,YAAY,iBAAiB,WAAW,gBAAgB,SAAS;EACzF,GAAI;CACL,CAAA;AAEL;AAGA,SAAS,SAAS,EAAE,WAAW,GAAG,QAAuB;CACvD,OAAO,iBAAA,GAAA,kBAAA,KAAC,OAAD;EAAK,YAAA,GAAA,KAAA,MAAgB,aAAa,SAAS;EAAG,GAAI;CAAO,CAAA;AAClE;AAGA,SAAS,UAAU,EAAE,WAAW,UAAU,GAAG,QAAwB;CACnE,OACE,iBAAA,GAAA,kBAAA,KAAC,MAAD;EAAI,YAAA,GAAA,KAAA,MAAgB,cAAc,SAAS;EAAG,GAAI;EAC/C;CACC,CAAA;AAER;AAGA,SAAS,gBAAgB,EAAE,WAAW,GAAG,QAA8B;CACrE,OAAO,iBAAA,GAAA,kBAAA,KAAC,KAAD;EAAG,YAAA,GAAA,KAAA,MAAgB,oBAAoB,SAAS;EAAG,GAAI;CAAO,CAAA;AACvE;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,QAA0B;CAC7D,OAAO,iBAAA,GAAA,kBAAA,KAAC,OAAD;EAAK,YAAA,GAAA,KAAA,MAAgB,gBAAgB,SAAS;EAAG,GAAI;CAAO,CAAA;AACrE;AAEA,IAAa,OAAO,OAAO,OAAO,UAAU;CAC1C,MAAM;CACN,OAAO;CACP,aAAa;CACb,SAAS;AACX,CAAC;;;AC5BD,SAAS,UAAU,EAAE,WAAW,GAAG,QAAoB;CACrD,OACE,iBAAA,GAAA,kBAAA,KAAC,qBAAA,MAAU,MAAX;EACE,YAAA,GAAA,KAAA,MAAgB,SAAS,OAAO,cAAc,WAAW,YAAY,KAAA,CAAS;EAC9E,GAAI;CACL,CAAA;AAEL;AAIA,SAAS,WAAW,EAAE,WAAW,GAAG,QAAyB;CAC3D,OACE,iBAAA,GAAA,kBAAA,KAAC,qBAAA,MAAU,OAAX;EACE,YAAA,GAAA,KAAA,MAAgB,eAAe,OAAO,cAAc,WAAW,YAAY,KAAA,CAAS;EACpF,GAAI;CACL,CAAA;AAEL;AAIA,SAAS,iBAAiB,EAAE,WAAW,GAAG,QAA+B;CACvE,OACE,iBAAA,GAAA,kBAAA,KAAC,qBAAA,MAAU,aAAX;EACE,YAAA,GAAA,KAAA,MAAgB,qBAAqB,OAAO,cAAc,WAAW,YAAY,KAAA,CAAS;EAC1F,GAAI;CACL,CAAA;AAEL;AAIA,SAAS,WAAW,EAAE,WAAW,GAAG,QAAyB;CAC3D,OACE,iBAAA,GAAA,kBAAA,KAAC,qBAAA,MAAU,OAAX;EACE,YAAA,GAAA,KAAA,MAAgB,eAAe,OAAO,cAAc,WAAW,YAAY,KAAA,CAAS;EACpF,GAAI;CACL,CAAA;AAEL;AAEA,IAAa,QAAQ,OAAO,OAAO,WAAW;CAC5C,OAAO;CACP,aAAa;CACb,OAAO;AACT,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { Button, type ButtonProps, type ButtonVariant, type ButtonSize } from './Button';
|
|
2
|
+
export { Input, type InputProps, type InputVariant, type InputSize } from './Input';
|
|
3
|
+
export { Card, type CardProps, type CardBodyProps, type CardTitleProps, type CardDescriptionProps, type CardActionsProps, } from './Card';
|
|
4
|
+
export { Field, type FieldProps, type FieldLabelProps, type FieldDescriptionProps, type FieldErrorProps, } from './Field';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AACzF,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AACpF,OAAO,EACL,IAAI,EACJ,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,GACtB,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,KAAK,EACL,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,GACrB,MAAM,SAAS,CAAC"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Button as Button$1 } from "@base-ui/react/button";
|
|
2
|
+
import { clsx } from "clsx";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Input as Input$1 } from "@base-ui/react/input";
|
|
5
|
+
import { Field as Field$1 } from "@base-ui/react/field";
|
|
6
|
+
//#region src/Button.tsx
|
|
7
|
+
function Button({ variant = "primary", size = "md", block, className, type = "button", ...rest }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Button$1, {
|
|
9
|
+
type,
|
|
10
|
+
className: clsx("btn", `btn-${variant}`, size !== "md" && `btn-${size}`, block && "btn-block", typeof className === "string" ? className : void 0),
|
|
11
|
+
...rest
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/Input.tsx
|
|
16
|
+
function Input({ variant = "bordered", inputSize = "md", className, type = "text", ...rest }) {
|
|
17
|
+
return /* @__PURE__ */ jsx(Input$1, {
|
|
18
|
+
type,
|
|
19
|
+
className: clsx("input", `input-${variant}`, inputSize !== "md" && `input-${inputSize}`, typeof className === "string" ? className : void 0),
|
|
20
|
+
...rest
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/Card.tsx
|
|
25
|
+
function CardRoot({ bordered, compact, className, ...rest }) {
|
|
26
|
+
return /* @__PURE__ */ jsx("div", {
|
|
27
|
+
className: clsx("card", bordered && "card-bordered", compact && "card-compact", className),
|
|
28
|
+
...rest
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function CardBody({ className, ...rest }) {
|
|
32
|
+
return /* @__PURE__ */ jsx("div", {
|
|
33
|
+
className: clsx("card-body", className),
|
|
34
|
+
...rest
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function CardTitle({ className, children, ...rest }) {
|
|
38
|
+
return /* @__PURE__ */ jsx("h3", {
|
|
39
|
+
className: clsx("card-title", className),
|
|
40
|
+
...rest,
|
|
41
|
+
children
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function CardDescription({ className, ...rest }) {
|
|
45
|
+
return /* @__PURE__ */ jsx("p", {
|
|
46
|
+
className: clsx("card-description", className),
|
|
47
|
+
...rest
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function CardActions({ className, ...rest }) {
|
|
51
|
+
return /* @__PURE__ */ jsx("div", {
|
|
52
|
+
className: clsx("card-actions", className),
|
|
53
|
+
...rest
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
var Card = Object.assign(CardRoot, {
|
|
57
|
+
Body: CardBody,
|
|
58
|
+
Title: CardTitle,
|
|
59
|
+
Description: CardDescription,
|
|
60
|
+
Actions: CardActions
|
|
61
|
+
});
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/Field.tsx
|
|
64
|
+
function FieldRoot({ className, ...rest }) {
|
|
65
|
+
return /* @__PURE__ */ jsx(Field$1.Root, {
|
|
66
|
+
className: clsx("field", typeof className === "string" ? className : void 0),
|
|
67
|
+
...rest
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function FieldLabel({ className, ...rest }) {
|
|
71
|
+
return /* @__PURE__ */ jsx(Field$1.Label, {
|
|
72
|
+
className: clsx("field-label", typeof className === "string" ? className : void 0),
|
|
73
|
+
...rest
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function FieldDescription({ className, ...rest }) {
|
|
77
|
+
return /* @__PURE__ */ jsx(Field$1.Description, {
|
|
78
|
+
className: clsx("field-description", typeof className === "string" ? className : void 0),
|
|
79
|
+
...rest
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function FieldError({ className, ...rest }) {
|
|
83
|
+
return /* @__PURE__ */ jsx(Field$1.Error, {
|
|
84
|
+
className: clsx("field-error", typeof className === "string" ? className : void 0),
|
|
85
|
+
...rest
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
var Field = Object.assign(FieldRoot, {
|
|
89
|
+
Label: FieldLabel,
|
|
90
|
+
Description: FieldDescription,
|
|
91
|
+
Error: FieldError
|
|
92
|
+
});
|
|
93
|
+
//#endregion
|
|
94
|
+
export { Button, Card, Field, Input };
|
|
95
|
+
|
|
96
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/Button.tsx","../src/Input.tsx","../src/Card.tsx","../src/Field.tsx"],"sourcesContent":["import { Button as BaseButton } from \"@base-ui/react/button\";\nimport { clsx } from \"clsx\";\nimport type { ComponentProps } from \"react\";\n\nexport type ButtonVariant = \"primary\" | \"secondary\" | \"ghost\" | \"danger\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ButtonProps extends ComponentProps<typeof BaseButton> {\n variant?: ButtonVariant;\n size?: ButtonSize;\n block?: boolean;\n}\n\nexport function Button({\n variant = \"primary\",\n size = \"md\",\n block,\n className,\n type = \"button\",\n ...rest\n}: ButtonProps) {\n return (\n <BaseButton\n type={type}\n className={clsx(\n \"btn\",\n `btn-${variant}`,\n size !== \"md\" && `btn-${size}`,\n block && \"btn-block\",\n typeof className === \"string\" ? className : undefined,\n )}\n {...rest}\n />\n );\n}\n","import { Input as BaseInput } from \"@base-ui/react/input\";\nimport { clsx } from \"clsx\";\nimport type { ComponentProps } from \"react\";\n\nexport type InputVariant = \"bordered\" | \"ghost\" | \"danger\";\nexport type InputSize = \"sm\" | \"md\" | \"lg\";\n\ntype BaseInputProps = Omit<ComponentProps<typeof BaseInput>, \"size\">;\n\nexport interface InputProps extends BaseInputProps {\n variant?: InputVariant;\n inputSize?: InputSize;\n}\n\nexport function Input({\n variant = \"bordered\",\n inputSize = \"md\",\n className,\n type = \"text\",\n ...rest\n}: InputProps) {\n return (\n <BaseInput\n type={type}\n className={clsx(\n \"input\",\n `input-${variant}`,\n inputSize !== \"md\" && `input-${inputSize}`,\n typeof className === \"string\" ? className : undefined,\n )}\n {...rest}\n />\n );\n}\n","import { clsx } from \"clsx\";\nimport type { ComponentProps } from \"react\";\n\nexport interface CardProps extends ComponentProps<\"div\"> {\n bordered?: boolean;\n compact?: boolean;\n}\n\nfunction CardRoot({ bordered, compact, className, ...rest }: CardProps) {\n return (\n <div\n className={clsx(\"card\", bordered && \"card-bordered\", compact && \"card-compact\", className)}\n {...rest}\n />\n );\n}\n\nexport type CardBodyProps = ComponentProps<\"div\">;\nfunction CardBody({ className, ...rest }: CardBodyProps) {\n return <div className={clsx(\"card-body\", className)} {...rest} />;\n}\n\nexport type CardTitleProps = ComponentProps<\"h3\">;\nfunction CardTitle({ className, children, ...rest }: CardTitleProps) {\n return (\n <h3 className={clsx(\"card-title\", className)} {...rest}>\n {children}\n </h3>\n );\n}\n\nexport type CardDescriptionProps = ComponentProps<\"p\">;\nfunction CardDescription({ className, ...rest }: CardDescriptionProps) {\n return <p className={clsx(\"card-description\", className)} {...rest} />;\n}\n\nexport type CardActionsProps = ComponentProps<\"div\">;\nfunction CardActions({ className, ...rest }: CardActionsProps) {\n return <div className={clsx(\"card-actions\", className)} {...rest} />;\n}\n\nexport const Card = Object.assign(CardRoot, {\n Body: CardBody,\n Title: CardTitle,\n Description: CardDescription,\n Actions: CardActions,\n});\n","import { Field as BaseField } from \"@base-ui/react/field\";\nimport { clsx } from \"clsx\";\nimport type { ComponentProps } from \"react\";\n\n/**\n * Thin wrappers around Base UI's Field primitives that apply the design\n * system's class names. Compose for fully accessible labeled form fields:\n *\n * <Field name=\"email\">\n * <Field.Label>Email</Field.Label>\n * <Input type=\"email\" required />\n * <Field.Description>We'll never share your email.</Field.Description>\n * <Field.Error match=\"valueMissing\">Email is required.</Field.Error>\n * </Field>\n */\n\nexport type FieldProps = ComponentProps<typeof BaseField.Root>;\n\nfunction FieldRoot({ className, ...rest }: FieldProps) {\n return (\n <BaseField.Root\n className={clsx(\"field\", typeof className === \"string\" ? className : undefined)}\n {...rest}\n />\n );\n}\n\nexport type FieldLabelProps = ComponentProps<typeof BaseField.Label>;\n\nfunction FieldLabel({ className, ...rest }: FieldLabelProps) {\n return (\n <BaseField.Label\n className={clsx(\"field-label\", typeof className === \"string\" ? className : undefined)}\n {...rest}\n />\n );\n}\n\nexport type FieldDescriptionProps = ComponentProps<typeof BaseField.Description>;\n\nfunction FieldDescription({ className, ...rest }: FieldDescriptionProps) {\n return (\n <BaseField.Description\n className={clsx(\"field-description\", typeof className === \"string\" ? className : undefined)}\n {...rest}\n />\n );\n}\n\nexport type FieldErrorProps = ComponentProps<typeof BaseField.Error>;\n\nfunction FieldError({ className, ...rest }: FieldErrorProps) {\n return (\n <BaseField.Error\n className={clsx(\"field-error\", typeof className === \"string\" ? className : undefined)}\n {...rest}\n />\n );\n}\n\nexport const Field = Object.assign(FieldRoot, {\n Label: FieldLabel,\n Description: FieldDescription,\n Error: FieldError,\n});\n"],"mappings":";;;;;;AAaA,SAAgB,OAAO,EACrB,UAAU,WACV,OAAO,MACP,OACA,WACA,OAAO,UACP,GAAG,QACW;CACd,OACE,oBAAC,UAAD;EACQ;EACN,WAAW,KACT,OACA,OAAO,WACP,SAAS,QAAQ,OAAO,QACxB,SAAS,aACT,OAAO,cAAc,WAAW,YAAY,KAAA,CAC9C;EACA,GAAI;CACL,CAAA;AAEL;;;ACpBA,SAAgB,MAAM,EACpB,UAAU,YACV,YAAY,MACZ,WACA,OAAO,QACP,GAAG,QACU;CACb,OACE,oBAAC,SAAD;EACQ;EACN,WAAW,KACT,SACA,SAAS,WACT,cAAc,QAAQ,SAAS,aAC/B,OAAO,cAAc,WAAW,YAAY,KAAA,CAC9C;EACA,GAAI;CACL,CAAA;AAEL;;;ACzBA,SAAS,SAAS,EAAE,UAAU,SAAS,WAAW,GAAG,QAAmB;CACtE,OACE,oBAAC,OAAD;EACE,WAAW,KAAK,QAAQ,YAAY,iBAAiB,WAAW,gBAAgB,SAAS;EACzF,GAAI;CACL,CAAA;AAEL;AAGA,SAAS,SAAS,EAAE,WAAW,GAAG,QAAuB;CACvD,OAAO,oBAAC,OAAD;EAAK,WAAW,KAAK,aAAa,SAAS;EAAG,GAAI;CAAO,CAAA;AAClE;AAGA,SAAS,UAAU,EAAE,WAAW,UAAU,GAAG,QAAwB;CACnE,OACE,oBAAC,MAAD;EAAI,WAAW,KAAK,cAAc,SAAS;EAAG,GAAI;EAC/C;CACC,CAAA;AAER;AAGA,SAAS,gBAAgB,EAAE,WAAW,GAAG,QAA8B;CACrE,OAAO,oBAAC,KAAD;EAAG,WAAW,KAAK,oBAAoB,SAAS;EAAG,GAAI;CAAO,CAAA;AACvE;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,QAA0B;CAC7D,OAAO,oBAAC,OAAD;EAAK,WAAW,KAAK,gBAAgB,SAAS;EAAG,GAAI;CAAO,CAAA;AACrE;AAEA,IAAa,OAAO,OAAO,OAAO,UAAU;CAC1C,MAAM;CACN,OAAO;CACP,aAAa;CACb,SAAS;AACX,CAAC;;;AC5BD,SAAS,UAAU,EAAE,WAAW,GAAG,QAAoB;CACrD,OACE,oBAAC,QAAU,MAAX;EACE,WAAW,KAAK,SAAS,OAAO,cAAc,WAAW,YAAY,KAAA,CAAS;EAC9E,GAAI;CACL,CAAA;AAEL;AAIA,SAAS,WAAW,EAAE,WAAW,GAAG,QAAyB;CAC3D,OACE,oBAAC,QAAU,OAAX;EACE,WAAW,KAAK,eAAe,OAAO,cAAc,WAAW,YAAY,KAAA,CAAS;EACpF,GAAI;CACL,CAAA;AAEL;AAIA,SAAS,iBAAiB,EAAE,WAAW,GAAG,QAA+B;CACvE,OACE,oBAAC,QAAU,aAAX;EACE,WAAW,KAAK,qBAAqB,OAAO,cAAc,WAAW,YAAY,KAAA,CAAS;EAC1F,GAAI;CACL,CAAA;AAEL;AAIA,SAAS,WAAW,EAAE,WAAW,GAAG,QAAyB;CAC3D,OACE,oBAAC,QAAU,OAAX;EACE,WAAW,KAAK,eAAe,OAAO,cAAc,WAAW,YAAY,KAAA,CAAS;EACpF,GAAI;CACL,CAAA;AAEL;AAEA,IAAa,QAAQ,OAAO,OAAO,WAAW;CAC5C,OAAO;CACP,aAAa;CACb,OAAO;AACT,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aortl/admin-react",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "React component library for the admin design system. Pairs with @aortl/admin-css.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"components",
|
|
7
|
+
"design-system",
|
|
8
|
+
"react",
|
|
9
|
+
"tailwind"
|
|
10
|
+
],
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"type": "module",
|
|
16
|
+
"sideEffects": [
|
|
17
|
+
"**/*.css"
|
|
18
|
+
],
|
|
19
|
+
"main": "./dist/index.cjs",
|
|
20
|
+
"module": "./dist/index.mjs",
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"import": "./dist/index.mjs",
|
|
26
|
+
"require": "./dist/index.cjs"
|
|
27
|
+
},
|
|
28
|
+
"./styles.css": "./dist/admin.css"
|
|
29
|
+
},
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@base-ui/react": "1.4.1",
|
|
35
|
+
"clsx": "2.1.1",
|
|
36
|
+
"@aortl/admin-css": "0.0.1"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/react": "19.2.14",
|
|
40
|
+
"@types/react-dom": "19.2.3",
|
|
41
|
+
"@vitejs/plugin-react": "6.0.2",
|
|
42
|
+
"react": "19.2.6",
|
|
43
|
+
"react-dom": "19.2.6",
|
|
44
|
+
"typescript": "5.8.3",
|
|
45
|
+
"vite": "8.0.13",
|
|
46
|
+
"vite-plugin-dts": "5.0.0"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"react": ">=19.2",
|
|
50
|
+
"react-dom": ">=19.2"
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build": "vite build && pnpm copy:css",
|
|
54
|
+
"copy:css": "cp ../admin-css/dist/admin.css ./dist/admin.css",
|
|
55
|
+
"dev": "vite build --watch",
|
|
56
|
+
"check-types": "tsc --noEmit"
|
|
57
|
+
}
|
|
58
|
+
}
|