@gears-frontx/ui-kit 0.3.0-alpha.2 → 0.3.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -39,6 +39,21 @@ unused JS bindings the way it prunes JS. If your build uses esbuild directly
39
39
  (not through a framework that wraps it, like Vite does), prefer the subpath
40
40
  import for CSS you actually want dropped.
41
41
 
42
+ In an RSC framework (Next.js App Router being the dominant case), most kit
43
+ components render straight from a Server Component with no kit-side client JS —
44
+ they only compose Base UI primitives as JSX, and Base UI's own dist already
45
+ carries `'use client'` on the modules that call hooks (an interactive primitive
46
+ like Select or Dialog still ships Base UI's own client bundle; only the kit
47
+ wrapper around it needs no directive of its own). Three components call a hook
48
+ directly in their own render body and ship a `'use client'` banner on their own
49
+ chunk instead: **Badge** (`useRender`, for its `render` prop), **DropdownMenu**
50
+ (`useContext`, for the portal container it shares with nested submenus), and
51
+ **Toast** (`useToastManager`, for the live toast list `Toaster` renders).
52
+ Everything else — including interactive primitives like Button, Checkbox,
53
+ Dialog, Select, Switch, RadioGroup, and Tabs — stays server-renderable; each
54
+ one's own client interactivity comes from a Base UI primitive it renders as a
55
+ child, which establishes its own client boundary as needed.
56
+
42
57
  The theme file paints the page (background, text, and UA-owned surfaces like
43
58
  the scrollbar) as well as defining the tokens, so dark mode works out of the
44
59
  box with no attribute at all: it follows `prefers-color-scheme` by default.
package/dist/badge.js CHANGED
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsxs as d, Fragment as v, jsx as p } from "react/jsx-runtime";
2
3
  import { mergeProps as g } from "@base-ui/react/merge-props";
3
4
  import { useRender as m } from "@base-ui/react/use-render";
@@ -32,8 +33,8 @@ import './chunks/badge.BcdxDzJ7.css';const b = "_badge_rbq84_9", f = "_icon_rbq8
32
33
  shape: "pill"
33
34
  }
34
35
  });
35
- function A({ className: t, variant: i, shape: e, dot: s, icon: n, render: o, children: c, ..._ }) {
36
- const r = h.toArray(n).some((l) => l !== "");
36
+ function A({ className: t, variant: i, shape: e, dot: s, icon: n, render: o, children: c, ...l }) {
37
+ const r = h.toArray(n).some((_) => _ !== "");
37
38
  return m({
38
39
  defaultTagName: "span",
39
40
  render: o,
@@ -47,7 +48,7 @@ function A({ className: t, variant: i, shape: e, dot: s, icon: n, render: o, chi
47
48
  * spread below type-checks while keeping the ordering that matters.
48
49
  */
49
50
  props: {
50
- ...g({ className: x({ variant: i, shape: e, className: t }) }, _),
51
+ ...g({ className: x({ variant: i, shape: e, className: t }) }, l),
51
52
  "data-dot": s && !r || void 0,
52
53
  children: /* @__PURE__ */ d(v, { children: [
53
54
  r && /* @__PURE__ */ p("span", { className: a.icon, "aria-hidden": "true", children: n }),
package/dist/badge.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"badge.js","sources":["../src/components/badge/badge.tsx"],"sourcesContent":["import { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Children, type ReactNode } from 'react';\n\nimport styles from './badge.module.css';\n\n/*\n * Badge has no Base UI primitive component, but it still gets `render`-prop\n * polymorphism — from `useRender`/`mergeProps`, the same utilities Base UI's\n * primitives are built on. A status badge is usually static, but rendered as\n * a link via `render` it stays focusable and gets the focus ring below.\n *\n * The variant model follows the F-mockups' Badge/Status (\"pill or dot;\n * semantic intent only\"), which retires the shadcn-inherited\n * default/secondary/destructive/outline/ghost/link list: a badge states\n * *what kind* of thing it marks, not how to paint it. That semantic-only\n * rule is real, but it lives in badge.md and in the VALUE names — the prop\n * itself keeps the kit-wide `variant` name rather than an axis name of its\n * own, so every component in the kit is driven the same way.\n *\n * `shape`, not `size`: the two values are pill vs. plain (bare text, no\n * fill), and Badge has no size axis at all (the pill is a fixed 24px).\n * Not `form` either — that is a real HTML attribute, so a styling prop by\n * that name would shadow it for anyone rendering a form-associated element\n * via `render`. The status dot and the icon slot are opt-in props, not\n * shape values — both shapes can carry either.\n */\nconst badgeVariants = cva(styles.badge, {\n variants: {\n variant: {\n success: styles.variantSuccess,\n warning: styles.variantWarning,\n info: styles.variantInfo,\n danger: styles.variantDanger,\n muted: styles.variantMuted,\n },\n shape: {\n pill: styles.shapePill,\n plain: styles.shapePlain,\n },\n },\n defaultVariants: {\n variant: 'muted',\n shape: 'pill',\n },\n});\n\nexport interface BadgeProps\n extends useRender.ComponentProps<'span'>, VariantProps<typeof badgeVariants> {\n /**\n * Show the status dot, painted in the variant's accent color. Off by\n * default; ignored when `icon` is present — the icon takes its place.\n */\n dot?: boolean;\n /**\n * Leading icon slot — decorative (`aria-hidden`), fixed 12px, painted in\n * the variant's accent color like the dot it replaces. Wins over `dot`\n * when both are set.\n */\n icon?: ReactNode;\n}\n\nexport function Badge({ className, variant, shape, dot, icon, render, children, ...props }: BadgeProps) {\n // `icon != null` is true for `icon={false}` — a valid ReactNode that\n // renders nothing — which is exactly what `icon={cond && <Icon/>}` passes\n // when `cond` is false. Same predicate as Button's `hasLabel`, applied to\n // a slot instead of children: it answers \"is this renderable\" rather than\n // \"is this set\".\n const hasIcon = Children.toArray(icon).some((child) => child !== '');\n return useRender({\n defaultTagName: 'span',\n render,\n /*\n * The derived attribute and the composed children are layered on top of\n * the merged props, NOT passed through mergeProps: they must win over a\n * caller's own `data-dot` (same shadow-proofing as Button's\n * `data-loading`), and mergeProps types its arguments as the closed DOM\n * attribute set, which rejects a `data-*` key in an object literal.\n * `useRender`'s own `props` takes `Record<string, unknown>`, so the\n * spread below type-checks while keeping the ordering that matters.\n */\n props: {\n ...mergeProps<'span'>({ className: badgeVariants({ variant, shape, className }) }, props),\n 'data-dot': (dot && !hasIcon) || undefined,\n children: (\n <>\n {hasIcon && (\n <span className={styles.icon} aria-hidden=\"true\">\n {icon}\n </span>\n )}\n {children}\n </>\n ),\n },\n });\n}\n"],"names":["badgeVariants","cva","styles","Badge","className","variant","shape","dot","icon","render","children","props","hasIcon","Children","child","useRender","mergeProps","jsxs","Fragment"],"mappings":";;;;;;;;;;;;;;;GA4BMA,IAAgBC,EAAIC,EAAO,OAAO;AAAA,EACtC,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAASA,EAAO;AAAA,MAChB,SAASA,EAAO;AAAA,MAChB,MAAMA,EAAO;AAAA,MACb,QAAQA,EAAO;AAAA,MACf,OAAOA,EAAO;AAAA,IAAA;AAAA,IAEhB,OAAO;AAAA,MACL,MAAMA,EAAO;AAAA,MACb,OAAOA,EAAO;AAAA,IAAA;AAAA,EAChB;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,IACT,OAAO;AAAA,EAAA;AAEX,CAAC;AAiBM,SAASC,EAAM,EAAE,WAAAC,GAAW,SAAAC,GAAS,OAAAC,GAAO,KAAAC,GAAK,MAAAC,GAAM,QAAAC,GAAQ,UAAAC,GAAU,GAAGC,KAAqB;AAMtG,QAAMC,IAAUC,EAAS,QAAQL,CAAI,EAAE,KAAK,CAACM,MAAUA,MAAU,EAAE;AACnE,SAAOC,EAAU;AAAA,IACf,gBAAgB;AAAA,IAChB,QAAAN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUA,OAAO;AAAA,MACL,GAAGO,EAAmB,EAAE,WAAWhB,EAAc,EAAE,SAAAK,GAAS,OAAAC,GAAO,WAAAF,EAAA,CAAW,EAAA,GAAKO,CAAK;AAAA,MACxF,YAAaJ,KAAO,CAACK,KAAY;AAAA,MACjC,UACE,gBAAAK,EAAAC,GAAA,EACG,UAAA;AAAA,QAAAN,uBACE,QAAA,EAAK,WAAWV,EAAO,MAAM,eAAY,QACvC,UAAAM,EAAA,CACH;AAAA,QAEDE;AAAA,MAAA,EAAA,CACH;AAAA,IAAA;AAAA,EAEJ,CACD;AACH;"}
1
+ {"version":3,"file":"badge.js","sources":["../src/components/badge/badge.tsx"],"sourcesContent":["// Load-bearing: Badge calls useRender directly, so this can't be dropped.\n// Coupled to CLIENT_COMPONENTS in scripts/verify-consumer.sh — keep both in\n// sync if this ever changes.\n'use client';\n\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Children, type ReactNode } from 'react';\n\nimport styles from './badge.module.css';\n\n/*\n * Badge has no Base UI primitive component, but it still gets `render`-prop\n * polymorphism — from `useRender`/`mergeProps`, the same utilities Base UI's\n * primitives are built on. A status badge is usually static, but rendered as\n * a link via `render` it stays focusable and gets the focus ring below.\n *\n * The variant model follows the F-mockups' Badge/Status (\"pill or dot;\n * semantic intent only\"), which retires the shadcn-inherited\n * default/secondary/destructive/outline/ghost/link list: a badge states\n * *what kind* of thing it marks, not how to paint it. That semantic-only\n * rule is real, but it lives in badge.md and in the VALUE names — the prop\n * itself keeps the kit-wide `variant` name rather than an axis name of its\n * own, so every component in the kit is driven the same way.\n *\n * `shape`, not `size`: the two values are pill vs. plain (bare text, no\n * fill), and Badge has no size axis at all (the pill is a fixed 24px).\n * Not `form` either — that is a real HTML attribute, so a styling prop by\n * that name would shadow it for anyone rendering a form-associated element\n * via `render`. The status dot and the icon slot are opt-in props, not\n * shape values — both shapes can carry either.\n */\nconst badgeVariants = cva(styles.badge, {\n variants: {\n variant: {\n success: styles.variantSuccess,\n warning: styles.variantWarning,\n info: styles.variantInfo,\n danger: styles.variantDanger,\n muted: styles.variantMuted,\n },\n shape: {\n pill: styles.shapePill,\n plain: styles.shapePlain,\n },\n },\n defaultVariants: {\n variant: 'muted',\n shape: 'pill',\n },\n});\n\nexport interface BadgeProps\n extends useRender.ComponentProps<'span'>, VariantProps<typeof badgeVariants> {\n /**\n * Show the status dot, painted in the variant's accent color. Off by\n * default; ignored when `icon` is present — the icon takes its place.\n */\n dot?: boolean;\n /**\n * Leading icon slot — decorative (`aria-hidden`), fixed 12px, painted in\n * the variant's accent color like the dot it replaces. Wins over `dot`\n * when both are set.\n */\n icon?: ReactNode;\n}\n\nexport function Badge({ className, variant, shape, dot, icon, render, children, ...props }: BadgeProps) {\n // `icon != null` is true for `icon={false}` — a valid ReactNode that\n // renders nothing — which is exactly what `icon={cond && <Icon/>}` passes\n // when `cond` is false. Same predicate as Button's `hasLabel`, applied to\n // a slot instead of children: it answers \"is this renderable\" rather than\n // \"is this set\".\n const hasIcon = Children.toArray(icon).some((child) => child !== '');\n return useRender({\n defaultTagName: 'span',\n render,\n /*\n * The derived attribute and the composed children are layered on top of\n * the merged props, NOT passed through mergeProps: they must win over a\n * caller's own `data-dot` (same shadow-proofing as Button's\n * `data-loading`), and mergeProps types its arguments as the closed DOM\n * attribute set, which rejects a `data-*` key in an object literal.\n * `useRender`'s own `props` takes `Record<string, unknown>`, so the\n * spread below type-checks while keeping the ordering that matters.\n */\n props: {\n ...mergeProps<'span'>({ className: badgeVariants({ variant, shape, className }) }, props),\n 'data-dot': (dot && !hasIcon) || undefined,\n children: (\n <>\n {hasIcon && (\n <span className={styles.icon} aria-hidden=\"true\">\n {icon}\n </span>\n )}\n {children}\n </>\n ),\n },\n });\n}\n"],"names":["badgeVariants","cva","styles","Badge","className","variant","shape","dot","icon","render","children","props","hasIcon","Children","child","useRender","mergeProps","jsxs","Fragment"],"mappings":";;;;;;;;;;;;;;;;GAiCMA,IAAgBC,EAAIC,EAAO,OAAO;AAAA,EACtC,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAASA,EAAO;AAAA,MAChB,SAASA,EAAO;AAAA,MAChB,MAAMA,EAAO;AAAA,MACb,QAAQA,EAAO;AAAA,MACf,OAAOA,EAAO;AAAA,IAAA;AAAA,IAEhB,OAAO;AAAA,MACL,MAAMA,EAAO;AAAA,MACb,OAAOA,EAAO;AAAA,IAAA;AAAA,EAChB;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,IACT,OAAO;AAAA,EAAA;AAEX,CAAC;AAiBM,SAASC,EAAM,EAAE,WAAAC,GAAW,SAAAC,GAAS,OAAAC,GAAO,KAAAC,GAAK,MAAAC,GAAM,QAAAC,GAAQ,UAAAC,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UAAU,8FAkCrG"}
1
+ {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAyBjD,QAAA,MAAM,aAAa;;;8EAkBjB,CAAC;AAEH,MAAM,WAAW,UACf,SAAQ,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC;IAC5E;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,wBAAgB,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,8FAkCrG"}
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown-menu/dropdown-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,KAAK,cAAc,EAA6B,MAAM,OAAO,CAAC;AA+CvE,eAAO,MAAM,YAAY,oFAAqB,CAAC;AAC/C;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC;AAEzD,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,EAAE,WAAW,CAAC;IAC9F,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,mB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AS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,2BAA2B,+BAO7B;AAED,MAAM,MAAM,2BAA2B,GAAG,wBAAwB,CAAC;AAEnE,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EACT,IAAc,EACd,KAAe,EACf,UAAc,EACd,WAAgB,EAChB,GAAG,KAAK,EACT,EAAE,2BAA2B,+BAW7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../src/components/toast/toast.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAkL/D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,KAAK,kDAAsC,CAAC;AAEzD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,eAAe,uCAAiC,CAAC;AAE9D;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,0CAAoC,CAAC;AAEpE,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAC,QAAQ,CAAC,KAAK;IACjE;;;;;OAKG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IACrD;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,EACtB,SAAS,EACT,QAAQ,EACR,UAA0B,EAG1B,KAAuB,EACvB,YAAoB,EACpB,GAAG,KAAK,EACT,EAAE,YAAY,+BAWd"}
1
+ {"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../src/components/toast/toast.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAkL/D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,KAAK,kDAAsC,CAAC;AAEzD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,eAAe,uCAAiC,CAAC;AAE9D;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,0CAAoC,CAAC;AAEpE,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAC,QAAQ,CAAC,KAAK;IACjE;;;;;OAKG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IACrD;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,EACtB,SAAS,EACT,QAAQ,EACR,UAA0B,EAG1B,KAAuB,EACvB,YAAoB,EACpB,GAAG,KAAK,EACT,EAAE,YAAY,+BAWd"}
@@ -1,4 +1,5 @@
1
- import { jsxs as p, jsx as e } from "react/jsx-runtime";
1
+ "use client";
2
+ import { jsxs as p, jsx as o } from "react/jsx-runtime";
2
3
  import { Menu as r } from "@base-ui/react/menu";
3
4
  import { cx as a, cva as v } from "class-variance-authority";
4
5
  import { useContext as x, createContext as D } from "react";
@@ -18,9 +19,9 @@ import './chunks/dropdown-menu.DmDZc5gB.css';const M = "_positioner_14fxt_6", k
18
19
  subTrigger: B,
19
20
  subTriggerIcon: V,
20
21
  svgIcon: W
21
- }, m = D(void 0);
22
- function l({ className: t }) {
23
- return /* @__PURE__ */ e(
22
+ }, l = D(void 0);
23
+ function m({ className: t }) {
24
+ return /* @__PURE__ */ o(
24
25
  "svg",
25
26
  {
26
27
  className: a(n.svgIcon, t),
@@ -31,12 +32,12 @@ function l({ className: t }) {
31
32
  strokeLinecap: "round",
32
33
  strokeLinejoin: "round",
33
34
  "aria-hidden": "true",
34
- children: /* @__PURE__ */ e("path", { d: "M20 6 9 17l-5-5" })
35
+ children: /* @__PURE__ */ o("path", { d: "M20 6 9 17l-5-5" })
35
36
  }
36
37
  );
37
38
  }
38
39
  function y({ className: t }) {
39
- return /* @__PURE__ */ e(
40
+ return /* @__PURE__ */ o(
40
41
  "svg",
41
42
  {
42
43
  className: a(n.svgIcon, t),
@@ -47,17 +48,17 @@ function y({ className: t }) {
47
48
  strokeLinecap: "round",
48
49
  strokeLinejoin: "round",
49
50
  "aria-hidden": "true",
50
- children: /* @__PURE__ */ e("path", { d: "m9 18 6-6-6-6" })
51
+ children: /* @__PURE__ */ o("path", { d: "m9 18 6-6-6-6" })
51
52
  }
52
53
  );
53
54
  }
54
55
  const J = r.Root;
55
- function K({ className: t, ...o }) {
56
- return /* @__PURE__ */ e(r.Trigger, { className: t, ...o });
56
+ function K({ className: t, ...e }) {
57
+ return /* @__PURE__ */ o(r.Trigger, { className: t, ...e });
57
58
  }
58
59
  function q({
59
60
  className: t,
60
- children: o,
61
+ children: e,
61
62
  container: i,
62
63
  side: c = "bottom",
63
64
  sideOffset: s = 4,
@@ -68,8 +69,8 @@ function q({
68
69
  collisionPadding: g,
69
70
  ...h
70
71
  }) {
71
- const b = x(m), d = i ?? b;
72
- return /* @__PURE__ */ e(m.Provider, { value: d, children: /* @__PURE__ */ e(r.Portal, { container: d, children: /* @__PURE__ */ e(
72
+ const b = x(l), d = i ?? b;
73
+ return /* @__PURE__ */ o(l.Provider, { value: d, children: /* @__PURE__ */ o(r.Portal, { container: d, children: /* @__PURE__ */ o(
73
74
  r.Positioner,
74
75
  {
75
76
  side: c,
@@ -80,15 +81,15 @@ function q({
80
81
  collisionBoundary: I,
81
82
  collisionPadding: g,
82
83
  className: n.positioner,
83
- children: /* @__PURE__ */ e(r.Popup, { className: a(n.popup, t), ...h, children: o })
84
+ children: /* @__PURE__ */ o(r.Popup, { className: a(n.popup, t), ...h, children: e })
84
85
  }
85
86
  ) }) });
86
87
  }
87
- function O({ className: t, ...o }) {
88
- return /* @__PURE__ */ e(r.Group, { className: t, ...o });
88
+ function O({ className: t, ...e }) {
89
+ return /* @__PURE__ */ o(r.Group, { className: t, ...e });
89
90
  }
90
- function Q({ className: t, ...o }) {
91
- return /* @__PURE__ */ e(r.GroupLabel, { className: a(n.label, t), ...o });
91
+ function Q({ className: t, ...e }) {
92
+ return /* @__PURE__ */ o(r.GroupLabel, { className: a(n.label, t), ...e });
92
93
  }
93
94
  const z = v(n.item, {
94
95
  variants: {
@@ -101,62 +102,62 @@ const z = v(n.item, {
101
102
  variant: "default"
102
103
  }
103
104
  });
104
- function U({ className: t, variant: o, ...i }) {
105
- return /* @__PURE__ */ e(r.Item, { className: z({ variant: o, className: t }), ...i });
105
+ function U({ className: t, variant: e, ...i }) {
106
+ return /* @__PURE__ */ o(r.Item, { className: z({ variant: e, className: t }), ...i });
106
107
  }
107
108
  function X({
108
109
  className: t,
109
- children: o,
110
+ children: e,
110
111
  ...i
111
112
  }) {
112
113
  return /* @__PURE__ */ p(r.CheckboxItem, { className: a(n.checkboxItem, t), ...i, children: [
113
- o,
114
- /* @__PURE__ */ e(r.CheckboxItemIndicator, { className: n.itemIndicator, children: /* @__PURE__ */ e(l, {}) })
114
+ e,
115
+ /* @__PURE__ */ o(r.CheckboxItemIndicator, { className: n.itemIndicator, children: /* @__PURE__ */ o(m, {}) })
115
116
  ] });
116
117
  }
117
- function Y({ className: t, ...o }) {
118
- return /* @__PURE__ */ e(r.RadioGroup, { className: t, ...o });
118
+ function Y({ className: t, ...e }) {
119
+ return /* @__PURE__ */ o(r.RadioGroup, { className: t, ...e });
119
120
  }
120
121
  function Z({
121
122
  className: t,
122
- children: o,
123
+ children: e,
123
124
  ...i
124
125
  }) {
125
126
  return /* @__PURE__ */ p(r.RadioItem, { className: a(n.radioItem, t), ...i, children: [
126
- o,
127
- /* @__PURE__ */ e(r.RadioItemIndicator, { className: n.itemIndicator, children: /* @__PURE__ */ e(l, {}) })
127
+ e,
128
+ /* @__PURE__ */ o(r.RadioItemIndicator, { className: n.itemIndicator, children: /* @__PURE__ */ o(m, {}) })
128
129
  ] });
129
130
  }
130
- function $({ className: t, ...o }) {
131
- return /* @__PURE__ */ e(r.Separator, { className: a(n.separator, t), ...o });
131
+ function $({ className: t, ...e }) {
132
+ return /* @__PURE__ */ o(r.Separator, { className: a(n.separator, t), ...e });
132
133
  }
133
- function tt({ className: t, ...o }) {
134
- return /* @__PURE__ */ e("span", { className: a(n.shortcut, t), ...o });
134
+ function tt({ className: t, ...e }) {
135
+ return /* @__PURE__ */ o("span", { className: a(n.shortcut, t), ...e });
135
136
  }
136
- const ot = r.SubmenuRoot;
137
- function et({
137
+ const et = r.SubmenuRoot;
138
+ function ot({
138
139
  className: t,
139
- children: o,
140
+ children: e,
140
141
  ...i
141
142
  }) {
142
143
  return /* @__PURE__ */ p(r.SubmenuTrigger, { className: a(n.subTrigger, t), ...i, children: [
143
- o,
144
- /* @__PURE__ */ e(y, { className: n.subTriggerIcon })
144
+ e,
145
+ /* @__PURE__ */ o(y, { className: n.subTriggerIcon })
145
146
  ] });
146
147
  }
147
148
  function nt({
148
149
  className: t,
149
- side: o = "right",
150
+ side: e = "right",
150
151
  align: i = "start",
151
152
  sideOffset: c = 0,
152
153
  alignOffset: s = -3,
153
154
  ...u
154
155
  }) {
155
- return /* @__PURE__ */ e(
156
+ return /* @__PURE__ */ o(
156
157
  q,
157
158
  {
158
159
  className: a(n.subPopup, t),
159
- side: o,
160
+ side: e,
160
161
  align: i,
161
162
  sideOffset: c,
162
163
  alignOffset: s,
@@ -175,9 +176,9 @@ export {
175
176
  Z as DropdownMenuRadioItem,
176
177
  $ as DropdownMenuSeparator,
177
178
  tt as DropdownMenuShortcut,
178
- ot as DropdownMenuSub,
179
+ et as DropdownMenuSub,
179
180
  nt as DropdownMenuSubContent,
180
- et as DropdownMenuSubTrigger,
181
+ ot as DropdownMenuSubTrigger,
181
182
  K as DropdownMenuTrigger
182
183
  };
183
184
  //# sourceMappingURL=dropdown-menu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu.js","sources":["../src/components/dropdown-menu/dropdown-menu.tsx"],"sourcesContent":["import { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport { cva, cx, type VariantProps } from 'class-variance-authority';\nimport { type ComponentProps, createContext, useContext } from 'react';\n\nimport styles from './dropdown-menu.module.css';\n\n/*\n * Carries DropdownMenuContent's effective portal container down to nested\n * submenus, so a theme scoped to a subtree holds one level deep without the\n * consumer repeating `container` on every DropdownMenuSubContent. An\n * explicit `container` on the submenu still wins.\n */\nconst MenuContainerContext = createContext<MenuPrimitive.Portal.Props['container']>(undefined);\n\n/* Inline lucide paths (ISC) — the kit carries no icon dependency. */\nfunction CheckIcon({ className }: { className?: string }) {\n return (\n <svg\n className={cx(styles.svgIcon, className)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n );\n}\n\nfunction ChevronRightIcon({ className }: { className?: string }) {\n return (\n <svg\n className={cx(styles.svgIcon, className)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n );\n}\n\nexport const DropdownMenu = MenuPrimitive.Root;\n/**\n * The root is a Base UI pass-through, but its props type is still exported:\n * a consumer writing a typed wrapper imports it from this kit — Base UI is\n * this package's dependency, not necessarily theirs. Same idiom as\n * TooltipProviderProps.\n */\nexport type DropdownMenuProps = MenuPrimitive.Root.Props;\n\nexport interface DropdownMenuTriggerProps extends Omit<MenuPrimitive.Trigger.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuTrigger({ className, ...props }: DropdownMenuTriggerProps) {\n return <MenuPrimitive.Trigger className={className} {...props} />;\n}\n\nexport interface DropdownMenuContentProps\n extends Omit<MenuPrimitive.Popup.Props, 'className'>,\n Pick<\n MenuPrimitive.Positioner.Props,\n // positionMethod/collision*: the escape hatch for popups anchored\n // inside a transform/filter container (an animated panel is the usual\n // case), where the default absolute positioning resolves against the\n // wrong containing block — positionMethod=\"fixed\" is the standard\n // fix, and it must be reachable without bypassing the kit.\n | 'align'\n | 'alignOffset'\n | 'side'\n | 'sideOffset'\n | 'positionMethod'\n | 'collisionBoundary'\n | 'collisionPadding'\n > {\n className?: string;\n /**\n * Where to portal the popup. Defaults to <body>. Pass a themed container\n * when the theme is scoped to a subtree (data-theme on a container that\n * isn't at document root) so the popup inherits its tokens and font.\n * Inherited by nested DropdownMenuSubContent unless it passes its own.\n */\n container?: MenuPrimitive.Portal.Props['container'];\n}\n\nexport function DropdownMenuContent({\n className,\n children,\n container,\n side = 'bottom',\n sideOffset = 4,\n align = 'start',\n alignOffset = 0,\n positionMethod,\n collisionBoundary,\n collisionPadding,\n ...props\n}: DropdownMenuContentProps) {\n const inheritedContainer = useContext(MenuContainerContext);\n const effectiveContainer = container ?? inheritedContainer;\n return (\n <MenuContainerContext.Provider value={effectiveContainer}>\n <MenuPrimitive.Portal container={effectiveContainer}>\n <MenuPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n positionMethod={positionMethod}\n collisionBoundary={collisionBoundary}\n collisionPadding={collisionPadding}\n className={styles.positioner}\n >\n <MenuPrimitive.Popup className={cx(styles.popup, className)} {...props}>\n {children}\n </MenuPrimitive.Popup>\n </MenuPrimitive.Positioner>\n </MenuPrimitive.Portal>\n </MenuContainerContext.Provider>\n );\n}\n\nexport interface DropdownMenuGroupProps extends Omit<MenuPrimitive.Group.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuGroup({ className, ...props }: DropdownMenuGroupProps) {\n return <MenuPrimitive.Group className={className} {...props} />;\n}\n\nexport interface DropdownMenuLabelProps extends Omit<MenuPrimitive.GroupLabel.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuLabel({ className, ...props }: DropdownMenuLabelProps) {\n return <MenuPrimitive.GroupLabel className={cx(styles.label, className)} {...props} />;\n}\n\nconst itemVariants = cva(styles.item, {\n variants: {\n variant: {\n default: styles.variantDefault,\n destructive: styles.variantDestructive,\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\nexport interface DropdownMenuItemProps\n extends Omit<MenuPrimitive.Item.Props, 'className'>, VariantProps<typeof itemVariants> {\n className?: string;\n}\n\nexport function DropdownMenuItem({ className, variant, ...props }: DropdownMenuItemProps) {\n return <MenuPrimitive.Item className={itemVariants({ variant, className })} {...props} />;\n}\n\nexport interface DropdownMenuCheckboxItemProps\n extends Omit<MenuPrimitive.CheckboxItem.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuCheckboxItem({\n className,\n children,\n ...props\n}: DropdownMenuCheckboxItemProps) {\n return (\n <MenuPrimitive.CheckboxItem className={cx(styles.checkboxItem, className)} {...props}>\n {children}\n <MenuPrimitive.CheckboxItemIndicator className={styles.itemIndicator}>\n <CheckIcon />\n </MenuPrimitive.CheckboxItemIndicator>\n </MenuPrimitive.CheckboxItem>\n );\n}\n\nexport interface DropdownMenuRadioGroupProps\n extends Omit<MenuPrimitive.RadioGroup.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuRadioGroup({ className, ...props }: DropdownMenuRadioGroupProps) {\n return <MenuPrimitive.RadioGroup className={className} {...props} />;\n}\n\nexport interface DropdownMenuRadioItemProps\n extends Omit<MenuPrimitive.RadioItem.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: DropdownMenuRadioItemProps) {\n return (\n <MenuPrimitive.RadioItem className={cx(styles.radioItem, className)} {...props}>\n {children}\n <MenuPrimitive.RadioItemIndicator className={styles.itemIndicator}>\n <CheckIcon />\n </MenuPrimitive.RadioItemIndicator>\n </MenuPrimitive.RadioItem>\n );\n}\n\nexport interface DropdownMenuSeparatorProps\n extends Omit<MenuPrimitive.Separator.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuSeparator({ className, ...props }: DropdownMenuSeparatorProps) {\n return <MenuPrimitive.Separator className={cx(styles.separator, className)} {...props} />;\n}\n\nexport type DropdownMenuShortcutProps = ComponentProps<'span'>;\n\nexport function DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps) {\n return <span className={cx(styles.shortcut, className)} {...props} />;\n}\n\nexport const DropdownMenuSub = MenuPrimitive.SubmenuRoot;\n/** Pass-through props type — see DropdownMenuProps. */\nexport type DropdownMenuSubProps = MenuPrimitive.SubmenuRoot.Props;\n\nexport interface DropdownMenuSubTriggerProps\n extends Omit<MenuPrimitive.SubmenuTrigger.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuSubTrigger({\n className,\n children,\n ...props\n}: DropdownMenuSubTriggerProps) {\n return (\n <MenuPrimitive.SubmenuTrigger className={cx(styles.subTrigger, className)} {...props}>\n {children}\n <ChevronRightIcon className={styles.subTriggerIcon} />\n </MenuPrimitive.SubmenuTrigger>\n );\n}\n\nexport type DropdownMenuSubContentProps = DropdownMenuContentProps;\n\nexport function DropdownMenuSubContent({\n className,\n side = 'right',\n align = 'start',\n sideOffset = 0,\n alignOffset = -3,\n ...props\n}: DropdownMenuSubContentProps) {\n return (\n <DropdownMenuContent\n className={cx(styles.subPopup, className)}\n side={side}\n align={align}\n sideOffset={sideOffset}\n alignOffset={alignOffset}\n {...props}\n />\n );\n}\n"],"names":["MenuContainerContext","createContext","CheckIcon","className","jsx","cx","styles","ChevronRightIcon","DropdownMenu","MenuPrimitive","DropdownMenuTrigger","props","DropdownMenuContent","children","container","side","sideOffset","align","alignOffset","positionMethod","collisionBoundary","collisionPadding","inheritedContainer","useContext","effectiveContainer","DropdownMenuGroup","DropdownMenuLabel","itemVariants","cva","DropdownMenuItem","variant","DropdownMenuCheckboxItem","jsxs","DropdownMenuRadioGroup","DropdownMenuRadioIt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uB;AAAA,EACrC,WAAAnC;AAAA,EACA,UAAAU;AAAA,EACA,GAAGF;AACL,GAAgC;AAC9B,SACE,gBAAAqB,EAACvB,EAAc,gBAAd,EAA6B,WAAWJ,EAAGC,EAAO,YAAYH,CAAS,GAAI,GAAGQ,GAC5E,UAAA;AAAA,IAAAE;AAAA,IACD,gBAAAT,EAACG,GAAA,EAAiB,WAAWD,EAAO,eAAA,CAAgB;AAAA,EAAA,GACtD;AAEJ;AAIO,SAASiC,GAAuB;AAAA,EACrC,WAAApC;AAAA,EACA,MAAAY,IAAO;AAAA,EACP,OAAAE,IAAQ;AAAA,EACR,YAAAD,IAAa;AAAA,EACb,aAAAE,IAAc;AAAA,EACd,GAAGP;AACL,GAAgC;AAC9B,SACE,gBAAAP;AAAA,IAACQ;AAAA,IAAA;AAAA,MACC,WAAWP,EAAGC,EAAO,UAAUH,CAAS;AAAA,MACxC,MAAAY;AAAA,MACA,OAAAE;AAAA,MACA,YAAAD;AAAA,MACA,aAAAE;AAAA,MACC,GAAGP;AAAA,IAAA;AAAA,EAAA;AAGV;"}
1
+ {"version":3,"file":"dropdown-menu.js","sources":["../src/components/dropdown-menu/dropdown-menu.tsx"],"sourcesContent":["// Load-bearing: DropdownMenuContent calls useContext directly, so this\n// can't be dropped. Coupled to CLIENT_COMPONENTS in\n// scripts/verify-consumer.sh — keep both in sync if this ever changes.\n'use client';\n\nimport { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport { cva, cx, type VariantProps } from 'class-variance-authority';\nimport { type ComponentProps, createContext, useContext } from 'react';\n\nimport styles from './dropdown-menu.module.css';\n\n/*\n * Carries DropdownMenuContent's effective portal container down to nested\n * submenus, so a theme scoped to a subtree holds one level deep without the\n * consumer repeating `container` on every DropdownMenuSubContent. An\n * explicit `container` on the submenu still wins.\n */\nconst MenuContainerContext = createContext<MenuPrimitive.Portal.Props['container']>(undefined);\n\n/* Inline lucide paths (ISC) — the kit carries no icon dependency. */\nfunction CheckIcon({ className }: { className?: string }) {\n return (\n <svg\n className={cx(styles.svgIcon, className)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n );\n}\n\nfunction ChevronRightIcon({ className }: { className?: string }) {\n return (\n <svg\n className={cx(styles.svgIcon, className)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n );\n}\n\nexport const DropdownMenu = MenuPrimitive.Root;\n/**\n * The root is a Base UI pass-through, but its props type is still exported:\n * a consumer writing a typed wrapper imports it from this kit — Base UI is\n * this package's dependency, not necessarily theirs. Same idiom as\n * TooltipProviderProps.\n */\nexport type DropdownMenuProps = MenuPrimitive.Root.Props;\n\nexport interface DropdownMenuTriggerProps extends Omit<MenuPrimitive.Trigger.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuTrigger({ className, ...props }: DropdownMenuTriggerProps) {\n return <MenuPrimitive.Trigger className={className} {...props} />;\n}\n\nexport interface DropdownMenuContentProps\n extends Omit<MenuPrimitive.Popup.Props, 'className'>,\n Pick<\n MenuPrimitive.Positioner.Props,\n // positionMethod/collision*: the escape hatch for popups anchored\n // inside a transform/filter container (an animated panel is the usual\n // case), where the default absolute positioning resolves against the\n // wrong containing block — positionMethod=\"fixed\" is the standard\n // fix, and it must be reachable without bypassing the kit.\n | 'align'\n | 'alignOffset'\n | 'side'\n | 'sideOffset'\n | 'positionMethod'\n | 'collisionBoundary'\n | 'collisionPadding'\n > {\n className?: string;\n /**\n * Where to portal the popup. Defaults to <body>. Pass a themed container\n * when the theme is scoped to a subtree (data-theme on a container that\n * isn't at document root) so the popup inherits its tokens and font.\n * Inherited by nested DropdownMenuSubContent unless it passes its own.\n */\n container?: MenuPrimitive.Portal.Props['container'];\n}\n\nexport function DropdownMenuContent({\n className,\n children,\n container,\n side = 'bottom',\n sideOffset = 4,\n align = 'start',\n alignOffset = 0,\n positionMethod,\n collisionBoundary,\n collisionPadding,\n ...props\n}: DropdownMenuContentProps) {\n const inheritedContainer = useContext(MenuContainerContext);\n const effectiveContainer = container ?? inheritedContainer;\n return (\n <MenuContainerContext.Provider value={effectiveContainer}>\n <MenuPrimitive.Portal container={effectiveContainer}>\n <MenuPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n positionMethod={positionMethod}\n collisionBoundary={collisionBoundary}\n collisionPadding={collisionPadding}\n className={styles.positioner}\n >\n <MenuPrimitive.Popup className={cx(styles.popup, className)} {...props}>\n {children}\n </MenuPrimitive.Popup>\n </MenuPrimitive.Positioner>\n </MenuPrimitive.Portal>\n </MenuContainerContext.Provider>\n );\n}\n\nexport interface DropdownMenuGroupProps extends Omit<MenuPrimitive.Group.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuGroup({ className, ...props }: DropdownMenuGroupProps) {\n return <MenuPrimitive.Group className={className} {...props} />;\n}\n\nexport interface DropdownMenuLabelProps extends Omit<MenuPrimitive.GroupLabel.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuLabel({ className, ...props }: DropdownMenuLabelProps) {\n return <MenuPrimitive.GroupLabel className={cx(styles.label, className)} {...props} />;\n}\n\nconst itemVariants = cva(styles.item, {\n variants: {\n variant: {\n default: styles.variantDefault,\n destructive: styles.variantDestructive,\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\nexport interface DropdownMenuItemProps\n extends Omit<MenuPrimitive.Item.Props, 'className'>, VariantProps<typeof itemVariants> {\n className?: string;\n}\n\nexport function DropdownMenuItem({ className, variant, ...props }: DropdownMenuItemProps) {\n return <MenuPrimitive.Item className={itemVariants({ variant, className })} {...props} />;\n}\n\nexport interface DropdownMenuCheckboxItemProps\n extends Omit<MenuPrimitive.CheckboxItem.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuCheckboxItem({\n className,\n children,\n ...props\n}: DropdownMenuCheckboxItemProps) {\n return (\n <MenuPrimitive.CheckboxItem className={cx(styles.checkboxItem, className)} {...props}>\n {children}\n <MenuPrimitive.CheckboxItemIndicator className={styles.itemIndicator}>\n <CheckIcon />\n </MenuPrimitive.CheckboxItemIndicator>\n </MenuPrimitive.CheckboxItem>\n );\n}\n\nexport interface DropdownMenuRadioGroupProps\n extends Omit<MenuPrimitive.RadioGroup.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuRadioGroup({ className, ...props }: DropdownMenuRadioGroupProps) {\n return <MenuPrimitive.RadioGroup className={className} {...props} />;\n}\n\nexport interface DropdownMenuRadioItemProps\n extends Omit<MenuPrimitive.RadioItem.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: DropdownMenuRadioItemProps) {\n return (\n <MenuPrimitive.RadioItem className={cx(styles.radioItem, className)} {...props}>\n {children}\n <MenuPrimitive.RadioItemIndicator className={styles.itemIndicator}>\n <CheckIcon />\n </MenuPrimitive.RadioItemIndicator>\n </MenuPrimitive.RadioItem>\n );\n}\n\nexport interface DropdownMenuSeparatorProps\n extends Omit<MenuPrimitive.Separator.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuSeparator({ className, ...props }: DropdownMenuSeparatorProps) {\n return <MenuPrimitive.Separator className={cx(styles.separator, className)} {...props} />;\n}\n\nexport type DropdownMenuShortcutProps = ComponentProps<'span'>;\n\nexport function DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps) {\n return <span className={cx(styles.shortcut, className)} {...props} />;\n}\n\nexport const DropdownMenuSub = MenuPrimitive.SubmenuRoot;\n/** Pass-through props type — see DropdownMenuProps. */\nexport type DropdownMenuSubProps = MenuPrimitive.SubmenuRoot.Props;\n\nexport interface DropdownMenuSubTriggerProps\n extends Omit<MenuPrimitive.SubmenuTrigger.Props, 'className'> {\n className?: string;\n}\n\nexport function DropdownMenuSubTrigger({\n className,\n children,\n ...props\n}: DropdownMenuSubTriggerProps) {\n return (\n <MenuPrimitive.SubmenuTrigger className={cx(styles.subTrigger, className)} {...props}>\n {children}\n <ChevronRightIcon className={styles.subTriggerIcon} />\n </MenuPrimitive.SubmenuTrigger>\n );\n}\n\nexport type DropdownMenuSubContentProps = DropdownMenuContentProps;\n\nexport function DropdownMenuSubContent({\n className,\n side = 'right',\n align = 'start',\n sideOffset = 0,\n alignOffset = -3,\n ...props\n}: DropdownMenuSubContentProps) {\n return (\n <DropdownMenuContent\n className={cx(styles.subPopup, className)}\n side={side}\n align={align}\n sideOffset={sideOffset}\n alignOffset={alignOffset}\n {...props}\n />\n );\n}\n"],"names":["MenuContainerContext","createContext","CheckIcon","className","jsx","cx","styles","ChevronRightIcon","DropdownMenu","MenuPrimitive","DropdownMenuTrigger","props","DropdownMenuContent","children","container","side","sideOffset","align","alignOffset","positionMethod","collisionBoundary","collisionPadding","inheritedContainer","useContext","effectiveContainer","DropdownMenuGroup","DropdownMenuLabel","itemVariants","cva","DropdownMenuItem","variant","DropdownMenuCheckboxItem","jsxs","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSub","DropdownMenuSubTrigger","DropdownMenuSubContent"],"mappings":";;;;;;;;;;;;;;;;;;;;;GAiBMA,IAAuBC,EAAuD,MAAS;AAG7F,SAASC,EAAU,EAAE,WAAAC,KAAqC;AACxD,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAGC,EAAO,SAASH,CAAS;AAAA,MACvC,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,QAAO;AAAA,MACP,aAAY;AAAA,MACZ,eAAc;AAAA,MACd,gBAAe;AAAA,MACf,eAAY;AAAA,MAEZ,UAAA,gBAAAC,EAAC,QAAA,EAAK,GAAE,kBAAA,CA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L,GAAgC;AAC9B,SACE,gBAAAP;AAAA,IAACQ;AAAA,IAAA;AAAA,MACC,WAAWP,EAAGC,EAAO,UAAUH,CAAS;AAAA,MACxC,MAAAY;AAAA,MACA,OAAAE;AAAA,MACA,YAAAD;AAAA,MACA,aAAAE;AAAA,MACC,GAAGP;AAAA,IAAA;AAAA,EAAA;AAGV;"}
package/dist/toast.js CHANGED
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
3
  import { Toast as n } from "@base-ui/react/toast";
3
4
  import { cx as i } from "class-variance-authority";
package/dist/toast.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"toast.js","sources":["../src/components/toast/toast.tsx"],"sourcesContent":["import { Toast as ToastPrimitive } from '@base-ui/react/toast';\nimport { cx } from 'class-variance-authority';\n\nimport { Button } from '../button/button';\nimport styles from './toast.module.css';\n\n/*\n * Inline lucide paths (ISC) — the kit carries no icon dependency. One icon\n * per toast `type`; an unset/unrecognized type renders no icon, matching\n * the base-vega source's <ToastIcon>.\n */\nfunction CheckCircleIcon({ className }: { className?: string }) {\n return (\n <svg\n className={cx(styles.icon, className)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m9 12 2 2 4-4\" />\n </svg>\n );\n}\n\nfunction InfoIcon({ className }: { className?: string }) {\n return (\n <svg\n className={cx(styles.icon, className)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4\" />\n <path d=\"M12 8h.01\" />\n </svg>\n );\n}\n\nfunction TriangleAlertIcon({ className }: { className?: string }) {\n return (\n <svg\n className={cx(styles.icon, className)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\" />\n <path d=\"M12 9v4\" />\n <path d=\"M12 17h.01\" />\n </svg>\n );\n}\n\nfunction OctagonXIcon({ className }: { className?: string }) {\n return (\n <svg\n className={cx(styles.icon, className)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m15 9-6 6\" />\n <path d=\"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z\" />\n <path d=\"m9 9 6 6\" />\n </svg>\n );\n}\n\nfunction LoaderIcon({ className }: { className?: string }) {\n return (\n <svg\n className={cx(styles.icon, className)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\" />\n </svg>\n );\n}\n\nfunction CloseIcon({ className }: { className?: string }) {\n return (\n <svg\n className={cx(styles.svgIcon, className)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </svg>\n );\n}\n\nfunction ToastTypeIcon({ type }: { type?: string }) {\n switch (type) {\n case 'success':\n return <CheckCircleIcon />;\n case 'info':\n return <InfoIcon />;\n case 'warning':\n return <TriangleAlertIcon />;\n case 'error':\n return <OctagonXIcon className={styles.iconDestructive} />;\n case 'loading':\n return <LoaderIcon className={styles.iconSpin} />;\n default:\n return null;\n }\n}\n\n/*\n * One rendered toast card. Not exported — a `Toast` type prop drives the\n * icon and (via CSS `data-type`) any future type-specific styling, but the\n * kit's usage model is imperative (`toast.add({...})`, see below), not\n * composing a `<Toast>` per notification the way `Dialog`/`DropdownMenu`\n * are composed. `ToastPrimitive.Title`/`Description`/`Action` all read\n * their content from the `toast` object via context and render nothing if\n * it's unset — no children needed here.\n */\nfunction ToastCard({\n toast: item,\n closeLabel,\n}: {\n toast: ToastPrimitive.Root.ToastObject;\n closeLabel: string;\n}) {\n return (\n <ToastPrimitive.Root toast={item} className={styles.toast}>\n <ToastPrimitive.Content className={styles.content}>\n <ToastTypeIcon type={item.type} />\n <div className={styles.body}>\n <ToastPrimitive.Title className={styles.title} />\n <ToastPrimitive.Description className={styles.description} />\n </div>\n <ToastPrimitive.Action className={styles.action} render={<Button variant=\"outline\" size=\"sm\" />} />\n <ToastPrimitive.Close\n aria-label={closeLabel}\n className={styles.close}\n render={<Button variant=\"ghost\" icon={<CloseIcon />} />}\n />\n </ToastPrimitive.Content>\n </ToastPrimitive.Root>\n );\n}\n\n/* Reads the live toast list from context and renders one ToastCard each. */\nfunction ToastList({ closeLabel }: { closeLabel: string }) {\n const { toasts } = ToastPrimitive.useToastManager();\n return toasts.map((item) => <ToastCard key={item.id} toast={item} closeLabel={closeLabel} />);\n}\n\n/**\n * Shared imperative toast manager: call `toast.add({ title, description })`\n * (or `.close()`, `.update()`, `.promise()`) from anywhere in the app —\n * no hook, and no ancestor `Toaster`/`ToastProvider`, required to fire\n * one. `Toaster` renders whatever this manager holds by default.\n *\n * A module-scope singleton is a deliberate choice, not the only shape Base\n * UI's Toast offers (see `createToastManager`/`useToastManager` below): it\n * keeps sonner's own call-anywhere `toast()` ergonomics (see\n * design-notes.md for why Base UI's Toast replaced sonner) without needing\n * a component to be inside a Provider's subtree or accept a manager prop.\n *\n * Three failure modes worth knowing about a singleton, all silent: it's\n * SSR-safe (the object above holds no toast state itself, only a listener\n * registered by whichever `Toaster` mounts), but `toast.add(...)` called\n * before any `Toaster` has mounted, or from code that resolved a\n * different copy of this module (e.g. a mixed CJS/ESM require graph),\n * drops the toast with no error — there is no queue and nothing to catch.\n * And the inverse: TWO mounted `Toaster`s on this shared manager render\n * every toast twice, once per viewport (plausible in a shell + MFE setup\n * where each fragment mounts its own) — a second viewport should get its\n * own `createToastManager()` instead.\n */\nexport const toast = ToastPrimitive.createToastManager();\n\n/**\n * Reads the live toast list and the `add`/`close`/`update`/`promise`\n * bound to whichever manager the nearest `Toaster` ancestor was given\n * (the shared `toast` singleton unless overridden) — from a component\n * nested under `Toaster`, this is how you react to the toast list itself\n * (e.g. an unread-count badge) or call that same manager without\n * importing it directly. Not a way to render toast cards in place of\n * `Toaster`: the kit exports no Root/Content/Title/etc. parts to build\n * one with.\n *\n * Whether a consumer's own `@base-ui/react` shares this context depends\n * on whether the installer resolved one copy or two. `@base-ui/react` is\n * a regular dependency of this package and stays external in the build\n * (nothing is bundled but the CSS class maps), so a consumer whose own\n * range is satisfied by the same version dedupes to a single copy and\n * shares context; a consumer pinned to an incompatible version gets a\n * nested second copy, and then Base UI's Toast context — like every\n * React context — does not cross between them.\n */\nexport const useToastManager = ToastPrimitive.useToastManager;\n\n/**\n * Creates an isolated toast manager, independent of the shared `toast`\n * singleton — e.g. to scope a second, differently-positioned `Toaster` to\n * one part of the app instead of sharing the app-wide instance. Pass the\n * result as `toastManager` to `Toaster`.\n */\nexport const createToastManager = ToastPrimitive.createToastManager;\n\nexport interface ToasterProps extends ToastPrimitive.Provider.Props {\n /**\n * Where to portal the toast viewport. Defaults to <body>. Pass a themed\n * container when the theme is scoped to a subtree (data-theme on a\n * container that isn't at document root) so toasts inherit its tokens\n * and font.\n */\n container?: ToastPrimitive.Portal.Props['container'];\n /**\n * Accessible name for each toast's close (X) button — one of the two\n * strings a non-English app needs to replace (`label` below is the\n * other). @default 'Close toast'\n */\n closeLabel?: string;\n /**\n * Accessible name for the toast region landmark. Base UI puts\n * `role=\"region\" aria-label=\"Notifications\"` on the viewport; without\n * this prop a screen-reader user hears that English landmark name no\n * matter what language the app is in. @default 'Notifications'\n */\n label?: string;\n}\n\n/**\n * Mount once, wrapping the app (or at least any subtree that calls\n * `useToastManager`) — pass the app as `children`. The toast list itself\n * portals to `<body>` (or `container`) regardless of where `Toaster` sits\n * in the tree, so wrapping vs. mounting as a leaf near the root both work\n * for the common case of firing toasts via the `toast` manager above.\n *\n * Defaults `toastManager` to this module's shared singleton — see `toast`.\n */\nexport function Toaster({\n container,\n children,\n closeLabel = 'Close toast',\n // Defaulted here rather than left to Base UI's own 'Notifications', so an\n // explicit undefined can never wipe the landmark name in the merge.\n label = 'Notifications',\n toastManager = toast,\n ...props\n}: ToasterProps) {\n return (\n <ToastPrimitive.Provider toastManager={toastManager} {...props}>\n {children}\n <ToastPrimitive.Portal container={container}>\n <ToastPrimitive.Viewport aria-label={label} className={styles.viewport}>\n <ToastList closeLabel={closeLabel} />\n </ToastPrimitive.Viewport>\n </ToastPrimitive.Portal>\n </ToastPrimitive.Provider>\n );\n}\n"],"names":["CheckCircleIcon","className","jsxs","cx","styles","jsx","InfoIcon","TriangleAlertIcon","OctagonXIcon","LoaderIcon","CloseIcon","ToastTypeIcon","type","ToastCard","item","closeLabel","ToastPrimitive","Button","ToastList","toasts","toast","useToastManager","createToastManager","Toaster","container","children","label","toastManager","props"],"mappings":";;;;;;;;;;;;;;;;;;AAWA,SAASA,EAAgB,EAAE,WAAAC,KAAqC;AAC9D,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAGC,EAAO,MA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D,EAAA,CACF,EAAA,CACF;AAEJ;AAGA,SAASQ,EAAU,EAAE,YAAAH,KAAsC;AACzD,QAAM,EAAE,QAAAI,EAAA,IAAWH,EAAe,gBAAA;AAClC,SAAOG,EAAO,IAAI,CAACL,MAAS,gBAAAT,EAACQ,GAAA,EAAwB,OAAOC,GAAM,YAAAC,EAAA,GAAtBD,EAAK,EAAyC,CAAE;AAC9F;AAyBO,MAAMM,IAAQJ,EAAe,mBAAA,GAqBvBK,IAAkBL,EAAe,iBAQjCM,IAAqBN,EAAe;AAkC1C,SAASO,EAAQ;AAAA,EACtB,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAV,IAAa;AAAA;AAAA;AAAA,EAGb,OAAAW,IAAQ;AAAA,EACR,cAAAC,IAAeP;AAAA,EACf,GAAGQ;AACL,GAAiB;AACf,2BACGZ,EAAe,UAAf,EAAwB,cAAAW,GAA6B,GAAGC,GACtD,UAAA;AAAA,IAAAH;AAAA,sBACAT,EAAe,QAAf,EAAsB,WAAAQ,GACrB,UAAA,gBAAAnB,EAACW,EAAe,UAAf,EAAwB,cAAYU,GAAO,WAAWtB,EAAO,UAC5D,4BAACc,GAAA,EAAU,YAAAH,GAAwB,GACrC,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"toast.js","sources":["../src/components/toast/toast.tsx"],"sourcesContent":["// Load-bearing: ToastList calls useToastManager directly, so this can't be\n// dropped. Coupled to CLIENT_COMPONENTS in scripts/verify-consumer.sh —\n// keep both in sync if this ever changes.\n'use client';\n\nimport { Toast as ToastPrimitive } from '@base-ui/react/toast';\nimport { cx } from 'class-variance-authority';\n\nimport { Button } from '../button/button';\nimport styles from './toast.module.css';\n\n/*\n * Inline lucide paths (ISC) — the kit carries no icon dependency. One icon\n * per toast `type`; an unset/unrecognized type renders no icon, matching\n * the base-vega source's <ToastIcon>.\n */\nfunction CheckCircleIcon({ className }: { className?: string }) {\n return (\n <svg\n className={cx(styles.icon, className)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m9 12 2 2 4-4\" />\n </svg>\n );\n}\n\nfunction InfoIcon({ className }: { className?: string }) {\n return (\n <svg\n className={cx(styles.icon, className)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4\" />\n <path d=\"M12 8h.01\" />\n </svg>\n );\n}\n\nfunction TriangleAlertIcon({ className }: { className?: string }) {\n return (\n <svg\n className={cx(styles.icon, className)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\" />\n <path d=\"M12 9v4\" />\n <path d=\"M12 17h.01\" />\n </svg>\n );\n}\n\nfunction OctagonXIcon({ className }: { className?: string }) {\n return (\n <svg\n className={cx(styles.icon, className)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m15 9-6 6\" />\n <path d=\"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z\" />\n <path d=\"m9 9 6 6\" />\n </svg>\n );\n}\n\nfunction LoaderIcon({ className }: { className?: string }) {\n return (\n <svg\n className={cx(styles.icon, className)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\" />\n </svg>\n );\n}\n\nfunction CloseIcon({ className }: { className?: string }) {\n return (\n <svg\n className={cx(styles.svgIcon, className)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </svg>\n );\n}\n\nfunction ToastTypeIcon({ type }: { type?: string }) {\n switch (type) {\n case 'success':\n return <CheckCircleIcon />;\n case 'info':\n return <InfoIcon />;\n case 'warning':\n return <TriangleAlertIcon />;\n case 'error':\n return <OctagonXIcon className={styles.iconDestructive} />;\n case 'loading':\n return <LoaderIcon className={styles.iconSpin} />;\n default:\n return null;\n }\n}\n\n/*\n * One rendered toast card. Not exported — a `Toast` type prop drives the\n * icon and (via CSS `data-type`) any future type-specific styling, but the\n * kit's usage model is imperative (`toast.add({...})`, see below), not\n * composing a `<Toast>` per notification the way `Dialog`/`DropdownMenu`\n * are composed. `ToastPrimitive.Title`/`Description`/`Action` all read\n * their content from the `toast` object via context and render nothing if\n * it's unset — no children needed here.\n */\nfunction ToastCard({\n toast: item,\n closeLabel,\n}: {\n toast: ToastPrimitive.Root.ToastObject;\n closeLabel: string;\n}) {\n return (\n <ToastPrimitive.Root toast={item} className={styles.toast}>\n <ToastPrimitive.Content className={styles.content}>\n <ToastTypeIcon type={item.type} />\n <div className={styles.body}>\n <ToastPrimitive.Title className={styles.title} />\n <ToastPrimitive.Description className={styles.description} />\n </div>\n <ToastPrimitive.Action className={styles.action} render={<Button variant=\"outline\" size=\"sm\" />} />\n <ToastPrimitive.Close\n aria-label={closeLabel}\n className={styles.close}\n render={<Button variant=\"ghost\" icon={<CloseIcon />} />}\n />\n </ToastPrimitive.Content>\n </ToastPrimitive.Root>\n );\n}\n\n/* Reads the live toast list from context and renders one ToastCard each. */\nfunction ToastList({ closeLabel }: { closeLabel: string }) {\n const { toasts } = ToastPrimitive.useToastManager();\n return toasts.map((item) => <ToastCard key={item.id} toast={item} closeLabel={closeLabel} />);\n}\n\n/**\n * Shared imperative toast manager: call `toast.add({ title, description })`\n * (or `.close()`, `.update()`, `.promise()`) from anywhere in the app —\n * no hook, and no ancestor `Toaster`/`ToastProvider`, required to fire\n * one. `Toaster` renders whatever this manager holds by default.\n *\n * A module-scope singleton is a deliberate choice, not the only shape Base\n * UI's Toast offers (see `createToastManager`/`useToastManager` below): it\n * keeps sonner's own call-anywhere `toast()` ergonomics (see\n * design-notes.md for why Base UI's Toast replaced sonner) without needing\n * a component to be inside a Provider's subtree or accept a manager prop.\n *\n * Three failure modes worth knowing about a singleton, all silent: it's\n * SSR-safe (the object above holds no toast state itself, only a listener\n * registered by whichever `Toaster` mounts), but `toast.add(...)` called\n * before any `Toaster` has mounted, or from code that resolved a\n * different copy of this module (e.g. a mixed CJS/ESM require graph),\n * drops the toast with no error — there is no queue and nothing to catch.\n * And the inverse: TWO mounted `Toaster`s on this shared manager render\n * every toast twice, once per viewport (plausible in a shell + MFE setup\n * where each fragment mounts its own) — a second viewport should get its\n * own `createToastManager()` instead.\n */\nexport const toast = ToastPrimitive.createToastManager();\n\n/**\n * Reads the live toast list and the `add`/`close`/`update`/`promise`\n * bound to whichever manager the nearest `Toaster` ancestor was given\n * (the shared `toast` singleton unless overridden) — from a component\n * nested under `Toaster`, this is how you react to the toast list itself\n * (e.g. an unread-count badge) or call that same manager without\n * importing it directly. Not a way to render toast cards in place of\n * `Toaster`: the kit exports no Root/Content/Title/etc. parts to build\n * one with.\n *\n * Whether a consumer's own `@base-ui/react` shares this context depends\n * on whether the installer resolved one copy or two. `@base-ui/react` is\n * a regular dependency of this package and stays external in the build\n * (nothing is bundled but the CSS class maps), so a consumer whose own\n * range is satisfied by the same version dedupes to a single copy and\n * shares context; a consumer pinned to an incompatible version gets a\n * nested second copy, and then Base UI's Toast context — like every\n * React context — does not cross between them.\n */\nexport const useToastManager = ToastPrimitive.useToastManager;\n\n/**\n * Creates an isolated toast manager, independent of the shared `toast`\n * singleton — e.g. to scope a second, differently-positioned `Toaster` to\n * one part of the app instead of sharing the app-wide instance. Pass the\n * result as `toastManager` to `Toaster`.\n */\nexport const createToastManager = ToastPrimitive.createToastManager;\n\nexport interface ToasterProps extends ToastPrimitive.Provider.Props {\n /**\n * Where to portal the toast viewport. Defaults to <body>. Pass a themed\n * container when the theme is scoped to a subtree (data-theme on a\n * container that isn't at document root) so toasts inherit its tokens\n * and font.\n */\n container?: ToastPrimitive.Portal.Props['container'];\n /**\n * Accessible name for each toast's close (X) button — one of the two\n * strings a non-English app needs to replace (`label` below is the\n * other). @default 'Close toast'\n */\n closeLabel?: string;\n /**\n * Accessible name for the toast region landmark. Base UI puts\n * `role=\"region\" aria-label=\"Notifications\"` on the viewport; without\n * this prop a screen-reader user hears that English landmark name no\n * matter what language the app is in. @default 'Notifications'\n */\n label?: string;\n}\n\n/**\n * Mount once, wrapping the app (or at least any subtree that calls\n * `useToastManager`) — pass the app as `children`. The toast list itself\n * portals to `<body>` (or `container`) regardless of where `Toaster` sits\n * in the tree, so wrapping vs. mounting as a leaf near the root both work\n * for the common case of firing toasts via the `toast` manager above.\n *\n * Defaults `toastManager` to this module's shared singleton — see `toast`.\n */\nexport function Toaster({\n container,\n children,\n closeLabel = 'Close toast',\n // Defaulted here rather than left to Base UI's own 'Notifications', so an\n // explicit undefined can never wipe the landmark name in the merge.\n label = 'Notifications',\n toastManager = toast,\n ...props\n}: ToasterProps) {\n return (\n <ToastPrimitive.Provider toastManager={toastManager} {...props}>\n {children}\n <ToastPrimitive.Portal container={container}>\n <ToastPrimitive.Viewport aria-label={label} className={styles.viewport}>\n <ToastList closeLabel={closeLabel} />\n </ToastPrimitive.Viewport>\n </ToastPrimitive.Portal>\n </ToastPrimitive.Provider>\n );\n}\n"],"names":["CheckCircleIcon","className","jsxs","cx","styles","jsx","InfoIcon","TriangleAlertIcon","OctagonXIcon","LoaderIcon","CloseIcon","ToastTypeIcon","type","ToastCard","item","closeLabel","ToastPrimitive","Button","ToastList","toasts","toast","useToastManager","createToastManager","Toaster","container","children","label","toastManager","props"],"mappings":";;;;;;;;;;;;;;;;;;;AAgBA,SAASA,EAAgB,EAAE,WAAAC,KAAqC;AAC9D,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAGC,EAAO,MAAMH,CAAS;AAAA,MACpC,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,QAAO;AAAA,MACP,aAAY;AAAA,MACZ,eAAc;AAAA,MACd,gBAAe;AAAA,MACf,eAAY;AAAA,MAEZ,UAAA;AAAA,QAAA,gBAAAI,EAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,MAAK;AAAA,QAC/B,gBAAAA,EAAC,QAAA,EAAK,GAAE,gBAAA,CAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG9B;AAEA,SAASC,EAAS,EAAE,WAAAL,KAAqC;AACvD,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAGC,EAAO,MAAMH,CAAS;AAAA,MACpC,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,QAAO;AAAA,MACP,aAAY;AAAA,MACZ,eAAc;AAAA,MACd,gBAAe;AAAA,MACf,eAAY;AAAA,MAEZ,UAAA;AAAA,QAAA,gBAAAI,EAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,MAAK;AAAA,QAC/B,gBAAAA,EAAC,QAAA,EAAK,GAAE,YAAA,CAAY;AAAA,QACpB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AU,YAAAH,GAAwB,GACrC,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
package/llms.txt CHANGED
@@ -19,6 +19,12 @@ Rules for generated code:
19
19
  tree-shakes unused components' JS from a root import already, but only
20
20
  drops their CSS from a subpath import — Vite and webpack drop both either
21
21
  way, so this only matters when esbuild is the actual bundler running.
22
+ - In an RSC framework (Next.js App Router), every component EXCEPT Badge,
23
+ DropdownMenu, and Toast is safe to import and render directly from a
24
+ Server Component — no wrapping client-boundary module needed. Those three
25
+ ship their own `'use client'` banner (each calls a hook — `useRender`,
26
+ `useContext`, `useToastManager` — directly in its own render body) and so
27
+ always render on the client, wherever they're imported from.
22
28
  - The kit paints the page itself from its tokens and sets `color-scheme`: with
23
29
  no `data-theme` attribute anywhere, `prefers-color-scheme: dark` alone
24
30
  yields a correct, legible dark page (background, text, and UA-owned
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gears-frontx/ui-kit",
3
- "version": "0.3.0-alpha.2",
3
+ "version": "0.3.0-alpha.3",
4
4
  "description": "Standard React component base for FrontX templates - Base UI behavior, CSS Modules styling on semantic tokens, CVA variants",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -56,6 +56,7 @@
56
56
  "@vitest/coverage-v8": "4.1.4",
57
57
  "esbuild": "0.25.12",
58
58
  "jsdom": "26.1.0",
59
+ "magic-string": "0.30.21",
59
60
  "react": "19.2.8",
60
61
  "react-dom": "19.2.8",
61
62
  "rollup-plugin-node-externals": "^9.0.1",