beez-ui 0.8.2 → 0.9.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 (48) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +11 -9
  3. package/dist/components/filter-presets-bar.d.ts +71 -0
  4. package/dist/components/filter-presets-bar.js +508 -0
  5. package/dist/components/reaction-button.d.ts +7 -2
  6. package/dist/components/reaction-button.js +59 -48
  7. package/dist/hooks.d.ts +10 -0
  8. package/dist/hooks.js +10 -0
  9. package/dist/index.d.ts +1 -23
  10. package/dist/index.js +1 -23
  11. package/dist/styles.css +1 -1
  12. package/package.json +11 -126
  13. package/dist/components/bouncing-dots-loader.d.ts +0 -19
  14. package/dist/components/bouncing-dots-loader.js +0 -47
  15. package/dist/components/confirm-delete-button.d.ts +0 -29
  16. package/dist/components/confirm-delete-button.js +0 -254
  17. package/dist/components/empty-state.d.ts +0 -24
  18. package/dist/components/empty-state.js +0 -37
  19. package/dist/components/error-state.d.ts +0 -20
  20. package/dist/components/error-state.js +0 -145
  21. package/dist/components/external-browser-handoff.d.ts +0 -27
  22. package/dist/components/external-browser-handoff.js +0 -306
  23. package/dist/components/info-popover.d.ts +0 -23
  24. package/dist/components/info-popover.js +0 -158
  25. package/dist/components/month-calendar-header.d.ts +0 -65
  26. package/dist/components/month-calendar-header.js +0 -337
  27. package/dist/components/month-grid.d.ts +0 -59
  28. package/dist/components/month-grid.js +0 -301
  29. package/dist/components/notification-bell.d.ts +0 -50
  30. package/dist/components/notification-bell.js +0 -338
  31. package/dist/components/notification-panel.d.ts +0 -56
  32. package/dist/components/notification-panel.js +0 -281
  33. package/dist/components/open-in-browser-cta.d.ts +0 -22
  34. package/dist/components/open-in-browser-cta.js +0 -61
  35. package/dist/components/pwa-update-control.d.ts +0 -18
  36. package/dist/components/pwa-update-control.js +0 -119
  37. package/dist/emoji-picker.d.ts +0 -27
  38. package/dist/emoji-picker.js +0 -283
  39. package/dist/hooks/use-minute-clock.d.ts +0 -23
  40. package/dist/hooks/use-minute-clock.js +0 -147
  41. package/dist/hooks/use-month-transition-direction.d.ts +0 -21
  42. package/dist/hooks/use-month-transition-direction.js +0 -110
  43. package/dist/lib/browser-navigation.d.ts +0 -21
  44. package/dist/lib/browser-navigation.js +0 -42
  45. package/dist/lib/in-app-browser.d.ts +0 -35
  46. package/dist/lib/in-app-browser.js +0 -80
  47. package/dist/lib/month-grid.d.ts +0 -42
  48. package/dist/lib/month-grid.js +0 -74
@@ -32,83 +32,94 @@ const REACTION_ICON_VARIANTS = {
32
32
  * @returns The reaction button.
33
33
  */
34
34
  export function ReactionButton(t0) {
35
- const $ = _c(19);
36
- const { ariaLabel, isActive, count, onClick, isDisabled: t1, icon: t2, formatCount, className } = t0;
35
+ const $ = _c(22);
36
+ const { ariaLabel, isActive, count, onClick, isDisabled: t1, icon: t2, formatCount, activeColor, className } = t0;
37
37
  const isDisabled = t1 === undefined ? false : t1;
38
38
  const Icon = t2 === undefined ? HeartIcon : t2;
39
39
  const shouldReduceMotion = usePrefersReducedMotion();
40
- const t3 = isActive || undefined;
41
- let t4;
42
- if ($[0] !== className) {
43
- t4 = cn("group/reaction", className);
44
- $[0] = className;
45
- $[1] = t4;
40
+ let t3;
41
+ if ($[0] !== activeColor) {
42
+ t3 = activeColor ? { "--beez-reaction-active-color": activeColor } : undefined;
43
+ $[0] = activeColor;
44
+ $[1] = t3;
46
45
  } else {
47
- t4 = $[1];
46
+ t3 = $[1];
48
47
  }
49
- const t5 = isActive && !shouldReduceMotion ? "active" : "idle";
50
- let t6;
51
- if ($[2] !== Icon) {
52
- t6 = /* @__PURE__ */ _jsx(Icon, { className: "size-4 transition-[fill,color] group-data-active/reaction:fill-current group-data-active/reaction:text-destructive" });
53
- $[2] = Icon;
54
- $[3] = t6;
48
+ const activeColorStyle = t3;
49
+ const t4 = isActive || undefined;
50
+ let t5;
51
+ if ($[2] !== className) {
52
+ t5 = cn("group/reaction", className);
53
+ $[2] = className;
54
+ $[3] = t5;
55
55
  } else {
56
- t6 = $[3];
56
+ t5 = $[3];
57
57
  }
58
+ const t6 = isActive && !shouldReduceMotion ? "active" : "idle";
58
59
  let t7;
59
- if ($[4] !== t5 || $[5] !== t6) {
60
- t7 = /* @__PURE__ */ _jsx(motion.span, {
61
- animate: t5,
60
+ if ($[4] !== Icon) {
61
+ t7 = /* @__PURE__ */ _jsx(Icon, { className: "size-4 transition-[fill,color] group-data-active/reaction:fill-current group-data-active/reaction:text-[var(--beez-reaction-active-color,var(--destructive))]" });
62
+ $[4] = Icon;
63
+ $[5] = t7;
64
+ } else {
65
+ t7 = $[5];
66
+ }
67
+ let t8;
68
+ if ($[6] !== t6 || $[7] !== t7) {
69
+ t8 = /* @__PURE__ */ _jsx(motion.span, {
70
+ animate: t6,
62
71
  "aria-hidden": true,
63
72
  className: "inline-flex origin-center items-center justify-center",
64
73
  initial: false,
65
74
  variants: REACTION_ICON_VARIANTS,
66
- children: t6
75
+ children: t7
67
76
  });
68
- $[4] = t5;
69
- $[5] = t6;
70
- $[6] = t7;
77
+ $[6] = t6;
78
+ $[7] = t7;
79
+ $[8] = t8;
71
80
  } else {
72
- t7 = $[6];
81
+ t8 = $[8];
73
82
  }
74
- let t8;
75
- if ($[7] !== count || $[8] !== formatCount) {
76
- t8 = /* @__PURE__ */ _jsx(AnimatedCount, {
83
+ let t9;
84
+ if ($[9] !== count || $[10] !== formatCount) {
85
+ t9 = /* @__PURE__ */ _jsx(AnimatedCount, {
77
86
  className: "min-w-[1ch]",
78
87
  value: count,
79
88
  format: formatCount
80
89
  });
81
- $[7] = count;
82
- $[8] = formatCount;
83
- $[9] = t8;
90
+ $[9] = count;
91
+ $[10] = formatCount;
92
+ $[11] = t9;
84
93
  } else {
85
- t8 = $[9];
94
+ t9 = $[11];
86
95
  }
87
- let t9;
88
- if ($[10] !== ariaLabel || $[11] !== isActive || $[12] !== isDisabled || $[13] !== onClick || $[14] !== t3 || $[15] !== t4 || $[16] !== t7 || $[17] !== t8) {
89
- t9 = /* @__PURE__ */ _jsxs(Button, {
96
+ let t10;
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, {
90
99
  "data-slot": "reaction-button",
91
- "data-active": t3,
100
+ "data-active": t4,
92
101
  "aria-label": ariaLabel,
93
102
  "aria-pressed": isActive,
94
- className: t4,
103
+ className: t5,
95
104
  disabled: isDisabled,
96
105
  onClick,
106
+ style: activeColorStyle,
97
107
  type: "button",
98
108
  variant: "outline",
99
- children: [t7, t8]
109
+ children: [t8, t9]
100
110
  });
101
- $[10] = ariaLabel;
102
- $[11] = isActive;
103
- $[12] = isDisabled;
104
- $[13] = onClick;
105
- $[14] = t3;
106
- $[15] = t4;
107
- $[16] = t7;
108
- $[17] = t8;
109
- $[18] = t9;
111
+ $[12] = activeColorStyle;
112
+ $[13] = ariaLabel;
113
+ $[14] = isActive;
114
+ $[15] = isDisabled;
115
+ $[16] = onClick;
116
+ $[17] = t4;
117
+ $[18] = t5;
118
+ $[19] = t8;
119
+ $[20] = t9;
120
+ $[21] = t10;
110
121
  } else {
111
- t9 = $[18];
122
+ t10 = $[21];
112
123
  }
113
- return t9;
124
+ return t10;
114
125
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * General-purpose React hooks, published at `beez-ui/hooks` so the component barrel stays focused
3
+ * on UI. `useIsMobile` is also exported from the package root for existing consumers.
4
+ */
5
+ export { useIsMobile } from "./hooks/use-mobile.js";
6
+ export { useIsHydrated } from "./hooks/use-is-hydrated.js";
7
+ export { usePrefersReducedMotion } from "./hooks/use-prefers-reduced-motion.js";
8
+ export { useViewerTimeZone } from "./hooks/use-viewer-time-zone.js";
9
+ export { useHorizontalSwipe, type HorizontalSwipeHandlers } from "./hooks/use-horizontal-swipe.js";
10
+ export { HORIZONTAL_SWIPE_DIRECTION, resolveHorizontalSwipe, type HorizontalSwipeDirection, type HorizontalSwipeGesture, } from "./lib/horizontal-swipe.js";
package/dist/hooks.js ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * General-purpose React hooks, published at `beez-ui/hooks` so the component barrel stays focused
3
+ * on UI. `useIsMobile` is also exported from the package root for existing consumers.
4
+ */
5
+ export { useIsMobile } from "./hooks/use-mobile.js";
6
+ export { useIsHydrated } from "./hooks/use-is-hydrated.js";
7
+ export { usePrefersReducedMotion } from "./hooks/use-prefers-reduced-motion.js";
8
+ export { useViewerTimeZone } from "./hooks/use-viewer-time-zone.js";
9
+ export { useHorizontalSwipe } from "./hooks/use-horizontal-swipe.js";
10
+ export { HORIZONTAL_SWIPE_DIRECTION, resolveHorizontalSwipe } from "./lib/horizontal-swipe.js";
package/dist/index.d.ts CHANGED
@@ -51,42 +51,20 @@ export * from "./components/animated-collapse.js";
51
51
  export * from "./components/animated-count.js";
52
52
  export * from "./components/animated-list-item.js";
53
53
  export * from "./components/presence-swap.js";
54
- export * from "./components/bouncing-dots-loader.js";
55
54
  export * from "./components/progress-ring.js";
56
- export * from "./components/confirm-delete-button.js";
57
- export * from "./components/info-popover.js";
58
- export * from "./components/empty-state.js";
59
- export * from "./components/error-state.js";
60
55
  export * from "./components/account-menu.js";
61
56
  export * from "./components/rich-text-content.js";
62
57
  export * from "./components/rich-markdown-content.js";
63
58
  export * from "./components/rich-link-editor.js";
64
- export * from "./components/open-in-browser-cta.js";
65
- export * from "./components/external-browser-handoff.js";
66
- export * from "./components/pwa-update-control.js";
67
59
  export * from "./components/reaction-button.js";
68
- export * from "./components/notification-panel.js";
69
- export * from "./components/notification-bell.js";
70
- export * from "./components/month-grid.js";
71
- export * from "./components/month-calendar-header.js";
72
60
  export * from "./components/file-upload.js";
73
- export * from "./hooks/use-is-hydrated.js";
74
- export * from "./hooks/use-minute-clock.js";
75
- export * from "./hooks/use-viewer-time-zone.js";
76
- export * from "./hooks/use-horizontal-swipe.js";
77
61
  export * from "./hooks/use-rich-link-editor.js";
78
- export * from "./hooks/use-month-transition-direction.js";
79
- export * from "./hooks/use-prefers-reduced-motion.js";
80
62
  export * from "./lib/browser-clipboard.js";
81
- export * from "./lib/browser-navigation.js";
82
63
  export * from "./lib/file-acceptance.js";
83
64
  export * from "./lib/format-file-size.js";
84
65
  export * from "./lib/fuzzy-search.js";
85
- export * from "./lib/horizontal-swipe.js";
86
- export * from "./lib/in-app-browser.js";
87
- export * from "./lib/month-grid.js";
88
- export * from "./lib/name-initials.js";
89
66
  export { parseRichTextSegments, normalizeMarkdownUrl, normalizeAutolinkUrl } from "./lib/rich-text/link-markdown.js";
90
67
  export { RICH_TEXT_SEGMENT_TYPE, RICH_LINK_KIND } from "./lib/rich-text/link-markdown-constants.js";
91
68
  export type { RichTextSegment, RichLink } from "./lib/rich-text/link-markdown-types.js";
92
69
  export * from "./lib/rich-text/rich-markdown.js";
70
+ export * from "./components/filter-presets-bar.js";
package/dist/index.js CHANGED
@@ -50,41 +50,19 @@ export * from "./components/animated-collapse.js";
50
50
  export * from "./components/animated-count.js";
51
51
  export * from "./components/animated-list-item.js";
52
52
  export * from "./components/presence-swap.js";
53
- export * from "./components/bouncing-dots-loader.js";
54
53
  export * from "./components/progress-ring.js";
55
- export * from "./components/confirm-delete-button.js";
56
- export * from "./components/info-popover.js";
57
- export * from "./components/empty-state.js";
58
- export * from "./components/error-state.js";
59
54
  export * from "./components/account-menu.js";
60
55
  export * from "./components/rich-text-content.js";
61
56
  export * from "./components/rich-markdown-content.js";
62
57
  export * from "./components/rich-link-editor.js";
63
- export * from "./components/open-in-browser-cta.js";
64
- export * from "./components/external-browser-handoff.js";
65
- export * from "./components/pwa-update-control.js";
66
58
  export * from "./components/reaction-button.js";
67
- export * from "./components/notification-panel.js";
68
- export * from "./components/notification-bell.js";
69
- export * from "./components/month-grid.js";
70
- export * from "./components/month-calendar-header.js";
71
59
  export * from "./components/file-upload.js";
72
- export * from "./hooks/use-is-hydrated.js";
73
- export * from "./hooks/use-minute-clock.js";
74
- export * from "./hooks/use-viewer-time-zone.js";
75
- export * from "./hooks/use-horizontal-swipe.js";
76
60
  export * from "./hooks/use-rich-link-editor.js";
77
- export * from "./hooks/use-month-transition-direction.js";
78
- export * from "./hooks/use-prefers-reduced-motion.js";
79
61
  export * from "./lib/browser-clipboard.js";
80
- export * from "./lib/browser-navigation.js";
81
62
  export * from "./lib/file-acceptance.js";
82
63
  export * from "./lib/format-file-size.js";
83
64
  export * from "./lib/fuzzy-search.js";
84
- export * from "./lib/horizontal-swipe.js";
85
- export * from "./lib/in-app-browser.js";
86
- export * from "./lib/month-grid.js";
87
- export * from "./lib/name-initials.js";
88
65
  export { parseRichTextSegments, normalizeMarkdownUrl, normalizeAutolinkUrl } from "./lib/rich-text/link-markdown.js";
89
66
  export { RICH_TEXT_SEGMENT_TYPE, RICH_LINK_KIND } from "./lib/rich-text/link-markdown-constants.js";
90
67
  export * from "./lib/rich-text/rich-markdown.js";
68
+ export * from "./components/filter-presets-bar.js";