@bearmenu/ui 0.6.0 → 0.7.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 (80) hide show
  1. package/dist/chunk-A5ONAJCE.js +102 -0
  2. package/dist/chunk-AV777R4G.js +43 -0
  3. package/dist/{chunk-WKMLZDUT.js → chunk-FRPPIXMY.js} +1 -1
  4. package/dist/{chunk-PSR7N36A.js → chunk-HCM6LKM5.js} +1 -1
  5. package/dist/{chunk-YJ6OBKZJ.js → chunk-TL4YU2O5.js} +10 -3
  6. package/dist/chunk-UX6SWAKH.js +320 -0
  7. package/dist/{chunk-7PPCH42H.js → chunk-VQNDZVI7.js} +1 -1
  8. package/dist/chunk-WSRWFA6K.js +26 -0
  9. package/dist/chunk-YLNYXPIH.js +61 -0
  10. package/dist/components/accordion.js +1 -1
  11. package/dist/components/alert.d.ts +2 -2
  12. package/dist/components/badge.d.ts +3 -2
  13. package/dist/components/badge.js +1 -1
  14. package/dist/components/button.d.ts +1 -1
  15. package/dist/components/card.d.ts +2 -2
  16. package/dist/components/card.js +127 -4
  17. package/dist/components/combobox.js +2 -2
  18. package/dist/components/command.d.ts +15 -15
  19. package/dist/components/command.js +2 -2
  20. package/dist/components/currency-input.js +1 -1
  21. package/dist/components/date-input.d.ts +1 -1
  22. package/dist/components/date-input.js +1 -1
  23. package/dist/components/dialog.js +1 -1
  24. package/dist/components/filter-category-row.d.ts +13 -0
  25. package/dist/components/filter-category-row.js +44 -0
  26. package/dist/components/input-group.d.ts +2 -0
  27. package/dist/components/input-group.js +10 -5
  28. package/dist/components/input.d.ts +1 -0
  29. package/dist/components/input.js +1 -1
  30. package/dist/components/item.d.ts +2 -2
  31. package/dist/components/multi-select-combobox.js +3 -3
  32. package/dist/components/phone-frame.js +1 -1
  33. package/dist/components/place-about-tab.d.ts +2 -2
  34. package/dist/components/place-about-tab.js +4 -3
  35. package/dist/components/place-details-mobile.js +5 -3
  36. package/dist/components/place-schedule-week.d.ts +19 -0
  37. package/dist/components/place-schedule-week.js +4 -0
  38. package/dist/components/place-types.d.ts +18 -9
  39. package/dist/components/scroll-fade.d.ts +15 -0
  40. package/dist/components/scroll-fade.js +121 -0
  41. package/dist/components/searchable-select.js +2 -2
  42. package/dist/components/separator.js +3 -26
  43. package/dist/components/sheet.js +1 -1
  44. package/dist/components/sliding-panels.d.ts +1 -0
  45. package/dist/components/sliding-panels.js +22 -6
  46. package/dist/components/sort-option-list.d.ts +16 -0
  47. package/dist/components/sort-option-list.js +46 -0
  48. package/dist/components/spinner.d.ts +2 -2
  49. package/dist/components/tabs.js +98 -17
  50. package/dist/components/tag.d.ts +2 -2
  51. package/dist/components/tag.js +3 -61
  52. package/dist/components/text.d.ts +3 -3
  53. package/dist/components/toast.js +1 -1
  54. package/dist/components/toaster.js +1 -1
  55. package/package.json +23 -112
  56. package/src/components/accordion.tsx +1 -1
  57. package/src/components/badge.tsx +9 -2
  58. package/src/components/card.tsx +22 -18
  59. package/src/components/dialog.tsx +1 -1
  60. package/src/components/filter-category-row.tsx +52 -0
  61. package/src/components/input-group.tsx +9 -4
  62. package/src/components/input.tsx +8 -3
  63. package/src/components/phone-frame.tsx +1 -1
  64. package/src/components/place-about-tab.stories.tsx +24 -13
  65. package/src/components/place-about-tab.test.tsx +92 -38
  66. package/src/components/place-about-tab.tsx +310 -344
  67. package/src/components/place-schedule-week.tsx +128 -0
  68. package/src/components/place-types.ts +27 -8
  69. package/src/components/scroll-fade.stories.tsx +98 -0
  70. package/src/components/scroll-fade.tsx +132 -0
  71. package/src/components/sheet.tsx +1 -1
  72. package/src/components/sliding-panels.tsx +33 -6
  73. package/src/components/sort-option-list.tsx +57 -0
  74. package/src/components/tabs.tsx +76 -11
  75. package/src/components/toast.tsx +1 -1
  76. package/src/globals.css +77 -19
  77. package/src/lib/motion.ts +137 -0
  78. package/dist/chunk-BAZFVSSG.js +0 -279
  79. package/dist/chunk-RIDXFY6M.js +0 -38
  80. package/dist/chunk-XK2ZDQVE.js +0 -122
@@ -0,0 +1,121 @@
1
+ import { cn } from '../chunk-FEK5XGZW.js';
2
+ import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
3
+ import * as React from 'react';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
+
6
+ var fromMap = {
7
+ background: "from-background",
8
+ card: "from-card",
9
+ muted: "from-muted"
10
+ };
11
+ var sizeMap = {
12
+ vertical: { sm: "h-6", md: "h-12", lg: "h-20" },
13
+ horizontal: { sm: "w-8", md: "w-16", lg: "w-28" }
14
+ };
15
+ var ScrollFade = React.forwardRef(
16
+ (_a, ref) => {
17
+ var _b = _a, {
18
+ orientation = "vertical",
19
+ fadeColor = "background",
20
+ size = "md",
21
+ className,
22
+ scrollClassName,
23
+ children
24
+ } = _b, props = __objRest(_b, [
25
+ "orientation",
26
+ "fadeColor",
27
+ "size",
28
+ "className",
29
+ "scrollClassName",
30
+ "children"
31
+ ]);
32
+ const innerRef = React.useRef(null);
33
+ React.useImperativeHandle(ref, () => innerRef.current);
34
+ const [atStart, setAtStart] = React.useState(true);
35
+ const [atEnd, setAtEnd] = React.useState(true);
36
+ const update = React.useCallback(() => {
37
+ const el = innerRef.current;
38
+ if (!el) return;
39
+ if (orientation === "vertical") {
40
+ const overflow = el.scrollHeight - el.clientHeight;
41
+ setAtStart(el.scrollTop <= 1);
42
+ setAtEnd(overflow <= 1 || el.scrollTop >= overflow - 1);
43
+ } else {
44
+ const overflow = el.scrollWidth - el.clientWidth;
45
+ setAtStart(el.scrollLeft <= 1);
46
+ setAtEnd(overflow <= 1 || el.scrollLeft >= overflow - 1);
47
+ }
48
+ }, [orientation]);
49
+ React.useEffect(() => {
50
+ const el = innerRef.current;
51
+ if (!el) return;
52
+ update();
53
+ el.addEventListener("scroll", update, { passive: true });
54
+ const ro = new ResizeObserver(update);
55
+ ro.observe(el);
56
+ return () => {
57
+ el.removeEventListener("scroll", update);
58
+ ro.disconnect();
59
+ };
60
+ }, [update]);
61
+ const fromClass = fromMap[fadeColor];
62
+ const fadeSize = sizeMap[orientation][size];
63
+ return /* @__PURE__ */ jsxs(
64
+ "div",
65
+ {
66
+ className: cn(
67
+ "relative isolate flex",
68
+ orientation === "vertical" ? "flex-col" : "flex-row",
69
+ className
70
+ ),
71
+ children: [
72
+ /* @__PURE__ */ jsx(
73
+ "div",
74
+ __spreadProps(__spreadValues({
75
+ ref: innerRef,
76
+ className: cn(
77
+ "min-h-0 min-w-0 flex-1",
78
+ orientation === "vertical" ? "overflow-y-auto" : "overflow-x-auto",
79
+ scrollClassName
80
+ )
81
+ }, props), {
82
+ children
83
+ })
84
+ ),
85
+ /* @__PURE__ */ jsx(
86
+ "div",
87
+ {
88
+ "aria-hidden": true,
89
+ className: cn(
90
+ "pointer-events-none absolute z-10 transition-opacity duration-300",
91
+ // `from-30%` adds a solid plateau before the gradient starts
92
+ // fading — without it the gradient is a pure linear ramp and only
93
+ // the very top pixel reads as solid, leaving the cut edge visible.
94
+ // -4px inset pulls the fade past the container edge so the very
95
+ // edge of clipped content is covered by the solid plateau.
96
+ orientation === "vertical" ? `inset-x-0 -top-1 ${fadeSize} bg-gradient-to-b from-30%` : `inset-y-0 -left-1 ${fadeSize} bg-gradient-to-r from-30%`,
97
+ fromClass,
98
+ atStart ? "opacity-0" : "opacity-100"
99
+ )
100
+ }
101
+ ),
102
+ /* @__PURE__ */ jsx(
103
+ "div",
104
+ {
105
+ "aria-hidden": true,
106
+ className: cn(
107
+ "pointer-events-none absolute z-10 transition-opacity duration-300",
108
+ orientation === "vertical" ? `inset-x-0 -bottom-1 ${fadeSize} bg-gradient-to-t from-30%` : `inset-y-0 -right-1 ${fadeSize} bg-gradient-to-l from-30%`,
109
+ fromClass,
110
+ atEnd ? "opacity-0" : "opacity-100"
111
+ )
112
+ }
113
+ )
114
+ ]
115
+ }
116
+ );
117
+ }
118
+ );
119
+ ScrollFade.displayName = "ScrollFade";
120
+
121
+ export { ScrollFade };
@@ -1,6 +1,6 @@
1
1
  import { Popover, PopoverTrigger, PopoverContent } from '../chunk-UUJVXN2O.js';
2
- import { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from '../chunk-PSR7N36A.js';
3
- import '../chunk-WKMLZDUT.js';
2
+ import { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from '../chunk-HCM6LKM5.js';
3
+ import '../chunk-FRPPIXMY.js';
4
4
  import { Button } from '../chunk-ZFNOCP6W.js';
5
5
  import '../chunk-R47NEOSI.js';
6
6
  import { cn } from '../chunk-FEK5XGZW.js';
@@ -1,26 +1,3 @@
1
- import { cn } from '../chunk-FEK5XGZW.js';
2
- import { __objRest, __spreadValues } from '../chunk-3GWWZKX7.js';
3
- import * as React from 'react';
4
- import * as SeparatorPrimitive from '@radix-ui/react-separator';
5
- import { jsx } from 'react/jsx-runtime';
6
-
7
- var Separator = React.forwardRef((_a, ref) => {
8
- var _b = _a, { className, orientation = "horizontal", decorative = true } = _b, props = __objRest(_b, ["className", "orientation", "decorative"]);
9
- return /* @__PURE__ */ jsx(
10
- SeparatorPrimitive.Root,
11
- __spreadValues({
12
- ref,
13
- "data-slot": "separator",
14
- decorative,
15
- orientation,
16
- className: cn(
17
- "shrink-0",
18
- orientation === "horizontal" ? "h-px w-full bg-gradient-to-r from-transparent via-border to-transparent" : "h-full w-px bg-gradient-to-b from-transparent via-border to-transparent",
19
- className
20
- )
21
- }, props)
22
- );
23
- });
24
- Separator.displayName = SeparatorPrimitive.Root.displayName;
25
-
26
- export { Separator };
1
+ export { Separator } from '../chunk-WSRWFA6K.js';
2
+ import '../chunk-FEK5XGZW.js';
3
+ import '../chunk-3GWWZKX7.js';
@@ -26,7 +26,7 @@ var SheetOverlay = React.forwardRef((_a, ref) => {
26
26
  });
27
27
  SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
28
28
  var sheetVariants = cva(
29
- "fixed z-[1000] gap-4 bg-background border-border p-6 shadow-2xl transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
29
+ "fixed z-[1000] gap-4 bg-background border-border p-6 shadow-2xl data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:duration-[var(--duration-deliberate)] data-[state=closed]:duration-[var(--duration-exit-standard)] data-[state=open]:ease-[var(--ease-enter)] data-[state=closed]:ease-[var(--ease-exit)]",
30
30
  {
31
31
  variants: {
32
32
  side: {
@@ -7,6 +7,7 @@ interface Panel {
7
7
  showBackButton?: boolean;
8
8
  backButtonLabel?: string;
9
9
  onBack?: () => void;
10
+ parentId?: string;
10
11
  }
11
12
  interface SlidingPanelsProps {
12
13
  panels: Panel[];
@@ -2,6 +2,7 @@ import { Button } from '../chunk-ZFNOCP6W.js';
2
2
  import '../chunk-R47NEOSI.js';
3
3
  import { cn } from '../chunk-FEK5XGZW.js';
4
4
  import '../chunk-3GWWZKX7.js';
5
+ import * as React from 'react';
5
6
  import { useRef, useState, useLayoutEffect } from 'react';
6
7
  import { ChevronLeft } from 'lucide-react';
7
8
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -16,6 +17,18 @@ var SlidingPanels = ({
16
17
  const currentPanelData = panels[currentIndex];
17
18
  const panelRefs = useRef([]);
18
19
  const [containerHeight, setContainerHeight] = useState();
20
+ const usesTreeModel = panels.some((p) => p.parentId);
21
+ const activeAncestors = React.useMemo(() => {
22
+ if (!usesTreeModel) return /* @__PURE__ */ new Set();
23
+ const ancestors = /* @__PURE__ */ new Set();
24
+ let cursor = panels.find((p) => p.id === currentPanel);
25
+ while (cursor == null ? void 0 : cursor.parentId) {
26
+ ancestors.add(cursor.parentId);
27
+ const nextId = cursor.parentId;
28
+ cursor = panels.find((p) => p.id === nextId);
29
+ }
30
+ return ancestors;
31
+ }, [panels, currentPanel, usesTreeModel]);
19
32
  useLayoutEffect(() => {
20
33
  const activeEl = panelRefs.current[currentIndex];
21
34
  if (!activeEl) return;
@@ -26,13 +39,16 @@ var SlidingPanels = ({
26
39
  return () => ro.disconnect();
27
40
  }, [currentIndex]);
28
41
  const handleBack = () => {
29
- const previousPanel = panels[currentIndex - 1];
30
- if (!previousPanel) return;
31
42
  if (currentPanelData == null ? void 0 : currentPanelData.onBack) {
32
43
  currentPanelData.onBack();
33
- } else {
34
- onPanelChange(previousPanel.id);
44
+ return;
35
45
  }
46
+ if (currentPanelData == null ? void 0 : currentPanelData.parentId) {
47
+ onPanelChange(currentPanelData.parentId);
48
+ return;
49
+ }
50
+ const previousPanel = panels[currentIndex - 1];
51
+ if (previousPanel) onPanelChange(previousPanel.id);
36
52
  };
37
53
  return /* @__PURE__ */ jsx(
38
54
  "div",
@@ -44,8 +60,8 @@ var SlidingPanels = ({
44
60
  style: { height: containerHeight, overflowClipMargin: "8px" },
45
61
  children: panels.map((panel, index) => {
46
62
  const isActive = panel.id === currentPanel;
47
- const isLeft = index < currentIndex;
48
- const isRight = index > currentIndex;
63
+ const isLeft = usesTreeModel ? activeAncestors.has(panel.id) : index < currentIndex;
64
+ const isRight = !isActive && !isLeft;
49
65
  return /* @__PURE__ */ jsxs(
50
66
  "div",
51
67
  {
@@ -0,0 +1,16 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ type SortOptionListItem<T extends string> = {
4
+ value: T;
5
+ label: string;
6
+ };
7
+ interface SortOptionListProps<T extends string> {
8
+ options: SortOptionListItem<T>[];
9
+ value: T;
10
+ onChange: (value: T) => void;
11
+ ariaLabel: string;
12
+ className?: string;
13
+ }
14
+ declare function SortOptionList<T extends string>({ options, value, onChange, ariaLabel, className, }: SortOptionListProps<T>): react_jsx_runtime.JSX.Element;
15
+
16
+ export { SortOptionList, type SortOptionListItem };
@@ -0,0 +1,46 @@
1
+ import { cn } from '../chunk-FEK5XGZW.js';
2
+ import '../chunk-3GWWZKX7.js';
3
+ import { Check } from 'lucide-react';
4
+ import { jsx, jsxs } from 'react/jsx-runtime';
5
+
6
+ function SortOptionList({
7
+ options,
8
+ value,
9
+ onChange,
10
+ ariaLabel,
11
+ className
12
+ }) {
13
+ return /* @__PURE__ */ jsx(
14
+ "div",
15
+ {
16
+ role: "radiogroup",
17
+ "aria-label": ariaLabel,
18
+ className: cn("px-2 pb-6", className),
19
+ children: options.map((option) => {
20
+ const isActive = option.value === value;
21
+ return /* @__PURE__ */ jsxs(
22
+ "button",
23
+ {
24
+ type: "button",
25
+ role: "radio",
26
+ "aria-checked": isActive,
27
+ onClick: () => onChange(option.value),
28
+ className: cn(
29
+ "flex w-full items-center justify-between rounded-lg px-3 py-3 text-left text-sm cursor-pointer",
30
+ "transition-colors duration-150 motion-reduce:transition-none",
31
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",
32
+ isActive ? "bg-accent/10 text-accent font-semibold" : "text-foreground hover:bg-muted/50"
33
+ ),
34
+ children: [
35
+ /* @__PURE__ */ jsx("span", { children: option.label }),
36
+ isActive && /* @__PURE__ */ jsx(Check, { className: "h-4 w-4", "aria-hidden": true })
37
+ ]
38
+ },
39
+ option.value
40
+ );
41
+ })
42
+ }
43
+ );
44
+ }
45
+
46
+ export { SortOptionList };
@@ -4,11 +4,11 @@ import { VariantProps } from 'class-variance-authority';
4
4
 
5
5
  declare const spinnerVariants: (props?: ({
6
6
  size?: "default" | "xs" | "sm" | "lg" | "xl" | null | undefined;
7
- tone?: "default" | "destructive" | "inherit" | "primary" | null | undefined;
7
+ tone?: "inherit" | "default" | "destructive" | "primary" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  declare const Spinner: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & VariantProps<(props?: ({
10
10
  size?: "default" | "xs" | "sm" | "lg" | "xl" | null | undefined;
11
- tone?: "default" | "destructive" | "inherit" | "primary" | null | undefined;
11
+ tone?: "inherit" | "default" | "destructive" | "primary" | null | undefined;
12
12
  } & class_variance_authority_types.ClassProp) | undefined) => string> & {
13
13
  /** Visually-hidden label for screen readers. Defaults to "Loading". */
14
14
  label?: string;
@@ -1,12 +1,38 @@
1
1
  import { cn } from '../chunk-FEK5XGZW.js';
2
- import { __objRest, __spreadValues, __spreadProps } from '../chunk-3GWWZKX7.js';
2
+ import { __spreadValues, __objRest, __spreadProps } from '../chunk-3GWWZKX7.js';
3
3
  import * as React from 'react';
4
4
  import * as TabsPrimitive from '@radix-ui/react-tabs';
5
- import { jsx } from 'react/jsx-runtime';
5
+ import { motion } from 'framer-motion';
6
+ import { jsx, jsxs } from 'react/jsx-runtime';
6
7
 
8
+ var springSnappy = {
9
+ type: "spring",
10
+ damping: 30,
11
+ stiffness: 380
12
+ };
13
+ var springSmooth = {
14
+ type: "spring",
15
+ damping: 30,
16
+ stiffness: 220
17
+ };
18
+ var springSoft = {
19
+ type: "spring",
20
+ damping: 35,
21
+ stiffness: 140
22
+ };
23
+ var archetype = {
24
+ /** Drawer / Sheet / Dialog entrance. Surface arrives first; content layers after. */
25
+ surfaceOpen: __spreadValues({}, springSmooth),
26
+ /** First-reveal stagger for card grids. Per-item spring. Cap stagger at 8 items. */
27
+ listReveal: __spreadValues({}, springSoft),
28
+ /** Bottom-sheet / side-drawer entry. */
29
+ edgeEnter: __spreadValues({}, springSmooth),
30
+ /** Active tab pill, active filter chip — use with Framer Motion `layoutId`. */
31
+ indicatorMorph: __spreadValues({}, springSnappy)};
7
32
  var TabsContext = React.createContext({
8
33
  variant: "pill",
9
- orientation: "horizontal"
34
+ orientation: "horizontal",
35
+ indicatorId: "tabs-indicator"
10
36
  });
11
37
  var Tabs = React.forwardRef((_a, ref) => {
12
38
  var _b = _a, { className, orientation = "horizontal" } = _b, props = __objRest(_b, ["className", "orientation"]);
@@ -29,7 +55,8 @@ var TabsList = React.forwardRef((_a, ref) => {
29
55
  var _b = _a, { className, variant = "pill", scrollable, children } = _b, props = __objRest(_b, ["className", "variant", "scrollable", "children"]);
30
56
  const orientation = props["aria-orientation"] === "vertical" ? "vertical" : "horizontal";
31
57
  const allowScroll = scrollable != null ? scrollable : orientation === "horizontal";
32
- return /* @__PURE__ */ jsx(TabsContext.Provider, { value: { variant, orientation }, children: /* @__PURE__ */ jsx(
58
+ const indicatorId = React.useId();
59
+ return /* @__PURE__ */ jsx(TabsContext.Provider, { value: { variant, orientation, indicatorId }, children: /* @__PURE__ */ jsx(
33
60
  TabsPrimitive.List,
34
61
  __spreadProps(__spreadValues({
35
62
  ref,
@@ -46,36 +73,90 @@ var TabsList = React.forwardRef((_a, ref) => {
46
73
  });
47
74
  TabsList.displayName = TabsPrimitive.List.displayName;
48
75
  var TabsTrigger = React.forwardRef((_a, ref) => {
49
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
50
- const { variant, orientation } = React.useContext(TabsContext);
51
- return /* @__PURE__ */ jsx(
76
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
77
+ const { variant, orientation, indicatorId } = React.useContext(TabsContext);
78
+ const triggerRef = React.useRef(null);
79
+ const [isActive, setIsActive] = React.useState(false);
80
+ React.useEffect(() => {
81
+ const node = triggerRef.current;
82
+ if (!node) return;
83
+ const sync = () => setIsActive(node.getAttribute("data-state") === "active");
84
+ sync();
85
+ const observer = new MutationObserver(sync);
86
+ observer.observe(node, { attributes: true, attributeFilter: ["data-state"] });
87
+ return () => observer.disconnect();
88
+ }, []);
89
+ const composedRef = React.useCallback(
90
+ (node) => {
91
+ triggerRef.current = node;
92
+ if (typeof ref === "function") ref(node);
93
+ else if (ref) ref.current = node;
94
+ },
95
+ [ref]
96
+ );
97
+ return /* @__PURE__ */ jsxs(
52
98
  TabsPrimitive.Trigger,
53
- __spreadValues({
54
- ref,
99
+ __spreadProps(__spreadValues({
100
+ ref: composedRef,
55
101
  "data-slot": "tabs-trigger",
56
102
  className: cn(
57
- "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
58
- variant === "pill" && "rounded-xl px-4 py-1.5 text-muted-foreground hover:text-foreground data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
59
- variant === "underline" && orientation === "horizontal" && "relative h-11 rounded-none border-b-2 border-transparent px-4 text-muted-foreground hover:text-foreground data-[state=active]:border-primary data-[state=active]:text-foreground",
60
- variant === "underline" && orientation === "vertical" && "relative rounded-none border-r-2 border-transparent px-4 py-2 -mr-px text-muted-foreground hover:text-foreground data-[state=active]:border-primary data-[state=active]:text-foreground justify-start",
103
+ "relative inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
104
+ variant === "pill" && "rounded-xl px-4 py-1.5 text-muted-foreground hover:text-foreground data-[state=active]:text-foreground",
105
+ variant === "underline" && orientation === "horizontal" && "h-11 rounded-none px-4 text-muted-foreground hover:text-foreground data-[state=active]:text-foreground",
106
+ variant === "underline" && orientation === "vertical" && "rounded-none px-4 py-2 -mr-px text-muted-foreground hover:text-foreground data-[state=active]:text-foreground justify-start",
61
107
  className
62
108
  )
63
- }, props)
109
+ }, props), {
110
+ children: [
111
+ isActive && /* @__PURE__ */ jsx(
112
+ motion.span,
113
+ {
114
+ "aria-hidden": true,
115
+ layoutId: indicatorId,
116
+ transition: archetype.indicatorMorph,
117
+ className: cn(
118
+ "absolute inset-0 -z-0 motion-reduce:hidden",
119
+ variant === "pill" && "rounded-xl bg-background shadow-sm",
120
+ variant === "underline" && orientation === "horizontal" && "border-b-2 border-primary",
121
+ variant === "underline" && orientation === "vertical" && "border-r-2 border-primary"
122
+ )
123
+ }
124
+ ),
125
+ isActive && /* @__PURE__ */ jsx(
126
+ "span",
127
+ {
128
+ "aria-hidden": true,
129
+ className: cn(
130
+ "absolute inset-0 -z-0 hidden motion-reduce:block",
131
+ variant === "pill" && "rounded-xl bg-background shadow-sm",
132
+ variant === "underline" && orientation === "horizontal" && "border-b-2 border-primary",
133
+ variant === "underline" && orientation === "vertical" && "border-r-2 border-primary"
134
+ )
135
+ }
136
+ ),
137
+ /* @__PURE__ */ jsx("span", { className: "relative z-10 flex items-center gap-2", children })
138
+ ]
139
+ })
64
140
  );
65
141
  });
66
142
  TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
67
143
  var TabsContent = React.forwardRef((_a, ref) => {
68
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
144
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
69
145
  return /* @__PURE__ */ jsx(
70
146
  TabsPrimitive.Content,
71
- __spreadValues({
147
+ __spreadProps(__spreadValues({
72
148
  ref,
73
149
  "data-slot": "tabs-content",
74
150
  className: cn(
75
151
  "flex-1 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-md",
152
+ // v1.0 motion: content-swap on activation. CSS animation so this works
153
+ // even outside a Framer-Motion-wrapped layout. Disabled for reduced-motion.
154
+ "data-[state=active]:animate-in data-[state=active]:fade-in-0 data-[state=active]:slide-in-from-bottom-1 data-[state=active]:duration-[var(--duration-quick)] data-[state=active]:ease-[var(--ease-standard)] motion-reduce:data-[state=active]:animate-none",
76
155
  className
77
156
  )
78
- }, props)
157
+ }, props), {
158
+ children
159
+ })
79
160
  );
80
161
  });
81
162
  TabsContent.displayName = TabsPrimitive.Content.displayName;
@@ -3,11 +3,11 @@ import * as React from 'react';
3
3
  import { VariantProps } from 'class-variance-authority';
4
4
 
5
5
  declare const tagVariants: (props?: ({
6
- variant?: "default" | "destructive" | "warning" | "success" | "primary" | "outline" | null | undefined;
6
+ variant?: "default" | "destructive" | "outline" | "success" | "warning" | "primary" | null | undefined;
7
7
  size?: "default" | "sm" | "lg" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  declare const Tag: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & VariantProps<(props?: ({
10
- variant?: "default" | "destructive" | "warning" | "success" | "primary" | "outline" | null | undefined;
10
+ variant?: "default" | "destructive" | "outline" | "success" | "warning" | "primary" | null | undefined;
11
11
  size?: "default" | "sm" | "lg" | null | undefined;
12
12
  } & class_variance_authority_types.ClassProp) | undefined) => string> & {
13
13
  onRemove?: () => void;
@@ -1,61 +1,3 @@
1
- import { cn } from '../chunk-FEK5XGZW.js';
2
- import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
3
- import * as React from 'react';
4
- import { X } from 'lucide-react';
5
- import { cva } from 'class-variance-authority';
6
- import { jsxs, jsx } from 'react/jsx-runtime';
7
-
8
- var tagVariants = cva(
9
- "inline-flex items-center gap-1 rounded-full border text-xs font-medium transition-colors",
10
- {
11
- variants: {
12
- variant: {
13
- default: "border-border bg-muted text-foreground",
14
- primary: "border-primary/30 bg-primary/10 text-primary",
15
- success: "border-success/30 bg-success/10 text-success",
16
- warning: "border-warning/30 bg-warning/10 text-warning",
17
- destructive: "border-destructive/30 bg-destructive/10 text-destructive",
18
- outline: "border-border bg-transparent text-foreground"
19
- },
20
- size: {
21
- sm: "h-5 px-2 text-[10px]",
22
- default: "h-6 px-2.5",
23
- lg: "h-7 px-3 text-sm"
24
- }
25
- },
26
- defaultVariants: {
27
- variant: "default",
28
- size: "default"
29
- }
30
- }
31
- );
32
- var Tag = React.forwardRef(
33
- (_a, ref) => {
34
- var _b = _a, { className, variant, size, onRemove, removeLabel = "Remove", children } = _b, props = __objRest(_b, ["className", "variant", "size", "onRemove", "removeLabel", "children"]);
35
- return /* @__PURE__ */ jsxs(
36
- "span",
37
- __spreadProps(__spreadValues({
38
- ref,
39
- "data-slot": "tag",
40
- className: cn(tagVariants({ variant, size }), className)
41
- }, props), {
42
- children: [
43
- children,
44
- onRemove && /* @__PURE__ */ jsx(
45
- "button",
46
- {
47
- type: "button",
48
- "aria-label": removeLabel,
49
- onClick: onRemove,
50
- className: "-mr-0.5 inline-flex size-3.5 items-center justify-center rounded-full transition-colors hover:bg-foreground/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
51
- children: /* @__PURE__ */ jsx(X, { className: "size-3" })
52
- }
53
- )
54
- ]
55
- })
56
- );
57
- }
58
- );
59
- Tag.displayName = "Tag";
60
-
61
- export { Tag, tagVariants };
1
+ export { Tag, tagVariants } from '../chunk-YLNYXPIH.js';
2
+ import '../chunk-FEK5XGZW.js';
3
+ import '../chunk-3GWWZKX7.js';
@@ -4,9 +4,9 @@ import * as React from 'react';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
 
6
6
  declare const textVariants: (props?: ({
7
- variant?: "small" | "display" | "h1" | "h2" | "h3" | "h4" | "body-lg" | "body" | "body-sm" | "caption" | "label" | "overline" | null | undefined;
8
- color?: "default" | "destructive" | "inherit" | "muted" | "primary" | "primary-foreground" | null | undefined;
9
- weight?: "bold" | "normal" | "medium" | "semibold" | null | undefined;
7
+ variant?: "h2" | "h3" | "label" | "body" | "caption" | "h1" | "h4" | "small" | "display" | "body-lg" | "body-sm" | "overline" | null | undefined;
8
+ color?: "inherit" | "default" | "destructive" | "muted" | "primary" | "primary-foreground" | null | undefined;
9
+ weight?: "bold" | "medium" | "normal" | "semibold" | null | undefined;
10
10
  leading?: "none" | "normal" | "tight" | "snug" | "relaxed" | "loose" | null | undefined;
11
11
  tracking?: "normal" | "tight" | "wide" | "wider" | null | undefined;
12
12
  wrap?: "balance" | "pretty" | "nowrap" | null | undefined;
@@ -1,3 +1,3 @@
1
- export { Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport } from '../chunk-7PPCH42H.js';
1
+ export { Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport } from '../chunk-VQNDZVI7.js';
2
2
  import '../chunk-FEK5XGZW.js';
3
3
  import '../chunk-3GWWZKX7.js';
@@ -1,5 +1,5 @@
1
1
  import { useToast } from '../chunk-EBAMCZDW.js';
2
- import { ToastProvider, Toast, ToastTitle, ToastDescription, ToastClose, ToastViewport } from '../chunk-7PPCH42H.js';
2
+ import { ToastProvider, Toast, ToastTitle, ToastDescription, ToastClose, ToastViewport } from '../chunk-VQNDZVI7.js';
3
3
  import '../chunk-FEK5XGZW.js';
4
4
  import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';