@raydenui/ui 0.9.4 → 0.9.5
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/README.md +11 -0
- package/dist/index.cjs +274 -23
- package/dist/index.d.cts +56 -3
- package/dist/index.d.ts +56 -3
- package/dist/index.js +270 -24
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6795,7 +6795,13 @@ function DayCell({ day, state, fullDate, onClick }) {
|
|
|
6795
6795
|
"aria-pressed": state === "selected" || state === "start-range" || state === "end-range" ? true : void 0,
|
|
6796
6796
|
children: [
|
|
6797
6797
|
day,
|
|
6798
|
-
state === "today" && /* @__PURE__ */ jsx(
|
|
6798
|
+
state === "today" && /* @__PURE__ */ jsx(
|
|
6799
|
+
"span",
|
|
6800
|
+
{
|
|
6801
|
+
className: "absolute bottom-[5px] left-1/2 -translate-x-1/2 size-1 rounded-full bg-primary-400",
|
|
6802
|
+
"aria-hidden": "true"
|
|
6803
|
+
}
|
|
6804
|
+
)
|
|
6799
6805
|
]
|
|
6800
6806
|
}
|
|
6801
6807
|
);
|
|
@@ -6851,7 +6857,15 @@ function MonthGrid({
|
|
|
6851
6857
|
if (rows.length === 6 && rows[5].every((c) => c.state === "disabled")) {
|
|
6852
6858
|
rows.pop();
|
|
6853
6859
|
}
|
|
6854
|
-
const fullDayNames = [
|
|
6860
|
+
const fullDayNames = [
|
|
6861
|
+
"Monday",
|
|
6862
|
+
"Tuesday",
|
|
6863
|
+
"Wednesday",
|
|
6864
|
+
"Thursday",
|
|
6865
|
+
"Friday",
|
|
6866
|
+
"Saturday",
|
|
6867
|
+
"Sunday"
|
|
6868
|
+
];
|
|
6855
6869
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col", role: "grid", "aria-label": "Calendar", children: [
|
|
6856
6870
|
/* @__PURE__ */ jsx("div", { className: "flex h-10 items-center", role: "row", children: DAY_LABELS.map((label, i) => /* @__PURE__ */ jsx(
|
|
6857
6871
|
"div",
|
|
@@ -7645,6 +7659,194 @@ function Badge({
|
|
|
7645
7659
|
}
|
|
7646
7660
|
);
|
|
7647
7661
|
}
|
|
7662
|
+
var CardContext = createContext(null);
|
|
7663
|
+
function useCardContext() {
|
|
7664
|
+
const ctx = useContext(CardContext);
|
|
7665
|
+
return ctx ?? { size: "md" };
|
|
7666
|
+
}
|
|
7667
|
+
var variantStyles = {
|
|
7668
|
+
default: "border border-grey-200 bg-white dark:bg-grey-50",
|
|
7669
|
+
outlined: "border-2 border-grey-300 bg-transparent",
|
|
7670
|
+
elevated: "border border-grey-100 bg-white dark:bg-grey-50 shadow-soft-md",
|
|
7671
|
+
ghost: "border-none bg-transparent"
|
|
7672
|
+
};
|
|
7673
|
+
var sizeStyles2 = {
|
|
7674
|
+
sm: {
|
|
7675
|
+
header: "px-4 py-3",
|
|
7676
|
+
body: "px-4 py-3",
|
|
7677
|
+
footer: "px-4 py-3"
|
|
7678
|
+
},
|
|
7679
|
+
md: {
|
|
7680
|
+
header: "px-5 py-4",
|
|
7681
|
+
body: "px-5 py-4",
|
|
7682
|
+
footer: "px-5 py-4"
|
|
7683
|
+
},
|
|
7684
|
+
lg: {
|
|
7685
|
+
header: "px-6 py-5",
|
|
7686
|
+
body: "px-6 py-5",
|
|
7687
|
+
footer: "px-6 py-5"
|
|
7688
|
+
}
|
|
7689
|
+
};
|
|
7690
|
+
var roundedStyles = {
|
|
7691
|
+
sm: "rounded-lg",
|
|
7692
|
+
md: "rounded-[10px]",
|
|
7693
|
+
lg: "rounded-xl",
|
|
7694
|
+
xl: "rounded-2xl",
|
|
7695
|
+
full: "rounded-3xl"
|
|
7696
|
+
};
|
|
7697
|
+
var shadowStyles = {
|
|
7698
|
+
none: "",
|
|
7699
|
+
sm: "shadow-soft-xxs",
|
|
7700
|
+
md: "shadow-soft-xs",
|
|
7701
|
+
lg: "shadow-soft-sm"
|
|
7702
|
+
};
|
|
7703
|
+
var footerAlignStyles = {
|
|
7704
|
+
left: "justify-start",
|
|
7705
|
+
center: "justify-center",
|
|
7706
|
+
right: "justify-end",
|
|
7707
|
+
between: "justify-between"
|
|
7708
|
+
};
|
|
7709
|
+
var aspectRatioStyles = {
|
|
7710
|
+
auto: "",
|
|
7711
|
+
video: "aspect-video",
|
|
7712
|
+
square: "aspect-square",
|
|
7713
|
+
portrait: "aspect-[3/4]"
|
|
7714
|
+
};
|
|
7715
|
+
var Card = forwardRef(
|
|
7716
|
+
({
|
|
7717
|
+
variant = "default",
|
|
7718
|
+
size = "md",
|
|
7719
|
+
rounded = "lg",
|
|
7720
|
+
shadow = "sm",
|
|
7721
|
+
hoverable = false,
|
|
7722
|
+
className,
|
|
7723
|
+
children,
|
|
7724
|
+
...rest
|
|
7725
|
+
}, ref) => {
|
|
7726
|
+
return /* @__PURE__ */ jsx(CardContext.Provider, { value: { size }, children: /* @__PURE__ */ jsx(
|
|
7727
|
+
"div",
|
|
7728
|
+
{
|
|
7729
|
+
ref,
|
|
7730
|
+
className: cn(
|
|
7731
|
+
"flex flex-col overflow-hidden",
|
|
7732
|
+
variantStyles[variant],
|
|
7733
|
+
roundedStyles[rounded],
|
|
7734
|
+
variant !== "elevated" && shadowStyles[shadow],
|
|
7735
|
+
hoverable && "transition-shadow duration-200 hover:shadow-soft-md",
|
|
7736
|
+
className
|
|
7737
|
+
),
|
|
7738
|
+
...rest,
|
|
7739
|
+
children
|
|
7740
|
+
}
|
|
7741
|
+
) });
|
|
7742
|
+
}
|
|
7743
|
+
);
|
|
7744
|
+
Card.displayName = "Card";
|
|
7745
|
+
var CardHeader = forwardRef(
|
|
7746
|
+
({ title, subtitle, actions, bordered = false, className, children, ...rest }, ref) => {
|
|
7747
|
+
const { size } = useCardContext();
|
|
7748
|
+
return /* @__PURE__ */ jsxs(
|
|
7749
|
+
"div",
|
|
7750
|
+
{
|
|
7751
|
+
ref,
|
|
7752
|
+
className: cn(
|
|
7753
|
+
"flex items-start justify-between gap-4",
|
|
7754
|
+
sizeStyles2[size].header,
|
|
7755
|
+
bordered && "border-b border-grey-200",
|
|
7756
|
+
className
|
|
7757
|
+
),
|
|
7758
|
+
...rest,
|
|
7759
|
+
children: [
|
|
7760
|
+
(title || subtitle || children) && /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
7761
|
+
title && /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold leading-[1.45] text-grey-900", children: title }),
|
|
7762
|
+
subtitle && /* @__PURE__ */ jsx("p", { className: "text-sm leading-[1.45] text-grey-500", children: subtitle }),
|
|
7763
|
+
children
|
|
7764
|
+
] }),
|
|
7765
|
+
actions && /* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-center gap-2", children: actions })
|
|
7766
|
+
]
|
|
7767
|
+
}
|
|
7768
|
+
);
|
|
7769
|
+
}
|
|
7770
|
+
);
|
|
7771
|
+
CardHeader.displayName = "CardHeader";
|
|
7772
|
+
var CardBody = forwardRef(
|
|
7773
|
+
({ noPadding = false, className, children, ...rest }, ref) => {
|
|
7774
|
+
const { size } = useCardContext();
|
|
7775
|
+
return /* @__PURE__ */ jsx(
|
|
7776
|
+
"div",
|
|
7777
|
+
{
|
|
7778
|
+
ref,
|
|
7779
|
+
className: cn("flex-1", !noPadding && sizeStyles2[size].body, className),
|
|
7780
|
+
...rest,
|
|
7781
|
+
children
|
|
7782
|
+
}
|
|
7783
|
+
);
|
|
7784
|
+
}
|
|
7785
|
+
);
|
|
7786
|
+
CardBody.displayName = "CardBody";
|
|
7787
|
+
var CardFooter = forwardRef(
|
|
7788
|
+
({ align = "right", bordered = false, className, children, ...rest }, ref) => {
|
|
7789
|
+
const { size } = useCardContext();
|
|
7790
|
+
return /* @__PURE__ */ jsx(
|
|
7791
|
+
"div",
|
|
7792
|
+
{
|
|
7793
|
+
ref,
|
|
7794
|
+
className: cn(
|
|
7795
|
+
"flex items-center gap-3",
|
|
7796
|
+
sizeStyles2[size].footer,
|
|
7797
|
+
footerAlignStyles[align],
|
|
7798
|
+
bordered && "border-t border-grey-200",
|
|
7799
|
+
className
|
|
7800
|
+
),
|
|
7801
|
+
...rest,
|
|
7802
|
+
children
|
|
7803
|
+
}
|
|
7804
|
+
);
|
|
7805
|
+
}
|
|
7806
|
+
);
|
|
7807
|
+
CardFooter.displayName = "CardFooter";
|
|
7808
|
+
var CardImage = forwardRef(
|
|
7809
|
+
({
|
|
7810
|
+
position = "top",
|
|
7811
|
+
aspectRatio = "auto",
|
|
7812
|
+
objectFit = "cover",
|
|
7813
|
+
alt,
|
|
7814
|
+
className,
|
|
7815
|
+
...rest
|
|
7816
|
+
}, ref) => {
|
|
7817
|
+
const objectFitClasses = {
|
|
7818
|
+
cover: "object-cover",
|
|
7819
|
+
contain: "object-contain",
|
|
7820
|
+
fill: "object-fill"
|
|
7821
|
+
};
|
|
7822
|
+
return /* @__PURE__ */ jsx(
|
|
7823
|
+
"div",
|
|
7824
|
+
{
|
|
7825
|
+
className: cn(
|
|
7826
|
+
"w-full overflow-hidden",
|
|
7827
|
+
position === "top" && "first:rounded-t-[inherit]",
|
|
7828
|
+
position === "bottom" && "last:rounded-b-[inherit]",
|
|
7829
|
+
position === "full" && "first:rounded-t-[inherit] last:rounded-b-[inherit]"
|
|
7830
|
+
),
|
|
7831
|
+
children: /* @__PURE__ */ jsx(
|
|
7832
|
+
"img",
|
|
7833
|
+
{
|
|
7834
|
+
ref,
|
|
7835
|
+
alt,
|
|
7836
|
+
className: cn(
|
|
7837
|
+
"w-full",
|
|
7838
|
+
aspectRatioStyles[aspectRatio],
|
|
7839
|
+
objectFitClasses[objectFit],
|
|
7840
|
+
className
|
|
7841
|
+
),
|
|
7842
|
+
...rest
|
|
7843
|
+
}
|
|
7844
|
+
)
|
|
7845
|
+
}
|
|
7846
|
+
);
|
|
7847
|
+
}
|
|
7848
|
+
);
|
|
7849
|
+
CardImage.displayName = "CardImage";
|
|
7648
7850
|
var stateStyles = {
|
|
7649
7851
|
information: {
|
|
7650
7852
|
border: "bg-secondary-500",
|
|
@@ -8890,7 +9092,30 @@ function Variation6({ label, value, icon, trendBadge, description, cta }) {
|
|
|
8890
9092
|
cta && /* @__PURE__ */ jsx(CtaFooter, { cta, centered: true })
|
|
8891
9093
|
] });
|
|
8892
9094
|
}
|
|
8893
|
-
function MetricsCard({
|
|
9095
|
+
function MetricsCard({
|
|
9096
|
+
variation = "2",
|
|
9097
|
+
className,
|
|
9098
|
+
// Destructure component-specific props to prevent them from being spread to DOM
|
|
9099
|
+
label,
|
|
9100
|
+
value,
|
|
9101
|
+
icon,
|
|
9102
|
+
trendBadge,
|
|
9103
|
+
statusBadge,
|
|
9104
|
+
description,
|
|
9105
|
+
secondaryText,
|
|
9106
|
+
cta,
|
|
9107
|
+
...rest
|
|
9108
|
+
}) {
|
|
9109
|
+
const componentProps = {
|
|
9110
|
+
label,
|
|
9111
|
+
value,
|
|
9112
|
+
icon,
|
|
9113
|
+
trendBadge,
|
|
9114
|
+
statusBadge,
|
|
9115
|
+
description,
|
|
9116
|
+
secondaryText,
|
|
9117
|
+
cta
|
|
9118
|
+
};
|
|
8894
9119
|
return /* @__PURE__ */ jsxs(
|
|
8895
9120
|
"div",
|
|
8896
9121
|
{
|
|
@@ -8898,14 +9123,14 @@ function MetricsCard({ variation = "2", className, ...props }) {
|
|
|
8898
9123
|
"flex flex-col overflow-clip rounded-xl border border-grey-200 bg-white dark:bg-grey-50 shadow-soft-xxs",
|
|
8899
9124
|
className
|
|
8900
9125
|
),
|
|
8901
|
-
...
|
|
9126
|
+
...rest,
|
|
8902
9127
|
children: [
|
|
8903
|
-
variation === "1" && /* @__PURE__ */ jsx(Variation1, { ...
|
|
8904
|
-
variation === "2" && /* @__PURE__ */ jsx(Variation2, { ...
|
|
8905
|
-
variation === "3" && /* @__PURE__ */ jsx(Variation3, { ...
|
|
8906
|
-
variation === "4" && /* @__PURE__ */ jsx(Variation4, { ...
|
|
8907
|
-
variation === "5" && /* @__PURE__ */ jsx(Variation5, { ...
|
|
8908
|
-
variation === "6" && /* @__PURE__ */ jsx(Variation6, { ...
|
|
9128
|
+
variation === "1" && /* @__PURE__ */ jsx(Variation1, { ...componentProps }),
|
|
9129
|
+
variation === "2" && /* @__PURE__ */ jsx(Variation2, { ...componentProps }),
|
|
9130
|
+
variation === "3" && /* @__PURE__ */ jsx(Variation3, { ...componentProps }),
|
|
9131
|
+
variation === "4" && /* @__PURE__ */ jsx(Variation4, { ...componentProps }),
|
|
9132
|
+
variation === "5" && /* @__PURE__ */ jsx(Variation5, { ...componentProps }),
|
|
9133
|
+
variation === "6" && /* @__PURE__ */ jsx(Variation6, { ...componentProps })
|
|
8909
9134
|
]
|
|
8910
9135
|
}
|
|
8911
9136
|
);
|
|
@@ -9069,19 +9294,34 @@ var FileUploadDropZone = forwardRef(
|
|
|
9069
9294
|
] }),
|
|
9070
9295
|
/* @__PURE__ */ jsx(Button, { variant: "primary", size: "sm", onClick: handleBrowse, children: "Browse Files" })
|
|
9071
9296
|
] }),
|
|
9072
|
-
state === "uploading" && uploadingFile && /* @__PURE__ */ jsxs(
|
|
9073
|
-
|
|
9074
|
-
|
|
9075
|
-
|
|
9076
|
-
|
|
9077
|
-
|
|
9078
|
-
|
|
9079
|
-
|
|
9297
|
+
state === "uploading" && uploadingFile && /* @__PURE__ */ jsxs(
|
|
9298
|
+
"div",
|
|
9299
|
+
{
|
|
9300
|
+
className: "flex w-full flex-col items-center gap-4",
|
|
9301
|
+
"aria-live": "polite",
|
|
9302
|
+
"aria-atomic": "true",
|
|
9303
|
+
children: [
|
|
9304
|
+
/* @__PURE__ */ jsx(FileTypeIcon, { type: getFileType(uploadingFile.name), "aria-hidden": "true" }),
|
|
9305
|
+
/* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-xs flex-col gap-2", children: [
|
|
9306
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
9307
|
+
/* @__PURE__ */ jsx("span", { className: "text-body-sm font-medium text-grey-700 truncate", children: uploadingFile.name }),
|
|
9308
|
+
/* @__PURE__ */ jsxs(
|
|
9309
|
+
"span",
|
|
9310
|
+
{
|
|
9311
|
+
className: "text-body-xs font-medium text-grey-500 ml-2 shrink-0",
|
|
9312
|
+
"aria-label": `Upload progress: ${Math.round(uploadingFile.progress)} percent`,
|
|
9313
|
+
children: [
|
|
9314
|
+
Math.round(uploadingFile.progress),
|
|
9315
|
+
"%"
|
|
9316
|
+
]
|
|
9317
|
+
}
|
|
9318
|
+
)
|
|
9319
|
+
] }),
|
|
9320
|
+
/* @__PURE__ */ jsx(ProgressBar, { value: uploadingFile.progress, size: "sm", showPercentage: false })
|
|
9080
9321
|
] })
|
|
9081
|
-
]
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
] }),
|
|
9322
|
+
]
|
|
9323
|
+
}
|
|
9324
|
+
),
|
|
9085
9325
|
state === "success" && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", role: "status", children: [
|
|
9086
9326
|
/* @__PURE__ */ jsx(UploadStateIcon, { state: "success", size: 56, "aria-hidden": "true" }),
|
|
9087
9327
|
/* @__PURE__ */ jsx("div", { className: "flex flex-col items-center gap-1", children: /* @__PURE__ */ jsx("p", { className: "text-body-sm font-semibold text-grey-800", children: "Document Uploaded Successfully" }) }),
|
|
@@ -14361,7 +14601,13 @@ var ActivityItem = forwardRef(
|
|
|
14361
14601
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 w-full", children: [
|
|
14362
14602
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full", children: [
|
|
14363
14603
|
/* @__PURE__ */ jsx("div", { className: "flex flex-1 items-start gap-1 min-w-0", children: /* @__PURE__ */ jsx("span", { className: "text-body-sm leading-5 text-grey-600", children: text }) }),
|
|
14364
|
-
unread && /* @__PURE__ */ jsx(
|
|
14604
|
+
unread && /* @__PURE__ */ jsx(
|
|
14605
|
+
"span",
|
|
14606
|
+
{
|
|
14607
|
+
className: "shrink-0 size-2 rounded-full bg-[#04802E] border-[1.5px] border-white",
|
|
14608
|
+
"aria-hidden": "true"
|
|
14609
|
+
}
|
|
14610
|
+
),
|
|
14365
14611
|
unread && /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Unread" })
|
|
14366
14612
|
] }),
|
|
14367
14613
|
(date || time || link || badge) && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-1 w-full", children: [
|
|
@@ -14705,4 +14951,4 @@ function useRaydenRadio({
|
|
|
14705
14951
|
};
|
|
14706
14952
|
}
|
|
14707
14953
|
|
|
14708
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityContent, ActivityItem, Alert, Avatar, AvatarGroup, Badge, Banner, Breadcrumb, Button, ButtonGroup, ButtonGroupItem, Checkbox, Chip, Counter, DatePicker, Divider, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EmptyStateIllustration, FileUpload, FileUploadDropZone, FileUploadItem, Icon, Input, LinearStepper, MetricsCard, Modal, NumberCounter, Pagination, ProgressBar, ProgressCircle, Radio, RangeSlider, RaydenChart, SegmentedStepper, Select, SelectOption, SidebarMenu, SidebarMenuItem, SidebarMenuSection, SidebarMenuSub, SidebarMenuSubItem, Slider, Spinner, Stepper, Tab, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Tabs, ThemeProvider, Toggle, Tooltip2 as Tooltip, chartColors, chartFont, cn, createGradientFill, hexToRgba, illustrationNames, useRaydenCheckbox, useRaydenInput, useRaydenRadio, useRaydenSelect, useRaydenToggle, useResolvedTheme, useTheme };
|
|
14954
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityContent, ActivityItem, Alert, Avatar, AvatarGroup, Badge, Banner, Breadcrumb, Button, ButtonGroup, ButtonGroupItem, Card, CardBody, CardFooter, CardHeader, CardImage, Checkbox, Chip, Counter, DatePicker, Divider, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EmptyStateIllustration, FileUpload, FileUploadDropZone, FileUploadItem, Icon, Input, LinearStepper, MetricsCard, Modal, NumberCounter, Pagination, ProgressBar, ProgressCircle, Radio, RangeSlider, RaydenChart, SegmentedStepper, Select, SelectOption, SidebarMenu, SidebarMenuItem, SidebarMenuSection, SidebarMenuSub, SidebarMenuSubItem, Slider, Spinner, Stepper, Tab, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Tabs, ThemeProvider, Toggle, Tooltip2 as Tooltip, chartColors, chartFont, cn, createGradientFill, hexToRgba, illustrationNames, useRaydenCheckbox, useRaydenInput, useRaydenRadio, useRaydenSelect, useRaydenToggle, useResolvedTheme, useTheme };
|