@photon-ai/pho-ui 2.15.0 → 2.17.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.
Files changed (97) hide show
  1. package/dist/chunks/IconArrowsMinimize-BfPUGuCB.js +75 -0
  2. package/dist/chunks/IconArrowsMinimize-BfPUGuCB.js.map +1 -0
  3. package/dist/chunks/IconChevronUp-CrpWSgIl.js +11 -0
  4. package/dist/chunks/IconChevronUp-CrpWSgIl.js.map +1 -0
  5. package/dist/chunks/{bar-chart-BJfr3eyd.js → bar-chart-DIALC2_z.js} +2 -2
  6. package/dist/chunks/bar-chart-DIALC2_z.js.map +1 -0
  7. package/dist/chunks/basic-page-CogcwGx3.js +1749 -0
  8. package/dist/chunks/basic-page-CogcwGx3.js.map +1 -0
  9. package/dist/chunks/card-DhDwtSi9.js +56 -0
  10. package/dist/chunks/card-DhDwtSi9.js.map +1 -0
  11. package/dist/chunks/code-block-BuDIo8Q0.js +197 -0
  12. package/dist/chunks/code-block-BuDIo8Q0.js.map +1 -0
  13. package/dist/chunks/collapsible-if7ncPbI.js +28 -0
  14. package/dist/chunks/collapsible-if7ncPbI.js.map +1 -0
  15. package/dist/chunks/{command-Ck8IAgV7.js → command-CTYrSz9a.js} +2 -2
  16. package/dist/chunks/{command-Ck8IAgV7.js.map → command-CTYrSz9a.js.map} +1 -1
  17. package/dist/chunks/data-table-DcwCgXJU.js +293 -0
  18. package/dist/chunks/data-table-DcwCgXJU.js.map +1 -0
  19. package/dist/chunks/date-range-picker-DwFDUNRL.js +88 -0
  20. package/dist/chunks/date-range-picker-DwFDUNRL.js.map +1 -0
  21. package/dist/chunks/{dialog-BxKACOj5.js → dialog-BwfUFn6B.js} +2 -2
  22. package/dist/chunks/{dialog-BxKACOj5.js.map → dialog-BwfUFn6B.js.map} +1 -1
  23. package/dist/chunks/{filter-bar-Cjjq38xo.js → filter-bar-BsvdXwzc.js} +2 -2
  24. package/dist/chunks/{filter-bar-Cjjq38xo.js.map → filter-bar-BsvdXwzc.js.map} +1 -1
  25. package/dist/chunks/ghost-search-BvBFa9su.js +25 -0
  26. package/dist/chunks/ghost-search-BvBFa9su.js.map +1 -0
  27. package/dist/chunks/{line-chart-CUR3AxrR.js → line-chart-VuMYKzW3.js} +2 -2
  28. package/dist/chunks/{line-chart-CUR3AxrR.js.map → line-chart-VuMYKzW3.js.map} +1 -1
  29. package/dist/chunks/{log-list-0AXnjFrk.js → log-list-BERiO4UJ.js} +2 -2
  30. package/dist/chunks/{log-list-0AXnjFrk.js.map → log-list-BERiO4UJ.js.map} +1 -1
  31. package/dist/chunks/scroll-area-Zik8t1Mk.js +168 -0
  32. package/dist/chunks/scroll-area-Zik8t1Mk.js.map +1 -0
  33. package/dist/chunks/sidebar-DRPe5CAh.js +306 -0
  34. package/dist/chunks/sidebar-DRPe5CAh.js.map +1 -0
  35. package/dist/chunks/{toast-iSf6NuAS.js → toast-72Wwlzg9.js} +2 -2
  36. package/dist/chunks/{toast-iSf6NuAS.js.map → toast-72Wwlzg9.js.map} +1 -1
  37. package/dist/chunks/trace-Ba1RMBfk.js +1645 -0
  38. package/dist/chunks/trace-Ba1RMBfk.js.map +1 -0
  39. package/dist/chunks/use-measure-C-i54AC6.js +629 -0
  40. package/dist/chunks/use-measure-C-i54AC6.js.map +1 -0
  41. package/dist/components/bar-chart.js +1 -1
  42. package/dist/components/card.js +1 -1
  43. package/dist/components/code-block.js +1 -1
  44. package/dist/components/collapsible.js +2 -25
  45. package/dist/components/command.js +1 -1
  46. package/dist/components/data-table.js +9 -8
  47. package/dist/components/date-range-picker.js +10 -0
  48. package/dist/components/dialog.js +1 -1
  49. package/dist/components/filter-bar.js +1 -1
  50. package/dist/components/line-chart.js +1 -1
  51. package/dist/components/log-list.js +1 -1
  52. package/dist/components/scroll-area.js +1 -1
  53. package/dist/components/toast.js +1 -1
  54. package/dist/components/trace.js +41 -6
  55. package/dist/index.js +166 -121
  56. package/dist/primitives.js +2 -2
  57. package/dist/sections/basic-page.js +5 -5
  58. package/dist/sections/sidebar.js +9 -6
  59. package/dist/src/components/card/card.d.ts +5 -1
  60. package/dist/src/components/chart/scale.d.ts +6 -1
  61. package/dist/src/components/code-block/code-block.d.ts +24 -5
  62. package/dist/src/components/code-block/index.d.ts +1 -1
  63. package/dist/src/components/data-table/data-table.d.ts +54 -13
  64. package/dist/src/components/date-range-picker/date-range-picker.d.ts +31 -0
  65. package/dist/src/components/date-range-picker/index.d.ts +1 -0
  66. package/dist/src/components/scroll-area/scroll-area.d.ts +9 -1
  67. package/dist/src/components/trace/decorations.d.ts +32 -0
  68. package/dist/src/components/trace/index.d.ts +5 -2
  69. package/dist/src/components/trace/layout.d.ts +57 -29
  70. package/dist/src/components/trace/span-primitive.d.ts +168 -0
  71. package/dist/src/components/trace/span-tree.d.ts +148 -0
  72. package/dist/src/components/trace/trace.d.ts +98 -16
  73. package/dist/src/index.d.ts +1 -0
  74. package/dist/src/sections/basic-page/basic-page.d.ts +139 -29
  75. package/dist/src/sections/basic-page/index.d.ts +1 -1
  76. package/dist/src/sections/sidebar/index.d.ts +1 -1
  77. package/dist/src/sections/sidebar/sidebar.d.ts +72 -0
  78. package/dist/src/utils/ghost-search.d.ts +11 -0
  79. package/package.json +5 -1
  80. package/dist/chunks/bar-chart-BJfr3eyd.js.map +0 -1
  81. package/dist/chunks/basic-page-CVZT_zaH.js +0 -1611
  82. package/dist/chunks/basic-page-CVZT_zaH.js.map +0 -1
  83. package/dist/chunks/card-DSW3Uhag.js +0 -56
  84. package/dist/chunks/card-DSW3Uhag.js.map +0 -1
  85. package/dist/chunks/code-block-CdozzaHM.js +0 -139
  86. package/dist/chunks/code-block-CdozzaHM.js.map +0 -1
  87. package/dist/chunks/data-table-CHLJfGkS.js +0 -279
  88. package/dist/chunks/data-table-CHLJfGkS.js.map +0 -1
  89. package/dist/chunks/scroll-area-BO-9PMM7.js +0 -167
  90. package/dist/chunks/scroll-area-BO-9PMM7.js.map +0 -1
  91. package/dist/chunks/sidebar-DVzZsCts.js +0 -223
  92. package/dist/chunks/sidebar-DVzZsCts.js.map +0 -1
  93. package/dist/chunks/trace-CbH0IohX.js +0 -314
  94. package/dist/chunks/trace-CbH0IohX.js.map +0 -1
  95. package/dist/chunks/use-measure-CMVgLouO.js +0 -616
  96. package/dist/chunks/use-measure-CMVgLouO.js.map +0 -1
  97. package/dist/components/collapsible.js.map +0 -1
@@ -2,8 +2,12 @@ import { AnchorHTMLAttributes, ComponentProps, ReactNode, Ref } from 'react';
2
2
  import { ButtonLinkProps, ButtonProps } from '../../components/button';
3
3
  import { Form as FormElement } from '../../components/form';
4
4
  import { DataTable } from '../../components/data-table';
5
- /** Bordered card that stacks rows with hairline dividers. */
6
- export declare const BASIC_PAGE_CARD = "rounded-base border border-pho-secondary bg-pho-primary divide-y divide-pho-secondary [&>:has(+[data-basic-page-alert])]:border-b-0";
5
+ /**
6
+ * Bordered card that stacks rows with hairline dividers. `gap-0` is the
7
+ * card's own: Stack used to force `gap-3` onto a bare Card and open 12px
8
+ * bands between `divide-y` rows. The marker below lets Stack skip it.
9
+ */
10
+ export declare const BASIC_PAGE_CARD = "rounded-base border border-pho-secondary bg-pho-primary divide-y divide-pho-secondary [&>:has(+[data-basic-page-alert])]:border-b-0 gap-0";
7
11
  /**
8
12
  * Standalone callout surface — featured block (invite form, notice, etc.).
9
13
  * Don't wrap in `Card`; this is the outer chrome.
@@ -82,8 +86,26 @@ export interface BasicPageRootProps extends ComponentProps<"div"> {
82
86
  * space is margin, not content width.
83
87
  */
84
88
  width?: "base" | "wide";
89
+ /**
90
+ * This page was painted before React — rendered to a string and inlined
91
+ * ahead of the bundle (a boot skeleton), or the React twin re-rendering
92
+ * that markup as-is on its first commit. Marks the root with
93
+ * `data-basic-page-prerendered`. Nothing inside it plays the entrance,
94
+ * an explicit `enter` included: the page is already on screen, and
95
+ * starting values would blink it out. The React page taking over from
96
+ * it stays put too — it finds the marker in the document at its first
97
+ * render, while the twin is still there.
98
+ */
99
+ prerendered?: boolean;
85
100
  }
86
- declare function Root({ condense, width, className, children, ref, ...props }: BasicPageRootProps): import("react").JSX.Element;
101
+ /** How wide the panel is, once the pane is wide enough to host it. */
102
+ export type BasicPageAsideWidth = "default" | "wide";
103
+ /**
104
+ * How an open `Aside` shows its subpage: a `panel` beside the page, or as
105
+ * the `page` itself, the list stepping aside.
106
+ */
107
+ export type BasicPageAsidePresentation = "panel" | "page";
108
+ declare function Root({ condense, width, prerendered, className, children, ref, ...props }: BasicPageRootProps): import("react").JSX.Element;
87
109
  /**
88
110
  * Condensing header — the page's way back once the title has scrolled away.
89
111
  * `Root condense` renders a sticky bar in the reserved top zone; `Title` and
@@ -126,8 +148,9 @@ declare function CondenseScope({ adopt, children, }: {
126
148
  export declare function useCondense(): BasicPageCondense;
127
149
  /**
128
150
  * The condensed bar's motion, exported for a shell that adopts the bar
129
- * (`CondenseScope`) so its swap moves the same way: 0.2s ease-out, dropping
130
- * in from 8px above and leaving the same way.
151
+ * (`CondenseScope`) so its swap moves the same way: 0.2s ease-out. The bar
152
+ * fades in place; its page name rises in from 8px below and leaves the
153
+ * same way.
131
154
  */
132
155
  export declare const CONDENSE_BAR_ENTER: {
133
156
  readonly duration: 0.2;
@@ -143,6 +166,10 @@ export declare const CONDENSE_BAR_TRAVEL: {
143
166
  readonly duration: 0.2;
144
167
  readonly ease: "linear";
145
168
  };
169
+ /**
170
+ * The bar's rise distance, signed as "from above": the page name comes
171
+ * from below, so it starts at `-CONDENSE_BAR_RISE_PX`.
172
+ */
146
173
  export declare const CONDENSE_BAR_RISE_PX = -8;
147
174
  export interface BasicPageTitleProps extends ComponentProps<"h1"> {
148
175
  /**
@@ -159,9 +186,9 @@ export interface BasicPageTitleProps extends ComponentProps<"h1"> {
159
186
  * `morphId` for a mid-level page (a list that is itself a subpage): the
160
187
  * word rises in when the page is entered from its parent and flies in
161
188
  * from the back link when returned to from its own subpage. Played once
162
- * per visit: a title taking over from a loading page already on screen
163
- * (its skeleton's, or the one painted before React) stays put. Skipped
164
- * under reduced motion.
189
+ * per visit: a title taking over from a loading part in this page's
190
+ * `Root` (its skeleton's), or from a prerendered page anywhere (the one
191
+ * painted before React), stays put. Skipped under reduced motion.
165
192
  */
166
193
  enter?: boolean;
167
194
  /**
@@ -187,12 +214,15 @@ declare function Title({ id, morphId, enter: enterProp, trailing, className, chi
187
214
  export interface BasicPageStackProps extends Omit<ComponentProps<"div">, RevealMotionConflicts> {
188
215
  /**
189
216
  * Whether mounting plays the page entrance. Left unset, the stack decides
190
- * from what is on screen: it enters unless a loading stack — one marked
191
- * `aria-busy`, or inside an `aria-busy` region — is already there, in
192
- * which case the skeleton was the page's entrance and this stack takes
193
- * its place at rest, values filling in. `true` always enters; `false`
194
- * never does (static markup React re-renders as-is on its first commit
195
- * has nothing to arrive from).
217
+ * from what is on screen: it enters unless it is taking over from a
218
+ * loading part in this page's `Root` — a stack marked `aria-busy`, or
219
+ * inside an `aria-busy` region — or a prerendered page is anywhere in
220
+ * the document. In the first case the skeleton was the page's entrance
221
+ * and this stack takes its place at rest, values filling in; in the
222
+ * second the page was painted before React and is already there. A
223
+ * loading part in some other page (one still on screen while this one
224
+ * mounts) does not count. `true` always enters, except inside a
225
+ * `Root prerendered`; `false` never does.
196
226
  */
197
227
  enter?: boolean;
198
228
  ref?: Ref<HTMLDivElement>;
@@ -210,16 +240,19 @@ export interface BasicPageStackProps extends Omit<ComponentProps<"div">, RevealM
210
240
  * - **Entering the page** — whatever the page first shows (skeleton
211
241
  * included) rides in with its stack.
212
242
  * - **Skeleton, then the data** — a skeleton is a stack under `aria-busy`
213
- * (its own, or a wrapper's). The loaded stack mounting in its place
214
- * finds it on screen and renders at rest: the shape was already there,
215
- * the values fill in. Whether the skeleton is a separate component
216
- * (swapped for the loaded return) or one stack branching its children
217
- * (`{pending ? bones : content}`) makes no difference to the motion.
243
+ * (its own, or a wrapper's). The loaded stack mounting in its place, in
244
+ * the same `Root`, finds it there and renders at rest: the shape was
245
+ * already there, the values fill in. Whether the skeleton is a separate
246
+ * component (swapped for the loaded return) or one stack branching its
247
+ * children (`{pending ? bones : content}`) makes no difference to the
248
+ * motion. Only this page's `Root` counts: a skeleton still on screen in
249
+ * the page being left does not hold the next page at rest.
218
250
  * - **Skeleton that is already on screen before React** (rendered to a
219
251
  * string, painted before the bundle, re-rendered as-is on React's first
220
- * commit) — static markup never enters, and the twin finds the static
221
- * one in the document and stays put on its own; `enter={false}` says so
222
- * outright for markup that must never move.
252
+ * commit) — its `Root` says `prerendered`: static markup never enters,
253
+ * nothing inside that root does either, and the React page taking over
254
+ * finds the marker in the document and stays put on its own;
255
+ * `enter={false}` says so outright for markup that must never move.
223
256
  * - **A region the skeleton couldn't predict** (a list of unknown length)
224
257
  * — `Reveal` rises that region in once its shape is known.
225
258
  *
@@ -236,8 +269,8 @@ export interface BasicPageHeaderProps extends Omit<ComponentProps<"div">, Reveal
236
269
  * `enter`, for a subpage title that carries a description: the pair
237
270
  * floats up from below the departing morph word as one block. Put `enter`
238
271
  * here and NOT on the `Title` inside. As for `Title`, stays put when it
239
- * takes over from a loading page already on screen. Skipped under
240
- * reduced motion.
272
+ * takes over from a loading part in this page's `Root`, or from a
273
+ * prerendered page anywhere. Skipped under reduced motion.
241
274
  */
242
275
  enter?: boolean;
243
276
  ref?: Ref<HTMLDivElement>;
@@ -246,9 +279,11 @@ declare function Header({ enter: enterProp, className, ...props }: BasicPageHead
246
279
  /**
247
280
  * An action at the header row's end — a small button (or two) seated in
248
281
  * the `Header` grid the way `Search` is: top-right of the block, its top
249
- * edge on the header's top, flush with the card edge below; text shorter
250
- * than it centers against it. Put it inside `Header` after the text; with
251
- * a `Search` present it stands to the search's right.
282
+ * edge on the header's top, its right edge on the title / card-content
283
+ * inset (`mr-5` matching `SectionTitle`'s `px-5`). A callout already
284
+ * carries `p-5` and its title has no `px-5`, so the inset drops there.
285
+ * Text shorter than the seat centers against it. Put it inside `Header`
286
+ * after the text; with a `Search` present it stands to the search's right.
252
287
  */
253
288
  declare function HeaderAction({ className, ...props }: ComponentProps<"div"> & {
254
289
  ref?: Ref<HTMLDivElement>;
@@ -830,6 +865,37 @@ export interface BasicPageAsideProps {
830
865
  * panel's corner calls it. A page with a `Back` closes through that link.
831
866
  */
832
867
  onClose?: () => void;
868
+ /**
869
+ * How wide the panel is on a pane that can host it. `default` (unsaid)
870
+ * is two fifths of the pane, 20–28rem. `wide` is half the pane, 25–40rem
871
+ * — a request body or a waterfall. Below `md` the subpage is the page
872
+ * and this does not apply.
873
+ */
874
+ width?: BasicPageAsideWidth;
875
+ /**
876
+ * How the open subpage shows, controlled: `panel` beside the page, or
877
+ * `page` — the list steps aside and the subpage takes the pane, the way
878
+ * it does on a narrow pane. Pair with `onPresentationChange`; the
879
+ * panel's Expand and the page's Show as panel ask through it. A narrow
880
+ * pane (under `md`) is the page whatever this says.
881
+ */
882
+ presentation?: BasicPageAsidePresentation;
883
+ /**
884
+ * The presentation the subpage opens with, when uncontrolled. Unsaid,
885
+ * the aside decides from how it was reached: a subpage already open
886
+ * when the aside mounts arrived by URL — a deep link, a refresh — and
887
+ * is the page; one that opens later was opened from the list and is a
888
+ * panel. The choice resets each time the aside closes.
889
+ */
890
+ defaultPresentation?: BasicPageAsidePresentation;
891
+ /** The reader pressed Expand or Show as panel. */
892
+ onPresentationChange?: (presentation: BasicPageAsidePresentation) => void;
893
+ /**
894
+ * Whether the panel wears an Expand beside its close, and the expanded
895
+ * page a Show as panel in its corner. On by default; `false` leaves the
896
+ * presentation to the pane and to whoever controls it.
897
+ */
898
+ expandable?: boolean;
833
899
  children?: ReactNode;
834
900
  }
835
901
  /**
@@ -846,9 +912,19 @@ export interface BasicPageAsideProps {
846
912
  * steps aside, the subpage takes the pane with its own `Back` — so one
847
913
  * subpage component serves both. Works under either `Root` width: the
848
914
  * page keeps its own column cap beside the panel, and leftover space is
849
- * margin.
915
+ * margin. `width="wide"` opens the panel itself (half the pane, up to
916
+ * 40rem); the page's column cap does not follow.
917
+ *
918
+ * Panel or page is presentation, not routing: the URL is the subpage's
919
+ * either way. Left to itself the aside reads how it was reached — a
920
+ * subpage open at mount arrived by URL (deep link, refresh) and is the
921
+ * page; one that opens later was opened from the list and is a panel —
922
+ * and the panel's Expand turns it into the page at the same URL. The
923
+ * page's own `Back` is the way to the list; Show as panel in its corner
924
+ * folds it back beside the list. `presentation` / `onPresentationChange`
925
+ * take the choice over; `defaultPresentation` seeds it.
850
926
  */
851
- declare function Aside({ open, variant, modal, placeholder, onClose, children, }: BasicPageAsideProps): import("react").JSX.Element | null;
927
+ declare function Aside({ open, variant, modal, placeholder, onClose, width, presentation, defaultPresentation, onPresentationChange, expandable, children, }: BasicPageAsideProps): import("react").JSX.Element | null;
852
928
  /**
853
929
  * Controlled, the query and its setter come together: a `value` with no
854
930
  * way to change it would be a field that silently ignores typing.
@@ -908,6 +984,39 @@ interface BasicPageSearchOwnProps extends ComponentProps<"div"> {
908
984
  * `search` is on the page.
909
985
  */
910
986
  declare function Search({ variant, fold, value, onValueChange, placeholder, label, className, ...props }: BasicPageSearchProps): import("react").JSX.Element;
987
+ /**
988
+ * Two-column body on a wide page. The side column is floored at 29rem —
989
+ * a `pho_res_` + 26-character resource id sits whole beside its label in
990
+ * a card row — and capped at 32rem so it stays a facts column, not a
991
+ * second reading measure. The main column takes the rest.
992
+ *
993
+ * Pair with `Root width="wide"` so the canvas can host both columns.
994
+ * `Columns` brings its own `@container`: two columns only when the
995
+ * container can hold the 42rem reading column, a 2.5rem gutter, and the
996
+ * 29rem side (73.5rem). Below that the page is one 42rem reading column,
997
+ * source order main → side → foot. Leave `side` out and it stays that
998
+ * reading column at every width.
999
+ *
1000
+ * Each slot is a `Stack`. The grid owns the seams between them (16px
1001
+ * row gap + a 24px stack seat = 40px, the block rhythm), so hosts never
1002
+ * put `mt-*` on a stack. `enter` is the stacks' — see `Stack`.
1003
+ */
1004
+ export interface BasicPageColumnsProps {
1005
+ /** The page's `Title` or `Header`, across the top of both columns. */
1006
+ header?: ReactNode;
1007
+ /** The primary column. Left; first in one column. */
1008
+ main: ReactNode;
1009
+ /**
1010
+ * The facts and offers. Right, 29–32rem; first after `main` in one
1011
+ * column. Left out, the page stays one reading column.
1012
+ */
1013
+ side?: ReactNode;
1014
+ /** What ends the page. Under `side` on the right; last in one column. */
1015
+ foot?: ReactNode;
1016
+ /** Whether the stacks play the page entrance — see `Stack`. */
1017
+ enter?: boolean;
1018
+ }
1019
+ declare function Columns({ header, main, side, foot, enter }: BasicPageColumnsProps): import("react").JSX.Element;
911
1020
  export declare const BasicPage: {
912
1021
  Root: typeof Root;
913
1022
  Aside: typeof Aside;
@@ -919,6 +1028,7 @@ export declare const BasicPage: {
919
1028
  Back: typeof Back;
920
1029
  Title: typeof Title;
921
1030
  Stack: typeof Stack;
1031
+ Columns: typeof Columns;
922
1032
  Header: typeof Header;
923
1033
  HeaderAction: typeof HeaderAction;
924
1034
  SectionTitle: typeof SectionTitle;
@@ -1,2 +1,2 @@
1
- export { BasicPage, formToasts, AUTO_SAVE_DELAY_MS, useCondense, useAutoSave, type BasicPageCondense, BASIC_PAGE_CARD, CONDENSE_BAR_ENTER, CONDENSE_BAR_TRAVEL, CONDENSE_BAR_RISE_PX, BASIC_PAGE_CALLOUT, BASIC_PAGE_ROW, BASIC_PAGE_ITEM, BASIC_PAGE_ITEM_PANEL, BASIC_PAGE_ITEM_PANEL_DIVIDED, type BasicPageRootProps, type BasicPageAsideProps, type BasicPageRowProps, type BasicPageRowLinkProps, type BasicPageBackProps, type BasicPageBreadcrumbsProps, type BasicPageCrumbProps, type BasicPageFooterProps, type BasicPageFormProps, type BasicPageFormErrors, type BasicPageItemPanelProps, type BasicPageOnboardProps, type BasicPageStepProps, } from './basic-page';
1
+ export { BasicPage, formToasts, AUTO_SAVE_DELAY_MS, useCondense, useAutoSave, type BasicPageCondense, BASIC_PAGE_CARD, CONDENSE_BAR_ENTER, CONDENSE_BAR_TRAVEL, CONDENSE_BAR_RISE_PX, BASIC_PAGE_CALLOUT, BASIC_PAGE_ROW, BASIC_PAGE_ITEM, BASIC_PAGE_ITEM_PANEL, BASIC_PAGE_ITEM_PANEL_DIVIDED, type BasicPageRootProps, type BasicPageColumnsProps, type BasicPageAsideProps, type BasicPageAsideWidth, type BasicPageAsidePresentation, type BasicPageRowProps, type BasicPageRowLinkProps, type BasicPageBackProps, type BasicPageBreadcrumbsProps, type BasicPageCrumbProps, type BasicPageFooterProps, type BasicPageFormProps, type BasicPageFormErrors, type BasicPageItemPanelProps, type BasicPageOnboardProps, type BasicPageStepProps, } from './basic-page';
2
2
  export { createColumns, type DataTableColumn, type DataTableColumnMeta, type DataTableProps, type SortingState, } from '../../components/data-table';
@@ -1 +1 @@
1
- export { Sidebar, SIDEBAR_ROOT, SIDEBAR_ROOT_BASE, SIDEBAR_ROOT_INSET, SIDEBAR_HEADER_INSET, SIDEBAR_ITEM, SIDEBAR_ITEM_ACTIVE, SIDEBAR_ITEM_INACTIVE, type SidebarInset, type SidebarItemProps, type SidebarItemLinkProps, type SidebarItemButtonProps, type SidebarAccountRowProps, } from './sidebar';
1
+ export { Sidebar, SIDEBAR_ROOT, SIDEBAR_ROOT_BASE, SIDEBAR_ROOT_INSET, SIDEBAR_HEADER_INSET, SIDEBAR_ITEM, SIDEBAR_ITEM_ACTIVE, SIDEBAR_ITEM_INACTIVE, SIDEBAR_SUBMENU_TRIGGER_CHILD_ACTIVE, SIDEBAR_SUBMENU_CHEVRON, SIDEBAR_SUBMENU_LIST_INDENT, type SidebarInset, type SidebarItemProps, type SidebarItemLinkProps, type SidebarItemButtonProps, type SidebarSubmenuProps, type SidebarAccountRowProps, } from './sidebar';
@@ -44,6 +44,28 @@ export declare const SIDEBAR_ITEM_ACTIVE = "bg-pho-primary text-pho-primary ring
44
44
  * on `pho-page`. Icon tracks the label's ink at every state.
45
45
  */
46
46
  export declare const SIDEBAR_ITEM_INACTIVE: string;
47
+ /**
48
+ * A submenu's parent row while one of its children is the current page —
49
+ * primary ink on label and icon, but no surface or ring: the child row
50
+ * carries the full active chip, the parent only points at it.
51
+ */
52
+ export declare const SIDEBAR_SUBMENU_TRIGGER_CHILD_ACTIVE = "text-pho-primary *:data-icon:text-pho-primary";
53
+ /**
54
+ * The trailing chevron on a submenu row — points right at rest, rotates to
55
+ * point down while the panel is open. Base UI sets `data-panel-open` on the
56
+ * trigger; the global reduced-motion guard collapses the rotation.
57
+ */
58
+ export declare const SIDEBAR_SUBMENU_CHEVRON = "ml-auto size-4 shrink-0 transition-transform duration-150 ease-out";
59
+ /**
60
+ * Indent for a submenu's rows so their labels line up with the parent's
61
+ * label: parent padding (8px) + icon (16px) + gap (8px) = 32px, minus the
62
+ * child row's own 8px padding. Without a parent icon the label sits at 8px,
63
+ * so children step in by one row padding only.
64
+ */
65
+ export declare const SIDEBAR_SUBMENU_LIST_INDENT: {
66
+ readonly withIcon: "pl-6";
67
+ readonly withoutIcon: "pl-4";
68
+ };
47
69
  interface RootProps extends ComponentProps<"aside"> {
48
70
  /** Outer padding + header spacing. Defaults to `base`. */
49
71
  inset?: SidebarInset;
@@ -129,6 +151,51 @@ export type SidebarItemProps = SidebarItemLinkProps | SidebarItemButtonProps;
129
151
  * primary surface; `external` opens a new tab and appends a ↗ cue.
130
152
  */
131
153
  declare function Item({ icon, active, className, children, href, external, ...rest }: SidebarItemProps): import("react").JSX.Element;
154
+ export interface SidebarSubmenuProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | MotionHandlerConflicts> {
155
+ /** The parent row's label. */
156
+ label: ReactNode;
157
+ /** Slot before the label — a component (`IconBook`) or element. */
158
+ icon?: Slottable;
159
+ /** Controlled open state. Pair with `onOpenChange`. */
160
+ open?: boolean;
161
+ /** Initial open state when uncontrolled. Defaults to `false`. */
162
+ defaultOpen?: boolean;
163
+ /** Called with the next open state on every toggle (user or auto-open). */
164
+ onOpenChange?: (open: boolean) => void;
165
+ /**
166
+ * Open the panel whenever a child row becomes `active`, so a route-based
167
+ * rail expands the right group on load and on navigation. Defaults to
168
+ * `true`. The user can still collapse the group afterwards.
169
+ */
170
+ openWhenChildActive?: boolean;
171
+ /**
172
+ * Force the parent's child-active ink. Normally derived from the
173
+ * children's `active` flags — set this when the current destination lives
174
+ * under the group but has no row of its own.
175
+ */
176
+ active?: boolean;
177
+ /** The nested rows — `Sidebar.Item`s, no icon needed. */
178
+ children: ReactNode;
179
+ ref?: Ref<HTMLButtonElement>;
180
+ }
181
+ /**
182
+ * A nav row that folds open to reveal child rows — `<Item>` metrics on the
183
+ * trigger, a trailing chevron that turns as the panel opens, and the nested
184
+ * list indented to the parent's label. Built on `Collapsible`, so the
185
+ * height animation (and its reduced-motion collapse) is the library's own.
186
+ *
187
+ * Children are ordinary `Sidebar.Item`s: they report `active` upward, so the
188
+ * parent takes primary ink while a child is current and, with
189
+ * `openWhenChildActive` (default), opens on load without a flash.
190
+ *
191
+ * ```tsx
192
+ * <Sidebar.Submenu label="Platforms" icon={IconMessage}>
193
+ * <Sidebar.Item href="/platforms/sms" active>SMS</Sidebar.Item>
194
+ * <Sidebar.Item href="/platforms/imessage">iMessage</Sidebar.Item>
195
+ * </Sidebar.Submenu>
196
+ * ```
197
+ */
198
+ declare function Submenu({ label, icon, open: openProp, defaultOpen, onOpenChange, openWhenChildActive, active: activeProp, className, children, ...rest }: SidebarSubmenuProps): import("react").JSX.Element;
132
199
  export interface SidebarAccountRowProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | MotionHandlerConflicts> {
133
200
  /** Display name — also the source for fallback initials. */
134
201
  name: string;
@@ -165,6 +232,10 @@ declare function AccountRow({ name, avatarSrc, initials, className, ...props }:
165
232
  * <Sidebar.Item href="/" icon={IconHome} active>
166
233
  * Overview
167
234
  * </Sidebar.Item>
235
+ * <Sidebar.Submenu label="Platforms" icon={IconMessage}>
236
+ * <Sidebar.Item href="/platforms/sms">SMS</Sidebar.Item>
237
+ * <Sidebar.Item href="/platforms/email">Email</Sidebar.Item>
238
+ * </Sidebar.Submenu>
168
239
  * </Sidebar.List>
169
240
  * </Sidebar.Group>
170
241
  * </Sidebar.Nav>
@@ -186,6 +257,7 @@ export declare const Sidebar: {
186
257
  GroupLabel: typeof GroupLabel;
187
258
  List: typeof List;
188
259
  Item: typeof Item;
260
+ Submenu: typeof Submenu;
189
261
  Footer: typeof Footer;
190
262
  AccountRow: typeof AccountRow;
191
263
  };
@@ -0,0 +1,11 @@
1
+ import { ComponentProps } from 'react';
2
+ export interface GhostSearchProps extends Omit<ComponentProps<"input">, "value" | "onChange" | "type" | "children"> {
3
+ value: string;
4
+ onChange: (value: string) => void;
5
+ }
6
+ /**
7
+ * A search box with no box: the glyph and the text on the surface's own
8
+ * line, the way a toolbar band inside a card carries it (a `DataTable`'s
9
+ * search, a `Trace.Waterfall`'s). Quiet ink, no ring until focus.
10
+ */
11
+ export declare function GhostSearch({ value, onChange, className, ...props }: GhostSearchProps): import("react").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@photon-ai/pho-ui",
3
- "version": "2.15.0",
3
+ "version": "2.17.0",
4
4
  "description": "Pho Design System — Photon's React component library, built on Base UI",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -37,6 +37,10 @@
37
37
  "types": "./dist/src/components/data-table/index.d.ts",
38
38
  "import": "./dist/components/data-table.js"
39
39
  },
40
+ "./components/date-range-picker": {
41
+ "types": "./dist/src/components/date-range-picker/index.d.ts",
42
+ "import": "./dist/components/date-range-picker.js"
43
+ },
40
44
  "./components/input": {
41
45
  "types": "./dist/src/components/input/index.d.ts",
42
46
  "import": "./dist/components/input.js"
@@ -1 +0,0 @@
1
- {"version":3,"file":"bar-chart-BJfr3eyd.js","names":[],"sources":["../../src/components/bar-chart/bar-chart.tsx"],"sourcesContent":["import { useMemo, useState, type PointerEvent } from \"react\";\nimport { XAxis, YAxis } from \"../chart/axes\";\nimport { chartColor } from \"../chart/color\";\nimport { describeChart, numberFormatter, readValue } from \"../chart/format\";\nimport { ChartLegend } from \"../chart/legend\";\nimport {\n bucketSpan,\n bucketTimeFormatter,\n linearScale,\n nearestIndex,\n niceLinearDomain,\n thinTicks,\n timeAxisTicks,\n timeTickFormatter,\n toTime,\n} from \"../chart/scale\";\nimport { ChartShell, chartLayout } from \"../chart/shell\";\nimport { ChartTooltip } from \"../chart/tooltip\";\nimport type { ChartBaseProps, ChartDatum } from \"../chart/types\";\nimport { useMeasuredWidth } from \"../chart/use-measure\";\n\n/**\n * BarChart — buckets over time as columns: messages a day, requests an\n * hour, deliveries. One series, several side by side, or `stacked` for\n * parts of a whole (inbound / outbound, successful / failed).\n *\n * Design notes:\n * - Marks are thin: a column never fills its slot and never runs past\n * 24px; the leftover is air. The data end is rounded (4px), the\n * baseline end square — in a stack only the top segment gets the\n * corners, and a 2px gap in the surface colour separates segments\n * instead of a stroke.\n * - Gridlines are hairlines one step off the surface; the zero line a\n * touch stronger. Axis text is description ink at 11px; the y-axis\n * labels thin themselves to three to five round numbers, the x-axis to\n * the round times that fit.\n * - Hover lifts the bucket with the ghost wash and opens the tooltip on\n * it: the bucket's time, every series' value, and the bucket's\n * `breakdown` when it has one (errors by route).\n * - The figure is `role=\"img\"` with the `label` and a spoken summary; the\n * legend is real text below the plot, present for two or more series.\n */\n\nconst BAR_MAX = 24;\nconst RADIUS = 4;\n\nexport interface BarChartProps<T extends ChartDatum> extends ChartBaseProps<T> {\n /** Stack the series in one column per bucket, first series at the bottom. */\n stacked?: boolean;\n}\n\n/** A column with its data end rounded and its baseline end square. */\nfunction barPath(\n x: number,\n top: number,\n width: number,\n height: number,\n end: \"top\" | \"bottom\",\n): string {\n const r = Math.min(RADIUS, width / 2, height);\n const bottom = top + height;\n if (r <= 0) return `M${x},${top}h${width}v${height}h${-width}Z`;\n if (end === \"top\") {\n return `M${x},${bottom}v${-(height - r)}a${r},${r} 0 0 1 ${r},${-r}h${width - 2 * r}a${r},${r} 0 0 1 ${r},${r}v${height - r}Z`;\n }\n return `M${x},${top}h${width}v${height - r}a${r},${r} 0 0 1 ${-r},${r}h${-(width - 2 * r)}a${r},${r} 0 0 1 ${-r},${-r}Z`;\n}\n\nexport function BarChart<T extends ChartDatum>({\n data,\n series,\n label,\n description,\n height = 200,\n width: fixedWidth,\n valueFormat,\n timeFormat,\n locale,\n legend,\n baseline = \"zero\",\n stacked = false,\n breakdownTitle,\n loading,\n empty = \"Nothing here yet.\",\n className,\n ...props\n}: BarChartProps<T>) {\n const [containerRef, width] = useMeasuredWidth<HTMLDivElement>(fixedWidth);\n const [hovered, setHovered] = useState<number | null>(null);\n\n const model = useMemo(() => {\n const colors = series.map((s, index) => chartColor(s.color, index));\n const times = data.map((d) => toTime(d.x));\n const span = bucketSpan(times);\n const axisFormat = valueFormat ?? numberFormatter(locale, true);\n const fullFormat = valueFormat ?? numberFormatter(locale);\n const headingFormat = timeFormat ?? bucketTimeFormatter(locale, span);\n // Per bucket, per series: the value and, when stacked, where it sits.\n const columns = data.map((d) => {\n let positive = 0;\n let negative = 0;\n return series.map((s) => {\n const value = readValue(d, s.key);\n if (!stacked) return { value, from: 0, to: value ?? 0 };\n if (value == null || value === 0) {\n return { value, from: value ?? 0, to: value ?? 0 };\n }\n if (value > 0) {\n const from = positive;\n positive += value;\n return { value, from, to: positive };\n }\n const from = negative;\n negative += value;\n return { value, from, to: negative };\n });\n });\n let min = Infinity;\n let max = -Infinity;\n for (const column of columns) {\n for (const segment of column) {\n if (segment.value == null) continue;\n min = Math.min(min, segment.from, segment.to);\n max = Math.max(max, segment.from, segment.to);\n }\n }\n if (min === Infinity) {\n min = 0;\n max = 0;\n }\n if (baseline === \"zero\") {\n min = Math.min(0, min);\n max = Math.max(0, max);\n }\n const y = niceLinearDomain(min, max);\n const yLabels = y.ticks.map(axisFormat);\n return {\n colors,\n times,\n span,\n axisFormat,\n fullFormat,\n headingFormat,\n columns,\n y,\n yLabels,\n described:\n description ??\n describeChart({\n data,\n series,\n kind: \"bar\",\n valueFormat: fullFormat,\n timeFormat: headingFormat,\n }),\n };\n }, [\n data,\n series,\n stacked,\n baseline,\n valueFormat,\n timeFormat,\n locale,\n description,\n ]);\n\n const layout = chartLayout(width, height, model.yLabels);\n const n = data.length;\n // Buckets are centred in equal bands; positions come from the time\n // scale so a missing bucket leaves its hole rather than closing up.\n const halfSpan = model.span > 0 ? model.span / 2 : 1;\n const t0 = (model.times[0] ?? 0) - halfSpan;\n const t1 = (model.times[n - 1] ?? 0) + halfSpan;\n const { left, right } = layout;\n const xScale = useMemo(\n () => linearScale([t0, t1], [left, right]),\n [t0, t1, left, right],\n );\n const yScale = linearScale(model.y.domain, [layout.bottom, layout.top]);\n const band = n > 0 ? layout.innerWidth / n : 0;\n const gap = band >= 6 ? 2 : band >= 3 ? 1 : 0;\n const slot = Math.max(1, Math.min(BAR_MAX, band - gap));\n const groups = stacked ? 1 : series.length;\n const barWidth = Math.max(\n 1,\n (slot - (groups - 1) * Math.min(2, gap)) / groups,\n );\n const centers = useMemo(\n () => model.times.map((t) => xScale(t)),\n [model.times, xScale],\n );\n\n const xTicks = useMemo(() => {\n const innerWidth = right - left;\n if (n === 0 || innerWidth <= 0) return [];\n const format = timeTickFormatter(locale);\n const ticks = timeAxisTicks(\n model.times[0]!,\n model.times[n - 1]!,\n innerWidth,\n );\n return thinTicks(ticks, format, innerWidth).map((tick) => ({\n x: xScale(tick.getTime()),\n label: format(tick),\n }));\n }, [n, model.times, left, right, xScale, locale]);\n\n const onPointerMove = (event: PointerEvent<SVGSVGElement>) => {\n if (n === 0) return;\n const rect = event.currentTarget.getBoundingClientRect();\n const scale = rect.width > 0 ? width / rect.width : 1;\n const px = (event.clientX - rect.left) * scale;\n setHovered(nearestIndex(centers, px));\n };\n\n const hoveredDatum = hovered != null ? data[hovered] : undefined;\n const showLegend = legend ?? series.length > 1;\n const zeroY = yScale(0);\n\n return (\n <ChartShell\n label={label}\n description={model.described}\n height={height}\n width={width}\n containerRef={containerRef}\n loading={loading}\n empty={empty}\n showEmpty={n === 0 && !loading}\n onPlotPointerMove={onPointerMove}\n onPlotPointerLeave={() => setHovered(null)}\n className={className}\n legend={\n showLegend ? (\n <ChartLegend\n items={series.map((s, index) => ({\n label: s.label,\n color: model.colors[index]!,\n kind: \"rect\",\n }))}\n />\n ) : null\n }\n tooltip={\n hovered != null && hoveredDatum != null ? (\n <ChartTooltip\n x={centers[hovered]!}\n width={width}\n top={layout.top}\n heading={model.headingFormat(new Date(hoveredDatum.x))}\n rows={series.map((s, index) => {\n const value = model.columns[hovered]![index]!.value;\n return {\n label: s.label,\n value: value == null ? \"No data\" : model.fullFormat(value),\n color: model.colors[index]!,\n kind: \"rect\",\n };\n })}\n breakdown={hoveredDatum.breakdown}\n breakdownTitle={breakdownTitle}\n valueFormat={model.fullFormat}\n />\n ) : null\n }\n {...props}\n >\n <YAxis\n layout={layout}\n ticks={model.y.ticks}\n labels={model.yLabels}\n scale={yScale}\n />\n <XAxis layout={layout} ticks={xTicks} />\n {hovered != null && hoveredDatum != null && (\n <rect\n x={centers[hovered]! - band / 2}\n y={layout.top}\n width={band}\n height={layout.innerHeight}\n fill=\"var(--background-color-pho-ghost-hover)\"\n />\n )}\n <g data-bars=\"\">\n {model.columns.map((column, i) => {\n const cx = centers[i]!;\n // The topmost drawn segment in each direction gets the corners.\n let lastPositive = -1;\n let lastNegative = -1;\n column.forEach((segment, index) => {\n if (segment.value == null || segment.value === 0) return;\n if (segment.value > 0) lastPositive = index;\n else lastNegative = index;\n });\n return column.map((segment, index) => {\n const { value } = segment;\n if (value == null || value === 0) return null;\n const x = stacked\n ? cx - slot / 2\n : cx - slot / 2 + index * (barWidth + Math.min(2, gap));\n const w = stacked ? slot : barWidth;\n const yFrom = yScale(segment.from);\n const yTo = yScale(segment.to);\n let top = Math.min(yFrom, yTo);\n let h = Math.abs(yFrom - yTo);\n const positive = value > 0;\n // Side by side, every column is its own and gets the corners.\n const outer =\n !stacked ||\n (positive ? index === lastPositive : index === lastNegative);\n // The 2px surface gap: shave 1px off each side of a boundary\n // between two segments, when the segment can spare it.\n if (stacked && h > 3) {\n if (!outer) {\n if (positive) top += 1;\n h -= 1;\n }\n if (segment.from !== 0) {\n if (!positive) top += 1;\n h -= 1;\n }\n }\n return (\n <path\n key={series[index]!.key}\n d={\n outer\n ? barPath(x, top, w, h, positive ? \"top\" : \"bottom\")\n : `M${x},${top}h${w}v${h}h${-w}Z`\n }\n fill={model.colors[index]}\n data-series={series[index]!.key}\n />\n );\n });\n })}\n </g>\n {model.y.domain[0] < 0 && model.y.domain[1] > 0 ? null : (\n <line\n x1={layout.left}\n x2={layout.right}\n y1={zeroY}\n y2={zeroY}\n stroke=\"var(--color-pho-chart-crosshair)\"\n />\n )}\n </ChartShell>\n );\n}\n\nBarChart.displayName = \"BarChart\";\n"],"mappings":";;;;;AA2CA,IAAM,KAAU,IACV,KAAS;AAQf,SAAS,GACP,GACA,GACA,GACA,GACA,GACQ;AACR,QAAM,IAAI,KAAK,IAAI,IAAQ,IAAQ,GAAG,CAAM,GACtC,IAAS,IAAM;AACrB,SAAI,KAAK,IAAU,IAAI,CAAA,IAAK,CAAA,IAAO,CAAA,IAAS,CAAA,IAAU,CAAC,CAAA,MACnD,MAAQ,QACH,IAAI,CAAA,IAAK,CAAA,IAAU,EAAE,IAAS,EAAA,IAAM,CAAA,IAAK,CAAA,UAAW,CAAA,IAAK,CAAC,CAAA,IAAK,IAAQ,IAAI,CAAA,IAAK,CAAA,IAAK,CAAA,UAAW,CAAA,IAAK,CAAA,IAAK,IAAS,CAAA,MAErH,IAAI,CAAA,IAAK,CAAA,IAAO,CAAA,IAAS,IAAS,CAAA,IAAK,CAAA,IAAK,CAAA,UAAW,CAAC,CAAA,IAAK,CAAA,IAAK,EAAE,IAAQ,IAAI,EAAA,IAAM,CAAA,IAAK,CAAA,UAAW,CAAC,CAAA,IAAK,CAAC,CAAA;AACtH;AAEA,SAAgB,GAA+B,EAC7C,MAAA,GACA,QAAA,GACA,OAAA,GACA,aAAA,GACA,QAAA,IAAS,KACT,OAAO,GACP,aAAA,GACA,YAAA,GACA,QAAA,GACA,QAAA,GACA,UAAA,IAAW,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