@umami/react-zen 0.238.0 → 0.240.0
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.d.mts +72 -68
- package/dist/index.d.ts +72 -68
- package/dist/index.js +151 -248
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +154 -245
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -23
- package/styles.full.css +1 -1
- package/LICENSE +0 -21
- package/README.md +0 -61
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Button as Button$1, DisclosureGroup, Disclosure, DisclosurePanel, Dialog as Dialog$1, Breadcrumbs as Breadcrumbs$1, Breadcrumb as Breadcrumb$1, Calendar as Calendar$1, Heading as Heading$1, CalendarGrid, CalendarGridHeader, CalendarHeaderCell, CalendarGridBody, CalendarCell, Checkbox as Checkbox$1, Label as Label$1, ListBox, ListBoxItem, Separator, ListBoxSection, Header, Popover as Popover$1, ComboBox as ComboBox$1, Group, Input, TextField as TextField$1, TextArea, Table as Table$1, TableHeader as TableHeader$1, TableBody as TableBody$1, Row as Row$1, Column as Column$1, Cell, Tooltip as Tooltip$1, OverlayArrow, Menu as Menu$1, MenuItem as MenuItem$1, MenuSection as MenuSection$1, SubmenuTrigger, ModalOverlay, Modal as Modal$1, ProgressBar as ProgressBar$1, RadioGroup as RadioGroup$1, Radio as Radio$1, SearchField as SearchField$1, Select as Select$1, SelectValue,
|
|
1
|
+
import { Button as Button$1, DisclosureGroup, Disclosure, DisclosurePanel, Dialog as Dialog$1, Breadcrumbs as Breadcrumbs$1, Breadcrumb as Breadcrumb$1, Calendar as Calendar$1, Heading as Heading$1, CalendarGrid, CalendarGridHeader, CalendarHeaderCell, CalendarGridBody, CalendarCell, Checkbox as Checkbox$1, Label as Label$1, ListBox, ListBoxItem, Separator, ListBoxSection, Header, Popover as Popover$1, ComboBox as ComboBox$1, Group, Input, TextField as TextField$1, TextArea, Table as Table$1, TableHeader as TableHeader$1, TableBody as TableBody$1, Row as Row$1, Column as Column$1, Cell, Tooltip as Tooltip$1, OverlayArrow, Menu as Menu$1, MenuItem as MenuItem$1, MenuSection as MenuSection$1, SubmenuTrigger, ModalOverlay, Modal as Modal$1, ProgressBar as ProgressBar$1, RadioGroup as RadioGroup$1, Radio as Radio$1, SearchField as SearchField$1, Select as Select$1, SelectValue, Slider as Slider$1, SliderOutput, SliderTrack, Switch as Switch$1, Tabs as Tabs$1, TabList as TabList$1, Tab as Tab$1, TabPanel as TabPanel$1, TagGroup as TagGroup$1, TagList, Tag as Tag$1, ToggleButton, SliderThumb } from 'react-aria-components';
|
|
2
2
|
export { DialogTrigger, FileTrigger, Focusable, MenuTrigger, Pressable, RouterProvider, SubmenuTrigger, TooltipTrigger } from 'react-aria-components';
|
|
3
3
|
import * as lucide_react_star from 'lucide-react';
|
|
4
|
-
import { forwardRef, createContext, isValidElement, cloneElement, createElement,
|
|
4
|
+
import { forwardRef, createContext, isValidElement, cloneElement, createElement, useState, useRef, useEffect, useId, Fragment as Fragment$1, Children, useCallback, useLayoutEffect, useContext } from 'react';
|
|
5
5
|
import { tv } from 'tailwind-variants';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
import { clsx } from 'clsx';
|
|
@@ -364,6 +364,37 @@ var toast = tv({
|
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
});
|
|
367
|
+
var tag = tv({
|
|
368
|
+
slots: {
|
|
369
|
+
base: [
|
|
370
|
+
"inline-flex items-center gap-1 px-2 py-0.5 rounded text-sm",
|
|
371
|
+
"cursor-default outline-none",
|
|
372
|
+
"focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-1"
|
|
373
|
+
],
|
|
374
|
+
removeButton: [
|
|
375
|
+
"flex items-center justify-center rounded-full p-0.5 -mr-1",
|
|
376
|
+
"cursor-pointer outline-none",
|
|
377
|
+
"hover:bg-black/10 dark:hover:bg-white/10",
|
|
378
|
+
"pressed:bg-black/20 dark:pressed:bg-white/20"
|
|
379
|
+
]
|
|
380
|
+
},
|
|
381
|
+
variants: {
|
|
382
|
+
variant: {
|
|
383
|
+
default: {
|
|
384
|
+
base: "bg-interactive text-foreground-primary"
|
|
385
|
+
},
|
|
386
|
+
outline: {
|
|
387
|
+
base: "bg-transparent border border-edge text-foreground-primary"
|
|
388
|
+
},
|
|
389
|
+
primary: {
|
|
390
|
+
base: "bg-primary text-primary-foreground"
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
defaultVariants: {
|
|
395
|
+
variant: "default"
|
|
396
|
+
}
|
|
397
|
+
});
|
|
367
398
|
function Button({
|
|
368
399
|
variant,
|
|
369
400
|
size = "md",
|
|
@@ -1099,7 +1130,11 @@ var semanticColorMap = {
|
|
|
1099
1130
|
"surface-sunken": { text: "", bg: "bg-surface-sunken" },
|
|
1100
1131
|
"surface-overlay": { text: "", bg: "bg-surface-overlay" },
|
|
1101
1132
|
"surface-inverted": { text: "", bg: "bg-surface-inverted" },
|
|
1102
|
-
"surface-disabled": { text: "", bg: "bg-surface-disabled" }
|
|
1133
|
+
"surface-disabled": { text: "", bg: "bg-surface-disabled" },
|
|
1134
|
+
// Interactive colors
|
|
1135
|
+
interactive: { text: "", bg: "bg-interactive" },
|
|
1136
|
+
"interactive-hover": { text: "", bg: "bg-interactive-hover" },
|
|
1137
|
+
"interactive-pressed": { text: "", bg: "bg-interactive-pressed" }
|
|
1103
1138
|
};
|
|
1104
1139
|
var tailwindColors = /* @__PURE__ */ new Set([
|
|
1105
1140
|
"gray",
|
|
@@ -2499,6 +2534,7 @@ var Box = forwardRef(function Box2({
|
|
|
2499
2534
|
flexBasis,
|
|
2500
2535
|
flexGrow,
|
|
2501
2536
|
flexShrink,
|
|
2537
|
+
fill,
|
|
2502
2538
|
gridArea,
|
|
2503
2539
|
gridRow,
|
|
2504
2540
|
gridColumn,
|
|
@@ -2586,6 +2622,7 @@ var Box = forwardRef(function Box2({
|
|
|
2586
2622
|
...flexBasis && { flexBasis },
|
|
2587
2623
|
...flexGrow !== void 0 && { flexGrow },
|
|
2588
2624
|
...flexShrink !== void 0 && { flexShrink },
|
|
2625
|
+
...fill && { flex: 1 },
|
|
2589
2626
|
...gridArea && { gridArea },
|
|
2590
2627
|
...gridRow && { gridRow },
|
|
2591
2628
|
...gridColumn && { gridColumn },
|
|
@@ -2850,20 +2887,12 @@ function Calendar({
|
|
|
2850
2887
|
function Checkbox({ label, className, children, ...props }) {
|
|
2851
2888
|
const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
|
|
2852
2889
|
const styles = checkbox();
|
|
2853
|
-
return /* @__PURE__ */ jsx(
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
children: ({ isIndeterminate, isSelected: isSelected2 }) => {
|
|
2860
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2861
|
-
/* @__PURE__ */ jsx(Box, { className: styles.box(), children: /* @__PURE__ */ jsx(Icon, { className: styles.icon(), size: "sm", children: isIndeterminate ? /* @__PURE__ */ jsx(icons_exports.Minus, {}) : isSelected2 ? /* @__PURE__ */ jsx(icons_exports.Check, {}) : null }) }),
|
|
2862
|
-
children
|
|
2863
|
-
] });
|
|
2864
|
-
}
|
|
2865
|
-
}
|
|
2866
|
-
);
|
|
2890
|
+
return /* @__PURE__ */ jsx(Checkbox$1, { ...props, isSelected, className: cn(styles.root(), className), children: ({ isIndeterminate, isSelected: isSelected2 }) => {
|
|
2891
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2892
|
+
/* @__PURE__ */ jsx(Box, { className: styles.box(), children: /* @__PURE__ */ jsx(Icon, { className: styles.icon(), size: "sm", children: isIndeterminate ? /* @__PURE__ */ jsx(icons_exports.Minus, {}) : isSelected2 ? /* @__PURE__ */ jsx(icons_exports.Check, {}) : null }) }),
|
|
2893
|
+
children
|
|
2894
|
+
] });
|
|
2895
|
+
} });
|
|
2867
2896
|
}
|
|
2868
2897
|
function Code({ className, children, ...props }) {
|
|
2869
2898
|
return /* @__PURE__ */ jsx(
|
|
@@ -2882,7 +2911,12 @@ function useFieldId(id) {
|
|
|
2882
2911
|
const generatedId = useId();
|
|
2883
2912
|
return id ?? generatedId;
|
|
2884
2913
|
}
|
|
2885
|
-
function Label({
|
|
2914
|
+
function Label({
|
|
2915
|
+
size = "base",
|
|
2916
|
+
weight = "semibold",
|
|
2917
|
+
lineHeight = "loose",
|
|
2918
|
+
...props
|
|
2919
|
+
}) {
|
|
2886
2920
|
return /* @__PURE__ */ jsx(
|
|
2887
2921
|
Text,
|
|
2888
2922
|
{
|
|
@@ -2955,10 +2989,6 @@ function getHighlightColor(color) {
|
|
|
2955
2989
|
}
|
|
2956
2990
|
function List({
|
|
2957
2991
|
id,
|
|
2958
|
-
items = [],
|
|
2959
|
-
idProperty = "id",
|
|
2960
|
-
labelProperty = "label",
|
|
2961
|
-
separatorProperty = "separator",
|
|
2962
2992
|
highlightColor,
|
|
2963
2993
|
showCheckmark = true,
|
|
2964
2994
|
isFullscreen,
|
|
@@ -2990,7 +3020,6 @@ function List({
|
|
|
2990
3020
|
...props,
|
|
2991
3021
|
selectedKeys: value || selectedKeys,
|
|
2992
3022
|
defaultSelectedKeys: value || defaultSelectedKeys,
|
|
2993
|
-
items,
|
|
2994
3023
|
className: cn(
|
|
2995
3024
|
"grid outline-none overflow-auto gap-1",
|
|
2996
3025
|
isFullscreen && "block p-3 rounded-none fixed inset-0 overflow-auto z-[9999] bg-surface-base",
|
|
@@ -2998,14 +3027,7 @@ function List({
|
|
|
2998
3027
|
),
|
|
2999
3028
|
onSelectionChange: handleSelectionChange,
|
|
3000
3029
|
style: { ...style, ...getHighlightColor(highlightColor) },
|
|
3001
|
-
children
|
|
3002
|
-
const id2 = item[idProperty] || item.toString();
|
|
3003
|
-
const label2 = item[labelProperty] || item.toString();
|
|
3004
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
3005
|
-
item[separatorProperty] && /* @__PURE__ */ jsx(ListSeparator, {}),
|
|
3006
|
-
/* @__PURE__ */ jsx(ListItem, { id: id2, showCheckmark, children: label2 })
|
|
3007
|
-
] }, id2);
|
|
3008
|
-
})
|
|
3030
|
+
children
|
|
3009
3031
|
}
|
|
3010
3032
|
)
|
|
3011
3033
|
] });
|
|
@@ -3062,7 +3084,6 @@ function Popover({ children, isFullscreen, className, ...props }) {
|
|
|
3062
3084
|
);
|
|
3063
3085
|
}
|
|
3064
3086
|
function ComboBox({
|
|
3065
|
-
items,
|
|
3066
3087
|
className,
|
|
3067
3088
|
renderEmptyState,
|
|
3068
3089
|
listProps,
|
|
@@ -3099,16 +3120,23 @@ function ComboBox({
|
|
|
3099
3120
|
]
|
|
3100
3121
|
}
|
|
3101
3122
|
),
|
|
3102
|
-
/* @__PURE__ */ jsx(Popover, { ...popoverProps, children: /* @__PURE__ */ jsx(Box, { padding: "2", border: true, borderRadius: "md", shadow: "lg", className: "bg-surface-overlay", children: /* @__PURE__ */ jsx(List, {
|
|
3123
|
+
/* @__PURE__ */ jsx(Popover, { ...popoverProps, children: /* @__PURE__ */ jsx(Box, { padding: "2", border: true, borderRadius: "md", shadow: "lg", className: "bg-surface-overlay", children: /* @__PURE__ */ jsx(List, { renderEmptyState, ...listProps, children }) }) })
|
|
3103
3124
|
] });
|
|
3104
3125
|
}
|
|
3105
3126
|
var TIMEOUT = 2e3;
|
|
3106
|
-
function CopyButton({
|
|
3127
|
+
function CopyButton({
|
|
3128
|
+
value,
|
|
3129
|
+
timeout = TIMEOUT,
|
|
3130
|
+
className,
|
|
3131
|
+
children,
|
|
3132
|
+
...props
|
|
3133
|
+
}) {
|
|
3107
3134
|
const [copied, setCopied] = useState(false);
|
|
3108
3135
|
const ref = useRef(timeout);
|
|
3109
3136
|
const handleCopy = async () => {
|
|
3110
|
-
|
|
3111
|
-
|
|
3137
|
+
const text2 = typeof value === "function" ? value() : value;
|
|
3138
|
+
if (text2) {
|
|
3139
|
+
await navigator.clipboard.writeText(text2);
|
|
3112
3140
|
setCopied(true);
|
|
3113
3141
|
clearTimeout(ref.current);
|
|
3114
3142
|
ref.current = +setTimeout(() => setCopied(false), timeout);
|
|
@@ -3389,10 +3417,13 @@ function DataCard({ data = [], labelWidth = "auto", ...props }) {
|
|
|
3389
3417
|
padding: "6",
|
|
3390
3418
|
...props,
|
|
3391
3419
|
children: rows.map((row, index) => {
|
|
3392
|
-
return
|
|
3393
|
-
|
|
3394
|
-
/* @__PURE__ */
|
|
3395
|
-
|
|
3420
|
+
return (
|
|
3421
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: rows are static display data
|
|
3422
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
3423
|
+
/* @__PURE__ */ jsx(Row, { paddingY: "3", border: "bottom", borderColor: "muted", paddingRight: "6", children: /* @__PURE__ */ jsx(Text, { weight: "bold", children: row?.label }) }),
|
|
3424
|
+
/* @__PURE__ */ jsx(Row, { paddingY: "3", border: "bottom", children: /* @__PURE__ */ jsx(Text, { children: row?.value }) })
|
|
3425
|
+
] }, index)
|
|
3426
|
+
);
|
|
3396
3427
|
})
|
|
3397
3428
|
}
|
|
3398
3429
|
);
|
|
@@ -3508,25 +3539,28 @@ function DataTable({
|
|
|
3508
3539
|
return /* @__PURE__ */ createElement(TableColumn, { ...columnProps, key: id, id }, label);
|
|
3509
3540
|
}) }),
|
|
3510
3541
|
/* @__PURE__ */ jsx(TableBody, { children: rows.map((row, index) => {
|
|
3511
|
-
return
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3542
|
+
return (
|
|
3543
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: row data may not have unique ids
|
|
3544
|
+
/* @__PURE__ */ jsx(TableRow, { style: { gridTemplateColumns: gridTemplateColumns2 }, children: columns?.map(({ id, as, hidden, className: className2, children: children2, ...cellProps }) => {
|
|
3545
|
+
if (hidden) {
|
|
3546
|
+
return null;
|
|
3547
|
+
}
|
|
3548
|
+
const value = typeof children2 === "function" ? children2(row, index) : children2 || row[id];
|
|
3549
|
+
return /* @__PURE__ */ createElement(
|
|
3550
|
+
TableCell,
|
|
3551
|
+
{
|
|
3552
|
+
...cellProps,
|
|
3553
|
+
key: id,
|
|
3554
|
+
className: cn("items-center", className2)
|
|
3555
|
+
},
|
|
3556
|
+
as ? createElement(as, {}, value) : value
|
|
3557
|
+
);
|
|
3558
|
+
}) }, index)
|
|
3559
|
+
);
|
|
3526
3560
|
}) })
|
|
3527
3561
|
] });
|
|
3528
3562
|
}
|
|
3529
|
-
function DataColumn(
|
|
3563
|
+
function DataColumn(_props) {
|
|
3530
3564
|
return null;
|
|
3531
3565
|
}
|
|
3532
3566
|
var sizeMap2 = {
|
|
@@ -3567,7 +3601,12 @@ function Tooltip({ children, className, showArrow, ...props }) {
|
|
|
3567
3601
|
children
|
|
3568
3602
|
] });
|
|
3569
3603
|
}
|
|
3570
|
-
function TooltipBubble({
|
|
3604
|
+
function TooltipBubble({
|
|
3605
|
+
children,
|
|
3606
|
+
className,
|
|
3607
|
+
color: _color,
|
|
3608
|
+
...props
|
|
3609
|
+
}) {
|
|
3571
3610
|
return /* @__PURE__ */ jsx(Box, { ...props, className, children });
|
|
3572
3611
|
}
|
|
3573
3612
|
function FloatingTooltip({ className, style, children, ...props }) {
|
|
@@ -3585,7 +3624,10 @@ function FloatingTooltip({ className, style, children, ...props }) {
|
|
|
3585
3624
|
TooltipBubble,
|
|
3586
3625
|
{
|
|
3587
3626
|
...props,
|
|
3588
|
-
className: cn(
|
|
3627
|
+
className: cn(
|
|
3628
|
+
"fixed pointer-events-none z-[9999] -translate-x-1/2 -translate-y-[calc(100%+10px)]",
|
|
3629
|
+
className
|
|
3630
|
+
),
|
|
3589
3631
|
style: { ...style, left: position.x, top: position.y },
|
|
3590
3632
|
children
|
|
3591
3633
|
}
|
|
@@ -3732,7 +3774,12 @@ function FormFieldArray({
|
|
|
3732
3774
|
children({ ...context, ...fieldProps })
|
|
3733
3775
|
] });
|
|
3734
3776
|
}
|
|
3735
|
-
function FormResetButton({
|
|
3777
|
+
function FormResetButton({
|
|
3778
|
+
values = {},
|
|
3779
|
+
children,
|
|
3780
|
+
onPress,
|
|
3781
|
+
...props
|
|
3782
|
+
}) {
|
|
3736
3783
|
const { reset } = useFormContext();
|
|
3737
3784
|
const handleReset = (e) => {
|
|
3738
3785
|
reset(values);
|
|
@@ -4023,7 +4070,7 @@ function Toast({
|
|
|
4023
4070
|
return /* @__PURE__ */ jsxs(Row, { ...props, className: cn(toast({ variant }), className), children: [
|
|
4024
4071
|
/* @__PURE__ */ jsxs(Column, { flexGrow: 1, gap: "1", children: [
|
|
4025
4072
|
title && /* @__PURE__ */ jsx(Text, { weight: "semibold", children: title }),
|
|
4026
|
-
message && /* @__PURE__ */ jsx(Text, { color: "muted", children: message })
|
|
4073
|
+
message && /* @__PURE__ */ jsx(Text, { color: title ? "muted" : void 0, children: message })
|
|
4027
4074
|
] }),
|
|
4028
4075
|
hasActions && actions.map((action) => {
|
|
4029
4076
|
return /* @__PURE__ */ jsx(Button, { variant: "outline", onPress: () => onClose?.(action), children: action }, action);
|
|
@@ -4043,13 +4090,13 @@ function Toast({
|
|
|
4043
4090
|
}
|
|
4044
4091
|
var positionClasses = {
|
|
4045
4092
|
"top-left": "top-4 left-4 items-start",
|
|
4046
|
-
|
|
4093
|
+
top: "top-4 left-1/2 -translate-x-1/2 items-center",
|
|
4047
4094
|
"top-right": "top-4 right-4 items-end",
|
|
4048
4095
|
"bottom-left": "bottom-4 left-4 items-start",
|
|
4049
|
-
|
|
4096
|
+
bottom: "bottom-4 left-1/2 -translate-x-1/2 items-center",
|
|
4050
4097
|
"bottom-right": "bottom-4 right-4 items-end",
|
|
4051
|
-
|
|
4052
|
-
|
|
4098
|
+
left: "top-1/2 left-4 -translate-y-1/2 items-start",
|
|
4099
|
+
right: "top-1/2 right-4 -translate-y-1/2 items-end"
|
|
4053
4100
|
};
|
|
4054
4101
|
var AnimatedBox = animated(Box);
|
|
4055
4102
|
function Toaster({ duration = 0, position = "bottom-right" }) {
|
|
@@ -4134,21 +4181,6 @@ function useToast() {
|
|
|
4134
4181
|
};
|
|
4135
4182
|
return { toast: toast2, toasts };
|
|
4136
4183
|
}
|
|
4137
|
-
function IconLabel({
|
|
4138
|
-
icon,
|
|
4139
|
-
label,
|
|
4140
|
-
iconProps,
|
|
4141
|
-
labelProps,
|
|
4142
|
-
showLabel = true,
|
|
4143
|
-
children,
|
|
4144
|
-
...props
|
|
4145
|
-
}) {
|
|
4146
|
-
return /* @__PURE__ */ jsxs(Row, { alignItems: "center", gap: true, ...props, children: [
|
|
4147
|
-
icon && /* @__PURE__ */ jsx(Icon, { ...iconProps, children: icon }),
|
|
4148
|
-
showLabel && label && /* @__PURE__ */ jsx(Text, { ...labelProps, children: label }),
|
|
4149
|
-
showLabel && children
|
|
4150
|
-
] });
|
|
4151
|
-
}
|
|
4152
4184
|
var objectFitMap = {
|
|
4153
4185
|
fill: "object-fill",
|
|
4154
4186
|
contain: "object-contain",
|
|
@@ -4240,7 +4272,11 @@ function MenuItem({
|
|
|
4240
4272
|
className
|
|
4241
4273
|
),
|
|
4242
4274
|
children: ({ isSelected }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4243
|
-
/* @__PURE__ */
|
|
4275
|
+
/* @__PURE__ */ jsxs(Row, { alignItems: "center", gap: true, children: [
|
|
4276
|
+
icon && /* @__PURE__ */ jsx(Icon, { children: icon }),
|
|
4277
|
+
label && /* @__PURE__ */ jsx(Text, { children: label }),
|
|
4278
|
+
children
|
|
4279
|
+
] }),
|
|
4244
4280
|
showChecked && isSelected && /* @__PURE__ */ jsx(Icon, { "aria-hidden": "true", children: /* @__PURE__ */ jsx(icons_exports.Check, {}) }),
|
|
4245
4281
|
showSubMenuIcon && /* @__PURE__ */ jsx(Icon, { "aria-hidden": "true", children: /* @__PURE__ */ jsx(icons_exports.ChevronRight, {}) })
|
|
4246
4282
|
] })
|
|
@@ -4369,73 +4405,6 @@ function NavbarItem({
|
|
|
4369
4405
|
}
|
|
4370
4406
|
);
|
|
4371
4407
|
}
|
|
4372
|
-
var NavMenuContext = createContext(null);
|
|
4373
|
-
function NavMenu({ muteItems, onItemClick, className, children, ...props }) {
|
|
4374
|
-
return /* @__PURE__ */ jsx(NavMenuContext.Provider, { value: { onItemClick }, children: /* @__PURE__ */ jsx(Column, { ...props, color: muteItems ? "muted" : void 0, className, children }) });
|
|
4375
|
-
}
|
|
4376
|
-
function NavMenuGroup({
|
|
4377
|
-
title,
|
|
4378
|
-
allowMinimize = true,
|
|
4379
|
-
isMinimized,
|
|
4380
|
-
className,
|
|
4381
|
-
children,
|
|
4382
|
-
...props
|
|
4383
|
-
}) {
|
|
4384
|
-
const [minimized, setMinimized] = useState(!!isMinimized);
|
|
4385
|
-
const handleClick = () => {
|
|
4386
|
-
if (allowMinimize) {
|
|
4387
|
-
setMinimized((state) => !state);
|
|
4388
|
-
}
|
|
4389
|
-
};
|
|
4390
|
-
return /* @__PURE__ */ jsxs(
|
|
4391
|
-
Column,
|
|
4392
|
-
{
|
|
4393
|
-
...props,
|
|
4394
|
-
className: cn(
|
|
4395
|
-
className,
|
|
4396
|
-
allowMinimize && "cursor-pointer",
|
|
4397
|
-
allowMinimize && minimized && "[&_.navmenu-children]:hidden"
|
|
4398
|
-
),
|
|
4399
|
-
children: [
|
|
4400
|
-
/* @__PURE__ */ jsxs(
|
|
4401
|
-
Row,
|
|
4402
|
-
{
|
|
4403
|
-
paddingY: "2",
|
|
4404
|
-
paddingX: "3",
|
|
4405
|
-
alignItems: "center",
|
|
4406
|
-
justifyContent: "space-between",
|
|
4407
|
-
onClick: handleClick,
|
|
4408
|
-
children: [
|
|
4409
|
-
/* @__PURE__ */ jsx(Text, { size: "xs", weight: "semibold", color: "muted", transform: "uppercase", children: title }),
|
|
4410
|
-
allowMinimize && /* @__PURE__ */ jsx(Icon, { rotate: minimized ? 0 : 90, color: "muted", children: /* @__PURE__ */ jsx(icons_exports.ChevronRight, {}) })
|
|
4411
|
-
]
|
|
4412
|
-
}
|
|
4413
|
-
),
|
|
4414
|
-
!minimized && /* @__PURE__ */ jsx(Column, { className: "navmenu-children", children })
|
|
4415
|
-
]
|
|
4416
|
-
}
|
|
4417
|
-
);
|
|
4418
|
-
}
|
|
4419
|
-
function NavMenuItem({ isSelected, className, children, ...props }) {
|
|
4420
|
-
const { onItemClick } = useContext(NavMenuContext);
|
|
4421
|
-
return /* @__PURE__ */ jsx(
|
|
4422
|
-
Row,
|
|
4423
|
-
{
|
|
4424
|
-
...props,
|
|
4425
|
-
paddingY: "2",
|
|
4426
|
-
paddingX: "3",
|
|
4427
|
-
borderRadius: "md",
|
|
4428
|
-
onClick: onItemClick,
|
|
4429
|
-
className: cn(
|
|
4430
|
-
"cursor-pointer",
|
|
4431
|
-
"hover:bg-interactive",
|
|
4432
|
-
isSelected && "bg-interactive font-medium",
|
|
4433
|
-
className
|
|
4434
|
-
),
|
|
4435
|
-
children
|
|
4436
|
-
}
|
|
4437
|
-
);
|
|
4438
|
-
}
|
|
4439
4408
|
var PALETTE_LABELS = {
|
|
4440
4409
|
neutral: "Neutral",
|
|
4441
4410
|
slate: "Slate",
|
|
@@ -4445,6 +4414,11 @@ var PALETTE_LABELS = {
|
|
|
4445
4414
|
};
|
|
4446
4415
|
function PaletteSwitcher({ className }) {
|
|
4447
4416
|
const { palette, setPalette } = useTheme();
|
|
4417
|
+
const [mounted, setMounted] = useState(false);
|
|
4418
|
+
useEffect(() => {
|
|
4419
|
+
setMounted(true);
|
|
4420
|
+
}, []);
|
|
4421
|
+
const currentPalette = mounted ? palette : "neutral";
|
|
4448
4422
|
return /* @__PURE__ */ jsx(
|
|
4449
4423
|
"div",
|
|
4450
4424
|
{
|
|
@@ -4458,13 +4432,13 @@ function PaletteSwitcher({ className }) {
|
|
|
4458
4432
|
type: "button",
|
|
4459
4433
|
onClick: () => setPalette(p),
|
|
4460
4434
|
"aria-label": PALETTE_LABELS[p],
|
|
4461
|
-
"aria-pressed":
|
|
4435
|
+
"aria-pressed": currentPalette === p,
|
|
4462
4436
|
className: cn(
|
|
4463
4437
|
"px-3 h-9 flex items-center justify-center cursor-pointer outline-none transition-colors text-sm",
|
|
4464
4438
|
"[&:not(:first-child)]:border-l [&:not(:first-child)]:border-edge",
|
|
4465
4439
|
"hover:bg-interactive",
|
|
4466
4440
|
"focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-inset",
|
|
4467
|
-
|
|
4441
|
+
currentPalette === p ? "bg-interactive text-foreground-primary" : "text-foreground-muted"
|
|
4468
4442
|
),
|
|
4469
4443
|
children: PALETTE_LABELS[p]
|
|
4470
4444
|
},
|
|
@@ -4473,7 +4447,7 @@ function PaletteSwitcher({ className }) {
|
|
|
4473
4447
|
}
|
|
4474
4448
|
);
|
|
4475
4449
|
}
|
|
4476
|
-
var
|
|
4450
|
+
var SvgEye = (props) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 256 256", ...props, children: [
|
|
4477
4451
|
/* @__PURE__ */ jsx("path", { fill: "none", d: "M0 0h256v256H0z" }),
|
|
4478
4452
|
/* @__PURE__ */ jsx(
|
|
4479
4453
|
"path",
|
|
@@ -4483,23 +4457,25 @@ var SvgEyeSlash = (props) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3
|
|
|
4483
4457
|
strokeLinecap: "round",
|
|
4484
4458
|
strokeLinejoin: "round",
|
|
4485
4459
|
strokeWidth: 16,
|
|
4486
|
-
d: "
|
|
4460
|
+
d: "M128 56c-80 0-112 72-112 72s32 72 112 72 112-72 112-72-32-72-112-72"
|
|
4487
4461
|
}
|
|
4488
4462
|
),
|
|
4489
4463
|
/* @__PURE__ */ jsx(
|
|
4490
|
-
"
|
|
4464
|
+
"circle",
|
|
4491
4465
|
{
|
|
4466
|
+
cx: 128,
|
|
4467
|
+
cy: 128,
|
|
4468
|
+
r: 40,
|
|
4492
4469
|
fill: "none",
|
|
4493
4470
|
stroke: "currentColor",
|
|
4494
4471
|
strokeLinecap: "round",
|
|
4495
4472
|
strokeLinejoin: "round",
|
|
4496
|
-
strokeWidth: 16
|
|
4497
|
-
d: "M208.61 169.1C230.41 149.58 240 128 240 128s-32-72-112-72a126 126 0 0 0-20.68 1.68M74 68.6C33.23 89.24 16 128 16 128s32 72 112 72a118.05 118.05 0 0 0 54-12.6"
|
|
4473
|
+
strokeWidth: 16
|
|
4498
4474
|
}
|
|
4499
4475
|
)
|
|
4500
4476
|
] });
|
|
4501
|
-
var
|
|
4502
|
-
var
|
|
4477
|
+
var Eye_default = SvgEye;
|
|
4478
|
+
var SvgEyeSlash = (props) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 256 256", ...props, children: [
|
|
4503
4479
|
/* @__PURE__ */ jsx("path", { fill: "none", d: "M0 0h256v256H0z" }),
|
|
4504
4480
|
/* @__PURE__ */ jsx(
|
|
4505
4481
|
"path",
|
|
@@ -4509,24 +4485,22 @@ var SvgEye = (props) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/
|
|
|
4509
4485
|
strokeLinecap: "round",
|
|
4510
4486
|
strokeLinejoin: "round",
|
|
4511
4487
|
strokeWidth: 16,
|
|
4512
|
-
d: "
|
|
4488
|
+
d: "m48 40 160 176M154.91 157.6a40 40 0 0 1-53.82-59.2M135.53 88.71a40 40 0 0 1 32.3 35.53"
|
|
4513
4489
|
}
|
|
4514
4490
|
),
|
|
4515
4491
|
/* @__PURE__ */ jsx(
|
|
4516
|
-
"
|
|
4492
|
+
"path",
|
|
4517
4493
|
{
|
|
4518
|
-
cx: 128,
|
|
4519
|
-
cy: 128,
|
|
4520
|
-
r: 40,
|
|
4521
4494
|
fill: "none",
|
|
4522
4495
|
stroke: "currentColor",
|
|
4523
4496
|
strokeLinecap: "round",
|
|
4524
4497
|
strokeLinejoin: "round",
|
|
4525
|
-
strokeWidth: 16
|
|
4498
|
+
strokeWidth: 16,
|
|
4499
|
+
d: "M208.61 169.1C230.41 149.58 240 128 240 128s-32-72-112-72a126 126 0 0 0-20.68 1.68M74 68.6C33.23 89.24 16 128 16 128s32 72 112 72a118.05 118.05 0 0 0 54-12.6"
|
|
4526
4500
|
}
|
|
4527
4501
|
)
|
|
4528
4502
|
] });
|
|
4529
|
-
var
|
|
4503
|
+
var EyeSlash_default = SvgEyeSlash;
|
|
4530
4504
|
function PasswordField({ label, className, ...props }) {
|
|
4531
4505
|
const [show, setShow] = useState(false);
|
|
4532
4506
|
const type = show ? "text" : "password";
|
|
@@ -4716,7 +4690,6 @@ function SearchField({
|
|
|
4716
4690
|
] });
|
|
4717
4691
|
}
|
|
4718
4692
|
function Select({
|
|
4719
|
-
items = [],
|
|
4720
4693
|
value,
|
|
4721
4694
|
defaultValue,
|
|
4722
4695
|
label,
|
|
@@ -4789,7 +4762,6 @@ function Select({
|
|
|
4789
4762
|
List,
|
|
4790
4763
|
{
|
|
4791
4764
|
...listProps,
|
|
4792
|
-
items,
|
|
4793
4765
|
isFullscreen,
|
|
4794
4766
|
...isFullscreen && {
|
|
4795
4767
|
shouldSelectOnPressUp: true,
|
|
@@ -4808,83 +4780,6 @@ function Select({
|
|
|
4808
4780
|
}
|
|
4809
4781
|
);
|
|
4810
4782
|
}
|
|
4811
|
-
var SidebarContext = createContext(null);
|
|
4812
|
-
function Sidebar({ isCollapsed, muteItems, className, children, ...props }) {
|
|
4813
|
-
return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: { isCollapsed }, children: /* @__PURE__ */ jsx(
|
|
4814
|
-
Column,
|
|
4815
|
-
{
|
|
4816
|
-
border: "right",
|
|
4817
|
-
...props,
|
|
4818
|
-
className: cn(
|
|
4819
|
-
"text-base",
|
|
4820
|
-
isCollapsed && "w-16",
|
|
4821
|
-
muteItems && "text-foreground-muted",
|
|
4822
|
-
className
|
|
4823
|
-
),
|
|
4824
|
-
children
|
|
4825
|
-
}
|
|
4826
|
-
) });
|
|
4827
|
-
}
|
|
4828
|
-
function SidebarSection({
|
|
4829
|
-
title,
|
|
4830
|
-
className,
|
|
4831
|
-
children,
|
|
4832
|
-
...props
|
|
4833
|
-
}) {
|
|
4834
|
-
return /* @__PURE__ */ jsxs(Column, { ...props, paddingY: "2", className, children: [
|
|
4835
|
-
title && /* @__PURE__ */ jsx(Box, { paddingX: "4", paddingY: "2", children: /* @__PURE__ */ jsx(Text, { size: "xs", weight: "semibold", transform: "uppercase", color: "muted", children: title }) }),
|
|
4836
|
-
/* @__PURE__ */ jsx(Column, { children })
|
|
4837
|
-
] });
|
|
4838
|
-
}
|
|
4839
|
-
function SidebarHeader({
|
|
4840
|
-
label,
|
|
4841
|
-
icon,
|
|
4842
|
-
className,
|
|
4843
|
-
children,
|
|
4844
|
-
...props
|
|
4845
|
-
}) {
|
|
4846
|
-
return /* @__PURE__ */ jsxs(Row, { ...props, paddingX: "4", paddingY: "3", gap: "3", alignItems: "center", className, children: [
|
|
4847
|
-
icon && /* @__PURE__ */ jsx(Icon, { size: "sm", children: icon }),
|
|
4848
|
-
label && /* @__PURE__ */ jsx(Text, { weight: "semibold", children: label }),
|
|
4849
|
-
children
|
|
4850
|
-
] });
|
|
4851
|
-
}
|
|
4852
|
-
function SidebarItem({
|
|
4853
|
-
label,
|
|
4854
|
-
icon,
|
|
4855
|
-
isSelected,
|
|
4856
|
-
className,
|
|
4857
|
-
children,
|
|
4858
|
-
...props
|
|
4859
|
-
}) {
|
|
4860
|
-
const { isCollapsed } = useContext(SidebarContext);
|
|
4861
|
-
return /* @__PURE__ */ jsxs(TooltipTrigger, { delay: 0, closeDelay: 0, isDisabled: !isCollapsed, children: [
|
|
4862
|
-
/* @__PURE__ */ jsx(Focusable, { children: /* @__PURE__ */ jsxs(
|
|
4863
|
-
Row,
|
|
4864
|
-
{
|
|
4865
|
-
...props,
|
|
4866
|
-
paddingX: isCollapsed ? "0" : "4",
|
|
4867
|
-
paddingY: "2",
|
|
4868
|
-
gap: "3",
|
|
4869
|
-
alignItems: "center",
|
|
4870
|
-
justifyContent: isCollapsed ? "center" : void 0,
|
|
4871
|
-
borderRadius: "md",
|
|
4872
|
-
className: cn(
|
|
4873
|
-
"cursor-pointer",
|
|
4874
|
-
"hover:bg-interactive",
|
|
4875
|
-
isSelected && "bg-interactive font-medium",
|
|
4876
|
-
className
|
|
4877
|
-
),
|
|
4878
|
-
children: [
|
|
4879
|
-
icon && /* @__PURE__ */ jsx(Icon, { size: "sm", children: icon }),
|
|
4880
|
-
label && !isCollapsed && /* @__PURE__ */ jsx(Text, { children: label }),
|
|
4881
|
-
children
|
|
4882
|
-
]
|
|
4883
|
-
}
|
|
4884
|
-
) }),
|
|
4885
|
-
/* @__PURE__ */ jsx(Tooltip, { placement: "right", children: label })
|
|
4886
|
-
] });
|
|
4887
|
-
}
|
|
4888
4783
|
function Fill2({ percentage }) {
|
|
4889
4784
|
const width = `calc(10px + ${percentage}% - ${percentage * 0.2}px)`;
|
|
4890
4785
|
return /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 left-0 rounded-full bg-primary", style: { width } });
|
|
@@ -4989,6 +4884,20 @@ function Tab({ children, className, ...props }) {
|
|
|
4989
4884
|
function TabPanel({ children, className, ...props }) {
|
|
4990
4885
|
return /* @__PURE__ */ jsx(TabPanel$1, { ...props, className, children });
|
|
4991
4886
|
}
|
|
4887
|
+
function TagGroup({ label, children, className, ...props }) {
|
|
4888
|
+
return /* @__PURE__ */ jsxs(TagGroup$1, { ...props, className: cn("flex flex-col gap-1", className), children: [
|
|
4889
|
+
label && /* @__PURE__ */ jsx(Label, { children: label }),
|
|
4890
|
+
/* @__PURE__ */ jsx(TagList, { className: "flex flex-wrap gap-1", children })
|
|
4891
|
+
] });
|
|
4892
|
+
}
|
|
4893
|
+
function Tag({ variant, children, className, ...props }) {
|
|
4894
|
+
const textValue = typeof children === "string" ? children : void 0;
|
|
4895
|
+
const styles = tag({ variant });
|
|
4896
|
+
return /* @__PURE__ */ jsx(Tag$1, { ...props, textValue, className: cn(styles.base(), className), children: ({ allowsRemoving }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4897
|
+
children,
|
|
4898
|
+
allowsRemoving && /* @__PURE__ */ jsx(Button$1, { slot: "remove", className: styles.removeButton(), children: /* @__PURE__ */ jsx(Icon, { size: "xs", children: /* @__PURE__ */ jsx(icons_exports.X, {}) }) })
|
|
4899
|
+
] }) });
|
|
4900
|
+
}
|
|
4992
4901
|
function getElement(target) {
|
|
4993
4902
|
return "current" in target ? target.current : target;
|
|
4994
4903
|
}
|
|
@@ -5171,7 +5080,7 @@ function ToggleGroup({
|
|
|
5171
5080
|
onChange?.(Array.from(keys).map((k) => k.toString()));
|
|
5172
5081
|
};
|
|
5173
5082
|
return /* @__PURE__ */ jsxs(
|
|
5174
|
-
TagGroup,
|
|
5083
|
+
TagGroup$1,
|
|
5175
5084
|
{
|
|
5176
5085
|
...props,
|
|
5177
5086
|
selectedKeys: value || selectedKeys,
|
|
@@ -5191,7 +5100,7 @@ function ToggleGroup({
|
|
|
5191
5100
|
}
|
|
5192
5101
|
function ToggleGroupItem({ className, children, ...props }) {
|
|
5193
5102
|
return /* @__PURE__ */ jsx(
|
|
5194
|
-
Tag,
|
|
5103
|
+
Tag$1,
|
|
5195
5104
|
{
|
|
5196
5105
|
...props,
|
|
5197
5106
|
className: cn(
|
|
@@ -5220,6 +5129,6 @@ function ZenProvider({
|
|
|
5220
5129
|
return /* @__PURE__ */ jsx(ToastProvider, { ...toast2, children });
|
|
5221
5130
|
}
|
|
5222
5131
|
|
|
5223
|
-
export { Accordion, AccordionItem, AlertBanner, AlertDialog, Blockquote, Box, Breadcrumb, Breadcrumbs, Button, Calendar, Checkbox, Code, Column, ComboBox, ConfirmationDialog, Container, CopyButton, DataCard, DataColumn, DataTable, Dialog, Dots, Flexbox, FloatingTooltip, Form, FormButtons, FormController, FormField, FormFieldArray, FormResetButton, FormSubmitButton, Grid, Heading, HoverTrigger, Icon,
|
|
5132
|
+
export { Accordion, AccordionItem, AlertBanner, AlertDialog, Blockquote, Box, Breadcrumb, Breadcrumbs, Button, Calendar, Checkbox, Code, Column, ComboBox, ConfirmationDialog, Container, CopyButton, DataCard, DataColumn, DataTable, Dialog, Dots, Flexbox, FloatingTooltip, Form, FormButtons, FormController, FormField, FormFieldArray, FormResetButton, FormSubmitButton, Grid, Heading, HoverTrigger, Icon, Image, Label, List, ListItem, ListSection, ListSeparator, Loading, LoadingButton, Menu, MenuItem, MenuSection, MenuSeparator, Modal, Navbar, NavbarContext, NavbarItem, PALETTES, PaletteSwitcher, PasswordField, Popover, ProgressBar, ProgressCircle, Radio, RadioGroup, Row, SearchField, Select, Slider, Spinner, StatusLight, SubMenuTrigger, Switch, Tab, TabList, TabPanel, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow, Tabs, Tag, TagGroup, Text, TextField, ThemeButton, ThemeSwitcher, Toast, ToastContext, ToastProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipBubble, ZenProvider, cn, getCssColorValue, isHeightPreset, isMaxHeightPreset, isMaxWidthPreset, isMinHeightPreset, isMinWidthPreset, isWidthPreset, mapAlignContent, mapAlignItems, mapAlignSelf, mapBackgroundColor, mapBorder, mapBorderColor, mapBorderRadius, mapBorderWidth, mapCursor, mapDisplay, mapFlexDirection, mapFlexWrap, mapFontSize, mapFontWeight, mapGap, mapGridAutoFlow, mapGridColumns, mapGridRows, mapHeadingSize, mapHeight, mapJustifyContent, mapJustifyItems, mapLetterSpacing, mapLineHeight, mapMargin, mapMaxHeight, mapMaxWidth, mapMinHeight, mapMinWidth, mapOpacity, mapOverflow, mapPadding, mapPointerEvents, mapPosition, mapShadow, mapStateStyles, mapTextAlign, mapTextColor, mapTextDecorationStyle, mapTextIndent, mapTextTransform, mapTextWrap, mapVerticalAlign, mapWhitespace, mapWidth, mapWordBreak, removeToast, resolveRender, useBreakpoint, useDebounce, useInitTheme, useNavigationContext, useTheme, useToast };
|
|
5224
5133
|
//# sourceMappingURL=index.mjs.map
|
|
5225
5134
|
//# sourceMappingURL=index.mjs.map
|