myoperator-ui 0.0.162 → 0.0.164
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.js +301 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5887,6 +5887,195 @@ const PageHeader = React.forwardRef<HTMLDivElement, PageHeaderProps>(
|
|
|
5887
5887
|
PageHeader.displayName = "PageHeader";
|
|
5888
5888
|
|
|
5889
5889
|
export { PageHeader, pageHeaderVariants };
|
|
5890
|
+
`, prefix)
|
|
5891
|
+
}
|
|
5892
|
+
]
|
|
5893
|
+
},
|
|
5894
|
+
"pagination": {
|
|
5895
|
+
name: "pagination",
|
|
5896
|
+
description: "A composable pagination component with page navigation, next/previous links, and ellipsis",
|
|
5897
|
+
category: "layout",
|
|
5898
|
+
dependencies: [
|
|
5899
|
+
"clsx",
|
|
5900
|
+
"tailwind-merge",
|
|
5901
|
+
"lucide-react"
|
|
5902
|
+
],
|
|
5903
|
+
internalDependencies: [
|
|
5904
|
+
"button"
|
|
5905
|
+
],
|
|
5906
|
+
files: [
|
|
5907
|
+
{
|
|
5908
|
+
name: "pagination.tsx",
|
|
5909
|
+
content: prefixTailwindClasses(`import * as React from "react";
|
|
5910
|
+
import {
|
|
5911
|
+
ChevronLeftIcon,
|
|
5912
|
+
ChevronRightIcon,
|
|
5913
|
+
MoreHorizontalIcon,
|
|
5914
|
+
} from "lucide-react";
|
|
5915
|
+
|
|
5916
|
+
import { cn } from "../../lib/utils";
|
|
5917
|
+
import { buttonVariants, type ButtonProps } from "./button";
|
|
5918
|
+
|
|
5919
|
+
export interface PaginationProps extends React.ComponentProps<"nav"> {
|
|
5920
|
+
/** Additional CSS classes for the nav wrapper */
|
|
5921
|
+
className?: string;
|
|
5922
|
+
}
|
|
5923
|
+
|
|
5924
|
+
function Pagination({ className, ...props }: PaginationProps) {
|
|
5925
|
+
return (
|
|
5926
|
+
<nav
|
|
5927
|
+
role="navigation"
|
|
5928
|
+
aria-label="pagination"
|
|
5929
|
+
data-slot="pagination"
|
|
5930
|
+
className={cn("mx-auto flex w-full justify-center", className)}
|
|
5931
|
+
{...props}
|
|
5932
|
+
/>
|
|
5933
|
+
);
|
|
5934
|
+
}
|
|
5935
|
+
Pagination.displayName = "Pagination";
|
|
5936
|
+
|
|
5937
|
+
export interface PaginationContentProps extends React.ComponentProps<"ul"> {
|
|
5938
|
+
/** Additional CSS classes for the list container */
|
|
5939
|
+
className?: string;
|
|
5940
|
+
}
|
|
5941
|
+
|
|
5942
|
+
function PaginationContent({
|
|
5943
|
+
className,
|
|
5944
|
+
...props
|
|
5945
|
+
}: PaginationContentProps) {
|
|
5946
|
+
return (
|
|
5947
|
+
<ul
|
|
5948
|
+
data-slot="pagination-content"
|
|
5949
|
+
className={cn("flex flex-row items-center gap-1", className)}
|
|
5950
|
+
{...props}
|
|
5951
|
+
/>
|
|
5952
|
+
);
|
|
5953
|
+
}
|
|
5954
|
+
PaginationContent.displayName = "PaginationContent";
|
|
5955
|
+
|
|
5956
|
+
export interface PaginationItemProps extends React.ComponentProps<"li"> {
|
|
5957
|
+
/** Additional CSS classes for the list item */
|
|
5958
|
+
className?: string;
|
|
5959
|
+
}
|
|
5960
|
+
|
|
5961
|
+
function PaginationItem({ ...props }: PaginationItemProps) {
|
|
5962
|
+
return <li data-slot="pagination-item" {...props} />;
|
|
5963
|
+
}
|
|
5964
|
+
PaginationItem.displayName = "PaginationItem";
|
|
5965
|
+
|
|
5966
|
+
export interface PaginationLinkProps
|
|
5967
|
+
extends Pick<ButtonProps, "size">,
|
|
5968
|
+
React.ComponentProps<"a"> {
|
|
5969
|
+
/** Highlights the link as the current page */
|
|
5970
|
+
isActive?: boolean;
|
|
5971
|
+
/** Size of the link (uses Button size variants) */
|
|
5972
|
+
size?: ButtonProps["size"];
|
|
5973
|
+
/** Additional CSS classes */
|
|
5974
|
+
className?: string;
|
|
5975
|
+
}
|
|
5976
|
+
|
|
5977
|
+
function PaginationLink({
|
|
5978
|
+
className,
|
|
5979
|
+
isActive,
|
|
5980
|
+
size = "icon",
|
|
5981
|
+
...props
|
|
5982
|
+
}: PaginationLinkProps) {
|
|
5983
|
+
return (
|
|
5984
|
+
<a
|
|
5985
|
+
aria-current={isActive ? "page" : undefined}
|
|
5986
|
+
data-slot="pagination-link"
|
|
5987
|
+
data-active={isActive}
|
|
5988
|
+
className={cn(
|
|
5989
|
+
buttonVariants({
|
|
5990
|
+
variant: isActive ? "outline" : "ghost",
|
|
5991
|
+
size,
|
|
5992
|
+
}),
|
|
5993
|
+
className
|
|
5994
|
+
)}
|
|
5995
|
+
{...props}
|
|
5996
|
+
/>
|
|
5997
|
+
);
|
|
5998
|
+
}
|
|
5999
|
+
PaginationLink.displayName = "PaginationLink";
|
|
6000
|
+
|
|
6001
|
+
export interface PaginationPreviousProps extends PaginationLinkProps {
|
|
6002
|
+
/** Additional CSS classes */
|
|
6003
|
+
className?: string;
|
|
6004
|
+
}
|
|
6005
|
+
|
|
6006
|
+
function PaginationPrevious({
|
|
6007
|
+
className,
|
|
6008
|
+
...props
|
|
6009
|
+
}: PaginationPreviousProps) {
|
|
6010
|
+
return (
|
|
6011
|
+
<PaginationLink
|
|
6012
|
+
aria-label="Go to previous page"
|
|
6013
|
+
size="default"
|
|
6014
|
+
className={cn("gap-1 px-2.5 sm:pl-2.5", className)}
|
|
6015
|
+
{...props}
|
|
6016
|
+
>
|
|
6017
|
+
<ChevronLeftIcon />
|
|
6018
|
+
<span className="hidden sm:block">Previous</span>
|
|
6019
|
+
</PaginationLink>
|
|
6020
|
+
);
|
|
6021
|
+
}
|
|
6022
|
+
PaginationPrevious.displayName = "PaginationPrevious";
|
|
6023
|
+
|
|
6024
|
+
export interface PaginationNextProps extends PaginationLinkProps {
|
|
6025
|
+
/** Additional CSS classes */
|
|
6026
|
+
className?: string;
|
|
6027
|
+
}
|
|
6028
|
+
|
|
6029
|
+
function PaginationNext({
|
|
6030
|
+
className,
|
|
6031
|
+
...props
|
|
6032
|
+
}: PaginationNextProps) {
|
|
6033
|
+
return (
|
|
6034
|
+
<PaginationLink
|
|
6035
|
+
aria-label="Go to next page"
|
|
6036
|
+
size="default"
|
|
6037
|
+
className={cn("gap-1 px-2.5 sm:pr-2.5", className)}
|
|
6038
|
+
{...props}
|
|
6039
|
+
>
|
|
6040
|
+
<span className="hidden sm:block">Next</span>
|
|
6041
|
+
<ChevronRightIcon />
|
|
6042
|
+
</PaginationLink>
|
|
6043
|
+
);
|
|
6044
|
+
}
|
|
6045
|
+
PaginationNext.displayName = "PaginationNext";
|
|
6046
|
+
|
|
6047
|
+
export interface PaginationEllipsisProps extends React.ComponentProps<"span"> {
|
|
6048
|
+
/** Additional CSS classes */
|
|
6049
|
+
className?: string;
|
|
6050
|
+
}
|
|
6051
|
+
|
|
6052
|
+
function PaginationEllipsis({
|
|
6053
|
+
className,
|
|
6054
|
+
...props
|
|
6055
|
+
}: PaginationEllipsisProps) {
|
|
6056
|
+
return (
|
|
6057
|
+
<span
|
|
6058
|
+
aria-hidden
|
|
6059
|
+
data-slot="pagination-ellipsis"
|
|
6060
|
+
className={cn("flex size-9 items-center justify-center", className)}
|
|
6061
|
+
{...props}
|
|
6062
|
+
>
|
|
6063
|
+
<MoreHorizontalIcon className="size-4" />
|
|
6064
|
+
<span className="sr-only">More pages</span>
|
|
6065
|
+
</span>
|
|
6066
|
+
);
|
|
6067
|
+
}
|
|
6068
|
+
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
6069
|
+
|
|
6070
|
+
export {
|
|
6071
|
+
Pagination,
|
|
6072
|
+
PaginationContent,
|
|
6073
|
+
PaginationLink,
|
|
6074
|
+
PaginationItem,
|
|
6075
|
+
PaginationPrevious,
|
|
6076
|
+
PaginationNext,
|
|
6077
|
+
PaginationEllipsis,
|
|
6078
|
+
};
|
|
5890
6079
|
`, prefix)
|
|
5891
6080
|
}
|
|
5892
6081
|
]
|
|
@@ -8206,7 +8395,7 @@ export type {
|
|
|
8206
8395
|
},
|
|
8207
8396
|
"payment-option-card": {
|
|
8208
8397
|
name: "payment-option-card",
|
|
8209
|
-
description: "A selectable payment method list with icons, titles, and descriptions",
|
|
8398
|
+
description: "A selectable payment method list with icons, titles, and descriptions. Includes a modal variant for overlay usage.",
|
|
8210
8399
|
category: "custom",
|
|
8211
8400
|
dependencies: [
|
|
8212
8401
|
"clsx",
|
|
@@ -8214,7 +8403,8 @@ export type {
|
|
|
8214
8403
|
"lucide-react"
|
|
8215
8404
|
],
|
|
8216
8405
|
internalDependencies: [
|
|
8217
|
-
"button"
|
|
8406
|
+
"button",
|
|
8407
|
+
"dialog"
|
|
8218
8408
|
],
|
|
8219
8409
|
isMultiFile: true,
|
|
8220
8410
|
directory: "payment-option-card",
|
|
@@ -8359,6 +8549,96 @@ export const PaymentOptionCard = React.forwardRef<
|
|
|
8359
8549
|
);
|
|
8360
8550
|
|
|
8361
8551
|
PaymentOptionCard.displayName = "PaymentOptionCard";
|
|
8552
|
+
`, prefix)
|
|
8553
|
+
},
|
|
8554
|
+
{
|
|
8555
|
+
name: "payment-option-card-modal.tsx",
|
|
8556
|
+
content: prefixTailwindClasses(`import * as React from "react";
|
|
8557
|
+
import {
|
|
8558
|
+
Dialog,
|
|
8559
|
+
DialogContent,
|
|
8560
|
+
DialogTitle,
|
|
8561
|
+
} from "../dialog";
|
|
8562
|
+
import { PaymentOptionCard } from "./payment-option-card";
|
|
8563
|
+
import type { PaymentOptionCardModalProps } from "./types";
|
|
8564
|
+
|
|
8565
|
+
/**
|
|
8566
|
+
* PaymentOptionCardModal wraps the PaymentOptionCard in a centered Dialog overlay.
|
|
8567
|
+
* Use this when you want to show payment method selection as a modal popup rather
|
|
8568
|
+
* than an inline card.
|
|
8569
|
+
*
|
|
8570
|
+
* @example
|
|
8571
|
+
* \`\`\`tsx
|
|
8572
|
+
* const [open, setOpen] = useState(false);
|
|
8573
|
+
*
|
|
8574
|
+
* <PaymentOptionCardModal
|
|
8575
|
+
* open={open}
|
|
8576
|
+
* onOpenChange={setOpen}
|
|
8577
|
+
* options={paymentOptions}
|
|
8578
|
+
* onOptionSelect={(id) => console.log(id)}
|
|
8579
|
+
* onCtaClick={() => { handlePayment(); setOpen(false); }}
|
|
8580
|
+
* />
|
|
8581
|
+
* \`\`\`
|
|
8582
|
+
*/
|
|
8583
|
+
export const PaymentOptionCardModal = React.forwardRef<
|
|
8584
|
+
HTMLDivElement,
|
|
8585
|
+
PaymentOptionCardModalProps
|
|
8586
|
+
>(
|
|
8587
|
+
(
|
|
8588
|
+
{
|
|
8589
|
+
open,
|
|
8590
|
+
onOpenChange,
|
|
8591
|
+
title,
|
|
8592
|
+
subtitle,
|
|
8593
|
+
options,
|
|
8594
|
+
selectedOptionId,
|
|
8595
|
+
defaultSelectedOptionId,
|
|
8596
|
+
onOptionSelect,
|
|
8597
|
+
ctaText,
|
|
8598
|
+
onCtaClick,
|
|
8599
|
+
loading,
|
|
8600
|
+
disabled,
|
|
8601
|
+
className,
|
|
8602
|
+
},
|
|
8603
|
+
ref
|
|
8604
|
+
) => {
|
|
8605
|
+
const handleClose = () => {
|
|
8606
|
+
onOpenChange(false);
|
|
8607
|
+
};
|
|
8608
|
+
|
|
8609
|
+
return (
|
|
8610
|
+
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
8611
|
+
<DialogContent
|
|
8612
|
+
ref={ref}
|
|
8613
|
+
size="sm"
|
|
8614
|
+
hideCloseButton
|
|
8615
|
+
className="p-0 border-0 bg-transparent shadow-none"
|
|
8616
|
+
>
|
|
8617
|
+
{/* Visually hidden title for accessibility */}
|
|
8618
|
+
<DialogTitle className="sr-only">
|
|
8619
|
+
{title || "Select payment method"}
|
|
8620
|
+
</DialogTitle>
|
|
8621
|
+
<PaymentOptionCard
|
|
8622
|
+
title={title}
|
|
8623
|
+
subtitle={subtitle}
|
|
8624
|
+
options={options}
|
|
8625
|
+
selectedOptionId={selectedOptionId}
|
|
8626
|
+
defaultSelectedOptionId={defaultSelectedOptionId}
|
|
8627
|
+
onOptionSelect={onOptionSelect}
|
|
8628
|
+
ctaText={ctaText}
|
|
8629
|
+
onCtaClick={onCtaClick}
|
|
8630
|
+
onClose={handleClose}
|
|
8631
|
+
loading={loading}
|
|
8632
|
+
disabled={disabled}
|
|
8633
|
+
className={className}
|
|
8634
|
+
/>
|
|
8635
|
+
</DialogContent>
|
|
8636
|
+
</Dialog>
|
|
8637
|
+
);
|
|
8638
|
+
}
|
|
8639
|
+
);
|
|
8640
|
+
|
|
8641
|
+
PaymentOptionCardModal.displayName = "PaymentOptionCardModal";
|
|
8362
8642
|
`, prefix)
|
|
8363
8643
|
},
|
|
8364
8644
|
{
|
|
@@ -8408,12 +8688,30 @@ export interface PaymentOptionCardProps {
|
|
|
8408
8688
|
/** Additional className for the root element */
|
|
8409
8689
|
className?: string;
|
|
8410
8690
|
}
|
|
8691
|
+
|
|
8692
|
+
/**
|
|
8693
|
+
* Props for the PaymentOptionCardModal component.
|
|
8694
|
+
* Extends the card props with Dialog open/close control, omitting \`onClose\`
|
|
8695
|
+
* which is handled internally by the modal.
|
|
8696
|
+
*/
|
|
8697
|
+
export interface PaymentOptionCardModalProps
|
|
8698
|
+
extends Omit<PaymentOptionCardProps, "onClose"> {
|
|
8699
|
+
/** Whether the modal is open */
|
|
8700
|
+
open: boolean;
|
|
8701
|
+
/** Callback when modal should open or close */
|
|
8702
|
+
onOpenChange: (open: boolean) => void;
|
|
8703
|
+
}
|
|
8411
8704
|
`, prefix)
|
|
8412
8705
|
},
|
|
8413
8706
|
{
|
|
8414
8707
|
name: "index.ts",
|
|
8415
8708
|
content: prefixTailwindClasses(`export { PaymentOptionCard } from "./payment-option-card";
|
|
8416
|
-
export
|
|
8709
|
+
export { PaymentOptionCardModal } from "./payment-option-card-modal";
|
|
8710
|
+
export type {
|
|
8711
|
+
PaymentOptionCardProps,
|
|
8712
|
+
PaymentOptionCardModalProps,
|
|
8713
|
+
PaymentOption,
|
|
8714
|
+
} from "./types";
|
|
8417
8715
|
`, prefix)
|
|
8418
8716
|
}
|
|
8419
8717
|
]
|