@gears-frontx/ui-kit 0.3.0-alpha.1 → 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.
Files changed (55) hide show
  1. package/README.md +15 -0
  2. package/dist/badge.js +40 -19
  3. package/dist/badge.js.map +1 -1
  4. package/dist/button.js +40 -40
  5. package/dist/button.js.map +1 -1
  6. package/dist/checkbox.js +5 -5
  7. package/dist/chunks/badge.BcdxDzJ7.css +1 -0
  8. package/dist/chunks/button.DNo8DTR3.css +1 -0
  9. package/dist/chunks/checkbox.D3kdAalh.css +1 -0
  10. package/dist/chunks/input.C8RDCC-a.css +1 -0
  11. package/dist/chunks/radio-group.zAFY9yCF.css +1 -0
  12. package/dist/chunks/select.Dt0diN4P.css +1 -0
  13. package/dist/chunks/switch.CsaIRnCA.css +1 -0
  14. package/dist/chunks/{table.r8ppNt1W.css → table.BuWHXL6e.css} +1 -1
  15. package/dist/chunks/tabs.KEksCAxN.css +1 -0
  16. package/dist/chunks/{textarea.BKWvs6fD.css → textarea.N3iiWUuz.css} +1 -1
  17. package/dist/chunks/toast.DMUpK07T.css +1 -0
  18. package/dist/components/badge/badge.d.ts +14 -2
  19. package/dist/components/badge/badge.d.ts.map +1 -1
  20. package/dist/components/button/button.d.ts.map +1 -1
  21. package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
  22. package/dist/components/input/input.d.ts +17 -1
  23. package/dist/components/input/input.d.ts.map +1 -1
  24. package/dist/components/select/select.d.ts +2 -2
  25. package/dist/components/select/select.d.ts.map +1 -1
  26. package/dist/components/toast/toast.d.ts.map +1 -1
  27. package/dist/docs/badge.md +22 -8
  28. package/dist/docs/button.md +43 -8
  29. package/dist/docs/input.md +32 -6
  30. package/dist/docs/select.md +13 -9
  31. package/dist/dropdown-menu.js +42 -41
  32. package/dist/dropdown-menu.js.map +1 -1
  33. package/dist/input.js +27 -21
  34. package/dist/input.js.map +1 -1
  35. package/dist/radio-group.js +8 -8
  36. package/dist/select.js +57 -65
  37. package/dist/select.js.map +1 -1
  38. package/dist/switch.js +8 -8
  39. package/dist/table.js +33 -33
  40. package/dist/tabs.js +20 -20
  41. package/dist/textarea.js +4 -4
  42. package/dist/theme.css +31 -6
  43. package/dist/toast.js +61 -60
  44. package/dist/toast.js.map +1 -1
  45. package/llms.txt +32 -17
  46. package/package.json +2 -1
  47. package/dist/chunks/badge.ej-3-Xs4.css +0 -1
  48. package/dist/chunks/button.CKfALaMe.css +0 -1
  49. package/dist/chunks/checkbox.Dd6YDr20.css +0 -1
  50. package/dist/chunks/input.CrRQ0OAn.css +0 -1
  51. package/dist/chunks/radio-group.1Y6B0lXt.css +0 -1
  52. package/dist/chunks/select.BmyP2S2q.css +0 -1
  53. package/dist/chunks/switch.B_ebMSxR.css +0 -1
  54. package/dist/chunks/tabs.DqJE9cX3.css +0 -1
  55. package/dist/chunks/toast.DMl31Mq4.css +0 -1
@@ -1,7 +1,7 @@
1
1
  # Badge
2
2
 
3
- A status label: a colored dot plus an intent-colored caption, as a soft
4
- pill or a bare dot+label pair. Badge has no Base UI primitive — it's a
3
+ A status label: an intent-colored caption with an optional status dot or
4
+ icon, as a soft pill or a bare label. Badge has no Base UI primitive — it's a
5
5
  styled `span`, plus a `render` prop (via Base UI's `useRender`/`mergeProps`
6
6
  utilities) for the one case that needs it: rendering as a link.
7
7
 
@@ -19,10 +19,11 @@ orange is a misuse, not a style choice.
19
19
  `beta`/`new` → `info`, anything neutral (`draft`, `archived`, a count,
20
20
  a category) → `muted`.
21
21
  - `shape="pill"` (default) on busy surfaces where the label needs its own
22
- soft fill; `shape="dot"` inline with text or in dense tables where a fill
23
- would be noise — same dot and label, no pill behind them.
22
+ soft fill; `shape="plain"` inline with text or in dense tables where a
23
+ fill would be noise. Add `dot` when the state deserves a colored marker,
24
+ or pass `icon` for a more specific one — neither renders by default.
24
25
  - A clickable status filter — pass `render={<a href="..." />}`. The pill's
25
- fill deepens on hover and the dot shape underlines, but only when actually
26
+ fill deepens on hover and the plain shape underlines, but only when actually
26
27
  rendered as a link; a plain badge stays visually inert and never looks
27
28
  clickable when it isn't. The kit's focus ring appears automatically once
28
29
  the anchor receives keyboard focus. Give it discernible text — a badge
@@ -41,7 +42,9 @@ orange is a misuse, not a style choice.
41
42
  | Prop | Type | Default |
42
43
  |------|------|---------|
43
44
  | `variant` | `success` \| `warning` \| `info` \| `danger` \| `muted` | `muted` |
44
- | `shape` | `pill` \| `dot` | `pill` |
45
+ | `shape` | `pill` \| `plain` | `pill` |
46
+ | `dot` | `boolean` — show the status dot in the variant's accent color; ignored when `icon` is set | `false` |
47
+ | `icon` | `ReactNode` — leading icon, decorative (`aria-hidden`), 12px, accent-colored; replaces the dot | — |
45
48
  | `render` | `ReactElement` — replaces the root `span`, e.g. with an `<a>` | — |
46
49
  | `className` | `string` — merged after the variant/shape classes | — |
47
50
 
@@ -61,8 +64,14 @@ import { Badge } from '@gears-frontx/ui-kit';
61
64
  <Badge variant="info">Beta</Badge>
62
65
  <Badge>Draft</Badge> // muted is the default variant
63
66
 
64
- // Bare dot+label for dense/inline placements
65
- <Badge variant="success" shape="dot">Online</Badge>
67
+ // Status dot is opt-in
68
+ <Badge variant="success" dot>Running</Badge>
69
+
70
+ // Bare label for dense/inline placements (dot optional there too)
71
+ <Badge variant="success" shape="plain" dot>Online</Badge>
72
+
73
+ // A custom marker instead of the dot
74
+ <Badge variant="info" icon={<BetaIcon />}>Beta</Badge>
66
75
 
67
76
  // A badge that is actually a link — hover feedback only applies here
68
77
  <Badge variant="info" render={<a href="/filters/open" />}>
@@ -80,3 +89,8 @@ import { Badge } from '@gears-frontx/ui-kit';
80
89
  appears when the badge actually renders as a link via `render`.
81
90
  - Do not nest interactive controls inside a Badge — it is a label, not a
82
91
  container.
92
+ - Do not pass both `icon` and `dot` expecting both to render — `icon`
93
+ replaces the dot by design.
94
+ - Do not drop an icon into Badge's children (`<Badge><Icon />label</Badge>`)
95
+ — the kit no longer sizes a bare svg child; use the `icon` prop, which is
96
+ sized and accent-colored automatically.
@@ -36,6 +36,42 @@ polymorphism, correct disabled/focus behavior, `type="button"` by default
36
36
  All other props are native `<button>` props (`onClick`, `disabled`, `type`,
37
37
  `aria-*`, ...) and are forwarded as-is.
38
38
 
39
+ ## Custom colors
40
+
41
+ Variant colors are consumed through CSS custom properties, so a one-off
42
+ brand/status button is a consumer class away — no new variant needed:
43
+
44
+ | Property | Drives |
45
+ |----------|--------|
46
+ | `--button-bg` / `--button-fg` | fill / text at rest |
47
+ | `--button-bg-hover` / `--button-fg-hover` | fill / text on hover |
48
+ | `--button-border` | border color on every variant (transparent by default outside `outline`) |
49
+
50
+ ```css
51
+ .buy { --button-bg: var(--success); --button-bg-hover: color-mix(in oklab, var(--success) 90%, var(--foreground) 10%); --button-fg: var(--primary-foreground); }
52
+ ```
53
+
54
+ ```tsx
55
+ <Button className={styles.buy}>Buy now</Button>
56
+ ```
57
+
58
+ Setting only `--button-bg` keeps the button that color in EVERY state
59
+ (hover falls back to your rest color, never back to the variant's token);
60
+ add `--button-bg-hover` to restore hover feedback. Contrast is yours to
61
+ keep once you override: check your pairs against WCAG like the kit does
62
+ for its own variants, and give the focus ring the same care via
63
+ `--button-focus-ring` (see Anti-patterns) — it is drawn outside the button
64
+ as an `outline`, so only one tone is needed; it only ever borders the page
65
+ background, never your custom fill.
66
+
67
+ These properties are inherited custom properties and `.button` never resets
68
+ them, so where you set them matters: on the button's own class (`.buy`
69
+ above) it recolors that one button; on a container it themes every Button
70
+ underneath, including ones you didn't mean to touch — a clear button
71
+ sitting in an Input's `end` slot inside that container, for instance. Use
72
+ container-level scoping deliberately, or scope to the button itself to
73
+ avoid the surprise.
74
+
39
75
  Icon-only is derived, not a size: `icon` with no children renders a square
40
76
  button of the current `size`. There is no `size="icon"`.
41
77
 
@@ -83,14 +119,13 @@ import { Button } from '@gears-frontx/ui-kit';
83
119
 
84
120
  ## Anti-patterns
85
121
 
86
- - Do not restyle via inline `style` or ad-hoc CSS — brand changes belong in
87
- the theme tokens (`theme.css` CSS variables). If you rebrand the focus
88
- ring specifically via `--button-focus-ring`, note that the `default` and
89
- `destructive` variants also set an explicit `--button-focus-ring-inner`
90
- of their own (a two-tone ring, needed to clear WCAG contrast against
91
- their own fill) — overriding only `--button-focus-ring` on those two
92
- leaves the old inner color in place instead of following it; set both
93
- properties together when rebranding either variant's ring.
122
+ - Do not restyle via inline `style` or ad-hoc CSS rules against the kit's
123
+ classes — kit-wide brand changes belong in the theme tokens (`theme.css`
124
+ CSS variables), one-off button colors in the `--button-*` properties
125
+ above. If you rebrand the focus ring specifically via
126
+ `--button-focus-ring`, check your color against WCAG 1.4.11's 3:1 floor
127
+ on `--background` — the only surface the ring touches, since it is drawn
128
+ outside the button as an `outline` rather than on its edge.
94
129
  - Do not put an icon in `children` next to text — it lands in the `icon`
95
130
  slot, which is what sizes it, spaces it, hides it during `loading`, and
96
131
  keeps it out of the accessible name.
@@ -23,16 +23,34 @@ error, validation state) when rendered inside one.
23
23
  |------|------|---------|
24
24
  | `value` / `defaultValue` | controlled / uncontrolled value | — |
25
25
  | `onValueChange` | `(value: string, eventDetails) => void` — fires on every change | — |
26
+ | `icon` | `ReactNode` — leading icon slot, decorative (`aria-hidden`, no pointer events); pair with the right native `type` for semantics | — |
27
+ | `end` | `ReactNode` — trailing slot for live content (icon-button, adornment); rendered after the input, sized for an icon or a compact `size="sm"` icon-only Button | — |
26
28
  | `className` | `string` — merged after the kit class | — |
27
29
 
28
30
  All other props are native `<input>` props (`type`, `placeholder`,
29
31
  `disabled`, `required`, `aria-invalid`, ...) and are forwarded as-is.
30
32
  `aria-invalid` switches the border and ring to the destructive color.
31
33
 
32
- `type="search"` upgrades the field visually as well as semantically: a
33
- leading magnifier icon (decorative, `aria-hidden`) renders inside the
34
- field via a presentational wrapper element, and the input announces as a
35
- searchbox. No prop needed — the native type is the switch.
34
+ Icons are explicit: `icon` draws a leading icon inside the field (via a
35
+ presentational wrapper the component adds only when a slot is present),
36
+ `end` overlays trailing content such as a clear button. Semantics still
37
+ come from the native `type` — a search field is `type="search"` (searchbox
38
+ role) plus a magnifier passed to `icon`; nothing renders automatically.
39
+ A disabled input dims its `icon` and `end` slots too (0.42 opacity) — a
40
+ clear button left in `end` doesn't stay visually live just because it isn't
41
+ the native control. That dimming fires regardless of *why* the input is
42
+ disabled (the direct `disabled` prop or a `<Field disabled>` ancestor both
43
+ land on the real `<input>`). Removing `end`'s tab stop is a separate fix
44
+ and only covers the direct prop: passing `disabled` straight to `Input`
45
+ also sets `inert` on the `end` wrapper, which drops it from the tab order
46
+ and blocks activation — the actual fix for a keyboard user, since dimming
47
+ alone (`pointer-events: none`) only disarms the mouse. A field disabled
48
+ through `<Field disabled>`'s context still dims `end`, but Input has no way
49
+ to observe that context-driven disable from its own props, so it cannot set
50
+ `inert` for that path — an interactive `end` slot under a `Field`-disabled
51
+ input stays dim yet still tabbable and clickable via keyboard activation.
52
+ Consumers composing `end` from a `Field` should disable their own
53
+ interactive `end` content directly rather than relying on this.
36
54
 
37
55
  ## Examples
38
56
 
@@ -42,8 +60,14 @@ import { Input } from '@gears-frontx/ui-kit';
42
60
  // Uncontrolled with placeholder
43
61
  <Input placeholder="Project name" />
44
62
 
45
- // Search field — the native type brings the magnifier and searchbox role
46
- <Input type="search" placeholder="Search projects…" />
63
+ // Search field: the native type brings the searchbox role, the icon slot
64
+ // brings the magnifier, and `end` can hold a clear button
65
+ <Input
66
+ type="search"
67
+ placeholder="Search projects…"
68
+ icon={<MagnifierIcon />}
69
+ end={<Button variant="ghost" size="sm" icon={<CrossIcon />} aria-label="Clear" />}
70
+ />
47
71
 
48
72
  // Controlled
49
73
  <Input value={email} onValueChange={setEmail} type="email" />
@@ -63,3 +87,5 @@ import { Input } from '@gears-frontx/ui-kit';
63
87
  containers, colors to theme tokens.
64
88
  - Do not build a labelled input by hand — the `Field` composition handles
65
89
  label/error/description wiring.
90
+ - Do not put an interactive control in `icon` — that slot is aria-hidden
91
+ and pointer-transparent; live content goes in `end`.
@@ -6,7 +6,10 @@ form submission (hidden native input on the root) come from Base UI.
6
6
 
7
7
  Composition: `Select` (root, holds the value) → `SelectTrigger` (+
8
8
  `SelectValue` for the current label) → `SelectContent` → `SelectGroup` /
9
- `SelectLabel` / `SelectItem` / `SelectSeparator`.
9
+ `SelectLabel` / `SelectItem` / `SelectSeparator`. `SelectGroup` is only for
10
+ labelled sections — it is optional; the dropdown's inner padding lives on
11
+ the list itself, not on the group, so items placed directly under
12
+ `SelectContent` are padded the same either way.
10
13
 
11
14
  ## When to use
12
15
 
@@ -35,12 +38,15 @@ raw value instead of the label until the popup has been opened once.
35
38
  | `className` | `string` — merged after the kit class | — |
36
39
 
37
40
  `SelectValue`: renders the selected item's label. Pass `placeholder`
38
- directly to `SelectValue` (see example). `SelectContent`
39
- accepts positioning props (`side`, `sideOffset`, `align`, `alignOffset`,
40
- `alignItemWithTrigger`, plus the escape hatch for triggers inside a
41
- `transform`/`filter` container: `positionMethod="fixed"`,
42
- `collisionBoundary`, `collisionPadding`) and `container` — the popup
43
- portals to `<body>`
41
+ directly to `SelectValue` (see example). `SelectContent` always opens the
42
+ list on its `side` (below the trigger by default) — it never overlays the
43
+ trigger the way a native `<select>` does. With no value selected the list
44
+ starts scrolled to the top; when the selected option is beyond the fold,
45
+ it is scrolled into view on open. `SelectContent` accepts positioning
46
+ props (`side`, `sideOffset`, `align`, `alignOffset`, plus the escape
47
+ hatch for triggers inside a `transform`/`filter` container:
48
+ `positionMethod="fixed"`, `collisionBoundary`, `collisionPadding`) and
49
+ `container` — the popup portals to `<body>`
44
50
  by default, so if your theme lives on a subtree (`data-theme` on a
45
51
  section instead of `<html>`), pass that section as `container` or the
46
52
  popup renders with the root theme. `SelectItem` takes `value` (required) and
@@ -92,8 +98,6 @@ const REGIONS = [
92
98
 
93
99
  ## Anti-patterns
94
100
 
95
- - Do not put items directly under `SelectContent` without a `SelectGroup`
96
- — the group carries the list padding.
97
101
  - Do not use a select for navigation — that is a menu/link pattern.
98
102
  - Do not omit a placeholder or default value — an empty trigger gives the
99
103
  user (and the agent) nothing to read.
@@ -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","DropdownMenuRadioItem","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSub","DropdownMenuSubTrigger","DropdownMenuSubContent"],"mappings":";;;;;;;;;;;;;;;;;;;;GAYMA,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,CAAkB;AAAA,IAAA;AAAA,EAAA;AAGhC;AAEA,SAASG,EAAiB,EAAE,WAAAJ,KAAqC;AAC/D,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAA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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,CAAkB;AAAA,IAAA;AAAA,EAAA;AAGhC;AAEA,SAASG,EAAiB,EAAE,WAAAJ,KAAqC;AAC/D,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,gBAAA,CAAgB;AAAA,IAAA;AAAA,EAAA;AAG9B;AAEO,MAAMI,IAAeC,EAAc;AAanC,SAASC,EAAoB,EAAE,WAAAP,GAAW,GAAGQ,KAAmC;AACrF,2BAAQF,EAAc,SAAd,EAAsB,WAAAN,GAAuB,GAAGQ,GAAO;AACjE;AA6BO,SAASC,EAAoB;AAAA,EAClC,WAA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,EAAA,CAAO;AACzF;AAIO,SAASyB,GAAqB,EAAE,WAAAjC,GAAW,GAAGQ,KAAoC;AACvF,SAAO,gBAAAP,EAAC,UAAK,WAAWC,EAAGC,EAAO,UAAUH,CAAS,GAAI,GAAGQ,GAAO;AACrE;AAEO,MAAM0B,KAAkB5B,EAAc;AAStC,SAAS6B,GAAuB;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;"}
package/dist/input.js CHANGED
@@ -1,30 +1,36 @@
1
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
2
- import { Input as o } from "@base-ui/react/input";
3
- import { cx as h } from "class-variance-authority";
4
- import './chunks/input.CrRQ0OAn.css';const p = "_input_1y6th_6", i = "_searchWrap_1y6th_120", u = "_searchIcon_1y6th_126", _ = "_searchInput_1y6th_137", r = {
5
- input: p,
6
- searchWrap: i,
7
- searchIcon: u,
8
- searchInput: _
1
+ import { jsx as a, jsxs as m } from "react/jsx-runtime";
2
+ import { Input as d } from "@base-ui/react/input";
3
+ import { cx as u } from "class-variance-authority";
4
+ import { Children as e } from "react";
5
+ import './chunks/input.C8RDCC-a.css';const l = "_input_1v93o_6", I = "_wrap_1v93o_122", f = "_icon_1v93o_128", v = "_end_1v93o_143", E = "_hasIcon_1v93o_172", w = "_hasEnd_1v93o_178", n = {
6
+ input: l,
7
+ wrap: I,
8
+ icon: f,
9
+ end: v,
10
+ hasIcon: E,
11
+ hasEnd: w
9
12
  };
10
- function d({ className: e, type: s, ...a }) {
11
- const c = /* @__PURE__ */ t(
12
- o,
13
+ function A({ className: _, icon: r, end: c, disabled: i, ...h }) {
14
+ const o = e.toArray(r).some((t) => t !== ""), s = e.toArray(c).some((t) => t !== ""), p = /* @__PURE__ */ a(
15
+ d,
13
16
  {
14
- type: s,
15
- className: h(r.input, s === "search" && r.searchInput, e),
16
- ...a
17
+ className: u(
18
+ n.input,
19
+ o && n.hasIcon,
20
+ s && n.hasEnd,
21
+ _
22
+ ),
23
+ disabled: i,
24
+ ...h
17
25
  }
18
26
  );
19
- return s !== "search" ? c : /* @__PURE__ */ n("span", { className: r.searchWrap, children: [
20
- /* @__PURE__ */ n("svg", { className: r.searchIcon, "aria-hidden": "true", viewBox: "0 0 16 16", fill: "none", children: [
21
- /* @__PURE__ */ t("circle", { cx: "7", cy: "7", r: "4.5", stroke: "currentColor", strokeWidth: "1.5" }),
22
- /* @__PURE__ */ t("path", { d: "m10.5 10.5 3 3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
23
- ] }),
24
- c
27
+ return !o && !s ? p : /* @__PURE__ */ m("span", { className: n.wrap, children: [
28
+ o && /* @__PURE__ */ a("span", { className: n.icon, "aria-hidden": "true", children: r }),
29
+ p,
30
+ s && /* @__PURE__ */ a("span", { className: n.end, inert: i, children: c })
25
31
  ] });
26
32
  }
27
33
  export {
28
- d as Input
34
+ A as Input
29
35
  };
30
36
  //# sourceMappingURL=input.js.map
package/dist/input.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sources":["../src/components/input/input.tsx"],"sourcesContent":["import { Input as InputPrimitive } from '@base-ui/react/input';\nimport { cx } from 'class-variance-authority';\n\nimport styles from './input.module.css';\n\nexport interface InputProps extends Omit<InputPrimitive.Props, 'className'> {\n className?: string;\n}\n\nexport function Input({ className, type, ...props }: InputProps) {\n const input = (\n <InputPrimitive\n type={type}\n className={cx(styles.input, type === 'search' && styles.searchInput, className)}\n {...props}\n />\n );\n if (type !== 'search') {\n return input;\n }\n /*\n * The mockups' Field/search type (Figma frame 193:433) is the same field\n * with a leading magnifier. An <input> is a replaced element — no\n * ::before to draw into, and a background-image can't read the theme's\n * color tokens — so the icon needs this presentational wrapper. Only\n * type=\"search\" pays for it: every other type stays a bare <input>, and\n * the consumer className stays on the input either way, so styling\n * targets the same element regardless of type. Field wiring is\n * unaffected — the primitive is still the control Field talks to.\n */\n return (\n <span className={styles.searchWrap}>\n <svg className={styles.searchIcon} aria-hidden=\"true\" viewBox=\"0 0 16 16\" fill=\"none\">\n <circle cx=\"7\" cy=\"7\" r=\"4.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"m10.5 10.5 3 3\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n </svg>\n {input}\n </span>\n );\n}\n"],"names":["Input","className","type","props","input","jsx","InputPrimitive","cx","styles","jsxs"],"mappings":";;;;;;;;;AASO,SAASA,EAAM,EAAE,WAAAC,GAAW,MAAAC,GAAM,GAAGC,KAAqB;AAC/D,QAAMC,IACJ,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,MAAAJ;AAAA,MACA,WAAWK,EAAGC,EAAO,OAAON,MAAS,YAAYM,EAAO,aAAaP,CAAS;AAAA,MAC7E,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGR,SAAID,MAAS,WACJE,IAaP,gBAAAK,EAAC,QAAA,EAAK,WAAWD,EAAO,YACtB,UAAA;AAAA,IAAA,gBAAAC,EAAC,OAAA,EAAI,WAAWD,EAAO,YAAY,eAAY,QAAO,SAAQ,aAAY,MAAK,QAC7E,UAAA;AAAA,MAAA,gBAAAH,EAAC,UAAA,EAAO,IAAG,KAAI,IAAG,KAAI,GAAE,OAAM,QAAO,gBAAe,aAAY,MAAA,CAAM;AAAA,MACtE,gBAAAA,EAAC,UAAK,GAAE,kBAAiB,QAAO,gBAAe,aAAY,OAAM,eAAc,QAAA,CAAQ;AAAA,IAAA,GACzF;AAAA,IACCD;AAAA,EAAA,GACH;AAEJ;"}
1
+ {"version":3,"file":"input.js","sources":["../src/components/input/input.tsx"],"sourcesContent":["import { Input as InputPrimitive } from '@base-ui/react/input';\nimport { cx } from 'class-variance-authority';\nimport { Children, type ReactNode } from 'react';\n\nimport styles from './input.module.css';\n\nexport interface InputProps extends Omit<InputPrimitive.Props, 'className'> {\n className?: string;\n /**\n * Leading icon slot — decorative only: rendered aria-hidden with pointer\n * events off, so it never carries the field's name or steals a click.\n * Semantics stay on the input itself — a search field is `type=\"search\"`\n * plus a magnifier passed here.\n */\n icon?: ReactNode;\n /**\n * Trailing slot for live content — an icon-button (clear, reveal\n * password) or a small static adornment. Rendered after the <input> in\n * the DOM, so tab order is field first, then slot. The input clears a\n * compact icon-button's width (32px, size=\"sm\") of end padding; anything\n * wider is the consumer's padding to extend.\n */\n end?: ReactNode;\n}\n\n/*\n * An <input> is a replaced element — no ::before to draw into, and a\n * background-image can't read the theme's color tokens — so the slots need\n * a presentational wrapper. Only a slotted input pays for it: with neither\n * prop this stays a bare <input>, and the consumer className stays on the\n * input either way, so styling targets the same element regardless. Field\n * wiring is unaffected — the primitive is still the control Field talks to.\n */\nexport function Input({ className, icon, end, disabled, ...props }: InputProps) {\n // `icon != null`/`end != null` are true for `icon={false}`/`end={false}` —\n // a valid ReactNode that renders nothing — which is exactly what\n // `icon={cond && <Icon/>}` passes when `cond` is false. Same predicate as\n // Button's `hasLabel`, applied to a slot instead of children: it answers\n // \"is this renderable\" rather than \"is this set\".\n const hasIcon = Children.toArray(icon).some((child) => child !== '');\n const hasEnd = Children.toArray(end).some((child) => child !== '');\n const input = (\n <InputPrimitive\n className={cx(\n styles.input,\n hasIcon && styles.hasIcon,\n hasEnd && styles.hasEnd,\n className,\n )}\n disabled={disabled}\n {...props}\n />\n );\n if (!hasIcon && !hasEnd) {\n return input;\n }\n return (\n <span className={styles.wrap}>\n {hasIcon && (\n <span className={styles.icon} aria-hidden=\"true\">\n {icon}\n </span>\n )}\n {input}\n {/*\n * `inert` removes `end` from the tab order and blocks activation —\n * dimming alone (see input.module.css) stops nothing for a keyboard\n * user, since a Button inside `end` keeps its tab stop and still\n * fires on Enter/Space. Only wired from this direct `disabled` prop:\n * a Field-driven disable (`<Field disabled>`) reaches the rendered\n * <input> through Base UI's own FieldControl, deeper than this\n * component's props, so it can't be observed here — see input.md.\n */}\n {hasEnd && (\n <span className={styles.end} inert={disabled}>\n {end}\n </span>\n )}\n </span>\n );\n}\n"],"names":["Input","className","icon","end","disabled","props","hasIcon","Children","child","hasEnd","input","jsx","InputPrimitive","cx","styles","jsxs"],"mappings":";;;;;;;;;;;;AAiCO,SAASA,EAAM,EAAE,WAAAC,GAAW,MAAAC,GAAM,KAAAC,GAAK,UAAAC,GAAU,GAAGC,KAAqB;AAM9E,QAAMC,IAAUC,EAAS,QAAQL,CAAI,EAAE,KAAK,CAACM,MAAUA,MAAU,EAAE,GAC7DC,IAASF,EAAS,QAAQJ,CAAG,EAAE,KAAK,CAACK,MAAUA,MAAU,EAAE,GAC3DE,IACJ,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACTC,EAAO;AAAA,QACPR,KAAWQ,EAAO;AAAA,QAClBL,KAAUK,EAAO;AAAA,QACjBb;AAAA,MAAA;AAAA,MAEF,UAAAG;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGR,SAAI,CAACC,KAAW,CAACG,IACRC,IAGP,gBAAAK,EAAC,QAAA,EAAK,WAAWD,EAAO,MACrB,UAAA;AAAA,IAAAR,uBACE,QAAA,EAAK,WAAWQ,EAAO,MAAM,eAAY,QACvC,UAAAZ,EAAA,CACH;AAAA,IAEDQ;AAAA,IAUAD,uBACE,QAAA,EAAK,WAAWK,EAAO,KAAK,OAAOV,GACjC,UAAAD,EAAA,CACH;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -1,18 +1,18 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { Radio as a } from "@base-ui/react/radio";
3
- import { RadioGroup as n } from "@base-ui/react/radio-group";
4
- import { cx as c } from "class-variance-authority";
5
- import './chunks/radio-group.1Y6B0lXt.css';const s = "_group_4704v_6", m = "_item_4704v_12", d = "_indicator_4704v_90", e = "_dot_4704v_98", t = {
2
+ import { Radio as n } from "@base-ui/react/radio";
3
+ import { RadioGroup as c } from "@base-ui/react/radio-group";
4
+ import { cx as a } from "class-variance-authority";
5
+ import './chunks/radio-group.zAFY9yCF.css';const s = "_group_19jni_6", m = "_item_19jni_12", d = "_indicator_19jni_93", e = "_dot_19jni_101", i = {
6
6
  group: s,
7
7
  item: m,
8
8
  indicator: d,
9
9
  dot: e
10
10
  };
11
- function f({ className: r, ...i }) {
12
- return /* @__PURE__ */ o(n, { className: c(t.group, r), ...i });
11
+ function f({ className: t, ...r }) {
12
+ return /* @__PURE__ */ o(c, { className: a(i.group, t), ...r });
13
13
  }
14
- function R({ className: r, ...i }) {
15
- return /* @__PURE__ */ o(a.Root, { className: c(t.item, r), ...i, children: /* @__PURE__ */ o(a.Indicator, { className: t.indicator, children: /* @__PURE__ */ o("span", { className: t.dot }) }) });
14
+ function R({ className: t, ...r }) {
15
+ return /* @__PURE__ */ o(n.Root, { className: a(i.item, t), ...r, children: /* @__PURE__ */ o(n.Indicator, { className: i.indicator, children: /* @__PURE__ */ o("span", { className: i.dot }) }) });
16
16
  }
17
17
  export {
18
18
  f as RadioGroup,