@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
|
@@ -4,7 +4,7 @@ declare const meta: {
|
|
|
4
4
|
title: string;
|
|
5
5
|
component: (({ align, animationDuration, ariaHaspopup, children, defaultOpen, disabled, hoverDelay, id: propertyId, offset, onOpenChange, open: controlledOpen, position, trigger, useAriaControls, }: import('../..').OxFloatingProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
6
6
|
Content: ({ children, className, portal, style, ...domProps }: import('../..').OxFloatingContentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
-
Trigger: ({
|
|
7
|
+
Trigger: ({ asSlot, children, className, ...domProps }: import('../..').OxFloatingTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
};
|
|
9
9
|
subcomponents: {
|
|
10
10
|
'OxFloating.Trigger': ComponentType<unknown>;
|
|
@@ -4,5 +4,5 @@ export { OxFloatingContext } from './src/context/FloatingContext';
|
|
|
4
4
|
export { useOxFloatingContext } from './src/context/useFloatingContext';
|
|
5
5
|
export declare const OxFloating: (({ align, animationDuration, ariaHaspopup, children, defaultOpen, disabled, hoverDelay, id: propertyId, offset, onOpenChange, open: controlledOpen, position, trigger, useAriaControls, }: import('.').OxFloatingProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
6
6
|
Content: ({ children, className, portal, style, ...domProps }: import('.').OxFloatingContentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
-
Trigger: ({
|
|
7
|
+
Trigger: ({ asSlot, children, className, ...domProps }: import('.').OxFloatingTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
};
|
|
@@ -20,7 +20,7 @@ export interface OxFloatingProps {
|
|
|
20
20
|
useAriaControls?: boolean;
|
|
21
21
|
}
|
|
22
22
|
export interface OxFloatingTriggerProps extends ComponentPropsWithRef<'div'> {
|
|
23
|
-
|
|
23
|
+
asSlot?: boolean;
|
|
24
24
|
children: ReactNode;
|
|
25
25
|
}
|
|
26
26
|
export interface OxFloatingContentProps extends ComponentPropsWithoutRef<'div'> {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OxFloatingTriggerProps } from './Floating.types';
|
|
2
|
-
export declare const OxFloatingTrigger: ({
|
|
2
|
+
export declare const OxFloatingTrigger: ({ asSlot, children, className, ...domProps }: OxFloatingTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { OxLegacyToastProvider } from './src/context/ToastProvider';
|
|
3
|
+
declare const meta: Meta<typeof OxLegacyToastProvider>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Playground: Story;
|
|
7
|
+
export declare const BasicToasts: Story;
|
|
8
|
+
export declare const Customization: Story;
|
|
9
|
+
export declare const RealWorldExamples: Story;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { OxLegacyToastProvider } from './src/context/ToastProvider';
|
|
2
|
+
export { useOxLegacyToast } from './src/context/useToast';
|
|
3
|
+
export { OxLegacyToast } from './src/Toast';
|
|
4
|
+
export type * from './src/Toast.types';
|
|
5
|
+
export type * from './src/context/ToastContext.types';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
import { ColorStyleName, StatusType } from '../../../../_internal/styles';
|
|
4
|
+
export type OxLegacyToastAlign = 'left' | 'center' | 'right';
|
|
5
|
+
export type OxLegacyToastPosition = 'top' | 'bottom';
|
|
6
|
+
export interface OxLegacyToastData {
|
|
7
|
+
color?: ColorStyleName;
|
|
8
|
+
customContent?: ReactNode;
|
|
9
|
+
description?: string;
|
|
10
|
+
duration?: number;
|
|
11
|
+
icon?: LucideIcon;
|
|
12
|
+
id: string;
|
|
13
|
+
isRemoving?: boolean;
|
|
14
|
+
path?: string;
|
|
15
|
+
title: string;
|
|
16
|
+
type: StatusType;
|
|
17
|
+
}
|
|
18
|
+
export interface OxLegacyToastProps {
|
|
19
|
+
align: OxLegacyToastAlign;
|
|
20
|
+
onRemove: (id: string) => void;
|
|
21
|
+
position: OxLegacyToastPosition;
|
|
22
|
+
toasts: OxLegacyToastData[];
|
|
23
|
+
}
|
|
24
|
+
export interface OxLegacyToastItemProps {
|
|
25
|
+
index: number;
|
|
26
|
+
onRemove: (id: string) => void;
|
|
27
|
+
position: OxLegacyToastPosition;
|
|
28
|
+
toast: OxLegacyToastData;
|
|
29
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
import { ColorStyleName } from '../../../../../_internal/styles';
|
|
4
|
+
import { OxLegacyToastAlign, OxLegacyToastPosition } from '../..';
|
|
5
|
+
export interface OxLegacyToastOptions {
|
|
6
|
+
color?: ColorStyleName;
|
|
7
|
+
description?: string;
|
|
8
|
+
duration?: number;
|
|
9
|
+
icon?: LucideIcon;
|
|
10
|
+
path?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface OxLegacyToastContextApi {
|
|
13
|
+
(title: string, options?: OxLegacyToastOptions): string;
|
|
14
|
+
custom: (content: ReactNode, options?: {
|
|
15
|
+
duration?: number;
|
|
16
|
+
}) => string;
|
|
17
|
+
destructive: (title: string, options?: OxLegacyToastOptions) => string;
|
|
18
|
+
dismiss: (id?: string) => void;
|
|
19
|
+
info: (title: string, options?: OxLegacyToastOptions) => string;
|
|
20
|
+
success: (title: string, options?: OxLegacyToastOptions) => string;
|
|
21
|
+
warning: (title: string, options?: OxLegacyToastOptions) => string;
|
|
22
|
+
}
|
|
23
|
+
export interface OxLegacyToastProviderProps {
|
|
24
|
+
align?: OxLegacyToastAlign;
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
maxToasts?: number;
|
|
27
|
+
position?: OxLegacyToastPosition;
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/onyx.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./chunks/ui-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./chunks/ui-Bz7A98Kq.js"),e=require("./chunks/hooks-B58X4Fdh.js");exports.OxAccordion=x.OxAccordion;exports.OxAlert=x.OxAlert;exports.OxAspectRatio=x.OxAspectRatio;exports.OxAvatar=x.OxAvatar;exports.OxBadge=x.OxBadge;exports.OxBreadcrumb=x.OxBreadcrumb;exports.OxButton=x.OxButton;exports.OxCalendar=x.OxCalendar;exports.OxCard=x.OxCard;exports.OxCheckbox=x.OxCheckbox;exports.OxCombobox=x.OxCombobox;exports.OxDateInput=x.OxDateInput;exports.OxDescription=x.OxDescription;exports.OxDescriptionList=x.OxDescriptionList;exports.OxDialog=x.OxDialog;exports.OxDndContext=x.OxDndContext;exports.OxDraggable=x.OxDraggable;exports.OxDrawer=x.OxDrawer;exports.OxDropdown=x.OxDropdown;exports.OxDroppable=x.OxDroppable;exports.OxEndlessList=x.OxEndlessList;exports.OxError=x.OxError;exports.OxFileUpload=x.OxFileUpload;exports.OxForm=x.OxForm;exports.OxHeading=x.OxHeading;exports.OxHoverCard=x.OxHoverCard;exports.OxIcon=x.OxIcon;exports.OxImage=x.OxImage;exports.OxJsonField=x.OxJsonField;exports.OxKanban=x.OxKanban;exports.OxLabel=x.OxLabel;exports.OxLegend=x.OxLegend;exports.OxLink=x.OxLink;exports.OxMasonry=x.OxMasonry;exports.OxNotifications=x.OxNotifications;exports.OxNumberInput=x.OxNumberInput;exports.OxOtpInput=x.OxOtpInput;exports.OxPageOutline=x.OxPageOutline;exports.OxPagination=x.OxPagination;exports.OxPopover=x.OxPopover;exports.OxPopper=x.OxPopper;exports.OxProgress=x.OxProgress;exports.OxRadio=x.OxRadio;exports.OxSelect=x.OxSelect;exports.OxSeparator=x.OxSeparator;exports.OxSkeleton=x.OxSkeleton;exports.OxSlider=x.OxSlider;exports.OxSortableList=x.OxSortableList;exports.OxSpinner=x.OxSpinner;exports.OxStatusDisplay=x.OxStatusDisplay;exports.OxStepper=x.OxStepper;exports.OxSwitch=x.OxSwitch;exports.OxTable=x.OxTable;exports.OxTabs=x.OxTabs;exports.OxTag=x.OxTag;exports.OxTextInput=x.OxTextInput;exports.OxTextarea=x.OxTextarea;exports.OxThemeSwitcher=x.OxThemeSwitcher;exports.OxTimeInput=x.OxTimeInput;exports.OxTimeline=x.OxTimeline;exports.OxToast=x.OxToast;exports.OxToastProvider=x.OxToastProvider;exports.OxToggle=x.OxToggle;exports.OxTooltip=x.OxTooltip;exports.OxTooltipProvider=x.OxTooltipProvider;exports.toast=x.toast;exports.useDndContext=x.useDndContext;exports.useOxToast=x.useOxToast;exports.useOxTooltipContext=x.useOxTooltipContext;exports.usePopperContentContext=x.usePopperContentContext;exports.usePopperContext=x.usePopperContext;exports.usePopperState=e.usePopperState;
|
package/dist/onyx.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { O as x,
|
|
2
|
-
import {
|
|
1
|
+
import { O as x, k as O, l as e, n as o, q as t, r, t as n, u as i, v as p, w as l, x as d, y as u, z as T, A as g, B as b, C as c, D as C, E as D, F as S, G as m, H as P, I, J as L, K as v, L as h, M as k, N as w, P as A, Q as f, R as B, S as F, T as y, U as E, V as H, W as N, X as R, Y as q, Z as J, _ as K, $ as M, a0 as U, a1 as j, a2 as z, a3 as G, a4 as Q, a5 as V, a6 as W, a7 as X, a8 as Y, a9 as Z, aa as _, ab as $, ac as aa, ad as sa, ae as xa, af as Oa, ag as ea, ah as oa, ai as ta, aj as ra, ak as na, al as ia, am as pa, an as la, ao as da, ap as ua, aq as Ta, ar as ga, as as ba, at as ca, au as Ca } from "./chunks/ui-CezxuKW0.js";
|
|
2
|
+
import { a as Sa } from "./chunks/hooks-iUUmqFrq.js";
|
|
3
3
|
export {
|
|
4
4
|
x as OxAccordion,
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
O as OxAlert,
|
|
6
|
+
e as OxAspectRatio,
|
|
7
7
|
o as OxAvatar,
|
|
8
8
|
t as OxBadge,
|
|
9
9
|
r as OxBreadcrumb,
|
|
@@ -14,9 +14,9 @@ export {
|
|
|
14
14
|
d as OxCombobox,
|
|
15
15
|
u as OxDateInput,
|
|
16
16
|
T as OxDescription,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
g as OxDescriptionList,
|
|
18
|
+
b as OxDialog,
|
|
19
|
+
c as OxDndContext,
|
|
20
20
|
C as OxDraggable,
|
|
21
21
|
D as OxDrawer,
|
|
22
22
|
S as OxDropdown,
|
|
@@ -25,11 +25,11 @@ export {
|
|
|
25
25
|
I as OxError,
|
|
26
26
|
L as OxFileUpload,
|
|
27
27
|
v as OxForm,
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
h as OxHeading,
|
|
29
|
+
k as OxHoverCard,
|
|
30
30
|
w as OxIcon,
|
|
31
31
|
A as OxImage,
|
|
32
|
-
|
|
32
|
+
f as OxJsonField,
|
|
33
33
|
B as OxKanban,
|
|
34
34
|
F as OxLabel,
|
|
35
35
|
y as OxLegend,
|
|
@@ -37,12 +37,12 @@ export {
|
|
|
37
37
|
H as OxMasonry,
|
|
38
38
|
N as OxNotifications,
|
|
39
39
|
R as OxNumberInput,
|
|
40
|
-
|
|
40
|
+
q as OxOtpInput,
|
|
41
41
|
J as OxPageOutline,
|
|
42
42
|
K as OxPagination,
|
|
43
43
|
M as OxPopover,
|
|
44
44
|
U as OxPopper,
|
|
45
|
-
|
|
45
|
+
j as OxProgress,
|
|
46
46
|
z as OxRadio,
|
|
47
47
|
G as OxSelect,
|
|
48
48
|
Q as OxSeparator,
|
|
@@ -56,8 +56,8 @@ export {
|
|
|
56
56
|
aa as OxTable,
|
|
57
57
|
sa as OxTabs,
|
|
58
58
|
xa as OxTag,
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
Oa as OxTextInput,
|
|
60
|
+
ea as OxTextarea,
|
|
61
61
|
oa as OxThemeSwitcher,
|
|
62
62
|
ta as OxTimeInput,
|
|
63
63
|
ra as OxTimeline,
|
|
@@ -66,10 +66,11 @@ export {
|
|
|
66
66
|
pa as OxToggle,
|
|
67
67
|
la as OxTooltip,
|
|
68
68
|
da as OxTooltipProvider,
|
|
69
|
-
ua as
|
|
70
|
-
Ta as
|
|
69
|
+
ua as toast,
|
|
70
|
+
Ta as useDndContext,
|
|
71
|
+
ga as useOxToast,
|
|
71
72
|
ba as useOxTooltipContext,
|
|
72
73
|
ca as usePopperContentContext,
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
Ca as usePopperContext,
|
|
75
|
+
Sa as usePopperState
|
|
75
76
|
};
|
package/dist/pages/pages.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../chunks/ui-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../chunks/ui-Bz7A98Kq.js"),s=require("react/jsx-runtime");require("react");const Q=require("lucide-react"),te=require("../chunks/hooks-B58X4Fdh.js"),se=X=>{const e=l.compilerRuntimeExports.c(65),{className:Y,error:a,isLoading:V,loadingLabel:W,onSubmit:N,passwordLabel:$,passwordPlaceholder:z,submitLabel:A,subtitle:G,title:H,usernameLabel:J,usernamePlaceholder:K}=X,r=V===void 0?!1:V,Z=W===void 0?"Signing in...":W,T=$===void 0?"password":$,P=z===void 0?"Enter your password":z,ee=A===void 0?"Sign In":A,S=G===void 0?"":G,D=H===void 0?"noxickon":H,R=J===void 0?"username":J,k=K===void 0?"Enter your username":K;let q;e[0]===Symbol.for("react.memo_cache_sentinel")?(q={initialData:{password:"",username:""},validationRules:{password:["required"],username:["required"]}},e[0]=q):q=e[0];const t=te.useFormState(q);let I;e[1]!==t||e[2]!==N?(I=async y=>{y.preventDefault(),t.validate()&&await N(t.data)},e[1]=t,e[2]=N,e[3]=I):I=e[3];const B=I,M=Y??"w-80";let o;e[4]!==D?(o=s.jsx("h1",{className:"px-2 font-mono text-2xl text-foreground",children:D}),e[4]=D,e[5]=o):o=e[5];let i;e[6]!==S?(i=S?s.jsx("p",{className:"px-2 py-1 font-mono text-xs text-muted-foreground",children:S}):null,e[6]=S,e[7]=i):i=e[7];let n;e[8]!==o||e[9]!==i?(n=s.jsxs("div",{className:"mb-4 text-center",children:[o,i]}),e[8]=o,e[9]=i,e[10]=n):n=e[10];let d;e[11]!==R?(d=s.jsx(l.OxLabel,{children:R}),e[11]=R,e[12]=d):d=e[12];let c;e[13]!==a||e[14]!==t?(c=t.hasError("username")||!!a,e[13]=a,e[14]=t,e[15]=c):c=e[15];let u;e[16]!==t?(u=y=>t.setData("username",y),e[16]=t,e[17]=u):u=e[17];let _;e[18]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(l.OxIcon,{icon:Q.User}),e[18]=_):_=e[18];let m;e[19]!==k?(m=s.jsx(l.OxTextInput,{autoComplete:"off",name:"username",placeholder:k}),e[19]=k,e[20]=m):m=e[20];let x;e[21]!==t.data.username||e[22]!==c||e[23]!==u||e[24]!==m?(x=s.jsxs(l.OxTextInput.Container,{error:c,value:t.data.username,onChange:u,children:[_,m]}),e[21]=t.data.username,e[22]=c,e[23]=u,e[24]=m,e[25]=x):x=e[25];let f;e[26]!==r||e[27]!==d||e[28]!==x?(f=s.jsxs(l.OxForm.Field,{disabled:r,required:!0,children:[d,x]}),e[26]=r,e[27]=d,e[28]=x,e[29]=f):f=e[29];let p;e[30]!==T?(p=s.jsx(l.OxLabel,{children:T}),e[30]=T,e[31]=p):p=e[31];let h;e[32]!==a||e[33]!==t?(h=t.hasError("password")||!!a,e[32]=a,e[33]=t,e[34]=h):h=e[34];let b;e[35]!==t?(b=y=>t.setData("password",y),e[35]=t,e[36]=b):b=e[36];let C;e[37]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(l.OxIcon,{icon:Q.Lock}),e[37]=C):C=e[37];let j;e[38]!==P?(j=s.jsx(l.OxTextInput,{autoComplete:"off",name:"password",placeholder:P}),e[38]=P,e[39]=j):j=e[39];let E;e[40]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(l.OxTextInput.VisibilityButton,{}),e[40]=E):E=e[40];let O;e[41]!==t.data.password||e[42]!==h||e[43]!==b||e[44]!==j?(O=s.jsxs(l.OxTextInput.Container,{error:h,type:"password",value:t.data.password,onChange:b,children:[C,j,E]}),e[41]=t.data.password,e[42]=h,e[43]=b,e[44]=j,e[45]=O):O=e[45];let v;e[46]!==r||e[47]!==p||e[48]!==O?(v=s.jsxs(l.OxForm.Field,{disabled:r,required:!0,children:[p,O]}),e[46]=r,e[47]=p,e[48]=O,e[49]=v):v=e[49];let w;e[50]!==a?(w=a?s.jsx(l.OxError,{children:a}):null,e[50]=a,e[51]=w):w=e[51];const U=r?Z:ee;let g;e[52]!==r||e[53]!==U?(g=s.jsx(l.OxButton,{disabled:r,fullWidth:!0,isLoading:r,type:"submit",variant:"gradient",children:U}),e[52]=r,e[53]=U,e[54]=g):g=e[54];let L;e[55]!==B||e[56]!==f||e[57]!==v||e[58]!==w||e[59]!==g?(L=s.jsxs(l.OxForm,{className:"space-y-6",onSubmit:B,children:[f,v,w,g]}),e[55]=B,e[56]=f,e[57]=v,e[58]=w,e[59]=g,e[60]=L):L=e[60];let F;return e[61]!==M||e[62]!==n||e[63]!==L?(F=s.jsxs(l.OxCard,{className:M,children:[n,L]}),e[61]=M,e[62]=n,e[63]=L,e[64]=F):F=e[64],F};exports.OxLogin=se;
|
package/dist/pages/pages.es.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as le, af as _, K as W, S as Y, N as Z, I as re, t as oe, v as ie } from "../chunks/ui-CezxuKW0.js";
|
|
2
2
|
import { jsxs as r, jsx as a } from "react/jsx-runtime";
|
|
3
|
-
import { d as ie, A as ne } from "../chunks/hooks-BMXCuU2h.js";
|
|
4
3
|
import "react";
|
|
5
|
-
import { User as
|
|
4
|
+
import { User as ne, Lock as de } from "lucide-react";
|
|
5
|
+
import { j as ce } from "../chunks/hooks-iUUmqFrq.js";
|
|
6
6
|
const be = (ee) => {
|
|
7
|
-
const e =
|
|
7
|
+
const e = le.c(65), {
|
|
8
8
|
className: te,
|
|
9
9
|
error: l,
|
|
10
10
|
isLoading: $,
|
|
11
11
|
loadingLabel: z,
|
|
12
|
-
onSubmit:
|
|
13
|
-
passwordLabel:
|
|
14
|
-
passwordPlaceholder:
|
|
15
|
-
submitLabel:
|
|
16
|
-
subtitle:
|
|
12
|
+
onSubmit: P,
|
|
13
|
+
passwordLabel: A,
|
|
14
|
+
passwordPlaceholder: G,
|
|
15
|
+
submitLabel: H,
|
|
16
|
+
subtitle: J,
|
|
17
17
|
title: M,
|
|
18
18
|
usernameLabel: Q,
|
|
19
19
|
usernamePlaceholder: X
|
|
20
|
-
} = ee, s = $ === void 0 ? !1 : $, se = z === void 0 ? "Signing in..." : z, j =
|
|
21
|
-
let
|
|
22
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
20
|
+
} = ee, s = $ === void 0 ? !1 : $, se = z === void 0 ? "Signing in..." : z, j = A === void 0 ? "password" : A, k = G === void 0 ? "Enter your password" : G, ae = H === void 0 ? "Sign In" : H, C = J === void 0 ? "" : J, B = M === void 0 ? "noxickon" : M, R = Q === void 0 ? "username" : Q, K = X === void 0 ? "Enter your username" : X;
|
|
21
|
+
let N;
|
|
22
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = {
|
|
23
23
|
initialData: {
|
|
24
24
|
password: "",
|
|
25
25
|
username: ""
|
|
@@ -28,13 +28,13 @@ const be = (ee) => {
|
|
|
28
28
|
password: ["required"],
|
|
29
29
|
username: ["required"]
|
|
30
30
|
}
|
|
31
|
-
}, e[0] =
|
|
32
|
-
const t =
|
|
33
|
-
let
|
|
34
|
-
e[1] !== t || e[2] !==
|
|
35
|
-
O.preventDefault(), t.validate() && await
|
|
36
|
-
}, e[1] = t, e[2] =
|
|
37
|
-
const T =
|
|
31
|
+
}, e[0] = N) : N = e[0];
|
|
32
|
+
const t = ce(N);
|
|
33
|
+
let E;
|
|
34
|
+
e[1] !== t || e[2] !== P ? (E = async (O) => {
|
|
35
|
+
O.preventDefault(), t.validate() && await P(t.data);
|
|
36
|
+
}, e[1] = t, e[2] = P, e[3] = E) : E = e[3];
|
|
37
|
+
const T = E, U = te ?? "w-80";
|
|
38
38
|
let o;
|
|
39
39
|
e[4] !== B ? (o = /* @__PURE__ */ a("h1", { className: "px-2 font-mono text-2xl text-foreground", children: B }), e[4] = B, e[5] = o) : o = e[5];
|
|
40
40
|
let i;
|
|
@@ -51,9 +51,9 @@ const be = (ee) => {
|
|
|
51
51
|
let m;
|
|
52
52
|
e[16] !== t ? (m = (O) => t.setData("username", O), e[16] = t, e[17] = m) : m = e[17];
|
|
53
53
|
let q;
|
|
54
|
-
e[18] === Symbol.for("react.memo_cache_sentinel") ? (q = /* @__PURE__ */ a(Z, { icon:
|
|
54
|
+
e[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (q = /* @__PURE__ */ a(Z, { icon: ne }), e[18] = q) : q = e[18];
|
|
55
55
|
let u;
|
|
56
|
-
e[19] !==
|
|
56
|
+
e[19] !== K ? (u = /* @__PURE__ */ a(_, { autoComplete: "off", name: "username", placeholder: K }), e[19] = K, e[20] = u) : u = e[20];
|
|
57
57
|
let f;
|
|
58
58
|
e[21] !== t.data.username || e[22] !== c || e[23] !== m || e[24] !== u ? (f = /* @__PURE__ */ r(_.Container, { error: c, value: t.data.username, onChange: m, children: [
|
|
59
59
|
q,
|
|
@@ -71,27 +71,27 @@ const be = (ee) => {
|
|
|
71
71
|
let x;
|
|
72
72
|
e[35] !== t ? (x = (O) => t.setData("password", O), e[35] = t, e[36] = x) : x = e[36];
|
|
73
73
|
let D;
|
|
74
|
-
e[37] === Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ a(Z, { icon:
|
|
75
|
-
let w;
|
|
76
|
-
e[38] !== k ? (w = /* @__PURE__ */ a(_, { autoComplete: "off", name: "password", placeholder: k }), e[38] = k, e[39] = w) : w = e[39];
|
|
77
|
-
let F;
|
|
78
|
-
e[40] === Symbol.for("react.memo_cache_sentinel") ? (F = /* @__PURE__ */ a(_.VisibilityButton, {}), e[40] = F) : F = e[40];
|
|
74
|
+
e[37] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ a(Z, { icon: de }), e[37] = D) : D = e[37];
|
|
79
75
|
let v;
|
|
80
|
-
e[
|
|
76
|
+
e[38] !== k ? (v = /* @__PURE__ */ a(_, { autoComplete: "off", name: "password", placeholder: k }), e[38] = k, e[39] = v) : v = e[39];
|
|
77
|
+
let F;
|
|
78
|
+
e[40] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (F = /* @__PURE__ */ a(_.VisibilityButton, {}), e[40] = F) : F = e[40];
|
|
79
|
+
let w;
|
|
80
|
+
e[41] !== t.data.password || e[42] !== b || e[43] !== x || e[44] !== v ? (w = /* @__PURE__ */ r(_.Container, { error: b, type: "password", value: t.data.password, onChange: x, children: [
|
|
81
81
|
D,
|
|
82
|
-
|
|
82
|
+
v,
|
|
83
83
|
F
|
|
84
|
-
] }), e[41] = t.data.password, e[42] = b, e[43] = x, e[44] =
|
|
84
|
+
] }), e[41] = t.data.password, e[42] = b, e[43] = x, e[44] = v, e[45] = w) : w = e[45];
|
|
85
85
|
let g;
|
|
86
|
-
e[46] !== s || e[47] !== h || e[48] !==
|
|
86
|
+
e[46] !== s || e[47] !== h || e[48] !== w ? (g = /* @__PURE__ */ r(W.Field, { disabled: s, required: !0, children: [
|
|
87
87
|
h,
|
|
88
|
-
|
|
89
|
-
] }), e[46] = s, e[47] = h, e[48] =
|
|
88
|
+
w
|
|
89
|
+
] }), e[46] = s, e[47] = h, e[48] = w, e[49] = g) : g = e[49];
|
|
90
90
|
let L;
|
|
91
|
-
e[50] !== l ? (L = l ? /* @__PURE__ */ a(
|
|
91
|
+
e[50] !== l ? (L = l ? /* @__PURE__ */ a(re, { children: l }) : null, e[50] = l, e[51] = L) : L = e[51];
|
|
92
92
|
const V = s ? se : ae;
|
|
93
93
|
let y;
|
|
94
|
-
e[52] !== s || e[53] !== V ? (y = /* @__PURE__ */ a(
|
|
94
|
+
e[52] !== s || e[53] !== V ? (y = /* @__PURE__ */ a(oe, { disabled: s, fullWidth: !0, isLoading: s, type: "submit", variant: "gradient", children: V }), e[52] = s, e[53] = V, e[54] = y) : y = e[54];
|
|
95
95
|
let S;
|
|
96
96
|
e[55] !== T || e[56] !== p || e[57] !== g || e[58] !== L || e[59] !== y ? (S = /* @__PURE__ */ r(W, { className: "space-y-6", onSubmit: T, children: [
|
|
97
97
|
p,
|
|
@@ -99,11 +99,11 @@ const be = (ee) => {
|
|
|
99
99
|
L,
|
|
100
100
|
y
|
|
101
101
|
] }), e[55] = T, e[56] = p, e[57] = g, e[58] = L, e[59] = y, e[60] = S) : S = e[60];
|
|
102
|
-
let
|
|
103
|
-
return e[61] !== U || e[62] !== n || e[63] !== S ? (
|
|
102
|
+
let I;
|
|
103
|
+
return e[61] !== U || e[62] !== n || e[63] !== S ? (I = /* @__PURE__ */ r(ie, { className: U, children: [
|
|
104
104
|
n,
|
|
105
105
|
S
|
|
106
|
-
] }), e[61] = U, e[62] = n, e[63] = S, e[64] =
|
|
106
|
+
] }), e[61] = U, e[62] = n, e[63] = S, e[64] = I) : I = e[64], I;
|
|
107
107
|
};
|
|
108
108
|
export {
|
|
109
109
|
be as OxLogin
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../chunks/ui-Bz7A98Kq.js");function f(e){return function({children:n,onAuthenticated:u=null,onLoading:r=null}){const{isLoggedIn:o,loading:t}=e();return t?r:o?u:n}}function s(e){return function({children:n,onLoading:u=null,onUnauthenticated:r=null}){const{isLoggedIn:o,loading:t}=e();return t?u:o?n:r}}const d=e=>e.role;function R(e){return function({children:n,onLoading:u=null,onUnauthorized:r=null,roleExtractor:o=d,roles:t=["admin"]}){const{loading:l,user:c}=e();return l?u:!c||a.isEmpty(t)||!t.includes(o(c))?r:n}}exports.createOxGuestRoute=f;exports.createOxProtectedRoute=s;exports.createOxRoleRoute=R;
|
package/dist/routes/routes.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as f } from "../chunks/ui-CezxuKW0.js";
|
|
2
2
|
function d(t) {
|
|
3
3
|
return function({
|
|
4
4
|
children: e,
|
|
@@ -25,13 +25,13 @@ function R(t) {
|
|
|
25
25
|
return n ? r : o ? e : u;
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const a = (t) => t.role;
|
|
29
29
|
function x(t) {
|
|
30
30
|
return function({
|
|
31
31
|
children: e,
|
|
32
32
|
onLoading: r = null,
|
|
33
33
|
onUnauthorized: u = null,
|
|
34
|
-
roleExtractor: o =
|
|
34
|
+
roleExtractor: o = a,
|
|
35
35
|
roles: n = ["admin"]
|
|
36
36
|
}) {
|
|
37
37
|
const {
|
package/dist/styles.css
CHANGED
|
@@ -4,7 +4,7 @@ declare const meta: {
|
|
|
4
4
|
component: (({ children, className, ...domProps }: import('..').OxBreadcrumbProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
5
5
|
Ellipsis: ({ className, ...domProps }: import('..').OxBreadcrumbEllipsisProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
Item: ({ children, className, ...domProps }: import('..').OxBreadcrumbItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
Link: ({
|
|
7
|
+
Link: ({ asSlot, children, className, current, href, ...domProps }: import('..').OxBreadcrumbLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
Page: ({ children, className, ...domProps }: import('..').OxBreadcrumbPageProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
Separator: ({ children, className, ...domProps }: import('..').OxBreadcrumbSeparatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
};
|
|
@@ -2,7 +2,7 @@ export type * from './src/Breadcrumb.types';
|
|
|
2
2
|
export declare const OxBreadcrumb: (({ children, className, ...domProps }: import('.').OxBreadcrumbProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
3
3
|
Ellipsis: ({ className, ...domProps }: import('.').OxBreadcrumbEllipsisProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
Item: ({ children, className, ...domProps }: import('.').OxBreadcrumbItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
Link: ({
|
|
5
|
+
Link: ({ asSlot, children, className, current, href, ...domProps }: import('.').OxBreadcrumbLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
Page: ({ children, className, ...domProps }: import('.').OxBreadcrumbPageProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
Separator: ({ children, className, ...domProps }: import('.').OxBreadcrumbSeparatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
};
|
|
@@ -8,7 +8,7 @@ export interface OxBreadcrumbItemProps extends ComponentPropsWithRef<'li'> {
|
|
|
8
8
|
children: ReactNode;
|
|
9
9
|
}
|
|
10
10
|
export interface OxBreadcrumbLinkProps extends ComponentPropsWithRef<'a'> {
|
|
11
|
-
|
|
11
|
+
asSlot?: boolean;
|
|
12
12
|
children: ReactNode;
|
|
13
13
|
current?: boolean;
|
|
14
14
|
href?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OxBreadcrumbLinkProps } from './Breadcrumb.types';
|
|
2
|
-
export declare const OxBreadcrumbLink: ({
|
|
2
|
+
export declare const OxBreadcrumbLink: ({ asSlot, children, className, current, href, ...domProps }: OxBreadcrumbLinkProps) => 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, fullWidth, isLoading, size, type, variant, ...domProps }: import('..').OxButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
parameters: {
|
|
6
6
|
layout: string;
|
|
7
7
|
docs: {
|
|
@@ -45,7 +45,7 @@ declare const meta: {
|
|
|
45
45
|
options: string[];
|
|
46
46
|
description: string;
|
|
47
47
|
};
|
|
48
|
-
|
|
48
|
+
asSlot: {
|
|
49
49
|
control: "boolean";
|
|
50
50
|
description: string;
|
|
51
51
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OxButtonProps } from './Button.types';
|
|
2
|
-
export declare const OxButton: ({
|
|
2
|
+
export declare const OxButton: ({ asSlot, children, className, disabled, fullWidth, isLoading, size, type, variant, ...domProps }: OxButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentPropsWithRef } from 'react';
|
|
2
2
|
export type OxButtonVariant = 'gradient' | 'primary' | 'accent' | 'default' | 'secondary' | 'ghost' | 'danger';
|
|
3
3
|
export interface OxButtonProps extends ComponentPropsWithRef<'button'> {
|
|
4
|
-
|
|
4
|
+
asSlot?: boolean;
|
|
5
5
|
fullWidth?: boolean;
|
|
6
6
|
isLoading?: boolean;
|
|
7
7
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -4,21 +4,33 @@ declare const meta: {
|
|
|
4
4
|
title: string;
|
|
5
5
|
component: (({ align, children, closeOnOutsideClick, defaultOpen, disabled, onOpenChange, open: controlledOpen, side, }: import('..').OxDropdownProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
6
6
|
Body: ({ children, className, ...domProps }: import('..').OxDropdownBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
CheckboxItem: ({ checked: controlledChecked, children, className, closeOnSelect, defaultChecked, disabled, onCheckedChange, onClick, ...restProps }: import('..').OxDropdownCheckboxItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
Content: ({ children, className, ...domProps }: import('..').OxDropdownContentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
9
|
Footer: ({ children, className, ...domProps }: import('..').OxDropdownFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
Group: ({ children, className, label, ...domProps }: import('..').OxDropdownGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
11
|
Header: ({ children, className, ...domProps }: import('..').OxDropdownHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
Item: (props: import('..').OxDropdownItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
|
|
13
|
+
RadioGroup: ({ children, className, closeOnSelect, defaultValue, onValueChange, value: controlledValue, ...restProps }: import('..').OxDropdownRadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
RadioItem: ({ children, className, disabled, onClick, value, ...restProps }: import('..').OxDropdownRadioItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
15
|
Separator: ({ className, ...domProps }: import('..').OxDropdownSeparatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
16
|
Shortcut: ({ children, className, ...domProps }: import('..').OxDropdownShortcutProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
|
|
17
|
+
SubMenu: ({ children }: import('..').OxDropdownSubMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
SubMenuContent: ({ children, className, ...domProps }: import('..').OxDropdownSubMenuContentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
19
|
+
SubMenuTrigger: ({ children, className, disabled, ...restProps }: import('..').OxDropdownSubMenuTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
Trigger: ({ animateIcon, asSlot, children, className, disabled: propsDisabled, hideIcon, icon, size, variant, ...domProps }: import('..').OxDropdownTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
21
|
};
|
|
16
22
|
subcomponents: {
|
|
17
23
|
'OxDropdown.Trigger': ComponentType<unknown>;
|
|
18
24
|
'OxDropdown.Content': ComponentType<unknown>;
|
|
19
25
|
'OxDropdown.Body': ComponentType<unknown>;
|
|
20
26
|
'OxDropdown.Item': ComponentType<unknown>;
|
|
21
|
-
'OxDropdown.
|
|
27
|
+
'OxDropdown.CheckboxItem': ComponentType<unknown>;
|
|
28
|
+
'OxDropdown.RadioGroup': ComponentType<unknown>;
|
|
29
|
+
'OxDropdown.RadioItem': ComponentType<unknown>;
|
|
30
|
+
'OxDropdown.Group': ComponentType<unknown>;
|
|
31
|
+
'OxDropdown.SubMenu': ComponentType<unknown>;
|
|
32
|
+
'OxDropdown.SubMenuTrigger': ComponentType<unknown>;
|
|
33
|
+
'OxDropdown.SubMenuContent': ComponentType<unknown>;
|
|
22
34
|
'OxDropdown.Shortcut': ComponentType<unknown>;
|
|
23
35
|
'OxDropdown.Separator': ComponentType<unknown>;
|
|
24
36
|
'OxDropdown.Header': ComponentType<unknown>;
|
|
@@ -71,8 +83,16 @@ declare const meta: {
|
|
|
71
83
|
export default meta;
|
|
72
84
|
type Story = StoryObj<typeof meta>;
|
|
73
85
|
export declare const Playground: Story;
|
|
86
|
+
export declare const Comprehensive: Story;
|
|
74
87
|
export declare const WithIcons: Story;
|
|
75
88
|
export declare const IconSources: Story;
|
|
76
89
|
export declare const States: Story;
|
|
77
90
|
export declare const Advanced: Story;
|
|
78
91
|
export declare const CustomTrigger: Story;
|
|
92
|
+
export declare const CheckboxItem: Story;
|
|
93
|
+
export declare const RadioGroup: Story;
|
|
94
|
+
export declare const RadioGroupNoClose: Story;
|
|
95
|
+
export declare const MixedItems: Story;
|
|
96
|
+
export declare const CheckboxWithSelect: Story;
|
|
97
|
+
export declare const Group: Story;
|
|
98
|
+
export declare const SubMenu: Story;
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
export type * from './src/Dropdown.types';
|
|
2
2
|
export declare const OxDropdown: (({ align, children, closeOnOutsideClick, defaultOpen, disabled, onOpenChange, open: controlledOpen, side, }: import('.').OxDropdownProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
3
3
|
Body: ({ children, className, ...domProps }: import('.').OxDropdownBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
CheckboxItem: ({ checked: controlledChecked, children, className, closeOnSelect, defaultChecked, disabled, onCheckedChange, onClick, ...restProps }: import('.').OxDropdownCheckboxItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
5
|
Content: ({ children, className, ...domProps }: import('.').OxDropdownContentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
6
|
Footer: ({ children, className, ...domProps }: import('.').OxDropdownFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
Group: ({ children, className, label, ...domProps }: import('.').OxDropdownGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
8
|
Header: ({ children, className, ...domProps }: import('.').OxDropdownHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
9
|
Item: (props: import('.').OxDropdownItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
|
|
10
|
+
RadioGroup: ({ children, className, closeOnSelect, defaultValue, onValueChange, value: controlledValue, ...restProps }: import('.').OxDropdownRadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
RadioItem: ({ children, className, disabled, onClick, value, ...restProps }: import('.').OxDropdownRadioItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
12
|
Separator: ({ className, ...domProps }: import('.').OxDropdownSeparatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
13
|
Shortcut: ({ children, className, ...domProps }: import('.').OxDropdownShortcutProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
|
|
14
|
+
SubMenu: ({ children }: import('.').OxDropdownSubMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
SubMenuContent: ({ children, className, ...domProps }: import('.').OxDropdownSubMenuContentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
16
|
+
SubMenuTrigger: ({ children, className, disabled, ...restProps }: import('.').OxDropdownSubMenuTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
Trigger: ({ animateIcon, asSlot, children, className, disabled: propsDisabled, hideIcon, icon, size, variant, ...domProps }: import('.').OxDropdownTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
18
|
};
|