@graundtech/fluent2-react-kit 0.5.1

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 (98) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +69 -0
  3. package/dist/components/ui/accordion.d.ts +133 -0
  4. package/dist/components/ui/accordion.js +80 -0
  5. package/dist/components/ui/accordion.js.map +1 -0
  6. package/dist/components/ui/alert.d.ts +106 -0
  7. package/dist/components/ui/alert.js +73 -0
  8. package/dist/components/ui/alert.js.map +1 -0
  9. package/dist/components/ui/avatar.d.ts +42 -0
  10. package/dist/components/ui/avatar.js +55 -0
  11. package/dist/components/ui/avatar.js.map +1 -0
  12. package/dist/components/ui/badge.d.ts +36 -0
  13. package/dist/components/ui/badge.js +81 -0
  14. package/dist/components/ui/badge.js.map +1 -0
  15. package/dist/components/ui/breadcrumb.d.ts +53 -0
  16. package/dist/components/ui/breadcrumb.js +149 -0
  17. package/dist/components/ui/breadcrumb.js.map +1 -0
  18. package/dist/components/ui/button.d.ts +24 -0
  19. package/dist/components/ui/button.js +86 -0
  20. package/dist/components/ui/button.js.map +1 -0
  21. package/dist/components/ui/card.d.ts +51 -0
  22. package/dist/components/ui/card.js +97 -0
  23. package/dist/components/ui/card.js.map +1 -0
  24. package/dist/components/ui/checkbox.d.ts +101 -0
  25. package/dist/components/ui/checkbox.js +57 -0
  26. package/dist/components/ui/checkbox.js.map +1 -0
  27. package/dist/components/ui/combobox.d.ts +212 -0
  28. package/dist/components/ui/combobox.js +236 -0
  29. package/dist/components/ui/combobox.js.map +1 -0
  30. package/dist/components/ui/command.d.ts +187 -0
  31. package/dist/components/ui/command.js +225 -0
  32. package/dist/components/ui/command.js.map +1 -0
  33. package/dist/components/ui/dialog.d.ts +117 -0
  34. package/dist/components/ui/dialog.js +165 -0
  35. package/dist/components/ui/dialog.js.map +1 -0
  36. package/dist/components/ui/dropdown-menu.d.ts +155 -0
  37. package/dist/components/ui/dropdown-menu.js +295 -0
  38. package/dist/components/ui/dropdown-menu.js.map +1 -0
  39. package/dist/components/ui/input.d.ts +44 -0
  40. package/dist/components/ui/input.js +43 -0
  41. package/dist/components/ui/input.js.map +1 -0
  42. package/dist/components/ui/label.d.ts +39 -0
  43. package/dist/components/ui/label.js +30 -0
  44. package/dist/components/ui/label.js.map +1 -0
  45. package/dist/components/ui/link.d.ts +62 -0
  46. package/dist/components/ui/link.js +61 -0
  47. package/dist/components/ui/link.js.map +1 -0
  48. package/dist/components/ui/multi-select.d.ts +115 -0
  49. package/dist/components/ui/multi-select.js +133 -0
  50. package/dist/components/ui/multi-select.js.map +1 -0
  51. package/dist/components/ui/pagination.d.ts +46 -0
  52. package/dist/components/ui/pagination.js +164 -0
  53. package/dist/components/ui/pagination.js.map +1 -0
  54. package/dist/components/ui/popover.d.ts +117 -0
  55. package/dist/components/ui/popover.js +62 -0
  56. package/dist/components/ui/popover.js.map +1 -0
  57. package/dist/components/ui/progress.d.ts +98 -0
  58. package/dist/components/ui/progress.js +67 -0
  59. package/dist/components/ui/progress.js.map +1 -0
  60. package/dist/components/ui/radio-group.d.ts +94 -0
  61. package/dist/components/ui/radio-group.js +65 -0
  62. package/dist/components/ui/radio-group.js.map +1 -0
  63. package/dist/components/ui/select.d.ts +145 -0
  64. package/dist/components/ui/select.js +240 -0
  65. package/dist/components/ui/select.js.map +1 -0
  66. package/dist/components/ui/separator.d.ts +43 -0
  67. package/dist/components/ui/separator.js +27 -0
  68. package/dist/components/ui/separator.js.map +1 -0
  69. package/dist/components/ui/skeleton.d.ts +81 -0
  70. package/dist/components/ui/skeleton.js +24 -0
  71. package/dist/components/ui/skeleton.js.map +1 -0
  72. package/dist/components/ui/spinner.d.ts +56 -0
  73. package/dist/components/ui/spinner.js +83 -0
  74. package/dist/components/ui/spinner.js.map +1 -0
  75. package/dist/components/ui/switch.d.ts +60 -0
  76. package/dist/components/ui/switch.js +63 -0
  77. package/dist/components/ui/switch.js.map +1 -0
  78. package/dist/components/ui/tabs.d.ts +107 -0
  79. package/dist/components/ui/tabs.js +102 -0
  80. package/dist/components/ui/tabs.js.map +1 -0
  81. package/dist/components/ui/textarea.d.ts +28 -0
  82. package/dist/components/ui/textarea.js +36 -0
  83. package/dist/components/ui/textarea.js.map +1 -0
  84. package/dist/components/ui/toast.d.ts +185 -0
  85. package/dist/components/ui/toast.js +181 -0
  86. package/dist/components/ui/toast.js.map +1 -0
  87. package/dist/components/ui/tooltip.d.ts +115 -0
  88. package/dist/components/ui/tooltip.js +72 -0
  89. package/dist/components/ui/tooltip.js.map +1 -0
  90. package/dist/index.d.ts +55 -0
  91. package/dist/index.js +284 -0
  92. package/dist/index.js.map +1 -0
  93. package/dist/lib/utils.d.ts +9 -0
  94. package/dist/lib/utils.js +9 -0
  95. package/dist/lib/utils.js.map +1 -0
  96. package/package.json +77 -0
  97. package/src/styles/tokens.css +596 -0
  98. package/src/styles/tokens.test.ts +216 -0
@@ -0,0 +1,115 @@
1
+ import * as react from 'react';
2
+ import { ComponentProps } from 'react';
3
+ import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
4
+
5
+ /**
6
+ * Tooltip — Fluent 2-styled, shadcn-API tooltip.
7
+ *
8
+ * Behavior — hover/focus delay, portalling, collision-aware positioning,
9
+ * dismiss-on-Escape — genuinely needs a primitive (conventions §9), so the
10
+ * parts wrap `@base-ui/react/tooltip` (namespace import, matching the actual
11
+ * export shape in node_modules, exactly like `select.tsx`/`avatar.tsx`).
12
+ * `select.tsx`'s doc comment calls out Tooltip by name as inheriting its
13
+ * portal → positioner → popup pattern; this file is that follow-through.
14
+ *
15
+ * ## Base UI mapping (conventions §9)
16
+ *
17
+ * | Exported (shadcn name) | Base UI primitive |
18
+ * | ----------------------- | ---------------------------------------------------- |
19
+ * | `TooltipProvider` | `Tooltip.Provider` |
20
+ * | `Tooltip` | `Tooltip.Root` |
21
+ * | `TooltipTrigger` | `Tooltip.Trigger` |
22
+ * | `TooltipContent` | `Tooltip.Portal` + `Tooltip.Positioner` + `Tooltip.Popup` |
23
+ *
24
+ * ## Divergences from the shadcn/Radix Tooltip API (all deliberate)
25
+ * 1. **Neutral elevated surface, not an inverted brand bubble.** shadcn's
26
+ * tooltip is `bg-primary text-primary-foreground` — a dark, high-contrast
27
+ * chip. Fluent 2 tooltips are a **neutral flyout**, visually the same family
28
+ * as `SelectContent`/menus: `bg-popover text-popover-foreground`, a hairline
29
+ * `border`, and `shadow-16` elevation, just smaller (`text-xs`,
30
+ * `px-2.5 py-1.5`, `max-w-60`). This is the headline visual departure from
31
+ * shadcn for this component — everything else follows shadcn's API shape.
32
+ * 2. **No arrow/beak by default.** Base UI ships `Tooltip.Arrow`, but Fluent 2's
33
+ * tooltip is a plain floating rectangle with no pointer back to the trigger.
34
+ * `TooltipContent` does not render one and `TooltipArrow` is intentionally
35
+ * not re-exported; a consumer who wants Radix/shadcn's pointer can compose
36
+ * `@base-ui/react/tooltip`'s `Arrow` part directly alongside this component.
37
+ * 3. **Composition uses Base UI's `render` prop, not `asChild`.**
38
+ * `Tooltip.Trigger` renders its own `<button>` (Base UI's model — there is no
39
+ * Slot-style boolean). `TooltipTrigger`'s props type (`TooltipPrimitive.
40
+ * Trigger.Props` — used directly rather than `ComponentProps<typeof
41
+ * TooltipPrimitive.Trigger>`, which loses the `ref` type through Base UI's
42
+ * generic `<Payload>` call signature) already includes Base UI's `render`
43
+ * prop, so no extra plumbing is needed to point the trigger at another
44
+ * element (e.g. the kit's `Button`):
45
+ * `<TooltipTrigger render={<Button variant="outline">Hover me</Button>} />`.
46
+ * This is the direct Base UI analogue of shadcn's
47
+ * `<TooltipTrigger asChild><Button /></TooltipTrigger>`.
48
+ * 4. **`TooltipProvider` defaults `delay` to 600ms**, matching
49
+ * `Tooltip.Trigger`'s own built-in default — set explicitly here so the hover
50
+ * delay is documented and overridable in one obvious place
51
+ * (`<TooltipProvider delay={0}>` for instant-open test/demo scenarios). The
52
+ * Provider's actual job is *grouping*: once one tooltip in the tree has
53
+ * opened, sibling tooltips opened within `timeout` (Base UI default 400ms)
54
+ * skip their own delay and open instantly — useful for a toolbar of
55
+ * icon buttons. A `<Tooltip>` used outside any `<TooltipProvider>` still
56
+ * works (Base UI's trigger-level 600ms default applies), the Provider is
57
+ * only required for the grouping behavior and for tests that want `delay={0}`.
58
+ * 5. **`Tooltip.Viewport` is not exposed.** It exists to animate content
59
+ * swapping when multiple triggers share a single tooltip instance — a
60
+ * pattern this kit's simple per-trigger API doesn't use. Out of scope for
61
+ * this pass; compose it directly from `@base-ui/react/tooltip` if needed.
62
+ * 6. **`TooltipContent` sets `role="tooltip"`; `aria-describedby` is a documented
63
+ * recipe, not automatic wiring.** Confirmed against Base UI's own docs
64
+ * (base-ui.com/react/components/tooltip): unlike Radix, Base UI's Tooltip
65
+ * is explicitly "visual-only" — it does **not** set `role="tooltip"` on the
66
+ * popup or `aria-describedby` on the trigger, and its own guidance is to
67
+ * give the trigger an `aria-label` instead ("the tooltip's trigger must
68
+ * have an `aria-label` attribute that closely matches the tooltip's
69
+ * content"). This wrapper closes the first, cheap half of that gap itself
70
+ * — `TooltipContent`'s `Popup` always carries `role="tooltip"` (a bare
71
+ * `<div>` otherwise has no accessible role at all) — but does not
72
+ * synthesize `aria-describedby` linkage, which would require id-sharing
73
+ * plumbing (context + `useState`/`useId`) between `TooltipTrigger` and
74
+ * `TooltipContent` that Base UI does not expose and that would force
75
+ * `"use client"` on this otherwise-server-safe wrapper (§2). Consumers who
76
+ * need the description programmatically associated (beyond an `aria-label`
77
+ * on the trigger) can wire it manually, the same way `select.tsx`
78
+ * documents its `aria-labelledby` labeling recipe: give `TooltipContent`
79
+ * an `id` and pass that same value as `aria-describedby` on
80
+ * `TooltipTrigger`. `tooltip.test.tsx` has a test exercising this recipe.
81
+ *
82
+ * ## `"use client"` — intentionally omitted
83
+ * Every Base UI Tooltip part module (`Root`, `Trigger`, `Portal`, `Positioner`,
84
+ * `Popup`, `Provider`) carries its own `'use client'` directive at the source
85
+ * level (verified in the compiled package output, same check as `avatar.tsx`).
86
+ * This wrapper imports no icons (`@fluentui/react-icons`, which *would* force
87
+ * the directive per conventions §9 — see `select.tsx`) and defines no
88
+ * hooks/handlers of its own; it only forwards props into already-client parts.
89
+ * So it stays a plain, server-renderable module: a Server Component tree can
90
+ * render these client children directly without the parent re-declaring the
91
+ * directive. Confirmed via `pnpm typecheck` + the test suite.
92
+ *
93
+ * ## data-slot note
94
+ * `Tooltip` (Root) and `TooltipProvider` render no DOM element of their own
95
+ * (Root groups state; Provider is a pair of context providers), so neither
96
+ * carries a `data-slot`. Every part that renders an element does —
97
+ * `tooltip-trigger`, `tooltip-positioner`, `tooltip-content` — which is what
98
+ * tests/consumers hook onto.
99
+ */
100
+ declare function TooltipProvider({ delay, ...props }: ComponentProps<typeof Tooltip$1.Provider>): react.JSX.Element;
101
+ declare function Tooltip(props: Tooltip$1.Root.Props): react.JSX.Element;
102
+ declare function TooltipTrigger({ className, ...props }: Tooltip$1.Trigger.Props): react.JSX.Element;
103
+ /**
104
+ * Content — the floating surface: `Portal` → `Positioner` → `Popup`. Fluent
105
+ * flyout look (divergence 1): `bg-popover` + `border` + `shadow-16`,
106
+ * `rounded-md`, small type (`text-xs`), compact padding, capped width
107
+ * (`max-w-60`) so long copy wraps instead of stretching edge to edge. A
108
+ * subtle scale+fade open/close animation rides Base UI's
109
+ * `data-starting-style`/`data-ending-style` hooks with token durations/easings
110
+ * (same recipe as `SelectContent`). Carries `role="tooltip"` (divergence 6)
111
+ * since Base UI's raw `Popup` has no accessible role of its own.
112
+ */
113
+ declare function TooltipContent({ className, children, sideOffset, side, align, ...props }: ComponentProps<typeof Tooltip$1.Popup> & Pick<ComponentProps<typeof Tooltip$1.Positioner>, "side" | "align" | "sideOffset">): react.JSX.Element;
114
+
115
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
@@ -0,0 +1,72 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
3
+ import { cn } from "../../lib/utils.js";
4
+ function TooltipProvider({
5
+ delay = 600,
6
+ ...props
7
+ }) {
8
+ return /* @__PURE__ */ jsx(TooltipPrimitive.Provider, { delay, ...props });
9
+ }
10
+ function Tooltip(props) {
11
+ return /* @__PURE__ */ jsx(TooltipPrimitive.Root, { ...props });
12
+ }
13
+ function TooltipTrigger({
14
+ className,
15
+ ...props
16
+ }) {
17
+ return /* @__PURE__ */ jsx(
18
+ TooltipPrimitive.Trigger,
19
+ {
20
+ "data-slot": "tooltip-trigger",
21
+ className: cn(className),
22
+ ...props
23
+ }
24
+ );
25
+ }
26
+ function TooltipContent({
27
+ className,
28
+ children,
29
+ sideOffset = 4,
30
+ side = "top",
31
+ align = "center",
32
+ ...props
33
+ }) {
34
+ return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(
35
+ TooltipPrimitive.Positioner,
36
+ {
37
+ "data-slot": "tooltip-positioner",
38
+ sideOffset,
39
+ side,
40
+ align,
41
+ className: "z-50 outline-none",
42
+ children: /* @__PURE__ */ jsx(
43
+ TooltipPrimitive.Popup,
44
+ {
45
+ "data-slot": "tooltip-content",
46
+ role: "tooltip",
47
+ className: cn(
48
+ // Borderless by spec: Fluent's tooltip stroke is TransparentStroke
49
+ // (edge defined by elevation alone) and its elevation tier is
50
+ // Shadow 08, one step below flyouts (Figma validation pass 2,
51
+ // node 9014:2662). px-3 = Fluent spacingHorizontalM (12px).
52
+ "relative max-w-60 origin-[var(--transform-origin)] text-balance rounded-md bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-8 outline-none",
53
+ // motion — subtle scale + fade on open (enter) / close (exit)
54
+ "transition-[opacity,scale] duration-fast ease-decelerate-mid",
55
+ "data-starting-style:scale-95 data-starting-style:opacity-0",
56
+ "data-ending-style:scale-95 data-ending-style:opacity-0 data-ending-style:ease-accelerate-mid",
57
+ className
58
+ ),
59
+ ...props,
60
+ children
61
+ }
62
+ )
63
+ }
64
+ ) });
65
+ }
66
+ export {
67
+ Tooltip,
68
+ TooltipContent,
69
+ TooltipProvider,
70
+ TooltipTrigger
71
+ };
72
+ //# sourceMappingURL=tooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/ui/tooltip.tsx"],"sourcesContent":["import { Tooltip as TooltipPrimitive } from \"@base-ui/react/tooltip\";\nimport type { ComponentProps } from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\n/**\n * Tooltip — Fluent 2-styled, shadcn-API tooltip.\n *\n * Behavior — hover/focus delay, portalling, collision-aware positioning,\n * dismiss-on-Escape — genuinely needs a primitive (conventions §9), so the\n * parts wrap `@base-ui/react/tooltip` (namespace import, matching the actual\n * export shape in node_modules, exactly like `select.tsx`/`avatar.tsx`).\n * `select.tsx`'s doc comment calls out Tooltip by name as inheriting its\n * portal → positioner → popup pattern; this file is that follow-through.\n *\n * ## Base UI mapping (conventions §9)\n *\n * | Exported (shadcn name) | Base UI primitive |\n * | ----------------------- | ---------------------------------------------------- |\n * | `TooltipProvider` | `Tooltip.Provider` |\n * | `Tooltip` | `Tooltip.Root` |\n * | `TooltipTrigger` | `Tooltip.Trigger` |\n * | `TooltipContent` | `Tooltip.Portal` + `Tooltip.Positioner` + `Tooltip.Popup` |\n *\n * ## Divergences from the shadcn/Radix Tooltip API (all deliberate)\n * 1. **Neutral elevated surface, not an inverted brand bubble.** shadcn's\n * tooltip is `bg-primary text-primary-foreground` — a dark, high-contrast\n * chip. Fluent 2 tooltips are a **neutral flyout**, visually the same family\n * as `SelectContent`/menus: `bg-popover text-popover-foreground`, a hairline\n * `border`, and `shadow-16` elevation, just smaller (`text-xs`,\n * `px-2.5 py-1.5`, `max-w-60`). This is the headline visual departure from\n * shadcn for this component — everything else follows shadcn's API shape.\n * 2. **No arrow/beak by default.** Base UI ships `Tooltip.Arrow`, but Fluent 2's\n * tooltip is a plain floating rectangle with no pointer back to the trigger.\n * `TooltipContent` does not render one and `TooltipArrow` is intentionally\n * not re-exported; a consumer who wants Radix/shadcn's pointer can compose\n * `@base-ui/react/tooltip`'s `Arrow` part directly alongside this component.\n * 3. **Composition uses Base UI's `render` prop, not `asChild`.**\n * `Tooltip.Trigger` renders its own `<button>` (Base UI's model — there is no\n * Slot-style boolean). `TooltipTrigger`'s props type (`TooltipPrimitive.\n * Trigger.Props` — used directly rather than `ComponentProps<typeof\n * TooltipPrimitive.Trigger>`, which loses the `ref` type through Base UI's\n * generic `<Payload>` call signature) already includes Base UI's `render`\n * prop, so no extra plumbing is needed to point the trigger at another\n * element (e.g. the kit's `Button`):\n * `<TooltipTrigger render={<Button variant=\"outline\">Hover me</Button>} />`.\n * This is the direct Base UI analogue of shadcn's\n * `<TooltipTrigger asChild><Button /></TooltipTrigger>`.\n * 4. **`TooltipProvider` defaults `delay` to 600ms**, matching\n * `Tooltip.Trigger`'s own built-in default — set explicitly here so the hover\n * delay is documented and overridable in one obvious place\n * (`<TooltipProvider delay={0}>` for instant-open test/demo scenarios). The\n * Provider's actual job is *grouping*: once one tooltip in the tree has\n * opened, sibling tooltips opened within `timeout` (Base UI default 400ms)\n * skip their own delay and open instantly — useful for a toolbar of\n * icon buttons. A `<Tooltip>` used outside any `<TooltipProvider>` still\n * works (Base UI's trigger-level 600ms default applies), the Provider is\n * only required for the grouping behavior and for tests that want `delay={0}`.\n * 5. **`Tooltip.Viewport` is not exposed.** It exists to animate content\n * swapping when multiple triggers share a single tooltip instance — a\n * pattern this kit's simple per-trigger API doesn't use. Out of scope for\n * this pass; compose it directly from `@base-ui/react/tooltip` if needed.\n * 6. **`TooltipContent` sets `role=\"tooltip\"`; `aria-describedby` is a documented\n * recipe, not automatic wiring.** Confirmed against Base UI's own docs\n * (base-ui.com/react/components/tooltip): unlike Radix, Base UI's Tooltip\n * is explicitly \"visual-only\" — it does **not** set `role=\"tooltip\"` on the\n * popup or `aria-describedby` on the trigger, and its own guidance is to\n * give the trigger an `aria-label` instead (\"the tooltip's trigger must\n * have an `aria-label` attribute that closely matches the tooltip's\n * content\"). This wrapper closes the first, cheap half of that gap itself\n * — `TooltipContent`'s `Popup` always carries `role=\"tooltip\"` (a bare\n * `<div>` otherwise has no accessible role at all) — but does not\n * synthesize `aria-describedby` linkage, which would require id-sharing\n * plumbing (context + `useState`/`useId`) between `TooltipTrigger` and\n * `TooltipContent` that Base UI does not expose and that would force\n * `\"use client\"` on this otherwise-server-safe wrapper (§2). Consumers who\n * need the description programmatically associated (beyond an `aria-label`\n * on the trigger) can wire it manually, the same way `select.tsx`\n * documents its `aria-labelledby` labeling recipe: give `TooltipContent`\n * an `id` and pass that same value as `aria-describedby` on\n * `TooltipTrigger`. `tooltip.test.tsx` has a test exercising this recipe.\n *\n * ## `\"use client\"` — intentionally omitted\n * Every Base UI Tooltip part module (`Root`, `Trigger`, `Portal`, `Positioner`,\n * `Popup`, `Provider`) carries its own `'use client'` directive at the source\n * level (verified in the compiled package output, same check as `avatar.tsx`).\n * This wrapper imports no icons (`@fluentui/react-icons`, which *would* force\n * the directive per conventions §9 — see `select.tsx`) and defines no\n * hooks/handlers of its own; it only forwards props into already-client parts.\n * So it stays a plain, server-renderable module: a Server Component tree can\n * render these client children directly without the parent re-declaring the\n * directive. Confirmed via `pnpm typecheck` + the test suite.\n *\n * ## data-slot note\n * `Tooltip` (Root) and `TooltipProvider` render no DOM element of their own\n * (Root groups state; Provider is a pair of context providers), so neither\n * carries a `data-slot`. Every part that renders an element does —\n * `tooltip-trigger`, `tooltip-positioner`, `tooltip-content` — which is what\n * tests/consumers hook onto.\n */\n\nfunction TooltipProvider({\n delay = 600,\n ...props\n}: ComponentProps<typeof TooltipPrimitive.Provider>) {\n return <TooltipPrimitive.Provider delay={delay} {...props} />;\n}\n\nfunction Tooltip(props: TooltipPrimitive.Root.Props) {\n return <TooltipPrimitive.Root {...props} />;\n}\n\nfunction TooltipTrigger({\n className,\n ...props\n}: TooltipPrimitive.Trigger.Props) {\n return (\n <TooltipPrimitive.Trigger\n data-slot=\"tooltip-trigger\"\n className={cn(className)}\n {...props}\n />\n );\n}\n\n/**\n * Content — the floating surface: `Portal` → `Positioner` → `Popup`. Fluent\n * flyout look (divergence 1): `bg-popover` + `border` + `shadow-16`,\n * `rounded-md`, small type (`text-xs`), compact padding, capped width\n * (`max-w-60`) so long copy wraps instead of stretching edge to edge. A\n * subtle scale+fade open/close animation rides Base UI's\n * `data-starting-style`/`data-ending-style` hooks with token durations/easings\n * (same recipe as `SelectContent`). Carries `role=\"tooltip\"` (divergence 6)\n * since Base UI's raw `Popup` has no accessible role of its own.\n */\nfunction TooltipContent({\n className,\n children,\n sideOffset = 4,\n side = \"top\",\n align = \"center\",\n ...props\n}: ComponentProps<typeof TooltipPrimitive.Popup> &\n Pick<\n ComponentProps<typeof TooltipPrimitive.Positioner>,\n \"side\" | \"align\" | \"sideOffset\"\n >) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Positioner\n data-slot=\"tooltip-positioner\"\n sideOffset={sideOffset}\n side={side}\n align={align}\n className=\"z-50 outline-none\"\n >\n <TooltipPrimitive.Popup\n data-slot=\"tooltip-content\"\n role=\"tooltip\"\n className={cn(\n // Borderless by spec: Fluent's tooltip stroke is TransparentStroke\n // (edge defined by elevation alone) and its elevation tier is\n // Shadow 08, one step below flyouts (Figma validation pass 2,\n // node 9014:2662). px-3 = Fluent spacingHorizontalM (12px).\n \"relative max-w-60 origin-[var(--transform-origin)] text-balance rounded-md bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-8 outline-none\",\n // motion — subtle scale + fade on open (enter) / close (exit)\n \"transition-[opacity,scale] duration-fast ease-decelerate-mid\",\n \"data-starting-style:scale-95 data-starting-style:opacity-0\",\n \"data-ending-style:scale-95 data-ending-style:opacity-0 data-ending-style:ease-accelerate-mid\",\n className\n )}\n {...props}\n >\n {children}\n </TooltipPrimitive.Popup>\n </TooltipPrimitive.Positioner>\n </TooltipPrimitive.Portal>\n );\n}\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };\n"],"mappings":"AAyGS;AAzGT,SAAS,WAAW,wBAAwB;AAG5C,SAAS,UAAU;AAkGnB,SAAS,gBAAgB;AAAA,EACvB,QAAQ;AAAA,EACR,GAAG;AACL,GAAqD;AACnD,SAAO,oBAAC,iBAAiB,UAAjB,EAA0B,OAAe,GAAG,OAAO;AAC7D;AAEA,SAAS,QAAQ,OAAoC;AACnD,SAAO,oBAAC,iBAAiB,MAAjB,EAAuB,GAAG,OAAO;AAC3C;AAEA,SAAS,eAAe;AAAA,EACtB;AAAA,EACA,GAAG;AACL,GAAmC;AACjC,SACE;AAAA,IAAC,iBAAiB;AAAA,IAAjB;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,SAAS;AAAA,MACtB,GAAG;AAAA;AAAA,EACN;AAEJ;AAYA,SAAS,eAAe;AAAA,EACtB;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,GAAG;AACL,GAIK;AACH,SACE,oBAAC,iBAAiB,QAAjB,EACC;AAAA,IAAC,iBAAiB;AAAA,IAAjB;AAAA,MACC,aAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAU;AAAA,MAEV;AAAA,QAAC,iBAAiB;AAAA,QAAjB;AAAA,UACC,aAAU;AAAA,UACV,MAAK;AAAA,UACL,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA,YAKT;AAAA;AAAA,YAEA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,UACF;AAAA,UACC,GAAG;AAAA,UAEH;AAAA;AAAA,MACH;AAAA;AAAA,EACF,GACF;AAEJ;","names":[]}
@@ -0,0 +1,55 @@
1
+ export { cn } from './lib/utils.js';
2
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './components/ui/accordion.js';
3
+ export { Alert, AlertDescription, AlertTitle, alertVariants } from './components/ui/alert.js';
4
+ export { Avatar, AvatarFallback, AvatarImage } from './components/ui/avatar.js';
5
+ export { Badge, badgeVariants } from './components/ui/badge.js';
6
+ export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from './components/ui/breadcrumb.js';
7
+ export { Button, buttonVariants } from './components/ui/button.js';
8
+ export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './components/ui/card.js';
9
+ export { Checkbox } from './components/ui/checkbox.js';
10
+ export { Combobox, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxValue } from './components/ui/combobox.js';
11
+ export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut } from './components/ui/command.js';
12
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from './components/ui/dialog.js';
13
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from './components/ui/dropdown-menu.js';
14
+ export { Input } from './components/ui/input.js';
15
+ export { Label } from './components/ui/label.js';
16
+ export { Link, linkVariants } from './components/ui/link.js';
17
+ export { MultiSelect, MultiSelectChip, MultiSelectContent, MultiSelectEmpty, MultiSelectGroup, MultiSelectInput, MultiSelectItem, MultiSelectLabel, MultiSelectList, MultiSelectSeparator } from './components/ui/multi-select.js';
18
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from './components/ui/pagination.js';
19
+ export { Popover, PopoverContent, PopoverTrigger } from './components/ui/popover.js';
20
+ export { Progress } from './components/ui/progress.js';
21
+ export { RadioGroup, RadioGroupItem } from './components/ui/radio-group.js';
22
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from './components/ui/select.js';
23
+ export { Separator } from './components/ui/separator.js';
24
+ export { Skeleton } from './components/ui/skeleton.js';
25
+ export { Spinner, spinnerVariants } from './components/ui/spinner.js';
26
+ export { Switch } from './components/ui/switch.js';
27
+ export { Tabs, TabsContent, TabsList, TabsTrigger } from './components/ui/tabs.js';
28
+ export { Textarea } from './components/ui/textarea.js';
29
+ export { Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, createToastManager, toastVariants, useToast } from './components/ui/toast.js';
30
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './components/ui/tooltip.js';
31
+ import 'clsx';
32
+ import 'react';
33
+ import '@base-ui/react/accordion';
34
+ import 'class-variance-authority/types';
35
+ import 'class-variance-authority';
36
+ import '@base-ui/react/avatar';
37
+ import '@base-ui/react/checkbox';
38
+ import '@base-ui/react/combobox';
39
+ import '@base-ui/react/autocomplete';
40
+ import '@base-ui/react/dialog';
41
+ import '@base-ui/react/menu';
42
+ import '@base-ui/react/popover';
43
+ import '@base-ui/react/progress';
44
+ import '@base-ui/react/radio';
45
+ import '@base-ui/react/radio-group';
46
+ import '@base-ui/react/select';
47
+ import '@base-ui/react/switch';
48
+ import '@base-ui/react/tabs';
49
+ import '@base-ui/react/toast';
50
+ import '@base-ui/react/tooltip';
51
+
52
+ /** Current version of the @graundtech/fluent2-react-kit component library. */
53
+ declare const version = "0.5.1";
54
+
55
+ export { version };
package/dist/index.js ADDED
@@ -0,0 +1,284 @@
1
+ import { cn } from "./lib/utils.js";
2
+ import {
3
+ Accordion,
4
+ AccordionItem,
5
+ AccordionTrigger,
6
+ AccordionContent
7
+ } from "./components/ui/accordion.js";
8
+ import { Alert, AlertTitle, AlertDescription, alertVariants } from "./components/ui/alert.js";
9
+ import { Avatar, AvatarFallback, AvatarImage } from "./components/ui/avatar.js";
10
+ import { Badge, badgeVariants } from "./components/ui/badge.js";
11
+ import {
12
+ Breadcrumb,
13
+ BreadcrumbList,
14
+ BreadcrumbItem,
15
+ BreadcrumbLink,
16
+ BreadcrumbPage,
17
+ BreadcrumbSeparator,
18
+ BreadcrumbEllipsis
19
+ } from "./components/ui/breadcrumb.js";
20
+ import { Button, buttonVariants } from "./components/ui/button.js";
21
+ import {
22
+ Card,
23
+ CardAction,
24
+ CardContent,
25
+ CardDescription,
26
+ CardFooter,
27
+ CardHeader,
28
+ CardTitle
29
+ } from "./components/ui/card.js";
30
+ import { Checkbox } from "./components/ui/checkbox.js";
31
+ import {
32
+ Combobox,
33
+ ComboboxValue,
34
+ ComboboxInput,
35
+ ComboboxContent,
36
+ ComboboxList,
37
+ ComboboxEmpty,
38
+ ComboboxItem,
39
+ ComboboxGroup,
40
+ ComboboxLabel,
41
+ ComboboxSeparator
42
+ } from "./components/ui/combobox.js";
43
+ import {
44
+ Command,
45
+ CommandDialog,
46
+ CommandInput,
47
+ CommandList,
48
+ CommandEmpty,
49
+ CommandGroup,
50
+ CommandItem,
51
+ CommandSeparator,
52
+ CommandShortcut
53
+ } from "./components/ui/command.js";
54
+ import {
55
+ Dialog,
56
+ DialogTrigger,
57
+ DialogPortal,
58
+ DialogOverlay,
59
+ DialogContent,
60
+ DialogHeader,
61
+ DialogFooter,
62
+ DialogTitle,
63
+ DialogDescription,
64
+ DialogClose
65
+ } from "./components/ui/dialog.js";
66
+ import {
67
+ DropdownMenu,
68
+ DropdownMenuTrigger,
69
+ DropdownMenuContent,
70
+ DropdownMenuGroup,
71
+ DropdownMenuLabel,
72
+ DropdownMenuItem,
73
+ DropdownMenuCheckboxItem,
74
+ DropdownMenuRadioGroup,
75
+ DropdownMenuRadioItem,
76
+ DropdownMenuSeparator,
77
+ DropdownMenuShortcut,
78
+ DropdownMenuSub,
79
+ DropdownMenuSubTrigger,
80
+ DropdownMenuSubContent
81
+ } from "./components/ui/dropdown-menu.js";
82
+ import { Input } from "./components/ui/input.js";
83
+ import { Label } from "./components/ui/label.js";
84
+ import { Link, linkVariants } from "./components/ui/link.js";
85
+ import {
86
+ MultiSelect,
87
+ MultiSelectInput,
88
+ MultiSelectChip,
89
+ MultiSelectContent,
90
+ MultiSelectList,
91
+ MultiSelectItem,
92
+ MultiSelectGroup,
93
+ MultiSelectLabel,
94
+ MultiSelectEmpty,
95
+ MultiSelectSeparator
96
+ } from "./components/ui/multi-select.js";
97
+ import {
98
+ Pagination,
99
+ PaginationContent,
100
+ PaginationItem,
101
+ PaginationLink,
102
+ PaginationPrevious,
103
+ PaginationNext,
104
+ PaginationEllipsis
105
+ } from "./components/ui/pagination.js";
106
+ import { Popover, PopoverTrigger, PopoverContent } from "./components/ui/popover.js";
107
+ import { Progress } from "./components/ui/progress.js";
108
+ import { RadioGroup, RadioGroupItem } from "./components/ui/radio-group.js";
109
+ import {
110
+ Select,
111
+ SelectGroup,
112
+ SelectValue,
113
+ SelectTrigger,
114
+ SelectContent,
115
+ SelectLabel,
116
+ SelectItem,
117
+ SelectSeparator,
118
+ SelectScrollUpButton,
119
+ SelectScrollDownButton
120
+ } from "./components/ui/select.js";
121
+ import { Separator } from "./components/ui/separator.js";
122
+ import { Skeleton } from "./components/ui/skeleton.js";
123
+ import { Spinner, spinnerVariants } from "./components/ui/spinner.js";
124
+ import { Switch } from "./components/ui/switch.js";
125
+ import { Tabs, TabsList, TabsTrigger, TabsContent } from "./components/ui/tabs.js";
126
+ import { Textarea } from "./components/ui/textarea.js";
127
+ import {
128
+ Toast,
129
+ ToastProvider,
130
+ ToastViewport,
131
+ ToastTitle,
132
+ ToastDescription,
133
+ ToastAction,
134
+ ToastClose,
135
+ useToast,
136
+ createToastManager,
137
+ toastVariants
138
+ } from "./components/ui/toast.js";
139
+ import {
140
+ Tooltip,
141
+ TooltipContent,
142
+ TooltipProvider,
143
+ TooltipTrigger
144
+ } from "./components/ui/tooltip.js";
145
+ const version = "0.5.1";
146
+ export {
147
+ Accordion,
148
+ AccordionContent,
149
+ AccordionItem,
150
+ AccordionTrigger,
151
+ Alert,
152
+ AlertDescription,
153
+ AlertTitle,
154
+ Avatar,
155
+ AvatarFallback,
156
+ AvatarImage,
157
+ Badge,
158
+ Breadcrumb,
159
+ BreadcrumbEllipsis,
160
+ BreadcrumbItem,
161
+ BreadcrumbLink,
162
+ BreadcrumbList,
163
+ BreadcrumbPage,
164
+ BreadcrumbSeparator,
165
+ Button,
166
+ Card,
167
+ CardAction,
168
+ CardContent,
169
+ CardDescription,
170
+ CardFooter,
171
+ CardHeader,
172
+ CardTitle,
173
+ Checkbox,
174
+ Combobox,
175
+ ComboboxContent,
176
+ ComboboxEmpty,
177
+ ComboboxGroup,
178
+ ComboboxInput,
179
+ ComboboxItem,
180
+ ComboboxLabel,
181
+ ComboboxList,
182
+ ComboboxSeparator,
183
+ ComboboxValue,
184
+ Command,
185
+ CommandDialog,
186
+ CommandEmpty,
187
+ CommandGroup,
188
+ CommandInput,
189
+ CommandItem,
190
+ CommandList,
191
+ CommandSeparator,
192
+ CommandShortcut,
193
+ Dialog,
194
+ DialogClose,
195
+ DialogContent,
196
+ DialogDescription,
197
+ DialogFooter,
198
+ DialogHeader,
199
+ DialogOverlay,
200
+ DialogPortal,
201
+ DialogTitle,
202
+ DialogTrigger,
203
+ DropdownMenu,
204
+ DropdownMenuCheckboxItem,
205
+ DropdownMenuContent,
206
+ DropdownMenuGroup,
207
+ DropdownMenuItem,
208
+ DropdownMenuLabel,
209
+ DropdownMenuRadioGroup,
210
+ DropdownMenuRadioItem,
211
+ DropdownMenuSeparator,
212
+ DropdownMenuShortcut,
213
+ DropdownMenuSub,
214
+ DropdownMenuSubContent,
215
+ DropdownMenuSubTrigger,
216
+ DropdownMenuTrigger,
217
+ Input,
218
+ Label,
219
+ Link,
220
+ MultiSelect,
221
+ MultiSelectChip,
222
+ MultiSelectContent,
223
+ MultiSelectEmpty,
224
+ MultiSelectGroup,
225
+ MultiSelectInput,
226
+ MultiSelectItem,
227
+ MultiSelectLabel,
228
+ MultiSelectList,
229
+ MultiSelectSeparator,
230
+ Pagination,
231
+ PaginationContent,
232
+ PaginationEllipsis,
233
+ PaginationItem,
234
+ PaginationLink,
235
+ PaginationNext,
236
+ PaginationPrevious,
237
+ Popover,
238
+ PopoverContent,
239
+ PopoverTrigger,
240
+ Progress,
241
+ RadioGroup,
242
+ RadioGroupItem,
243
+ Select,
244
+ SelectContent,
245
+ SelectGroup,
246
+ SelectItem,
247
+ SelectLabel,
248
+ SelectScrollDownButton,
249
+ SelectScrollUpButton,
250
+ SelectSeparator,
251
+ SelectTrigger,
252
+ SelectValue,
253
+ Separator,
254
+ Skeleton,
255
+ Spinner,
256
+ Switch,
257
+ Tabs,
258
+ TabsContent,
259
+ TabsList,
260
+ TabsTrigger,
261
+ Textarea,
262
+ Toast,
263
+ ToastAction,
264
+ ToastClose,
265
+ ToastDescription,
266
+ ToastProvider,
267
+ ToastTitle,
268
+ ToastViewport,
269
+ Tooltip,
270
+ TooltipContent,
271
+ TooltipProvider,
272
+ TooltipTrigger,
273
+ alertVariants,
274
+ badgeVariants,
275
+ buttonVariants,
276
+ cn,
277
+ createToastManager,
278
+ linkVariants,
279
+ spinnerVariants,
280
+ toastVariants,
281
+ useToast,
282
+ version
283
+ };
284
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { cn } from \"./lib/utils\";\n\nexport {\n Accordion,\n AccordionItem,\n AccordionTrigger,\n AccordionContent,\n} from \"./components/ui/accordion\";\nexport { Alert, AlertTitle, AlertDescription, alertVariants } from \"./components/ui/alert\";\nexport { Avatar, AvatarFallback, AvatarImage } from \"./components/ui/avatar\";\nexport { Badge, badgeVariants } from \"./components/ui/badge\";\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n} from \"./components/ui/breadcrumb\";\nexport { Button, buttonVariants } from \"./components/ui/button\";\nexport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"./components/ui/card\";\nexport { Checkbox } from \"./components/ui/checkbox\";\nexport {\n Combobox,\n ComboboxValue,\n ComboboxInput,\n ComboboxContent,\n ComboboxList,\n ComboboxEmpty,\n ComboboxItem,\n ComboboxGroup,\n ComboboxLabel,\n ComboboxSeparator,\n} from \"./components/ui/combobox\";\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandSeparator,\n CommandShortcut,\n} from \"./components/ui/command\";\nexport {\n Dialog,\n DialogTrigger,\n DialogPortal,\n DialogOverlay,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n DialogClose,\n} from \"./components/ui/dialog\";\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n} from \"./components/ui/dropdown-menu\";\nexport { Input } from \"./components/ui/input\";\nexport { Label } from \"./components/ui/label\";\nexport { Link, linkVariants } from \"./components/ui/link\";\nexport {\n MultiSelect,\n MultiSelectInput,\n MultiSelectChip,\n MultiSelectContent,\n MultiSelectList,\n MultiSelectItem,\n MultiSelectGroup,\n MultiSelectLabel,\n MultiSelectEmpty,\n MultiSelectSeparator,\n} from \"./components/ui/multi-select\";\nexport {\n Pagination,\n PaginationContent,\n PaginationItem,\n PaginationLink,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n} from \"./components/ui/pagination\";\nexport { Popover, PopoverTrigger, PopoverContent } from \"./components/ui/popover\";\nexport { Progress } from \"./components/ui/progress\";\nexport { RadioGroup, RadioGroupItem } from \"./components/ui/radio-group\";\nexport {\n Select, SelectGroup, SelectValue, SelectTrigger, SelectContent,\n SelectLabel, SelectItem, SelectSeparator,\n SelectScrollUpButton, SelectScrollDownButton,\n} from \"./components/ui/select\";\nexport { Separator } from \"./components/ui/separator\";\nexport { Skeleton } from \"./components/ui/skeleton\";\nexport { Spinner, spinnerVariants } from \"./components/ui/spinner\";\nexport { Switch } from \"./components/ui/switch\";\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from \"./components/ui/tabs\";\nexport { Textarea } from \"./components/ui/textarea\";\nexport {\n Toast,\n ToastProvider,\n ToastViewport,\n ToastTitle,\n ToastDescription,\n ToastAction,\n ToastClose,\n useToast,\n createToastManager,\n toastVariants,\n} from \"./components/ui/toast\";\nexport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"./components/ui/tooltip\";\n\n/** Current version of the @graundtech/fluent2-react-kit component library. */\nexport const version = \"0.5.1\";\n"],"mappings":"AAAA,SAAS,UAAU;AAEnB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,OAAO,YAAY,kBAAkB,qBAAqB;AACnE,SAAS,QAAQ,gBAAgB,mBAAmB;AACpD,SAAS,OAAO,qBAAqB;AACrC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,QAAQ,sBAAsB;AACvC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,gBAAgB;AACzB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,aAAa;AACtB,SAAS,aAAa;AACtB,SAAS,MAAM,oBAAoB;AACnC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,SAAS,gBAAgB,sBAAsB;AACxD,SAAS,gBAAgB;AACzB,SAAS,YAAY,sBAAsB;AAC3C;AAAA,EACE;AAAA,EAAQ;AAAA,EAAa;AAAA,EAAa;AAAA,EAAe;AAAA,EACjD;AAAA,EAAa;AAAA,EAAY;AAAA,EACzB;AAAA,EAAsB;AAAA,OACjB;AACP,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB;AACzB,SAAS,SAAS,uBAAuB;AACzC,SAAS,cAAc;AACvB,SAAS,MAAM,UAAU,aAAa,mBAAmB;AACzD,SAAS,gBAAgB;AACzB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGA,MAAM,UAAU;","names":[]}
@@ -0,0 +1,9 @@
1
+ import { ClassValue } from 'clsx';
2
+
3
+ /**
4
+ * Compose class names with clsx and resolve conflicting Tailwind utilities
5
+ * with tailwind-merge (last-write-wins). The canonical shadcn-style helper.
6
+ */
7
+ declare function cn(...inputs: ClassValue[]): string;
8
+
9
+ export { cn };
@@ -0,0 +1,9 @@
1
+ import { clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+ function cn(...inputs) {
4
+ return twMerge(clsx(inputs));
5
+ }
6
+ export {
7
+ cn
8
+ };
9
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/utils.ts"],"sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Compose class names with clsx and resolve conflicting Tailwind utilities\n * with tailwind-merge (last-write-wins). The canonical shadcn-style helper.\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n"],"mappings":"AAAA,SAAS,YAA6B;AACtC,SAAS,eAAe;AAMjB,SAAS,MAAM,QAA8B;AAClD,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;","names":[]}
package/package.json ADDED
@@ -0,0 +1,77 @@
1
+ {
2
+ "name": "@graundtech/fluent2-react-kit",
3
+ "version": "0.5.1",
4
+ "description": "Fluent 2-inspired React components built with shadcn-style APIs and registry-first distribution.",
5
+ "type": "module",
6
+ "private": false,
7
+ "license": "MIT",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/graundtech/fluent2-react-kit.git",
11
+ "directory": "packages/react"
12
+ },
13
+ "homepage": "https://github.com/graundtech/fluent2-react-kit#readme",
14
+ "bugs": {
15
+ "url": "https://github.com/graundtech/fluent2-react-kit/issues"
16
+ },
17
+ "keywords": [
18
+ "fluent2",
19
+ "react",
20
+ "components",
21
+ "shadcn",
22
+ "tailwind",
23
+ "registry"
24
+ ],
25
+ "exports": {
26
+ ".": {
27
+ "types": "./dist/index.d.ts",
28
+ "import": "./dist/index.js"
29
+ },
30
+ "./tokens.css": "./src/styles/tokens.css",
31
+ "./package.json": "./package.json"
32
+ },
33
+ "files": [
34
+ "dist",
35
+ "src/styles"
36
+ ],
37
+ "sideEffects": [
38
+ "**/*.css"
39
+ ],
40
+ "publishConfig": {
41
+ "access": "public"
42
+ },
43
+ "scripts": {
44
+ "build": "tsup && node scripts/fix-esm-extensions.mjs",
45
+ "clean": "rm -rf dist",
46
+ "typecheck": "tsc --noEmit",
47
+ "test": "vitest run",
48
+ "test:watch": "vitest"
49
+ },
50
+ "peerDependencies": {
51
+ "react": ">=18",
52
+ "react-dom": ">=18"
53
+ },
54
+ "dependencies": {
55
+ "@base-ui/react": "1.6.0",
56
+ "@fluentui/react-icons": "2.0.333",
57
+ "@radix-ui/react-slot": "1.3.0",
58
+ "class-variance-authority": "0.7.1",
59
+ "clsx": "2.1.1",
60
+ "tailwind-merge": "3.6.0"
61
+ },
62
+ "devDependencies": {
63
+ "@testing-library/dom": "10.4.1",
64
+ "@testing-library/jest-dom": "6.9.1",
65
+ "@testing-library/react": "16.3.2",
66
+ "@testing-library/user-event": "14.6.1",
67
+ "@types/react": "19.2.17",
68
+ "@types/react-dom": "19.2.3",
69
+ "@vitejs/plugin-react": "6.0.3",
70
+ "@vitest/coverage-v8": "4.1.10",
71
+ "axe-core": "4.12.1",
72
+ "jsdom": "29.1.1",
73
+ "react": "19.2.7",
74
+ "react-dom": "19.2.7",
75
+ "vitest": "4.1.10"
76
+ }
77
+ }