@n3wth/ui 0.5.1 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atoms/Tooltip/Tooltip.d.ts +22 -0
- package/dist/atoms/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/atoms/Tooltip/index.d.ts +3 -0
- package/dist/atoms/Tooltip/index.d.ts.map +1 -0
- package/dist/hooks/useToast.d.ts +30 -0
- package/dist/hooks/useToast.d.ts.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2947 -1620
- package/dist/index.js.map +1 -1
- package/dist/molecules/Dropdown/Dropdown.d.ts +64 -0
- package/dist/molecules/Dropdown/Dropdown.d.ts.map +1 -0
- package/dist/molecules/Dropdown/index.d.ts +3 -0
- package/dist/molecules/Dropdown/index.d.ts.map +1 -0
- package/dist/molecules/Modal/Modal.d.ts +64 -0
- package/dist/molecules/Modal/Modal.d.ts.map +1 -0
- package/dist/molecules/Modal/index.d.ts +3 -0
- package/dist/molecules/Modal/index.d.ts.map +1 -0
- package/dist/molecules/Tabs/Tabs.d.ts +34 -0
- package/dist/molecules/Tabs/Tabs.d.ts.map +1 -0
- package/dist/molecules/Tabs/index.d.ts +3 -0
- package/dist/molecules/Tabs/index.d.ts.map +1 -0
- package/dist/molecules/Toast/Toast.d.ts +27 -0
- package/dist/molecules/Toast/Toast.d.ts.map +1 -0
- package/dist/molecules/Toast/index.d.ts +3 -0
- package/dist/molecules/Toast/index.d.ts.map +1 -0
- package/dist/styles.css +20 -0
- package/package.json +15 -2
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ReactNode, HTMLAttributes } from 'react';
|
|
2
|
+
export interface DropdownOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface DropdownProps {
|
|
8
|
+
/** Options to display */
|
|
9
|
+
options: DropdownOption[];
|
|
10
|
+
/** Controlled value (single-select) */
|
|
11
|
+
value?: string;
|
|
12
|
+
/** Controlled values (multi-select) */
|
|
13
|
+
values?: string[];
|
|
14
|
+
/** Default value for uncontrolled single-select */
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
/** Default values for uncontrolled multi-select */
|
|
17
|
+
defaultValues?: string[];
|
|
18
|
+
/** Called when selection changes (single-select) */
|
|
19
|
+
onChange?: (value: string) => void;
|
|
20
|
+
/** Called when selection changes (multi-select) */
|
|
21
|
+
onMultiChange?: (values: string[]) => void;
|
|
22
|
+
/** Enable multi-select mode */
|
|
23
|
+
multi?: boolean;
|
|
24
|
+
/** Enable search/filter input */
|
|
25
|
+
searchable?: boolean;
|
|
26
|
+
/** Placeholder text when nothing is selected */
|
|
27
|
+
placeholder?: string;
|
|
28
|
+
/** Search input placeholder */
|
|
29
|
+
searchPlaceholder?: string;
|
|
30
|
+
/** Disabled state */
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
/** Size variant */
|
|
33
|
+
size?: 'sm' | 'md' | 'lg';
|
|
34
|
+
/** Visual variant */
|
|
35
|
+
variant?: 'default' | 'glass';
|
|
36
|
+
/** Additional class names for the trigger */
|
|
37
|
+
className?: string;
|
|
38
|
+
/** Additional class names for the menu */
|
|
39
|
+
menuClassName?: string;
|
|
40
|
+
/** Use portal rendering for overflow contexts */
|
|
41
|
+
portal?: boolean;
|
|
42
|
+
/** Children for compound API (overrides options-based rendering) */
|
|
43
|
+
children?: ReactNode;
|
|
44
|
+
}
|
|
45
|
+
export interface DropdownTriggerProps extends HTMLAttributes<HTMLButtonElement> {
|
|
46
|
+
children?: ReactNode;
|
|
47
|
+
}
|
|
48
|
+
export declare const DropdownTrigger: import('react').ForwardRefExoticComponent<DropdownTriggerProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
49
|
+
export interface DropdownMenuProps extends HTMLAttributes<HTMLUListElement> {
|
|
50
|
+
children?: ReactNode;
|
|
51
|
+
}
|
|
52
|
+
export declare const DropdownMenu: import('react').ForwardRefExoticComponent<DropdownMenuProps & import('react').RefAttributes<HTMLUListElement>>;
|
|
53
|
+
export interface DropdownItemProps extends HTMLAttributes<HTMLLIElement> {
|
|
54
|
+
value: string;
|
|
55
|
+
disabled?: boolean;
|
|
56
|
+
children?: ReactNode;
|
|
57
|
+
}
|
|
58
|
+
export declare const DropdownItem: import('react').ForwardRefExoticComponent<DropdownItemProps & import('react').RefAttributes<HTMLLIElement>>;
|
|
59
|
+
export declare const Dropdown: import('react').ForwardRefExoticComponent<DropdownProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
60
|
+
Trigger: import('react').ForwardRefExoticComponent<DropdownTriggerProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
61
|
+
Menu: import('react').ForwardRefExoticComponent<DropdownMenuProps & import('react').RefAttributes<HTMLUListElement>>;
|
|
62
|
+
Item: import('react').ForwardRefExoticComponent<DropdownItemProps & import('react').RefAttributes<HTMLLIElement>>;
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=Dropdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/molecules/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,SAAS,EACd,KAAK,cAAc,EAGpB,MAAM,OAAO,CAAA;AAQd,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,yBAAyB;IACzB,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,mDAAmD;IACnD,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IAC1C,+BAA+B;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,iCAAiC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,+BAA+B;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,mBAAmB;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACzB,qBAAqB;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;IAC7B,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,0CAA0C;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,iDAAiD;IACjD,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAsFD,MAAM,WAAW,oBAAqB,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IAC7E,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED,eAAO,MAAM,eAAe,oHA0B3B,CAAA;AAGD,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,gBAAgB,CAAC;IACzE,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED,eAAO,MAAM,YAAY,gHAoBxB,CAAA;AAGD,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,aAAa,CAAC;IACtE,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED,eAAO,MAAM,YAAY,6GA0BxB,CAAA;AAyED,eAAO,MAAM,QAAQ;;;;CAkepB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecules/Dropdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,YAAY,GACb,MAAM,YAAY,CAAA;AAEnB,YAAY,EACV,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type ModalSize = 'sm' | 'md' | 'lg' | 'full';
|
|
3
|
+
export interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'role'> {
|
|
4
|
+
/** Whether the modal is open */
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
/** Callback when modal should close */
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
/** Modal content */
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
/** Size of the modal panel */
|
|
11
|
+
size?: ModalSize;
|
|
12
|
+
/** Whether clicking the backdrop closes the modal */
|
|
13
|
+
closeOnBackdropClick?: boolean;
|
|
14
|
+
/** Whether pressing Escape closes the modal */
|
|
15
|
+
closeOnEscape?: boolean;
|
|
16
|
+
/** Accessible label for the modal (used if no Modal.Header is provided) */
|
|
17
|
+
ariaLabel?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const Modal: import('react').ForwardRefExoticComponent<ModalProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
20
|
+
export interface ModalHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export declare function ModalHeader({ children, className, ...props }: ModalHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare namespace ModalHeader {
|
|
25
|
+
var displayName: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ModalTitleProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
as?: 'h1' | 'h2' | 'h3' | 'h4';
|
|
30
|
+
}
|
|
31
|
+
export declare function ModalTitle({ children, as: Tag, className, id, ...props }: ModalTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare namespace ModalTitle {
|
|
33
|
+
var displayName: string;
|
|
34
|
+
}
|
|
35
|
+
export interface ModalDescriptionProps extends HTMLAttributes<HTMLParagraphElement> {
|
|
36
|
+
children: ReactNode;
|
|
37
|
+
}
|
|
38
|
+
export declare function ModalDescription({ children, className, id, ...props }: ModalDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare namespace ModalDescription {
|
|
40
|
+
var displayName: string;
|
|
41
|
+
}
|
|
42
|
+
export interface ModalBodyProps extends HTMLAttributes<HTMLDivElement> {
|
|
43
|
+
children: ReactNode;
|
|
44
|
+
}
|
|
45
|
+
export declare function ModalBody({ children, className, ...props }: ModalBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export declare namespace ModalBody {
|
|
47
|
+
var displayName: string;
|
|
48
|
+
}
|
|
49
|
+
export interface ModalFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
50
|
+
children: ReactNode;
|
|
51
|
+
}
|
|
52
|
+
export declare function ModalFooter({ children, className, ...props }: ModalFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
export declare namespace ModalFooter {
|
|
54
|
+
var displayName: string;
|
|
55
|
+
}
|
|
56
|
+
export interface ModalCloseButtonProps extends HTMLAttributes<HTMLButtonElement> {
|
|
57
|
+
/** Accessible label for the close button */
|
|
58
|
+
ariaLabel?: string;
|
|
59
|
+
}
|
|
60
|
+
export declare function ModalCloseButton({ ariaLabel, className, onClick, ...props }: ModalCloseButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export declare namespace ModalCloseButton {
|
|
62
|
+
var displayName: string;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=Modal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/molecules/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AAId,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAA;AAEnD,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IAC9E,gCAAgC;IAChC,MAAM,EAAE,OAAO,CAAA;IACf,uCAAuC;IACvC,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,oBAAoB;IACpB,QAAQ,EAAE,SAAS,CAAA;IACnB,8BAA8B;IAC9B,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,qDAAqD;IACrD,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,+CAA+C;IAC/C,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAYD,eAAO,MAAM,KAAK,uGA+LjB,CAAA;AAMD,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACtE,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAa9E;yBAbe,WAAW;;;AAiB3B,MAAM,WAAW,eAAgB,SAAQ,cAAc,CAAC,kBAAkB,CAAC;IACzE,QAAQ,EAAE,SAAS,CAAA;IACnB,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CAC/B;AAED,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAU,EAAE,SAAS,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAchG;yBAde,UAAU;;;AAkB1B,MAAM,WAAW,qBAAsB,SAAQ,cAAc,CAAC,oBAAoB,CAAC;IACjF,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,2CAc5F;yBAde,gBAAgB;;;AAkBhC,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,cAAc,CAAC;IACpE,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,2CAa1E;yBAbe,SAAS;;;AAiBzB,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACtE,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAe9E;yBAfe,WAAW;;;AAmB3B,MAAM,WAAW,qBAAsB,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IAC9E,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,SAAmB,EACnB,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,qBAAqB,2CA+BvB;yBApCe,gBAAgB"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Modal, ModalHeader, ModalTitle, ModalDescription, ModalBody, ModalFooter, ModalCloseButton, } from './Modal';
|
|
2
|
+
export type { ModalProps, ModalSize, ModalHeaderProps, ModalTitleProps, ModalDescriptionProps, ModalBodyProps, ModalFooterProps, ModalCloseButtonProps, } from './Modal';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecules/Modal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,gBAAgB,GACjB,MAAM,SAAS,CAAA;AAEhB,YAAY,EACV,UAAU,EACV,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { HTMLAttributes, ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
type TabsVariant = 'underline' | 'pill';
|
|
3
|
+
export interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
4
|
+
/** The controlled active tab value */
|
|
5
|
+
value?: string;
|
|
6
|
+
/** Callback when active tab changes */
|
|
7
|
+
onChange?: (value: string) => void;
|
|
8
|
+
/** The default active tab value for uncontrolled mode */
|
|
9
|
+
defaultValue?: string;
|
|
10
|
+
/** Visual variant */
|
|
11
|
+
variant?: TabsVariant;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const Tabs: import('react').ForwardRefExoticComponent<TabsProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
15
|
+
export interface TabsListProps extends HTMLAttributes<HTMLDivElement> {
|
|
16
|
+
/** Enable glass morphism background */
|
|
17
|
+
glass?: boolean;
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export declare const TabsList: import('react').ForwardRefExoticComponent<TabsListProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
21
|
+
export interface TabsTabProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
22
|
+
/** Unique value identifying this tab */
|
|
23
|
+
value: string;
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
export declare const TabsTab: import('react').ForwardRefExoticComponent<TabsTabProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
27
|
+
export interface TabsPanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
28
|
+
/** The tab value this panel corresponds to */
|
|
29
|
+
value: string;
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
}
|
|
32
|
+
export declare const TabsPanel: import('react').ForwardRefExoticComponent<TabsPanelProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=Tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/molecules/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,SAAS,EAEf,MAAM,OAAO,CAAA;AAId,KAAK,WAAW,GAAG,WAAW,GAAG,MAAM,CAAA;AAuBvC,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IACjF,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,uCAAuC;IACvC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,qBAAqB;IACrB,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,eAAO,MAAM,IAAI,sGAoChB,CAAA;AAMD,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,cAAc,CAAC;IACnE,uCAAuC;IACvC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,eAAO,MAAM,QAAQ,0GAyFpB,CAAA;AAMD,MAAM,WAAW,YAAa,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC3E,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,eAAO,MAAM,OAAO,4GAkGnB,CAAA;AAMD,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,cAAc,CAAC;IACpE,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,eAAO,MAAM,SAAS,2GAqBrB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecules/Tabs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAC3D,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type ToastVariant = 'default' | 'success' | 'error' | 'warning' | 'info';
|
|
3
|
+
export type ToastPosition = 'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center';
|
|
4
|
+
export interface ToastData {
|
|
5
|
+
id: string;
|
|
6
|
+
variant: ToastVariant;
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
duration?: number;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export interface ToastProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
13
|
+
variant?: ToastVariant;
|
|
14
|
+
title?: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
duration?: number;
|
|
17
|
+
icon?: ReactNode;
|
|
18
|
+
onDismiss?: () => void;
|
|
19
|
+
open?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare const Toast: import('react').ForwardRefExoticComponent<ToastProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
22
|
+
export interface ToastContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
23
|
+
position?: ToastPosition;
|
|
24
|
+
children?: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
export declare function ToastContainer({ position, children, className, ...props }: ToastContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
//# sourceMappingURL=Toast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/molecules/Toast/Toast.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAA;AAKd,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAA;AAE/E,MAAM,MAAM,aAAa,GACrB,WAAW,GACX,UAAU,GACV,YAAY,GACZ,cAAc,GACd,aAAa,GACb,eAAe,CAAA;AAEnB,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,YAAY,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AAED,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAC/E,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAoCD,eAAO,MAAM,KAAK,uGAiHjB,CAAA;AAID,MAAM,WAAW,mBAAoB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACzE,QAAQ,CAAC,EAAE,aAAa,CAAA;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAWD,wBAAgB,cAAc,CAAC,EAC7B,QAAsB,EACtB,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,mBAAmB,2CAgBrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecules/Toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC/C,YAAY,EACV,UAAU,EACV,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,SAAS,GACV,MAAM,SAAS,CAAA"}
|
package/dist/styles.css
CHANGED
|
@@ -637,6 +637,18 @@ body {
|
|
|
637
637
|
animation: connectionDraw 0.3s ease-out forwards;
|
|
638
638
|
}
|
|
639
639
|
|
|
640
|
+
/* Toast slide in */
|
|
641
|
+
@keyframes toastSlideIn {
|
|
642
|
+
from {
|
|
643
|
+
opacity: 0;
|
|
644
|
+
transform: translateX(16px);
|
|
645
|
+
}
|
|
646
|
+
to {
|
|
647
|
+
opacity: 1;
|
|
648
|
+
transform: translateX(0);
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
|
|
640
652
|
/* Hover preview entrance */
|
|
641
653
|
@keyframes hoverPreviewEnter {
|
|
642
654
|
from {
|
|
@@ -1205,6 +1217,14 @@ body {
|
|
|
1205
1217
|
animation: none !important;
|
|
1206
1218
|
}
|
|
1207
1219
|
|
|
1220
|
+
/* Toast - instant show/hide */
|
|
1221
|
+
[role="alert"] {
|
|
1222
|
+
animation: none !important;
|
|
1223
|
+
opacity: 1 !important;
|
|
1224
|
+
transform: none !important;
|
|
1225
|
+
transition: none !important;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1208
1228
|
/* Disable gradient animations */
|
|
1209
1229
|
.gradient-border::before {
|
|
1210
1230
|
transition: none !important;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@n3wth/ui",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "Atomic design system for Newth sites - flat, minimal, iOS-inspired",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
"demo": "vite --config vite.demo.config.ts",
|
|
25
25
|
"demo:build": "vite build --config vite.demo.config.ts",
|
|
26
26
|
"build": "tsc && vite build && node -e \"const fs=require('fs');const css=fs.readFileSync('src/styles.css','utf8').replace(/@import 'tailwindcss';\\n\\n/,'');fs.writeFileSync('dist/styles.css',css)\"",
|
|
27
|
+
"test": "vitest run",
|
|
28
|
+
"test:watch": "vitest",
|
|
27
29
|
"lint": "eslint src",
|
|
28
30
|
"prepublishOnly": "npm run build",
|
|
29
31
|
"release:patch": "npm version patch -m 'chore: bump version to %s' && npm run registry:build && git add . && git commit -m 'chore: update registry' && git push && git push --tags && gh release create v$(node -p \"require('./package.json').version\") --generate-notes",
|
|
@@ -47,18 +49,29 @@
|
|
|
47
49
|
}
|
|
48
50
|
},
|
|
49
51
|
"devDependencies": {
|
|
52
|
+
"@eslint/js": "^9.39.2",
|
|
50
53
|
"@tailwindcss/vite": "^4.1.18",
|
|
54
|
+
"@testing-library/dom": "^10.4.1",
|
|
55
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
56
|
+
"@testing-library/react": "^16.3.2",
|
|
57
|
+
"@testing-library/user-event": "^14.6.1",
|
|
51
58
|
"@types/react": "^19.0.0",
|
|
52
59
|
"@types/react-dom": "^19.0.0",
|
|
53
60
|
"@vitejs/plugin-react": "^4.3.0",
|
|
54
61
|
"eslint": "^9.39.2",
|
|
62
|
+
"eslint-plugin-react": "^7.37.5",
|
|
63
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
64
|
+
"globals": "^17.3.0",
|
|
55
65
|
"gsap": "^3.14.2",
|
|
66
|
+
"jsdom": "^28.0.0",
|
|
56
67
|
"react": "^19.2.4",
|
|
57
68
|
"react-dom": "^19.2.4",
|
|
58
69
|
"tailwindcss": "^4.1.18",
|
|
59
70
|
"typescript": "^5.6.0",
|
|
71
|
+
"typescript-eslint": "^8.54.0",
|
|
60
72
|
"vite": "^6.0.0",
|
|
61
|
-
"vite-plugin-dts": "^4.0.0"
|
|
73
|
+
"vite-plugin-dts": "^4.0.0",
|
|
74
|
+
"vitest": "^4.0.18"
|
|
62
75
|
},
|
|
63
76
|
"keywords": [
|
|
64
77
|
"design-system",
|