@epicbagel/saas-kit 1.23.0 → 1.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -66,7 +66,11 @@ var ListItem = _react.forwardRef.call(void 0, function ListItem2({ className, la
66
66
  radius === "md" && "rounded-md",
67
67
  accent === "success" && "border-l-2 border-emerald-500 bg-emerald-500/5",
68
68
  accent === "destructive" && "border-l-2 border-red-500 bg-red-500/5",
69
- layout === "bullet" && "group flex min-h-8 items-start gap-3 pointer-coarse:min-h-[max(44px,2.75rem)]",
69
+ layout === "bullet" && "group flex items-start gap-3",
70
+ // A row with controls is as tall as they are, and a touch target on a
71
+ // touchscreen; a read-only row is just its text, so a brief's lists don't
72
+ // stand 44px apart on a phone.
73
+ layout === "bullet" && actions && "min-h-8 pointer-coarse:min-h-[max(44px,2.75rem)]",
70
74
  className
71
75
  ), ...props, children: layout === "bullet" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
72
76
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkW5I4FN7Gcjs.SentimentDot, { sentiment, className: "mt-[5px] shrink-0" }),
@@ -66,7 +66,11 @@ var ListItem = forwardRef(function ListItem2({ className, layout = "plain", sent
66
66
  radius === "md" && "rounded-md",
67
67
  accent === "success" && "border-l-2 border-emerald-500 bg-emerald-500/5",
68
68
  accent === "destructive" && "border-l-2 border-red-500 bg-red-500/5",
69
- layout === "bullet" && "group flex min-h-8 items-start gap-3 pointer-coarse:min-h-[max(44px,2.75rem)]",
69
+ layout === "bullet" && "group flex items-start gap-3",
70
+ // A row with controls is as tall as they are, and a touch target on a
71
+ // touchscreen; a read-only row is just its text, so a brief's lists don't
72
+ // stand 44px apart on a phone.
73
+ layout === "bullet" && actions && "min-h-8 pointer-coarse:min-h-[max(44px,2.75rem)]",
70
74
  className
71
75
  ), ...props, children: layout === "bullet" ? /* @__PURE__ */ jsxs(Fragment, { children: [
72
76
  /* @__PURE__ */ jsx(SentimentDot, { sentiment, className: "mt-[5px] shrink-0" }),
@@ -520,7 +520,9 @@ function ChatInput({
520
520
  // Grows with the text, then scrolls rather than pushing the thread away.
521
521
  "leading-relaxed disabled:opacity-70 placeholder:text-sm",
522
522
  !compact && "max-h-48",
523
- compact ? "px-4 py-2" : spacious ? "px-6 pb-2 pt-6" : "px-4 py-3.5"
523
+ // Compact: in from the rounded corner, the text starting where the + icon below it does
524
+ // (22px in at any root size: the bar's 0.5rem padding plus half of 44px less the 1rem icon).
525
+ compact ? "pb-1 pl-[22px] pr-4 pt-3.5" : spacious ? "px-6 pb-2 pt-6" : "px-4 py-3.5"
524
526
  )
525
527
  }
526
528
  ),
@@ -520,7 +520,9 @@ function ChatInput({
520
520
  // Grows with the text, then scrolls rather than pushing the thread away.
521
521
  "leading-relaxed disabled:opacity-70 placeholder:text-sm",
522
522
  !compact && "max-h-48",
523
- compact ? "px-4 py-2" : spacious ? "px-6 pb-2 pt-6" : "px-4 py-3.5"
523
+ // Compact: in from the rounded corner, the text starting where the + icon below it does
524
+ // (22px in at any root size: the bar's 0.5rem padding plus half of 44px less the 1rem icon).
525
+ compact ? "pb-1 pl-[22px] pr-4 pt-3.5" : spacious ? "px-6 pb-2 pt-6" : "px-4 py-3.5"
524
526
  )
525
527
  }
526
528
  ),
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkWE3F6EUMcjs = require('../chunk-WE3F6EUM.cjs');
5
+ var _chunkKLBMHQ6Ucjs = require('../chunk-KLBMHQ6U.cjs');
6
6
  require('../chunk-W5I4FN7G.cjs');
7
7
 
8
8
 
@@ -51,29 +51,32 @@ function EditableList({
51
51
  };
52
52
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "section", { className: _chunkKWLSBTB2cjs.cn.call(void 0, "border-t border-border pt-4", className), children: [
53
53
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk373W6VADcjs.Text, { as: "span", variant: "caption", className: "text-xs font-medium uppercase tracking-wider", children: label }),
54
- items.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk373W6VADcjs.Text, { variant: "caption", className: "mt-3 italic", children: emptyText }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWE3F6EUMcjs.List, { spacing: "normal", className: "mt-3", children: items.map((item, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWE3F6EUMcjs.ListItem, { layout: "bullet", sentiment, actions: !readOnly && (_optionalChain([editing, 'optionalAccess', _5 => _5.index]) === index ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
55
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "ghost", size: "icon-sm", shrink: true, className: "text-emerald-600", "aria-label": `Save ${itemName}`, onClick: commitEdit, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Check, { className: "h-4 w-4" }) }),
56
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "quiet", size: "icon-sm", shrink: true, marginEnd: "negative-xs", "aria-label": `Cancel editing ${itemName}`, onClick: () => setEditing(null), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.X, { className: "h-4 w-4" }) })
57
- ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
58
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "ghost", size: "icon", className: "h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Edit ${itemName}`, onClick: () => setEditing({ index, value: item }), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Pencil, { className: "h-4 w-4" }) }),
59
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "ghost", size: "icon", className: "-mr-1 h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Remove ${itemName}`, onClick: () => onChange(items.filter((_, itemIndex) => itemIndex !== index)), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.X, { className: "h-4 w-4" }) })
60
- ] })), children: !readOnly && _optionalChain([editing, 'optionalAccess', _6 => _6.index]) === index ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
61
- _chunkPQUSJEXLcjs.Input,
62
- {
63
- autoFocus: true,
64
- value: editing.value,
65
- "aria-label": `Edit ${itemName}`,
66
- onChange: (event) => setEditing({ index, value: event.target.value }),
67
- onKeyDown: (event) => {
68
- if (event.key === "Enter") {
69
- event.preventDefault();
70
- commitEdit();
71
- }
72
- if (event.key === "Escape") setEditing(null);
73
- },
74
- grow: true
75
- }
76
- ) : item }, `${item}-${index}`)) }),
54
+ items.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk373W6VADcjs.Text, { variant: "caption", className: "mt-3 italic", children: emptyText }) : (
55
+ // Read-only rows are just text, about 1.8em apart; editable rows keep room for their controls.
56
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKLBMHQ6Ucjs.List, { spacing: readOnly ? "tight" : "normal", className: "mt-3", children: items.map((item, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKLBMHQ6Ucjs.ListItem, { layout: "bullet", sentiment, actions: !readOnly && (_optionalChain([editing, 'optionalAccess', _5 => _5.index]) === index ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
57
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "ghost", size: "icon-sm", shrink: true, className: "text-emerald-600", "aria-label": `Save ${itemName}`, onClick: commitEdit, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Check, { className: "h-4 w-4" }) }),
58
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "quiet", size: "icon-sm", shrink: true, marginEnd: "negative-xs", "aria-label": `Cancel editing ${itemName}`, onClick: () => setEditing(null), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.X, { className: "h-4 w-4" }) })
59
+ ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
60
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "ghost", size: "icon", className: "h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Edit ${itemName}`, onClick: () => setEditing({ index, value: item }), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Pencil, { className: "h-4 w-4" }) }),
61
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "ghost", size: "icon", className: "-mr-1 h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Remove ${itemName}`, onClick: () => onChange(items.filter((_, itemIndex) => itemIndex !== index)), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.X, { className: "h-4 w-4" }) })
62
+ ] })), children: !readOnly && _optionalChain([editing, 'optionalAccess', _6 => _6.index]) === index ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
63
+ _chunkPQUSJEXLcjs.Input,
64
+ {
65
+ autoFocus: true,
66
+ value: editing.value,
67
+ "aria-label": `Edit ${itemName}`,
68
+ onChange: (event) => setEditing({ index, value: event.target.value }),
69
+ onKeyDown: (event) => {
70
+ if (event.key === "Enter") {
71
+ event.preventDefault();
72
+ commitEdit();
73
+ }
74
+ if (event.key === "Escape") setEditing(null);
75
+ },
76
+ grow: true
77
+ }
78
+ ) : item }, `${item}-${index}`)) })
79
+ ),
77
80
  !readOnly && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mt-3 flex items-center gap-2", children: [
78
81
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
79
82
  _chunkPQUSJEXLcjs.Input,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  List,
4
4
  ListItem
5
- } from "../chunk-YFXZWDA5.js";
5
+ } from "../chunk-M5BYOPDK.js";
6
6
  import "../chunk-YWAQRAXP.js";
7
7
  import {
8
8
  Text
@@ -51,29 +51,32 @@ function EditableList({
51
51
  };
52
52
  return /* @__PURE__ */ jsxs("section", { className: cn("border-t border-border pt-4", className), children: [
53
53
  /* @__PURE__ */ jsx(Text, { as: "span", variant: "caption", className: "text-xs font-medium uppercase tracking-wider", children: label }),
54
- items.length === 0 ? /* @__PURE__ */ jsx(Text, { variant: "caption", className: "mt-3 italic", children: emptyText }) : /* @__PURE__ */ jsx(List, { spacing: "normal", className: "mt-3", children: items.map((item, index) => /* @__PURE__ */ jsx(ListItem, { layout: "bullet", sentiment, actions: !readOnly && (editing?.index === index ? /* @__PURE__ */ jsxs(Fragment, { children: [
55
- /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon-sm", shrink: true, className: "text-emerald-600", "aria-label": `Save ${itemName}`, onClick: commitEdit, children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }),
56
- /* @__PURE__ */ jsx(Button, { type: "button", variant: "quiet", size: "icon-sm", shrink: true, marginEnd: "negative-xs", "aria-label": `Cancel editing ${itemName}`, onClick: () => setEditing(null), children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }) })
57
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
58
- /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Edit ${itemName}`, onClick: () => setEditing({ index, value: item }), children: /* @__PURE__ */ jsx(Pencil, { className: "h-4 w-4" }) }),
59
- /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "-mr-1 h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Remove ${itemName}`, onClick: () => onChange(items.filter((_, itemIndex) => itemIndex !== index)), children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }) })
60
- ] })), children: !readOnly && editing?.index === index ? /* @__PURE__ */ jsx(
61
- Input,
62
- {
63
- autoFocus: true,
64
- value: editing.value,
65
- "aria-label": `Edit ${itemName}`,
66
- onChange: (event) => setEditing({ index, value: event.target.value }),
67
- onKeyDown: (event) => {
68
- if (event.key === "Enter") {
69
- event.preventDefault();
70
- commitEdit();
71
- }
72
- if (event.key === "Escape") setEditing(null);
73
- },
74
- grow: true
75
- }
76
- ) : item }, `${item}-${index}`)) }),
54
+ items.length === 0 ? /* @__PURE__ */ jsx(Text, { variant: "caption", className: "mt-3 italic", children: emptyText }) : (
55
+ // Read-only rows are just text, about 1.8em apart; editable rows keep room for their controls.
56
+ /* @__PURE__ */ jsx(List, { spacing: readOnly ? "tight" : "normal", className: "mt-3", children: items.map((item, index) => /* @__PURE__ */ jsx(ListItem, { layout: "bullet", sentiment, actions: !readOnly && (editing?.index === index ? /* @__PURE__ */ jsxs(Fragment, { children: [
57
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon-sm", shrink: true, className: "text-emerald-600", "aria-label": `Save ${itemName}`, onClick: commitEdit, children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }),
58
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "quiet", size: "icon-sm", shrink: true, marginEnd: "negative-xs", "aria-label": `Cancel editing ${itemName}`, onClick: () => setEditing(null), children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }) })
59
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
60
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Edit ${itemName}`, onClick: () => setEditing({ index, value: item }), children: /* @__PURE__ */ jsx(Pencil, { className: "h-4 w-4" }) }),
61
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "-mr-1 h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Remove ${itemName}`, onClick: () => onChange(items.filter((_, itemIndex) => itemIndex !== index)), children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }) })
62
+ ] })), children: !readOnly && editing?.index === index ? /* @__PURE__ */ jsx(
63
+ Input,
64
+ {
65
+ autoFocus: true,
66
+ value: editing.value,
67
+ "aria-label": `Edit ${itemName}`,
68
+ onChange: (event) => setEditing({ index, value: event.target.value }),
69
+ onKeyDown: (event) => {
70
+ if (event.key === "Enter") {
71
+ event.preventDefault();
72
+ commitEdit();
73
+ }
74
+ if (event.key === "Escape") setEditing(null);
75
+ },
76
+ grow: true
77
+ }
78
+ ) : item }, `${item}-${index}`)) })
79
+ ),
77
80
  !readOnly && /* @__PURE__ */ jsxs("div", { className: "mt-3 flex items-center gap-2", children: [
78
81
  /* @__PURE__ */ jsx(
79
82
  Input,
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkWE3F6EUMcjs = require('../chunk-WE3F6EUM.cjs');
5
+ var _chunkKLBMHQ6Ucjs = require('../chunk-KLBMHQ6U.cjs');
6
6
  require('../chunk-W5I4FN7G.cjs');
7
7
  require('../chunk-373W6VAD.cjs');
8
8
  require('../chunk-EJP2L5QV.cjs');
@@ -10,4 +10,4 @@ require('../chunk-KWLSBTB2.cjs');
10
10
 
11
11
 
12
12
 
13
- exports.List = _chunkWE3F6EUMcjs.List; exports.ListItem = _chunkWE3F6EUMcjs.ListItem;
13
+ exports.List = _chunkKLBMHQ6Ucjs.List; exports.ListItem = _chunkKLBMHQ6Ucjs.ListItem;
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  List,
4
4
  ListItem
5
- } from "../chunk-YFXZWDA5.js";
5
+ } from "../chunk-M5BYOPDK.js";
6
6
  import "../chunk-YWAQRAXP.js";
7
7
  import "../chunk-EIY5LLSP.js";
8
8
  import "../chunk-F7JHSZNT.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epicbagel/saas-kit",
3
- "version": "1.23.0",
3
+ "version": "1.24.0",
4
4
  "description": "Accessible React primitives, layout components and design tokens for SaaS apps, built on Radix UI and Tailwind CSS v4.",
5
5
  "license": "MIT",
6
6
  "keywords": [