@umami/react-zen 0.233.0 → 0.234.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.js CHANGED
@@ -84,7 +84,7 @@ var button = tailwindVariants.tv({
84
84
  "pressed:bg-interactive-pressed"
85
85
  ],
86
86
  primary: [
87
- "bg-interactive-selected text-interactive-text-selected",
87
+ "bg-primary text-primary-foreground",
88
88
  "hover:opacity-90",
89
89
  "pressed:opacity-80",
90
90
  "disabled:opacity-50"
@@ -215,7 +215,7 @@ tailwindVariants.tv({
215
215
  });
216
216
  var tooltip = tailwindVariants.tv({
217
217
  base: [
218
- "bg-surface-inverted text-foreground-inverted text-base px-2 py-1 rounded",
218
+ "bg-surface-inverted text-primary-foreground text-base px-2 py-1 rounded",
219
219
  "entering:animate-popover-in",
220
220
  "exiting:animate-popover-out"
221
221
  ]
@@ -231,7 +231,7 @@ var checkbox = tailwindVariants.tv({
231
231
  "flex items-center justify-center",
232
232
  "w-5 h-5 rounded border border-edge bg-surface-base",
233
233
  "shadow-sm transition-colors",
234
- "group-selected:bg-interactive-selected group-selected:border-interactive-selected group-selected:text-interactive-text-selected",
234
+ "group-selected:bg-primary group-selected:border-primary group-selected:text-primary-foreground",
235
235
  "group-indeterminate:bg-surface-base group-indeterminate:text-foreground-primary",
236
236
  "group-disabled:bg-surface-disabled",
237
237
  "group-focus-visible:ring-2 group-focus-visible:ring-focus-ring group-focus-visible:ring-offset-1"
@@ -253,9 +253,9 @@ var switchVariant = tailwindVariants.tv({
253
253
  ],
254
254
  track: [
255
255
  "flex items-center w-10 h-6 px-1 rounded-full",
256
- "bg-track",
256
+ "bg-interactive",
257
257
  "transition-colors",
258
- "group-selected:bg-interactive-selected",
258
+ "group-selected:bg-primary",
259
259
  "group-focus-visible:ring-2 group-focus-visible:ring-focus-ring group-focus-visible:ring-offset-1"
260
260
  ],
261
261
  thumb: [
@@ -272,10 +272,10 @@ tailwindVariants.tv({
272
272
  list: ["flex gap-1 border-b border-edge-muted"],
273
273
  tab: [
274
274
  "px-4 py-2 text-base font-medium cursor-pointer",
275
- "text-foreground-secondary outline-none",
275
+ "text-foreground-muted outline-none",
276
276
  "border-b-2 border-transparent -mb-px",
277
277
  "hovered:text-foreground-primary",
278
- "selected:text-foreground-primary selected:border-edge-inverted",
278
+ "selected:text-foreground-primary selected:border-primary",
279
279
  "disabled:text-foreground-disabled disabled:cursor-default",
280
280
  "focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2"
281
281
  ],
@@ -1108,10 +1108,9 @@ var shadowMap = {
1108
1108
  true: "shadow-[var(--shadow-default)]"
1109
1109
  };
1110
1110
  var semanticColorMap = {
1111
- primary: { text: "text-foreground-primary", bg: "bg-interactive-selected" },
1112
- secondary: { text: "text-foreground-secondary", bg: "bg-surface-raised" },
1111
+ primary: { text: "text-foreground-primary", bg: "bg-primary" },
1113
1112
  muted: { text: "text-foreground-muted", bg: "bg-surface-raised" },
1114
- inverted: { text: "text-foreground-inverted", bg: "bg-surface-inverted" },
1113
+ inverted: { text: "text-primary-foreground", bg: "bg-surface-inverted" },
1115
1114
  disabled: { text: "text-foreground-disabled", bg: "bg-surface-disabled" },
1116
1115
  transparent: { text: "text-transparent", bg: "bg-transparent" },
1117
1116
  true: { text: "text-foreground-primary", bg: "bg-interactive" },
@@ -1443,8 +1442,7 @@ var borderMap = {
1443
1442
  var semanticBorderColorMap = {
1444
1443
  true: "border-edge",
1445
1444
  transparent: "border-transparent",
1446
- primary: "border-edge-inverted",
1447
- inverted: "border-edge-inverted",
1445
+ primary: "border-primary",
1448
1446
  muted: "border-edge-muted",
1449
1447
  strong: "border-edge-strong",
1450
1448
  disabled: "border-edge-muted"
@@ -2796,15 +2794,7 @@ function AlertDialog({
2796
2794
  } });
2797
2795
  }
2798
2796
  function Blockquote({ className, children, ...props }) {
2799
- return /* @__PURE__ */ jsxRuntime.jsx(
2800
- Text,
2801
- {
2802
- ...props,
2803
- as: "blockquote",
2804
- className: cn("border-l-2 border-edge-inverted pl-5", className),
2805
- children
2806
- }
2807
- );
2797
+ return /* @__PURE__ */ jsxRuntime.jsx(Text, { ...props, as: "blockquote", className: cn("border-l-2 border-primary pl-5", className), children });
2808
2798
  }
2809
2799
  function Breadcrumbs({ children, className, ...props }) {
2810
2800
  return /* @__PURE__ */ jsxRuntime.jsx(reactAriaComponents.Breadcrumbs, { ...props, className: cn("flex items-center gap-3", className), children });
@@ -2871,7 +2861,7 @@ function Calendar({
2871
2861
  "hover:bg-interactive",
2872
2862
  "data-[outside-month]:hidden",
2873
2863
  "data-[focus-visible]:outline-2 data-[focus-visible]:outline-focus-ring data-[focus-visible]:outline-offset-2",
2874
- "data-[selected]:text-interactive-text-selected data-[selected]:bg-interactive-selected",
2864
+ "data-[selected]:text-primary-foreground data-[selected]:bg-primary",
2875
2865
  "data-[disabled]:text-foreground-disabled"
2876
2866
  ),
2877
2867
  date
@@ -3501,7 +3491,7 @@ function TableCell({ children, className, align, ...props }) {
3501
3491
  className: cn(
3502
3492
  "flex p-2 flex-1 first:pl-0 last:pr-0",
3503
3493
  "[&_a]:font-medium [&_a]:underline [&_a]:decoration-edge [&_a]:underline-offset-4",
3504
- "[&_a:hover]:decoration-edge-inverted",
3494
+ "[&_a:hover]:decoration-primary",
3505
3495
  align && alignClasses2[align],
3506
3496
  className
3507
3497
  ),
@@ -3788,13 +3778,13 @@ function Spinner(props) {
3788
3778
  ...domProps,
3789
3779
  className: cn("relative inline-flex justify-center items-center", sizeMap3[size], className),
3790
3780
  children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { viewBox: "25 25 50 50", className: "zen-spinner-svg w-full h-full", children: [
3791
- !quiet && /* @__PURE__ */ jsxRuntime.jsx("circle", { className: "zen-spinner-track stroke-track", cx: "50", cy: "50", r: "20" }),
3781
+ !quiet && /* @__PURE__ */ jsxRuntime.jsx("circle", { className: "zen-spinner-track stroke-interactive", cx: "50", cy: "50", r: "20" }),
3792
3782
  /* @__PURE__ */ jsxRuntime.jsx(
3793
3783
  "circle",
3794
3784
  {
3795
3785
  className: cn(
3796
3786
  "zen-spinner-fill",
3797
- isDisabled ? "stroke-content-disabled" : "stroke-track-fill"
3787
+ isDisabled ? "stroke-content-disabled" : "stroke-primary"
3798
3788
  ),
3799
3789
  cx: "50",
3800
3790
  cy: "50",
@@ -4519,7 +4509,16 @@ function PasswordField({ label, className, ...props }) {
4519
4509
  ] });
4520
4510
  }
4521
4511
  function Track({ children }) {
4522
- return /* @__PURE__ */ jsxRuntime.jsx(Box, { position: "relative", borderRadius: "full", overflow: "hidden", className: "w-full h-2 bg-track", children });
4512
+ return /* @__PURE__ */ jsxRuntime.jsx(
4513
+ Box,
4514
+ {
4515
+ position: "relative",
4516
+ borderRadius: "full",
4517
+ overflow: "hidden",
4518
+ className: "w-full h-2 bg-interactive",
4519
+ children
4520
+ }
4521
+ );
4523
4522
  }
4524
4523
  function Fill({ percentage }) {
4525
4524
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -4530,7 +4529,7 @@ function Fill({ percentage }) {
4530
4529
  bottom: "0",
4531
4530
  left: "0",
4532
4531
  borderRadius: "full",
4533
- className: "bg-track-fill transition-all",
4532
+ className: "bg-primary transition-all",
4534
4533
  style: { width: `${percentage}%` }
4535
4534
  }
4536
4535
  );
@@ -4556,11 +4555,11 @@ function ProgressCircle({ className, showPercentage, ...props }) {
4556
4555
  xmlns: "http://www.w3.org/2000/svg",
4557
4556
  className: "fill-none stroke-[8px] -rotate-90 w-24 h-24",
4558
4557
  children: [
4559
- /* @__PURE__ */ jsxRuntime.jsx("circle", { className: "stroke-track", cx: "50", cy: "50", r: "45" }),
4558
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { className: "stroke-interactive", cx: "50", cy: "50", r: "45" }),
4560
4559
  /* @__PURE__ */ jsxRuntime.jsx(
4561
4560
  "circle",
4562
4561
  {
4563
- className: "stroke-track-fill",
4562
+ className: "stroke-primary",
4564
4563
  cx: "50",
4565
4564
  cy: "50",
4566
4565
  r: "45",
@@ -4599,7 +4598,7 @@ function Radio({ children, className, ...props }) {
4599
4598
  "radio group flex items-center gap-3 cursor-pointer text-base",
4600
4599
  "before:content-[''] before:block before:w-5 before:h-5 before:box-border before:rounded-full",
4601
4600
  "before:border before:border-edge-strong before:bg-surface-base before:transition-all before:duration-200",
4602
- "data-[selected]:before:border-[6px] data-[selected]:before:border-interactive-selected",
4601
+ "data-[selected]:before:border-[6px] data-[selected]:before:border-primary",
4603
4602
  "data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",
4604
4603
  className
4605
4604
  ),
@@ -4843,7 +4842,7 @@ function SidebarItem({
4843
4842
  }
4844
4843
  function Fill2({ percentage }) {
4845
4844
  const width = `calc(10px + ${percentage}% - ${percentage * 0.2}px)`;
4846
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-y-0 left-0 rounded-full bg-track-fill", style: { width } });
4845
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-y-0 left-0 rounded-full bg-primary", style: { width } });
4847
4846
  }
4848
4847
  function Thumb({ percentage }) {
4849
4848
  const left = `calc(${percentage}% - ${percentage * 0.2}px)`;
@@ -4851,7 +4850,7 @@ function Thumb({ percentage }) {
4851
4850
  reactAriaComponents.SliderThumb,
4852
4851
  {
4853
4852
  className: cn(
4854
- "absolute w-5 h-5 rounded-full bg-surface-base border-2 border-edge-inverted shadow",
4853
+ "absolute w-5 h-5 rounded-full bg-surface-base border-2 border-primary shadow",
4855
4854
  "focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2"
4856
4855
  ),
4857
4856
  style: { top: "50%", left, transform: "translateY(-50%)" }
@@ -4867,7 +4866,7 @@ function Slider({ className, showValue = true, label, ...props }) {
4867
4866
  /* @__PURE__ */ jsxRuntime.jsx(reactAriaComponents.SliderTrack, { className: "relative h-5 w-full", children: ({ state }) => {
4868
4867
  const percentage = state.getThumbPercent(0) * 100;
4869
4868
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4870
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-x-0 top-1/2 -translate-y-1/2 h-1 rounded-full bg-track overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(Fill2, { percentage }) }),
4869
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-x-0 top-1/2 -translate-y-1/2 h-2 rounded-full bg-interactive overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(Fill2, { percentage }) }),
4871
4870
  /* @__PURE__ */ jsxRuntime.jsx(Thumb, { percentage })
4872
4871
  ] });
4873
4872
  } })
@@ -4934,7 +4933,7 @@ function Tab({ children, className, ...props }) {
4934
4933
  className: cn(
4935
4934
  "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",
4936
4935
  "data-[hovered]:text-foreground-primary",
4937
- "data-[selected]:text-foreground-primary data-[selected]:border-b-edge-inverted",
4936
+ "data-[selected]:text-foreground-primary data-[selected]:border-b-primary",
4938
4937
  "data-[disabled]:text-foreground-disabled data-[disabled]:cursor-default",
4939
4938
  className
4940
4939
  ),
@@ -5100,7 +5099,7 @@ function Toggle({ label, children, className, ...props }) {
5100
5099
  "flex items-center justify-center whitespace-nowrap gap-3 font-medium bg-interactive border border-transparent rounded p-2 relative cursor-pointer",
5101
5100
  "hover:bg-interactive-hover",
5102
5101
  "pressed:bg-interactive-pressed",
5103
- "data-[selected]:text-interactive-text-selected data-[selected]:bg-interactive-selected",
5102
+ "data-[selected]:text-primary-foreground data-[selected]:bg-primary",
5104
5103
  className
5105
5104
  ),
5106
5105
  children