@orderly.network/ui 2.12.2 → 2.12.3
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/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +48 -53
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +47 -52
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -5287,6 +5287,10 @@ type SimpleDialogProps = {
|
|
|
5287
5287
|
onOpenChange?: (open: boolean) => void;
|
|
5288
5288
|
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
5289
5289
|
closable?: boolean;
|
|
5290
|
+
/**
|
|
5291
|
+
* Visible header title. When omitted, a screen-reader-only default is still
|
|
5292
|
+
* rendered so Radix `Dialog.Content` meets accessibility requirements.
|
|
5293
|
+
*/
|
|
5290
5294
|
title?: ReactNode | (() => ReactNode);
|
|
5291
5295
|
description?: ReactNode;
|
|
5292
5296
|
classNames?: {
|
|
@@ -5437,12 +5441,20 @@ declare const SheetFooter: {
|
|
|
5437
5441
|
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
5438
5442
|
displayName: string;
|
|
5439
5443
|
};
|
|
5444
|
+
/**
|
|
5445
|
+
* Visible sheet title. Must render Radix `Dialog.Title` so `DialogContent` is
|
|
5446
|
+
* announced correctly to assistive tech (see Radix dialog a11y requirements).
|
|
5447
|
+
*/
|
|
5440
5448
|
declare const SheetTitle: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & {
|
|
5441
5449
|
leading?: React$1.ReactNode;
|
|
5442
5450
|
} & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
5443
5451
|
declare const SheetDescription: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
5444
5452
|
|
|
5445
5453
|
interface SimpleSheetProps {
|
|
5454
|
+
/**
|
|
5455
|
+
* Visible header title. When omitted, a screen-reader-only default is still
|
|
5456
|
+
* rendered so Radix `Dialog.Content` meets accessibility requirements.
|
|
5457
|
+
*/
|
|
5446
5458
|
title?: ReactNode | (() => ReactNode);
|
|
5447
5459
|
leading?: React.ReactNode;
|
|
5448
5460
|
open?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -5287,6 +5287,10 @@ type SimpleDialogProps = {
|
|
|
5287
5287
|
onOpenChange?: (open: boolean) => void;
|
|
5288
5288
|
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
5289
5289
|
closable?: boolean;
|
|
5290
|
+
/**
|
|
5291
|
+
* Visible header title. When omitted, a screen-reader-only default is still
|
|
5292
|
+
* rendered so Radix `Dialog.Content` meets accessibility requirements.
|
|
5293
|
+
*/
|
|
5290
5294
|
title?: ReactNode | (() => ReactNode);
|
|
5291
5295
|
description?: ReactNode;
|
|
5292
5296
|
classNames?: {
|
|
@@ -5437,12 +5441,20 @@ declare const SheetFooter: {
|
|
|
5437
5441
|
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
5438
5442
|
displayName: string;
|
|
5439
5443
|
};
|
|
5444
|
+
/**
|
|
5445
|
+
* Visible sheet title. Must render Radix `Dialog.Title` so `DialogContent` is
|
|
5446
|
+
* announced correctly to assistive tech (see Radix dialog a11y requirements).
|
|
5447
|
+
*/
|
|
5440
5448
|
declare const SheetTitle: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & {
|
|
5441
5449
|
leading?: React$1.ReactNode;
|
|
5442
5450
|
} & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
5443
5451
|
declare const SheetDescription: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
5444
5452
|
|
|
5445
5453
|
interface SimpleSheetProps {
|
|
5454
|
+
/**
|
|
5455
|
+
* Visible header title. When omitted, a screen-reader-only default is still
|
|
5456
|
+
* rendered so Radix `Dialog.Content` meets accessibility requirements.
|
|
5457
|
+
*/
|
|
5446
5458
|
title?: ReactNode | (() => ReactNode);
|
|
5447
5459
|
leading?: React.ReactNode;
|
|
5448
5460
|
open?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ var dateFns = require('date-fns');
|
|
|
8
8
|
var AvatarPrimitive = require('@radix-ui/react-avatar');
|
|
9
9
|
var makeBlockie = require('ethereum-blockies-base64');
|
|
10
10
|
var utils = require('@orderly.network/utils');
|
|
11
|
-
var
|
|
11
|
+
var SheetPrimitive = require('@radix-ui/react-dialog');
|
|
12
12
|
var locale = require('date-fns/locale');
|
|
13
13
|
var TooltipPrimitive = require('@radix-ui/react-tooltip');
|
|
14
14
|
var SelectPrimitive = require('@radix-ui/react-select');
|
|
@@ -52,7 +52,7 @@ function _interopNamespace(e) {
|
|
|
52
52
|
var React79__namespace = /*#__PURE__*/_interopNamespace(React79);
|
|
53
53
|
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
54
54
|
var makeBlockie__default = /*#__PURE__*/_interopDefault(makeBlockie);
|
|
55
|
-
var
|
|
55
|
+
var SheetPrimitive__namespace = /*#__PURE__*/_interopNamespace(SheetPrimitive);
|
|
56
56
|
var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
|
|
57
57
|
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
|
|
58
58
|
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
|
|
@@ -5274,22 +5274,22 @@ var modalActions = {
|
|
|
5274
5274
|
setStates,
|
|
5275
5275
|
updateArgs
|
|
5276
5276
|
};
|
|
5277
|
-
var Sheet =
|
|
5278
|
-
var SheetTrigger =
|
|
5279
|
-
var SheetClose =
|
|
5280
|
-
var SheetPortal =
|
|
5277
|
+
var Sheet = SheetPrimitive__namespace.Root;
|
|
5278
|
+
var SheetTrigger = SheetPrimitive__namespace.Trigger;
|
|
5279
|
+
var SheetClose = SheetPrimitive__namespace.Close;
|
|
5280
|
+
var SheetPortal = SheetPrimitive__namespace.Portal;
|
|
5281
5281
|
var SheetOverlay = React79__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5282
|
-
|
|
5282
|
+
SheetPrimitive__namespace.Overlay,
|
|
5283
5283
|
{
|
|
5284
5284
|
className: tailwindVariants.cnBase(
|
|
5285
|
-
"oui-sheet-overlay oui-fixed oui-inset-0 oui-z-50 oui-bg-black/
|
|
5285
|
+
"oui-sheet-overlay oui-fixed oui-inset-0 oui-z-50 oui-bg-black/50 oui-backdrop-blur-sm data-[state=open]:oui-animate-in data-[state=closed]:oui-animate-out data-[state=closed]:oui-fade-out-0 data-[state=open]:oui-fade-in-0",
|
|
5286
5286
|
className
|
|
5287
5287
|
),
|
|
5288
5288
|
...props,
|
|
5289
5289
|
ref
|
|
5290
5290
|
}
|
|
5291
5291
|
));
|
|
5292
|
-
SheetOverlay.displayName =
|
|
5292
|
+
SheetOverlay.displayName = SheetPrimitive__namespace.Overlay.displayName;
|
|
5293
5293
|
var sheetVariants = tailwindVariants.tv({
|
|
5294
5294
|
base: "oui-sheet-content oui-fixed oui-z-50 oui-gap-4 oui-bg-base-8 oui-px-4 oui-shadow-lg oui-transition oui-ease-in-out data-[state=closed]:oui-duration-260 data-[state=open]:oui-duration-300 data-[state=open]:oui-animate-in data-[state=closed]:oui-animate-out",
|
|
5295
5295
|
variants: {
|
|
@@ -5317,7 +5317,7 @@ var SheetContent = React79__namespace.forwardRef(
|
|
|
5317
5317
|
}, ref) => /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
|
|
5318
5318
|
/* @__PURE__ */ jsxRuntime.jsx(SheetOverlay, { className: overlayClassName }),
|
|
5319
5319
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5320
|
-
|
|
5320
|
+
SheetPrimitive__namespace.Content,
|
|
5321
5321
|
{
|
|
5322
5322
|
ref,
|
|
5323
5323
|
className: tailwindVariants.cnBase(sheetVariants({ side }), className),
|
|
@@ -5326,7 +5326,7 @@ var SheetContent = React79__namespace.forwardRef(
|
|
|
5326
5326
|
...props,
|
|
5327
5327
|
children: [
|
|
5328
5328
|
closeable && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5329
|
-
|
|
5329
|
+
SheetPrimitive__namespace.Close,
|
|
5330
5330
|
{
|
|
5331
5331
|
className: tailwindVariants.cnBase(
|
|
5332
5332
|
"oui-sheet-close-btn oui-ring-offset-base-700 focus:oui-ring-ring oui-absolute oui-right-4 oui-top-4 oui-z-10 oui-rounded-sm oui-transition-opacity focus:oui-outline-none focus:oui-ring-2 focus:oui-ring-offset-2 active:oui-outline-none focus:orderly-outline-none disabled:oui-pointer-events-none data-[state=open]:oui-bg-secondary",
|
|
@@ -5352,7 +5352,7 @@ var SheetContent = React79__namespace.forwardRef(
|
|
|
5352
5352
|
)
|
|
5353
5353
|
] })
|
|
5354
5354
|
);
|
|
5355
|
-
SheetContent.displayName =
|
|
5355
|
+
SheetContent.displayName = SheetPrimitive__namespace.Content.displayName;
|
|
5356
5356
|
var SheetHeader = ({
|
|
5357
5357
|
className,
|
|
5358
5358
|
leading,
|
|
@@ -5400,29 +5400,24 @@ var SheetFooter = ({
|
|
|
5400
5400
|
}
|
|
5401
5401
|
);
|
|
5402
5402
|
SheetFooter.displayName = "SheetFooter";
|
|
5403
|
-
var SheetTitle = React79__namespace.forwardRef(({ className, leading, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5404
|
-
"div",
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
)
|
|
5420
|
-
]
|
|
5421
|
-
}
|
|
5422
|
-
));
|
|
5423
|
-
SheetTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
5403
|
+
var SheetTitle = React79__namespace.forwardRef(({ className, leading, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oui-sheet-header oui-grid oui-grid-cols-[40px_1fr_40px] oui-items-center", children: [
|
|
5404
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: leading }),
|
|
5405
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5406
|
+
SheetPrimitive__namespace.Title,
|
|
5407
|
+
{
|
|
5408
|
+
ref,
|
|
5409
|
+
className: tailwindVariants.cnBase(
|
|
5410
|
+
"oui-flex oui-flex-col oui-space-y-2 oui-text-center oui-text-lg oui-text-base-contrast",
|
|
5411
|
+
className
|
|
5412
|
+
),
|
|
5413
|
+
...props,
|
|
5414
|
+
children
|
|
5415
|
+
}
|
|
5416
|
+
)
|
|
5417
|
+
] }));
|
|
5418
|
+
SheetTitle.displayName = SheetPrimitive__namespace.Title.displayName;
|
|
5424
5419
|
var SheetDescription = React79__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5425
|
-
|
|
5420
|
+
SheetPrimitive__namespace.Description,
|
|
5426
5421
|
{
|
|
5427
5422
|
ref,
|
|
5428
5423
|
className: tailwindVariants.cnBase(
|
|
@@ -5432,7 +5427,7 @@ var SheetDescription = React79__namespace.forwardRef(({ className, ...props }, r
|
|
|
5432
5427
|
...props
|
|
5433
5428
|
}
|
|
5434
5429
|
));
|
|
5435
|
-
SheetDescription.displayName =
|
|
5430
|
+
SheetDescription.displayName = SheetPrimitive__namespace.Description.displayName;
|
|
5436
5431
|
function createSheetComponent(Comp) {
|
|
5437
5432
|
return modal.create((props) => {
|
|
5438
5433
|
const { title, leading, classNames, contentProps, closable, ...rest } = props;
|
|
@@ -5692,10 +5687,10 @@ var SimpleSheet = (props) => {
|
|
|
5692
5687
|
closeable: closable,
|
|
5693
5688
|
...contentProps,
|
|
5694
5689
|
children: [
|
|
5695
|
-
title
|
|
5690
|
+
title ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5696
5691
|
/* @__PURE__ */ jsxRuntime.jsx(SheetHeader, { leading: props.leading, children: /* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: title }) }),
|
|
5697
5692
|
/* @__PURE__ */ jsxRuntime.jsx(Divider, {})
|
|
5698
|
-
] }),
|
|
5693
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Title, { className: "oui-sr-only", children: "sheet title" }),
|
|
5699
5694
|
/* @__PURE__ */ jsxRuntime.jsx(SheetBody, { className: classNames?.body, children: props.children })
|
|
5700
5695
|
]
|
|
5701
5696
|
}
|
|
@@ -5715,7 +5710,7 @@ var dialogVariants = tailwindVariants.tv({
|
|
|
5715
5710
|
"oui-fixed",
|
|
5716
5711
|
"oui-inset-0",
|
|
5717
5712
|
"oui-z-50",
|
|
5718
|
-
"oui-bg-black/
|
|
5713
|
+
"oui-bg-black/50",
|
|
5719
5714
|
"oui-backdrop-blur-sm",
|
|
5720
5715
|
"data-[state=open]:oui-animate-in",
|
|
5721
5716
|
"data-[state=closed]:oui-animate-out",
|
|
@@ -5860,14 +5855,14 @@ var dialogVariants = tailwindVariants.tv({
|
|
|
5860
5855
|
intensity: 800
|
|
5861
5856
|
}
|
|
5862
5857
|
});
|
|
5863
|
-
var Dialog =
|
|
5864
|
-
var DialogTrigger =
|
|
5865
|
-
var DialogPortal =
|
|
5866
|
-
var DialogClose =
|
|
5858
|
+
var Dialog = SheetPrimitive__namespace.Root;
|
|
5859
|
+
var DialogTrigger = SheetPrimitive__namespace.Trigger;
|
|
5860
|
+
var DialogPortal = SheetPrimitive__namespace.Portal;
|
|
5861
|
+
var DialogClose = SheetPrimitive__namespace.Close;
|
|
5867
5862
|
var DialogOverlay = React79__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
5868
5863
|
const { overlay } = dialogVariants();
|
|
5869
5864
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5870
|
-
|
|
5865
|
+
SheetPrimitive__namespace.Overlay,
|
|
5871
5866
|
{
|
|
5872
5867
|
ref,
|
|
5873
5868
|
className: overlay({ className }),
|
|
@@ -5875,7 +5870,7 @@ var DialogOverlay = React79__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
5875
5870
|
}
|
|
5876
5871
|
);
|
|
5877
5872
|
});
|
|
5878
|
-
DialogOverlay.displayName =
|
|
5873
|
+
DialogOverlay.displayName = SheetPrimitive__namespace.Overlay.displayName;
|
|
5879
5874
|
var DialogContent = React79__namespace.forwardRef(
|
|
5880
5875
|
({
|
|
5881
5876
|
overlyClassName,
|
|
@@ -5890,7 +5885,7 @@ var DialogContent = React79__namespace.forwardRef(
|
|
|
5890
5885
|
return /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
|
|
5891
5886
|
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, { className: overlyClassName }),
|
|
5892
5887
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5893
|
-
|
|
5888
|
+
SheetPrimitive__namespace.Content,
|
|
5894
5889
|
{
|
|
5895
5890
|
ref,
|
|
5896
5891
|
className: content({ className }),
|
|
@@ -5898,7 +5893,7 @@ var DialogContent = React79__namespace.forwardRef(
|
|
|
5898
5893
|
children: [
|
|
5899
5894
|
children,
|
|
5900
5895
|
closable && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5901
|
-
|
|
5896
|
+
SheetPrimitive__namespace.Close,
|
|
5902
5897
|
{
|
|
5903
5898
|
className: close(),
|
|
5904
5899
|
"data-testid": "oui-testid-dialog-content-close-btn",
|
|
@@ -5914,7 +5909,7 @@ var DialogContent = React79__namespace.forwardRef(
|
|
|
5914
5909
|
] });
|
|
5915
5910
|
}
|
|
5916
5911
|
);
|
|
5917
|
-
DialogContent.displayName =
|
|
5912
|
+
DialogContent.displayName = SheetPrimitive__namespace.Content.displayName;
|
|
5918
5913
|
var DialogHeader = ({
|
|
5919
5914
|
className,
|
|
5920
5915
|
...props
|
|
@@ -5941,7 +5936,7 @@ DialogFooter.displayName = "DialogFooter";
|
|
|
5941
5936
|
var DialogTitle = React79__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
5942
5937
|
const { title } = dialogVariants();
|
|
5943
5938
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5944
|
-
|
|
5939
|
+
SheetPrimitive__namespace.Title,
|
|
5945
5940
|
{
|
|
5946
5941
|
ref,
|
|
5947
5942
|
className: title({ className }),
|
|
@@ -5949,11 +5944,11 @@ var DialogTitle = React79__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
5949
5944
|
}
|
|
5950
5945
|
);
|
|
5951
5946
|
});
|
|
5952
|
-
DialogTitle.displayName =
|
|
5947
|
+
DialogTitle.displayName = SheetPrimitive__namespace.Title.displayName;
|
|
5953
5948
|
var DialogDescription = React79__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
5954
5949
|
const { desc } = dialogVariants();
|
|
5955
5950
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5956
|
-
|
|
5951
|
+
SheetPrimitive__namespace.Description,
|
|
5957
5952
|
{
|
|
5958
5953
|
ref,
|
|
5959
5954
|
className: desc({ className }),
|
|
@@ -5961,7 +5956,7 @@ var DialogDescription = React79__namespace.forwardRef(({ className, ...props },
|
|
|
5961
5956
|
}
|
|
5962
5957
|
);
|
|
5963
5958
|
});
|
|
5964
|
-
DialogDescription.displayName =
|
|
5959
|
+
DialogDescription.displayName = SheetPrimitive__namespace.Description.displayName;
|
|
5965
5960
|
var SimpleDialogFooter = (props) => {
|
|
5966
5961
|
const { actions } = props;
|
|
5967
5962
|
const [primaryLoading, setPrimaryLoading] = React79.useState(
|
|
@@ -6051,10 +6046,10 @@ var SimpleDialog = (props) => {
|
|
|
6051
6046
|
overlyClassName: props.classNames?.overlay,
|
|
6052
6047
|
...props.contentProps,
|
|
6053
6048
|
children: [
|
|
6054
|
-
title
|
|
6049
|
+
title ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6055
6050
|
/* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: title }) }),
|
|
6056
6051
|
/* @__PURE__ */ jsxRuntime.jsx(Divider, {})
|
|
6057
|
-
] }),
|
|
6052
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Title, { className: "oui-sr-only", children: "dialog title" }),
|
|
6058
6053
|
/* @__PURE__ */ jsxRuntime.jsx(DialogBody, { className: props.classNames?.body, children: props.children }),
|
|
6059
6054
|
typeof props.description !== "undefined" && /* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { children: props.description }),
|
|
6060
6055
|
/* @__PURE__ */ jsxRuntime.jsx(
|