@moondreamsdev/dreamer-ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -0
- package/dist/core/components/button/Button.d.ts +10 -0
- package/dist/core/components/button/LoadingDots.d.ts +1 -0
- package/dist/core/components/button/index.d.ts +3 -0
- package/dist/core/components/button/variants.d.ts +34 -0
- package/dist/core/components/checkbox/Checkbox.d.ts +11 -0
- package/dist/core/components/checkbox/hooks.d.ts +1 -0
- package/dist/core/components/checkbox/index.d.ts +1 -0
- package/dist/core/components/input/Input.d.ts +11 -0
- package/dist/core/components/input/index.d.ts +1 -0
- package/dist/core/components/input/variants.d.ts +20 -0
- package/dist/core/components/label/index.d.ts +1 -0
- package/dist/core/components/label/label.d.ts +9 -0
- package/dist/core/components/radiogroup/RadioGroup.d.ts +19 -0
- package/dist/core/components/radiogroup/RadioGroupItem.d.ts +12 -0
- package/dist/core/components/radiogroup/RadioInput.d.ts +9 -0
- package/dist/core/components/radiogroup/hooks.d.ts +1 -0
- package/dist/core/components/radiogroup/index.d.ts +3 -0
- package/dist/core/components/textarea/CharacterCount.d.ts +6 -0
- package/dist/core/components/textarea/Textarea.d.ts +14 -0
- package/dist/core/components/textarea/hooks.d.ts +1 -0
- package/dist/core/components/textarea/index.d.ts +1 -0
- package/dist/core/components/textarea/variants.d.ts +19 -0
- package/dist/core/shared/forms/StatusHelpMessage.d.ts +7 -0
- package/dist/core/shared/forms/index.d.ts +1 -0
- package/dist/core/symbols/Check.d.ts +4 -0
- package/dist/core/symbols/CheckCircled.d.ts +3 -0
- package/dist/core/symbols/ExclamationTriangle.d.ts +3 -0
- package/dist/core/symbols/EyeClosed.d.ts +3 -0
- package/dist/core/symbols/EyeOpened.d.ts +3 -0
- package/dist/core/symbols/QuestionMarkCircled.d.ts +4 -0
- package/dist/core/symbols/index.d.ts +5 -0
- package/dist/core/util/join.d.ts +8 -0
- package/dist/core/utilities/Slot.d.ts +7 -0
- package/dist/dreamer-ui.css +1 -0
- package/dist/index.cjs.js +2 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.esm.js +732 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +67 -0
package/README.md
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# Dreamer UI
|
2
|
+
|
3
|
+
A collection of beautifully designed, accessible React components built with Tailwind CSS.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
```bash
|
8
|
+
npm install @moondreamsdev/dreamer-ui
|
9
|
+
# or
|
10
|
+
yarn add @moondreamsdev/dreamer-ui
|
11
|
+
# or
|
12
|
+
pnpm add @moondreamsdev/dreamer-ui
|
13
|
+
```
|
14
|
+
|
15
|
+
## Usage
|
16
|
+
|
17
|
+
```tsx
|
18
|
+
import { Button, Input, Textarea } from 'dreamer-ui';
|
19
|
+
import 'dreamer-ui/styles';
|
20
|
+
|
21
|
+
function App() {
|
22
|
+
return (
|
23
|
+
<div>
|
24
|
+
<Button variant="primary">Click me</Button>
|
25
|
+
<Input placeholder="Enter text" />
|
26
|
+
<Textarea placeholder="Enter message" />
|
27
|
+
</div>
|
28
|
+
);
|
29
|
+
}
|
30
|
+
```
|
31
|
+
|
32
|
+
## Requirements
|
33
|
+
|
34
|
+
- React 18+
|
35
|
+
- Tailwind CSS 3+
|
36
|
+
|
37
|
+
## Components
|
38
|
+
|
39
|
+
- **Button** - Various button styles with loading states
|
40
|
+
- **Input** - Text inputs with validation states
|
41
|
+
- **Textarea** - Multi-line text inputs with auto-expand
|
42
|
+
- **RadioGroup** - Accessible radio button groups
|
43
|
+
- **Checkbox** - Customizable checkboxes
|
44
|
+
- **Label** - Form labels with help text
|
45
|
+
|
46
|
+
## Contributing
|
47
|
+
|
48
|
+
Contributions are welcome! Please read our contributing guidelines.
|
49
|
+
|
50
|
+
## License
|
51
|
+
|
52
|
+
MIT
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { ButtonHTMLAttributes, Ref } from 'react';
|
2
|
+
import { ButtonVariants } from './variants';
|
3
|
+
interface ButtonProps extends Partial<ButtonVariants>, ButtonHTMLAttributes<HTMLButtonElement> {
|
4
|
+
ref?: Ref<HTMLButtonElement>;
|
5
|
+
loading?: boolean;
|
6
|
+
linkTo?: string;
|
7
|
+
linkProps?: Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>;
|
8
|
+
}
|
9
|
+
export default function Button({ variant, size, rounded, loading, linkTo, linkProps, type, className, ...rest }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
10
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export default function LoadingDots(): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,34 @@
|
|
1
|
+
export declare const buttonVariants: {
|
2
|
+
readonly base: "";
|
3
|
+
readonly primary: "bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground";
|
4
|
+
readonly secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80";
|
5
|
+
readonly tertiary: "text-primary hover:text-primary-foreground disabled:text-muted";
|
6
|
+
readonly outline: "border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted";
|
7
|
+
readonly link: "underline-offset-4 hover:underline disabled:underline disabled:text-muted";
|
8
|
+
readonly danger: "bg-danger text-danger-foreground hover:bg-danger/85 disabled:bg-muted disabled:text-muted-foreground";
|
9
|
+
};
|
10
|
+
export type ButtonVariant = keyof typeof buttonVariants;
|
11
|
+
export declare const sizeVariants: {
|
12
|
+
readonly stripped: "";
|
13
|
+
readonly fitted: "size-fit";
|
14
|
+
readonly sm: "px-2 py-1 text-sm";
|
15
|
+
readonly md: "px-4 py-2 text-base";
|
16
|
+
readonly lg: "px-6 py-3 text-lg";
|
17
|
+
readonly icon: "p-1 w-fit aspect-square";
|
18
|
+
readonly full: "p-2 w-full";
|
19
|
+
};
|
20
|
+
export type ButtonSize = keyof typeof sizeVariants;
|
21
|
+
export declare const roundedVariants: {
|
22
|
+
readonly none: "rounded-none";
|
23
|
+
readonly sm: "rounded-sm";
|
24
|
+
readonly md: "rounded-md";
|
25
|
+
readonly lg: "rounded-lg";
|
26
|
+
readonly full: "rounded-full";
|
27
|
+
};
|
28
|
+
export type ButtonRounded = keyof typeof roundedVariants;
|
29
|
+
export interface ButtonVariants {
|
30
|
+
variant: ButtonVariant;
|
31
|
+
size: ButtonSize;
|
32
|
+
rounded: ButtonRounded;
|
33
|
+
}
|
34
|
+
export declare const buttonDefaults: ButtonVariants;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React, { Ref } from 'react';
|
2
|
+
export interface CheckboxProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
3
|
+
ref?: Ref<HTMLButtonElement>;
|
4
|
+
size?: number;
|
5
|
+
color?: string;
|
6
|
+
filled?: boolean;
|
7
|
+
rounded?: boolean;
|
8
|
+
checked?: boolean;
|
9
|
+
onCheckedChange?: (checked: boolean) => void;
|
10
|
+
}
|
11
|
+
export default function Checkbox({ ref, id, size, color, filled, rounded, checked, onCheckedChange, disabled, className, ...props }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function useFilledBackgroundColor(id: string): string;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as Checkbox, type CheckboxProps } from './Checkbox';
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Ref } from 'react';
|
2
|
+
import './styles.css';
|
3
|
+
import { InputVariants } from './variants';
|
4
|
+
interface InputProps extends Partial<InputVariants>, React.InputHTMLAttributes<HTMLInputElement> {
|
5
|
+
ref?: Ref<HTMLInputElement>;
|
6
|
+
displayOnlyMode?: boolean;
|
7
|
+
errorMessage?: string;
|
8
|
+
successMessage?: string;
|
9
|
+
}
|
10
|
+
export default function Input({ variant, rounded, displayOnlyMode, errorMessage, successMessage, type, className, ...rest }: InputProps): import("react/jsx-runtime").JSX.Element;
|
11
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as Input } from './Input';
|
@@ -0,0 +1,20 @@
|
|
1
|
+
export declare const inputVariants: {
|
2
|
+
readonly base: "";
|
3
|
+
readonly default: "ring ring-transparent focus:ring-primary-foreground not-disabled:data-error:ring-danger not-disabled:data-success:ring-success";
|
4
|
+
readonly underline: "border-b border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-danger not-disabled:data-success:border-success";
|
5
|
+
readonly outline: "border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-danger not-disabled:data-success:border-success";
|
6
|
+
};
|
7
|
+
export type InputVariant = keyof typeof inputVariants;
|
8
|
+
export declare const roundedVariants: {
|
9
|
+
readonly none: "rounded-none";
|
10
|
+
readonly sm: "rounded-sm";
|
11
|
+
readonly md: "rounded-md";
|
12
|
+
readonly lg: "rounded-lg";
|
13
|
+
readonly full: "px-3 rounded-full";
|
14
|
+
};
|
15
|
+
export type InputRounded = keyof typeof roundedVariants;
|
16
|
+
export interface InputVariants {
|
17
|
+
variant: InputVariant;
|
18
|
+
rounded: InputRounded;
|
19
|
+
}
|
20
|
+
export declare const inputDefaults: InputVariants;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Label, type LabelProps } from './label';
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
export interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
3
|
+
display?: 'block' | 'inline';
|
4
|
+
width?: React.CSSProperties['width'];
|
5
|
+
required?: boolean;
|
6
|
+
helpMessage?: string;
|
7
|
+
suffix?: React.ReactNode;
|
8
|
+
}
|
9
|
+
export declare function Label({ display, width, className, required, helpMessage, suffix, htmlFor, children, ...props }: LabelProps): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { RadioGroupItemProps } from './RadioGroupItem';
|
3
|
+
export type RadioOption = {
|
4
|
+
label: string;
|
5
|
+
value: string;
|
6
|
+
disabled?: boolean;
|
7
|
+
description?: string;
|
8
|
+
};
|
9
|
+
export type RadioGroupProps = {
|
10
|
+
options?: (string | RadioOption)[];
|
11
|
+
value: string | undefined;
|
12
|
+
onChange: (value: string) => void;
|
13
|
+
name?: string;
|
14
|
+
children?: React.ReactElement<RadioGroupItemProps>[] | React.ReactElement<RadioGroupItemProps>;
|
15
|
+
className?: string;
|
16
|
+
childrenClassName?: string;
|
17
|
+
hideInputs?: boolean;
|
18
|
+
};
|
19
|
+
export declare function RadioGroup({ options, value, onChange, name, children, className, childrenClassName, hideInputs, }: RadioGroupProps): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
export interface RadioGroupItemProps {
|
2
|
+
value: string;
|
3
|
+
children: React.ReactNode;
|
4
|
+
className?: string;
|
5
|
+
isSelected?: boolean;
|
6
|
+
onChange?: (value: string) => void;
|
7
|
+
disabled?: boolean;
|
8
|
+
name?: string;
|
9
|
+
hideInput?: boolean;
|
10
|
+
description?: string;
|
11
|
+
}
|
12
|
+
export declare function RadioGroupItem({ value, children, className, isSelected, onChange, disabled, hideInput, description, name, }: RadioGroupItemProps): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export type RadioInputProps = {
|
2
|
+
itemId: string;
|
3
|
+
checked: boolean;
|
4
|
+
onChange: () => void;
|
5
|
+
name: string;
|
6
|
+
disabled?: boolean;
|
7
|
+
className?: string;
|
8
|
+
};
|
9
|
+
export declare function RadioInput({ itemId, checked, onChange, name, disabled, className }: RadioInputProps): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function useRadioFocus(id: string, selectedOptionIndex: number): void;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { Ref } from 'react';
|
2
|
+
import './styles.css';
|
3
|
+
import { TextareaVariants } from './variants';
|
4
|
+
interface TextareaProps extends Partial<TextareaVariants>, React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
5
|
+
ref?: Ref<HTMLTextAreaElement>;
|
6
|
+
displayOnlyMode?: boolean;
|
7
|
+
errorMessage?: string;
|
8
|
+
successMessage?: string;
|
9
|
+
hideResizeHandle?: boolean;
|
10
|
+
autoExpand?: boolean;
|
11
|
+
characterLimit?: number;
|
12
|
+
}
|
13
|
+
export default function Textarea({ variant, rounded, displayOnlyMode, errorMessage, successMessage, hideResizeHandle, autoExpand, characterLimit, className, ...rest }: TextareaProps): import("react/jsx-runtime").JSX.Element;
|
14
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function useAutoExpand(id: string, autoExpand: boolean): void;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as Textarea } from './Textarea';
|
@@ -0,0 +1,19 @@
|
|
1
|
+
export declare const textareaVariants: {
|
2
|
+
readonly base: "";
|
3
|
+
readonly 'left-line': "border-l border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-danger not-disabled:data-success:border-success";
|
4
|
+
readonly outline: "border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-danger not-disabled:data-success:border-success";
|
5
|
+
};
|
6
|
+
export type TextareaVariant = keyof typeof textareaVariants;
|
7
|
+
export declare const roundedVariants: {
|
8
|
+
readonly none: "rounded-none";
|
9
|
+
readonly sm: "rounded-sm";
|
10
|
+
readonly md: "rounded-md";
|
11
|
+
readonly lg: "rounded-lg";
|
12
|
+
readonly full: "px-3 rounded-full";
|
13
|
+
};
|
14
|
+
export type TextareaRounded = keyof typeof roundedVariants;
|
15
|
+
export interface TextareaVariants {
|
16
|
+
variant: TextareaVariant;
|
17
|
+
rounded: TextareaRounded;
|
18
|
+
}
|
19
|
+
export declare const textareaDefaults: TextareaVariants;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
interface StatusHelpMessageProps {
|
2
|
+
elementId: string;
|
3
|
+
type: 'error' | 'success';
|
4
|
+
message?: string;
|
5
|
+
}
|
6
|
+
export default function StatusHelpMessage({ elementId, type, message }: StatusHelpMessageProps): import("react/jsx-runtime").JSX.Element | null;
|
7
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as StatusHelpMessage } from './StatusHelpMessage';
|
@@ -0,0 +1,5 @@
|
|
1
|
+
export { default as CheckCircled } from './CheckCircled';
|
2
|
+
export { default as ExclamationTriangle } from './ExclamationTriangle';
|
3
|
+
export { default as EyeClosed } from './EyeClosed';
|
4
|
+
export { default as EyeOpened } from './EyeOpened';
|
5
|
+
export { default as QuestionMarkCircled } from './QuestionMarkCircled';
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/**
|
2
|
+
* Joins an array of strings, filtering out any undefined or null values.
|
3
|
+
* Primarily used to join class names.
|
4
|
+
*
|
5
|
+
* @param args - The strings to join.
|
6
|
+
* @returns The joined string or `undefined` if no valid strings are provided.
|
7
|
+
*/
|
8
|
+
export declare function join(...args: Array<string | boolean | undefined | null>): string | undefined;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import React, { HTMLAttributes, ReactNode, Ref } from 'react';
|
2
|
+
interface SlotProps<T> extends HTMLAttributes<T> {
|
3
|
+
children?: ReactNode;
|
4
|
+
ref?: Ref<T>;
|
5
|
+
}
|
6
|
+
export declare function Slot<T = HTMLElement>({ children, ref, ...props }: SlotProps<T>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
7
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
@layer theme,base,components,utilities;@layer theme{@theme default{ --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --color-red-50: oklch(.971 .013 17.38); --color-red-100: oklch(.936 .032 17.717); --color-red-200: oklch(.885 .062 18.334); --color-red-300: oklch(.808 .114 19.571); --color-red-400: oklch(.704 .191 22.216); --color-red-500: oklch(.637 .237 25.331); --color-red-600: oklch(.577 .245 27.325); --color-red-700: oklch(.505 .213 27.518); --color-red-800: oklch(.444 .177 26.899); --color-red-900: oklch(.396 .141 25.723); --color-red-950: oklch(.258 .092 26.042); --color-orange-50: oklch(.98 .016 73.684); --color-orange-100: oklch(.954 .038 75.164); --color-orange-200: oklch(.901 .076 70.697); --color-orange-300: oklch(.837 .128 66.29); --color-orange-400: oklch(.75 .183 55.934); --color-orange-500: oklch(.705 .213 47.604); --color-orange-600: oklch(.646 .222 41.116); --color-orange-700: oklch(.553 .195 38.402); --color-orange-800: oklch(.47 .157 37.304); --color-orange-900: oklch(.408 .123 38.172); --color-orange-950: oklch(.266 .079 36.259); --color-amber-50: oklch(.987 .022 95.277); --color-amber-100: oklch(.962 .059 95.617); --color-amber-200: oklch(.924 .12 95.746); --color-amber-300: oklch(.879 .169 91.605); --color-amber-400: oklch(.828 .189 84.429); --color-amber-500: oklch(.769 .188 70.08); --color-amber-600: oklch(.666 .179 58.318); --color-amber-700: oklch(.555 .163 48.998); --color-amber-800: oklch(.473 .137 46.201); --color-amber-900: oklch(.414 .112 45.904); --color-amber-950: oklch(.279 .077 45.635); --color-yellow-50: oklch(.987 .026 102.212); --color-yellow-100: oklch(.973 .071 103.193); --color-yellow-200: oklch(.945 .129 101.54); --color-yellow-300: oklch(.905 .182 98.111); --color-yellow-400: oklch(.852 .199 91.936); --color-yellow-500: oklch(.795 .184 86.047); --color-yellow-600: oklch(.681 .162 75.834); --color-yellow-700: oklch(.554 .135 66.442); --color-yellow-800: oklch(.476 .114 61.907); --color-yellow-900: oklch(.421 .095 57.708); --color-yellow-950: oklch(.286 .066 53.813); --color-lime-50: oklch(.986 .031 120.757); --color-lime-100: oklch(.967 .067 122.328); --color-lime-200: oklch(.938 .127 124.321); --color-lime-300: oklch(.897 .196 126.665); --color-lime-400: oklch(.841 .238 128.85); --color-lime-500: oklch(.768 .233 130.85); --color-lime-600: oklch(.648 .2 131.684); --color-lime-700: oklch(.532 .157 131.589); --color-lime-800: oklch(.453 .124 130.933); --color-lime-900: oklch(.405 .101 131.063); --color-lime-950: oklch(.274 .072 132.109); --color-green-50: oklch(.982 .018 155.826); --color-green-100: oklch(.962 .044 156.743); --color-green-200: oklch(.925 .084 155.995); --color-green-300: oklch(.871 .15 154.449); --color-green-400: oklch(.792 .209 151.711); --color-green-500: oklch(.723 .219 149.579); --color-green-600: oklch(.627 .194 149.214); --color-green-700: oklch(.527 .154 150.069); --color-green-800: oklch(.448 .119 151.328); --color-green-900: oklch(.393 .095 152.535); --color-green-950: oklch(.266 .065 152.934); --color-emerald-50: oklch(.979 .021 166.113); --color-emerald-100: oklch(.95 .052 163.051); --color-emerald-200: oklch(.905 .093 164.15); --color-emerald-300: oklch(.845 .143 164.978); --color-emerald-400: oklch(.765 .177 163.223); --color-emerald-500: oklch(.696 .17 162.48); --color-emerald-600: oklch(.596 .145 163.225); --color-emerald-700: oklch(.508 .118 165.612); --color-emerald-800: oklch(.432 .095 166.913); --color-emerald-900: oklch(.378 .077 168.94); --color-emerald-950: oklch(.262 .051 172.552); --color-teal-50: oklch(.984 .014 180.72); --color-teal-100: oklch(.953 .051 180.801); --color-teal-200: oklch(.91 .096 180.426); --color-teal-300: oklch(.855 .138 181.071); --color-teal-400: oklch(.777 .152 181.912); --color-teal-500: oklch(.704 .14 182.503); --color-teal-600: oklch(.6 .118 184.704); --color-teal-700: oklch(.511 .096 186.391); --color-teal-800: oklch(.437 .078 188.216); --color-teal-900: oklch(.386 .063 188.416); --color-teal-950: oklch(.277 .046 192.524); --color-cyan-50: oklch(.984 .019 200.873); --color-cyan-100: oklch(.956 .045 203.388); --color-cyan-200: oklch(.917 .08 205.041); --color-cyan-300: oklch(.865 .127 207.078); --color-cyan-400: oklch(.789 .154 211.53); --color-cyan-500: oklch(.715 .143 215.221); --color-cyan-600: oklch(.609 .126 221.723); --color-cyan-700: oklch(.52 .105 223.128); --color-cyan-800: oklch(.45 .085 224.283); --color-cyan-900: oklch(.398 .07 227.392); --color-cyan-950: oklch(.302 .056 229.695); --color-sky-50: oklch(.977 .013 236.62); --color-sky-100: oklch(.951 .026 236.824); --color-sky-200: oklch(.901 .058 230.902); --color-sky-300: oklch(.828 .111 230.318); --color-sky-400: oklch(.746 .16 232.661); --color-sky-500: oklch(.685 .169 237.323); --color-sky-600: oklch(.588 .158 241.966); --color-sky-700: oklch(.5 .134 242.749); --color-sky-800: oklch(.443 .11 240.79); --color-sky-900: oklch(.391 .09 240.876); --color-sky-950: oklch(.293 .066 243.157); --color-blue-50: oklch(.97 .014 254.604); --color-blue-100: oklch(.932 .032 255.585); --color-blue-200: oklch(.882 .059 254.128); --color-blue-300: oklch(.809 .105 251.813); --color-blue-400: oklch(.707 .165 254.624); --color-blue-500: oklch(.623 .214 259.815); --color-blue-600: oklch(.546 .245 262.881); --color-blue-700: oklch(.488 .243 264.376); --color-blue-800: oklch(.424 .199 265.638); --color-blue-900: oklch(.379 .146 265.522); --color-blue-950: oklch(.282 .091 267.935); --color-indigo-50: oklch(.962 .018 272.314); --color-indigo-100: oklch(.93 .034 272.788); --color-indigo-200: oklch(.87 .065 274.039); --color-indigo-300: oklch(.785 .115 274.713); --color-indigo-400: oklch(.673 .182 276.935); --color-indigo-500: oklch(.585 .233 277.117); --color-indigo-600: oklch(.511 .262 276.966); --color-indigo-700: oklch(.457 .24 277.023); --color-indigo-800: oklch(.398 .195 277.366); --color-indigo-900: oklch(.359 .144 278.697); --color-indigo-950: oklch(.257 .09 281.288); --color-violet-50: oklch(.969 .016 293.756); --color-violet-100: oklch(.943 .029 294.588); --color-violet-200: oklch(.894 .057 293.283); --color-violet-300: oklch(.811 .111 293.571); --color-violet-400: oklch(.702 .183 293.541); --color-violet-500: oklch(.606 .25 292.717); --color-violet-600: oklch(.541 .281 293.009); --color-violet-700: oklch(.491 .27 292.581); --color-violet-800: oklch(.432 .232 292.759); --color-violet-900: oklch(.38 .189 293.745); --color-violet-950: oklch(.283 .141 291.089); --color-purple-50: oklch(.977 .014 308.299); --color-purple-100: oklch(.946 .033 307.174); --color-purple-200: oklch(.902 .063 306.703); --color-purple-300: oklch(.827 .119 306.383); --color-purple-400: oklch(.714 .203 305.504); --color-purple-500: oklch(.627 .265 303.9); --color-purple-600: oklch(.558 .288 302.321); --color-purple-700: oklch(.496 .265 301.924); --color-purple-800: oklch(.438 .218 303.724); --color-purple-900: oklch(.381 .176 304.987); --color-purple-950: oklch(.291 .149 302.717); --color-fuchsia-50: oklch(.977 .017 320.058); --color-fuchsia-100: oklch(.952 .037 318.852); --color-fuchsia-200: oklch(.903 .076 319.62); --color-fuchsia-300: oklch(.833 .145 321.434); --color-fuchsia-400: oklch(.74 .238 322.16); --color-fuchsia-500: oklch(.667 .295 322.15); --color-fuchsia-600: oklch(.591 .293 322.896); --color-fuchsia-700: oklch(.518 .253 323.949); --color-fuchsia-800: oklch(.452 .211 324.591); --color-fuchsia-900: oklch(.401 .17 325.612); --color-fuchsia-950: oklch(.293 .136 325.661); --color-pink-50: oklch(.971 .014 343.198); --color-pink-100: oklch(.948 .028 342.258); --color-pink-200: oklch(.899 .061 343.231); --color-pink-300: oklch(.823 .12 346.018); --color-pink-400: oklch(.718 .202 349.761); --color-pink-500: oklch(.656 .241 354.308); --color-pink-600: oklch(.592 .249 .584); --color-pink-700: oklch(.525 .223 3.958); --color-pink-800: oklch(.459 .187 3.815); --color-pink-900: oklch(.408 .153 2.432); --color-pink-950: oklch(.284 .109 3.907); --color-rose-50: oklch(.969 .015 12.422); --color-rose-100: oklch(.941 .03 12.58); --color-rose-200: oklch(.892 .058 10.001); --color-rose-300: oklch(.81 .117 11.638); --color-rose-400: oklch(.712 .194 13.428); --color-rose-500: oklch(.645 .246 16.439); --color-rose-600: oklch(.586 .253 17.585); --color-rose-700: oklch(.514 .222 16.935); --color-rose-800: oklch(.455 .188 13.697); --color-rose-900: oklch(.41 .159 10.272); --color-rose-950: oklch(.271 .105 12.094); --color-slate-50: oklch(.984 .003 247.858); --color-slate-100: oklch(.968 .007 247.896); --color-slate-200: oklch(.929 .013 255.508); --color-slate-300: oklch(.869 .022 252.894); --color-slate-400: oklch(.704 .04 256.788); --color-slate-500: oklch(.554 .046 257.417); --color-slate-600: oklch(.446 .043 257.281); --color-slate-700: oklch(.372 .044 257.287); --color-slate-800: oklch(.279 .041 260.031); --color-slate-900: oklch(.208 .042 265.755); --color-slate-950: oklch(.129 .042 264.695); --color-gray-50: oklch(.985 .002 247.839); --color-gray-100: oklch(.967 .003 264.542); --color-gray-200: oklch(.928 .006 264.531); --color-gray-300: oklch(.872 .01 258.338); --color-gray-400: oklch(.707 .022 261.325); --color-gray-500: oklch(.551 .027 264.364); --color-gray-600: oklch(.446 .03 256.802); --color-gray-700: oklch(.373 .034 259.733); --color-gray-800: oklch(.278 .033 256.848); --color-gray-900: oklch(.21 .034 264.665); --color-gray-950: oklch(.13 .028 261.692); --color-zinc-50: oklch(.985 0 0); --color-zinc-100: oklch(.967 .001 286.375); --color-zinc-200: oklch(.92 .004 286.32); --color-zinc-300: oklch(.871 .006 286.286); --color-zinc-400: oklch(.705 .015 286.067); --color-zinc-500: oklch(.552 .016 285.938); --color-zinc-600: oklch(.442 .017 285.786); --color-zinc-700: oklch(.37 .013 285.805); --color-zinc-800: oklch(.274 .006 286.033); --color-zinc-900: oklch(.21 .006 285.885); --color-zinc-950: oklch(.141 .005 285.823); --color-neutral-50: oklch(.985 0 0); --color-neutral-100: oklch(.97 0 0); --color-neutral-200: oklch(.922 0 0); --color-neutral-300: oklch(.87 0 0); --color-neutral-400: oklch(.708 0 0); --color-neutral-500: oklch(.556 0 0); --color-neutral-600: oklch(.439 0 0); --color-neutral-700: oklch(.371 0 0); --color-neutral-800: oklch(.269 0 0); --color-neutral-900: oklch(.205 0 0); --color-neutral-950: oklch(.145 0 0); --color-stone-50: oklch(.985 .001 106.423); --color-stone-100: oklch(.97 .001 106.424); --color-stone-200: oklch(.923 .003 48.717); --color-stone-300: oklch(.869 .005 56.366); --color-stone-400: oklch(.709 .01 56.259); --color-stone-500: oklch(.553 .013 58.071); --color-stone-600: oklch(.444 .011 73.639); --color-stone-700: oklch(.374 .01 67.558); --color-stone-800: oklch(.268 .007 34.298); --color-stone-900: oklch(.216 .006 56.043); --color-stone-950: oklch(.147 .004 49.25); --color-black: #000; --color-white: #fff; --spacing: .25rem; --breakpoint-sm: 40rem; --breakpoint-md: 48rem; --breakpoint-lg: 64rem; --breakpoint-xl: 80rem; --breakpoint-2xl: 96rem; --container-3xs: 16rem; --container-2xs: 18rem; --container-xs: 20rem; --container-sm: 24rem; --container-md: 28rem; --container-lg: 32rem; --container-xl: 36rem; --container-2xl: 42rem; --container-3xl: 48rem; --container-4xl: 56rem; --container-5xl: 64rem; --container-6xl: 72rem; --container-7xl: 80rem; --text-xs: .75rem; --text-xs--line-height: calc(1 / .75); --text-sm: .875rem; --text-sm--line-height: calc(1.25 / .875); --text-base: 1rem; --text-base--line-height: 1.5 ; --text-lg: 1.125rem; --text-lg--line-height: calc(1.75 / 1.125); --text-xl: 1.25rem; --text-xl--line-height: calc(1.75 / 1.25); --text-2xl: 1.5rem; --text-2xl--line-height: calc(2 / 1.5); --text-3xl: 1.875rem; --text-3xl--line-height: 1.2 ; --text-4xl: 2.25rem; --text-4xl--line-height: calc(2.5 / 2.25); --text-5xl: 3rem; --text-5xl--line-height: 1; --text-6xl: 3.75rem; --text-6xl--line-height: 1; --text-7xl: 4.5rem; --text-7xl--line-height: 1; --text-8xl: 6rem; --text-8xl--line-height: 1; --text-9xl: 8rem; --text-9xl--line-height: 1; --font-weight-thin: 100; --font-weight-extralight: 200; --font-weight-light: 300; --font-weight-normal: 400; --font-weight-medium: 500; --font-weight-semibold: 600; --font-weight-bold: 700; --font-weight-extrabold: 800; --font-weight-black: 900; --tracking-tighter: -.05em; --tracking-tight: -.025em; --tracking-normal: 0em; --tracking-wide: .025em; --tracking-wider: .05em; --tracking-widest: .1em; --leading-tight: 1.25; --leading-snug: 1.375; --leading-normal: 1.5; --leading-relaxed: 1.625; --leading-loose: 2; --radius-xs: .125rem; --radius-sm: .25rem; --radius-md: .375rem; --radius-lg: .5rem; --radius-xl: .75rem; --radius-2xl: 1rem; --radius-3xl: 1.5rem; --radius-4xl: 2rem; --shadow-2xs: 0 1px rgb(0 0 0 / .05); --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05); --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1); --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / .25); --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / .05); --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / .05); --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / .05); --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / .05); --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / .15); --drop-shadow-md: 0 3px 3px rgb(0 0 0 / .12); --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / .15); --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / .1); --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / .15); --ease-in: cubic-bezier(.4, 0, 1, 1); --ease-out: cubic-bezier(0, 0, .2, 1); --ease-in-out: cubic-bezier(.4, 0, .2, 1); --animate-spin: spin 1s linear infinite; --animate-ping: ping 1s cubic-bezier(0, 0, .2, 1) infinite; --animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; --animate-bounce: bounce 1s infinite; @keyframes spin { to { transform: rotate(360deg); } } @keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } } @keyframes pulse { 50% { opacity: .5; } } @keyframes bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8, 0, 1, 1); } 50% { transform: none; animation-timing-function: cubic-bezier(0, 0, .2, 1); } } --blur-xs: 4px; --blur-sm: 8px; --blur-md: 12px; --blur-lg: 16px; --blur-xl: 24px; --blur-2xl: 40px; --blur-3xl: 64px; --perspective-dramatic: 100px; --perspective-near: 300px; --perspective-normal: 500px; --perspective-midrange: 800px; --perspective-distant: 1200px; --aspect-video: 16 / 9; --default-transition-duration: .15s; --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1); --default-font-family: var(--font-sans); --default-font-feature-settings: var(--font-sans--font-feature-settings); --default-font-variation-settings: var( --font-sans--font-variation-settings ); --default-mono-font-family: var(--font-mono); --default-mono-font-feature-settings: var( --font-mono--font-feature-settings ); --default-mono-font-variation-settings: var( --font-mono--font-variation-settings ); }@theme default inline reference{ --blur: 8px; --shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / .05); --drop-shadow: 0 1px 2px rgb(0 0 0 / .1), 0 1px 1px rgb(0 0 0 / .06); --radius: .25rem; --max-width-prose: 65ch; }}@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;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" );font-feature-settings:var(--default-font-feature-settings, normal);font-variation-settings:var( --default-font-variation-settings, normal );-webkit-tap-highlight-color:transparent}body{line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var( --default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace );font-feature-settings:var( --default-mono-font-feature-settings, normal );font-variation-settings:var( --default-mono-font-variation-settings, normal );font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1;color:color-mix(in oklab,currentColor 50%,transparent)}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-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{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{@tailwind utilities;}@utility page{@apply min-h-screen w-screen;}@theme colors{ --color-background-light: var(--color-slate-100); --color-background-dark: var(--color-slate-900); --color-foreground-light: var(--color-slate-900); --color-foreground-dark: var(--color-slate-100); --color-accent-medium: var(--color-violet-400); --color-primary: var(--color-violet-400); --color-primary-foreground: var(--color-white); --color-secondary: var(--color-violet-200); --color-secondary-foreground: var(--color-black); --color-danger: var(--color-red-500); --color-danger-foreground: var(--color-white); --color-muted: var(--color-gray-200); --color-muted-foreground: var(--color-gray-800); --color-success: var(--color-green-500); --color-border: var(--color-slate-600); }@layer base{body{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;@apply bg-background-light text-foreground-light transition-colors duration-300 dark:bg-background-dark dark:text-foreground-dark;}p{@apply font-light 2xl:text-lg;}small{@apply font-light opacity-70 2xl:text-base;}h1{@apply text-5xl font-semibold;}h2{@apply text-3xl font-semibold 2xl:text-2xl;}h3{@apply text-2xl font-medium 2xl:text-xl;}h4{@apply text-xl font-medium;}}.hide-number-input-arrows::-webkit-outer-spin-button,.hide-number-input-arrows::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.hide-number-input-arrows{-moz-appearance:textfield}.no-resize-handle::-webkit-resizer{display:none}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),u=require("react");function x(...e){return e.filter(r=>typeof r=="string"&&r).join(" ").trim()||void 0}function R(){const[e,t]=u.useState(0);return u.useEffect(()=>{const r=setInterval(()=>{t(s=>(s+1)%3)},500);return()=>clearInterval(r)},[]),a.jsx("div",{className:"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle",children:[0,1,2].map(r=>a.jsx("div",{className:x("rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current",e===r&&"transform -translate-y-1")},r))})}const q={base:"",primary:"bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",tertiary:"text-primary hover:text-primary-foreground disabled:text-muted",outline:"border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",link:"underline-offset-4 hover:underline disabled:underline disabled:text-muted",danger:"bg-danger text-danger-foreground hover:bg-danger/85 disabled:bg-muted disabled:text-muted-foreground"},V={stripped:"",fitted:"size-fit",sm:"px-2 py-1 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg",icon:"p-1 w-fit aspect-square",full:"p-2 w-full"},z={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},L={variant:"primary",size:"md",rounded:"md"};function F({variant:e=L.variant,size:t,rounded:r=L.rounded,loading:s,linkTo:n,linkProps:o,type:d="button",className:l,...c}){let m;e==="link"&&!t?m="fitted":m=t||L.size;const i=x("appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",q[e],V[m],z[r],s&&"relative pointer-events-none",n&&"relative",l);return a.jsxs("button",{...c,role:n?"link":c.role,"aria-label":c["aria-label"]||(o==null?void 0:o["aria-label"]),"aria-description":c["aria-description"]||(o==null?void 0:o["aria-description"]),"aria-disabled":c.disabled||s,"aria-busy":s,type:d,className:i,children:[s&&a.jsx(R,{}),a.jsx("span",{className:x(s&&"invisible"),children:c.children}),n&&!c.disabled&&a.jsx("a",{...o,"aria-hidden":!0,href:n,target:(o==null?void 0:o.target)||"_blank",rel:(o==null?void 0:o.rel)||"noreferrer",className:"absolute inset-0"})]})}function G({size:e=15,color:t="currentColor"}){return a.jsx("svg",{width:e,height:e,className:"inline",viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:t,fillRule:"evenodd",clipRule:"evenodd"})})}function H(e){const[t,r]=u.useState(""),s=u.useCallback(n=>{let o=n,d="";for(;o&&!d;){const l=window.getComputedStyle(o).backgroundColor;l&&l!=="transparent"&&l!=="rgba(0, 0, 0, 0)"&&(d=l),o=o.parentElement}return d||"transparent"},[]);return u.useEffect(()=>{const n=document.getElementById(e);if(n){const o=s(n.parentElement);r(o)}},[e,s]),t}function T({ref:e,id:t,size:r=20,color:s,filled:n=!1,rounded:o=!0,checked:d=!1,onCheckedChange:l,disabled:c,className:m="",...C}){const i=u.useId(),v=u.useMemo(()=>t||`checkbox-${i}`,[t,i]),b=H(v),[f,g]=u.useState(d);u.useEffect(()=>{g(d)},[d]);const w=()=>{c||(g(!f),l==null||l(!f))},h=j=>{j.key===" "&&(j.preventDefault(),w())},p=x("flex items-center justify-center border outline outline-transparent focus:outline-current focus:outline-offset-2",o&&"rounded",c&&"opacity-40 cursor-not-allowed",!c&&"cursor-pointer",m);return a.jsx("button",{id:v,type:"button",ref:e,tabIndex:0,role:"checkbox",onClick:w,"aria-checked":f,"aria-disabled":c,onKeyDownCapture:h,style:{width:r,height:r,color:s,backgroundColor:f&&n?"currentcolor":"transparent"},className:p,...C,children:f&&a.jsx(G,{size:r,color:n?b:void 0})})}function $({size:e=15}){return a.jsx("svg",{width:e,height:e,className:"inline",viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 11.1575 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1576 0.877045 7.49991 0.877045ZM1.82708 7.49988C1.82708 4.36686 4.36689 1.82704 7.49991 1.82704C10.6329 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49988ZM10.1589 5.53774C10.3178 5.31191 10.2636 5.00001 10.0378 4.84109C9.81194 4.68217 9.50004 4.73642 9.34112 4.96225L6.51977 8.97154L5.35681 7.78706C5.16334 7.59002 4.84677 7.58711 4.64973 7.78058C4.45268 7.97404 4.44978 8.29061 4.64325 8.48765L6.22658 10.1003C6.33054 10.2062 6.47617 10.2604 6.62407 10.2483C6.77197 10.2363 6.90686 10.1591 6.99226 10.0377L10.1589 5.53774Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function I({size:e=15}){return a.jsx("svg",{width:e,height:e,className:"inline",viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M8.4449 0.608765C8.0183 -0.107015 6.9817 -0.107015 6.55509 0.608766L0.161178 11.3368C-0.275824 12.07 0.252503 13 1.10608 13H13.8939C14.7475 13 15.2758 12.07 14.8388 11.3368L8.4449 0.608765ZM7.4141 1.12073C7.45288 1.05566 7.54712 1.05566 7.5859 1.12073L13.9798 11.8488C14.0196 11.9154 13.9715 12 13.8939 12H1.10608C1.02849 12 0.980454 11.9154 1.02018 11.8488L7.4141 1.12073ZM6.8269 4.48611C6.81221 4.10423 7.11783 3.78663 7.5 3.78663C7.88217 3.78663 8.18778 4.10423 8.1731 4.48612L8.01921 8.48701C8.00848 8.766 7.7792 8.98664 7.5 8.98664C7.2208 8.98664 6.99151 8.766 6.98078 8.48701L6.8269 4.48611ZM8.24989 10.476C8.24989 10.8902 7.9141 11.226 7.49989 11.226C7.08567 11.226 6.74989 10.8902 6.74989 10.476C6.74989 10.0618 7.08567 9.72599 7.49989 9.72599C7.9141 9.72599 8.24989 10.0618 8.24989 10.476Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function k({size:e=15}){return a.jsx("svg",{width:e,height:e,className:"inline",viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M14.7649 6.07596C14.9991 6.22231 15.0703 6.53079 14.9239 6.76495C14.4849 7.46743 13.9632 8.10645 13.3702 8.66305L14.5712 9.86406C14.7664 10.0593 14.7664 10.3759 14.5712 10.5712C14.3759 10.7664 14.0593 10.7664 13.8641 10.5712L12.6011 9.30817C11.805 9.90283 10.9089 10.3621 9.93375 10.651L10.383 12.3277C10.4544 12.5944 10.2961 12.8685 10.0294 12.94C9.76267 13.0115 9.4885 12.8532 9.41704 12.5865L8.95917 10.8775C8.48743 10.958 8.00036 10.9999 7.50001 10.9999C6.99965 10.9999 6.51257 10.958 6.04082 10.8775L5.58299 12.5864C5.51153 12.8532 5.23737 13.0115 4.97064 12.94C4.7039 12.8686 4.5456 12.5944 4.61706 12.3277L5.06625 10.651C4.09111 10.3621 3.19503 9.90282 2.3989 9.30815L1.1359 10.5712C0.940638 10.7664 0.624058 10.7664 0.428798 10.5712C0.233537 10.3759 0.233537 10.0593 0.428798 9.86405L1.62982 8.66303C1.03682 8.10643 0.515113 7.46742 0.0760677 6.76495C-0.0702867 6.53079 0.000898544 6.22231 0.235065 6.07596C0.469231 5.9296 0.777703 6.00079 0.924058 6.23496C1.40354 7.00213 1.989 7.68057 2.66233 8.2427C2.67315 8.25096 2.6837 8.25972 2.69397 8.26898C4.00897 9.35527 5.65537 9.99991 7.50001 9.99991C10.3078 9.99991 12.6564 8.5063 14.076 6.23495C14.2223 6.00079 14.5308 5.9296 14.7649 6.07596Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function D({size:e=15}){return a.jsx("svg",{width:e,height:e,className:"inline",viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function S({size:e=15,color:t="currentColor"}){return a.jsx("svg",{width:e,height:e,className:"inline",viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M0.877075 7.49972C0.877075 3.84204 3.84222 0.876892 7.49991 0.876892C11.1576 0.876892 14.1227 3.84204 14.1227 7.49972C14.1227 11.1574 11.1576 14.1226 7.49991 14.1226C3.84222 14.1226 0.877075 11.1574 0.877075 7.49972ZM7.49991 1.82689C4.36689 1.82689 1.82708 4.36671 1.82708 7.49972C1.82708 10.6327 4.36689 13.1726 7.49991 13.1726C10.6329 13.1726 13.1727 10.6327 13.1727 7.49972C13.1727 4.36671 10.6329 1.82689 7.49991 1.82689ZM8.24993 10.5C8.24993 10.9142 7.91414 11.25 7.49993 11.25C7.08571 11.25 6.74993 10.9142 6.74993 10.5C6.74993 10.0858 7.08571 9.75 7.49993 9.75C7.91414 9.75 8.24993 10.0858 8.24993 10.5ZM6.05003 6.25C6.05003 5.57211 6.63511 4.925 7.50003 4.925C8.36496 4.925 8.95003 5.57211 8.95003 6.25C8.95003 6.74118 8.68002 6.99212 8.21447 7.27494C8.16251 7.30651 8.10258 7.34131 8.03847 7.37854L8.03841 7.37858C7.85521 7.48497 7.63788 7.61119 7.47449 7.73849C7.23214 7.92732 6.95003 8.23198 6.95003 8.7C6.95004 9.00376 7.19628 9.25 7.50004 9.25C7.8024 9.25 8.04778 9.00601 8.05002 8.70417L8.05056 8.7033C8.05924 8.6896 8.08493 8.65735 8.15058 8.6062C8.25207 8.52712 8.36508 8.46163 8.51567 8.37436L8.51571 8.37433C8.59422 8.32883 8.68296 8.27741 8.78559 8.21506C9.32004 7.89038 10.05 7.35382 10.05 6.25C10.05 4.92789 8.93511 3.825 7.50003 3.825C6.06496 3.825 4.95003 4.92789 4.95003 6.25C4.95003 6.55376 5.19628 6.8 5.50003 6.8C5.80379 6.8 6.05003 6.55376 6.05003 6.25Z",fill:t,fillRule:"evenodd",clipRule:"evenodd"})})}const K={base:"",default:"ring ring-transparent focus:ring-primary-foreground not-disabled:data-error:ring-danger not-disabled:data-success:ring-success",underline:"border-b border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-danger not-disabled:data-success:border-success",outline:"border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-danger not-disabled:data-success:border-success"},M={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"px-3 rounded-full"},N={variant:"default",rounded:"none"};function E({elementId:e,type:t,message:r}){return u.useEffect(()=>{const s=document.getElementById(e);if(s){if(!r&&t==="error"){s.removeAttribute("data-error");return}if(!r&&t==="success"){s.removeAttribute("data-success");return}return s.setAttribute("aria-describedby",`${e}-${t}-message`),s.setAttribute("aria-invalid",t==="error"?"true":"false"),t==="error"&&s.setAttribute("data-error","true"),t==="success"&&s.setAttribute("data-success","true"),()=>{s.removeAttribute("aria-describedby"),s.removeAttribute("aria-invalid"),s.removeAttribute("data-error"),s.removeAttribute("data-success")}}},[e,t,r]),r?a.jsxs("small",{className:x("mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-start",t==="error"&&"text-danger",t==="success"&&"text-success"),role:"status",children:[t==="error"?a.jsx(I,{}):a.jsx($,{}),a.jsx("span",{id:`${e}-${t}-message`,children:r})]}):null}function Q({variant:e=N.variant,rounded:t,displayOnlyMode:r=!1,errorMessage:s,successMessage:n,type:o="text",className:d,...l}){const c=u.useId(),[m,C]=u.useState(!1);let i=t;e==="outline"&&!t&&(i="md"),i=i||N.rounded;const f=x("appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all","file:mr-2 file:border-0 file:rounded-md file:px-1.5 file:py-1 file:bg-primary hover:file:bg-primary/85 file:text-sm file:font-medium file:text-foreground file:transition-colors",!r&&K[e],!r&&M[i],o==="password"&&"pr-10",!r&&"px-2 py-1",r&&"pointer-events-none",d);return a.jsxs("div",{className:x(r&&"cursor-text"),style:{height:l.height,width:l.width},children:[a.jsxs("div",{className:x(o==="password"&&"relative"),children:[a.jsx("input",{...l,id:c,type:o==="password"&&m?"text":o,"aria-disabled":l.disabled,readOnly:r,"aria-readonly":r||l["aria-readonly"],"data-error":s?!0:void 0,"data-success":n?!0:void 0,className:f}),o==="password"&&a.jsx("button",{onClick:()=>C(!m),className:"absolute inset-y-0 right-0 px-2 hover:cursor-pointer","aria-label":"Toggle password visibility","data-state":m?"visible":"hidden",children:m?a.jsx(D,{size:20}):a.jsx(k,{size:20})})]}),!r&&a.jsx(E,{elementId:c,type:"error",message:s}),!r&&a.jsx(E,{elementId:c,type:"success",message:n})]})}function U({display:e="inline",width:t="fit-content",className:r="",required:s,helpMessage:n,suffix:o,htmlFor:d,children:l,...c}){const m=u.useId(),C=x("font-medium",e,r),i=n?`${d??m}-help`:void 0;return a.jsxs("div",{style:{display:e==="inline"?"inline-flex":"flex",width:t},className:"relative",children:[a.jsxs("label",{className:C,htmlFor:d,...c,children:[l,s&&a.jsx("span",{className:"text-red-500 font-medium ml-1","aria-label":"required",children:"*"})]}),n&&a.jsx("span",{className:"text-gray-500 ml-1 size-fit -translate-y-1/3","aria-describedby":i,"aria-label":"Help information",title:n,children:a.jsx(S,{})}),n&&a.jsx("div",{id:i,className:"sr-only",children:n}),o&&a.jsx("span",{className:"ml-1",children:o})]})}function B({itemId:e,checked:t,onChange:r,name:s,disabled:n=!1,className:o=""}){const d="relative inline-flex items-center justify-center rounded-full",l=()=>{n||r()},c=x(d,!t&&"hover:border-current/60",!n&&"border-current cursor-pointer",n&&"border-muted/60 cursor-not-allowed",o);return a.jsx("div",{id:e,role:"radio",tabIndex:-1,"aria-checked":t,"aria-disabled":n,"aria-description":`Radio button for ${s}`,"aria-labelledby":`${e}-label`,onClick:l,className:c,style:{width:"1em",height:"1em",padding:"0.1em",borderWidth:"0.06em"},children:t&&a.jsx("div",{className:x("size-full aspect-square rounded-full",n&&"bg-muted/60",!n&&"bg-current")})})}function y({value:e,children:t,className:r="",isSelected:s=!1,onChange:n,disabled:o=!1,hideInput:d=!1,description:l,name:c}){const C=`radio-${u.useId()}-${e}`,i=()=>{o||n==null||n(e)};return a.jsxs("div",{title:l,className:x("relative flex items-center",r,d&&`p-2 border-2 focus-within:border-dashed focus-within:${o?"border-current/50":"border-current/80"}`,d&&!s&&`border-transparent ${o?"":"not-focus-within:hover:border-border/60"}`,d&&s&&"border-border",o&&"opacity-60 cursor-not-allowed"),style:{gap:"0.5em"},children:[!d&&a.jsx(B,{itemId:C,name:c||"",checked:s,onChange:i,disabled:o,className:x(d&&"")}),a.jsx("div",{id:d?C:void 0,tabIndex:d?-1:void 0,role:d?"radio":void 0,onClick:d?i:void 0,"aria-checked":d?s?"true":"false":void 0,"aria-disabled":d?o:void 0,"aria-description":d?l||`Radio button for ${c}`:void 0,"aria-labelledby":d?`${C}-label`:void 0,className:x(d&&"size-full",typeof t=="object"&&"grow focus:outline-none"),children:a.jsx("label",{id:`${C}-label`,onClick:d?void 0:i,className:x(o&&"cursor-not-allowed",!o&&"cursor-pointer"),children:t})})]})}function W(e,t){const[r,s]=u.useState(t),[n,o]=u.useState(-1),[d,l]=u.useState(!1),c=u.useCallback((b,f)=>{var h;const g=b[f];g.hasAttribute("disabled")||g.getAttribute("aria-disabled")==="true"||((h=b[f])==null||h.click(),o(f))},[]),m=u.useCallback((b,f)=>{var w;if(b.preventDefault(),d||!f.length)return;const g=t!==-1?t:0;(w=f[g])==null||w.focus(),s(g),t!==-1&&c(f,g)},[t,d,c]),C=u.useCallback(b=>{var h;if(!b.shiftKey)return;b.preventDefault();const f=Array.from(document.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')).filter(p=>!p.hasAttribute("disabled")&&p.tabIndex>=0),g=f.findIndex(p=>p.id===e),w=g>0?g-1:f.length-1;(h=f[w])==null||h.focus()},[e]),i=u.useCallback((b,f)=>{var j;if(!f.length)return;const g=b.target;if(!f.some(Z=>Z.id===g.id))return;const h=r!==-1?r:0;let p=h;switch(b.key){case"ArrowUp":case"ArrowLeft":b.preventDefault(),p=h>0?h-1:f.length-1;break;case"ArrowDown":case"ArrowRight":b.preventDefault(),p=(h+1)%f.length;break;case" ":b.preventDefault(),c(f,h);return;case"Tab":C(b);return;default:return}(j=f[p])==null||j.focus(),s(p),n!==-1&&c(f,p)},[r,n,C,c]),v=u.useCallback(()=>{const b=document.querySelector(`[id="${e}"][role="radiogroup"]`);return b?Array.from(b.querySelectorAll('[role="radio"]')):[]},[e]);u.useEffect(()=>{const b=document.querySelector(`[id="${e}"][role="radiogroup"]`);if(!b)return;const f=v(),g=j=>m(j,f),w=j=>i(j,f),h=()=>l(!0),p=()=>l(!1);return document.addEventListener("keydown",w),b.addEventListener("focus",g),b.addEventListener("mousedown",h),document.addEventListener("mouseup",p),()=>{document.removeEventListener("keydown",w),b.removeEventListener("focus",g),b.removeEventListener("mousedown",h),document.removeEventListener("mouseup",p)}},[e,v,m,i])}function _({options:e=[],value:t,onChange:r,name:s,children:n,className:o="",childrenClassName:d="",hideInputs:l=!1}){const c=u.useId(),m=s||`radio-group-${c}`;W(m,e.findIndex(i=>i===t));const C=u.useMemo(()=>e.reduce((i,v)=>(typeof v=="string"?i.some(b=>b.value===v)||i.push({label:v,value:v}):i.push(v),i),[]),[e]);return a.jsxs("div",{id:m,role:"radiogroup",tabIndex:0,className:x(o,"focus:outline-none"),children:[C.length>0&&C.map((i,v)=>a.jsx(y,{value:i.value,isSelected:t===i.value,onChange:r,name:m,disabled:i.disabled,description:i.description,hideInput:l,className:d,children:i.label},`${i.value}-${v}`)),C.length===0&&n&&u.Children.map(n,i=>u.isValidElement(i)&&i.type===y?a.jsx(y,{...i.props,className:x(d,i.props.className),hideInput:i.props.hideInput||l,isSelected:t===i.props.value,onChange:r,name:m,children:i.props.children}):null)]})}function J(e,t){u.useEffect(()=>{const r=document.getElementById(e);if(!r)return;if(!t){r.style.height="auto";return}const s=()=>{r.style.height="auto",r.style.height=`${r.scrollHeight}px`};return s(),r.addEventListener("input",s),r.addEventListener("resize",s),window.addEventListener("resize",s),()=>{r.removeEventListener("input",s),r.removeEventListener("resize",s),window.removeEventListener("resize",s)}},[e,t])}const X={base:"","left-line":"border-l border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-danger not-disabled:data-success:border-success",outline:"border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-danger not-disabled:data-success:border-success"},Y={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"px-3 rounded-full"},A={variant:"outline",rounded:"none"};function O({elementId:e,maxLength:t}){const[r,s]=u.useState(0);return u.useEffect(()=>{const n=document.getElementById(e);if(!n)return;const o=()=>{const d=n.value.length;s(d);const l=d>=t;n.setAttribute("aria-describedby",`${e}-character-count`),n.setAttribute("aria-invalid",l?"true":"false"),l?n.setAttribute("data-error","true"):n.removeAttribute("data-error")};return o(),n.addEventListener("input",o),n.setAttribute("maxlength",String(t)),()=>{n.removeEventListener("input",o),n.removeAttribute("maxlength"),n.removeAttribute("aria-describedby"),n.removeAttribute("aria-invalid"),n.removeAttribute("data-error")}},[e,t]),a.jsx("small",{className:x("mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-end",r>=t&&"text-danger",r<t&&"text-current"),role:"status",children:a.jsxs("span",{id:`${e}-character-count`,children:[r," / ",t," characters"]})})}function P({variant:e=A.variant,rounded:t,displayOnlyMode:r=!1,errorMessage:s,successMessage:n,hideResizeHandle:o=!1,autoExpand:d=!1,characterLimit:l=0,className:c,...m}){const C=u.useId();J(C,d||r);let i=t;e==="outline"&&!t&&(i="md"),i=i||A.rounded;let v=o;(r||e==="left-line"&&!o)&&(v=!0);const f=x("appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all",!r&&X[e],!r&&Y[i],!r&&"px-2 py-1",r&&"pointer-events-none",v&&"no-resize-handle",c);return a.jsxs("div",{className:x("-space-y-1.5",r&&"cursor-text"),children:[a.jsx("textarea",{...m,id:C,"aria-disabled":m.disabled,readOnly:r,"aria-readonly":r||m["aria-readonly"],style:{resize:d?"none":void 0},className:f}),l>0&&a.jsx(O,{elementId:C,maxLength:l}),!r&&a.jsx(E,{elementId:C,type:"error",message:s}),!r&&a.jsx(E,{elementId:C,type:"success",message:n})]})}function ee({children:e,ref:t,...r}){if(u.isValidElement(e)){let s={...r};return e.props&&(s={...s,...e.props}),u.cloneElement(e,{...s,ref:n=>{typeof t=="function"?t(n):t&&(t.current=n)}})}return u.createElement("div",{...r,ref:t},e)}exports.Button=F;exports.ButtonLoadingDots=R;exports.CheckCircled=$;exports.Checkbox=T;exports.ExclamationTriangle=I;exports.EyeClosed=k;exports.EyeOpened=D;exports.Input=Q;exports.Label=U;exports.QuestionMarkCircled=S;exports.RadioGroup=_;exports.RadioGroupItem=y;exports.RadioInput=B;exports.Slot=ee;exports.Textarea=P;exports.join=x;
|
2
|
+
//# sourceMappingURL=index.cjs.js.map
|