@photon-ai/pho-ui 1.1.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/chunks/IconCheck-D2WuculQ.js +11 -0
  2. package/dist/chunks/IconCheck-D2WuculQ.js.map +1 -0
  3. package/dist/chunks/card-9cGnv-VD.js +56 -0
  4. package/dist/chunks/card-9cGnv-VD.js.map +1 -0
  5. package/dist/chunks/{input-BSJGBUbf.js → input-CxS7ndpb.js} +7 -7
  6. package/dist/chunks/input-CxS7ndpb.js.map +1 -0
  7. package/dist/chunks/input-group-D6dlma8k.js +85 -0
  8. package/dist/chunks/input-group-D6dlma8k.js.map +1 -0
  9. package/dist/chunks/{menu-Dan0oRvL.js → menu-BSXds3Rt.js} +2 -2
  10. package/dist/chunks/{menu-Dan0oRvL.js.map → menu-BSXds3Rt.js.map} +1 -1
  11. package/dist/chunks/settings-B0vhLoMi.js +134 -0
  12. package/dist/chunks/settings-B0vhLoMi.js.map +1 -0
  13. package/dist/chunks/sidebar-BCqq58hV.js +177 -0
  14. package/dist/chunks/sidebar-BCqq58hV.js.map +1 -0
  15. package/dist/chunks/use-press-pulse-8iorQPsh.js +62 -0
  16. package/dist/chunks/use-press-pulse-8iorQPsh.js.map +1 -0
  17. package/dist/components/card.js +6 -0
  18. package/dist/components/checkbox.js +33 -28
  19. package/dist/components/checkbox.js.map +1 -1
  20. package/dist/components/context-menu.js +2 -2
  21. package/dist/components/field.js +17 -17
  22. package/dist/components/field.js.map +1 -1
  23. package/dist/components/input-group.js +5 -0
  24. package/dist/components/input.js +1 -1
  25. package/dist/components/menu.js +1 -1
  26. package/dist/components/select.js +83 -39
  27. package/dist/components/select.js.map +1 -1
  28. package/dist/index.js +48 -35
  29. package/dist/primitives.js +1 -1
  30. package/dist/sections/settings.js +5 -4
  31. package/dist/sections/sidebar.js +8 -5
  32. package/dist/src/components/card/card.d.ts +75 -0
  33. package/dist/src/components/card/index.d.ts +1 -0
  34. package/dist/src/components/checkbox/checkbox.d.ts +5 -1
  35. package/dist/src/components/input-group/index.d.ts +1 -0
  36. package/dist/src/components/input-group/input-group.d.ts +57 -0
  37. package/dist/src/components/select/index.d.ts +1 -1
  38. package/dist/src/components/select/select.d.ts +29 -10
  39. package/dist/src/index.d.ts +2 -0
  40. package/dist/src/sections/settings/index.d.ts +1 -1
  41. package/dist/src/sections/settings/settings.d.ts +71 -29
  42. package/dist/src/sections/sidebar/index.d.ts +1 -1
  43. package/dist/src/sections/sidebar/sidebar.d.ts +21 -3
  44. package/dist/src/utils/index.d.ts +1 -0
  45. package/dist/src/utils/use-press-pulse.d.ts +41 -0
  46. package/dist/utils.js +12 -8
  47. package/package.json +9 -1
  48. package/src/styles/theme.css +7 -4
  49. package/dist/chunks/input-BSJGBUbf.js.map +0 -1
  50. package/dist/chunks/settings-B3ilbRcF.js +0 -104
  51. package/dist/chunks/settings-B3ilbRcF.js.map +0 -1
  52. package/dist/chunks/sidebar-C5cIhWs1.js +0 -164
  53. package/dist/chunks/sidebar-C5cIhWs1.js.map +0 -1
@@ -1,69 +1,113 @@
1
1
  "use client";
2
2
  import { t as a } from "../chunks/cn-DTiB6ek_.js";
3
- import "react";
4
- import { jsx as o } from "react/jsx-runtime";
5
- import { Select as r } from "@base-ui/react/select";
6
- var i = r.Root, s = r.Value, p = r.Portal, l = r.List, c = r.Group, u = r.ItemText;
7
- function d({ className: e, ...t }) {
8
- return /* @__PURE__ */ o(r.Trigger, {
9
- className: a("bg-pho-primary ring-pho-primary text-pho-primary outline-pho-brand rounded-base flex min-w-44 cursor-pointer items-center justify-between gap-2 px-3 py-2 text-base ring-1 transition select-none ring-inset", "data-[popup-open]:ring-pho-brand focus-visible:outline-2 focus-visible:-outline-offset-1", "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50", "[&_svg]:text-pho-secondary [&_svg]:size-4", e),
10
- ...t
3
+ import { r as p } from "../chunks/use-press-pulse-8iorQPsh.js";
4
+ import { t as u } from "../chunks/IconCheck-D2WuculQ.js";
5
+ import { createContext as m, useContext as g } from "react";
6
+ import { jsx as r } from "react/jsx-runtime";
7
+ import { motion as h } from "motion/react";
8
+ import { Select as o } from "@base-ui/react/select";
9
+ var c = m(!1), f = 0.99, y = {
10
+ type: "spring",
11
+ stiffness: 1100,
12
+ damping: 40,
13
+ mass: 0.04
14
+ };
15
+ function b({ multiple: e = !1, ...t }) {
16
+ return /* @__PURE__ */ r(c.Provider, {
17
+ value: !!e,
18
+ children: /* @__PURE__ */ r(o.Root, {
19
+ multiple: e,
20
+ ...t
21
+ })
11
22
  });
12
23
  }
13
- function m({ className: e, ...t }) {
14
- return /* @__PURE__ */ o(r.Icon, {
24
+ var x = o.Value, v = o.Portal, I = o.List, N = o.Group, P = a("flex cursor-pointer items-center justify-between gap-2 text-base select-none", "transition-[color,background-color,box-shadow,outline-color] duration-150 ease-out", "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50", "[&_svg]:text-pho-secondary [&_svg]:size-4");
25
+ function w({ className: e, disabled: t, variant: n = "default", onPointerDown: s, ...i }) {
26
+ const l = n === "inline", { motionProps: d } = p({
27
+ scale: l ? f : 0.98,
28
+ transition: l ? y : void 0,
29
+ disabled: !!t
30
+ });
31
+ return /* @__PURE__ */ r(o.Trigger, {
32
+ disabled: t,
33
+ onPointerDown: s,
34
+ render: /* @__PURE__ */ r(h.button, { ...d }),
35
+ className: a(P, l ? "rounded-base min-w-0 bg-transparent focus-visible:outline-none" : a("bg-pho-primary ring-pho-primary text-pho-primary outline-pho-brand rounded-base min-w-44 px-3 py-2 ring-1 ring-inset", "data-[popup-open]:ring-pho-brand focus-visible:outline-2 focus-visible:-outline-offset-1"), e),
36
+ ...i
37
+ });
38
+ }
39
+ function S({ className: e, ...t }) {
40
+ return /* @__PURE__ */ r(o.Icon, {
15
41
  className: a("flex shrink-0 items-center", e),
16
42
  ...t
17
43
  });
18
44
  }
19
- function g({ className: e, sideOffset: t = 6, ...n }) {
20
- return /* @__PURE__ */ o(r.Positioner, {
45
+ function _({ className: e, sideOffset: t = 6, align: n = "start", alignItemWithTrigger: s = !1, ...i }) {
46
+ return /* @__PURE__ */ r(o.Positioner, {
21
47
  sideOffset: t,
48
+ align: n,
49
+ alignItemWithTrigger: s,
22
50
  className: a("z-50 outline-none", e),
23
- ...n
51
+ ...i
24
52
  });
25
53
  }
26
- function h({ className: e, ...t }) {
27
- return /* @__PURE__ */ o(r.Popup, {
28
- className: a("bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary rounded-base max-h-[var(--available-height)] min-w-[var(--anchor-width)] origin-[var(--transform-origin)] overflow-y-auto p-1 ring-1 transition-[transform,opacity] duration-150 ease-out outline-none ring-inset", "data-[starting-style]:scale-95 data-[starting-style]:opacity-0", "data-[ending-style]:scale-95 data-[ending-style]:opacity-0", e),
54
+ function z({ className: e, ...t }) {
55
+ return /* @__PURE__ */ r(o.Popup, {
56
+ className: a("bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary rounded-base max-h-[var(--available-height)] min-w-[var(--anchor-width)] origin-[var(--transform-origin)] overflow-y-auto p-1 ring-1 outline-none ring-inset", "transition-[transform,opacity] duration-[140ms] ease-[cubic-bezier(0.34,1.3,0.64,1)]", "data-[starting-style]:scale-95 data-[starting-style]:opacity-0", "data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:duration-100 data-[ending-style]:ease-out", e),
29
57
  ...t
30
58
  });
31
59
  }
32
- function y({ className: e, ...t }) {
33
- return /* @__PURE__ */ o(r.Item, {
34
- className: a("text-pho-secondary grid cursor-pointer grid-cols-[1rem_1fr] items-center gap-2 rounded-[calc(var(--radius-base)-4px)] py-1.5 pr-2.5 pl-2 text-base outline-none select-none", "data-[highlighted]:bg-pho-ghost-hover data-[highlighted]:text-pho-primary data-[disabled]:opacity-50", e),
60
+ function E({ className: e, ...t }) {
61
+ return /* @__PURE__ */ r(o.Item, {
62
+ className: a("group/pho-item text-pho-secondary grid cursor-pointer grid-cols-[1rem_1fr] items-center gap-2 rounded-[calc(var(--radius-base)-4px)] py-1.5 pr-2.5 pl-2 text-base outline-none select-none", "data-[highlighted]:bg-pho-ghost-hover data-[highlighted]:text-pho-primary data-[disabled]:opacity-50", e),
35
63
  ...t
36
64
  });
37
65
  }
38
- function f({ className: e, ...t }) {
39
- return /* @__PURE__ */ o(r.ItemIndicator, {
40
- className: a("text-pho-brand col-start-1 flex items-center [&>svg]:size-4", e),
66
+ function G({ className: e, ...t }) {
67
+ return /* @__PURE__ */ r(o.ItemText, {
68
+ className: a("col-start-2 min-w-0", e),
41
69
  ...t
42
70
  });
43
71
  }
44
- function x({ className: e, ...t }) {
45
- return /* @__PURE__ */ o(r.GroupLabel, {
72
+ function L({ className: e, children: t, ...n }) {
73
+ const s = g(c), i = t ?? /* @__PURE__ */ r(u, {});
74
+ return s ? /* @__PURE__ */ r("span", {
75
+ "aria-hidden": !0,
76
+ className: a("col-start-1 flex size-4 shrink-0 items-center justify-center rounded-sm ring-1 ring-inset", "bg-pho-primary ring-pho-primary text-pho-on-brand", "transition-[background-color,box-shadow,color] duration-150 ease-out", "group-data-[selected]/pho-item:bg-pho-brand-solid group-data-[selected]/pho-item:ring-transparent"),
77
+ children: /* @__PURE__ */ r(o.ItemIndicator, {
78
+ className: a("flex items-center justify-center [&>svg]:size-3", "transition-[transform,opacity] duration-150 ease-out", "data-[starting-style]:scale-50 data-[starting-style]:opacity-0", "data-[ending-style]:scale-50 data-[ending-style]:opacity-0", e),
79
+ ...n,
80
+ children: i
81
+ })
82
+ }) : /* @__PURE__ */ r(o.ItemIndicator, {
83
+ className: a("text-pho-brand col-start-1 flex size-4 items-center justify-center [&>svg]:size-4", e),
84
+ ...n,
85
+ children: i
86
+ });
87
+ }
88
+ function R({ className: e, ...t }) {
89
+ return /* @__PURE__ */ r(o.GroupLabel, {
46
90
  className: a("text-pho-secondary px-2.5 py-1.5 text-xs font-medium", e),
47
91
  ...t
48
92
  });
49
93
  }
50
- var N = {
51
- Root: i,
52
- Trigger: d,
53
- Value: s,
54
- Icon: m,
55
- Portal: p,
56
- Positioner: g,
57
- Popup: h,
58
- List: l,
59
- Item: y,
60
- ItemText: u,
61
- ItemIndicator: f,
62
- Group: c,
63
- GroupLabel: x
94
+ var M = {
95
+ Root: b,
96
+ Trigger: w,
97
+ Value: x,
98
+ Icon: S,
99
+ Portal: v,
100
+ Positioner: _,
101
+ Popup: z,
102
+ List: I,
103
+ Item: E,
104
+ ItemText: G,
105
+ ItemIndicator: L,
106
+ Group: N,
107
+ GroupLabel: R
64
108
  };
65
109
  export {
66
- N as Select
110
+ M as Select
67
111
  };
68
112
 
69
113
  //# sourceMappingURL=select.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","names":[],"sources":["../../src/components/select/select.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Select as BaseSelect } from \"@base-ui/react/select\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nconst Root = BaseSelect.Root;\nconst Value = BaseSelect.Value;\nconst Portal = BaseSelect.Portal;\nconst List = BaseSelect.List;\nconst Group = BaseSelect.Group;\nconst ItemText = BaseSelect.ItemText;\n\nfunction Trigger({\n className,\n ...props\n}: StyledProps<typeof BaseSelect.Trigger>) {\n return (\n <BaseSelect.Trigger\n className={cn(\n // Flat field surface — shadows are reserved for floating layers;\n // the 15% ring-pho-primary hairline is the input edge.\n \"bg-pho-primary ring-pho-primary text-pho-primary outline-pho-brand rounded-base flex min-w-44 cursor-pointer items-center justify-between gap-2 px-3 py-2 text-base ring-1 transition select-none ring-inset\",\n \"data-[popup-open]:ring-pho-brand focus-visible:outline-2 focus-visible:-outline-offset-1\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\",\n \"[&_svg]:text-pho-secondary [&_svg]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Icon({ className, ...props }: StyledProps<typeof BaseSelect.Icon>) {\n return (\n <BaseSelect.Icon\n className={cn(\"flex shrink-0 items-center\", className)}\n {...props}\n />\n );\n}\n\nfunction Positioner({\n className,\n sideOffset = 6,\n ...props\n}: StyledProps<typeof BaseSelect.Positioner>) {\n return (\n <BaseSelect.Positioner\n sideOffset={sideOffset}\n className={cn(\"z-50 outline-none\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BaseSelect.Popup>) {\n return (\n <BaseSelect.Popup\n className={cn(\n // Floating layer: keeps its elevation shadow, edged with the site\n // hairline (ring-pho-secondary, #eee/#202020).\n \"bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary rounded-base max-h-[var(--available-height)] min-w-[var(--anchor-width)] origin-[var(--transform-origin)] overflow-y-auto p-1 ring-1 transition-[transform,opacity] duration-150 ease-out outline-none ring-inset\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Item({ className, ...props }: StyledProps<typeof BaseSelect.Item>) {\n return (\n <BaseSelect.Item\n className={cn(\n \"text-pho-secondary grid cursor-pointer grid-cols-[1rem_1fr] items-center gap-2 rounded-[calc(var(--radius-base)-4px)] py-1.5 pr-2.5 pl-2 text-base outline-none select-none\",\n // Secondary at rest; highlight lifts to primary + ghost wash (Menu idiom).\n \"data-[highlighted]:bg-pho-ghost-hover data-[highlighted]:text-pho-primary data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ItemIndicator({\n className,\n ...props\n}: StyledProps<typeof BaseSelect.ItemIndicator>) {\n return (\n <BaseSelect.ItemIndicator\n className={cn(\n \"text-pho-brand col-start-1 flex items-center [&>svg]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction GroupLabel({\n className,\n ...props\n}: StyledProps<typeof BaseSelect.GroupLabel>) {\n return (\n <BaseSelect.GroupLabel\n className={cn(\n \"text-pho-secondary px-2.5 py-1.5 text-xs font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Select built on Base UI `Select` — pick one option (or several with\n * `multiple`) from a list that opens on click. Pass `items` to `Select.Root`,\n * render an `Item` per option, and show the selection with `Select.Value`. For\n * a short, always-visible set use `RadioGroup`; to filter a long list by typing\n * use `Combobox`.\n */\nexport const Select = {\n Root,\n Trigger,\n Value,\n Icon,\n Portal,\n Positioner,\n Popup,\n List,\n Item,\n ItemText,\n ItemIndicator,\n Group,\n GroupLabel,\n};\n"],"mappings":";;;;;AAYA,IAAM,IAAO,EAAW,MAClB,IAAQ,EAAW,OACnB,IAAS,EAAW,QACpB,IAAO,EAAW,MAClB,IAAQ,EAAW,OACnB,IAAW,EAAW;AAE5B,SAAS,EAAQ,EACf,WAAA,GACA,GAAG,EAAA,GACsC;AACzC,SACE,gBAAA,EAAC,EAAW,SAAZ;AAAA,IACE,WAAW,EAGT,gNACA,4FACA,iEACA,6CACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAK,EAAE,WAAA,GAAW,GAAG,EAAA,GAA8C;AAC1E,SACE,gBAAA,EAAC,EAAW,MAAZ;AAAA,IACE,WAAW,EAAG,8BAA8B,CAAS;AAAA,IACrD,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAW,EAClB,WAAA,GACA,YAAA,IAAa,GACb,GAAG,EAAA,GACyC;AAC5C,SACE,gBAAA,EAAC,EAAW,YAAZ;AAAA,IACc,YAAA;AAAA,IACZ,WAAW,EAAG,qBAAqB,CAAS;AAAA,IAC5C,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EAAE,WAAA,GAAW,GAAG,EAAA,GAA+C;AAC5E,SACE,gBAAA,EAAC,EAAW,OAAZ;AAAA,IACE,WAAW,EAGT,sRACA,kEACA,8DACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAK,EAAE,WAAA,GAAW,GAAG,EAAA,GAA8C;AAC1E,SACE,gBAAA,EAAC,EAAW,MAAZ;AAAA,IACE,WAAW,EACT,+KAEA,wGACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAc,EACrB,WAAA,GACA,GAAG,EAAA,GAC4C;AAC/C,SACE,gBAAA,EAAC,EAAW,eAAZ;AAAA,IACE,WAAW,EACT,+DACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAW,EAClB,WAAA,GACA,GAAG,EAAA,GACyC;AAC5C,SACE,gBAAA,EAAC,EAAW,YAAZ;AAAA,IACE,WAAW,EACT,wDACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AASA,IAAa,IAAS;AAAA,EACpB,MAAA;AAAA,EACA,SAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AAAA,EACA,YAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA;AAAA,EACA,eAAA;AAAA,EACA,OAAA;AAAA,EACA,YAAA;AACF"}
1
+ {"version":3,"file":"select.js","names":[],"sources":["../../src/components/select/select.tsx"],"sourcesContent":["import {\n createContext,\n useContext,\n type ComponentProps,\n type ElementType,\n type ReactNode,\n} from \"react\";\nimport { Select as BaseSelect } from \"@base-ui/react/select\";\nimport { motion } from \"motion/react\";\nimport { IconCheck } from \"@tabler/icons-react\";\nimport { cn } from \"../../utils/cn\";\nimport { usePressPulse } from \"../../utils/use-press-pulse\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\n/** Lets `ItemIndicator` know whether the Root is in `multiple` mode. */\nconst SelectMultipleContext = createContext(false);\n\nexport type SelectTriggerVariant = \"default\" | \"inline\";\n\n// Inline rides someone else's surface, so its pulse is shallower and snappier\n// than the default field's (0.98 / stiffness 700) — felt, not seen moving.\nconst INLINE_PRESS_SCALE = 0.99;\nconst INLINE_PRESS_SPRING = {\n type: \"spring\",\n stiffness: 1100,\n damping: 40,\n mass: 0.04,\n} as const;\n\nfunction Root({\n multiple = false,\n ...props\n}: ComponentProps<typeof BaseSelect.Root>) {\n return (\n <SelectMultipleContext.Provider value={Boolean(multiple)}>\n <BaseSelect.Root multiple={multiple} {...props} />\n </SelectMultipleContext.Provider>\n );\n}\n\nconst Value = BaseSelect.Value;\nconst Portal = BaseSelect.Portal;\nconst List = BaseSelect.List;\nconst Group = BaseSelect.Group;\n\n// Shared by both Trigger variants — layout, easing, disabled, icon tone.\nconst TRIGGER_BASE = cn(\n \"flex cursor-pointer items-center justify-between gap-2 text-base select-none\",\n // Colors/stroke ease briefly; transform stays out (Motion owns it).\n \"transition-[color,background-color,box-shadow,outline-color] duration-150 ease-out\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\",\n \"[&_svg]:text-pho-secondary [&_svg]:size-4\",\n);\n\nfunction Trigger({\n className,\n disabled,\n variant = \"default\",\n onPointerDown,\n ...props\n}: StyledProps<typeof BaseSelect.Trigger> & {\n /**\n * `inline` drops the field chrome (ring, background, padding, min-width)\n * to ride a host surface — an Input Group addon, a toolbar — which then\n * carries the focus/open treatment. The press pulse moves to the arrow.\n * @default \"default\"\n */\n variant?: SelectTriggerVariant;\n}) {\n // One-shot press pulse (fires on pointer-down, always completes) — the\n // Effect Button gesture family adapted for a field-sized control. Both\n // variants pulse the whole trigger; inline is shallower and quicker.\n const inline = variant === \"inline\";\n const { motionProps } = usePressPulse({\n scale: inline ? INLINE_PRESS_SCALE : 0.98,\n transition: inline ? INLINE_PRESS_SPRING : undefined,\n disabled: Boolean(disabled),\n });\n\n return (\n <BaseSelect.Trigger\n disabled={disabled}\n onPointerDown={onPointerDown}\n // Motion owns transform; a caller-supplied `render` in props still wins.\n render={<motion.button {...motionProps} />}\n className={cn(\n TRIGGER_BASE,\n inline\n ? // Chrome-free: no surface of its own, text inherits the host\n // tone, and the host shows focus (e.g. Input Group's shared ring).\n \"rounded-base min-w-0 bg-transparent focus-visible:outline-none\"\n : cn(\n // Flat field surface — shadows are reserved for floating\n // layers; the 15% ring-pho-primary hairline is the input edge.\n \"bg-pho-primary ring-pho-primary text-pho-primary outline-pho-brand rounded-base min-w-44 px-3 py-2 ring-1 ring-inset\",\n \"data-[popup-open]:ring-pho-brand focus-visible:outline-2 focus-visible:-outline-offset-1\",\n ),\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Icon({ className, ...props }: StyledProps<typeof BaseSelect.Icon>) {\n return (\n <BaseSelect.Icon\n className={cn(\"flex shrink-0 items-center\", className)}\n {...props}\n />\n );\n}\n\nfunction Positioner({\n className,\n sideOffset = 6,\n align = \"start\",\n alignItemWithTrigger = false,\n ...props\n}: StyledProps<typeof BaseSelect.Positioner>) {\n return (\n <BaseSelect.Positioner\n sideOffset={sideOffset}\n align={align}\n // Base UI defaults to the macOS-style overlap (popup covers the trigger\n // so the selected item sits on the value text) — disorienting in a page\n // flow, so Pho drops the list below the field like a menu instead.\n alignItemWithTrigger={alignItemWithTrigger}\n className={cn(\"z-50 outline-none\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BaseSelect.Popup>) {\n return (\n <BaseSelect.Popup\n className={cn(\n // Floating layer: keeps its elevation shadow, edged with the site\n // hairline (ring-pho-secondary, #eee/#202020).\n \"bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary rounded-base max-h-[var(--available-height)] min-w-[var(--anchor-width)] origin-[var(--transform-origin)] overflow-y-auto p-1 ring-1 outline-none ring-inset\",\n // Effect-Button animation family, faster: the open springs from the\n // trigger edge with a slight overshoot; close is a quick ease-out.\n \"transition-[transform,opacity] duration-[140ms] ease-[cubic-bezier(0.34,1.3,0.64,1)]\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:duration-100 data-[ending-style]:ease-out\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Item({ className, ...props }: StyledProps<typeof BaseSelect.Item>) {\n return (\n <BaseSelect.Item\n className={cn(\n // Fixed 1rem leading column: the selection mark lives there, so every\n // label starts at the same x whether or not it is selected.\n // `group/pho-item` feeds the multiple-mode checkbox indicator.\n \"group/pho-item text-pho-secondary grid cursor-pointer grid-cols-[1rem_1fr] items-center gap-2 rounded-[calc(var(--radius-base)-4px)] py-1.5 pr-2.5 pl-2 text-base outline-none select-none\",\n // Secondary at rest; highlight lifts to primary + ghost wash (Menu idiom).\n \"data-[highlighted]:bg-pho-ghost-hover data-[highlighted]:text-pho-primary data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ItemText({\n className,\n ...props\n}: StyledProps<typeof BaseSelect.ItemText>) {\n return (\n <BaseSelect.ItemText\n // Pin to column 2: when the single-select indicator unmounts, grid\n // auto-placement would otherwise pull the label into the mark column.\n className={cn(\"col-start-2 min-w-0\", className)}\n {...props}\n />\n );\n}\n\n/**\n * Leading selection mark, mode-aware. Single: a brand check that appears in\n * the reserved column. Multiple: an always-visible checkbox box that fills\n * with the same quiet fill/stroke ease as the standalone Checkbox.\n */\nfunction ItemIndicator({\n className,\n children,\n ...props\n}: StyledProps<typeof BaseSelect.ItemIndicator> & { children?: ReactNode }) {\n const multiple = useContext(SelectMultipleContext);\n const mark = children ?? <IconCheck />;\n\n if (multiple) {\n return (\n <span\n aria-hidden\n className={cn(\n \"col-start-1 flex size-4 shrink-0 items-center justify-center rounded-sm ring-1 ring-inset\",\n \"bg-pho-primary ring-pho-primary text-pho-on-brand\",\n // Fill + stroke ease together on toggle — Checkbox's transition.\n \"transition-[background-color,box-shadow,color] duration-150 ease-out\",\n \"group-data-[selected]/pho-item:bg-pho-brand-solid group-data-[selected]/pho-item:ring-transparent\",\n )}\n >\n <BaseSelect.ItemIndicator\n className={cn(\n \"flex items-center justify-center [&>svg]:size-3\",\n // Glyph pops with the fill; exits on the same path.\n \"transition-[transform,opacity] duration-150 ease-out\",\n \"data-[starting-style]:scale-50 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-50 data-[ending-style]:opacity-0\",\n className,\n )}\n {...props}\n >\n {mark}\n </BaseSelect.ItemIndicator>\n </span>\n );\n }\n\n return (\n <BaseSelect.ItemIndicator\n className={cn(\n \"text-pho-brand col-start-1 flex size-4 items-center justify-center [&>svg]:size-4\",\n className,\n )}\n {...props}\n >\n {mark}\n </BaseSelect.ItemIndicator>\n );\n}\n\nfunction GroupLabel({\n className,\n ...props\n}: StyledProps<typeof BaseSelect.GroupLabel>) {\n return (\n <BaseSelect.GroupLabel\n className={cn(\n \"text-pho-secondary px-2.5 py-1.5 text-xs font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Select built on Base UI `Select` — pick one option (or several with\n * `multiple`) from a list that opens below the trigger on click; the pattern\n * other design systems call a picker. Pass `items` to `Select.Root`, render an\n * `Item` per option, and show the selection with `Select.Value`. For a short,\n * always-visible set use `RadioGroup`; to filter a long list by typing use\n * `Combobox`.\n */\nexport const Select = {\n Root,\n Trigger,\n Value,\n Icon,\n Portal,\n Positioner,\n Popup,\n List,\n Item,\n ItemText,\n ItemIndicator,\n Group,\n GroupLabel,\n};\n"],"mappings":"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"}
package/dist/index.js CHANGED
@@ -1,40 +1,53 @@
1
1
  "use client";
2
- import { t as a } from "./chunks/cn-DTiB6ek_.js";
3
- import { n as o, r as n, t as r } from "./chunks/link-provider-9TFNyDqO.js";
4
- import { t as T } from "./chunks/resolve-variant-CcD8iG5l.js";
2
+ import { t } from "./chunks/cn-DTiB6ek_.js";
3
+ import { n as o, r, t as S } from "./chunks/link-provider-9TFNyDqO.js";
4
+ import { t as E } from "./chunks/resolve-variant-CcD8iG5l.js";
5
+ import { n as i, r as _, t as m } from "./chunks/use-press-pulse-8iorQPsh.js";
5
6
  import "./utils.js";
6
- import { a as E, c as S, d as I, f, i as B, l as _, n as p, o as u, r as A, s as O, t as R, u as N } from "./chunks/close-button-Bq9f-H15.js";
7
- import { a as c, i as D, n as l, r as V, t as L } from "./chunks/sidebar-C5cIhWs1.js";
8
- import { t as d } from "./chunks/input-BSJGBUbf.js";
9
- import { n as k, t as M } from "./chunks/dialog-DolPKFGS.js";
10
- import { n as b, r as v, t as F } from "./chunks/settings-B3ilbRcF.js";
7
+ import { a as e, c as A, d as B, f as O, i as f, l as p, n as u, o as C, r as N, s as D, t as L, u as c } from "./chunks/close-button-Bq9f-H15.js";
8
+ import { a as l, c as U, i as V, n as d, o as G, r as g, s as k, t as F } from "./chunks/sidebar-BCqq58hV.js";
9
+ import { t as b } from "./chunks/input-CxS7ndpb.js";
10
+ import { t as H } from "./chunks/input-group-D6dlma8k.js";
11
+ import { n as x, t as W } from "./chunks/card-9cGnv-VD.js";
12
+ import { n as j, t as q } from "./chunks/dialog-DolPKFGS.js";
13
+ import { i as y, n as z, r as J, t as K } from "./chunks/settings-B0vhLoMi.js";
11
14
  export {
12
- p as BUTTON_COLORS,
13
- A as BUTTON_SHAPES,
14
- B as BUTTON_SIZES,
15
- E as BUTTON_VARIANTS,
16
- u as Button,
17
- O as ButtonLink,
18
- R as CloseButton,
19
- M as Dialog,
20
- S as EFFECT_BUTTON_SIZES,
21
- _ as EffectButton,
22
- N as EffectButtonLink,
23
- d as Input,
24
- r as LinkProvider,
25
- F as SETTINGS_CARD,
26
- b as SETTINGS_ROW,
27
- L as SIDEBAR_ITEM,
28
- l as SIDEBAR_ITEM_ACTIVE,
15
+ u as BUTTON_COLORS,
16
+ N as BUTTON_SHAPES,
17
+ f as BUTTON_SIZES,
18
+ e as BUTTON_VARIANTS,
19
+ C as Button,
20
+ D as ButtonLink,
21
+ W as CARD_SURFACE,
22
+ m as CONTROL_PRESS_SCALE,
23
+ i as CONTROL_PRESS_SPRING,
24
+ x as Card,
25
+ L as CloseButton,
26
+ q as Dialog,
27
+ A as EFFECT_BUTTON_SIZES,
28
+ p as EffectButton,
29
+ c as EffectButtonLink,
30
+ b as Input,
31
+ H as InputGroup,
32
+ S as LinkProvider,
33
+ K as SETTINGS_CALLOUT,
34
+ z as SETTINGS_CARD,
35
+ J as SETTINGS_ROW,
36
+ F as SIDEBAR_HEADER_INSET,
37
+ d as SIDEBAR_ITEM,
38
+ g as SIDEBAR_ITEM_ACTIVE,
29
39
  V as SIDEBAR_ITEM_INACTIVE,
30
- D as SIDEBAR_ROOT,
31
- v as Settings,
32
- c as Sidebar,
33
- I as buttonVariants,
34
- a as cn,
35
- f as effectButtonVariants,
36
- n as isReactComponent,
37
- T as resolveVariant,
38
- k as useDialogPending,
39
- o as useLinkComponent
40
+ l as SIDEBAR_ROOT,
41
+ G as SIDEBAR_ROOT_BASE,
42
+ k as SIDEBAR_ROOT_INSET,
43
+ y as Settings,
44
+ U as Sidebar,
45
+ B as buttonVariants,
46
+ t as cn,
47
+ O as effectButtonVariants,
48
+ r as isReactComponent,
49
+ E as resolveVariant,
50
+ j as useDialogPending,
51
+ o as useLinkComponent,
52
+ _ as usePressPulse
40
53
  };
@@ -41,6 +41,7 @@ import "./primitives/toggle-group.js";
41
41
  import "./primitives/toolbar.js";
42
42
  import "./primitives/tooltip.js";
43
43
  export * from "@base-ui/react/field";
44
+ export * from "@base-ui/react/separator";
44
45
  export * from "@base-ui/react/dialog";
45
46
  export * from "@base-ui/react/avatar";
46
47
  export * from "@base-ui/react/accordion";
@@ -71,7 +72,6 @@ export * from "@base-ui/react/radio";
71
72
  export * from "@base-ui/react/radio-group";
72
73
  export * from "@base-ui/react/scroll-area";
73
74
  export * from "@base-ui/react/select";
74
- export * from "@base-ui/react/separator";
75
75
  export * from "@base-ui/react/slider";
76
76
  export * from "@base-ui/react/switch";
77
77
  export * from "@base-ui/react/tabs";
@@ -1,7 +1,8 @@
1
1
  "use client";
2
- import { n as s, r as S, t as e } from "../chunks/settings-B3ilbRcF.js";
2
+ import { i as T, n as s, r as t, t as a } from "../chunks/settings-B0vhLoMi.js";
3
3
  export {
4
- e as SETTINGS_CARD,
5
- s as SETTINGS_ROW,
6
- S as Settings
4
+ a as SETTINGS_CALLOUT,
5
+ s as SETTINGS_CARD,
6
+ t as SETTINGS_ROW,
7
+ T as Settings
7
8
  };
@@ -1,9 +1,12 @@
1
1
  "use client";
2
- import { a as E, i as a, n as s, r as A, t as T } from "../chunks/sidebar-C5cIhWs1.js";
2
+ import { a as I, c as _, i as A, n as R, o as S, r as a, s, t as T } from "../chunks/sidebar-BCqq58hV.js";
3
3
  export {
4
- T as SIDEBAR_ITEM,
5
- s as SIDEBAR_ITEM_ACTIVE,
4
+ T as SIDEBAR_HEADER_INSET,
5
+ R as SIDEBAR_ITEM,
6
+ a as SIDEBAR_ITEM_ACTIVE,
6
7
  A as SIDEBAR_ITEM_INACTIVE,
7
- a as SIDEBAR_ROOT,
8
- E as Sidebar
8
+ I as SIDEBAR_ROOT,
9
+ S as SIDEBAR_ROOT_BASE,
10
+ s as SIDEBAR_ROOT_INSET,
11
+ _ as Sidebar
9
12
  };
@@ -0,0 +1,75 @@
1
+ import { ComponentProps, Ref } from 'react';
2
+ /**
3
+ * Design notes:
4
+ * - A card is a flat bordered panel on the page surface — hairline border,
5
+ * primary background, no shadow. Elevation shadows stay on floating layers
6
+ * (menus, dialogs); see the same rule on Input and Select.
7
+ * - Radius sits at the `lg` stop (16px) like Dialog — a standalone content
8
+ * panel reads bigger than a control, so it takes the panel radius rather
9
+ * than the control default (`base`).
10
+ * - Vertical rhythm: `pt-5` / `pb-4`, `gap-4` between parts. Parts carry
11
+ * `px-5`, so a child without padding (an image, a table, a `Separator`)
12
+ * runs edge-to-edge on its own.
13
+ * - No size or color axes. A card is chrome, not a signal — content sets the
14
+ * tone. Sizing belongs to the layout that places the card.
15
+ */
16
+ /** Surface chrome — exported for hosts that need the look on another element. */
17
+ export declare const CARD_SURFACE = "border-pho-secondary bg-pho-primary rounded-lg border";
18
+ /** The panel: bordered surface, vertical rhythm between parts. */
19
+ declare function Root({ className, ...props }: ComponentProps<"div"> & {
20
+ ref?: Ref<HTMLDivElement>;
21
+ }): import("react").JSX.Element;
22
+ /** Title + optional description pair, kept tight (`gap-0.5`). */
23
+ declare function Header({ className, ...props }: ComponentProps<"div"> & {
24
+ ref?: Ref<HTMLDivElement>;
25
+ }): import("react").JSX.Element;
26
+ /**
27
+ * Card heading — an `<h3>` so it nests under page (`h1`) and section (`h2`)
28
+ * headings without skipping levels.
29
+ */
30
+ declare function Title({ className, children, ...props }: ComponentProps<"h3"> & {
31
+ ref?: Ref<HTMLHeadingElement>;
32
+ }): import("react").JSX.Element;
33
+ /** Supporting copy under the title — same step, secondary tone. */
34
+ declare function Description({ className, ...props }: ComponentProps<"p"> & {
35
+ ref?: Ref<HTMLParagraphElement>;
36
+ }): import("react").JSX.Element;
37
+ /** The card body. Carries the horizontal padding; bring your own layout. */
38
+ declare function Content({ className, ...props }: ComponentProps<"div"> & {
39
+ ref?: Ref<HTMLDivElement>;
40
+ }): import("react").JSX.Element;
41
+ /**
42
+ * Trailing row — actions, a status line. Unopinionated about justification;
43
+ * add `justify-end` for a dialog-style action bar.
44
+ */
45
+ declare function Footer({ className, ...props }: ComponentProps<"div"> & {
46
+ ref?: Ref<HTMLDivElement>;
47
+ }): import("react").JSX.Element;
48
+ /**
49
+ * Card — a bordered content panel: header (title + description), body,
50
+ * optional footer. It's static chrome with no interactivity of its own.
51
+ * For a settings label/control list use `Settings.Card`; for a featured
52
+ * block on the page surface use `Settings.Callout`.
53
+ *
54
+ * ```tsx
55
+ * <Card.Root>
56
+ * <Card.Header>
57
+ * <Card.Title>Usage</Card.Title>
58
+ * <Card.Description>Since Aug 1.</Card.Description>
59
+ * </Card.Header>
60
+ * <Card.Content>…</Card.Content>
61
+ * <Card.Footer className="justify-end">
62
+ * <Button size="sm">Upgrade</Button>
63
+ * </Card.Footer>
64
+ * </Card.Root>
65
+ * ```
66
+ */
67
+ export declare const Card: {
68
+ Root: typeof Root;
69
+ Header: typeof Header;
70
+ Title: typeof Title;
71
+ Description: typeof Description;
72
+ Content: typeof Content;
73
+ Footer: typeof Footer;
74
+ };
75
+ export {};
@@ -0,0 +1 @@
1
+ export { Card, CARD_SURFACE } from './card';
@@ -13,8 +13,12 @@ export interface CheckboxProps extends Omit<ComponentProps<typeof BaseCheckbox.R
13
13
  * `indeterminate` states; pass `label` for a clickable text row, or omit it
14
14
  * and provide an `aria-label`. For a set of related options that submit
15
15
  * together, wrap them in `CheckboxGroup`.
16
+ *
17
+ * Animation is the Effect Button family scaled to a toggle, kept restrained:
18
+ * a quick shallow press pulse on pointer-down (always plays out), the
19
+ * fill/stroke easing between states, and the glyph popping in.
16
20
  */
17
- export declare function Checkbox({ className, label, size, ...props }: CheckboxProps): import("react").JSX.Element;
21
+ export declare function Checkbox({ className, label, size, disabled, ...props }: CheckboxProps): import("react").JSX.Element;
18
22
  export declare namespace Checkbox {
19
23
  var displayName: string;
20
24
  }
@@ -0,0 +1 @@
1
+ export { InputGroup, type InputGroupSize, type InputGroupRootProps, type InputGroupInputProps, } from './input-group';
@@ -0,0 +1,57 @@
1
+ import { ComponentProps, ElementType, HTMLAttributes, InputHTMLAttributes, Ref } from 'react';
2
+ import { Separator as BaseSeparator } from '@base-ui/react/separator';
3
+ /** Override Base UI's `string | (state) => string` className with plain string. */
4
+ type StyledProps<T extends ElementType> = Omit<ComponentProps<T>, "className"> & {
5
+ className?: string;
6
+ };
7
+ export type InputGroupSize = "sm" | "md" | "lg";
8
+ export interface InputGroupRootProps extends HTMLAttributes<HTMLDivElement> {
9
+ /** Size variant, matching Input's scale. @default "md" */
10
+ size?: InputGroupSize;
11
+ /** Render the invalid state (error ring; `aria-invalid` on the control). */
12
+ invalid?: boolean;
13
+ ref?: Ref<HTMLDivElement>;
14
+ }
15
+ /**
16
+ * The shared field surface: one hairline ring around the control and its
17
+ * addons, with the same focus / invalid / disabled treatment as `Input`.
18
+ * Clicking anywhere on the surface (addon text, icons, blank space) focuses
19
+ * the control, so the whole group reads as a single field.
20
+ */
21
+ declare function Root({ size, invalid, className, onPointerDown, ref, ...props }: InputGroupRootProps): import("react").JSX.Element;
22
+ export interface InputGroupInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
23
+ ref?: Ref<HTMLInputElement>;
24
+ }
25
+ /**
26
+ * The text control. Rendered as Base UI `Field.Control`, so inside a
27
+ * `Field.Root` it picks up the label and description wiring automatically;
28
+ * standalone it behaves as a plain `<input>` (pass `aria-label` then).
29
+ */
30
+ declare function GroupInput({ className, ref, ...props }: InputGroupInputProps): import("react").JSX.Element;
31
+ /**
32
+ * Inline content beside the control — prefix/suffix text, an icon, a `Kbd`
33
+ * hint, or a small button. Text and icons render in the secondary tone so the
34
+ * value stays the loudest thing on the surface.
35
+ */
36
+ declare function Addon({ className, ref, ...props }: HTMLAttributes<HTMLDivElement> & {
37
+ ref?: Ref<HTMLDivElement>;
38
+ }): import("react").JSX.Element;
39
+ /**
40
+ * A hairline between segments — turns an addon into a boxed section
41
+ * (`https:// │ workspace │ .photon.dev`).
42
+ */
43
+ declare function GroupSeparator({ className, orientation, ...props }: StyledProps<typeof BaseSeparator>): import("react").JSX.Element;
44
+ /**
45
+ * Input Group — one field surface shared by a text control and its addons:
46
+ * prefix/suffix text, icons, keyboard hints, or a trailing button. Same
47
+ * ring, sizes, and focus / invalid / disabled behavior as `Input`, so grouped
48
+ * and plain fields align in the same form. For a leading icon alone, plain
49
+ * `Input` with `icon` is enough.
50
+ */
51
+ export declare const InputGroup: {
52
+ Root: typeof Root;
53
+ Input: typeof GroupInput;
54
+ Addon: typeof Addon;
55
+ Separator: typeof GroupSeparator;
56
+ };
57
+ export {};
@@ -1 +1 @@
1
- export { Select } from './select';
1
+ export { Select, type SelectTriggerVariant } from './select';
@@ -1,25 +1,44 @@
1
- import { ComponentProps, ElementType } from 'react';
1
+ import { ComponentProps, ElementType, ReactNode } from 'react';
2
2
  import { Select as BaseSelect } from '@base-ui/react/select';
3
3
  /** Override Base UI's `string | (state) => string` className with plain string. */
4
4
  type StyledProps<T extends ElementType> = Omit<ComponentProps<T>, "className"> & {
5
5
  className?: string;
6
6
  };
7
- declare function Trigger({ className, ...props }: StyledProps<typeof BaseSelect.Trigger>): import("react").JSX.Element;
7
+ export type SelectTriggerVariant = "default" | "inline";
8
+ declare function Root({ multiple, ...props }: ComponentProps<typeof BaseSelect.Root>): import("react").JSX.Element;
9
+ declare function Trigger({ className, disabled, variant, onPointerDown, ...props }: StyledProps<typeof BaseSelect.Trigger> & {
10
+ /**
11
+ * `inline` drops the field chrome (ring, background, padding, min-width)
12
+ * to ride a host surface — an Input Group addon, a toolbar — which then
13
+ * carries the focus/open treatment. The press pulse moves to the arrow.
14
+ * @default "default"
15
+ */
16
+ variant?: SelectTriggerVariant;
17
+ }): import("react").JSX.Element;
8
18
  declare function Icon({ className, ...props }: StyledProps<typeof BaseSelect.Icon>): import("react").JSX.Element;
9
- declare function Positioner({ className, sideOffset, ...props }: StyledProps<typeof BaseSelect.Positioner>): import("react").JSX.Element;
19
+ declare function Positioner({ className, sideOffset, align, alignItemWithTrigger, ...props }: StyledProps<typeof BaseSelect.Positioner>): import("react").JSX.Element;
10
20
  declare function Popup({ className, ...props }: StyledProps<typeof BaseSelect.Popup>): import("react").JSX.Element;
11
21
  declare function Item({ className, ...props }: StyledProps<typeof BaseSelect.Item>): import("react").JSX.Element;
12
- declare function ItemIndicator({ className, ...props }: StyledProps<typeof BaseSelect.ItemIndicator>): import("react").JSX.Element;
22
+ declare function ItemText({ className, ...props }: StyledProps<typeof BaseSelect.ItemText>): import("react").JSX.Element;
23
+ /**
24
+ * Leading selection mark, mode-aware. Single: a brand check that appears in
25
+ * the reserved column. Multiple: an always-visible checkbox box that fills
26
+ * with the same quiet fill/stroke ease as the standalone Checkbox.
27
+ */
28
+ declare function ItemIndicator({ className, children, ...props }: StyledProps<typeof BaseSelect.ItemIndicator> & {
29
+ children?: ReactNode;
30
+ }): import("react").JSX.Element;
13
31
  declare function GroupLabel({ className, ...props }: StyledProps<typeof BaseSelect.GroupLabel>): import("react").JSX.Element;
14
32
  /**
15
33
  * Select built on Base UI `Select` — pick one option (or several with
16
- * `multiple`) from a list that opens on click. Pass `items` to `Select.Root`,
17
- * render an `Item` per option, and show the selection with `Select.Value`. For
18
- * a short, always-visible set use `RadioGroup`; to filter a long list by typing
19
- * use `Combobox`.
34
+ * `multiple`) from a list that opens below the trigger on click; the pattern
35
+ * other design systems call a picker. Pass `items` to `Select.Root`, render an
36
+ * `Item` per option, and show the selection with `Select.Value`. For a short,
37
+ * always-visible set use `RadioGroup`; to filter a long list by typing use
38
+ * `Combobox`.
20
39
  */
21
40
  export declare const Select: {
22
- Root: typeof BaseSelect.Root;
41
+ Root: typeof Root;
23
42
  Trigger: typeof Trigger;
24
43
  Value: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').SelectValueProps, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
25
44
  Icon: typeof Icon;
@@ -28,7 +47,7 @@ export declare const Select: {
28
47
  Popup: typeof Popup;
29
48
  List: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').SelectListProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
30
49
  Item: typeof Item;
31
- ItemText: import('react').NamedExoticComponent<Omit<import('@base-ui/react').SelectItemTextProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
50
+ ItemText: typeof ItemText;
32
51
  ItemIndicator: typeof ItemIndicator;
33
52
  Group: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').SelectGroupProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
34
53
  GroupLabel: typeof GroupLabel;
@@ -8,6 +8,8 @@
8
8
  export * from './utils';
9
9
  export * from './components/button';
10
10
  export * from './components/input';
11
+ export * from './components/input-group';
12
+ export * from './components/card';
11
13
  export * from './components/dialog';
12
14
  export * from './sections/sidebar';
13
15
  export * from './sections/settings';
@@ -1 +1 @@
1
- export { Settings, SETTINGS_CARD, SETTINGS_ROW, type SettingsRowProps, } from './settings';
1
+ export { Settings, SETTINGS_CARD, SETTINGS_CALLOUT, SETTINGS_ROW, type SettingsRowProps, } from './settings';