@noxickon/onyx 4.1.6 → 5.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/AI-README.md +467 -103
- package/dist/_internal/styles/checkbox.variants.d.ts +5 -0
- package/dist/_internal/styles/index.d.ts +3 -0
- package/dist/_internal/styles/radio.variants.d.ts +5 -0
- package/dist/_internal/styles/switch.variants.d.ts +9 -0
- package/dist/_internal/types.d.ts +1 -0
- package/dist/chunks/hooks-B58X4Fdh.js +46 -0
- package/dist/chunks/hooks-iUUmqFrq.js +7056 -0
- package/dist/chunks/ui-Bz7A98Kq.js +13 -0
- package/dist/chunks/ui-CezxuKW0.js +22994 -0
- package/dist/contexts/contexts.cjs.js +2 -2
- package/dist/contexts/contexts.es.js +55 -55
- package/dist/forms/Checkbox/Checkbox.stories.d.ts +10 -3
- package/dist/forms/Checkbox/index.d.ts +3 -3
- package/dist/forms/Checkbox/src/Checkbox.d.ts +1 -1
- package/dist/forms/Checkbox/src/Checkbox.types.d.ts +11 -4
- package/dist/forms/Checkbox/src/CheckboxGroup.d.ts +1 -1
- package/dist/forms/Checkbox/src/CheckboxGroupItem.d.ts +1 -1
- package/dist/forms/Checkbox/src/context/CheckboxGroupContext.types.d.ts +5 -2
- package/dist/forms/Input/Date/src/useDateInput.d.ts +2 -2
- package/dist/forms/Input/Number/src/Number.types.d.ts +4 -4
- package/dist/forms/Input/Number/src/context/NumberContext.types.d.ts +2 -2
- package/dist/forms/Input/Time/src/useTimeInput.d.ts +2 -2
- package/dist/forms/Radio/Radio.stories.d.ts +14 -3
- package/dist/forms/Radio/index.d.ts +2 -2
- package/dist/forms/Radio/src/Radio.types.d.ts +9 -7
- package/dist/forms/Radio/src/RadioGroup.d.ts +1 -1
- package/dist/forms/Radio/src/RadioGroupItem.d.ts +1 -1
- package/dist/forms/Radio/src/context/RadioGroupContext.types.d.ts +5 -2
- package/dist/forms/Select/Select.stories.d.ts +53 -4
- package/dist/forms/Select/index.d.ts +1 -1
- package/dist/forms/Select/src/Select.d.ts +1 -1
- package/dist/forms/Select/src/Select.types.d.ts +17 -5
- package/dist/forms/Switch/Switch.stories.d.ts +1 -0
- package/dist/forms/Switch/src/Switch.d.ts +1 -1
- package/dist/forms/Switch/src/Switch.types.d.ts +2 -0
- package/dist/hooks/hooks.cjs.js +1 -1
- package/dist/hooks/hooks.es.js +11 -10
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useControllableState/src/useControllableState.types.d.ts +3 -6
- package/dist/hooks/useSort/UseSort.stories.d.ts +6 -0
- package/dist/hooks/useSort/index.d.ts +2 -0
- package/dist/hooks/useSort/src/useSort.d.ts +3 -0
- package/dist/hooks/useSort/src/useSort.types.d.ts +20 -0
- package/dist/hooks/useSort/test/useSort.test.d.ts +1 -0
- package/dist/layouts/layouts.cjs.js +1 -1
- package/dist/layouts/layouts.es.js +31 -32
- package/dist/legacy/index.d.ts +1 -0
- package/dist/legacy/legacy.cjs.js +1 -1
- package/dist/legacy/legacy.es.js +766 -604
- package/dist/legacy/ui/Floating/Floating.stories.d.ts +1 -1
- package/dist/legacy/ui/Floating/index.d.ts +1 -1
- package/dist/legacy/ui/Floating/src/Floating.types.d.ts +1 -1
- package/dist/legacy/ui/Floating/src/FloatingTrigger.d.ts +1 -1
- package/dist/legacy/ui/Toast/Toast.stories.d.ts +9 -0
- package/dist/legacy/ui/Toast/index.d.ts +5 -0
- package/dist/legacy/ui/Toast/src/Toast.d.ts +2 -0
- package/dist/legacy/ui/Toast/src/Toast.types.d.ts +29 -0
- package/dist/legacy/ui/Toast/src/ToastItem.d.ts +2 -0
- package/dist/legacy/ui/Toast/src/context/ToastContext.d.ts +2 -0
- package/dist/legacy/ui/Toast/src/context/ToastContext.types.d.ts +28 -0
- package/dist/legacy/ui/Toast/src/context/ToastProvider.d.ts +2 -0
- package/dist/legacy/ui/Toast/src/context/useToast.d.ts +2 -0
- package/dist/legacy/ui/Toast/test/Toast.test.d.ts +1 -0
- package/dist/onyx.cjs.js +1 -1
- package/dist/onyx.es.js +19 -18
- package/dist/pages/pages.cjs.js +1 -1
- package/dist/pages/pages.es.js +37 -37
- package/dist/routes/routes.cjs.js +1 -1
- package/dist/routes/routes.es.js +3 -3
- package/dist/styles.css +1 -0
- package/dist/ui/Breadcrumb/Breadcrumb.stories.d.ts +1 -1
- package/dist/ui/Breadcrumb/index.d.ts +1 -1
- package/dist/ui/Breadcrumb/src/Breadcrumb.types.d.ts +1 -1
- package/dist/ui/Breadcrumb/src/BreadcrumbLink.d.ts +1 -1
- package/dist/ui/Button/Button.stories.d.ts +2 -2
- package/dist/ui/Button/src/Button.d.ts +1 -1
- package/dist/ui/Button/src/Button.types.d.ts +1 -1
- package/dist/ui/Dropdown/Dropdown.stories.d.ts +23 -3
- package/dist/ui/Dropdown/index.d.ts +8 -2
- package/dist/ui/Dropdown/src/Dropdown.types.d.ts +31 -4
- package/dist/ui/Dropdown/src/DropdownCheckboxItem.d.ts +2 -0
- package/dist/ui/Dropdown/src/DropdownGroup.d.ts +2 -0
- package/dist/ui/Dropdown/src/DropdownRadioGroup.d.ts +2 -0
- package/dist/ui/Dropdown/src/DropdownRadioItem.d.ts +2 -0
- package/dist/ui/Dropdown/src/DropdownSubMenu.d.ts +2 -0
- package/dist/ui/Dropdown/src/DropdownSubMenuContent.d.ts +2 -0
- package/dist/ui/Dropdown/src/DropdownSubMenuTrigger.d.ts +2 -0
- package/dist/ui/Dropdown/src/DropdownTrigger.d.ts +1 -1
- package/dist/ui/Dropdown/src/context/DropdownContext.types.d.ts +2 -0
- package/dist/ui/Dropdown/src/context/DropdownRadioContext.d.ts +2 -0
- package/dist/ui/Dropdown/src/context/DropdownRadioContext.types.d.ts +5 -0
- package/dist/ui/Dropdown/src/context/DropdownSubMenuContext.d.ts +2 -0
- package/dist/ui/Dropdown/src/context/DropdownSubMenuContext.types.d.ts +14 -0
- package/dist/ui/Dropdown/src/context/useDropdownRadioContext.d.ts +1 -0
- package/dist/ui/Dropdown/src/context/useDropdownSubMenuContext.d.ts +1 -0
- package/dist/ui/HoverCard/HoverCard.stories.d.ts +1 -1
- package/dist/ui/HoverCard/index.d.ts +1 -1
- package/dist/ui/HoverCard/src/HoverCard.types.d.ts +1 -1
- package/dist/ui/HoverCard/src/HoverCardTrigger.d.ts +1 -1
- package/dist/ui/Link/Link.stories.d.ts +1 -1
- package/dist/ui/Link/src/Link.d.ts +1 -1
- package/dist/ui/Link/src/Link.types.d.ts +1 -1
- package/dist/ui/Pagination/Pagination.stories.d.ts +3 -3
- package/dist/ui/Pagination/index.d.ts +3 -3
- package/dist/ui/Pagination/src/Pagination.types.d.ts +3 -3
- package/dist/ui/Pagination/src/PaginationLink.d.ts +1 -1
- package/dist/ui/Pagination/src/PaginationNext.d.ts +1 -1
- package/dist/ui/Pagination/src/PaginationPrevious.d.ts +1 -1
- package/dist/ui/Popover/Popover.stories.d.ts +1 -1
- package/dist/ui/Popover/index.d.ts +1 -1
- package/dist/ui/Popover/src/Popover.types.d.ts +1 -1
- package/dist/ui/Popover/src/PopoverTrigger.d.ts +1 -1
- package/dist/ui/Popper/index.d.ts +1 -1
- package/dist/ui/Popper/src/Popper.types.d.ts +1 -1
- package/dist/ui/Popper/src/PopperAnchor.d.ts +1 -1
- package/dist/ui/Table/Table.stories.d.ts +7 -4
- package/dist/ui/Table/index.d.ts +3 -3
- package/dist/ui/Table/src/Table.d.ts +1 -1
- package/dist/ui/Table/src/Table.types.d.ts +8 -0
- package/dist/ui/Table/src/TableHead.d.ts +1 -1
- package/dist/ui/Table/src/TableRow.d.ts +1 -1
- package/dist/ui/Table/src/context/TableContext.types.d.ts +6 -0
- package/dist/ui/Toast/Toast.stories.d.ts +4 -2
- package/dist/ui/Toast/index.d.ts +1 -1
- package/dist/ui/Toast/src/Toast.d.ts +2 -2
- package/dist/ui/Toast/src/Toast.types.d.ts +23 -23
- package/dist/ui/Toast/src/context/ToastContext.types.d.ts +15 -23
- package/dist/ui/Toast/src/context/ToastProvider.d.ts +2 -2
- package/dist/ui/Toast/src/context/useToast.d.ts +2 -1
- package/dist/ui.css +1 -1
- package/dist/utils/utils.cjs.js +1 -1
- package/dist/utils/utils.es.js +6 -6
- package/package.json +17 -16
- package/dist/chunks/hooks-BMXCuU2h.js +0 -7318
- package/dist/chunks/hooks-H39lCrRt.js +0 -31
- package/dist/chunks/ui-BBpe54MX.js +0 -9
- package/dist/chunks/ui-DaY9hD0b.js +0 -20924
- package/dist/ui/Dropdown/src/DropdownLabel.d.ts +0 -2
- package/dist/ui/Toast/src/ToastItem.d.ts +0 -2
|
@@ -20,7 +20,7 @@ export interface OxDropdownContentProps extends ComponentPropsWithRef<'div'> {
|
|
|
20
20
|
}
|
|
21
21
|
export interface OxDropdownTriggerProps extends ComponentPropsWithRef<'button'> {
|
|
22
22
|
animateIcon?: boolean;
|
|
23
|
-
|
|
23
|
+
asSlot?: boolean;
|
|
24
24
|
children: ReactNode;
|
|
25
25
|
hideIcon?: boolean;
|
|
26
26
|
icon?: LucideIcon;
|
|
@@ -30,9 +30,6 @@ export interface OxDropdownTriggerProps extends ComponentPropsWithRef<'button'>
|
|
|
30
30
|
export interface OxDropdownBodyProps extends ComponentPropsWithRef<'ul'> {
|
|
31
31
|
children: ReactNode;
|
|
32
32
|
}
|
|
33
|
-
export interface OxDropdownLabelProps extends ComponentPropsWithRef<'div'> {
|
|
34
|
-
children: ReactNode;
|
|
35
|
-
}
|
|
36
33
|
export type OxDropdownItemLinkProps = ComponentPropsWithRef<'a'> & {
|
|
37
34
|
disabled?: boolean;
|
|
38
35
|
href: string;
|
|
@@ -50,3 +47,33 @@ export interface OxDropdownHeaderProps extends ComponentPropsWithRef<'div'> {
|
|
|
50
47
|
export interface OxDropdownFooterProps extends ComponentPropsWithRef<'div'> {
|
|
51
48
|
children: ReactNode;
|
|
52
49
|
}
|
|
50
|
+
export interface OxDropdownCheckboxItemProps extends Omit<ComponentPropsWithRef<'button'>, 'type' | 'onChange'> {
|
|
51
|
+
checked?: boolean;
|
|
52
|
+
closeOnSelect?: boolean;
|
|
53
|
+
defaultChecked?: boolean;
|
|
54
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
55
|
+
}
|
|
56
|
+
export interface OxDropdownRadioGroupProps extends Omit<ComponentPropsWithRef<'div'>, 'onChange'> {
|
|
57
|
+
children: ReactNode;
|
|
58
|
+
closeOnSelect?: boolean;
|
|
59
|
+
defaultValue?: string;
|
|
60
|
+
onValueChange?: (value: string) => void;
|
|
61
|
+
value?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface OxDropdownRadioItemProps extends Omit<ComponentPropsWithRef<'button'>, 'type' | 'value'> {
|
|
64
|
+
value: string;
|
|
65
|
+
}
|
|
66
|
+
export interface OxDropdownGroupProps extends ComponentPropsWithRef<'div'> {
|
|
67
|
+
children: ReactNode;
|
|
68
|
+
label?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface OxDropdownSubMenuProps {
|
|
71
|
+
children: ReactNode;
|
|
72
|
+
}
|
|
73
|
+
export interface OxDropdownSubMenuTriggerProps extends Omit<ComponentPropsWithRef<'button'>, 'type'> {
|
|
74
|
+
disabled?: boolean;
|
|
75
|
+
}
|
|
76
|
+
export interface OxDropdownSubMenuContentProps extends ComponentPropsWithRef<'div'> {
|
|
77
|
+
children: ReactNode;
|
|
78
|
+
className?: string;
|
|
79
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { OxDropdownCheckboxItemProps } from './Dropdown.types';
|
|
2
|
+
export declare const OxDropdownCheckboxItem: ({ checked: controlledChecked, children, className, closeOnSelect, defaultChecked, disabled, onCheckedChange, onClick, ...restProps }: OxDropdownCheckboxItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { OxDropdownRadioGroupProps } from './Dropdown.types';
|
|
2
|
+
export declare const OxDropdownRadioGroup: ({ children, className, closeOnSelect, defaultValue, onValueChange, value: controlledValue, ...restProps }: OxDropdownRadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OxDropdownTriggerProps } from './Dropdown.types';
|
|
2
|
-
export declare const OxDropdownTrigger: ({ animateIcon,
|
|
2
|
+
export declare const OxDropdownTrigger: ({ animateIcon, asSlot, children, className, disabled: propsDisabled, hideIcon, icon, size, variant, ...domProps }: OxDropdownTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
1
2
|
import { OxPopperAlign, OxPopperSide } from '../../../Popper';
|
|
2
3
|
export interface DropdownContextProps {
|
|
3
4
|
align: OxPopperAlign;
|
|
4
5
|
close: () => void;
|
|
6
|
+
contentRef: RefObject<HTMLDivElement | null>;
|
|
5
7
|
disabled: boolean;
|
|
6
8
|
isClosing: boolean;
|
|
7
9
|
isVisible: boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
export interface DropdownSubMenuContextProps {
|
|
3
|
+
cancelClose: () => void;
|
|
4
|
+
close: () => void;
|
|
5
|
+
contentRef: RefObject<HTMLDivElement | null>;
|
|
6
|
+
isClosing: boolean;
|
|
7
|
+
isVisible: boolean;
|
|
8
|
+
open: boolean;
|
|
9
|
+
openedViaKeyboard: boolean;
|
|
10
|
+
scheduleClose: () => void;
|
|
11
|
+
setOpen: (open: boolean, viaKeyboard?: boolean) => void;
|
|
12
|
+
setTriggerElement: (element: HTMLButtonElement | null) => void;
|
|
13
|
+
triggerElement: HTMLButtonElement | null;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useDropdownRadioContext(): import('./DropdownRadioContext.types').DropdownRadioContextProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useDropdownSubMenuContext: () => import('./DropdownSubMenuContext.types').DropdownSubMenuContextProps;
|
|
@@ -4,7 +4,7 @@ declare const meta: {
|
|
|
4
4
|
title: string;
|
|
5
5
|
component: (({ align, children, closeDelay, defaultOpen, disabled, onOpenChange, open: controlledOpen, openDelay, side, }: import('..').OxHoverCardProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
6
6
|
Content: ({ children, className, forceMount, onPointerEnter, onPointerLeave, ...domProps }: import('..').OxHoverCardContentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
-
Trigger: ({
|
|
7
|
+
Trigger: ({ asSlot, children, className, onPointerEnter, onPointerLeave, ...domProps }: import('..').OxHoverCardTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
};
|
|
9
9
|
subcomponents: {
|
|
10
10
|
'OxHoverCard.Trigger': ComponentType<unknown>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type * from './src/HoverCard.types';
|
|
2
2
|
export declare const OxHoverCard: (({ align, children, closeDelay, defaultOpen, disabled, onOpenChange, open: controlledOpen, openDelay, side, }: import('.').OxHoverCardProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
3
3
|
Content: ({ children, className, forceMount, onPointerEnter, onPointerLeave, ...domProps }: import('.').OxHoverCardContentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
-
Trigger: ({
|
|
4
|
+
Trigger: ({ asSlot, children, className, onPointerEnter, onPointerLeave, ...domProps }: import('.').OxHoverCardTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
};
|
|
@@ -12,7 +12,7 @@ export interface OxHoverCardProps {
|
|
|
12
12
|
side?: OxPopperSide;
|
|
13
13
|
}
|
|
14
14
|
export interface OxHoverCardTriggerProps extends ComponentPropsWithoutRef<'div'> {
|
|
15
|
-
|
|
15
|
+
asSlot?: boolean;
|
|
16
16
|
children: ReactNode;
|
|
17
17
|
}
|
|
18
18
|
export interface OxHoverCardContentProps extends ComponentPropsWithoutRef<'div'> {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OxHoverCardTriggerProps } from './HoverCard.types';
|
|
2
|
-
export declare const OxHoverCardTrigger: ({
|
|
2
|
+
export declare const OxHoverCardTrigger: ({ asSlot, children, className, onPointerEnter, onPointerLeave, ...domProps }: OxHoverCardTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({
|
|
4
|
+
component: ({ asSlot, children, className, disabled, href, size, variant, ...domProps }: import('..').OxLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
parameters: {
|
|
6
6
|
layout: string;
|
|
7
7
|
docs: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OxLinkProps } from './Link.types';
|
|
2
|
-
export declare const OxLink: ({
|
|
2
|
+
export declare const OxLink: ({ asSlot, children, className, disabled, href, size, variant, ...domProps }: OxLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,9 +5,9 @@ declare const meta: {
|
|
|
5
5
|
component: (({ children, className, ...domProps }: import('..').OxPaginationProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
6
6
|
Ellipsis: ({ className, ...domProps }: import('..').OxPaginationEllipsisProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
Item: ({ children, className, ...domProps }: import('..').OxPaginationItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
Link: ({
|
|
9
|
-
Next: ({
|
|
10
|
-
Previous: ({
|
|
8
|
+
Link: ({ asSlot, children, className, disabled, href, isActive, ...domProps }: import('..').OxPaginationLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
Next: ({ asSlot, children, className, disabled, href, ...domProps }: import('..').OxPaginationNextProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
Previous: ({ asSlot, children, className, disabled, href, ...domProps }: import('..').OxPaginationPreviousProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
};
|
|
12
12
|
subcomponents: {
|
|
13
13
|
'OxPagination.Item': ComponentType<unknown>;
|
|
@@ -2,7 +2,7 @@ export type * from './src/Pagination.types';
|
|
|
2
2
|
export declare const OxPagination: (({ children, className, ...domProps }: import('.').OxPaginationProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
3
3
|
Ellipsis: ({ className, ...domProps }: import('.').OxPaginationEllipsisProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
Item: ({ children, className, ...domProps }: import('.').OxPaginationItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
Link: ({
|
|
6
|
-
Next: ({
|
|
7
|
-
Previous: ({
|
|
5
|
+
Link: ({ asSlot, children, className, disabled, href, isActive, ...domProps }: import('.').OxPaginationLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
Next: ({ asSlot, children, className, disabled, href, ...domProps }: import('.').OxPaginationNextProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
Previous: ({ asSlot, children, className, disabled, href, ...domProps }: import('.').OxPaginationPreviousProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
};
|
|
@@ -7,20 +7,20 @@ export interface OxPaginationItemProps extends ComponentPropsWithRef<'li'> {
|
|
|
7
7
|
children: ReactNode;
|
|
8
8
|
}
|
|
9
9
|
export interface OxPaginationLinkProps extends ComponentPropsWithRef<'a'> {
|
|
10
|
-
|
|
10
|
+
asSlot?: boolean;
|
|
11
11
|
children: ReactNode;
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
href?: string;
|
|
14
14
|
isActive?: boolean;
|
|
15
15
|
}
|
|
16
16
|
export interface OxPaginationPreviousProps extends ComponentPropsWithRef<'a'> {
|
|
17
|
-
|
|
17
|
+
asSlot?: boolean;
|
|
18
18
|
children?: ReactNode;
|
|
19
19
|
disabled?: boolean;
|
|
20
20
|
href?: string;
|
|
21
21
|
}
|
|
22
22
|
export interface OxPaginationNextProps extends ComponentPropsWithRef<'a'> {
|
|
23
|
-
|
|
23
|
+
asSlot?: boolean;
|
|
24
24
|
children?: ReactNode;
|
|
25
25
|
disabled?: boolean;
|
|
26
26
|
href?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OxPaginationLinkProps } from './Pagination.types';
|
|
2
|
-
export declare const OxPaginationLink: ({
|
|
2
|
+
export declare const OxPaginationLink: ({ asSlot, children, className, disabled, href, isActive, ...domProps }: OxPaginationLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OxPaginationNextProps } from './Pagination.types';
|
|
2
|
-
export declare const OxPaginationNext: ({
|
|
2
|
+
export declare const OxPaginationNext: ({ asSlot, children, className, disabled, href, ...domProps }: OxPaginationNextProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OxPaginationPreviousProps } from './Pagination.types';
|
|
2
|
-
export declare const OxPaginationPrevious: ({
|
|
2
|
+
export declare const OxPaginationPrevious: ({ asSlot, children, className, disabled, href, ...domProps }: OxPaginationPreviousProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,7 +4,7 @@ declare const meta: {
|
|
|
4
4
|
title: string;
|
|
5
5
|
component: (({ align, children, closeOnOutsideClick, defaultOpen, disabled, onOpenChange, open: controlledOpen, side, }: import('..').OxPopoverProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
6
6
|
Content: ({ children, className, showCloseButton, ...domProps }: import('..').OxPopoverContentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
-
Trigger: ({
|
|
7
|
+
Trigger: ({ asSlot, children, className, onClick, ...domProps }: import('..').OxPopoverTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
};
|
|
9
9
|
subcomponents: {
|
|
10
10
|
'OxPopover.Trigger': ComponentType<unknown>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type * from './src/Popover.types';
|
|
2
2
|
export declare const OxPopover: (({ align, children, closeOnOutsideClick, defaultOpen, disabled, onOpenChange, open: controlledOpen, side, }: import('.').OxPopoverProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
3
3
|
Content: ({ children, className, showCloseButton, ...domProps }: import('.').OxPopoverContentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
-
Trigger: ({
|
|
4
|
+
Trigger: ({ asSlot, children, className, onClick, ...domProps }: import('.').OxPopoverTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
};
|
|
@@ -11,7 +11,7 @@ export interface OxPopoverProps {
|
|
|
11
11
|
side?: OxPopperSide;
|
|
12
12
|
}
|
|
13
13
|
export interface OxPopoverTriggerProps extends ComponentPropsWithoutRef<'button'> {
|
|
14
|
-
|
|
14
|
+
asSlot?: boolean;
|
|
15
15
|
children: ReactNode;
|
|
16
16
|
}
|
|
17
17
|
export interface OxPopoverContentProps extends ComponentPropsWithoutRef<'div'> {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OxPopoverTriggerProps } from './Popover.types';
|
|
2
|
-
export declare const OxPopoverTrigger: ({
|
|
2
|
+
export declare const OxPopoverTrigger: ({ asSlot, children, className, onClick, ...domProps }: OxPopoverTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ export type { Measurable, OxPopperAlign, OxPopperAnchorProps, OxPopperContentPro
|
|
|
3
3
|
export { usePopperContentContext, usePopperContext } from './src/context/usePopperContext';
|
|
4
4
|
export { usePopperState } from './src/hooks';
|
|
5
5
|
export declare const OxPopper: (({ children }: import('.').OxPopperProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
6
|
-
Anchor: ({
|
|
6
|
+
Anchor: ({ asSlot, children, virtualRef, ...domProps }: import('.').OxPopperAnchorProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
7
|
Arrow: () => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
Content: import('react').ForwardRefExoticComponent<import('.').OxPopperContentProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
9
9
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OxPopperAnchorProps } from './Popper.types';
|
|
2
|
-
export declare const OxPopperAnchor: ({
|
|
2
|
+
export declare const OxPopperAnchor: ({ asSlot, children, virtualRef, ...domProps }: OxPopperAnchorProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -2,14 +2,14 @@ import { ComponentType } from 'react';
|
|
|
2
2
|
import { StoryObj } from '@storybook/react-vite';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: (({ allRowIds, children, className, draggable, isLoading, onRowReorder, onSelectionChange, selectable, selectedRows, skeletonColumns, skeletonRows, ...domProps }: import('..').OxTableProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
5
|
+
component: (({ allRowIds, children, className, draggable, expandable, expandedRows, isLoading, onExpandChange, onRowReorder, onSelectionChange, selectable, selectedRows, skeletonColumns, skeletonRows, ...domProps }: import('..').OxTableProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
6
6
|
Body: ({ children, className, ...domProps }: import('..').OxTableBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
Cell: ({ children, className, ...domProps }: import('..').OxTableCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
Controls: ({ children, className, ...domProps }: import('..').OxTableControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
Footer: ({ children, className, ...domProps }: import('..').OxTableFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
Head: ({ children, className, ...domProps }: import('..').OxTableHeadProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
Head: ({ children, className, onSort, sortColumn, sortDirection, sortKey, ...domProps }: import('..').OxTableHeadProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
Header: ({ children, className, ...domProps }: import('..').OxTableHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
Row: ({ children, className, rowId, ...domProps }: import('..').OxTableRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
Row: ({ children, className, expandContent, rowId, ...domProps }: import('..').OxTableRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
SkeletonRow: ({ columns }: import('./src/TableSkeletonRow').OxTableSkeletonRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
};
|
|
15
15
|
subcomponents: {
|
|
@@ -76,4 +76,7 @@ export declare const WithFooter: Story;
|
|
|
76
76
|
export declare const SpannedCells: Story;
|
|
77
77
|
export declare const SelectableTable: Story;
|
|
78
78
|
export declare const DraggableTable: Story;
|
|
79
|
-
export declare const
|
|
79
|
+
export declare const SortableTable: Story;
|
|
80
|
+
export declare const ExpandableTable: Story;
|
|
81
|
+
export declare const SelectableExpandableTable: Story;
|
|
82
|
+
export declare const SortableExpandableTable: Story;
|
package/dist/ui/Table/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export * from './src/Table.types';
|
|
2
|
-
export declare const OxTable: (({ allRowIds, children, className, draggable, isLoading, onRowReorder, onSelectionChange, selectable, selectedRows, skeletonColumns, skeletonRows, ...domProps }: import('.').OxTableProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
2
|
+
export declare const OxTable: (({ allRowIds, children, className, draggable, expandable, expandedRows, isLoading, onExpandChange, onRowReorder, onSelectionChange, selectable, selectedRows, skeletonColumns, skeletonRows, ...domProps }: import('.').OxTableProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
3
3
|
Body: ({ children, className, ...domProps }: import('.').OxTableBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
Cell: ({ children, className, ...domProps }: import('.').OxTableCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
Controls: ({ children, className, ...domProps }: import('.').OxTableControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
Footer: ({ children, className, ...domProps }: import('.').OxTableFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
Head: ({ children, className, ...domProps }: import('.').OxTableHeadProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
Head: ({ children, className, onSort, sortColumn, sortDirection, sortKey, ...domProps }: import('.').OxTableHeadProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
Header: ({ children, className, ...domProps }: import('.').OxTableHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
Row: ({ children, className, rowId, ...domProps }: import('.').OxTableRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
Row: ({ children, className, expandContent, rowId, ...domProps }: import('.').OxTableRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
SkeletonRow: ({ columns }: import('./src/TableSkeletonRow').OxTableSkeletonRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OxTableProps } from './Table.types';
|
|
2
|
-
export declare const OxTable: ({ allRowIds, children, className, draggable, isLoading, onRowReorder, onSelectionChange, selectable, selectedRows, skeletonColumns, skeletonRows, ...domProps }: OxTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const OxTable: ({ allRowIds, children, className, draggable, expandable, expandedRows, isLoading, onExpandChange, onRowReorder, onSelectionChange, selectable, selectedRows, skeletonColumns, skeletonRows, ...domProps }: OxTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,10 @@ export interface OxTableProps extends ComponentPropsWithRef<'table'> {
|
|
|
3
3
|
allRowIds?: string[];
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
draggable?: boolean;
|
|
6
|
+
expandable?: boolean;
|
|
7
|
+
expandedRows?: string[];
|
|
6
8
|
isLoading?: boolean;
|
|
9
|
+
onExpandChange?: (expandedRows: string[]) => void;
|
|
7
10
|
onRowReorder?: (newOrder: string[]) => void;
|
|
8
11
|
onSelectionChange?: (selectedRows: string[]) => void;
|
|
9
12
|
selectable?: boolean;
|
|
@@ -16,9 +19,14 @@ export interface OxTableCellProps extends ComponentPropsWithoutRef<'td'> {
|
|
|
16
19
|
}
|
|
17
20
|
export interface OxTableHeadProps extends ComponentPropsWithRef<'th'> {
|
|
18
21
|
children?: ReactNode;
|
|
22
|
+
onSort?: (sortKey: string) => void;
|
|
23
|
+
sortColumn?: string;
|
|
24
|
+
sortDirection?: 'asc' | 'desc';
|
|
25
|
+
sortKey?: string;
|
|
19
26
|
}
|
|
20
27
|
export interface OxTableRowProps extends ComponentPropsWithRef<'tr'> {
|
|
21
28
|
children: ReactNode;
|
|
29
|
+
expandContent?: ReactNode;
|
|
22
30
|
rowId?: string;
|
|
23
31
|
}
|
|
24
32
|
export interface OxTableBodyProps extends ComponentPropsWithRef<'tbody'> {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OxTableHeadProps } from './Table.types';
|
|
2
|
-
export declare const OxTableHead: ({ children, className, ...domProps }: OxTableHeadProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const OxTableHead: ({ children, className, onSort, sortColumn, sortDirection, sortKey, ...domProps }: OxTableHeadProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OxTableRowProps } from './Table.types';
|
|
2
|
-
export declare const OxTableRow: ({ children, className, rowId, ...domProps }: OxTableRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const OxTableRow: ({ children, className, expandContent, rowId, ...domProps }: OxTableRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,11 +2,16 @@ export interface TableContextType {
|
|
|
2
2
|
allRowIds: string[];
|
|
3
3
|
draggable: boolean;
|
|
4
4
|
draggingRowId: string | null;
|
|
5
|
+
expandable: boolean;
|
|
6
|
+
expandedRows: string[];
|
|
7
|
+
hasControlColumn: boolean;
|
|
5
8
|
isAllSelected: boolean;
|
|
6
9
|
isDragging: (rowId: string) => boolean;
|
|
10
|
+
isExpanded: (rowId: string) => boolean;
|
|
7
11
|
isIndeterminate: boolean;
|
|
8
12
|
isLoading: boolean;
|
|
9
13
|
isSelected: (rowId: string) => boolean;
|
|
14
|
+
onExpandChange?: (expandedRows: string[]) => void;
|
|
10
15
|
onRowReorder?: (newOrder: string[]) => void;
|
|
11
16
|
onSelectionChange?: (selectedRows: string[]) => void;
|
|
12
17
|
registerRowId: (rowId: string) => void;
|
|
@@ -15,6 +20,7 @@ export interface TableContextType {
|
|
|
15
20
|
skeletonColumns: number;
|
|
16
21
|
skeletonRows: number;
|
|
17
22
|
toggleAll: () => void;
|
|
23
|
+
toggleExpand: (rowId: string) => void;
|
|
18
24
|
toggleSelection: (rowId: string) => void;
|
|
19
25
|
unregisterRowId: (rowId: string) => void;
|
|
20
26
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { OxToastProvider } from '
|
|
2
|
+
import { OxToastProvider } from './src/context/ToastProvider';
|
|
3
3
|
declare const meta: Meta<typeof OxToastProvider>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
6
|
export declare const Playground: Story;
|
|
7
7
|
export declare const BasicToasts: Story;
|
|
8
8
|
export declare const WithDescriptions: Story;
|
|
9
|
+
export declare const PromiseToasts: Story;
|
|
10
|
+
export declare const ActionButtons: Story;
|
|
9
11
|
export declare const Customization: Story;
|
|
10
12
|
export declare const Positioning: Story;
|
|
11
|
-
export declare const Stacking: Story;
|
|
12
13
|
export declare const RealWorldExamples: Story;
|
|
14
|
+
export declare const DirectImport: Story;
|
package/dist/ui/Toast/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type * from './src/Toast.types';
|
|
2
2
|
export type * from './src/context/ToastContext.types';
|
|
3
3
|
export { OxToastProvider } from './src/context/ToastProvider';
|
|
4
|
-
export { useOxToast } from './src/context/useToast';
|
|
4
|
+
export { toast, useOxToast } from './src/context/useToast';
|
|
5
5
|
export { OxToast } from './src/Toast';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const OxToast: ({
|
|
1
|
+
import { OxToastProviderProps } from './Toast.types';
|
|
2
|
+
export declare const OxToast: ({ closeButton, expand, gap, offset, position, richColors, theme, visibleToasts, }: Omit<OxToastProviderProps, "children">) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { LucideIcon } from 'lucide-react';
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
export type OxToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
4
|
+
export interface OxToastOptions {
|
|
5
|
+
action?: {
|
|
6
|
+
label: string;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
};
|
|
9
|
+
cancel?: {
|
|
10
|
+
label: string;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
};
|
|
9
13
|
description?: string;
|
|
10
14
|
duration?: number;
|
|
11
|
-
icon?: LucideIcon;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
path?: string;
|
|
15
|
-
title: string;
|
|
16
|
-
type: StatusType;
|
|
15
|
+
icon?: LucideIcon | ReactNode;
|
|
16
|
+
onAutoClose?: () => void;
|
|
17
|
+
onDismiss?: () => void;
|
|
17
18
|
}
|
|
18
|
-
export interface
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
toast: OxToastData;
|
|
19
|
+
export interface OxToastProviderProps {
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
closeButton?: boolean;
|
|
22
|
+
expand?: boolean;
|
|
23
|
+
gap?: number;
|
|
24
|
+
offset?: string | number;
|
|
25
|
+
position?: OxToastPosition;
|
|
26
|
+
richColors?: boolean;
|
|
27
|
+
theme?: 'light' | 'dark' | 'system';
|
|
28
|
+
visibleToasts?: number;
|
|
29
29
|
}
|
|
@@ -1,28 +1,20 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { ColorStyleName } from '../../../../_internal/styles';
|
|
4
|
-
import { OxToastAlign, OxToastPosition } from '../../..';
|
|
5
|
-
export interface OxToastOptions {
|
|
6
|
-
color?: ColorStyleName;
|
|
7
|
-
description?: string;
|
|
8
|
-
duration?: number;
|
|
9
|
-
icon?: LucideIcon;
|
|
10
|
-
path?: string;
|
|
11
|
-
}
|
|
2
|
+
import { OxToastOptions } from '../..';
|
|
12
3
|
export interface OxToastContextApi {
|
|
13
|
-
(title: string, options?: OxToastOptions): string;
|
|
4
|
+
(title: string, options?: OxToastOptions): string | number;
|
|
14
5
|
custom: (content: ReactNode, options?: {
|
|
15
6
|
duration?: number;
|
|
16
|
-
}) => string;
|
|
17
|
-
destructive: (title: string, options?: OxToastOptions) => string;
|
|
18
|
-
dismiss: (id?: string) => void;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
7
|
+
}) => string | number;
|
|
8
|
+
destructive: (title: string, options?: OxToastOptions) => string | number;
|
|
9
|
+
dismiss: (id?: string | number) => void;
|
|
10
|
+
error: (title: string, options?: OxToastOptions) => string | number;
|
|
11
|
+
info: (title: string, options?: OxToastOptions) => string | number;
|
|
12
|
+
loading: (title: string, options?: OxToastOptions) => string | number;
|
|
13
|
+
promise: <T>(promise: Promise<T>, messages: {
|
|
14
|
+
error: string | ((error: unknown) => string);
|
|
15
|
+
loading: string;
|
|
16
|
+
success: string | ((data: T) => string);
|
|
17
|
+
}) => Promise<T>;
|
|
18
|
+
success: (title: string, options?: OxToastOptions) => string | number;
|
|
19
|
+
warning: (title: string, options?: OxToastOptions) => string | number;
|
|
28
20
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { OxToastProviderProps } from '
|
|
2
|
-
export declare const OxToastProvider: ({
|
|
1
|
+
import { OxToastProviderProps } from '../..';
|
|
2
|
+
export declare const OxToastProvider: ({ children, closeButton, expand, gap, offset, position, richColors, theme, visibleToasts, }: OxToastProviderProps) => import("react/jsx-runtime").JSX.Element;
|