@hilum/ui 3.6.5 → 3.6.7
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
CHANGED
|
@@ -2,7 +2,7 @@ import { tokens } from './chunk-RI6QJR2L.js';
|
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
3
|
import { twMerge } from 'tailwind-merge';
|
|
4
4
|
import * as React16 from 'react';
|
|
5
|
-
import { createContext, forwardRef, useRef, useState, useCallback, useEffect, useContext, isValidElement, cloneElement, useMemo, useId, Children, useLayoutEffect } from 'react';
|
|
5
|
+
import { createContext, forwardRef, useRef, useState, useCallback, useEffect, useContext, isValidElement, cloneElement, useMemo, useId, Children, useLayoutEffect, createElement } from 'react';
|
|
6
6
|
import { Check, Circle, ChevronRight, Minus, Search, X, ChevronDown, CornerDownRight, SkipForward, Pencil, Inbox, MessageCircle, Home, Pause, Play, RotateCcw, Link, ImageIcon, User, Globe, Brain, Paintbrush, Heart, Rocket, Lightbulb, Palette, Shield, Bell, Mail, Lock, Users, Loader, ArrowUp, ArrowRight, ArrowLeft, Plus, Settings, Star, Clock, SquareLibrary, RectangleHorizontal, Moon, Sun, Monitor, Dot, Menu, Copy, Pipette, MoreHorizontal, ChevronLeft, ChevronsUpDown, ChevronUp, CalendarIcon, Upload, File, CircleHelp, Info, AlertTriangle, AlertCircle, CheckCircle, GripVertical, Bold, Italic, Underline, Strikethrough, Heading1, Heading2, Heading3, List as List$1, ListOrdered, AlignLeft, FileText, Image as Image$1, Filter, ArrowDown, PanelLeft, TrendingDown, TrendingUp, Download, XCircle, Loader2 } from 'lucide-react';
|
|
7
7
|
import { IconCornerDownRight, IconPlayerSkipForward, IconPencil, IconInbox, IconMessageCircle, IconHome, IconPlayerPause, IconPlayerPlay, IconRotate2, IconCheck, IconLink, IconPhoto, IconUser, IconGlobe, IconBrain, IconBrush, IconHeart, IconRocket, IconBulb, IconPalette, IconShield, IconBell, IconMail, IconLock, IconUsers, IconLoader2, IconSearch, IconArrowUp, IconArrowRight, IconArrowLeft, IconPlus, IconSettings, IconStar, IconClock, IconLibrary, IconCircle, IconSquare, IconMoon, IconSun, IconDeviceDesktop, IconPoint, IconMenu2, IconCopy, IconX, IconColorPicker, IconChevronDown, IconChevronRight } from '@tabler/icons-react';
|
|
8
8
|
import { ArrowElbowDownRight, SkipForward as SkipForward$1, Pencil as Pencil$1, Tray, ChatCircle, House, Pause as Pause$1, Play as Play$1, ArrowCounterClockwise, Check as Check$1, Link as Link$1, Image, User as User$1, Globe as Globe$1, Brain as Brain$1, PaintBrush, Heart as Heart$1, Rocket as Rocket$1, Lightbulb as Lightbulb$1, Palette as Palette$1, Shield as Shield$1, Bell as Bell$1, Envelope, Lock as Lock$1, Users as Users$1, Spinner as Spinner$1, MagnifyingGlass, ArrowUp as ArrowUp$1, ArrowRight as ArrowRight$1, ArrowLeft as ArrowLeft$1, Plus as Plus$1, Gear, Star as Star$1, Clock as Clock$1, Books, Circle as Circle$1, Rectangle, Moon as Moon$1, Sun as Sun$1, Monitor as Monitor$1, DotOutline, List, Copy as Copy$1, X as X$1, Eyedropper, CaretDown, CaretRight } from '@phosphor-icons/react';
|
|
@@ -598,6 +598,23 @@ var dialogSheetMotionClassName = [
|
|
|
598
598
|
"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
599
599
|
"lg:data-[state=closed]:zoom-out-95 lg:data-[state=open]:zoom-in-95"
|
|
600
600
|
].join(" ");
|
|
601
|
+
var mobileDialogSheetStyle = `
|
|
602
|
+
@media (max-width: 1023px) {
|
|
603
|
+
[data-hilum-dialog-sheet="true"] {
|
|
604
|
+
position: fixed !important;
|
|
605
|
+
left: 0 !important;
|
|
606
|
+
right: 0 !important;
|
|
607
|
+
bottom: 0 !important;
|
|
608
|
+
top: auto !important;
|
|
609
|
+
width: 100% !important;
|
|
610
|
+
max-width: none !important;
|
|
611
|
+
max-height: calc(100dvh - 1rem) !important;
|
|
612
|
+
border-bottom-left-radius: 0 !important;
|
|
613
|
+
border-bottom-right-radius: 0 !important;
|
|
614
|
+
transform-origin: bottom center !important;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
`;
|
|
601
618
|
var mobilePopperSheetPositionClassName = [
|
|
602
619
|
"max-md:!fixed max-md:!inset-x-3 max-md:!bottom-3 max-md:!top-auto max-md:!left-3 max-md:!right-3",
|
|
603
620
|
"max-md:!w-auto max-md:!min-w-0 max-md:!max-w-none max-md:!transform-none"
|
|
@@ -1946,15 +1963,17 @@ var AlertDialogOverlay = React16.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1946
1963
|
));
|
|
1947
1964
|
AlertDialogOverlay.displayName = "AlertDialogOverlay";
|
|
1948
1965
|
var AlertDialogContent = React16.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialog.Portal, { children: [
|
|
1966
|
+
/* @__PURE__ */ jsx("style", { children: mobileDialogSheetStyle }),
|
|
1949
1967
|
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
1950
1968
|
/* @__PURE__ */ jsx(
|
|
1951
1969
|
AlertDialog.Content,
|
|
1952
1970
|
{
|
|
1953
1971
|
ref,
|
|
1972
|
+
"data-hilum-dialog-sheet": "true",
|
|
1954
1973
|
className: cn(
|
|
1955
1974
|
mobileDialogSheetContentClassName,
|
|
1956
1975
|
desktopDialogContentClassName,
|
|
1957
|
-
"border border-border shadow-elevated
|
|
1976
|
+
"border border-border shadow-elevated max-w-md",
|
|
1958
1977
|
dialogSheetMotionClassName,
|
|
1959
1978
|
className
|
|
1960
1979
|
),
|
|
@@ -8256,8 +8275,9 @@ var DialogContent = forwardRef(
|
|
|
8256
8275
|
if (!open) setMounted(false);
|
|
8257
8276
|
};
|
|
8258
8277
|
if (!mounted) return null;
|
|
8259
|
-
const sizeClassName = size === "sm" ? container ? "max-w-[400px]" : "
|
|
8278
|
+
const sizeClassName = size === "sm" ? container ? "max-w-[400px]" : "max-w-[400px]" : container ? "max-w-[540px]" : "max-w-[540px]";
|
|
8260
8279
|
return /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { forceMount: true, container: container ?? void 0, children: [
|
|
8280
|
+
!container && /* @__PURE__ */ jsx("style", { children: mobileDialogSheetStyle }),
|
|
8261
8281
|
/* @__PURE__ */ jsx(DialogPrimitive.Overlay, { asChild: true, forceMount: true, children: /* @__PURE__ */ jsx(
|
|
8262
8282
|
motion.div,
|
|
8263
8283
|
{
|
|
@@ -8273,6 +8293,7 @@ var DialogContent = forwardRef(
|
|
|
8273
8293
|
/* @__PURE__ */ jsx(DialogPrimitive.Content, { ref, asChild: true, forceMount: true, ...props, children: /* @__PURE__ */ jsx(
|
|
8274
8294
|
motion.div,
|
|
8275
8295
|
{
|
|
8296
|
+
"data-hilum-dialog-sheet": container ? void 0 : "true",
|
|
8276
8297
|
className: cn(
|
|
8277
8298
|
container ? "absolute left-1/2 top-1/2 z-50 w-[calc(100%-2rem)]" : [
|
|
8278
8299
|
mobileDialogSheetContentClassName,
|
|
@@ -8298,7 +8319,7 @@ var DialogContent = forwardRef(
|
|
|
8298
8319
|
children: /* @__PURE__ */ jsxs(SurfaceProvider, { value: dialogLevel, children: [
|
|
8299
8320
|
children,
|
|
8300
8321
|
/* @__PURE__ */ jsx(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "ghost", size: "icon-sm", className: "absolute right-3 top-3", children: [
|
|
8301
|
-
|
|
8322
|
+
createElement(XIcon),
|
|
8302
8323
|
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
8303
8324
|
] }) })
|
|
8304
8325
|
] })
|