beez-ui 0.11.0 → 2.0.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +36 -1
  2. package/README.md +62 -15
  3. package/THIRD_PARTY_NOTICES.md +31 -0
  4. package/assets/fonts/ibmplexmono-LICENSE.txt +93 -93
  5. package/assets/fonts/{poppins-LICENSE.txt → inter-LICENSE.txt} +2 -2
  6. package/assets/fonts/inter-latin-variable.woff2 +0 -0
  7. package/dist/components/account-menu.js +2 -2
  8. package/dist/components/alert-dialog.d.ts +4 -2
  9. package/dist/components/alert-dialog.js +78 -66
  10. package/dist/components/animated-collapse.js +106 -36
  11. package/dist/components/button-interaction.d.ts +23 -0
  12. package/dist/components/button-interaction.js +22 -0
  13. package/dist/components/button-label.d.ts +8 -0
  14. package/dist/components/button-label.js +322 -0
  15. package/dist/components/button.d.ts +23 -10
  16. package/dist/components/button.js +111 -64
  17. package/dist/components/calendar.d.ts +2 -2
  18. package/dist/components/calendar.js +4 -4
  19. package/dist/components/carousel.d.ts +3 -3
  20. package/dist/components/carousel.js +3 -3
  21. package/dist/components/control-button.d.ts +16 -0
  22. package/dist/components/control-button.js +215 -0
  23. package/dist/components/data-table.js +7 -7
  24. package/dist/components/dialog.js +3 -2
  25. package/dist/components/dropdown-menu.js +1 -1
  26. package/dist/components/file-upload.js +5 -5
  27. package/dist/components/filter-presets-bar.js +6 -6
  28. package/dist/components/filter-query-bar.js +2 -2
  29. package/dist/components/input-group.d.ts +2 -2
  30. package/dist/components/input-group.js +2 -2
  31. package/dist/components/pagination.d.ts +2 -2
  32. package/dist/components/pagination.js +2 -2
  33. package/dist/components/reaction-button.js +2 -2
  34. package/dist/components/rich-link-editor.js +7 -7
  35. package/dist/components/rich-text-content.js +1 -1
  36. package/dist/components/sheet.js +2 -2
  37. package/dist/components/sidebar.js +3 -3
  38. package/dist/components/typing-animation.js +1 -1
  39. package/dist/constants/button.d.ts +16 -0
  40. package/dist/constants/button.js +16 -0
  41. package/dist/motion/arc-press.d.ts +6 -0
  42. package/dist/motion/arc-press.js +59 -0
  43. package/dist/motion/arc-tokens.d.ts +32 -0
  44. package/dist/motion/arc-tokens.js +42 -0
  45. package/dist/providers/beez-ui-provider.d.ts +1 -1
  46. package/dist/providers/beez-ui-provider.js +6 -1
  47. package/dist/styles.css +1 -1
  48. package/fonts.css +5 -5
  49. package/package.json +3 -2
  50. package/styles.css +4 -4
  51. package/theme.css +248 -87
  52. package/assets/fonts/poppins-latin-600.woff2 +0 -0
@@ -0,0 +1,215 @@
1
+ "use client";
2
+ import { c as _c } from "react/compiler-runtime";
3
+ /**
4
+ * Internal compact control for composite components (dialog close buttons, carousel and pagination arrows, calendar
5
+ * cells, table and editor actions) that need icon sizes, a link variant or `asChild`, which the public Arc `Button`
6
+ * leaves out. Keeps Arc's press feedback and label motion (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md).
7
+ * Not exported from the package: consumers use `Button`.
8
+ */
9
+ import { Children, cloneElement, isValidElement } from "react";
10
+ import { Button as ButtonPrimitive } from "@base-ui/react/button";
11
+ import { cva } from "class-variance-authority";
12
+ import { Slot } from "radix-ui";
13
+ import { useIsPresent } from "motion/react";
14
+ import { usePrefersReducedMotion } from "../hooks/use-prefers-reduced-motion.js";
15
+ import { cn } from "../lib/utils.js";
16
+ import { useArcPress } from "../motion/arc-press.js";
17
+ import { useAttachedElement } from "../motion/use-attached-element.js";
18
+ import { ButtonLabel } from "./button-label.js";
19
+ import { LEAVING_ATTRIBUTES, LOADING_INERT_HANDLERS } from "./button-interaction.js";
20
+ import { jsx as _jsx } from "react/jsx-runtime";
21
+ /**
22
+ * Class recipe. Press scale is driven by Motion alone, so `transform` never gets a CSS transition,
23
+ * and anchors of floating layers never scale because Radix measures them on pointerdown.
24
+ */
25
+ const controlButtonVariants = cva("group/button relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap outline-none select-none [-webkit-tap-highlight-color:transparent] transition-[color,background-color,border-color,opacity,box-shadow] duration-150 ease-out focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-busy:cursor-progress aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 motion-reduce:transition-none dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&:is([aria-haspopup]:not([aria-haspopup=false]),[data-state],[role=combobox])]:transform-none! [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
26
+ variants: {
27
+ variant: {
28
+ default: "border-foreground bg-foreground text-background hover:not-disabled:opacity-90 hover:not-disabled:shadow-xs active:not-disabled:opacity-85",
29
+ outline: "border-border bg-background text-foreground hover:not-disabled:bg-muted hover:not-disabled:shadow-xs active:not-disabled:bg-muted aria-expanded:bg-muted disabled:bg-muted disabled:text-muted-foreground disabled:opacity-100",
30
+ secondary: "bg-muted text-foreground hover:not-disabled:bg-muted/70 active:not-disabled:bg-muted/70 aria-expanded:bg-muted/70",
31
+ ghost: "text-muted-foreground hover:not-disabled:bg-muted hover:not-disabled:text-foreground active:not-disabled:bg-muted active:not-disabled:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground disabled:text-muted-foreground/60 disabled:opacity-100",
32
+ destructive: "border-border bg-background text-destructive hover:not-disabled:border-destructive hover:not-disabled:bg-muted active:not-disabled:border-destructive active:not-disabled:bg-muted focus-visible:border-destructive/40 focus-visible:ring-destructive/20 disabled:bg-muted disabled:text-destructive/55 disabled:opacity-100 dark:focus-visible:ring-destructive/40",
33
+ link: "text-primary underline-offset-4 hover:underline"
34
+ },
35
+ size: {
36
+ default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
37
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
38
+ sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
39
+ lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
40
+ icon: "size-8",
41
+ "icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
42
+ "icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
43
+ "icon-lg": "size-9"
44
+ }
45
+ },
46
+ defaultVariants: {
47
+ variant: "default",
48
+ size: "default"
49
+ }
50
+ });
51
+ /**
52
+ * Wraps the content of an `asChild` element in the Arc label, so links morph and spin like buttons.
53
+ * While loading, the child's own activation handlers are dropped too, because Slot runs them before ours.
54
+ * Children given as render functions keep their content untouched.
55
+ */
56
+ function withArcLabel(children, loading, renderLabel) {
57
+ const child = Children.only(children);
58
+ if (!isValidElement(child)) return child;
59
+ const content = child.props.children;
60
+ const overrides = loading ? LOADING_INERT_HANDLERS : undefined;
61
+ const label = typeof content === "function" ? content : renderLabel(content);
62
+ return cloneElement(child, overrides, label);
63
+ }
64
+ function ControlButton(t0) {
65
+ const $ = _c(40);
66
+ let children;
67
+ let className;
68
+ let props;
69
+ let ref;
70
+ let t1;
71
+ let t2;
72
+ let t3;
73
+ let t4;
74
+ if ($[0] !== t0) {
75
+ ({className, variant: t1, size: t2, asChild: t3, loading: t4, children, ref, ...props} = t0);
76
+ $[0] = t0;
77
+ $[1] = children;
78
+ $[2] = className;
79
+ $[3] = props;
80
+ $[4] = ref;
81
+ $[5] = t1;
82
+ $[6] = t2;
83
+ $[7] = t3;
84
+ $[8] = t4;
85
+ } else {
86
+ children = $[1];
87
+ className = $[2];
88
+ props = $[3];
89
+ ref = $[4];
90
+ t1 = $[5];
91
+ t2 = $[6];
92
+ t3 = $[7];
93
+ t4 = $[8];
94
+ }
95
+ const variant = t1 === undefined ? "default" : t1;
96
+ const size = t2 === undefined ? "default" : t2;
97
+ const asChild = t3 === undefined ? false : t3;
98
+ const loading = t4 === undefined ? false : t4;
99
+ const reduceMotion = usePrefersReducedMotion();
100
+ const isPresent = useIsPresent();
101
+ const [element, attach] = useAttachedElement(ref);
102
+ useArcPress(element, !reduceMotion && variant !== "link");
103
+ let t5;
104
+ if ($[9] !== loading || $[10] !== reduceMotion) {
105
+ t5 = (content) => /* @__PURE__ */ _jsx(ButtonLabel, {
106
+ loading,
107
+ reduceMotion,
108
+ children: content
109
+ });
110
+ $[9] = loading;
111
+ $[10] = reduceMotion;
112
+ $[11] = t5;
113
+ } else {
114
+ t5 = $[11];
115
+ }
116
+ const renderLabel = t5;
117
+ let t6;
118
+ if ($[12] !== className || $[13] !== size || $[14] !== variant) {
119
+ t6 = cn(controlButtonVariants({
120
+ variant,
121
+ size,
122
+ className
123
+ }));
124
+ $[12] = className;
125
+ $[13] = size;
126
+ $[14] = variant;
127
+ $[15] = t6;
128
+ } else {
129
+ t6 = $[15];
130
+ }
131
+ const t7 = loading || undefined;
132
+ const t8 = loading || props["aria-disabled"] || undefined;
133
+ const t9 = loading ? LOADING_INERT_HANDLERS : undefined;
134
+ const t10 = isPresent ? undefined : LEAVING_ATTRIBUTES;
135
+ let t11;
136
+ if ($[16] !== props || $[17] !== size || $[18] !== t10 || $[19] !== t6 || $[20] !== t7 || $[21] !== t8 || $[22] !== t9 || $[23] !== variant) {
137
+ t11 = {
138
+ "data-slot": "button",
139
+ "data-variant": variant,
140
+ "data-size": size,
141
+ className: t6,
142
+ "aria-busy": t7,
143
+ ...props,
144
+ "aria-disabled": t8,
145
+ ...t9,
146
+ ...t10
147
+ };
148
+ $[16] = props;
149
+ $[17] = size;
150
+ $[18] = t10;
151
+ $[19] = t6;
152
+ $[20] = t7;
153
+ $[21] = t8;
154
+ $[22] = t9;
155
+ $[23] = variant;
156
+ $[24] = t11;
157
+ } else {
158
+ t11 = $[24];
159
+ }
160
+ const sharedProps = t11;
161
+ if (asChild) {
162
+ const t12 = sharedProps;
163
+ let t13;
164
+ if ($[25] !== children || $[26] !== loading || $[27] !== renderLabel) {
165
+ t13 = withArcLabel(children, loading, renderLabel);
166
+ $[25] = children;
167
+ $[26] = loading;
168
+ $[27] = renderLabel;
169
+ $[28] = t13;
170
+ } else {
171
+ t13 = $[28];
172
+ }
173
+ let t14;
174
+ if ($[29] !== attach || $[30] !== t12 || $[31] !== t13) {
175
+ t14 = /* @__PURE__ */ _jsx(Slot.Root, {
176
+ ref: attach,
177
+ ...t12,
178
+ children: t13
179
+ });
180
+ $[29] = attach;
181
+ $[30] = t12;
182
+ $[31] = t13;
183
+ $[32] = t14;
184
+ } else {
185
+ t14 = $[32];
186
+ }
187
+ return t14;
188
+ }
189
+ const t12 = sharedProps;
190
+ let t13;
191
+ if ($[33] !== children || $[34] !== renderLabel) {
192
+ t13 = renderLabel(children);
193
+ $[33] = children;
194
+ $[34] = renderLabel;
195
+ $[35] = t13;
196
+ } else {
197
+ t13 = $[35];
198
+ }
199
+ let t14;
200
+ if ($[36] !== attach || $[37] !== t12 || $[38] !== t13) {
201
+ t14 = /* @__PURE__ */ _jsx(ButtonPrimitive, {
202
+ ref: attach,
203
+ ...t12,
204
+ children: t13
205
+ });
206
+ $[36] = attach;
207
+ $[37] = t12;
208
+ $[38] = t13;
209
+ $[39] = t14;
210
+ } else {
211
+ t14 = $[39];
212
+ }
213
+ return t14;
214
+ }
215
+ export { ControlButton, controlButtonVariants };
@@ -5,7 +5,7 @@ import { CircleAlert, ChevronDown, ChevronRight, Ellipsis, Eraser, X } from "luc
5
5
  import { cn } from "../lib/utils.js";
6
6
  import { matchesColumnFilterValue, normalizeFilterToken } from "../lib/column-filter-value.js";
7
7
  import { MotionSlot } from "../motion/motion-slot.js";
8
- import { Button } from "./button.js";
8
+ import { ControlButton } from "./control-button.js";
9
9
  import { Badge } from "./badge.js";
10
10
  import { FilterQueryBar } from "./filter-query-bar.js";
11
11
  import { parseFilterQuery, serializeFilterQuery } from "./filter-query-grammar.js";
@@ -649,7 +649,7 @@ export function DataTable({ columns, data, emptyMessage, toolbarActions, onVisib
649
649
  value: resolvedFilterValue
650
650
  }), /* @__PURE__ */ _jsxs("div", {
651
651
  className: "absolute right-1 top-1/2 flex -translate-y-1/2 items-center gap-0.5",
652
- children: [resolvedFilterValue ? /* @__PURE__ */ _jsx(Button, {
652
+ children: [resolvedFilterValue ? /* @__PURE__ */ _jsx(ControlButton, {
653
653
  "aria-label": CLEAR_FILTER_ARIA_LABEL,
654
654
  className: "active:-translate-y-0",
655
655
  onClick: handleClearMainFilter,
@@ -657,7 +657,7 @@ export function DataTable({ columns, data, emptyMessage, toolbarActions, onVisib
657
657
  type: "button",
658
658
  variant: "ghost",
659
659
  children: /* @__PURE__ */ _jsx(X, { "aria-hidden": "true" })
660
- }) : null, showExcludeFilterToggle ? /* @__PURE__ */ _jsxs(Button, {
660
+ }) : null, showExcludeFilterToggle ? /* @__PURE__ */ _jsxs(ControlButton, {
661
661
  "aria-expanded": isExcludeFilterInputVisible,
662
662
  "aria-label": isExcludeFilterInputVisible ? HIDE_EXCLUDE_FILTERS_ARIA_LABEL : excludeFilterToggleLabel,
663
663
  className: "relative",
@@ -707,7 +707,7 @@ export function DataTable({ columns, data, emptyMessage, toolbarActions, onVisib
707
707
  placeholder: excludeFilterPlaceholder,
708
708
  type: "text",
709
709
  value: excludeFilterInputValue
710
- }), /* @__PURE__ */ _jsx(Button, {
710
+ }), /* @__PURE__ */ _jsx(ControlButton, {
711
711
  "aria-label": CLEAR_ALL_EXCLUSIONS_FROM_INPUT_ARIA_LABEL,
712
712
  className: "shrink-0",
713
713
  disabled: !hasActiveExcludeFilterValues,
@@ -748,7 +748,7 @@ export function DataTable({ columns, data, emptyMessage, toolbarActions, onVisib
748
748
  children: [
749
749
  /* @__PURE__ */ _jsx("span", { children: `${EXCLUDED_ROWS_SUMMARY_LABEL}:` }),
750
750
  /* @__PURE__ */ _jsx("span", {
751
- className: "inline-flex min-w-5 items-center justify-center rounded-full bg-destructive/20 px-1.5 text-[10px] leading-4 font-semibold",
751
+ className: "inline-flex min-w-5 items-center justify-center rounded-full bg-destructive/20 px-1.5 text-[10px] leading-4 font-medium",
752
752
  children: excludeFilterUniqueRowsCount
753
753
  }),
754
754
  /* @__PURE__ */ _jsx("button", {
@@ -771,7 +771,7 @@ export function DataTable({ columns, data, emptyMessage, toolbarActions, onVisib
771
771
  /* @__PURE__ */ _jsx("span", { children: `− ${excludeFilterValue}` }),
772
772
  excludedRowsCount != null ? /* @__PURE__ */ _jsx("span", {
773
773
  "aria-label": `Filas excluidas por ${excludeFilterValue}: ${excludedRowsCount}`,
774
- className: "inline-flex min-w-5 items-center justify-center rounded-full bg-destructive/20 px-1.5 text-[10px] leading-4 font-semibold",
774
+ className: "inline-flex min-w-5 items-center justify-center rounded-full bg-destructive/20 px-1.5 text-[10px] leading-4 font-medium",
775
775
  children: excludedRowsCount
776
776
  }) : null,
777
777
  /* @__PURE__ */ _jsx("button", {
@@ -795,7 +795,7 @@ export function DataTable({ columns, data, emptyMessage, toolbarActions, onVisib
795
795
  className: "ml-auto flex flex-wrap items-center gap-2",
796
796
  children: [toolbarActions, shouldShowColumnVisibilityToggle ? /* @__PURE__ */ _jsxs(DropdownMenu, { children: [/* @__PURE__ */ _jsx(DropdownMenuTrigger, {
797
797
  asChild: true,
798
- children: /* @__PURE__ */ _jsxs(Button, {
798
+ children: /* @__PURE__ */ _jsxs(ControlButton, {
799
799
  "aria-label": columnVisibilityButtonLabel,
800
800
  className: "relative aria-expanded:*:data-[slot=data-table-columns-chevron]:rotate-180",
801
801
  type: "button",
@@ -6,6 +6,7 @@ import { MotionSlot } from "../motion/motion-slot.js";
6
6
  import { MotionPresence, MotionOpenProvider, useMotionOpenState } from "../motion/presence.js";
7
7
  import { cn } from "../lib/utils.js";
8
8
  import { Button } from "./button.js";
9
+ import { ControlButton } from "./control-button.js";
9
10
  import { XIcon } from "lucide-react";
10
11
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
12
  function Dialog(t0) {
@@ -205,7 +206,7 @@ function DialogContent(t0) {
205
206
  asChild: true,
206
207
  children: /* @__PURE__ */ _jsx(MotionSlot, {
207
208
  kind: "delayed-pop",
208
- children: /* @__PURE__ */ _jsxs(Button, {
209
+ children: /* @__PURE__ */ _jsxs(ControlButton, {
209
210
  variant: "ghost",
210
211
  className: "absolute top-2 right-2",
211
212
  size: "icon-sm",
@@ -333,7 +334,7 @@ function DialogFooter(t0) {
333
334
  t3 = showCloseButton && /* @__PURE__ */ _jsx(DialogPrimitive.Close, {
334
335
  asChild: true,
335
336
  children: /* @__PURE__ */ _jsx(Button, {
336
- variant: "outline",
337
+ variant: "secondary",
337
338
  children: "Cerrar"
338
339
  })
339
340
  });
@@ -498,7 +498,7 @@ function DropdownMenuShortcut(t0) {
498
498
  }
499
499
  let t1;
500
500
  if ($[3] !== className) {
501
- t1 = cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground", className);
501
+ t1 = cn("ml-auto text-xs text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground", className);
502
502
  $[3] = className;
503
503
  $[4] = t1;
504
504
  } else {
@@ -11,7 +11,7 @@ import { cn } from "../lib/utils.js";
11
11
  import { classifyFiles } from "../lib/file-acceptance.js";
12
12
  import { formatFileSize } from "../lib/format-file-size.js";
13
13
  import { AnimatedListItem } from "./animated-list-item.js";
14
- import { Button } from "./button.js";
14
+ import { ControlButton } from "./control-button.js";
15
15
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
16
16
  const COMPLETE_PROGRESS = 100;
17
17
  const FILE_UPLOAD_DROP_ZONE_DEFAULT_LABELS = {
@@ -236,8 +236,8 @@ export function FileUploadDropZone(t0) {
236
236
  }
237
237
  let t22;
238
238
  if ($[38] !== isDisabled || $[39] !== resolvedLabels.uploadAction || $[40] !== t20 || $[41] !== t21) {
239
- t22 = /* @__PURE__ */ _jsxs(Button, {
240
- className: "h-auto p-0 font-semibold",
239
+ t22 = /* @__PURE__ */ _jsxs(ControlButton, {
240
+ className: "h-auto p-0 font-medium",
241
241
  disabled: isDisabled,
242
242
  type: "button",
243
243
  variant: "link",
@@ -575,7 +575,7 @@ export function FileUploadItem(t0) {
575
575
  }
576
576
  let t20;
577
577
  if ($[45] !== isDeleteDisabled || $[46] !== name || $[47] !== onDelete || $[48] !== resolvedLabels.delete) {
578
- t20 = onDelete ? /* @__PURE__ */ _jsx(Button, {
578
+ t20 = onDelete ? /* @__PURE__ */ _jsx(ControlButton, {
579
579
  "aria-label": `${resolvedLabels.delete} ${name}`,
580
580
  className: "-mt-2 -mr-2 self-start text-muted-foreground",
581
581
  disabled: isDeleteDisabled,
@@ -607,7 +607,7 @@ export function FileUploadItem(t0) {
607
607
  }
608
608
  let t22;
609
609
  if ($[53] !== clampedProgress || $[54] !== failed || $[55] !== isFillVariant || $[56] !== onRetry || $[57] !== progressBarProps || $[58] !== resolvedLabels.retry) {
610
- t22 = failed ? onRetry ? /* @__PURE__ */ _jsx(Button, {
610
+ t22 = failed ? onRetry ? /* @__PURE__ */ _jsx(ControlButton, {
611
611
  className: "mt-1.5 h-auto p-0 text-destructive",
612
612
  size: "sm",
613
613
  type: "button",
@@ -7,7 +7,7 @@ import { c as _c } from "react/compiler-runtime";
7
7
  import { useId, useState } from "react";
8
8
  import { Bookmark, Pencil, X } from "lucide-react";
9
9
  import { cn } from "../lib/utils.js";
10
- import { Button } from "./button.js";
10
+ import { ControlButton } from "./control-button.js";
11
11
  import { FilterQueryBar } from "./filter-query-bar.js";
12
12
  import { Input } from "./input.js";
13
13
  import { Label } from "./label.js";
@@ -143,7 +143,7 @@ export function FilterPresetSaveButton(t0) {
143
143
  asChild: true,
144
144
  children: /* @__PURE__ */ _jsx(PopoverTrigger, {
145
145
  asChild: true,
146
- children: /* @__PURE__ */ _jsx(Button, {
146
+ children: /* @__PURE__ */ _jsx(ControlButton, {
147
147
  "data-slot": "filter-preset-save-button",
148
148
  "aria-label": resolvedLabels.saveAction,
149
149
  className,
@@ -251,7 +251,7 @@ export function FilterPresetSaveButton(t0) {
251
251
  }
252
252
  let t14;
253
253
  if ($[33] !== handleConfirmSave || $[34] !== resolvedLabels.saveConfirm || $[35] !== resolvedLabels.saveConfirmAriaLabel) {
254
- t14 = /* @__PURE__ */ _jsx(Button, {
254
+ t14 = /* @__PURE__ */ _jsx(ControlButton, {
255
255
  "aria-label": resolvedLabels.saveConfirmAriaLabel,
256
256
  onClick: handleConfirmSave,
257
257
  size: "sm",
@@ -450,7 +450,7 @@ export function FilterPresetsBar(t0) {
450
450
  role: "alert",
451
451
  children: editError
452
452
  }) : null,
453
- /* @__PURE__ */ _jsx(Button, {
453
+ /* @__PURE__ */ _jsx(ControlButton, {
454
454
  "aria-label": resolvedLabels.editConfirmAriaLabel,
455
455
  onClick: handleConfirmEdit,
456
456
  size: "sm",
@@ -479,13 +479,13 @@ export function FilterPresetsBar(t0) {
479
479
  children: resolvedLabels.deleteConfirmation(preset_1.name)
480
480
  }), /* @__PURE__ */ _jsxs("div", {
481
481
  className: "flex justify-end gap-2",
482
- children: [/* @__PURE__ */ _jsx(Button, {
482
+ children: [/* @__PURE__ */ _jsx(ControlButton, {
483
483
  onClick: () => setDeletingPresetName(null),
484
484
  size: "sm",
485
485
  type: "button",
486
486
  variant: "outline",
487
487
  children: resolvedLabels.cancel
488
- }), /* @__PURE__ */ _jsx(Button, {
488
+ }), /* @__PURE__ */ _jsx(ControlButton, {
489
489
  onClick: () => {
490
490
  setDeletingPresetName(null);
491
491
  onDeletePreset(preset_1.name);
@@ -2,7 +2,7 @@
2
2
  import { c as _c } from "react/compiler-runtime";
3
3
  import * as React from "react";
4
4
  import { Calendar, Check, CircleDot, CircleMinus, CircleSlash, Folder, Hash, List, Type, User, X } from "lucide-react";
5
- import { Button } from "./button.js";
5
+ import { ControlButton } from "./control-button.js";
6
6
  import { Input } from "./input.js";
7
7
  import { Popover, PopoverAnchor, PopoverContent } from "./popover.js";
8
8
  import { GlideSlot } from "../motion/glide-slot.js";
@@ -708,7 +708,7 @@ export function FilterQueryBar(t0) {
708
708
  }
709
709
  let t31;
710
710
  if ($[67] !== handleClear || $[68] !== value) {
711
- t31 = value ? /* @__PURE__ */ _jsx(Button, {
711
+ t31 = value ? /* @__PURE__ */ _jsx(ControlButton, {
712
712
  "aria-label": CLEAR_FILTER_ARIA_LABEL,
713
713
  className: "active:-translate-y-0",
714
714
  onClick: handleClear,
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { type VariantProps } from "class-variance-authority";
3
- import { Button } from "./button.js";
3
+ import { ControlButton } from "./control-button.js";
4
4
  declare function InputGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
5
5
  declare const inputGroupAddonVariants: (props?: ({
6
6
  align?: "block-end" | "block-start" | "inline-end" | "inline-start" | null | undefined;
@@ -9,7 +9,7 @@ declare function InputGroupAddon({ className, align, ...props }: React.Component
9
9
  declare const inputGroupButtonVariants: (props?: ({
10
10
  size?: "icon-sm" | "icon-xs" | "sm" | "xs" | null | undefined;
11
11
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
- declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, "size"> & VariantProps<typeof inputGroupButtonVariants>): React.JSX.Element;
12
+ declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof ControlButton>, "size"> & VariantProps<typeof inputGroupButtonVariants>): React.JSX.Element;
13
13
  declare function InputGroupText({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
14
14
  declare function InputGroupInput({ className, ...props }: React.ComponentProps<"input">): React.JSX.Element;
15
15
  declare function InputGroupTextarea({ className, ...props }: React.ComponentProps<"textarea">): React.JSX.Element;
@@ -4,7 +4,7 @@ import * as React from "react";
4
4
  import { cva } from "class-variance-authority";
5
5
  import { MotionSlot } from "../motion/motion-slot.js";
6
6
  import { cn } from "../lib/utils.js";
7
- import { Button } from "./button.js";
7
+ import { ControlButton } from "./control-button.js";
8
8
  import { Input } from "./input.js";
9
9
  import { Textarea } from "./textarea.js";
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -153,7 +153,7 @@ function InputGroupButton(t0) {
153
153
  }
154
154
  let t5;
155
155
  if ($[9] !== props || $[10] !== size || $[11] !== t4 || $[12] !== type || $[13] !== variant) {
156
- t5 = /* @__PURE__ */ _jsx(Button, {
156
+ t5 = /* @__PURE__ */ _jsx(ControlButton, {
157
157
  type,
158
158
  "data-size": size,
159
159
  variant,
@@ -1,13 +1,13 @@
1
1
  import * as React from "react";
2
2
  import { type LinkProps } from "./link.js";
3
- import { Button } from "./button.js";
3
+ import { ControlButton } from "./control-button.js";
4
4
  declare function Pagination({ className, ...props }: React.ComponentProps<"nav">): React.JSX.Element;
5
5
  /** Lists page links; the current page's highlight glides to the newly selected page. */
6
6
  declare function PaginationContent({ className, ...props }: React.ComponentProps<"ul">): React.JSX.Element;
7
7
  declare function PaginationItem({ ...props }: React.ComponentProps<"li">): React.JSX.Element;
8
8
  export type PaginationLinkProps = {
9
9
  isActive?: boolean;
10
- } & Pick<React.ComponentProps<typeof Button>, "size"> & LinkProps;
10
+ } & Pick<React.ComponentProps<typeof ControlButton>, "size"> & LinkProps;
11
11
  declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): React.JSX.Element;
12
12
  declare function PaginationPrevious({ className, text, ...props }: React.ComponentProps<typeof PaginationLink> & {
13
13
  text?: string;
@@ -4,7 +4,7 @@ import * as React from "react";
4
4
  import { Link } from "./link.js";
5
5
  import { GlideSlot } from "../motion/glide-slot.js";
6
6
  import { cn } from "../lib/utils.js";
7
- import { Button } from "./button.js";
7
+ import { ControlButton } from "./control-button.js";
8
8
  import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
9
9
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
10
  function Pagination(t0) {
@@ -155,7 +155,7 @@ function PaginationLink(t0) {
155
155
  }
156
156
  let t6;
157
157
  if ($[11] !== size || $[12] !== t2 || $[13] !== t3 || $[14] !== t5) {
158
- t6 = /* @__PURE__ */ _jsx(Button, {
158
+ t6 = /* @__PURE__ */ _jsx(ControlButton, {
159
159
  asChild: true,
160
160
  variant: t2,
161
161
  size,
@@ -6,7 +6,7 @@ import { usePrefersReducedMotion } from "../hooks/use-prefers-reduced-motion.js"
6
6
  import { cn } from "../lib/utils.js";
7
7
  import { MOTION_EASE, MOTION_TIMING } from "../motion/tokens.js";
8
8
  import { AnimatedCount } from "./animated-count.js";
9
- import { Button } from "./button.js";
9
+ import { ControlButton } from "./control-button.js";
10
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  /** Peak scale the icon reaches while popping into the active state. */
12
12
  const REACTION_ICON_POP_SCALE = 1.28;
@@ -95,7 +95,7 @@ export function ReactionButton(t0) {
95
95
  }
96
96
  let t10;
97
97
  if ($[12] !== activeColorStyle || $[13] !== ariaLabel || $[14] !== isActive || $[15] !== isDisabled || $[16] !== onClick || $[17] !== t4 || $[18] !== t5 || $[19] !== t8 || $[20] !== t9) {
98
- t10 = /* @__PURE__ */ _jsxs(Button, {
98
+ t10 = /* @__PURE__ */ _jsxs(ControlButton, {
99
99
  "data-slot": "reaction-button",
100
100
  "data-active": t4,
101
101
  "aria-label": ariaLabel,
@@ -4,7 +4,7 @@ import { c as _c } from "react/compiler-runtime";
4
4
  import { useEffect, useRef } from "react";
5
5
  import { cn } from "../lib/utils.js";
6
6
  import { RICH_LINK_POPOVER_MODE, RICH_TEXT_EDITOR_KEY, RICH_TEXT_SEGMENT_TYPE } from "../lib/rich-text/link-markdown-constants.js";
7
- import { Button } from "./button.js";
7
+ import { ControlButton } from "./control-button.js";
8
8
  import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
9
9
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
10
  const BUTTON_TYPE = "button";
@@ -22,11 +22,11 @@ const LINK_REL = "noreferrer";
22
22
  const RICH_LINK_EDITOR_CLASS_NAMES = {
23
23
  editor: "min-h-28 w-full cursor-text border-0 bg-background p-0 leading-[1.65] whitespace-pre-wrap text-foreground [font:inherit] [overflow-wrap:anywhere] focus:outline-0 empty:before:pointer-events-none empty:before:text-muted-foreground/75 empty:before:content-[attr(data-placeholder)] max-md:text-base",
24
24
  editorInvalid: "rounded-[0.35rem] shadow-[inset_0_-2px_0_var(--destructive)] outline-0",
25
- editorLink: "cursor-pointer rounded-[0.2rem] font-bold text-primary underline decoration-[0.08em] underline-offset-[0.18em] transition-colors hover:text-[color-mix(in_oklab,var(--primary)_72%,var(--foreground))] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
25
+ editorLink: "cursor-pointer rounded-[0.2rem] font-medium text-primary underline decoration-[0.08em] underline-offset-[0.18em] transition-colors hover:text-[color-mix(in_oklab,var(--primary)_72%,var(--foreground))] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
26
26
  popover: "gap-3",
27
27
  editForm: "grid gap-3 animate-in fade-in slide-in-from-bottom-1 duration-200",
28
28
  actions: "flex flex-wrap items-center gap-2",
29
- label: "grid gap-[0.35rem] text-[0.85rem] font-bold text-muted-foreground",
29
+ label: "grid gap-[0.35rem] text-[0.85rem] font-medium text-muted-foreground",
30
30
  input: "min-h-8 rounded-lg border border-border/80 bg-background px-[0.65rem] font-normal text-foreground outline-0 transition-[border-color,box-shadow] [font:inherit] focus-visible:border-ring focus-visible:shadow-[0_0_0_3px_color-mix(in_oklab,var(--ring)_35%,transparent)] aria-invalid:border-destructive aria-invalid:focus-visible:shadow-[0_0_0_3px_color-mix(in_oklab,var(--destructive)_25%,transparent)] max-md:text-base"
31
31
  };
32
32
  const RICH_LINK_EDITOR_DEFAULT_COPY = {
@@ -176,14 +176,14 @@ export function RichLinkEditor(t0) {
176
176
  onPaste: _temp5,
177
177
  children: popoverMode === RICH_LINK_POPOVER_MODE.actions ? /* @__PURE__ */ _jsxs("div", {
178
178
  className: RICH_LINK_EDITOR_CLASS_NAMES.actions,
179
- children: [/* @__PURE__ */ _jsx(Button, {
179
+ children: [/* @__PURE__ */ _jsx(ControlButton, {
180
180
  onClick: () => {
181
181
  setPopoverMode(RICH_LINK_POPOVER_MODE.edit);
182
182
  },
183
183
  type: BUTTON_TYPE,
184
184
  variant: BUTTON_VARIANT.ghost,
185
185
  children: copy.editAction
186
- }), /* @__PURE__ */ _jsx(Button, {
186
+ }), /* @__PURE__ */ _jsx(ControlButton, {
187
187
  onClick: () => {
188
188
  removeLink(segment);
189
189
  },
@@ -221,7 +221,7 @@ export function RichLinkEditor(t0) {
221
221
  }),
222
222
  /* @__PURE__ */ _jsxs("div", {
223
223
  className: RICH_LINK_EDITOR_CLASS_NAMES.actions,
224
- children: [/* @__PURE__ */ _jsx(Button, {
224
+ children: [/* @__PURE__ */ _jsx(ControlButton, {
225
225
  disabled: !isLinkEditValid,
226
226
  onClick: () => {
227
227
  if (activeLink) {
@@ -230,7 +230,7 @@ export function RichLinkEditor(t0) {
230
230
  },
231
231
  type: BUTTON_TYPE,
232
232
  children: copy.editSave
233
- }), /* @__PURE__ */ _jsx(Button, {
233
+ }), /* @__PURE__ */ _jsx(ControlButton, {
234
234
  onClick: closeLinkPopover,
235
235
  type: BUTTON_TYPE,
236
236
  variant: BUTTON_VARIANT.outline,
@@ -16,7 +16,7 @@ export function RichTextContent({ content, onLinkClick, linkClassName }) {
16
16
  const segments = parseRichTextSegments(content);
17
17
  return /* @__PURE__ */ _jsx(_Fragment, { children: segments.map((segment, segmentIndex) => segment.type === RICH_TEXT_SEGMENT_TYPE.link ? /* @__PURE__ */ _jsx("a", {
18
18
  "data-slot": "rich-text-link",
19
- className: cn(RICH_TEXT_LINK_CLASS_NAME, "font-bold decoration-[0.08em]", linkClassName),
19
+ className: cn(RICH_TEXT_LINK_CLASS_NAME, "font-medium decoration-[0.08em]", linkClassName),
20
20
  href: segment.url,
21
21
  onClick: onLinkClick,
22
22
  rel: LINK_REL,
@@ -5,7 +5,7 @@ import { Dialog as SheetPrimitive } from "radix-ui";
5
5
  import { MotionSlot } from "../motion/motion-slot.js";
6
6
  import { MotionPresence, MotionOpenProvider, useMotionOpenState } from "../motion/presence.js";
7
7
  import { cn } from "../lib/utils.js";
8
- import { Button } from "./button.js";
8
+ import { ControlButton } from "./control-button.js";
9
9
  import { XIcon } from "lucide-react";
10
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  function Sheet(t0) {
@@ -209,7 +209,7 @@ function SheetContent(t0) {
209
209
  asChild: true,
210
210
  children: /* @__PURE__ */ _jsx(MotionSlot, {
211
211
  kind: "delayed-pop",
212
- children: /* @__PURE__ */ _jsxs(Button, {
212
+ children: /* @__PURE__ */ _jsxs(ControlButton, {
213
213
  variant: "ghost",
214
214
  className: "absolute top-4 right-4",
215
215
  size: "icon-sm",
@@ -261,7 +261,7 @@ function SidebarProvider(t0) {
261
261
  if ($[29] !== toggleSidebar) {
262
262
  t8 = () => {
263
263
  const handleShortcut = (event) => {
264
- if (event.key.toLowerCase() === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
264
+ if (typeof event.key === "string" && event.key.toLowerCase() === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
265
265
  event.preventDefault();
266
266
  toggleSidebar();
267
267
  }
@@ -1268,7 +1268,7 @@ function SidebarBrandButton(t0) {
1268
1268
  const t3 = collapsed ? textLabel : undefined;
1269
1269
  let t4;
1270
1270
  if ($[7] !== className) {
1271
- t4 = cn("flex min-h-10 w-full min-w-0 items-center gap-3 rounded-xl px-2 py-1.5 text-left text-sm font-semibold text-sidebar-foreground outline-none transition-colors", "hover:bg-sidebar-accent/70 focus-visible:bg-sidebar-accent/70 focus-visible:ring-2 focus-visible:ring-sidebar-ring data-[state=open]:bg-sidebar-accent/70", "disabled:cursor-not-allowed disabled:opacity-40", className);
1271
+ t4 = cn("flex min-h-10 w-full min-w-0 items-center gap-3 rounded-xl px-2 py-1.5 text-left text-sm font-medium text-sidebar-foreground outline-none transition-colors", "hover:bg-sidebar-accent/70 focus-visible:bg-sidebar-accent/70 focus-visible:ring-2 focus-visible:ring-sidebar-ring data-[state=open]:bg-sidebar-accent/70", "disabled:cursor-not-allowed disabled:opacity-40", className);
1272
1272
  $[7] = className;
1273
1273
  $[8] = t4;
1274
1274
  } else {
@@ -1382,7 +1382,7 @@ function SidebarGroupLabel(t0) {
1382
1382
  const t1 = collapsed ? "opacity-0" : "opacity-100";
1383
1383
  let t2;
1384
1384
  if ($[3] !== className || $[4] !== t1) {
1385
- t2 = cn("mb-1 h-7 overflow-hidden px-2 text-[10px] font-medium tracking-[0.14em] text-sidebar-foreground/70 uppercase transition-opacity", t1, className);
1385
+ t2 = cn("mb-1 h-7 overflow-hidden px-2 text-xs font-medium text-sidebar-foreground/70 transition-opacity", t1, className);
1386
1386
  $[3] = className;
1387
1387
  $[4] = t1;
1388
1388
  $[5] = t2;
@@ -332,7 +332,7 @@ export function TypingAnimation(t0) {
332
332
  t20 = $[52];
333
333
  }
334
334
  const getCursorChar = t20;
335
- const t21 = Component === "h1" && "text-3xl font-bold leading-tight md:text-4xl";
335
+ const t21 = Component === "h1" && "text-3xl font-medium leading-tight md:text-4xl";
336
336
  const t22 = Component === "span" && "inline-block";
337
337
  let t23;
338
338
  if ($[53] !== className || $[54] !== t21 || $[55] !== t22) {