castlecraftstudios-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 +73 -0
- package/dist/components/Alert/Alert.d.ts +10 -0
- package/dist/components/Badge/Badge.d.ts +6 -0
- package/dist/components/Button/Button.d.ts +6 -0
- package/dist/components/Card/Card.d.ts +7 -0
- package/dist/components/Checkbox/Checkbox.d.ts +5 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts +6 -0
- package/dist/components/ComponentPage/ComponentPage.d.ts +17 -0
- package/dist/components/DatePicker/DatePicker.d.ts +12 -0
- package/dist/components/Input/Input.d.ts +8 -0
- package/dist/components/Modal/Modal.d.ts +10 -0
- package/dist/components/Radio/Radio.d.ts +5 -0
- package/dist/components/Select/Select.d.ts +8 -0
- package/dist/components/SideNav/SideNav.d.ts +10 -0
- package/dist/components/Spinner/Spinner.d.ts +6 -0
- package/dist/components/Tabs/Tabs.d.ts +27 -0
- package/dist/components/Textarea/Textarea.d.ts +7 -0
- package/dist/components/ThemePicker/ThemePicker.d.ts +1 -0
- package/dist/components/Toast/Toast.d.ts +10 -0
- package/dist/components/Toggle/Toggle.d.ts +6 -0
- package/dist/components/Tooltip/Tooltip.d.ts +7 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +2 -0
- package/dist/index.js +898 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/index.d.ts +16 -0
- package/package.json +61 -0
package/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# React + TypeScript + Vite
|
|
2
|
+
|
|
3
|
+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
+
|
|
5
|
+
Currently, two official plugins are available:
|
|
6
|
+
|
|
7
|
+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
|
|
8
|
+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
|
|
9
|
+
|
|
10
|
+
## React Compiler
|
|
11
|
+
|
|
12
|
+
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
|
|
13
|
+
|
|
14
|
+
## Expanding the ESLint configuration
|
|
15
|
+
|
|
16
|
+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
export default defineConfig([
|
|
20
|
+
globalIgnores(['dist']),
|
|
21
|
+
{
|
|
22
|
+
files: ['**/*.{ts,tsx}'],
|
|
23
|
+
extends: [
|
|
24
|
+
// Other configs...
|
|
25
|
+
|
|
26
|
+
// Remove tseslint.configs.recommended and replace with this
|
|
27
|
+
tseslint.configs.recommendedTypeChecked,
|
|
28
|
+
// Alternatively, use this for stricter rules
|
|
29
|
+
tseslint.configs.strictTypeChecked,
|
|
30
|
+
// Optionally, add this for stylistic rules
|
|
31
|
+
tseslint.configs.stylisticTypeChecked,
|
|
32
|
+
|
|
33
|
+
// Other configs...
|
|
34
|
+
],
|
|
35
|
+
languageOptions: {
|
|
36
|
+
parserOptions: {
|
|
37
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
38
|
+
tsconfigRootDir: import.meta.dirname,
|
|
39
|
+
},
|
|
40
|
+
// other options...
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
])
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
// eslint.config.js
|
|
50
|
+
import reactX from 'eslint-plugin-react-x'
|
|
51
|
+
import reactDom from 'eslint-plugin-react-dom'
|
|
52
|
+
|
|
53
|
+
export default defineConfig([
|
|
54
|
+
globalIgnores(['dist']),
|
|
55
|
+
{
|
|
56
|
+
files: ['**/*.{ts,tsx}'],
|
|
57
|
+
extends: [
|
|
58
|
+
// Other configs...
|
|
59
|
+
// Enable lint rules for React
|
|
60
|
+
reactX.configs['recommended-typescript'],
|
|
61
|
+
// Enable lint rules for React DOM
|
|
62
|
+
reactDom.configs.recommended,
|
|
63
|
+
],
|
|
64
|
+
languageOptions: {
|
|
65
|
+
parserOptions: {
|
|
66
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
67
|
+
tsconfigRootDir: import.meta.dirname,
|
|
68
|
+
},
|
|
69
|
+
// other options...
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
])
|
|
73
|
+
```
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type AlertVariant = 'success' | 'warning' | 'error' | 'info';
|
|
2
|
+
interface AlertProps {
|
|
3
|
+
variant?: AlertVariant;
|
|
4
|
+
title?: string;
|
|
5
|
+
onDismiss?: () => void;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export default function Alert({ variant, title, onDismiss, children, className }: AlertProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
2
|
+
variant?: 'default' | 'success' | 'warning' | 'error' | 'info';
|
|
3
|
+
dot?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export default function Badge({ variant, dot, className, children, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
2
|
+
variant?: 'primary' | 'secondary' | 'outline' | 'ghost';
|
|
3
|
+
size?: 'sm' | 'md' | 'lg';
|
|
4
|
+
}
|
|
5
|
+
export default function Button({ variant, size, className, children, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2
|
+
variant?: 'default' | 'elevated' | 'outline' | 'flat';
|
|
3
|
+
header?: React.ReactNode;
|
|
4
|
+
footer?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export default function Card({ variant, header, footer, className, children, ...props }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface ComponentPageProps {
|
|
2
|
+
title: string;
|
|
3
|
+
description: string;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
interface ComponentSectionProps {
|
|
7
|
+
title?: string;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
interface PreviewRowProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
11
|
+
grid?: boolean;
|
|
12
|
+
alignCenter?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function ComponentPage({ title, description, children }: ComponentPageProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function ComponentSection({ title, children }: ComponentSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function PreviewRow({ grid, alignCenter, className, children, ...props }: PreviewRowProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface DatePickerProps {
|
|
2
|
+
label?: string;
|
|
3
|
+
value?: Date | null;
|
|
4
|
+
onChange?: (date: Date) => void;
|
|
5
|
+
min?: Date;
|
|
6
|
+
max?: Date;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export default function DatePicker({ label, value, onChange, min, max, placeholder, disabled, className, }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
2
|
+
label?: string;
|
|
3
|
+
helperText?: string;
|
|
4
|
+
error?: string;
|
|
5
|
+
size?: 'sm' | 'md' | 'lg';
|
|
6
|
+
}
|
|
7
|
+
export default function Input({ label, helperText, error, size, className, id, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface ModalProps {
|
|
2
|
+
open: boolean;
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
title?: string;
|
|
5
|
+
footer?: React.ReactNode;
|
|
6
|
+
size?: 'sm' | 'md' | 'lg';
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export default function Modal({ open, onClose, title, footer, size, children }: ModalProps): import('react').ReactPortal | null;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
|
|
2
|
+
label?: string;
|
|
3
|
+
helperText?: string;
|
|
4
|
+
error?: string;
|
|
5
|
+
size?: 'sm' | 'md' | 'lg';
|
|
6
|
+
}
|
|
7
|
+
export default function Select({ label, helperText, error, size, className, id, children, ...props }: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
interface TabsProps {
|
|
2
|
+
defaultValue: string;
|
|
3
|
+
value?: string;
|
|
4
|
+
onChange?: (value: string) => void;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function Tabs({ defaultValue, value, onChange, children, className }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
interface TabListProps {
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function TabList({ children, className }: TabListProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
interface TabProps {
|
|
15
|
+
value: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function Tab({ value, disabled, children, className }: TabProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
interface TabPanelProps {
|
|
22
|
+
value: string;
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function TabPanel({ value, children, className }: TabPanelProps): import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
2
|
+
label?: string;
|
|
3
|
+
helperText?: string;
|
|
4
|
+
error?: string;
|
|
5
|
+
}
|
|
6
|
+
export default function Textarea({ label, helperText, error, className, id, rows, ...props }: TextareaProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ThemePicker(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type ToastVariant = 'success' | 'warning' | 'error' | 'info';
|
|
2
|
+
interface ToastProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
variant?: ToastVariant;
|
|
5
|
+
title?: string;
|
|
6
|
+
onDismiss?: () => void;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export default function Toast({ open, variant, title, onDismiss, children }: ToastProps): import('react').ReactPortal | null;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface ToggleProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
2
|
+
label?: string;
|
|
3
|
+
size?: 'sm' | 'md' | 'lg';
|
|
4
|
+
}
|
|
5
|
+
export default function Toggle({ label, size, className, ...props }: ToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface TooltipProps {
|
|
2
|
+
content: React.ReactNode;
|
|
3
|
+
position?: 'top' | 'bottom' | 'left' | 'right';
|
|
4
|
+
children: React.ReactElement;
|
|
5
|
+
}
|
|
6
|
+
export default function Tooltip({ content, position, children }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require(`react/jsx-runtime`),t=require(`react`),n=require(`react-dom`);function r({variant:t=`primary`,size:n=`md`,className:r,children:i,...a}){return(0,e.jsx)(`button`,{className:[`button`,`button--${t}`,`button--${n}`,r].filter(Boolean).join(` `),...a,children:i})}function i({variant:t=`default`,header:n,footer:r,className:i,children:a,...o}){return(0,e.jsxs)(`div`,{className:[`card`,`card--${t}`,i].filter(Boolean).join(` `),...o,children:[n&&(0,e.jsx)(`div`,{className:`card__header`,children:n}),a&&(0,e.jsx)(`div`,{className:`card__body`,children:a}),r&&(0,e.jsx)(`div`,{className:`card__footer`,children:r})]})}function a({label:n,helperText:r,error:i,size:a=`md`,className:o,id:s,...c}){let l=(0,t.useId)(),u=s??l;return(0,e.jsxs)(`div`,{className:[`input-field`,`input-field--${a}`,i&&`input-field--error`,o].filter(Boolean).join(` `),children:[n&&(0,e.jsx)(`label`,{htmlFor:u,children:n}),(0,e.jsx)(`input`,{id:u,...c}),(i||r)&&(0,e.jsx)(`span`,{className:`input-field__hint`,children:i??r})]})}function o({label:n,helperText:r,error:i,className:a,id:o,rows:s=4,...c}){let l=(0,t.useId)(),u=o??l;return(0,e.jsxs)(`div`,{className:[`textarea-field`,i&&`textarea-field--error`,a].filter(Boolean).join(` `),children:[n&&(0,e.jsx)(`label`,{htmlFor:u,children:n}),(0,e.jsx)(`textarea`,{id:u,rows:s,...c}),(i||r)&&(0,e.jsx)(`span`,{className:`textarea-field__hint`,children:i??r})]})}function s({label:n,helperText:r,error:i,size:a=`md`,className:o,id:s,children:c,...l}){let u=(0,t.useId)(),d=s??u;return(0,e.jsxs)(`div`,{className:[`select-field`,`select-field--${a}`,i&&`select-field--error`,o].filter(Boolean).join(` `),children:[n&&(0,e.jsx)(`label`,{htmlFor:d,children:n}),(0,e.jsx)(`div`,{className:`select-field__wrapper`,children:(0,e.jsx)(`select`,{id:d,...l,children:c})}),(i||r)&&(0,e.jsx)(`span`,{className:`select-field__hint`,children:i??r})]})}function c({label:t,size:n=`md`,className:r,...i}){return(0,e.jsxs)(`label`,{className:[`toggle`,`toggle--${n}`,r].filter(Boolean).join(` `),children:[(0,e.jsx)(`input`,{type:`checkbox`,role:`switch`,...i}),(0,e.jsx)(`span`,{className:`toggle__track`,children:(0,e.jsx)(`span`,{className:`toggle__thumb`})}),t&&(0,e.jsx)(`span`,{className:`toggle__label`,children:t})]})}function l({label:t,className:n,...r}){return(0,e.jsxs)(`label`,{className:[`checkbox`,n].filter(Boolean).join(` `),children:[(0,e.jsx)(`input`,{type:`checkbox`,...r}),(0,e.jsx)(`span`,{className:`checkbox__box`}),t&&(0,e.jsx)(`span`,{className:`checkbox__label`,children:t})]})}function u({label:t,className:n,...r}){return(0,e.jsxs)(`label`,{className:[`radio`,n].filter(Boolean).join(` `),children:[(0,e.jsx)(`input`,{type:`radio`,...r}),(0,e.jsx)(`span`,{className:`radio__dot`}),t&&(0,e.jsx)(`span`,{className:`radio__label`,children:t})]})}function d({open:r,onClose:i,title:a,footer:o,size:s=`md`,children:c}){return(0,t.useEffect)(()=>{if(!r)return;let e=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow=`hidden`,document.body.style.paddingRight=`${e}px`;let t=e=>{e.key===`Escape`&&i()};return document.addEventListener(`keydown`,t),()=>{document.body.style.overflow=``,document.body.style.paddingRight=``,document.removeEventListener(`keydown`,t)}},[r,i]),r?(0,n.createPortal)((0,e.jsx)(`div`,{className:`modal-backdrop`,onClick:i,children:(0,e.jsxs)(`div`,{className:[`modal`,`modal--${s}`].join(` `),role:`dialog`,"aria-modal":`true`,onClick:e=>e.stopPropagation(),children:[a&&(0,e.jsxs)(`div`,{className:`modal__header`,children:[(0,e.jsx)(`h2`,{children:a}),(0,e.jsx)(`button`,{className:`modal__close`,onClick:i,"aria-label":`Close`,children:(0,e.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,children:(0,e.jsx)(`path`,{d:`M1 1l12 12M13 1L1 13`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})})})]}),(0,e.jsx)(`div`,{className:`modal__body`,children:c}),o&&(0,e.jsx)(`div`,{className:`modal__footer`,children:o})]})}),document.body):null}function f({content:n,position:r=`top`,children:i}){let[a,o]=(0,t.useState)(!1);return(0,e.jsxs)(`span`,{className:`tooltip-wrapper`,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),onFocus:()=>o(!0),onBlur:()=>o(!1),children:[i,(0,e.jsx)(`span`,{className:[`tooltip`,`tooltip--${r}`,a&&`tooltip--visible`].filter(Boolean).join(` `),role:`tooltip`,children:n})]})}function p({variant:t=`default`,dot:n=!1,className:r,children:i,...a}){return(0,e.jsxs)(`span`,{className:[`badge`,`badge--${t}`,r].filter(Boolean).join(` `),...a,children:[n&&(0,e.jsx)(`span`,{className:`badge__dot`}),i]})}var m={success:(0,e.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,children:[(0,e.jsx)(`circle`,{cx:`8`,cy:`8`,r:`7`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,e.jsx)(`path`,{d:`M5 8l2 2 4-4`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),warning:(0,e.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,children:[(0,e.jsx)(`path`,{d:`M8 2.5L14 13.5H2L8 2.5z`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinejoin:`round`}),(0,e.jsx)(`path`,{d:`M8 6.5v3`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`}),(0,e.jsx)(`circle`,{cx:`8`,cy:`11.5`,r:`0.75`,fill:`currentColor`})]}),error:(0,e.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,children:[(0,e.jsx)(`circle`,{cx:`8`,cy:`8`,r:`7`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,e.jsx)(`path`,{d:`M5.5 5.5l5 5M10.5 5.5l-5 5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]}),info:(0,e.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,children:[(0,e.jsx)(`circle`,{cx:`8`,cy:`8`,r:`7`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,e.jsx)(`path`,{d:`M8 7.5V11`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`}),(0,e.jsx)(`circle`,{cx:`8`,cy:`5`,r:`0.75`,fill:`currentColor`})]})};function h({variant:t=`info`,title:n,onDismiss:r,children:i,className:a}){return(0,e.jsxs)(`div`,{className:[`alert`,`alert--${t}`,a].filter(Boolean).join(` `),children:[(0,e.jsx)(`span`,{className:`alert__icon`,children:m[t]}),(0,e.jsxs)(`div`,{className:`alert__content`,children:[n&&(0,e.jsx)(`div`,{className:`alert__title`,children:n}),(0,e.jsx)(`div`,{className:`alert__body`,children:i})]}),r&&(0,e.jsx)(`button`,{className:`alert__dismiss`,onClick:r,"aria-label":`Dismiss`,children:(0,e.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,children:(0,e.jsx)(`path`,{d:`M1 1l10 10M11 1L1 11`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})})})]})}var g={success:(0,e.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,children:[(0,e.jsx)(`circle`,{cx:`8`,cy:`8`,r:`7`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,e.jsx)(`path`,{d:`M5 8l2 2 4-4`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),warning:(0,e.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,children:[(0,e.jsx)(`path`,{d:`M8 2.5L14 13.5H2L8 2.5z`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinejoin:`round`}),(0,e.jsx)(`path`,{d:`M8 6.5v3`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`}),(0,e.jsx)(`circle`,{cx:`8`,cy:`11.5`,r:`0.75`,fill:`currentColor`})]}),error:(0,e.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,children:[(0,e.jsx)(`circle`,{cx:`8`,cy:`8`,r:`7`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,e.jsx)(`path`,{d:`M5.5 5.5l5 5M10.5 5.5l-5 5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]}),info:(0,e.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,children:[(0,e.jsx)(`circle`,{cx:`8`,cy:`8`,r:`7`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,e.jsx)(`path`,{d:`M8 7.5V11`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`}),(0,e.jsx)(`circle`,{cx:`8`,cy:`5`,r:`0.75`,fill:`currentColor`})]})};function _({open:r,variant:i=`info`,title:a,onDismiss:o,children:s}){let[c,l]=(0,t.useState)(!1),[u,d]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{if(r){l(!0);let e=requestAnimationFrame(()=>requestAnimationFrame(()=>d(!0)));return()=>cancelAnimationFrame(e)}else{d(!1);let e=setTimeout(()=>l(!1),250);return()=>clearTimeout(e)}},[r]),c?(0,n.createPortal)((0,e.jsxs)(`div`,{className:[`toast`,`toast--${i}`,u&&`toast--visible`].filter(Boolean).join(` `),role:`status`,children:[(0,e.jsx)(`span`,{className:`toast__icon`,children:g[i]}),(0,e.jsxs)(`div`,{className:`toast__content`,children:[a&&(0,e.jsx)(`div`,{className:`toast__title`,children:a}),(0,e.jsx)(`div`,{className:`toast__body`,children:s})]}),o&&(0,e.jsx)(`button`,{className:`toast__dismiss`,onClick:o,"aria-label":`Dismiss`,children:(0,e.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,children:(0,e.jsx)(`path`,{d:`M1 1l10 10M11 1L1 11`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})})})]}),document.body):null}function v({size:t=`md`,className:n}){return(0,e.jsx)(`svg`,{className:[`spinner`,`spinner--${t}`,n].filter(Boolean).join(` `),viewBox:`0 0 24 24`,fill:`none`,"aria-label":`Loading`,children:(0,e.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeDasharray:`47 16`})})}var y=(0,t.createContext)(null);function b(){let e=(0,t.useContext)(y);if(!e)throw Error(`Tab components must be used inside <Tabs>`);return e}function x({defaultValue:n,value:r,onChange:i,children:a,className:o}){let[s,c]=(0,t.useState)(n),l=(0,t.useId)(),u=r??s;function d(e){r||c(e),i?.(e)}return(0,e.jsx)(y.Provider,{value:{activeValue:u,setActiveValue:d,baseId:l},children:(0,e.jsx)(`div`,{className:[`tabs`,o].filter(Boolean).join(` `),children:a})})}function S({children:n,className:r}){let i=(0,t.useRef)(null);function a(e){let t=i.current?.querySelectorAll(`[role="tab"]:not([disabled])`);if(!t)return;let n=Array.from(t),r=document.activeElement,a=n.indexOf(r);a!==-1&&(e.key===`ArrowRight`?(e.preventDefault(),n[(a+1)%n.length].focus()):e.key===`ArrowLeft`?(e.preventDefault(),n[(a-1+n.length)%n.length].focus()):e.key===`Home`?(e.preventDefault(),n[0].focus()):e.key===`End`&&(e.preventDefault(),n[n.length-1].focus()))}return(0,e.jsx)(`div`,{ref:i,role:`tablist`,className:[`tabs__list`,r].filter(Boolean).join(` `),onKeyDown:a,children:n})}function C({value:t,disabled:n,children:r,className:i}){let{activeValue:a,setActiveValue:o,baseId:s}=b(),c=a===t;return(0,e.jsx)(`button`,{role:`tab`,"aria-selected":c,"aria-controls":`${s}-panel-${t}`,id:`${s}-tab-${t}`,tabIndex:c?0:-1,disabled:n,className:[`tabs__tab`,c&&`tabs__tab--active`,i].filter(Boolean).join(` `),onClick:()=>!n&&o(t),children:r})}function w({value:t,children:n,className:r}){let{activeValue:i,baseId:a}=b();return i===t?(0,e.jsx)(`div`,{role:`tabpanel`,id:`${a}-panel-${t}`,"aria-labelledby":`${a}-tab-${t}`,className:[`tabs__panel`,r].filter(Boolean).join(` `),children:n}):null}var T=[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],E=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`];function D(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function O(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function k(e){return e?e.toLocaleDateString(`en-GB`,{day:`2-digit`,month:`short`,year:`numeric`}):``}function A(e,t){return new Date(e,t+1,0).getDate()}function j(e,t){return new Date(e,t,1).getDay()}function M({label:n,value:r,onChange:i,min:a,max:o,placeholder:s=`Select date`,disabled:c,className:l}){let u=(0,t.useId)(),[d,f]=(0,t.useState)(!1),[p,m]=(0,t.useState)(()=>{let e=r??new Date;return{year:e.getFullYear(),month:e.getMonth()}}),h=(0,t.useRef)(null);(0,t.useEffect)(()=>{if(!d)return;function e(e){h.current?.contains(e.target)||f(!1)}return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[d]),(0,t.useEffect)(()=>{if(!d)return;function e(e){e.key===`Escape`&&f(!1)}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[d]);function g(){m(e=>{let t=e.month===0?11:e.month-1;return{year:e.month===0?e.year-1:e.year,month:t}})}function _(){m(e=>{let t=e.month===11?0:e.month+1;return{year:e.month===11?e.year+1:e.year,month:t}})}function v(e){let t=new Date(p.year,p.month,e);i?.(t),f(!1)}function y(e){let t=O(new Date(p.year,p.month,e));return!!(a&&t<O(a)||o&&t>O(o))}let b=A(p.year,p.month),x=j(p.year,p.month),S=[...Array(x).fill(null),...Array.from({length:b},(e,t)=>t+1)];for(;S.length%7!=0;)S.push(null);return(0,e.jsxs)(`div`,{ref:h,className:[`date-picker`,c&&`date-picker--disabled`,l].filter(Boolean).join(` `),children:[n&&(0,e.jsx)(`label`,{className:`date-picker__label`,htmlFor:u,children:n}),(0,e.jsxs)(`button`,{id:u,type:`button`,className:[`date-picker__trigger`,d&&`date-picker__trigger--open`].filter(Boolean).join(` `),disabled:c,"aria-haspopup":`dialog`,"aria-expanded":d,onClick:()=>f(e=>!e),children:[(0,e.jsx)(`span`,{className:r?``:`date-picker__placeholder`,children:r?k(r):s}),(0,e.jsxs)(`svg`,{className:`date-picker__icon`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,e.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,e.jsx)(`line`,{x1:`16`,y1:`2`,x2:`16`,y2:`6`}),(0,e.jsx)(`line`,{x1:`8`,y1:`2`,x2:`8`,y2:`6`}),(0,e.jsx)(`line`,{x1:`3`,y1:`10`,x2:`21`,y2:`10`})]})]}),d&&(0,e.jsxs)(`div`,{className:`date-picker__popover`,role:`dialog`,"aria-label":`Date picker`,children:[(0,e.jsxs)(`div`,{className:`date-picker__header`,children:[(0,e.jsx)(`button`,{type:`button`,className:`date-picker__nav`,onClick:g,"aria-label":`Previous month`,children:(0,e.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,e.jsx)(`polyline`,{points:`15 18 9 12 15 6`})})}),(0,e.jsxs)(`span`,{className:`date-picker__month-label`,children:[E[p.month],` `,p.year]}),(0,e.jsx)(`button`,{type:`button`,className:`date-picker__nav`,onClick:_,"aria-label":`Next month`,children:(0,e.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,e.jsx)(`polyline`,{points:`9 18 15 12 9 6`})})})]}),(0,e.jsxs)(`div`,{className:`date-picker__grid`,children:[T.map(t=>(0,e.jsx)(`span`,{className:`date-picker__day-name`,children:t},t)),S.map((t,n)=>{if(!t)return(0,e.jsx)(`span`,{},`empty-${n}`);let i=new Date(p.year,p.month,t),a=r?D(i,r):!1,o=D(i,new Date),s=y(t);return(0,e.jsx)(`button`,{type:`button`,disabled:s,"aria-pressed":a,"aria-label":i.toLocaleDateString(`en-GB`,{day:`numeric`,month:`long`,year:`numeric`}),className:[`date-picker__day`,a&&`date-picker__day--selected`,o&&!a&&`date-picker__day--today`,s&&`date-picker__day--disabled`].filter(Boolean).join(` `),onClick:()=>!s&&v(t),children:t},t)})]})]})]})}exports.Alert=h,exports.Badge=p,exports.Button=r,exports.Card=i,exports.Checkbox=l,exports.DatePicker=M,exports.Input=a,exports.Modal=d,exports.Radio=u,exports.Select=s,exports.Spinner=v,exports.Tab=C,exports.TabList=S,exports.TabPanel=w,exports.Tabs=x,exports.Textarea=o,exports.Toast=_,exports.Toggle=c,exports.Tooltip=f;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../src/components/Button/Button.tsx","../src/components/Card/Card.tsx","../src/components/Input/Input.tsx","../src/components/Textarea/Textarea.tsx","../src/components/Select/Select.tsx","../src/components/Toggle/Toggle.tsx","../src/components/Checkbox/Checkbox.tsx","../src/components/Radio/Radio.tsx","../src/components/Modal/Modal.tsx","../src/components/Tooltip/Tooltip.tsx","../src/components/Badge/Badge.tsx","../src/components/Alert/Alert.tsx","../src/components/Toast/Toast.tsx","../src/components/Spinner/Spinner.tsx","../src/components/Tabs/Tabs.tsx","../src/components/DatePicker/DatePicker.tsx"],"sourcesContent":["import './Button.scss';\n\ninterface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: 'primary' | 'secondary' | 'outline' | 'ghost';\n size?: 'sm' | 'md' | 'lg';\n}\n\nexport default function Button({\n variant = 'primary',\n size = 'md',\n className,\n children,\n ...props\n}: ButtonProps) {\n return (\n <button\n className={['button', `button--${variant}`, `button--${size}`, className]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {children}\n </button>\n );\n}\n","import './Card.scss';\n\ninterface CardProps extends React.HTMLAttributes<HTMLDivElement> {\n variant?: 'default' | 'elevated' | 'outline' | 'flat';\n header?: React.ReactNode;\n footer?: React.ReactNode;\n}\n\nexport default function Card({\n variant = 'default',\n header,\n footer,\n className,\n children,\n ...props\n}: CardProps) {\n return (\n <div\n className={['card', `card--${variant}`, className].filter(Boolean).join(' ')}\n {...props}\n >\n {header && <div className=\"card__header\">{header}</div>}\n {children && <div className=\"card__body\">{children}</div>}\n {footer && <div className=\"card__footer\">{footer}</div>}\n </div>\n );\n}\n","import { useId } from 'react';\nimport './Input.scss';\n\ninterface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {\n label?: string;\n helperText?: string;\n error?: string;\n size?: 'sm' | 'md' | 'lg';\n}\n\nexport default function Input({\n label,\n helperText,\n error,\n size = 'md',\n className,\n id,\n ...props\n}: InputProps) {\n const generatedId = useId();\n const inputId = id ?? generatedId;\n\n return (\n <div\n className={['input-field', `input-field--${size}`, error && 'input-field--error', className]\n .filter(Boolean)\n .join(' ')}\n >\n {label && <label htmlFor={inputId}>{label}</label>}\n <input id={inputId} {...props} />\n {(error || helperText) && (\n <span className=\"input-field__hint\">{error ?? helperText}</span>\n )}\n </div>\n );\n}\n","import { useId } from 'react';\nimport './Textarea.scss';\n\ninterface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {\n label?: string;\n helperText?: string;\n error?: string;\n}\n\nexport default function Textarea({\n label,\n helperText,\n error,\n className,\n id,\n rows = 4,\n ...props\n}: TextareaProps) {\n const generatedId = useId();\n const inputId = id ?? generatedId;\n\n return (\n <div\n className={['textarea-field', error && 'textarea-field--error', className]\n .filter(Boolean)\n .join(' ')}\n >\n {label && <label htmlFor={inputId}>{label}</label>}\n <textarea id={inputId} rows={rows} {...props} />\n {(error || helperText) && (\n <span className=\"textarea-field__hint\">{error ?? helperText}</span>\n )}\n </div>\n );\n}\n","import { useId } from 'react';\nimport './Select.scss';\n\ninterface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'size'> {\n label?: string;\n helperText?: string;\n error?: string;\n size?: 'sm' | 'md' | 'lg';\n}\n\nexport default function Select({\n label,\n helperText,\n error,\n size = 'md',\n className,\n id,\n children,\n ...props\n}: SelectProps) {\n const generatedId = useId();\n const inputId = id ?? generatedId;\n\n return (\n <div\n className={['select-field', `select-field--${size}`, error && 'select-field--error', className]\n .filter(Boolean)\n .join(' ')}\n >\n {label && <label htmlFor={inputId}>{label}</label>}\n <div className=\"select-field__wrapper\">\n <select id={inputId} {...props}>\n {children}\n </select>\n </div>\n {(error || helperText) && (\n <span className=\"select-field__hint\">{error ?? helperText}</span>\n )}\n </div>\n );\n}\n","import './Toggle.scss';\n\ninterface ToggleProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {\n label?: string;\n size?: 'sm' | 'md' | 'lg';\n}\n\nexport default function Toggle({ label, size = 'md', className, ...props }: ToggleProps) {\n return (\n <label className={['toggle', `toggle--${size}`, className].filter(Boolean).join(' ')}>\n <input type=\"checkbox\" role=\"switch\" {...props} />\n <span className=\"toggle__track\">\n <span className=\"toggle__thumb\" />\n </span>\n {label && <span className=\"toggle__label\">{label}</span>}\n </label>\n );\n}\n","import './Checkbox.scss';\n\ninterface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {\n label?: string;\n}\n\nexport default function Checkbox({ label, className, ...props }: CheckboxProps) {\n return (\n <label className={['checkbox', className].filter(Boolean).join(' ')}>\n <input type=\"checkbox\" {...props} />\n <span className=\"checkbox__box\" />\n {label && <span className=\"checkbox__label\">{label}</span>}\n </label>\n );\n}\n","import './Radio.scss';\n\ninterface RadioProps extends React.InputHTMLAttributes<HTMLInputElement> {\n label?: string;\n}\n\nexport default function Radio({ label, className, ...props }: RadioProps) {\n return (\n <label className={['radio', className].filter(Boolean).join(' ')}>\n <input type=\"radio\" {...props} />\n <span className=\"radio__dot\" />\n {label && <span className=\"radio__label\">{label}</span>}\n </label>\n );\n}\n","import { useEffect } from 'react';\nimport { createPortal } from 'react-dom';\nimport './Modal.scss';\n\ninterface ModalProps {\n open: boolean;\n onClose: () => void;\n title?: string;\n footer?: React.ReactNode;\n size?: 'sm' | 'md' | 'lg';\n children: React.ReactNode;\n}\n\nexport default function Modal({ open, onClose, title, footer, size = 'md', children }: ModalProps) {\n useEffect(() => {\n if (!open) return;\n const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;\n document.body.style.overflow = 'hidden';\n document.body.style.paddingRight = `${scrollbarWidth}px`;\n const onKey = (e: KeyboardEvent) => { if (e.key === 'Escape') onClose(); };\n document.addEventListener('keydown', onKey);\n return () => {\n document.body.style.overflow = '';\n document.body.style.paddingRight = '';\n document.removeEventListener('keydown', onKey);\n };\n }, [open, onClose]);\n\n if (!open) return null;\n\n return createPortal(\n <div className=\"modal-backdrop\" onClick={onClose}>\n <div\n className={['modal', `modal--${size}`].join(' ')}\n role=\"dialog\"\n aria-modal=\"true\"\n onClick={(e) => e.stopPropagation()}\n >\n {title && (\n <div className=\"modal__header\">\n <h2>{title}</h2>\n <button className=\"modal__close\" onClick={onClose} aria-label=\"Close\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\">\n <path d=\"M1 1l12 12M13 1L1 13\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" />\n </svg>\n </button>\n </div>\n )}\n <div className=\"modal__body\">{children}</div>\n {footer && <div className=\"modal__footer\">{footer}</div>}\n </div>\n </div>,\n document.body\n );\n}\n","import { useState } from 'react';\nimport './Tooltip.scss';\n\ninterface TooltipProps {\n content: React.ReactNode;\n position?: 'top' | 'bottom' | 'left' | 'right';\n children: React.ReactElement;\n}\n\nexport default function Tooltip({ content, position = 'top', children }: TooltipProps) {\n const [visible, setVisible] = useState(false);\n\n return (\n <span\n className=\"tooltip-wrapper\"\n onMouseEnter={() => setVisible(true)}\n onMouseLeave={() => setVisible(false)}\n onFocus={() => setVisible(true)}\n onBlur={() => setVisible(false)}\n >\n {children}\n <span\n className={['tooltip', `tooltip--${position}`, visible && 'tooltip--visible']\n .filter(Boolean)\n .join(' ')}\n role=\"tooltip\"\n >\n {content}\n </span>\n </span>\n );\n}\n","import './Badge.scss';\n\ninterface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {\n variant?: 'default' | 'success' | 'warning' | 'error' | 'info';\n dot?: boolean;\n}\n\nexport default function Badge({\n variant = 'default',\n dot = false,\n className,\n children,\n ...props\n}: BadgeProps) {\n return (\n <span\n className={['badge', `badge--${variant}`, className].filter(Boolean).join(' ')}\n {...props}\n >\n {dot && <span className=\"badge__dot\" />}\n {children}\n </span>\n );\n}\n","import './Alert.scss';\n\ntype AlertVariant = 'success' | 'warning' | 'error' | 'info';\n\ninterface AlertProps {\n variant?: AlertVariant;\n title?: string;\n onDismiss?: () => void;\n children: React.ReactNode;\n className?: string;\n}\n\nconst icons: Record<AlertVariant, React.ReactNode> = {\n success: (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <circle cx=\"8\" cy=\"8\" r=\"7\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M5 8l2 2 4-4\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n ),\n warning: (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path d=\"M8 2.5L14 13.5H2L8 2.5z\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinejoin=\"round\" />\n <path d=\"M8 6.5v3\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n <circle cx=\"8\" cy=\"11.5\" r=\"0.75\" fill=\"currentColor\" />\n </svg>\n ),\n error: (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <circle cx=\"8\" cy=\"8\" r=\"7\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M5.5 5.5l5 5M10.5 5.5l-5 5\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n </svg>\n ),\n info: (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <circle cx=\"8\" cy=\"8\" r=\"7\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M8 7.5V11\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n <circle cx=\"8\" cy=\"5\" r=\"0.75\" fill=\"currentColor\" />\n </svg>\n ),\n};\n\nexport default function Alert({ variant = 'info', title, onDismiss, children, className }: AlertProps) {\n return (\n <div className={['alert', `alert--${variant}`, className].filter(Boolean).join(' ')}>\n <span className=\"alert__icon\">{icons[variant]}</span>\n <div className=\"alert__content\">\n {title && <div className=\"alert__title\">{title}</div>}\n <div className=\"alert__body\">{children}</div>\n </div>\n {onDismiss && (\n <button className=\"alert__dismiss\" onClick={onDismiss} aria-label=\"Dismiss\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\">\n <path d=\"M1 1l10 10M11 1L1 11\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n </svg>\n </button>\n )}\n </div>\n );\n}\n","import { useEffect, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport './Toast.scss';\n\ntype ToastVariant = 'success' | 'warning' | 'error' | 'info';\n\ninterface ToastProps {\n open: boolean;\n variant?: ToastVariant;\n title?: string;\n onDismiss?: () => void;\n children: React.ReactNode;\n}\n\nconst icons: Record<ToastVariant, React.ReactNode> = {\n success: (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <circle cx=\"8\" cy=\"8\" r=\"7\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M5 8l2 2 4-4\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n ),\n warning: (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path d=\"M8 2.5L14 13.5H2L8 2.5z\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinejoin=\"round\" />\n <path d=\"M8 6.5v3\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n <circle cx=\"8\" cy=\"11.5\" r=\"0.75\" fill=\"currentColor\" />\n </svg>\n ),\n error: (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <circle cx=\"8\" cy=\"8\" r=\"7\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M5.5 5.5l5 5M10.5 5.5l-5 5\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n </svg>\n ),\n info: (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <circle cx=\"8\" cy=\"8\" r=\"7\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M8 7.5V11\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n <circle cx=\"8\" cy=\"5\" r=\"0.75\" fill=\"currentColor\" />\n </svg>\n ),\n};\n\nexport default function Toast({ open, variant = 'info', title, onDismiss, children }: ToastProps) {\n const [mounted, setMounted] = useState(false);\n const [visible, setVisible] = useState(false);\n\n useEffect(() => {\n if (open) {\n setMounted(true);\n const raf = requestAnimationFrame(() => requestAnimationFrame(() => setVisible(true)));\n return () => cancelAnimationFrame(raf);\n } else {\n setVisible(false);\n const t = setTimeout(() => setMounted(false), 250);\n return () => clearTimeout(t);\n }\n }, [open]);\n\n if (!mounted) return null;\n\n return createPortal(\n <div\n className={['toast', `toast--${variant}`, visible && 'toast--visible'].filter(Boolean).join(' ')}\n role=\"status\"\n >\n <span className=\"toast__icon\">{icons[variant]}</span>\n <div className=\"toast__content\">\n {title && <div className=\"toast__title\">{title}</div>}\n <div className=\"toast__body\">{children}</div>\n </div>\n {onDismiss && (\n <button className=\"toast__dismiss\" onClick={onDismiss} aria-label=\"Dismiss\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\">\n <path d=\"M1 1l10 10M11 1L1 11\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n </svg>\n </button>\n )}\n </div>,\n document.body\n );\n}\n","import './Spinner.scss';\n\ninterface SpinnerProps {\n size?: 'sm' | 'md' | 'lg';\n className?: string;\n}\n\nexport default function Spinner({ size = 'md', className }: SpinnerProps) {\n return (\n <svg\n className={['spinner', `spinner--${size}`, className].filter(Boolean).join(' ')}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n aria-label=\"Loading\"\n >\n <circle\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeDasharray=\"47 16\"\n />\n </svg>\n );\n}\n","import { createContext, useContext, useId, useRef, useState } from 'react';\nimport './Tabs.scss';\n\ninterface TabsContextValue {\n activeValue: string;\n setActiveValue: (v: string) => void;\n baseId: string;\n}\n\nconst TabsContext = createContext<TabsContextValue | null>(null);\n\nfunction useTabsContext() {\n const ctx = useContext(TabsContext);\n if (!ctx) throw new Error('Tab components must be used inside <Tabs>');\n return ctx;\n}\n\ninterface TabsProps {\n defaultValue: string;\n value?: string;\n onChange?: (value: string) => void;\n children: React.ReactNode;\n className?: string;\n}\n\nexport function Tabs({ defaultValue, value, onChange, children, className }: TabsProps) {\n const [internal, setInternal] = useState(defaultValue);\n const baseId = useId();\n const activeValue = value ?? internal;\n\n function setActiveValue(v: string) {\n if (!value) setInternal(v);\n onChange?.(v);\n }\n\n return (\n <TabsContext.Provider value={{ activeValue, setActiveValue, baseId }}>\n <div className={['tabs', className].filter(Boolean).join(' ')}>{children}</div>\n </TabsContext.Provider>\n );\n}\n\ninterface TabListProps {\n children: React.ReactNode;\n className?: string;\n}\n\nexport function TabList({ children, className }: TabListProps) {\n const listRef = useRef<HTMLDivElement>(null);\n\n function handleKeyDown(e: React.KeyboardEvent) {\n const tabs = listRef.current?.querySelectorAll<HTMLButtonElement>('[role=\"tab\"]:not([disabled])');\n if (!tabs) return;\n const arr = Array.from(tabs);\n const focused = document.activeElement as HTMLButtonElement;\n const idx = arr.indexOf(focused);\n if (idx === -1) return;\n\n if (e.key === 'ArrowRight') {\n e.preventDefault();\n arr[(idx + 1) % arr.length].focus();\n } else if (e.key === 'ArrowLeft') {\n e.preventDefault();\n arr[(idx - 1 + arr.length) % arr.length].focus();\n } else if (e.key === 'Home') {\n e.preventDefault();\n arr[0].focus();\n } else if (e.key === 'End') {\n e.preventDefault();\n arr[arr.length - 1].focus();\n }\n }\n\n return (\n <div\n ref={listRef}\n role=\"tablist\"\n className={['tabs__list', className].filter(Boolean).join(' ')}\n onKeyDown={handleKeyDown}\n >\n {children}\n </div>\n );\n}\n\ninterface TabProps {\n value: string;\n disabled?: boolean;\n children: React.ReactNode;\n className?: string;\n}\n\nexport function Tab({ value, disabled, children, className }: TabProps) {\n const { activeValue, setActiveValue, baseId } = useTabsContext();\n const isActive = activeValue === value;\n\n return (\n <button\n role=\"tab\"\n aria-selected={isActive}\n aria-controls={`${baseId}-panel-${value}`}\n id={`${baseId}-tab-${value}`}\n tabIndex={isActive ? 0 : -1}\n disabled={disabled}\n className={['tabs__tab', isActive && 'tabs__tab--active', className].filter(Boolean).join(' ')}\n onClick={() => !disabled && setActiveValue(value)}\n >\n {children}\n </button>\n );\n}\n\ninterface TabPanelProps {\n value: string;\n children: React.ReactNode;\n className?: string;\n}\n\nexport function TabPanel({ value, children, className }: TabPanelProps) {\n const { activeValue, baseId } = useTabsContext();\n if (activeValue !== value) return null;\n\n return (\n <div\n role=\"tabpanel\"\n id={`${baseId}-panel-${value}`}\n aria-labelledby={`${baseId}-tab-${value}`}\n className={['tabs__panel', className].filter(Boolean).join(' ')}\n >\n {children}\n </div>\n );\n}\n","import { useEffect, useId, useRef, useState } from 'react';\nimport './DatePicker.scss';\n\nconst DAYS = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];\nconst MONTHS = [\n 'January', 'February', 'March', 'April', 'May', 'June',\n 'July', 'August', 'September', 'October', 'November', 'December',\n];\n\nfunction isSameDay(a: Date, b: Date) {\n return a.getFullYear() === b.getFullYear() &&\n a.getMonth() === b.getMonth() &&\n a.getDate() === b.getDate();\n}\n\nfunction startOfDay(d: Date) {\n return new Date(d.getFullYear(), d.getMonth(), d.getDate());\n}\n\nfunction formatDisplay(d: Date | null) {\n if (!d) return '';\n return d.toLocaleDateString('en-GB', { day: '2-digit', month: 'short', year: 'numeric' });\n}\n\nfunction getDaysInMonth(year: number, month: number) {\n return new Date(year, month + 1, 0).getDate();\n}\n\nfunction getFirstDayOfWeek(year: number, month: number) {\n return new Date(year, month, 1).getDay();\n}\n\ninterface DatePickerProps {\n label?: string;\n value?: Date | null;\n onChange?: (date: Date) => void;\n min?: Date;\n max?: Date;\n placeholder?: string;\n disabled?: boolean;\n className?: string;\n}\n\nexport default function DatePicker({\n label,\n value,\n onChange,\n min,\n max,\n placeholder = 'Select date',\n disabled,\n className,\n}: DatePickerProps) {\n const id = useId();\n const [open, setOpen] = useState(false);\n const [cursor, setCursor] = useState(() => {\n const base = value ?? new Date();\n return { year: base.getFullYear(), month: base.getMonth() };\n });\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (!open) return;\n function handlePointerDown(e: PointerEvent) {\n if (!wrapperRef.current?.contains(e.target as Node)) setOpen(false);\n }\n document.addEventListener('pointerdown', handlePointerDown);\n return () => document.removeEventListener('pointerdown', handlePointerDown);\n }, [open]);\n\n useEffect(() => {\n if (!open) return;\n function handleKey(e: KeyboardEvent) {\n if (e.key === 'Escape') setOpen(false);\n }\n document.addEventListener('keydown', handleKey);\n return () => document.removeEventListener('keydown', handleKey);\n }, [open]);\n\n function prevMonth() {\n setCursor((c) => {\n const m = c.month === 0 ? 11 : c.month - 1;\n const y = c.month === 0 ? c.year - 1 : c.year;\n return { year: y, month: m };\n });\n }\n\n function nextMonth() {\n setCursor((c) => {\n const m = c.month === 11 ? 0 : c.month + 1;\n const y = c.month === 11 ? c.year + 1 : c.year;\n return { year: y, month: m };\n });\n }\n\n function selectDay(day: number) {\n const d = new Date(cursor.year, cursor.month, day);\n onChange?.(d);\n setOpen(false);\n }\n\n function isDisabledDay(day: number) {\n const d = startOfDay(new Date(cursor.year, cursor.month, day));\n if (min && d < startOfDay(min)) return true;\n if (max && d > startOfDay(max)) return true;\n return false;\n }\n\n const totalDays = getDaysInMonth(cursor.year, cursor.month);\n const firstDay = getFirstDayOfWeek(cursor.year, cursor.month);\n const cells: (number | null)[] = [\n ...Array<null>(firstDay).fill(null),\n ...Array.from({ length: totalDays }, (_, i) => i + 1),\n ];\n while (cells.length % 7 !== 0) cells.push(null);\n\n return (\n <div\n ref={wrapperRef}\n className={['date-picker', disabled && 'date-picker--disabled', className].filter(Boolean).join(' ')}\n >\n {label && (\n <label className=\"date-picker__label\" htmlFor={id}>\n {label}\n </label>\n )}\n <button\n id={id}\n type=\"button\"\n className={['date-picker__trigger', open && 'date-picker__trigger--open'].filter(Boolean).join(' ')}\n disabled={disabled}\n aria-haspopup=\"dialog\"\n aria-expanded={open}\n onClick={() => setOpen((o) => !o)}\n >\n <span className={value ? '' : 'date-picker__placeholder'}>\n {value ? formatDisplay(value) : placeholder}\n </span>\n <svg\n className=\"date-picker__icon\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\" />\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\" />\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\" />\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\" />\n </svg>\n </button>\n\n {open && (\n <div className=\"date-picker__popover\" role=\"dialog\" aria-label=\"Date picker\">\n <div className=\"date-picker__header\">\n <button\n type=\"button\"\n className=\"date-picker__nav\"\n onClick={prevMonth}\n aria-label=\"Previous month\"\n >\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <polyline points=\"15 18 9 12 15 6\" />\n </svg>\n </button>\n <span className=\"date-picker__month-label\">\n {MONTHS[cursor.month]} {cursor.year}\n </span>\n <button\n type=\"button\"\n className=\"date-picker__nav\"\n onClick={nextMonth}\n aria-label=\"Next month\"\n >\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n <polyline points=\"9 18 15 12 9 6\" />\n </svg>\n </button>\n </div>\n\n <div className=\"date-picker__grid\">\n {DAYS.map((d) => (\n <span key={d} className=\"date-picker__day-name\">{d}</span>\n ))}\n {cells.map((day, i) => {\n if (!day) return <span key={`empty-${i}`} />;\n const d = new Date(cursor.year, cursor.month, day);\n const selected = value ? isSameDay(d, value) : false;\n const today = isSameDay(d, new Date());\n const off = isDisabledDay(day);\n return (\n <button\n key={day}\n type=\"button\"\n disabled={off}\n aria-pressed={selected}\n aria-label={d.toLocaleDateString('en-GB', { day: 'numeric', month: 'long', year: 'numeric' })}\n className={[\n 'date-picker__day',\n selected && 'date-picker__day--selected',\n today && !selected && 'date-picker__day--today',\n off && 'date-picker__day--disabled',\n ].filter(Boolean).join(' ')}\n onClick={() => !off && selectDay(day)}\n >\n {day}\n </button>\n );\n })}\n </div>\n </div>\n )}\n </div>\n );\n}\n"],"mappings":"gJAOA,SAAwB,EAAO,CAC7B,UAAU,UACV,OAAO,KACP,YACA,WACA,GAAG,GACW,CACd,OACE,EAAA,EAAA,KAAC,SAAD,CACE,UAAW,CAAC,SAAU,WAAW,IAAW,WAAW,IAAQ,EAAU,CACtE,OAAO,QAAQ,CACf,KAAK,IAAI,CACZ,GAAI,EAEH,WACM,CAAA,CCdb,SAAwB,EAAK,CAC3B,UAAU,UACV,SACA,SACA,YACA,WACA,GAAG,GACS,CACZ,OACE,EAAA,EAAA,MAAC,MAAD,CACE,UAAW,CAAC,OAAQ,SAAS,IAAW,EAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI,CAC5E,GAAI,WAFN,CAIG,IAAU,EAAA,EAAA,KAAC,MAAD,CAAK,UAAU,wBAAgB,EAAa,CAAA,CACtD,IAAY,EAAA,EAAA,KAAC,MAAD,CAAK,U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C,CAAA,CACL,IAEN,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,6BAAf,CACG,EAAK,IAAK,IACT,EAAA,EAAA,KAAC,OAAD,CAAc,UAAU,iCAAyB,EAAS,CAA/C,EAA+C,CAC1D,CACD,EAAM,KAAK,EAAK,IAAM,CACrB,GAAI,CAAC,EAAK,OAAO,EAAA,EAAA,KAAC,OAAD,EAA2B,CAAhB,SAAS,IAAO,CAC5C,IAAM,EAAI,IAAI,KAAK,EAAO,KAAM,EAAO,MAAO,EAAI,CAC5C,EAAW,EAAQ,EAAU,EAAG,EAAM,CAAG,GACzC,EAAQ,EAAU,EAAG,IAAI,KAAO,CAChC,EAAM,EAAc,EAAI,CAC9B,OACE,EAAA,EAAA,KAAC,SAAD,CAEE,KAAK,SACL,SAAU,EACV,eAAc,EACd,aAAY,EAAE,mBAAmB,QAAS,CAAE,IAAK,UAAW,MAAO,OAAQ,KAAM,UAAW,CAAC,CAC7F,UAAW,CACT,mBACA,GAAY,6BACZ,GAAS,CAAC,GAAY,0BACtB,GAAO,6BACR,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI,CAC3B,YAAe,CAAC,GAAO,EAAU,EAAI,UAEpC,EACM,CAdF,EAcE,EAEX,CACE,GACF,GAEJ"}
|
package/dist/index.css
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
:root{--text:#6b6375;--text-h:#08060d;--bg:#fff;--border:#e5e4e7;--code-bg:#f4f3ec;--accent:#aa3bff;--accent-bg:#aa3bff1a;--accent-border:#aa3bff80;--shadow:#0000001a 0 10px 15px -3px, #0000000d 0 4px 6px -2px;--sans:system-ui, "Segoe UI", Roboto, sans-serif;--mono:ui-monospace, Consolas, monospace;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial}:root:not([data-theme=light]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--text:#9ca3af;--text-h:#f3f4f6;--bg:#16171d;--border:#2e303a;--code-bg:#1f2028;--accent:#c084fc;--accent-bg:#c084fc26;--accent-border:#c084fc80;--shadow:#0006 0 10px 15px -3px, #00000040 0 4px 6px -2px}}:root[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--text:#9ca3af;--text-h:#f3f4f6;--bg:#16171d;--border:#2e303a;--code-bg:#1f2028;--accent:#c084fc;--accent-bg:#c084fc26;--accent-border:#c084fc80;--shadow:#0006 0 10px 15px -3px, #00000040 0 4px 6px -2px}.button{font-family:var(--sans);cursor:pointer;white-space:nowrap;letter-spacing:.01em;border-radius:8px;justify-content:center;align-items:center;gap:8px;font-weight:500;transition:opacity .2s,background .2s,color .2s,border-color .2s,box-shadow .2s;display:inline-flex}.button--sm{border:1.5px solid #0000;border-radius:5px;padding:6px 14px;font-size:13px}.button--md{border:2px solid #0000;padding:9px 20px;font-size:15px}.button--lg{border:2px solid #0000;border-radius:5px;padding:12px 28px;font-size:16px}.button--primary{background:var(--accent);color:#fff}.button--primary:hover{opacity:.85}.button--secondary{background:var(--accent-bg);color:var(--accent)}.button--secondary:hover{border-color:var(--accent-border)}.button--outline{color:var(--text-h);border-color:var(--border);background:0 0}.button--outline:hover{border-color:var(--accent);color:var(--accent)}.button--ghost{color:var(--text);background:0 0}.button--ghost:hover{background:var(--accent-bg);color:var(--accent)}.button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.button:disabled{opacity:.4;cursor:not-allowed}.card{border-radius:5px;transition:box-shadow .2s,border-color .2s;overflow:hidden}.card--default{background:var(--bg);border:1px solid var(--border)}.card--elevated{background:var(--bg);border:1px solid var(--border);box-shadow:var(--shadow)}.card--outline{background:var(--bg);border:1.5px solid var(--accent-border)}.card--flat{background:var(--social-bg);border:1px solid #0000}.card__header{font-family:var(--heading);color:var(--text-h);letter-spacing:-.1px;padding:16px 20px 6px;font-size:16px;font-weight:600}.card__header+.card__body{padding-top:10px}.card__body{color:var(--text);padding:20px;font-size:15px;line-height:160%}.card__footer{align-items:center;gap:8px;padding:12px 20px;display:flex}.input-field{flex-direction:column;gap:6px;display:flex}.input-field label{color:var(--text-h);letter-spacing:.01em;font-size:14px;font-weight:500}.input-field input{border:1.5px solid var(--border);background:var(--bg);color:var(--text-h);font-family:var(--sans);box-sizing:border-box;border-radius:6px;outline:none;width:100%;transition:border-color .2s,box-shadow .2s}.input-field input::placeholder{color:var(--text);opacity:.55}.input-field input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg)}.input-field input:disabled{opacity:.5;cursor:not-allowed;background:var(--social-bg)}.input-field--sm input{padding:6px 10px;font-size:13px}.input-field--md input{padding:9px 12px;font-size:15px}.input-field--lg input{padding:12px 14px;font-size:16px}.input-field--error input{border-color:#ef4444}.input-field--error input:focus{box-shadow:0 0 0 3px #ef444426}.input-field__hint{color:var(--text);font-size:13px;line-height:140%}.input-field--error .input-field__hint{color:#ef4444}.textarea-field{flex-direction:column;gap:6px;display:flex}.textarea-field label{color:var(--text-h);letter-spacing:.01em;font-size:14px;font-weight:500}.textarea-field textarea{border:1.5px solid var(--border);background:var(--bg);color:var(--text-h);font-family:var(--sans);resize:vertical;box-sizing:border-box;border-radius:6px;outline:none;width:100%;padding:9px 12px;font-size:15px;line-height:155%;transition:border-color .2s,box-shadow .2s}.textarea-field textarea::placeholder{color:var(--text);opacity:.55}.textarea-field textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg)}.textarea-field textarea:disabled{opacity:.5;cursor:not-allowed;background:var(--social-bg);resize:none}.textarea-field--error textarea{border-color:#ef4444}.textarea-field--error textarea:focus{box-shadow:0 0 0 3px #ef444426}.textarea-field__hint{color:var(--text);font-size:13px;line-height:140%}.textarea-field--error .textarea-field__hint{color:#ef4444}.select-field{flex-direction:column;gap:6px;display:flex}.select-field label{color:var(--text-h);letter-spacing:.01em;font-size:14px;font-weight:500}.select-field__wrapper{position:relative}.select-field__wrapper:after{content:"";border-left:4px solid #0000;border-right:4px solid #0000;border-top:5px solid var(--text);pointer-events:none;width:0;height:0;position:absolute;top:50%;right:12px;transform:translateY(-50%)}.select-field select{appearance:none;border:1.5px solid var(--border);background:var(--bg);width:100%;color:var(--text-h);font-family:var(--sans);cursor:pointer;box-sizing:border-box;border-radius:6px;outline:none;transition:border-color .2s,box-shadow .2s}.select-field select:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg)}.select-field select:disabled{opacity:.5;cursor:not-allowed;background:var(--social-bg)}.select-field--sm select{padding:6px 32px 6px 10px;font-size:13px}.select-field--md select{padding:9px 36px 9px 12px;font-size:15px}.select-field--lg select{padding:12px 40px 12px 14px;font-size:16px}.select-field--error select{border-color:#ef4444}.select-field--error select:focus{box-shadow:0 0 0 3px #ef444426}.select-field__hint{color:var(--text);font-size:13px;line-height:140%}.select-field--error .select-field__hint{color:#ef4444}.toggle{cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:10px;display:inline-flex}.toggle input{opacity:0;width:0;height:0;position:absolute}.toggle__track{background:var(--border);border-radius:999px;flex-shrink:0;transition:background .2s;position:relative}.toggle__thumb{background:#fff;border-radius:50%;transition:left .15s;position:absolute;top:50%;left:3px;transform:translateY(-50%);box-shadow:0 1px 3px #0003}.toggle input:checked+.toggle__track{background:var(--accent)}.toggle input:focus-visible+.toggle__track{outline:2px solid var(--accent);outline-offset:2px}.toggle input:disabled+.toggle__track{opacity:.45;cursor:not-allowed}.toggle__label{color:var(--text-h);font-size:15px}.toggle--sm .toggle__track{width:32px;height:18px}.toggle--sm .toggle__thumb{width:12px;height:12px}.toggle--sm input:checked+.toggle__track .toggle__thumb{left:17px}.toggle--md .toggle__track{width:40px;height:22px}.toggle--md .toggle__thumb{width:16px;height:16px}.toggle--md input:checked+.toggle__track .toggle__thumb{left:21px}.toggle--lg .toggle__track{width:48px;height:26px}.toggle--lg .toggle__thumb{width:20px;height:20px}.toggle--lg input:checked+.toggle__track .toggle__thumb{left:25px}.checkbox{cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:8px;display:inline-flex}.checkbox input{opacity:0;width:0;height:0;position:absolute}.checkbox__box{border:1.5px solid var(--border);background:var(--bg);border-radius:4px;flex-shrink:0;justify-content:center;align-items:center;width:18px;height:18px;transition:background .15s,border-color .15s;display:flex}.checkbox__box:after{content:"";border:2px solid #fff;border-top:none;border-left:none;width:5px;height:9px;transition:transform .15s;transform:rotate(45deg)scale(0)translateY(-1px)}.checkbox input:checked+.checkbox__box{background:var(--accent);border-color:var(--accent)}.checkbox input:checked+.checkbox__box:after{transform:rotate(45deg)scale(1)translateY(-1px)}.checkbox input:focus-visible+.checkbox__box{outline:2px solid var(--accent);outline-offset:2px}.checkbox input:disabled+.checkbox__box{opacity:.45;cursor:not-allowed}.checkbox input:disabled~.checkbox__label{opacity:.45}.checkbox__label{color:var(--text-h);font-size:15px;line-height:140%}.radio{cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:8px;display:inline-flex}.radio input{opacity:0;width:0;height:0;position:absolute}.radio__dot{border:1.5px solid var(--border);background:var(--bg);border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:18px;height:18px;transition:border-color .15s;display:flex}.radio__dot:after{content:"";background:var(--accent);border-radius:50%;width:8px;height:8px;transition:transform .15s;transform:scale(0)}.radio input:checked+.radio__dot{border-color:var(--accent)}.radio input:checked+.radio__dot:after{transform:scale(1)}.radio input:focus-visible+.radio__dot{outline:2px solid var(--accent);outline-offset:2px}.radio input:disabled+.radio__dot{opacity:.45;cursor:not-allowed}.radio input:disabled~.radio__label{opacity:.45}.radio__label{color:var(--text-h);font-size:15px;line-height:140%}.modal-backdrop{z-index:200;box-sizing:border-box;background:#00000080;justify-content:center;align-items:center;padding:24px;display:flex;position:fixed;inset:0}.modal{background:var(--bg);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:10px;flex-direction:column;width:100%;max-height:calc(100svh - 48px);display:flex;overflow-y:auto}.modal--sm{max-width:400px}.modal--md{max-width:560px}.modal--lg{max-width:720px}.modal__header{flex-shrink:0;justify-content:space-between;align-items:center;gap:16px;padding:20px 24px 16px;display:flex}.modal__header h2{letter-spacing:-.2px;margin:0;font-size:18px}.modal__close{width:28px;height:28px;color:var(--text);cursor:pointer;background:0 0;border:none;border-radius:6px;flex-shrink:0;justify-content:center;align-items:center;transition:background .15s,color .15s;display:flex}.modal__close:hover{background:var(--accent-bg);color:var(--accent)}.modal__close:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.modal__body{color:var(--text);flex:1;padding:0 24px 24px;font-size:15px;line-height:160%}.modal__body:first-child{padding-top:24px}.modal__footer{border-top:1px solid var(--border);flex-shrink:0;justify-content:flex-end;gap:8px;padding:16px 24px;display:flex}.tooltip-wrapper{align-items:center;display:inline-flex;position:relative}.tooltip{color:#f3f4f6;white-space:nowrap;pointer-events:none;z-index:100;opacity:0;visibility:hidden;background:#1c1b22;border-radius:6px;padding:6px 10px;font-size:13px;line-height:140%;transition:opacity .15s,visibility .15s;position:absolute}.tooltip--visible{opacity:1;visibility:visible}.tooltip:after{content:"";border:5px solid #0000;position:absolute}.tooltip--top{bottom:calc(100% + 8px);left:50%;transform:translate(-50%)}.tooltip--top:after{border-top-color:#1c1b22;top:100%;left:50%;transform:translate(-50%)}.tooltip--bottom{top:calc(100% + 8px);left:50%;transform:translate(-50%)}.tooltip--bottom:after{border-bottom-color:#1c1b22;bottom:100%;left:50%;transform:translate(-50%)}.tooltip--left{top:50%;right:calc(100% + 8px);transform:translateY(-50%)}.tooltip--left:after{border-left-color:#1c1b22;top:50%;left:100%;transform:translateY(-50%)}.tooltip--right{top:50%;left:calc(100% + 8px);transform:translateY(-50%)}.tooltip--right:after{border-right-color:#1c1b22;top:50%;right:100%;transform:translateY(-50%)}.badge{white-space:nowrap;letter-spacing:.01em;border:1px solid #0000;border-radius:999px;align-items:center;gap:5px;padding:2px 8px;font-size:12px;font-weight:500;display:inline-flex}.badge__dot{background:currentColor;border-radius:50%;flex-shrink:0;width:6px;height:6px}.badge--default{background:var(--social-bg);color:var(--text-h);border-color:var(--border)}.badge--success{color:#16a34a;background:#22c55e1a;border-color:#22c55e40}:root[data-theme=dark] .badge--success{color:#4ade80;background:#22c55e26}@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .badge--success{color:#4ade80;background:#22c55e26}}.badge--warning{color:#b45309;background:#eab3081a;border-color:#eab30840}:root[data-theme=dark] .badge--warning{color:#fbbf24;background:#eab30826}@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .badge--warning{color:#fbbf24;background:#eab30826}}.badge--error{color:#dc2626;background:#ef44441a;border-color:#ef444440}:root[data-theme=dark] .badge--error{color:#f87171;background:#ef444426}@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .badge--error{color:#f87171;background:#ef444426}}.badge--info{color:#2563eb;background:#3b82f61a;border-color:#3b82f640}:root[data-theme=dark] .badge--info{color:#60a5fa;background:#3b82f626}@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .badge--info{color:#60a5fa;background:#3b82f626}}.alert{border:1px solid;border-radius:8px;align-items:flex-start;gap:12px;padding:14px 16px;display:flex}.alert__icon{flex-shrink:0;justify-content:center;align-items:center;width:16px;height:16px;margin-top:2px;display:flex}.alert__content{flex:1;min-width:0}.alert__title{margin-bottom:2px;font-size:14px;font-weight:500;line-height:140%}.alert__body{font-size:14px;line-height:150%}.alert__dismiss{cursor:pointer;color:currentColor;opacity:.6;background:0 0;border:none;border-radius:4px;flex-shrink:0;justify-content:center;align-items:center;width:24px;height:24px;margin-top:1px;padding:0;transition:opacity .15s;display:flex}.alert__dismiss:hover{opacity:1}.alert__dismiss:focus-visible{outline-offset:2px;outline:2px solid}.alert--success{color:#15803d;background:#22c55e14;border-color:#22c55e40}:root[data-theme=dark] .alert--success{color:#4ade80;background:#22c55e1f}@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .alert--success{color:#4ade80;background:#22c55e1f}}.alert--warning{color:#92400e;background:#eab30814;border-color:#eab30840}:root[data-theme=dark] .alert--warning{color:#fbbf24;background:#eab3081f}@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .alert--warning{color:#fbbf24;background:#eab3081f}}.alert--error{color:#b91c1c;background:#ef444414;border-color:#ef444440}:root[data-theme=dark] .alert--error{color:#f87171;background:#ef44441f}@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .alert--error{color:#f87171;background:#ef44441f}}.alert--info{color:#1d4ed8;background:#3b82f614;border-color:#3b82f640}:root[data-theme=dark] .alert--info{color:#60a5fa;background:#3b82f61f}@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .alert--info{color:#60a5fa;background:#3b82f61f}}.toast{z-index:300;box-shadow:var(--shadow);opacity:0;border:1px solid;border-radius:8px;align-items:flex-start;gap:12px;min-width:280px;max-width:400px;padding:14px 16px;transition:opacity .2s,transform .2s;display:flex;position:fixed;bottom:24px;right:24px;transform:translateY(8px)}.toast--visible{opacity:1;transform:translateY(0)}.toast__icon{flex-shrink:0;justify-content:center;align-items:center;width:16px;height:16px;margin-top:2px;display:flex}.toast__content{flex:1;min-width:0}.toast__title{margin-bottom:2px;font-size:14px;font-weight:500;line-height:140%}.toast__body{font-size:14px;line-height:150%}.toast__dismiss{cursor:pointer;color:currentColor;opacity:.6;background:0 0;border:none;border-radius:4px;flex-shrink:0;justify-content:center;align-items:center;width:24px;height:24px;margin-top:1px;padding:0;transition:opacity .15s;display:flex}.toast__dismiss:hover{opacity:1}.toast__dismiss:focus-visible{outline-offset:2px;outline:2px solid}.toast--success{color:#15803d;background:#22c55e14;border-color:#22c55e40}:root[data-theme=dark] .toast--success{color:#4ade80;background:#22c55e1f}@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .toast--success{color:#4ade80;background:#22c55e1f}}.toast--warning{color:#92400e;background:#eab30814;border-color:#eab30840}:root[data-theme=dark] .toast--warning{color:#fbbf24;background:#eab3081f}@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .toast--warning{color:#fbbf24;background:#eab3081f}}.toast--error{color:#b91c1c;background:#ef444414;border-color:#ef444440}:root[data-theme=dark] .toast--error{color:#f87171;background:#ef44441f}@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .toast--error{color:#f87171;background:#ef44441f}}.toast--info{color:#1d4ed8;background:#3b82f614;border-color:#3b82f640}:root[data-theme=dark] .toast--info{color:#60a5fa;background:#3b82f61f}@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .toast--info{color:#60a5fa;background:#3b82f61f}}@keyframes spinner-spin{to{transform:rotate(360deg)}}.spinner{color:var(--accent);transform-origin:50%;flex-shrink:0;animation:.75s linear infinite spinner-spin}.spinner--sm{width:16px;height:16px}.spinner--md{width:24px;height:24px}.spinner--lg{width:40px;height:40px}.tabs{flex-direction:column;gap:0;display:flex}.tabs__list{border-bottom:1px solid var(--border);gap:2px;padding-bottom:0;display:flex}.tabs__tab{color:var(--text);cursor:pointer;background:0 0;border:none;border-radius:6px 6px 0 0;outline:none;padding:9px 16px;font-size:14px;font-weight:500;transition:color .15s,background .15s;position:relative;bottom:-1px}.tabs__tab:hover:not(:disabled):not(.tabs__tab--active){color:var(--text-h);background:var(--accent-bg)}.tabs__tab:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.tabs__tab--active{color:var(--accent);border:1px solid var(--border);border-bottom-color:var(--bg);background:var(--bg)}.tabs__tab:disabled{opacity:.4;cursor:not-allowed}.tabs__panel{color:var(--text);padding:20px 0;font-size:14px;line-height:1.6;animation:.15s tabs-fade-in}@keyframes tabs-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.date-picker{flex-direction:column;gap:6px;display:inline-flex;position:relative}.date-picker--disabled{opacity:.5;pointer-events:none}.date-picker__label{color:var(--text-h);font-size:13px;font-weight:500}.date-picker__trigger{min-width:200px;color:var(--text-h);background:var(--bg);border:1px solid var(--border);cursor:pointer;border-radius:7px;justify-content:space-between;align-items:center;gap:8px;padding:9px 12px;font-size:14px;transition:border-color .15s,box-shadow .15s;display:inline-flex}.date-picker__trigger:hover{border-color:var(--accent)}.date-picker__trigger--open,.date-picker__trigger:focus-visible{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);outline:none}.date-picker__placeholder{color:var(--text);opacity:.5}.date-picker__icon{color:var(--text);opacity:.5;flex-shrink:0}.date-picker__popover{z-index:100;background:var(--bg);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:10px;width:252px;padding:14px;animation:.12s dp-in;position:absolute;top:calc(100% + 6px);left:0}.date-picker__header{justify-content:space-between;align-items:center;margin-bottom:10px;display:flex}.date-picker__month-label{color:var(--text-h);font-size:14px;font-weight:600}.date-picker__nav{cursor:pointer;width:28px;height:28px;color:var(--text);background:0 0;border:none;border-radius:5px;justify-content:center;align-items:center;transition:background .15s;display:flex}.date-picker__nav:hover{background:var(--accent-bg);color:var(--accent)}.date-picker__nav:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.date-picker__grid{grid-template-columns:repeat(7,1fr);gap:2px;display:grid}.date-picker__day-name{height:30px;color:var(--text);opacity:.45;text-transform:uppercase;letter-spacing:.04em;justify-content:center;align-items:center;font-size:11px;font-weight:600;display:flex}.date-picker__day{cursor:pointer;width:100%;height:32px;color:var(--text-h);background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;font-size:13px;transition:background .12s,color .12s;display:flex}.date-picker__day:hover:not(:disabled):not(.date-picker__day--selected){background:var(--accent-bg);color:var(--accent)}.date-picker__day:focus-visible{outline:2px solid var(--accent);outline-offset:-1px}.date-picker__day--today{color:var(--accent);font-weight:600}.date-picker__day--selected{background:var(--accent);color:#fff;font-weight:600}.date-picker__day--disabled{opacity:.3;cursor:not-allowed}@keyframes dp-in{0%{opacity:0;transform:translateY(-4px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}
|
|
2
|
+
/*$vite$:1*/
|