@olundot/ui 0.10.0 → 0.10.2
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/CHANGELOG.md +13 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.js +102 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @olundot/ui
|
|
2
2
|
|
|
3
|
+
## 0.10.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix(ui): Dialog 2026 재설계 — 글래스모피즘 블러 제거(단정한 scrim) · 무거운 그림자→floating elevation-8 · radius-lg · 헤더 좌측정렬 · footer 구분선(edge-bleed). API 변경 없음(시각/위계만).
|
|
8
|
+
- fix: toast가 duration 경과 후 자동으로 사라지도록 - ToastRoot가 마운트 시 setTimeout 기반 auto-dismiss 타이머를 걸고 unmount 시 정리한다(기존엔 타이머가 없어 수동 dismiss 전까지 영구 잔존). hover/focus 중에는 일시정지하고 해제 시 남은 시간부터 재개(sonner 관례). 기존 ToastOptions/ToastRoot 공개 API는 변경 없음(additive).
|
|
9
|
+
|
|
10
|
+
## 0.10.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 4b65ff6: fix: OTPField fluid가 좁은 폭에서 실제로 한 줄을 유지하도록 - fieldset의 min-content 쿼크 해제(min-w-0), 그룹 w-full/min-w-0 추가, cell cap을 표준 max-w 유틸로 전환해 소비 앱 스캔 의존 제거.
|
|
15
|
+
|
|
3
16
|
## 0.10.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -769,6 +769,12 @@ declare const DialogFooter: {
|
|
|
769
769
|
};
|
|
770
770
|
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<Dialog$1.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
771
771
|
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<Dialog$1.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
772
|
+
/**
|
|
773
|
+
* DialogEyebrow — 제목 위 카테고리 overline(eyebrow). 2026 editorial 헤더 위계의 최상단.
|
|
774
|
+
* DialogHeader 안에서 DialogTitle '위'에 둔다(예: "시간 제어" / "시험 제어").
|
|
775
|
+
* 작은 uppercase + tracking + muted 색으로 title(bold)과 대비.
|
|
776
|
+
*/
|
|
777
|
+
declare const DialogEyebrow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
772
778
|
/**
|
|
773
779
|
* DialogRawContent — shadcn 기본 스타일 없는 순수 radix Content.
|
|
774
780
|
* 자체 head/body/foot 슬롯을 가진 ModalShell 등 커스텀 구현용.
|
|
@@ -1465,4 +1471,4 @@ interface OrganizationLogoProps extends Omit<SVGProps<SVGSVGElement>, "width" |
|
|
|
1465
1471
|
}
|
|
1466
1472
|
declare function OrganizationLogo({ organization, size, className, style, role, "aria-label": ariaLabel, "aria-hidden": ariaHidden, ...props }: OrganizationLogoProps): react_jsx_runtime.JSX.Element;
|
|
1467
1473
|
|
|
1468
|
-
export { ActionFooter, type ActionFooterAction, type ActionFooterProps, type ActionFooterStatus, Alert, type AlertProps, type AlertVariant, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, Badge, type BadgeProps, type BadgeSize, type BadgeTone, type BadgeVariant, BulkActionBar, type BulkActionBarAction, type BulkActionBarProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardProse, CardTitle, type CardVariant, type CardVariantOptions, Checkbox, type CheckboxCheckedState, CheckboxGroup, type CheckboxGroupAppearance, type CheckboxGroupColumns, CheckboxGroupContext, type CheckboxGroupContextValue, type CheckboxGroupDensity, type CheckboxGroupOrientation, type CheckboxGroupProps, type CheckboxProps, type CheckboxSize, Chip, type ChipProps, type ChipSize, type ChipTone, type ChipVariant, ConfirmDialog, type ConfirmDialogProps, ContextMenu, type ContextMenuPosition, type ContextMenuProps, CopyButton, type CopyButtonProps, DataTable, type DataTableBulkAction, type DataTableColumn, type DataTableProps, type DataTableSort, DetailLayout, type DetailLayoutProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogRawContent, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, type EmptyStateSize, type EmptyStateTone, type EmptyStateVariantOptions, ErrorState, type ErrorStateProps, FileUploadZone, type FileUploadZoneProps, FilterToolbar, type FilterToolbarProps, FormField, type FormFieldProps, type FormFieldRenderProps, FormLayout, type FormLayoutProps, type FormLayoutSection, FormModal, type FormModalProps, IconButton, type IconButtonBadgeTone, type IconButtonProps, type IconButtonSize, type IconButtonVariant, InfoModal, type InfoModalProps, InlineAlert, type InlineAlertProps, Input, type InputProps, type InputSize, type InputSizeLegacy, type InputState, Label, type LabelProps, ModeToggle, type ModeToggleOption, type ModeToggleProps, NotificationBadge, type NotificationBadgePlacement, type NotificationBadgeProps, type NotificationBadgeSize, OTPField, type OTPFieldProps, type OTPFieldSize, OlunLogo, OlunSymbol, type OlunTheme, type OlunThemeDuration, type OlunThemeState, OrganizationLogo, type OrganizationLogoId, type OrganizationLogoProps, PageHeader, type PageHeaderProps, Pagination, type PaginationProps, type PaginationSize, PermissionContext, type PermissionEvaluator, type PermissionFallback, PermissionGuard, type PermissionGuardProps, PermissionProvider, type PermissionProviderProps, type PermissionScope, type PermissionState, Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, Progress, type ProgressProps, type ProgressStatus, Radio, RadioGroup, type RadioGroupAppearance, type RadioGroupColumns, type RadioGroupDensity, type RadioGroupOrientation, type RadioGroupProps, type RadioProps, ScrollArea, ScrollBar, SearchField, type SearchFieldProps, type SearchFieldSize, Select, type SelectAppearance, type SelectOption, type SelectProps, type SelectSize, type SelectState, type SelectVariant, Separator, type SetOlunThemeOptions, Sheet, SheetClose, SheetContent, SheetDescription, SheetDrawer, type SheetDrawerProps, SheetFooter, SheetHeader, type SheetMotionConfig, type SheetMotionDuration, type SheetMotionEasing, type SheetMotionType, SheetTitle, SheetTrigger, Skeleton, type SkeletonProps, SkeletonRow, type SkeletonRowColumn, type SkeletonRowProps, SkeletonText, type SkeletonTextProps, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, type StatusBadgeStatus, type SurfaceLevel, Switch, type SwitchProps, type TabItem, Tabs, TabsContent, type TabsProps, type TabsVariant, Textarea, type TextareaProps, type TextareaSize, type TextareaSizeLegacy, type TextareaState, ThemeFab, type ThemeFabProps, ThemeToggle, type ToastAction, type ToastItem, type ToastOptions, ToastProvider, ToastRoot, type ToastVariant, ToastViewport, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TreeItemRowVariantProps, type TreeItemState, type TreeNode, TreeView, type TreeViewProps, TwoTierBadge, type TwoTierBadgeIntent, type TwoTierBadgeProps, type UseOlunThemeValue, WizardLayout, type WizardLayoutProps, type WizardStep, type WizardStepState, actionFooterStatusVariants, actionFooterVariants, alertVariants, badgeDotVariants, badgeVariants, buttonVariants, cardVariants, checkboxBoxVariants, checkboxFieldVariants, checkboxGroupBoxVariants, checkboxGroupItemVariants, checkboxGroupVariants, checkboxRootVariants, checkboxVariants, chipCountVariants, chipVariants, cn, dataTableRowVariants, dataTableVariants, emptyStateIconVariants, emptyStateVariants, errorStateVariants, evaluatePermission, fileUploadIconVariants, fileUploadZoneVariants, formFieldControlStackClassName, formFieldDescriptionClassName, formFieldErrorClassName, formFieldLabelClassName, formFieldRequiredClassName, formFieldVariants, getOlunThemeState, getToastDuration, iconButtonBadgeVariants, iconButtonVariants, inlineAlertVariants, inputMessageVariants, inputVariants, limitToasts, modeToggleItemVariants, modeToggleVariants, notificationBadgeVariants, otpCellVariants, otpFieldGroupVariants, otpFieldMessageVariants, otpFieldVariants, paginationControlVariants, paginationVariants, radioControlVariants, radioGroupVariants, radioVariants, searchFieldInputVariants, searchFieldVariants, selectMessageVariants, selectVariants, setOlunTheme, skeletonVariants, spinnerVariants, statusBadgeDotVariants, statusBadgeVariants, tabsBadgeVariants, tabsListVariants, tabsRootVariants, tabsTriggerVariants, textareaMessageVariants, textareaVariants, toast, toastVariants, toastViewportVariants, treeItemRowVariants, treeViewVariants, twoTierBadgeLineVariants, twoTierBadgeVariants, useOlunTheme, usePermission };
|
|
1474
|
+
export { ActionFooter, type ActionFooterAction, type ActionFooterProps, type ActionFooterStatus, Alert, type AlertProps, type AlertVariant, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, Badge, type BadgeProps, type BadgeSize, type BadgeTone, type BadgeVariant, BulkActionBar, type BulkActionBarAction, type BulkActionBarProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardProse, CardTitle, type CardVariant, type CardVariantOptions, Checkbox, type CheckboxCheckedState, CheckboxGroup, type CheckboxGroupAppearance, type CheckboxGroupColumns, CheckboxGroupContext, type CheckboxGroupContextValue, type CheckboxGroupDensity, type CheckboxGroupOrientation, type CheckboxGroupProps, type CheckboxProps, type CheckboxSize, Chip, type ChipProps, type ChipSize, type ChipTone, type ChipVariant, ConfirmDialog, type ConfirmDialogProps, ContextMenu, type ContextMenuPosition, type ContextMenuProps, CopyButton, type CopyButtonProps, DataTable, type DataTableBulkAction, type DataTableColumn, type DataTableProps, type DataTableSort, DetailLayout, type DetailLayoutProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogEyebrow, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogRawContent, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, type EmptyStateSize, type EmptyStateTone, type EmptyStateVariantOptions, ErrorState, type ErrorStateProps, FileUploadZone, type FileUploadZoneProps, FilterToolbar, type FilterToolbarProps, FormField, type FormFieldProps, type FormFieldRenderProps, FormLayout, type FormLayoutProps, type FormLayoutSection, FormModal, type FormModalProps, IconButton, type IconButtonBadgeTone, type IconButtonProps, type IconButtonSize, type IconButtonVariant, InfoModal, type InfoModalProps, InlineAlert, type InlineAlertProps, Input, type InputProps, type InputSize, type InputSizeLegacy, type InputState, Label, type LabelProps, ModeToggle, type ModeToggleOption, type ModeToggleProps, NotificationBadge, type NotificationBadgePlacement, type NotificationBadgeProps, type NotificationBadgeSize, OTPField, type OTPFieldProps, type OTPFieldSize, OlunLogo, OlunSymbol, type OlunTheme, type OlunThemeDuration, type OlunThemeState, OrganizationLogo, type OrganizationLogoId, type OrganizationLogoProps, PageHeader, type PageHeaderProps, Pagination, type PaginationProps, type PaginationSize, PermissionContext, type PermissionEvaluator, type PermissionFallback, PermissionGuard, type PermissionGuardProps, PermissionProvider, type PermissionProviderProps, type PermissionScope, type PermissionState, Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, Progress, type ProgressProps, type ProgressStatus, Radio, RadioGroup, type RadioGroupAppearance, type RadioGroupColumns, type RadioGroupDensity, type RadioGroupOrientation, type RadioGroupProps, type RadioProps, ScrollArea, ScrollBar, SearchField, type SearchFieldProps, type SearchFieldSize, Select, type SelectAppearance, type SelectOption, type SelectProps, type SelectSize, type SelectState, type SelectVariant, Separator, type SetOlunThemeOptions, Sheet, SheetClose, SheetContent, SheetDescription, SheetDrawer, type SheetDrawerProps, SheetFooter, SheetHeader, type SheetMotionConfig, type SheetMotionDuration, type SheetMotionEasing, type SheetMotionType, SheetTitle, SheetTrigger, Skeleton, type SkeletonProps, SkeletonRow, type SkeletonRowColumn, type SkeletonRowProps, SkeletonText, type SkeletonTextProps, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, type StatusBadgeStatus, type SurfaceLevel, Switch, type SwitchProps, type TabItem, Tabs, TabsContent, type TabsProps, type TabsVariant, Textarea, type TextareaProps, type TextareaSize, type TextareaSizeLegacy, type TextareaState, ThemeFab, type ThemeFabProps, ThemeToggle, type ToastAction, type ToastItem, type ToastOptions, ToastProvider, ToastRoot, type ToastVariant, ToastViewport, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TreeItemRowVariantProps, type TreeItemState, type TreeNode, TreeView, type TreeViewProps, TwoTierBadge, type TwoTierBadgeIntent, type TwoTierBadgeProps, type UseOlunThemeValue, WizardLayout, type WizardLayoutProps, type WizardStep, type WizardStepState, actionFooterStatusVariants, actionFooterVariants, alertVariants, badgeDotVariants, badgeVariants, buttonVariants, cardVariants, checkboxBoxVariants, checkboxFieldVariants, checkboxGroupBoxVariants, checkboxGroupItemVariants, checkboxGroupVariants, checkboxRootVariants, checkboxVariants, chipCountVariants, chipVariants, cn, dataTableRowVariants, dataTableVariants, emptyStateIconVariants, emptyStateVariants, errorStateVariants, evaluatePermission, fileUploadIconVariants, fileUploadZoneVariants, formFieldControlStackClassName, formFieldDescriptionClassName, formFieldErrorClassName, formFieldLabelClassName, formFieldRequiredClassName, formFieldVariants, getOlunThemeState, getToastDuration, iconButtonBadgeVariants, iconButtonVariants, inlineAlertVariants, inputMessageVariants, inputVariants, limitToasts, modeToggleItemVariants, modeToggleVariants, notificationBadgeVariants, otpCellVariants, otpFieldGroupVariants, otpFieldMessageVariants, otpFieldVariants, paginationControlVariants, paginationVariants, radioControlVariants, radioGroupVariants, radioVariants, searchFieldInputVariants, searchFieldVariants, selectMessageVariants, selectVariants, setOlunTheme, skeletonVariants, spinnerVariants, statusBadgeDotVariants, statusBadgeVariants, tabsBadgeVariants, tabsListVariants, tabsRootVariants, tabsTriggerVariants, textareaMessageVariants, textareaVariants, toast, toastVariants, toastViewportVariants, treeItemRowVariants, treeViewVariants, twoTierBadgeLineVariants, twoTierBadgeVariants, useOlunTheme, usePermission };
|
package/dist/index.js
CHANGED
|
@@ -3185,7 +3185,8 @@ var DialogOverlay = React18.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
3185
3185
|
ref,
|
|
3186
3186
|
className: cn(
|
|
3187
3187
|
"fixed inset-0 z-[var(--z-modal)]",
|
|
3188
|
-
|
|
3188
|
+
// 2026: 글래스모피즘 블러 제거 — 단정한 scrim 딤만(FE-skill anti-slop).
|
|
3189
|
+
"bg-[var(--bg-base)]/65",
|
|
3189
3190
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
3190
3191
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
3191
3192
|
"motion-reduce:animate-none",
|
|
@@ -3205,8 +3206,12 @@ var DialogContent = React18.forwardRef(({ className, children, showCloseButton =
|
|
|
3205
3206
|
"fixed left-1/2 top-1/2 z-[var(--z-modal)]",
|
|
3206
3207
|
"-translate-x-1/2 -translate-y-1/2",
|
|
3207
3208
|
"grid w-full max-w-lg gap-4 p-[var(--space-4)]",
|
|
3208
|
-
|
|
3209
|
-
|
|
3209
|
+
// modal은 dim overlay 위 — 가장 밝은 DS surface(--bg-base #F1F3F5·여전히 tinted·순백 아님)로 깨끗하게.
|
|
3210
|
+
// arbitrary var 사용: 소비 site/app이 dist를 content-scan 안 해 `bg-base` 유틸이 purge될 수 있어 안전하게 var로.
|
|
3211
|
+
"bg-[var(--bg-base)] text-foreground",
|
|
3212
|
+
// 2026: generic 무거운 그림자 대신 floating elevation-8 + 또렷한 중립 grey border(--border·16%) + radius-lg.
|
|
3213
|
+
// (border-subtle=8%는 너무 흐려 가장자리가 안 보였음 → border-border로 grey 또렷하게.)
|
|
3214
|
+
"border border-border rounded-[var(--radius-lg)] shadow-elevation-8",
|
|
3210
3215
|
"duration-200",
|
|
3211
3216
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
3212
3217
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
@@ -3246,7 +3251,8 @@ var DialogHeader = ({
|
|
|
3246
3251
|
"div",
|
|
3247
3252
|
{
|
|
3248
3253
|
className: cn(
|
|
3249
|
-
|
|
3254
|
+
// 2026: 중앙정렬 폐기 — 좌측 정렬 editorial 헤더(eyebrow+title+desc 위계).
|
|
3255
|
+
"flex flex-col space-y-[var(--space-1)] text-left",
|
|
3250
3256
|
className
|
|
3251
3257
|
),
|
|
3252
3258
|
...props
|
|
@@ -3260,7 +3266,12 @@ var DialogFooter = ({
|
|
|
3260
3266
|
"div",
|
|
3261
3267
|
{
|
|
3262
3268
|
className: cn(
|
|
3263
|
-
|
|
3269
|
+
// 2026: 본문과 footer를 구분선으로 분리(edge-bleed로 full-width border). DialogContent의 p-4를
|
|
3270
|
+
// -mx/-mb로 상쇄해 구분선이 다이얼로그 가장자리까지 닿게 한다.
|
|
3271
|
+
"-mx-[var(--space-4)] -mb-[var(--space-4)] mt-[var(--space-2)]",
|
|
3272
|
+
"flex flex-col-reverse gap-[var(--space-2)] border-t border-border",
|
|
3273
|
+
"px-[var(--space-4)] pb-[var(--space-4)] pt-[var(--space-3)]",
|
|
3274
|
+
"sm:flex-row sm:justify-end",
|
|
3264
3275
|
className
|
|
3265
3276
|
),
|
|
3266
3277
|
...props
|
|
@@ -3272,7 +3283,7 @@ var DialogTitle = React18.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3272
3283
|
{
|
|
3273
3284
|
ref,
|
|
3274
3285
|
className: cn(
|
|
3275
|
-
"text-
|
|
3286
|
+
"text-xl font-bold leading-tight tracking-tight text-foreground",
|
|
3276
3287
|
className
|
|
3277
3288
|
),
|
|
3278
3289
|
...props
|
|
@@ -3283,11 +3294,23 @@ var DialogDescription = React18.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3283
3294
|
DialogPrimitive.Description,
|
|
3284
3295
|
{
|
|
3285
3296
|
ref,
|
|
3286
|
-
className: cn("text-sm text-
|
|
3297
|
+
className: cn("text-sm text-text-secondary", className),
|
|
3287
3298
|
...props
|
|
3288
3299
|
}
|
|
3289
3300
|
));
|
|
3290
3301
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
3302
|
+
var DialogEyebrow = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx19(
|
|
3303
|
+
"p",
|
|
3304
|
+
{
|
|
3305
|
+
ref,
|
|
3306
|
+
className: cn(
|
|
3307
|
+
"text-xs font-semibold uppercase tracking-wider text-muted-foreground",
|
|
3308
|
+
className
|
|
3309
|
+
),
|
|
3310
|
+
...props
|
|
3311
|
+
}
|
|
3312
|
+
));
|
|
3313
|
+
DialogEyebrow.displayName = "DialogEyebrow";
|
|
3291
3314
|
var DialogRawContent = DialogPrimitive.Content;
|
|
3292
3315
|
|
|
3293
3316
|
// src/components/ui/form-modal.tsx
|
|
@@ -7012,6 +7035,39 @@ function getToastDuration(options) {
|
|
|
7012
7035
|
}
|
|
7013
7036
|
return options.variant === "error" ? 7e3 : 3e3;
|
|
7014
7037
|
}
|
|
7038
|
+
function createToastTimer(durationMs, onExpire) {
|
|
7039
|
+
if (!Number.isFinite(durationMs)) {
|
|
7040
|
+
return { pause() {
|
|
7041
|
+
}, resume() {
|
|
7042
|
+
}, clear() {
|
|
7043
|
+
} };
|
|
7044
|
+
}
|
|
7045
|
+
let remaining = Math.max(0, durationMs);
|
|
7046
|
+
let startedAt = Date.now();
|
|
7047
|
+
let timeoutId;
|
|
7048
|
+
const clear = () => {
|
|
7049
|
+
if (timeoutId !== void 0) {
|
|
7050
|
+
clearTimeout(timeoutId);
|
|
7051
|
+
timeoutId = void 0;
|
|
7052
|
+
}
|
|
7053
|
+
};
|
|
7054
|
+
const schedule = () => {
|
|
7055
|
+
clear();
|
|
7056
|
+
startedAt = Date.now();
|
|
7057
|
+
timeoutId = setTimeout(onExpire, remaining);
|
|
7058
|
+
};
|
|
7059
|
+
const pause = () => {
|
|
7060
|
+
if (timeoutId === void 0) return;
|
|
7061
|
+
clear();
|
|
7062
|
+
remaining = Math.max(0, remaining - (Date.now() - startedAt));
|
|
7063
|
+
};
|
|
7064
|
+
const resume = () => {
|
|
7065
|
+
if (timeoutId !== void 0) return;
|
|
7066
|
+
schedule();
|
|
7067
|
+
};
|
|
7068
|
+
schedule();
|
|
7069
|
+
return { pause, resume, clear };
|
|
7070
|
+
}
|
|
7015
7071
|
function createToast(options) {
|
|
7016
7072
|
const id = `toast-${++toastCounter}`;
|
|
7017
7073
|
toastItems = limitToasts([...toastItems, { id, ...options }]);
|
|
@@ -7059,10 +7115,27 @@ var ToastRoot = React36.forwardRef(
|
|
|
7059
7115
|
duration,
|
|
7060
7116
|
action,
|
|
7061
7117
|
onClose,
|
|
7118
|
+
onMouseEnter,
|
|
7119
|
+
onMouseLeave,
|
|
7120
|
+
onFocus,
|
|
7121
|
+
onBlur,
|
|
7062
7122
|
...props
|
|
7063
7123
|
}, ref) => {
|
|
7064
7124
|
const Icon = toastIcons[variant];
|
|
7065
7125
|
const hasIcon = Icon !== null;
|
|
7126
|
+
const durationMs = getToastDuration({ message, variant, duration });
|
|
7127
|
+
const onCloseRef = React36.useRef(onClose);
|
|
7128
|
+
onCloseRef.current = onClose;
|
|
7129
|
+
const timerRef = React36.useRef(null);
|
|
7130
|
+
React36.useEffect(() => {
|
|
7131
|
+
if (!onCloseRef.current) return void 0;
|
|
7132
|
+
const timer = createToastTimer(durationMs, () => onCloseRef.current?.());
|
|
7133
|
+
timerRef.current = timer;
|
|
7134
|
+
return () => {
|
|
7135
|
+
timer.clear();
|
|
7136
|
+
timerRef.current = null;
|
|
7137
|
+
};
|
|
7138
|
+
}, [durationMs]);
|
|
7066
7139
|
return /* @__PURE__ */ jsxs41(
|
|
7067
7140
|
"div",
|
|
7068
7141
|
{
|
|
@@ -7071,12 +7144,28 @@ var ToastRoot = React36.forwardRef(
|
|
|
7071
7144
|
"data-slot": "toast",
|
|
7072
7145
|
"data-variant": variant,
|
|
7073
7146
|
role: variant === "error" ? "alert" : "status",
|
|
7074
|
-
"data-duration":
|
|
7147
|
+
"data-duration": durationMs,
|
|
7075
7148
|
className: cn(
|
|
7076
7149
|
toastVariants({ variant }),
|
|
7077
7150
|
hasIcon ? "grid-cols-[auto_1fr_auto]" : "grid-cols-[1fr_auto]",
|
|
7078
7151
|
className
|
|
7079
7152
|
),
|
|
7153
|
+
onMouseEnter: (event) => {
|
|
7154
|
+
timerRef.current?.pause();
|
|
7155
|
+
onMouseEnter?.(event);
|
|
7156
|
+
},
|
|
7157
|
+
onMouseLeave: (event) => {
|
|
7158
|
+
timerRef.current?.resume();
|
|
7159
|
+
onMouseLeave?.(event);
|
|
7160
|
+
},
|
|
7161
|
+
onFocus: (event) => {
|
|
7162
|
+
timerRef.current?.pause();
|
|
7163
|
+
onFocus?.(event);
|
|
7164
|
+
},
|
|
7165
|
+
onBlur: (event) => {
|
|
7166
|
+
timerRef.current?.resume();
|
|
7167
|
+
onBlur?.(event);
|
|
7168
|
+
},
|
|
7080
7169
|
...props,
|
|
7081
7170
|
children: [
|
|
7082
7171
|
Icon ? /* @__PURE__ */ jsx46(
|
|
@@ -7153,7 +7242,7 @@ import * as React37 from "react";
|
|
|
7153
7242
|
import { cva as cva25 } from "class-variance-authority";
|
|
7154
7243
|
import { AlertCircle as AlertCircle6 } from "lucide-react";
|
|
7155
7244
|
import { Fragment as Fragment8, jsx as jsx47, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
7156
|
-
var otpFieldVariants = cva25("flex w-full flex-col gap-[var(--space-1-5)]", {
|
|
7245
|
+
var otpFieldVariants = cva25("flex w-full min-w-0 flex-col gap-[var(--space-1-5)]", {
|
|
7157
7246
|
variants: {
|
|
7158
7247
|
size: {
|
|
7159
7248
|
default: "",
|
|
@@ -7171,7 +7260,7 @@ var otpFieldGroupVariants = cva25("flex items-start gap-[var(--space-1)] pt-[var
|
|
|
7171
7260
|
compact: ""
|
|
7172
7261
|
},
|
|
7173
7262
|
fluid: {
|
|
7174
|
-
true: "flex-nowrap justify-center",
|
|
7263
|
+
true: "flex-nowrap justify-center w-full min-w-0",
|
|
7175
7264
|
false: "flex-wrap"
|
|
7176
7265
|
}
|
|
7177
7266
|
},
|
|
@@ -7220,12 +7309,12 @@ var otpCellVariants = cva25(
|
|
|
7220
7309
|
{
|
|
7221
7310
|
size: "default",
|
|
7222
7311
|
fluid: true,
|
|
7223
|
-
className: "max-w-
|
|
7312
|
+
className: "max-w-13"
|
|
7224
7313
|
},
|
|
7225
7314
|
{
|
|
7226
7315
|
size: "compact",
|
|
7227
7316
|
fluid: true,
|
|
7228
|
-
className: "max-w-
|
|
7317
|
+
className: "max-w-11"
|
|
7229
7318
|
}
|
|
7230
7319
|
],
|
|
7231
7320
|
defaultVariants: {
|
|
@@ -8586,6 +8675,7 @@ export {
|
|
|
8586
8675
|
DialogClose,
|
|
8587
8676
|
DialogContent,
|
|
8588
8677
|
DialogDescription,
|
|
8678
|
+
DialogEyebrow,
|
|
8589
8679
|
DialogFooter,
|
|
8590
8680
|
DialogHeader,
|
|
8591
8681
|
DialogOverlay,
|