@photon-ai/pho-ui 4.19.0 → 4.20.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 (40) hide show
  1. package/README.md +1 -1
  2. package/dist/chunks/{basic-page-Cp7CccNN.js → basic-page-B78a6jpw.js} +10 -10
  3. package/dist/chunks/basic-page-B78a6jpw.js.map +1 -0
  4. package/dist/chunks/{card-zyRAihYE.js → card-Bg2V2B0x.js} +17 -17
  5. package/dist/chunks/card-Bg2V2B0x.js.map +1 -0
  6. package/dist/chunks/chat-Dfbkf7g8.js +674 -0
  7. package/dist/chunks/chat-Dfbkf7g8.js.map +1 -0
  8. package/dist/chunks/{code-block-Yxg2wZGJ.js → code-block-B7MibV6r.js} +2 -2
  9. package/dist/chunks/{code-block-Yxg2wZGJ.js.map → code-block-B7MibV6r.js.map} +1 -1
  10. package/dist/chunks/{dialog-DORIrfyJ.js → dialog-CDL6qY2a.js} +2 -2
  11. package/dist/chunks/{dialog-DORIrfyJ.js.map → dialog-CDL6qY2a.js.map} +1 -1
  12. package/dist/chunks/{scroll-area-Dhl5hqay.js → scroll-area-DjdSnx2p.js} +2 -2
  13. package/dist/chunks/scroll-area-DjdSnx2p.js.map +1 -0
  14. package/dist/chunks/{sidebar-CgaSEWVr.js → sidebar-DHYyBBUj.js} +2 -2
  15. package/dist/chunks/{sidebar-CgaSEWVr.js.map → sidebar-DHYyBBUj.js.map} +1 -1
  16. package/dist/chunks/{stat-BXBfMQ9Q.js → stat-VxA1SvS_.js} +8 -8
  17. package/dist/chunks/{stat-BXBfMQ9Q.js.map → stat-VxA1SvS_.js.map} +1 -1
  18. package/dist/chunks/{toast-B3oURNJC.js → toast-B1GAdxXP.js} +2 -2
  19. package/dist/chunks/{toast-B3oURNJC.js.map → toast-B1GAdxXP.js.map} +1 -1
  20. package/dist/components/card.js +1 -1
  21. package/dist/components/chat.js +1 -1
  22. package/dist/components/code-block.js +1 -1
  23. package/dist/components/command.js +1 -1
  24. package/dist/components/dialog.js +1 -1
  25. package/dist/components/scroll-area.js +1 -1
  26. package/dist/components/stat.js +1 -1
  27. package/dist/components/toast.js +1 -1
  28. package/dist/index.js +7 -7
  29. package/dist/sections/basic-page.js +1 -1
  30. package/dist/sections/sidebar.js +1 -1
  31. package/dist/src/components/chat/chat.d.ts +9 -4
  32. package/dist/src/components/scroll-area/scroll-area-edges.d.ts +1 -0
  33. package/package.json +1 -1
  34. package/src/styles/fonts.css +67 -9
  35. package/src/styles/theme.css +12 -5
  36. package/dist/chunks/basic-page-Cp7CccNN.js.map +0 -1
  37. package/dist/chunks/card-zyRAihYE.js.map +0 -1
  38. package/dist/chunks/chat-ZUzGmTWE.js +0 -621
  39. package/dist/chunks/chat-ZUzGmTWE.js.map +0 -1
  40. package/dist/chunks/scroll-area-Dhl5hqay.js.map +0 -1
@@ -1,49 +1,49 @@
1
1
  "use client";
2
- import { t as r } from "./cn-CPbhpG1q.js";
2
+ import { t as e } from "./cn-CPbhpG1q.js";
3
3
  import "react";
4
- import { jsx as e } from "react/jsx-runtime";
4
+ import { jsx as r } from "react/jsx-runtime";
5
5
  var i = "border-pho-secondary bg-pho-primary overflow-hidden rounded-lg border";
6
6
  function n({ className: t, ...a }) {
7
- return /* @__PURE__ */ e("div", {
8
- className: r(i, "flex flex-col gap-4 pt-5 pb-4", "has-[>[data-stat-group]:first-child]:pt-0 has-[>[data-stat]:first-child]:pt-0", "has-[>[data-stat-group]:last-child]:pb-0 has-[>[data-stat]:last-child]:pb-0", "has-[>:first-child:has([data-chart])]:pt-0", t),
7
+ return /* @__PURE__ */ r("div", {
8
+ className: e(i, "flex flex-col gap-4 pt-5 pb-4", "has-[>[data-stat-group]:first-child]:pt-0 has-[>[data-stat]:first-child]:pt-0", "has-[>[data-stat-group]:last-child]:pb-0 has-[>[data-stat]:last-child]:pb-0", "has-[>:first-child:has([data-chart])]:pt-0", t),
9
9
  ...a
10
10
  });
11
11
  }
12
12
  function o({ className: t, ...a }) {
13
- return /* @__PURE__ */ e("div", {
14
- className: r("grid grid-cols-[minmax(0,1fr)_minmax(0,auto)] items-baseline gap-x-4 gap-y-0 px-5", t),
13
+ return /* @__PURE__ */ r("div", {
14
+ className: e("grid grid-cols-[minmax(0,1fr)_minmax(0,auto)] items-baseline gap-x-4 gap-y-0 px-5", t),
15
15
  ...a
16
16
  });
17
17
  }
18
18
  function d({ className: t, children: a, ...s }) {
19
- return /* @__PURE__ */ e("h3", {
20
- className: r("text-display-xs text-pho-primary min-w-0 font-medium", t),
19
+ return /* @__PURE__ */ r("h3", {
20
+ className: e("font-heading text-display-xs text-pho-primary min-w-0 font-medium", t),
21
21
  ...s,
22
22
  children: a
23
23
  });
24
24
  }
25
25
  function p({ className: t, ...a }) {
26
- return /* @__PURE__ */ e("div", {
26
+ return /* @__PURE__ */ r("div", {
27
27
  "data-card-value": "",
28
- className: r("text-display-sm text-pho-primary min-w-0 justify-self-end truncate font-medium tabular-nums", t),
28
+ className: e("font-heading text-display-sm text-pho-primary min-w-0 justify-self-end truncate font-medium tabular-nums", t),
29
29
  ...a
30
30
  });
31
31
  }
32
32
  function l({ className: t, ...a }) {
33
- return /* @__PURE__ */ e("p", {
34
- className: r("text-pho-description text-display-xs col-span-2 font-normal", t),
33
+ return /* @__PURE__ */ r("p", {
34
+ className: e("text-pho-description text-display-xs col-span-2 font-normal", t),
35
35
  ...a
36
36
  });
37
37
  }
38
38
  function c({ className: t, ...a }) {
39
- return /* @__PURE__ */ e("div", {
40
- className: r("px-5", t),
39
+ return /* @__PURE__ */ r("div", {
40
+ className: e("px-5", t),
41
41
  ...a
42
42
  });
43
43
  }
44
44
  function m({ className: t, ...a }) {
45
- return /* @__PURE__ */ e("div", {
46
- className: r("flex items-center gap-2 px-5", t),
45
+ return /* @__PURE__ */ r("div", {
46
+ className: e("flex items-center gap-2 px-5", t),
47
47
  ...a
48
48
  });
49
49
  }
@@ -61,4 +61,4 @@ export {
61
61
  i as t
62
62
  };
63
63
 
64
- //# sourceMappingURL=card-zyRAihYE.js.map
64
+ //# sourceMappingURL=card-Bg2V2B0x.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card-Bg2V2B0x.js","names":["cn","jsx","CARD_SURFACE","Root","className","props","Header","Title","children","Value","Description","Content","Footer","Card"],"sources":["../../src/components/card/card.tsx"],"sourcesContent":["import { type ComponentProps, type Ref } from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/**\n * Design notes:\n * - A card is a flat bordered panel on the page surface — hairline border,\n * primary background, no shadow. Elevation shadows stay on floating layers\n * (menus, dialogs); see the same rule on Input and Select.\n * - Radius sits at the `lg` stop (16px) like Dialog — a standalone content\n * panel reads bigger than a control, so it takes the panel radius rather\n * than the control default (`base`). `overflow-hidden` clips with it:\n * a flush `Stat.Group` (opaque tiles, `pt-0`) would otherwise paint\n * square over the curve. The same clip is what makes an edge-to-edge\n * image or table follow the panel, the way `BasicPage.Card` already does.\n * - Vertical rhythm: `pt-5` / `pb-4`, `gap-4` between parts. Parts carry\n * `px-5`, so a child without padding (an image, a table, a `Separator`)\n * runs edge-to-edge on its own. A `Stat` / `Stat.Group` already pads\n * its tiles — when it is the first or last child the matching inset\n * drops so the row sits flush on the card edge. A chart as the first\n * child drops the top inset the same way; the plot keeps its own\n * bottom band.\n * - No size or color axes. A card is chrome, not a signal — content sets the\n * tone. Sizing belongs to the layout that places the card.\n */\n\n/** Surface chrome — exported for hosts that need the look on another element. */\nexport const CARD_SURFACE =\n \"border-pho-secondary bg-pho-primary overflow-hidden rounded-lg border\";\n\n/** The panel: bordered surface, vertical rhythm between parts. */\nfunction Root({\n className,\n ...props\n}: ComponentProps<\"div\"> & { ref?: Ref<HTMLDivElement> }) {\n return (\n <div\n className={cn(\n CARD_SURFACE,\n \"flex flex-col gap-4 pt-5 pb-4\",\n // Stat tiles pad themselves; a chart's plot already insets.\n \"has-[>[data-stat-group]:first-child]:pt-0 has-[>[data-stat]:first-child]:pt-0\",\n \"has-[>[data-stat-group]:last-child]:pb-0 has-[>[data-stat]:last-child]:pb-0\",\n \"has-[>:first-child:has([data-chart])]:pt-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Title row + optional description. The title and a trailing `Value`\n * share the first line; the description sits on the next with no row\n * gap — title and subtitle read as one block.\n */\nfunction Header({\n className,\n ...props\n}: ComponentProps<\"div\"> & { ref?: Ref<HTMLDivElement> }) {\n return (\n <div\n className={cn(\n \"grid grid-cols-[minmax(0,1fr)_minmax(0,auto)] items-baseline gap-x-4 gap-y-0 px-5\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Card heading — an `<h3>` so it nests under page (`h1`) and section (`h2`)\n * headings without skipping levels.\n */\nfunction Title({\n className,\n children,\n ...props\n}: ComponentProps<\"h3\"> & { ref?: Ref<HTMLHeadingElement> }) {\n return (\n <h3\n className={cn(\n \"font-heading text-display-xs text-pho-primary min-w-0 font-medium\",\n className,\n )}\n {...props}\n >\n {children}\n </h3>\n );\n}\n\n/**\n * A count or figure at the end of the title row. One display step above\n * the title, primary ink — the number is the loud thing on the line.\n */\nfunction Value({\n className,\n ...props\n}: ComponentProps<\"div\"> & { ref?: Ref<HTMLDivElement> }) {\n return (\n <div\n data-card-value=\"\"\n className={cn(\n \"font-heading text-display-sm text-pho-primary min-w-0 justify-self-end truncate font-medium tabular-nums\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Supporting copy under the title — Dialog's description: same step, description ink. */\nfunction Description({\n className,\n ...props\n}: ComponentProps<\"p\"> & { ref?: Ref<HTMLParagraphElement> }) {\n return (\n <p\n className={cn(\n \"text-pho-description text-display-xs col-span-2 font-normal\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** The card body. Carries the horizontal padding; bring your own layout. */\nfunction Content({\n className,\n ...props\n}: ComponentProps<\"div\"> & { ref?: Ref<HTMLDivElement> }) {\n return <div className={cn(\"px-5\", className)} {...props} />;\n}\n\n/**\n * Trailing row — actions, a status line. Unopinionated about justification;\n * add `justify-end` for a dialog-style action bar.\n */\nfunction Footer({\n className,\n ...props\n}: ComponentProps<\"div\"> & { ref?: Ref<HTMLDivElement> }) {\n return (\n <div className={cn(\"flex items-center gap-2 px-5\", className)} {...props} />\n );\n}\n\n/**\n * Card — a bordered content panel: header (title + description), body,\n * optional footer. It's static chrome with no interactivity of its own.\n * For a label/control list use `BasicPage.Card`; for a featured\n * block on the page surface use `BasicPage.Callout`.\n *\n * ```tsx\n * <Card.Root>\n * <Card.Header>\n * <Card.Title>Usage</Card.Title>\n * <Card.Value>1.2k</Card.Value>\n * <Card.Description>Since Aug 1.</Card.Description>\n * </Card.Header>\n * <Card.Content>…</Card.Content>\n * <Card.Footer className=\"justify-end\">\n * <Button size=\"sm\">Upgrade</Button>\n * </Card.Footer>\n * </Card.Root>\n * ```\n */\nexport const Card = {\n Root,\n Header,\n Title,\n Value,\n Description,\n Content,\n Footer,\n};\n"],"mappings":";;;;AA0BA,IAAaE,IACX;AAGF,SAASC,EAAK,EACZ,WAAAC,GACA,GAAGC,EAAA,GACqD;AACxD,SACE,gBAAAJ,EAAC,OAAD;AAAA,IACE,WAAWD,EACTE,GACA,iCAEA,iFACA,+EACA,8CACAE,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAOA,SAASC,EAAO,EACd,WAAAF,GACA,GAAGC,EAAA,GACqD;AACxD,SACE,gBAAAJ,EAAC,OAAD;AAAA,IACE,WAAWD,EACT,qFACAI,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAMA,SAASE,EAAM,EACb,WAAAH,GACA,UAAAI,GACA,GAAGH,EAAA,GACwD;AAC3D,SACE,gBAAAJ,EAAC,MAAD;AAAA,IACE,WAAWD,EACT,qEACAI,CACF;AAAA,IACA,GAAIC;AAAA,IAEH,UAAAG;AAAA,EACC,CAAA;AAER;AAMA,SAASC,EAAM,EACb,WAAAL,GACA,GAAGC,EAAA,GACqD;AACxD,SACE,gBAAAJ,EAAC,OAAD;AAAA,IACE,mBAAgB;AAAA,IAChB,WAAWD,EACT,4GACAI,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAGA,SAASK,EAAY,EACnB,WAAAN,GACA,GAAGC,EAAA,GACyD;AAC5D,SACE,gBAAAJ,EAAC,KAAD;AAAA,IACE,WAAWD,EACT,+DACAI,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAGA,SAASM,EAAQ,EACf,WAAAP,GACA,GAAGC,EAAA,GACqD;AACxD,SAAO,gBAAAJ,EAAC,OAAD;AAAA,IAAK,WAAWD,EAAG,QAAQI,CAAS;AAAA,IAAG,GAAIC;AAAA,EAAQ,CAAA;AAC5D;AAMA,SAASO,EAAO,EACd,WAAAR,GACA,GAAGC,EAAA,GACqD;AACxD,SACE,gBAAAJ,EAAC,OAAD;AAAA,IAAK,WAAWD,EAAG,gCAAgCI,CAAS;AAAA,IAAG,GAAIC;AAAA,EAAQ,CAAA;AAE/E;AAsBA,IAAaQ,IAAO;AAAA,EAClB,MAAAV;AAAA,EACA,QAAAG;AAAA,EACA,OAAAC;AAAA,EACA,OAAAE;AAAA,EACA,aAAAC;AAAA,EACA,SAAAC;AAAA,EACA,QAAAC;AACF"}