@raydenui/ui 0.9.4 → 0.9.6
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 +289 -42
- package/dist/index.d.cts +56 -3
- package/dist/index.d.ts +56 -3
- package/dist/index.js +285 -43
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { SVGAttributes, HTMLAttributes, ReactNode, ButtonHTMLAttributes, InputHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes } from 'react';
|
|
2
|
+
import { SVGAttributes, HTMLAttributes, ReactNode, ButtonHTMLAttributes, InputHTMLAttributes, ImgHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes } from 'react';
|
|
3
3
|
import { IconVariant, IconName, IconRecord } from './icons.js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import { ChartData, ChartOptions } from 'chart.js';
|
|
@@ -329,6 +329,59 @@ interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
329
329
|
}
|
|
330
330
|
declare function Badge({ color, type, size, leadingIcon, trailingIcon, className, children, ...rest }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
331
331
|
|
|
332
|
+
type CardVariant = "default" | "outlined" | "elevated" | "ghost";
|
|
333
|
+
type CardSize = "sm" | "md" | "lg";
|
|
334
|
+
type CardRounded = "sm" | "md" | "lg" | "xl" | "full";
|
|
335
|
+
type CardShadow = "none" | "sm" | "md" | "lg";
|
|
336
|
+
type CardImagePosition = "top" | "bottom" | "full";
|
|
337
|
+
interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
338
|
+
/** Visual style variant */
|
|
339
|
+
variant?: CardVariant;
|
|
340
|
+
/** Padding scale for sub-components */
|
|
341
|
+
size?: CardSize;
|
|
342
|
+
/** Corner radius */
|
|
343
|
+
rounded?: CardRounded;
|
|
344
|
+
/** Shadow intensity */
|
|
345
|
+
shadow?: CardShadow;
|
|
346
|
+
/** Enable hover shadow effect */
|
|
347
|
+
hoverable?: boolean;
|
|
348
|
+
}
|
|
349
|
+
interface CardHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
350
|
+
/** Header title */
|
|
351
|
+
title?: ReactNode;
|
|
352
|
+
/** Header subtitle */
|
|
353
|
+
subtitle?: ReactNode;
|
|
354
|
+
/** Actions slot (right side) */
|
|
355
|
+
actions?: ReactNode;
|
|
356
|
+
/** Show bottom border */
|
|
357
|
+
bordered?: boolean;
|
|
358
|
+
}
|
|
359
|
+
interface CardBodyProps extends HTMLAttributes<HTMLDivElement> {
|
|
360
|
+
/** Remove default padding */
|
|
361
|
+
noPadding?: boolean;
|
|
362
|
+
}
|
|
363
|
+
interface CardFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
364
|
+
/** Footer content alignment */
|
|
365
|
+
align?: "left" | "center" | "right" | "between";
|
|
366
|
+
/** Show top border */
|
|
367
|
+
bordered?: boolean;
|
|
368
|
+
}
|
|
369
|
+
interface CardImageProps extends ImgHTMLAttributes<HTMLImageElement> {
|
|
370
|
+
/** Image position relative to card content */
|
|
371
|
+
position?: CardImagePosition;
|
|
372
|
+
/** Aspect ratio */
|
|
373
|
+
aspectRatio?: "auto" | "video" | "square" | "portrait";
|
|
374
|
+
/** Object fit behavior */
|
|
375
|
+
objectFit?: "cover" | "contain" | "fill";
|
|
376
|
+
/** Alt text (required for accessibility) */
|
|
377
|
+
alt: string;
|
|
378
|
+
}
|
|
379
|
+
declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>>;
|
|
380
|
+
declare const CardHeader: react.ForwardRefExoticComponent<CardHeaderProps & react.RefAttributes<HTMLDivElement>>;
|
|
381
|
+
declare const CardBody: react.ForwardRefExoticComponent<CardBodyProps & react.RefAttributes<HTMLDivElement>>;
|
|
382
|
+
declare const CardFooter: react.ForwardRefExoticComponent<CardFooterProps & react.RefAttributes<HTMLDivElement>>;
|
|
383
|
+
declare const CardImage: react.ForwardRefExoticComponent<CardImageProps & react.RefAttributes<HTMLImageElement>>;
|
|
384
|
+
|
|
332
385
|
type AlertVariant = "toast" | "banner";
|
|
333
386
|
type AlertState = "information" | "success" | "warning" | "error";
|
|
334
387
|
interface AlertAction {
|
|
@@ -525,7 +578,7 @@ interface MetricsCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
525
578
|
/** Call-to-action link */
|
|
526
579
|
cta?: MetricsCardCta;
|
|
527
580
|
}
|
|
528
|
-
declare function MetricsCard({ variation, className, ...
|
|
581
|
+
declare function MetricsCard({ variation, className, label, value, icon, trendBadge, statusBadge, description, secondaryText, cta, ...rest }: MetricsCardProps): react_jsx_runtime.JSX.Element;
|
|
529
582
|
|
|
530
583
|
type FileUploadItemStatus = "pending" | "uploading" | "complete" | "error";
|
|
531
584
|
interface FileUploadFileData {
|
|
@@ -1152,4 +1205,4 @@ declare function useRaydenRadio<TFieldValues extends FieldValues = FieldValues,
|
|
|
1152
1205
|
value: string;
|
|
1153
1206
|
}): UseRaydenRadioReturn<TName>;
|
|
1154
1207
|
|
|
1155
|
-
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type AccordionType, ActivityContent, type ActivityContentAction, type ActivityContentAttachment, type ActivityContentProps, type ActivityContentStyle, type ActivityContentVariant, ActivityItem, type ActivityItemLink, type ActivityItemProps, Alert, type AlertAction, type AlertProps, type AlertState, type AlertVariant, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarGroupSize, type AvatarProps, type AvatarSize, type AvatarStatus, type AvatarType, Badge, type BadgeColor, type BadgeProps, type BadgeSize, type BadgeType, Banner, type BannerEmphasis, type BannerProps, type BannerSize, type BannerStatus, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSeparator, Button, type ButtonAppearance, ButtonGroup, ButtonGroupItem, type ButtonGroupItemProps, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, type ChartType, Checkbox, type CheckboxProps, Chip, type ChipProps, Counter, type CounterProps, type CounterShape, type CounterSize, DatePicker, type DatePickerMode, type DatePickerProps, Divider, type DividerProps, type DividerVariant, type DropZoneState, DropdownMenu, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmptyStateIllustration, type EmptyStateIllustrationProps, FileUpload, FileUploadDropZone, type FileUploadDropZoneProps, type FileUploadFileData, FileUploadItem, type FileUploadItemProps, type FileUploadItemStatus, type FileUploadProps, Icon, IconName, type IconProps, type IconSize, IconVariant, type IllustrationName, Input, type InputProps, type InputSize, LinearStepper, type LinearStepperProps, MetricsCard, type MetricsCardCta, type MetricsCardProps, type MetricsCardStatusBadge, type MetricsCardTrend, type MetricsCardTrendBadge, type MetricsCardVariation, Modal, type ModalProps, type ModalSize, NumberCounter, type NumberCounterColor, type NumberCounterProps, type NumberCounterSize, Pagination, type PaginationProps, ProgressBar, type ProgressBarProps, type ProgressBarSize, type ProgressBarType, ProgressCircle, type ProgressCircleProps, type ProgressCircleSize, type ProgressCircleStyle, Radio, type RadioProps, RangeSlider, type RangeSliderProps, RaydenChart, type RaydenChartProps, type ResolvedTheme, SegmentedStepper, type SegmentedStepperProps, Select, SelectOption, type SelectOptionProps, type SelectProps, SidebarMenu, type SidebarMenuContextValue, SidebarMenuItem, type SidebarMenuItemProps, type SidebarMenuProps, SidebarMenuSection, type SidebarMenuSectionProps, SidebarMenuSub, SidebarMenuSubItem, type SidebarMenuSubItemProps, type SidebarMenuSubProps, type SidebarMenuTheme, Slider, type SliderProps, type SliderSize, type SortDirection, Spinner, type SpinnerLabelPosition, type SpinnerProps, type SpinnerSize, type SpinnerStyle, type SpinnerType, type StepIndicator, type StepItem, type StepStatus, Stepper, type StepperOrientation, type StepperProps, Tab, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsOrientation, type TabsProps, type TabsSize, type TabsVariant, type Theme, ThemeProvider, type ThemeProviderProps, Toggle, type ToggleProps, Tooltip, type TooltipAction, type TooltipPosition, type TooltipProps, type TooltipTheme, type UseRaydenCheckboxReturn, type UseRaydenFormControlOptions, type UseRaydenInputOptions, type UseRaydenInputReturn, type UseRaydenRadioReturn, type UseRaydenSelectOptions, type UseRaydenSelectReturn, chartColors, chartFont, cn, createGradientFill, hexToRgba, illustrationNames, useRaydenCheckbox, useRaydenInput, useRaydenRadio, useRaydenSelect, useRaydenToggle, useResolvedTheme, useTheme };
|
|
1208
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type AccordionType, ActivityContent, type ActivityContentAction, type ActivityContentAttachment, type ActivityContentProps, type ActivityContentStyle, type ActivityContentVariant, ActivityItem, type ActivityItemLink, type ActivityItemProps, Alert, type AlertAction, type AlertProps, type AlertState, type AlertVariant, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarGroupSize, type AvatarProps, type AvatarSize, type AvatarStatus, type AvatarType, Badge, type BadgeColor, type BadgeProps, type BadgeSize, type BadgeType, Banner, type BannerEmphasis, type BannerProps, type BannerSize, type BannerStatus, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSeparator, Button, type ButtonAppearance, ButtonGroup, ButtonGroupItem, type ButtonGroupItemProps, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardBody, type CardBodyProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, CardImage, type CardImagePosition, type CardImageProps, type CardProps, type CardRounded, type CardShadow, type CardSize, type CardVariant, type ChartType, Checkbox, type CheckboxProps, Chip, type ChipProps, Counter, type CounterProps, type CounterShape, type CounterSize, DatePicker, type DatePickerMode, type DatePickerProps, Divider, type DividerProps, type DividerVariant, type DropZoneState, DropdownMenu, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmptyStateIllustration, type EmptyStateIllustrationProps, FileUpload, FileUploadDropZone, type FileUploadDropZoneProps, type FileUploadFileData, FileUploadItem, type FileUploadItemProps, type FileUploadItemStatus, type FileUploadProps, Icon, IconName, type IconProps, type IconSize, IconVariant, type IllustrationName, Input, type InputProps, type InputSize, LinearStepper, type LinearStepperProps, MetricsCard, type MetricsCardCta, type MetricsCardProps, type MetricsCardStatusBadge, type MetricsCardTrend, type MetricsCardTrendBadge, type MetricsCardVariation, Modal, type ModalProps, type ModalSize, NumberCounter, type NumberCounterColor, type NumberCounterProps, type NumberCounterSize, Pagination, type PaginationProps, ProgressBar, type ProgressBarProps, type ProgressBarSize, type ProgressBarType, ProgressCircle, type ProgressCircleProps, type ProgressCircleSize, type ProgressCircleStyle, Radio, type RadioProps, RangeSlider, type RangeSliderProps, RaydenChart, type RaydenChartProps, type ResolvedTheme, SegmentedStepper, type SegmentedStepperProps, Select, SelectOption, type SelectOptionProps, type SelectProps, SidebarMenu, type SidebarMenuContextValue, SidebarMenuItem, type SidebarMenuItemProps, type SidebarMenuProps, SidebarMenuSection, type SidebarMenuSectionProps, SidebarMenuSub, SidebarMenuSubItem, type SidebarMenuSubItemProps, type SidebarMenuSubProps, type SidebarMenuTheme, Slider, type SliderProps, type SliderSize, type SortDirection, Spinner, type SpinnerLabelPosition, type SpinnerProps, type SpinnerSize, type SpinnerStyle, type SpinnerType, type StepIndicator, type StepItem, type StepStatus, Stepper, type StepperOrientation, type StepperProps, Tab, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsOrientation, type TabsProps, type TabsSize, type TabsVariant, type Theme, ThemeProvider, type ThemeProviderProps, Toggle, type ToggleProps, Tooltip, type TooltipAction, type TooltipPosition, type TooltipProps, type TooltipTheme, type UseRaydenCheckboxReturn, type UseRaydenFormControlOptions, type UseRaydenInputOptions, type UseRaydenInputReturn, type UseRaydenRadioReturn, type UseRaydenSelectOptions, type UseRaydenSelectReturn, chartColors, chartFont, cn, createGradientFill, hexToRgba, illustrationNames, useRaydenCheckbox, useRaydenInput, useRaydenRadio, useRaydenSelect, useRaydenToggle, useResolvedTheme, useTheme };
|
package/dist/index.js
CHANGED
|
@@ -5763,7 +5763,7 @@ var AccordionTrigger = forwardRef(
|
|
|
5763
5763
|
onClick: () => toggle(value),
|
|
5764
5764
|
className: cn(
|
|
5765
5765
|
"flex items-center gap-3 px-4 py-6 w-full text-left transition-colors",
|
|
5766
|
-
!isOpen && !disabled && "hover:bg-grey-50",
|
|
5766
|
+
!isOpen && !disabled && "hover:bg-grey-50 dark:hover:bg-grey-100",
|
|
5767
5767
|
disabled && "opacity-50 cursor-not-allowed",
|
|
5768
5768
|
className
|
|
5769
5769
|
),
|
|
@@ -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",
|
|
@@ -6903,7 +6917,8 @@ function YearGrid({ baseYear, selectedYear, onYearClick }) {
|
|
|
6903
6917
|
function NavButton({
|
|
6904
6918
|
direction,
|
|
6905
6919
|
onClick,
|
|
6906
|
-
hidden
|
|
6920
|
+
hidden,
|
|
6921
|
+
className
|
|
6907
6922
|
}) {
|
|
6908
6923
|
return /* @__PURE__ */ jsx(
|
|
6909
6924
|
"button",
|
|
@@ -6915,7 +6930,8 @@ function NavButton({
|
|
|
6915
6930
|
tabIndex: hidden ? -1 : void 0,
|
|
6916
6931
|
className: cn(
|
|
6917
6932
|
"flex items-center justify-center p-2 rounded-lg bg-grey-75 hover:bg-grey-200 transition-colors cursor-pointer",
|
|
6918
|
-
hidden && "opacity-0 pointer-events-none"
|
|
6933
|
+
hidden && "opacity-0 pointer-events-none",
|
|
6934
|
+
className
|
|
6919
6935
|
),
|
|
6920
6936
|
children: direction === "left" ? /* @__PURE__ */ jsx(ChevronLeft, { className: "size-3.5 text-grey-700" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "size-3.5 text-grey-700" })
|
|
6921
6937
|
}
|
|
@@ -7009,7 +7025,7 @@ var DatePicker = forwardRef(
|
|
|
7009
7025
|
className: cn(
|
|
7010
7026
|
"bg-white dark:bg-grey-50 border border-grey-75 rounded-2xl p-5 shadow-soft-xs",
|
|
7011
7027
|
"flex flex-col gap-6",
|
|
7012
|
-
mode !== "range" && "w-[340px]",
|
|
7028
|
+
mode !== "range" && "w-full max-w-[340px]",
|
|
7013
7029
|
className
|
|
7014
7030
|
),
|
|
7015
7031
|
...rest,
|
|
@@ -7042,15 +7058,16 @@ var DatePicker = forwardRef(
|
|
|
7042
7058
|
}
|
|
7043
7059
|
)
|
|
7044
7060
|
] }) }),
|
|
7045
|
-
mode === "range" && /* @__PURE__ */ jsxs("div", { className: "flex gap-8", children: [
|
|
7061
|
+
mode === "range" && /* @__PURE__ */ jsxs("div", { className: "flex flex-col md:flex-row gap-6 md:gap-8", children: [
|
|
7046
7062
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
7047
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center
|
|
7063
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full md:w-[280px]", children: [
|
|
7048
7064
|
/* @__PURE__ */ jsx(NavButton, { direction: "left", onClick: goToPrevMonth }),
|
|
7049
7065
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
7050
7066
|
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-grey-700", children: monthYearLabel }),
|
|
7051
7067
|
/* @__PURE__ */ jsx(ChevronDown2, { className: "size-6 text-grey-500" })
|
|
7052
7068
|
] }),
|
|
7053
|
-
/* @__PURE__ */ jsx(NavButton, { direction: "right",
|
|
7069
|
+
/* @__PURE__ */ jsx(NavButton, { direction: "right", onClick: goToNextMonth, className: "md:hidden" }),
|
|
7070
|
+
/* @__PURE__ */ jsx(NavButton, { direction: "right", hidden: true, className: "hidden md:flex" })
|
|
7054
7071
|
] }),
|
|
7055
7072
|
/* @__PURE__ */ jsx(
|
|
7056
7073
|
MonthGrid,
|
|
@@ -7066,7 +7083,7 @@ var DatePicker = forwardRef(
|
|
|
7066
7083
|
}
|
|
7067
7084
|
)
|
|
7068
7085
|
] }),
|
|
7069
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
7086
|
+
/* @__PURE__ */ jsxs("div", { className: "hidden md:flex flex-col gap-4", children: [
|
|
7070
7087
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-[280px]", children: [
|
|
7071
7088
|
/* @__PURE__ */ jsx(NavButton, { direction: "left", hidden: true }),
|
|
7072
7089
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -7534,11 +7551,11 @@ var Banner = forwardRef(
|
|
|
7534
7551
|
/* @__PURE__ */ jsx(
|
|
7535
7552
|
"span",
|
|
7536
7553
|
{
|
|
7537
|
-
className: cn("font-semibold leading-[1.45] whitespace-nowrap", textSize2, textColor),
|
|
7554
|
+
className: cn("font-semibold leading-[1.45] sm:whitespace-nowrap", textSize2, textColor),
|
|
7538
7555
|
children: title
|
|
7539
7556
|
}
|
|
7540
7557
|
),
|
|
7541
|
-
description && /* @__PURE__ */ jsx("span", { className: cn("leading-[1.45] whitespace-nowrap", textSize2, descColor), children: description }),
|
|
7558
|
+
description && /* @__PURE__ */ jsx("span", { className: cn("leading-[1.45] sm:whitespace-nowrap hidden sm:inline", textSize2, descColor), children: description }),
|
|
7542
7559
|
buttonLabel && /* @__PURE__ */ jsx(
|
|
7543
7560
|
"button",
|
|
7544
7561
|
{
|
|
@@ -7586,8 +7603,8 @@ var colorStyles = {
|
|
|
7586
7603
|
},
|
|
7587
7604
|
success: {
|
|
7588
7605
|
filled: "bg-success-400 text-white",
|
|
7589
|
-
accent: "bg-success-50 text-
|
|
7590
|
-
outline: "border border-
|
|
7606
|
+
accent: "bg-success-50 text-success-700",
|
|
7607
|
+
outline: "border border-success-700 text-success-700"
|
|
7591
7608
|
},
|
|
7592
7609
|
warning: {
|
|
7593
7610
|
filled: "bg-warning-400 text-black",
|
|
@@ -7596,8 +7613,8 @@ var colorStyles = {
|
|
|
7596
7613
|
},
|
|
7597
7614
|
error: {
|
|
7598
7615
|
filled: "bg-error-400 text-white",
|
|
7599
|
-
accent: "bg-error-50 text-
|
|
7600
|
-
outline: "border border-
|
|
7616
|
+
accent: "bg-error-50 text-error-700",
|
|
7617
|
+
outline: "border border-error-700 text-error-700"
|
|
7601
7618
|
},
|
|
7602
7619
|
neutral: {
|
|
7603
7620
|
filled: "bg-grey-900 text-grey-50",
|
|
@@ -7645,6 +7662,187 @@ function Badge({
|
|
|
7645
7662
|
}
|
|
7646
7663
|
);
|
|
7647
7664
|
}
|
|
7665
|
+
var CardContext = createContext(null);
|
|
7666
|
+
function useCardContext() {
|
|
7667
|
+
const ctx = useContext(CardContext);
|
|
7668
|
+
return ctx ?? { size: "md" };
|
|
7669
|
+
}
|
|
7670
|
+
var variantStyles = {
|
|
7671
|
+
default: "border border-grey-200 bg-white dark:bg-grey-50",
|
|
7672
|
+
outlined: "border-2 border-grey-300 bg-transparent",
|
|
7673
|
+
elevated: "border border-grey-100 bg-white dark:bg-grey-50 shadow-soft-md",
|
|
7674
|
+
ghost: "border-none bg-transparent"
|
|
7675
|
+
};
|
|
7676
|
+
var sizeStyles2 = {
|
|
7677
|
+
sm: {
|
|
7678
|
+
header: "px-4 py-3",
|
|
7679
|
+
body: "px-4 py-3",
|
|
7680
|
+
footer: "px-4 py-3"
|
|
7681
|
+
},
|
|
7682
|
+
md: {
|
|
7683
|
+
header: "px-5 py-4",
|
|
7684
|
+
body: "px-5 py-4",
|
|
7685
|
+
footer: "px-5 py-4"
|
|
7686
|
+
},
|
|
7687
|
+
lg: {
|
|
7688
|
+
header: "px-6 py-5",
|
|
7689
|
+
body: "px-6 py-5",
|
|
7690
|
+
footer: "px-6 py-5"
|
|
7691
|
+
}
|
|
7692
|
+
};
|
|
7693
|
+
var roundedStyles = {
|
|
7694
|
+
sm: "rounded-lg",
|
|
7695
|
+
md: "rounded-[10px]",
|
|
7696
|
+
lg: "rounded-xl",
|
|
7697
|
+
xl: "rounded-2xl",
|
|
7698
|
+
full: "rounded-3xl"
|
|
7699
|
+
};
|
|
7700
|
+
var shadowStyles = {
|
|
7701
|
+
none: "",
|
|
7702
|
+
sm: "shadow-soft-xxs",
|
|
7703
|
+
md: "shadow-soft-xs",
|
|
7704
|
+
lg: "shadow-soft-sm"
|
|
7705
|
+
};
|
|
7706
|
+
var footerAlignStyles = {
|
|
7707
|
+
left: "justify-start",
|
|
7708
|
+
center: "justify-center",
|
|
7709
|
+
right: "justify-end",
|
|
7710
|
+
between: "justify-between"
|
|
7711
|
+
};
|
|
7712
|
+
var aspectRatioStyles = {
|
|
7713
|
+
auto: "",
|
|
7714
|
+
video: "aspect-video",
|
|
7715
|
+
square: "aspect-square",
|
|
7716
|
+
portrait: "aspect-[3/4]"
|
|
7717
|
+
};
|
|
7718
|
+
var Card = forwardRef(
|
|
7719
|
+
({
|
|
7720
|
+
variant = "default",
|
|
7721
|
+
size = "md",
|
|
7722
|
+
rounded = "lg",
|
|
7723
|
+
shadow = "sm",
|
|
7724
|
+
hoverable = false,
|
|
7725
|
+
className,
|
|
7726
|
+
children,
|
|
7727
|
+
...rest
|
|
7728
|
+
}, ref) => {
|
|
7729
|
+
return /* @__PURE__ */ jsx(CardContext.Provider, { value: { size }, children: /* @__PURE__ */ jsx(
|
|
7730
|
+
"div",
|
|
7731
|
+
{
|
|
7732
|
+
ref,
|
|
7733
|
+
className: cn(
|
|
7734
|
+
"flex flex-col overflow-hidden",
|
|
7735
|
+
variantStyles[variant],
|
|
7736
|
+
roundedStyles[rounded],
|
|
7737
|
+
variant !== "elevated" && shadowStyles[shadow],
|
|
7738
|
+
hoverable && "transition-shadow duration-200 hover:shadow-soft-md",
|
|
7739
|
+
className
|
|
7740
|
+
),
|
|
7741
|
+
...rest,
|
|
7742
|
+
children
|
|
7743
|
+
}
|
|
7744
|
+
) });
|
|
7745
|
+
}
|
|
7746
|
+
);
|
|
7747
|
+
Card.displayName = "Card";
|
|
7748
|
+
var CardHeader = forwardRef(
|
|
7749
|
+
({ title, subtitle, actions, bordered = false, className, children, ...rest }, ref) => {
|
|
7750
|
+
const { size } = useCardContext();
|
|
7751
|
+
return /* @__PURE__ */ jsxs(
|
|
7752
|
+
"div",
|
|
7753
|
+
{
|
|
7754
|
+
ref,
|
|
7755
|
+
className: cn(
|
|
7756
|
+
"flex items-start justify-between gap-4",
|
|
7757
|
+
sizeStyles2[size].header,
|
|
7758
|
+
bordered && "border-b border-grey-200",
|
|
7759
|
+
className
|
|
7760
|
+
),
|
|
7761
|
+
...rest,
|
|
7762
|
+
children: [
|
|
7763
|
+
(title || subtitle || children) && /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
7764
|
+
title && /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold leading-[1.45] text-grey-900", children: title }),
|
|
7765
|
+
subtitle && /* @__PURE__ */ jsx("p", { className: "text-sm leading-[1.45] text-grey-500", children: subtitle }),
|
|
7766
|
+
children
|
|
7767
|
+
] }),
|
|
7768
|
+
actions && /* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-center gap-2", children: actions })
|
|
7769
|
+
]
|
|
7770
|
+
}
|
|
7771
|
+
);
|
|
7772
|
+
}
|
|
7773
|
+
);
|
|
7774
|
+
CardHeader.displayName = "CardHeader";
|
|
7775
|
+
var CardBody = forwardRef(
|
|
7776
|
+
({ noPadding = false, className, children, ...rest }, ref) => {
|
|
7777
|
+
const { size } = useCardContext();
|
|
7778
|
+
return /* @__PURE__ */ jsx(
|
|
7779
|
+
"div",
|
|
7780
|
+
{
|
|
7781
|
+
ref,
|
|
7782
|
+
className: cn("flex-1", !noPadding && sizeStyles2[size].body, className),
|
|
7783
|
+
...rest,
|
|
7784
|
+
children
|
|
7785
|
+
}
|
|
7786
|
+
);
|
|
7787
|
+
}
|
|
7788
|
+
);
|
|
7789
|
+
CardBody.displayName = "CardBody";
|
|
7790
|
+
var CardFooter = forwardRef(
|
|
7791
|
+
({ align = "right", bordered = false, className, children, ...rest }, ref) => {
|
|
7792
|
+
const { size } = useCardContext();
|
|
7793
|
+
return /* @__PURE__ */ jsx(
|
|
7794
|
+
"div",
|
|
7795
|
+
{
|
|
7796
|
+
ref,
|
|
7797
|
+
className: cn(
|
|
7798
|
+
"flex items-center gap-3",
|
|
7799
|
+
sizeStyles2[size].footer,
|
|
7800
|
+
footerAlignStyles[align],
|
|
7801
|
+
bordered && "border-t border-grey-200",
|
|
7802
|
+
className
|
|
7803
|
+
),
|
|
7804
|
+
...rest,
|
|
7805
|
+
children
|
|
7806
|
+
}
|
|
7807
|
+
);
|
|
7808
|
+
}
|
|
7809
|
+
);
|
|
7810
|
+
CardFooter.displayName = "CardFooter";
|
|
7811
|
+
var CardImage = forwardRef(
|
|
7812
|
+
({ position = "top", aspectRatio = "auto", objectFit = "cover", alt, className, ...rest }, ref) => {
|
|
7813
|
+
const objectFitClasses = {
|
|
7814
|
+
cover: "object-cover",
|
|
7815
|
+
contain: "object-contain",
|
|
7816
|
+
fill: "object-fill"
|
|
7817
|
+
};
|
|
7818
|
+
return /* @__PURE__ */ jsx(
|
|
7819
|
+
"div",
|
|
7820
|
+
{
|
|
7821
|
+
className: cn(
|
|
7822
|
+
"w-full overflow-hidden",
|
|
7823
|
+
position === "top" && "first:rounded-t-[inherit]",
|
|
7824
|
+
position === "bottom" && "last:rounded-b-[inherit]",
|
|
7825
|
+
position === "full" && "first:rounded-t-[inherit] last:rounded-b-[inherit]"
|
|
7826
|
+
),
|
|
7827
|
+
children: /* @__PURE__ */ jsx(
|
|
7828
|
+
"img",
|
|
7829
|
+
{
|
|
7830
|
+
ref,
|
|
7831
|
+
alt,
|
|
7832
|
+
className: cn(
|
|
7833
|
+
"w-full",
|
|
7834
|
+
aspectRatioStyles[aspectRatio],
|
|
7835
|
+
objectFitClasses[objectFit],
|
|
7836
|
+
className
|
|
7837
|
+
),
|
|
7838
|
+
...rest
|
|
7839
|
+
}
|
|
7840
|
+
)
|
|
7841
|
+
}
|
|
7842
|
+
);
|
|
7843
|
+
}
|
|
7844
|
+
);
|
|
7845
|
+
CardImage.displayName = "CardImage";
|
|
7648
7846
|
var stateStyles = {
|
|
7649
7847
|
information: {
|
|
7650
7848
|
border: "bg-secondary-500",
|
|
@@ -8444,9 +8642,9 @@ function BoxIcon({ className }) {
|
|
|
8444
8642
|
);
|
|
8445
8643
|
}
|
|
8446
8644
|
var sizeClasses2 = {
|
|
8447
|
-
sm: "w-[400px]",
|
|
8448
|
-
md: "w-[500px]",
|
|
8449
|
-
lg: "w-[640px]"
|
|
8645
|
+
sm: "w-full max-w-[400px] mx-4 sm:mx-0",
|
|
8646
|
+
md: "w-full max-w-[500px] mx-4 sm:mx-0",
|
|
8647
|
+
lg: "w-full max-w-[640px] mx-4 sm:mx-0"
|
|
8450
8648
|
};
|
|
8451
8649
|
var Modal = forwardRef(
|
|
8452
8650
|
({
|
|
@@ -8890,7 +9088,30 @@ function Variation6({ label, value, icon, trendBadge, description, cta }) {
|
|
|
8890
9088
|
cta && /* @__PURE__ */ jsx(CtaFooter, { cta, centered: true })
|
|
8891
9089
|
] });
|
|
8892
9090
|
}
|
|
8893
|
-
function MetricsCard({
|
|
9091
|
+
function MetricsCard({
|
|
9092
|
+
variation = "2",
|
|
9093
|
+
className,
|
|
9094
|
+
// Destructure component-specific props to prevent them from being spread to DOM
|
|
9095
|
+
label,
|
|
9096
|
+
value,
|
|
9097
|
+
icon,
|
|
9098
|
+
trendBadge,
|
|
9099
|
+
statusBadge,
|
|
9100
|
+
description,
|
|
9101
|
+
secondaryText,
|
|
9102
|
+
cta,
|
|
9103
|
+
...rest
|
|
9104
|
+
}) {
|
|
9105
|
+
const componentProps = {
|
|
9106
|
+
label,
|
|
9107
|
+
value,
|
|
9108
|
+
icon,
|
|
9109
|
+
trendBadge,
|
|
9110
|
+
statusBadge,
|
|
9111
|
+
description,
|
|
9112
|
+
secondaryText,
|
|
9113
|
+
cta
|
|
9114
|
+
};
|
|
8894
9115
|
return /* @__PURE__ */ jsxs(
|
|
8895
9116
|
"div",
|
|
8896
9117
|
{
|
|
@@ -8898,14 +9119,14 @@ function MetricsCard({ variation = "2", className, ...props }) {
|
|
|
8898
9119
|
"flex flex-col overflow-clip rounded-xl border border-grey-200 bg-white dark:bg-grey-50 shadow-soft-xxs",
|
|
8899
9120
|
className
|
|
8900
9121
|
),
|
|
8901
|
-
...
|
|
9122
|
+
...rest,
|
|
8902
9123
|
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, { ...
|
|
9124
|
+
variation === "1" && /* @__PURE__ */ jsx(Variation1, { ...componentProps }),
|
|
9125
|
+
variation === "2" && /* @__PURE__ */ jsx(Variation2, { ...componentProps }),
|
|
9126
|
+
variation === "3" && /* @__PURE__ */ jsx(Variation3, { ...componentProps }),
|
|
9127
|
+
variation === "4" && /* @__PURE__ */ jsx(Variation4, { ...componentProps }),
|
|
9128
|
+
variation === "5" && /* @__PURE__ */ jsx(Variation5, { ...componentProps }),
|
|
9129
|
+
variation === "6" && /* @__PURE__ */ jsx(Variation6, { ...componentProps })
|
|
8909
9130
|
]
|
|
8910
9131
|
}
|
|
8911
9132
|
);
|
|
@@ -9069,19 +9290,34 @@ var FileUploadDropZone = forwardRef(
|
|
|
9069
9290
|
] }),
|
|
9070
9291
|
/* @__PURE__ */ jsx(Button, { variant: "primary", size: "sm", onClick: handleBrowse, children: "Browse Files" })
|
|
9071
9292
|
] }),
|
|
9072
|
-
state === "uploading" && uploadingFile && /* @__PURE__ */ jsxs(
|
|
9073
|
-
|
|
9074
|
-
|
|
9075
|
-
|
|
9076
|
-
|
|
9077
|
-
|
|
9078
|
-
|
|
9079
|
-
|
|
9293
|
+
state === "uploading" && uploadingFile && /* @__PURE__ */ jsxs(
|
|
9294
|
+
"div",
|
|
9295
|
+
{
|
|
9296
|
+
className: "flex w-full flex-col items-center gap-4",
|
|
9297
|
+
"aria-live": "polite",
|
|
9298
|
+
"aria-atomic": "true",
|
|
9299
|
+
children: [
|
|
9300
|
+
/* @__PURE__ */ jsx(FileTypeIcon, { type: getFileType(uploadingFile.name), "aria-hidden": "true" }),
|
|
9301
|
+
/* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-xs flex-col gap-2", children: [
|
|
9302
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
9303
|
+
/* @__PURE__ */ jsx("span", { className: "text-body-sm font-medium text-grey-700 truncate", children: uploadingFile.name }),
|
|
9304
|
+
/* @__PURE__ */ jsxs(
|
|
9305
|
+
"span",
|
|
9306
|
+
{
|
|
9307
|
+
className: "text-body-xs font-medium text-grey-500 ml-2 shrink-0",
|
|
9308
|
+
"aria-label": `Upload progress: ${Math.round(uploadingFile.progress)} percent`,
|
|
9309
|
+
children: [
|
|
9310
|
+
Math.round(uploadingFile.progress),
|
|
9311
|
+
"%"
|
|
9312
|
+
]
|
|
9313
|
+
}
|
|
9314
|
+
)
|
|
9315
|
+
] }),
|
|
9316
|
+
/* @__PURE__ */ jsx(ProgressBar, { value: uploadingFile.progress, size: "sm", showPercentage: false })
|
|
9080
9317
|
] })
|
|
9081
|
-
]
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
] }),
|
|
9318
|
+
]
|
|
9319
|
+
}
|
|
9320
|
+
),
|
|
9085
9321
|
state === "success" && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", role: "status", children: [
|
|
9086
9322
|
/* @__PURE__ */ jsx(UploadStateIcon, { state: "success", size: 56, "aria-hidden": "true" }),
|
|
9087
9323
|
/* @__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" }) }),
|
|
@@ -9341,14 +9577,14 @@ var FileUpload = forwardRef(
|
|
|
9341
9577
|
FileUpload.displayName = "FileUpload";
|
|
9342
9578
|
var sidebarThemeStyles = {
|
|
9343
9579
|
light: {
|
|
9344
|
-
container: "bg-white",
|
|
9580
|
+
container: "bg-white dark:bg-grey-50",
|
|
9345
9581
|
defaultText: "text-grey-700",
|
|
9346
9582
|
defaultIcon: "text-grey-400",
|
|
9347
9583
|
selectedBg: "bg-primary-50",
|
|
9348
9584
|
selectedText: "text-grey-900",
|
|
9349
9585
|
selectedBorder: "border-l-2 border-primary-400",
|
|
9350
9586
|
selectedIcon: "text-grey-900",
|
|
9351
|
-
hoverBg: "hover:bg-grey-50",
|
|
9587
|
+
hoverBg: "hover:bg-grey-50 dark:hover:bg-grey-100",
|
|
9352
9588
|
sectionTitle: "text-grey-400",
|
|
9353
9589
|
divider: "border-grey-100",
|
|
9354
9590
|
badgeDefault: "bg-grey-100 text-grey-700",
|
|
@@ -14361,7 +14597,13 @@ var ActivityItem = forwardRef(
|
|
|
14361
14597
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 w-full", children: [
|
|
14362
14598
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full", children: [
|
|
14363
14599
|
/* @__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(
|
|
14600
|
+
unread && /* @__PURE__ */ jsx(
|
|
14601
|
+
"span",
|
|
14602
|
+
{
|
|
14603
|
+
className: "shrink-0 size-2 rounded-full bg-[#04802E] border-[1.5px] border-white",
|
|
14604
|
+
"aria-hidden": "true"
|
|
14605
|
+
}
|
|
14606
|
+
),
|
|
14365
14607
|
unread && /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Unread" })
|
|
14366
14608
|
] }),
|
|
14367
14609
|
(date || time || link || badge) && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-1 w-full", children: [
|
|
@@ -14705,4 +14947,4 @@ function useRaydenRadio({
|
|
|
14705
14947
|
};
|
|
14706
14948
|
}
|
|
14707
14949
|
|
|
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 };
|
|
14950
|
+
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 };
|