@photon-ai/pho-ui 4.19.0 → 4.20.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.
- package/README.md +1 -1
- package/dist/chunks/{basic-page-Cp7CccNN.js → basic-page-DTomHxEo.js} +7 -7
- package/dist/chunks/basic-page-DTomHxEo.js.map +1 -0
- package/dist/chunks/{card-zyRAihYE.js → card-Bg2V2B0x.js} +17 -17
- package/dist/chunks/card-Bg2V2B0x.js.map +1 -0
- package/dist/chunks/{stat-BXBfMQ9Q.js → stat-VxA1SvS_.js} +8 -8
- package/dist/chunks/{stat-BXBfMQ9Q.js.map → stat-VxA1SvS_.js.map} +1 -1
- package/dist/components/card.js +1 -1
- package/dist/components/stat.js +1 -1
- package/dist/index.js +3 -3
- package/dist/sections/basic-page.js +1 -1
- package/package.json +1 -1
- package/src/styles/fonts.css +67 -9
- package/src/styles/theme.css +12 -5
- package/dist/chunks/basic-page-Cp7CccNN.js.map +0 -1
- package/dist/chunks/card-zyRAihYE.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card-zyRAihYE.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 \"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 \"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,gBA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