@umami/react-zen 0.233.0 → 0.235.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 +141 -76
- package/dist/index.d.ts +141 -76
- package/dist/index.js +88 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +35 -36
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/styles.css +13 -31
- package/styles.full.css +1 -1
- package/tailwind.preset.ts +5 -45
package/dist/index.mjs
CHANGED
|
@@ -63,7 +63,7 @@ var button = tv({
|
|
|
63
63
|
"pressed:bg-interactive-pressed"
|
|
64
64
|
],
|
|
65
65
|
primary: [
|
|
66
|
-
"bg-
|
|
66
|
+
"bg-primary text-primary-foreground",
|
|
67
67
|
"hover:opacity-90",
|
|
68
68
|
"pressed:opacity-80",
|
|
69
69
|
"disabled:opacity-50"
|
|
@@ -194,7 +194,7 @@ tv({
|
|
|
194
194
|
});
|
|
195
195
|
var tooltip = tv({
|
|
196
196
|
base: [
|
|
197
|
-
"bg-surface-inverted text-
|
|
197
|
+
"bg-surface-inverted text-surface-base text-base px-2 py-1 rounded",
|
|
198
198
|
"entering:animate-popover-in",
|
|
199
199
|
"exiting:animate-popover-out"
|
|
200
200
|
]
|
|
@@ -210,7 +210,7 @@ var checkbox = tv({
|
|
|
210
210
|
"flex items-center justify-center",
|
|
211
211
|
"w-5 h-5 rounded border border-edge bg-surface-base",
|
|
212
212
|
"shadow-sm transition-colors",
|
|
213
|
-
"group-selected:bg-
|
|
213
|
+
"group-selected:bg-primary group-selected:border-primary group-selected:text-primary-foreground",
|
|
214
214
|
"group-indeterminate:bg-surface-base group-indeterminate:text-foreground-primary",
|
|
215
215
|
"group-disabled:bg-surface-disabled",
|
|
216
216
|
"group-focus-visible:ring-2 group-focus-visible:ring-focus-ring group-focus-visible:ring-offset-1"
|
|
@@ -232,9 +232,9 @@ var switchVariant = tv({
|
|
|
232
232
|
],
|
|
233
233
|
track: [
|
|
234
234
|
"flex items-center w-10 h-6 px-1 rounded-full",
|
|
235
|
-
"bg-
|
|
235
|
+
"bg-interactive",
|
|
236
236
|
"transition-colors",
|
|
237
|
-
"group-selected:bg-
|
|
237
|
+
"group-selected:bg-primary",
|
|
238
238
|
"group-focus-visible:ring-2 group-focus-visible:ring-focus-ring group-focus-visible:ring-offset-1"
|
|
239
239
|
],
|
|
240
240
|
thumb: [
|
|
@@ -251,10 +251,10 @@ tv({
|
|
|
251
251
|
list: ["flex gap-1 border-b border-edge-muted"],
|
|
252
252
|
tab: [
|
|
253
253
|
"px-4 py-2 text-base font-medium cursor-pointer",
|
|
254
|
-
"text-foreground-
|
|
254
|
+
"text-foreground-muted outline-none",
|
|
255
255
|
"border-b-2 border-transparent -mb-px",
|
|
256
256
|
"hovered:text-foreground-primary",
|
|
257
|
-
"selected:text-foreground-primary selected:border-
|
|
257
|
+
"selected:text-foreground-primary selected:border-primary",
|
|
258
258
|
"disabled:text-foreground-disabled disabled:cursor-default",
|
|
259
259
|
"focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2"
|
|
260
260
|
],
|
|
@@ -1087,10 +1087,9 @@ var shadowMap = {
|
|
|
1087
1087
|
true: "shadow-[var(--shadow-default)]"
|
|
1088
1088
|
};
|
|
1089
1089
|
var semanticColorMap = {
|
|
1090
|
-
primary: { text: "text-foreground-primary", bg: "bg-
|
|
1091
|
-
secondary: { text: "text-foreground-secondary", bg: "bg-surface-raised" },
|
|
1090
|
+
primary: { text: "text-foreground-primary", bg: "bg-primary" },
|
|
1092
1091
|
muted: { text: "text-foreground-muted", bg: "bg-surface-raised" },
|
|
1093
|
-
inverted: { text: "text-
|
|
1092
|
+
inverted: { text: "text-surface-base", bg: "bg-surface-inverted" },
|
|
1094
1093
|
disabled: { text: "text-foreground-disabled", bg: "bg-surface-disabled" },
|
|
1095
1094
|
transparent: { text: "text-transparent", bg: "bg-transparent" },
|
|
1096
1095
|
true: { text: "text-foreground-primary", bg: "bg-interactive" },
|
|
@@ -1422,8 +1421,7 @@ var borderMap = {
|
|
|
1422
1421
|
var semanticBorderColorMap = {
|
|
1423
1422
|
true: "border-edge",
|
|
1424
1423
|
transparent: "border-transparent",
|
|
1425
|
-
primary: "border-
|
|
1426
|
-
inverted: "border-edge-inverted",
|
|
1424
|
+
primary: "border-primary",
|
|
1427
1425
|
muted: "border-edge-muted",
|
|
1428
1426
|
strong: "border-edge-strong",
|
|
1429
1427
|
disabled: "border-edge-muted"
|
|
@@ -2775,15 +2773,7 @@ function AlertDialog({
|
|
|
2775
2773
|
} });
|
|
2776
2774
|
}
|
|
2777
2775
|
function Blockquote({ className, children, ...props }) {
|
|
2778
|
-
return /* @__PURE__ */ jsx(
|
|
2779
|
-
Text,
|
|
2780
|
-
{
|
|
2781
|
-
...props,
|
|
2782
|
-
as: "blockquote",
|
|
2783
|
-
className: cn("border-l-2 border-edge-inverted pl-5", className),
|
|
2784
|
-
children
|
|
2785
|
-
}
|
|
2786
|
-
);
|
|
2776
|
+
return /* @__PURE__ */ jsx(Text, { ...props, as: "blockquote", className: cn("border-l-2 border-primary pl-5", className), children });
|
|
2787
2777
|
}
|
|
2788
2778
|
function Breadcrumbs({ children, className, ...props }) {
|
|
2789
2779
|
return /* @__PURE__ */ jsx(Breadcrumbs$1, { ...props, className: cn("flex items-center gap-3", className), children });
|
|
@@ -2850,7 +2840,7 @@ function Calendar({
|
|
|
2850
2840
|
"hover:bg-interactive",
|
|
2851
2841
|
"data-[outside-month]:hidden",
|
|
2852
2842
|
"data-[focus-visible]:outline-2 data-[focus-visible]:outline-focus-ring data-[focus-visible]:outline-offset-2",
|
|
2853
|
-
"data-[selected]:text-
|
|
2843
|
+
"data-[selected]:text-primary-foreground data-[selected]:bg-primary",
|
|
2854
2844
|
"data-[disabled]:text-foreground-disabled"
|
|
2855
2845
|
),
|
|
2856
2846
|
date
|
|
@@ -3480,7 +3470,7 @@ function TableCell({ children, className, align, ...props }) {
|
|
|
3480
3470
|
className: cn(
|
|
3481
3471
|
"flex p-2 flex-1 first:pl-0 last:pr-0",
|
|
3482
3472
|
"[&_a]:font-medium [&_a]:underline [&_a]:decoration-edge [&_a]:underline-offset-4",
|
|
3483
|
-
"[&_a:hover]:decoration-
|
|
3473
|
+
"[&_a:hover]:decoration-primary",
|
|
3484
3474
|
align && alignClasses2[align],
|
|
3485
3475
|
className
|
|
3486
3476
|
),
|
|
@@ -3767,13 +3757,13 @@ function Spinner(props) {
|
|
|
3767
3757
|
...domProps,
|
|
3768
3758
|
className: cn("relative inline-flex justify-center items-center", sizeMap3[size], className),
|
|
3769
3759
|
children: /* @__PURE__ */ jsxs("svg", { viewBox: "25 25 50 50", className: "zen-spinner-svg w-full h-full", children: [
|
|
3770
|
-
!quiet && /* @__PURE__ */ jsx("circle", { className: "zen-spinner-track stroke-
|
|
3760
|
+
!quiet && /* @__PURE__ */ jsx("circle", { className: "zen-spinner-track stroke-interactive", cx: "50", cy: "50", r: "20" }),
|
|
3771
3761
|
/* @__PURE__ */ jsx(
|
|
3772
3762
|
"circle",
|
|
3773
3763
|
{
|
|
3774
3764
|
className: cn(
|
|
3775
3765
|
"zen-spinner-fill",
|
|
3776
|
-
isDisabled ? "stroke-content-disabled" : "stroke-
|
|
3766
|
+
isDisabled ? "stroke-content-disabled" : "stroke-primary"
|
|
3777
3767
|
),
|
|
3778
3768
|
cx: "50",
|
|
3779
3769
|
cy: "50",
|
|
@@ -4498,7 +4488,16 @@ function PasswordField({ label, className, ...props }) {
|
|
|
4498
4488
|
] });
|
|
4499
4489
|
}
|
|
4500
4490
|
function Track({ children }) {
|
|
4501
|
-
return /* @__PURE__ */ jsx(
|
|
4491
|
+
return /* @__PURE__ */ jsx(
|
|
4492
|
+
Box,
|
|
4493
|
+
{
|
|
4494
|
+
position: "relative",
|
|
4495
|
+
borderRadius: "full",
|
|
4496
|
+
overflow: "hidden",
|
|
4497
|
+
className: "w-full h-2 bg-interactive",
|
|
4498
|
+
children
|
|
4499
|
+
}
|
|
4500
|
+
);
|
|
4502
4501
|
}
|
|
4503
4502
|
function Fill({ percentage }) {
|
|
4504
4503
|
return /* @__PURE__ */ jsx(
|
|
@@ -4509,7 +4508,7 @@ function Fill({ percentage }) {
|
|
|
4509
4508
|
bottom: "0",
|
|
4510
4509
|
left: "0",
|
|
4511
4510
|
borderRadius: "full",
|
|
4512
|
-
className: "bg-
|
|
4511
|
+
className: "bg-primary transition-all",
|
|
4513
4512
|
style: { width: `${percentage}%` }
|
|
4514
4513
|
}
|
|
4515
4514
|
);
|
|
@@ -4535,11 +4534,11 @@ function ProgressCircle({ className, showPercentage, ...props }) {
|
|
|
4535
4534
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4536
4535
|
className: "fill-none stroke-[8px] -rotate-90 w-24 h-24",
|
|
4537
4536
|
children: [
|
|
4538
|
-
/* @__PURE__ */ jsx("circle", { className: "stroke-
|
|
4537
|
+
/* @__PURE__ */ jsx("circle", { className: "stroke-interactive", cx: "50", cy: "50", r: "45" }),
|
|
4539
4538
|
/* @__PURE__ */ jsx(
|
|
4540
4539
|
"circle",
|
|
4541
4540
|
{
|
|
4542
|
-
className: "stroke-
|
|
4541
|
+
className: "stroke-primary",
|
|
4543
4542
|
cx: "50",
|
|
4544
4543
|
cy: "50",
|
|
4545
4544
|
r: "45",
|
|
@@ -4578,7 +4577,7 @@ function Radio({ children, className, ...props }) {
|
|
|
4578
4577
|
"radio group flex items-center gap-3 cursor-pointer text-base",
|
|
4579
4578
|
"before:content-[''] before:block before:w-5 before:h-5 before:box-border before:rounded-full",
|
|
4580
4579
|
"before:border before:border-edge-strong before:bg-surface-base before:transition-all before:duration-200",
|
|
4581
|
-
"data-[selected]:before:border-[6px] data-[selected]:before:border-
|
|
4580
|
+
"data-[selected]:before:border-[6px] data-[selected]:before:border-primary",
|
|
4582
4581
|
"data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",
|
|
4583
4582
|
className
|
|
4584
4583
|
),
|
|
@@ -4822,7 +4821,7 @@ function SidebarItem({
|
|
|
4822
4821
|
}
|
|
4823
4822
|
function Fill2({ percentage }) {
|
|
4824
4823
|
const width = `calc(10px + ${percentage}% - ${percentage * 0.2}px)`;
|
|
4825
|
-
return /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 left-0 rounded-full bg-
|
|
4824
|
+
return /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 left-0 rounded-full bg-primary", style: { width } });
|
|
4826
4825
|
}
|
|
4827
4826
|
function Thumb({ percentage }) {
|
|
4828
4827
|
const left = `calc(${percentage}% - ${percentage * 0.2}px)`;
|
|
@@ -4830,7 +4829,7 @@ function Thumb({ percentage }) {
|
|
|
4830
4829
|
SliderThumb,
|
|
4831
4830
|
{
|
|
4832
4831
|
className: cn(
|
|
4833
|
-
"absolute w-5 h-5 rounded-full bg-surface-base border-2 border-
|
|
4832
|
+
"absolute w-5 h-5 rounded-full bg-surface-base border-2 border-primary shadow",
|
|
4834
4833
|
"focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2"
|
|
4835
4834
|
),
|
|
4836
4835
|
style: { top: "50%", left, transform: "translateY(-50%)" }
|
|
@@ -4846,7 +4845,7 @@ function Slider({ className, showValue = true, label, ...props }) {
|
|
|
4846
4845
|
/* @__PURE__ */ jsx(SliderTrack, { className: "relative h-5 w-full", children: ({ state }) => {
|
|
4847
4846
|
const percentage = state.getThumbPercent(0) * 100;
|
|
4848
4847
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4849
|
-
/* @__PURE__ */ jsx("div", { className: "absolute inset-x-0 top-1/2 -translate-y-1/2 h-
|
|
4848
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-x-0 top-1/2 -translate-y-1/2 h-2 rounded-full bg-interactive overflow-hidden", children: /* @__PURE__ */ jsx(Fill2, { percentage }) }),
|
|
4850
4849
|
/* @__PURE__ */ jsx(Thumb, { percentage })
|
|
4851
4850
|
] });
|
|
4852
4851
|
} })
|
|
@@ -4913,7 +4912,7 @@ function Tab({ children, className, ...props }) {
|
|
|
4913
4912
|
className: cn(
|
|
4914
4913
|
"tab flex items-center justify-center text-base text-foreground-muted py-2 border-b-2 border-transparent select-none -mb-[2px] cursor-pointer outline-none",
|
|
4915
4914
|
"data-[hovered]:text-foreground-primary",
|
|
4916
|
-
"data-[selected]:text-foreground-primary data-[selected]:border-b-
|
|
4915
|
+
"data-[selected]:text-foreground-primary data-[selected]:border-b-primary",
|
|
4917
4916
|
"data-[disabled]:text-foreground-disabled data-[disabled]:cursor-default",
|
|
4918
4917
|
className
|
|
4919
4918
|
),
|
|
@@ -5079,7 +5078,7 @@ function Toggle({ label, children, className, ...props }) {
|
|
|
5079
5078
|
"flex items-center justify-center whitespace-nowrap gap-3 font-medium bg-interactive border border-transparent rounded p-2 relative cursor-pointer",
|
|
5080
5079
|
"hover:bg-interactive-hover",
|
|
5081
5080
|
"pressed:bg-interactive-pressed",
|
|
5082
|
-
"data-[selected]:text-
|
|
5081
|
+
"data-[selected]:text-primary-foreground data-[selected]:bg-primary",
|
|
5083
5082
|
className
|
|
5084
5083
|
),
|
|
5085
5084
|
children
|
|
@@ -5154,6 +5153,6 @@ function ZenProvider({
|
|
|
5154
5153
|
return /* @__PURE__ */ jsx(ToastProvider, { ...toast2, children });
|
|
5155
5154
|
}
|
|
5156
5155
|
|
|
5157
|
-
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, IconLabel, Image, Label, List, ListItem, ListSection, ListSeparator, Loading, LoadingButton, Menu, MenuItem, MenuSection, MenuSeparator, Modal, NavMenu, NavMenuGroup, NavMenuItem, Navbar, NavbarContext, NavbarItem, PasswordField, Popover, ProgressBar, ProgressCircle, Radio, RadioGroup, Row, SearchField, Select, Sidebar, SidebarHeader, SidebarItem, SidebarSection, Slider, Spinner, StatusLight, SubMenuTrigger, Switch, Tab, TabList, TabPanel, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow, Tabs, Text, TextField, ThemeButton, ThemeSwitcher, Toast, ToastContext, ToastProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipBubble, ZenProvider, removeToast, resolveRender, useBreakpoint, useDebounce, useInitTheme, useNavigationContext, useTheme, useToast };
|
|
5156
|
+
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, IconLabel, Image, Label, List, ListItem, ListSection, ListSeparator, Loading, LoadingButton, Menu, MenuItem, MenuSection, MenuSeparator, Modal, NavMenu, NavMenuGroup, NavMenuItem, Navbar, NavbarContext, NavbarItem, PasswordField, Popover, ProgressBar, ProgressCircle, Radio, RadioGroup, Row, SearchField, Select, Sidebar, SidebarHeader, SidebarItem, SidebarSection, Slider, Spinner, StatusLight, SubMenuTrigger, Switch, Tab, TabList, TabPanel, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow, Tabs, 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 };
|
|
5158
5157
|
//# sourceMappingURL=index.mjs.map
|
|
5159
5158
|
//# sourceMappingURL=index.mjs.map
|