@sybilion/uilib 1.4.5 → 1.4.7

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 (29) hide show
  1. package/assets/globals.css +9 -7
  2. package/assets/logo-favicon.svg +3 -0
  3. package/dist/agent-glossary/workspace.generated.ts +1 -0
  4. package/dist/agent-glossary/workspace.index.md +1 -0
  5. package/dist/agent-glossary/workspace.md +1 -0
  6. package/dist/esm/components/ui/InfoIconTooltip/InfoIconTooltip.js +10 -0
  7. package/dist/esm/components/ui/InfoIconTooltip/InfoIconTooltip.styl.js +7 -0
  8. package/dist/esm/components/ui/Input/Input.styl.js +2 -2
  9. package/dist/esm/components/ui/InteractiveContent/InteractiveContent.styl.js +1 -1
  10. package/dist/esm/components/ui/LegacyPlatformLink/LegacyPlatformLink.styl.js +1 -1
  11. package/dist/esm/index.js +1 -0
  12. package/dist/esm/types/src/docs/pages/InfoIconTooltipPage.d.ts +1 -0
  13. package/dist/esm/types/src/index.d.ts +1 -0
  14. package/package.json +3 -1
  15. package/src/components/ui/InfoIconTooltip/AGENT.md +27 -0
  16. package/src/components/ui/InfoIconTooltip/InfoIconTooltip.styl.d.ts +1 -1
  17. package/src/components/ui/InfoIconTooltip/InfoIconTooltip.tsx +1 -1
  18. package/src/components/ui/Input/Input.styl +7 -1
  19. package/src/components/ui/Input/Input.styl.d.ts +1 -0
  20. package/src/components/ui/InteractiveContent/InteractiveContent.styl +2 -8
  21. package/src/components/ui/LegacyPlatformLink/LegacyPlatformLink.styl +1 -1
  22. package/src/docs/agent-guidance/colors.md +1 -1
  23. package/src/docs/components/DocsGuidance/DocsGuidance.styl +80 -2
  24. package/src/docs/components/DocsGuidance/DocsGuidance.tsx +29 -2
  25. package/src/docs/config/webpack.config.js +4 -2
  26. package/src/docs/pages/ColorsPage.tsx +3 -0
  27. package/src/docs/pages/InfoIconTooltipPage.tsx +26 -0
  28. package/src/docs/registry.ts +6 -0
  29. package/src/index.ts +1 -0
@@ -39,6 +39,9 @@
39
39
  --color-primary-foreground: var(--primary-foreground);
40
40
  --color-primary: var(--primary);
41
41
  --color-brand: var(--brand-color);
42
+ --color-link: var(--link-color);
43
+ --color-link-hover: var(--link-color-hover);
44
+ --color-link-active: var(--link-color-active);
42
45
  --color-popover-foreground: var(--popover-foreground);
43
46
  --color-popover: var(--popover);
44
47
  --color-card-foreground: var(--card-foreground);
@@ -360,9 +363,9 @@
360
363
  --sidebar-border: oklch(0.9 0 0);
361
364
  --sidebar-ring: oklch(0.65 0 0);
362
365
 
363
- --sb-link-color: var(--brand-color-500);
364
- --sb-link-visited-color: var(--brand-color-700);
365
- --sb-link-color-hover: var(--brand-color-600);
366
+ --link-color: var(--sb-cyan-700);
367
+ --link-color-hover: color-mix(in oklch, var(--link-color) 80%, black);
368
+ --link-color-active: color-mix(in oklch, var(--link-color) 65%, black);
366
369
  }
367
370
 
368
371
  @media (max-width: var(--bp-mobile)) {
@@ -415,8 +418,6 @@
415
418
  --sidebar-accent-foreground: oklch(0.95 0 0);
416
419
  --sidebar-border: oklch(0.3 0 0);
417
420
  --sidebar-ring: oklch(0.5 0 0);
418
- --sb-link-color: var(--brand-color-400);
419
- --sb-link-visited-color: var(--brand-color-600);
420
421
  --status-positive: var(--sb-green-400);
421
422
  --status-positive-bg: var(--sb-green-900);
422
423
  --status-negative: var(--sb-red-400);
@@ -533,16 +534,17 @@
533
534
  }
534
535
 
535
536
  a {
536
- color: var(--sb-link-color);
537
+ color: var(--link-color);
537
538
  cursor: pointer;
538
539
  }
539
540
 
540
541
  a:visited {
541
- color: var(--sb-link-visited-color);
542
+ color: var(--link-color-active);
542
543
  }
543
544
 
544
545
  a:hover {
545
546
  text-decoration: underline;
547
+ color: var(--link-color-hover);
546
548
  }
547
549
 
548
550
  ::selection {
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
2
+ <path fill="#C259FF" d="M13.43 24.023h-2.836v-2.836h2.836zm-2.835-2.844H5.63v-2.74h4.965Zm10.527-2.74h-2.726v2.74h-4.965v-2.74h4.952v-4.965h2.74zm-15.5 0h-2.74v-4.965h2.74ZM2.87 13.462H.034v-2.836H2.87Zm21.096 0H21.13v-2.836h2.836zM5.617 10.635h-2.74V5.669h2.74zm15.505 0h-2.74V5.669h2.74zM10.588 2.927v2.74H5.623v-2.74Zm2.842 0h4.96v2.74h-4.966v-2.74h-2.83V.09h2.836z" style="stroke-width:.13252" />
3
+ </svg>
@@ -35,6 +35,7 @@ Entry point for \`@sybilion/uilib\`. Open linked AGENT.md before using a compone
35
35
  - [GridLayout](src/components/ui/GridLayout/AGENT.md) — GridLayout is a responsive CSS grid that fits as many columns as the container allows, with each cell keeping at leas…
36
36
  - [Image](src/components/ui/Image/AGENT.md) — Image is a thin wrapper around the native img element that loads a remote URL and accepts a fallback for when the req…
37
37
  - [ImageWithFallback](src/components/ui/ImageWithFallback/AGENT.md) — ImageWithFallback renders an image from a URL and swaps in the provided fallback content when the image fails to load…
38
+ - [InfoIconTooltip](src/components/ui/InfoIconTooltip/AGENT.md) — Question-icon trigger with a capped-width tooltip for inline supplementary help.
38
39
  - [Input](src/components/ui/Input/AGENT.md) — Input is the standard single-line text field. Pair it with a Label linked via htmlFor and id, and control the value t…
39
40
  - [InteractiveContent](src/components/ui/InteractiveContent/AGENT.md) — InteractiveContent renders assistant-style plain text with inline formatting: bold and italic emphasis, inline code v…
40
41
  - [Kicker](src/components/ui/Kicker/AGENT.md) — Kicker is a small eyebrow label rendered above a heading, card, or section. It uses the 12px Manrope label style in s…
@@ -34,6 +34,7 @@ Entry point for `@sybilion/uilib`. Open linked AGENT.md before using a component
34
34
  - [GridLayout](src/components/ui/GridLayout/AGENT.md) — GridLayout is a responsive CSS grid that fits as many columns as the container allows, with each cell keeping at leas…
35
35
  - [Image](src/components/ui/Image/AGENT.md) — Image is a thin wrapper around the native img element that loads a remote URL and accepts a fallback for when the req…
36
36
  - [ImageWithFallback](src/components/ui/ImageWithFallback/AGENT.md) — ImageWithFallback renders an image from a URL and swaps in the provided fallback content when the image fails to load…
37
+ - [InfoIconTooltip](src/components/ui/InfoIconTooltip/AGENT.md) — Question-icon trigger with a capped-width tooltip for inline supplementary help.
37
38
  - [Input](src/components/ui/Input/AGENT.md) — Input is the standard single-line text field. Pair it with a Label linked via htmlFor and id, and control the value t…
38
39
  - [InteractiveContent](src/components/ui/InteractiveContent/AGENT.md) — InteractiveContent renders assistant-style plain text with inline formatting: bold and italic emphasis, inline code v…
39
40
  - [Kicker](src/components/ui/Kicker/AGENT.md) — Kicker is a small eyebrow label rendered above a heading, card, or section. It uses the 12px Manrope label style in s…
@@ -34,6 +34,7 @@ Entry point for `@sybilion/uilib`. Open linked AGENT.md before using a component
34
34
  - [GridLayout](src/components/ui/GridLayout/AGENT.md) — GridLayout is a responsive CSS grid that fits as many columns as the container allows, with each cell keeping at leas…
35
35
  - [Image](src/components/ui/Image/AGENT.md) — Image is a thin wrapper around the native img element that loads a remote URL and accepts a fallback for when the req…
36
36
  - [ImageWithFallback](src/components/ui/ImageWithFallback/AGENT.md) — ImageWithFallback renders an image from a URL and swaps in the provided fallback content when the image fails to load…
37
+ - [InfoIconTooltip](src/components/ui/InfoIconTooltip/AGENT.md) — Question-icon trigger with a capped-width tooltip for inline supplementary help.
37
38
  - [Input](src/components/ui/Input/AGENT.md) — Input is the standard single-line text field. Pair it with a Label linked via htmlFor and id, and control the value t…
38
39
  - [InteractiveContent](src/components/ui/InteractiveContent/AGENT.md) — InteractiveContent renders assistant-style plain text with inline formatting: bold and italic emphasis, inline code v…
39
40
  - [Kicker](src/components/ui/Kicker/AGENT.md) — Kicker is a small eyebrow label rendered above a heading, card, or section. It uses the 12px Manrope label style in s…
@@ -0,0 +1,10 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { Tooltip, TooltipTrigger, TooltipContent } from '../Tooltip/Tooltip.js';
3
+ import { QuestionIcon } from '@phosphor-icons/react';
4
+ import S from './InfoIconTooltip.styl.js';
5
+
6
+ function InfoIconTooltip({ children }) {
7
+ return (jsxs(Tooltip, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx("span", { children: jsx(QuestionIcon, { size: 16, className: S.infoIcon }) }) }), jsx(TooltipContent, { maxWidth: 300, children: children })] }));
8
+ }
9
+
10
+ export { InfoIconTooltip };
@@ -0,0 +1,7 @@
1
+ import styleInject from 'style-inject';
2
+
3
+ var css_248z = ".InfoIconTooltip_infoIcon__98O2C{color:var(--muted-foreground);cursor:help;transform:translateY(1px)}";
4
+ var S = {"infoIcon":"InfoIconTooltip_infoIcon__98O2C"};
5
+ styleInject(css_248z);
6
+
7
+ export { S as default };
@@ -1,7 +1,7 @@
1
1
  import styleInject from 'style-inject';
2
2
 
3
- var css_248z = ".Input_root__IY-8R{background-color:transparent;display:flex;min-width:0;outline:none;transition:color,box-shadow;transition-duration:.15s;width:100%}.Input_root__IY-8R.Input_variant-default__nISPW{border-radius:var(--radius-input);box-shadow:0 0 0 1px var(--border);padding:11px 14px}.Input_root__IY-8R.Input_variant-default__nISPW:focus{box-shadow:inset 0 0 0 2px var(--brand-color-400)}.Input_root__IY-8R.Input_size-sm__mhl1Y{font-size:var(--text-xs);height:32px}.Input_root__IY-8R.Input_size-md__L5iKp{font-size:var(--text-sm);height:40px}.Input_root__IY-8R.Input_size-lg__0l--u{font-size:var(--text-base);height:48px}.Input_root__IY-8R:placeholder{color:var(--muted-foreground)}.Input_root__IY-8R::-moz-selection{background-color:var(--primary);color:var(--primary-foreground)}.Input_root__IY-8R::selection{background-color:var(--primary);color:var(--primary-foreground)}.Input_root__IY-8R.Input_variant-default__nISPW:focus-visible{border-color:var(--ring);ring:3px var(--ring)/.5}.Input_root__IY-8R.Input_variant-default__nISPW[aria-invalid=true]{border-color:var(--destructive);ring:3px var(--destructive)/.2}.Input_root__IY-8R:disabled{cursor:not-allowed;opacity:.5;pointer-events:none}.Input_root__IY-8R[type=file]::file-selector-button{background-color:transparent;border:0;color:var(--foreground);display:inline-flex;font-size:14px;font-weight:500;height:28px}.dark .Input_root__IY-8R{background-color:var(--input)/.3}.dark .Input_root__IY-8R[aria-invalid=true]{ring:3px var(--destructive)/.4}";
4
- var S = {"root":"Input_root__IY-8R","variant-default":"Input_variant-default__nISPW","size-sm":"Input_size-sm__mhl1Y","size-md":"Input_size-md__L5iKp","size-lg":"Input_size-lg__0l--u"};
3
+ var css_248z = ".Input_root__IY-8R{background-color:transparent;display:flex;min-width:0;outline:none;transition:color,box-shadow;transition-duration:.15s;width:100%}.Input_root__IY-8R.Input_variant-clean__xr6Bi,.Input_root__IY-8R.Input_variant-default__nISPW{padding-left:14px;padding-right:14px}.Input_root__IY-8R.Input_variant-default__nISPW{border-radius:var(--radius-input);box-shadow:0 0 0 1px var(--border);padding-bottom:11px;padding-top:11px}.Input_root__IY-8R.Input_variant-default__nISPW:focus{box-shadow:inset 0 0 0 2px var(--brand-color-400)}.Input_root__IY-8R.Input_size-sm__mhl1Y{font-size:var(--text-xs);height:32px}.Input_root__IY-8R.Input_size-md__L5iKp{font-size:var(--text-sm);height:40px}.Input_root__IY-8R.Input_size-lg__0l--u{font-size:var(--text-base);height:48px}.Input_root__IY-8R:placeholder{color:var(--muted-foreground)}.Input_root__IY-8R::-moz-selection{background-color:var(--primary);color:var(--primary-foreground)}.Input_root__IY-8R::selection{background-color:var(--primary);color:var(--primary-foreground)}.Input_root__IY-8R.Input_variant-default__nISPW:focus-visible{border-color:var(--ring);ring:3px var(--ring)/.5}.Input_root__IY-8R.Input_variant-default__nISPW[aria-invalid=true]{border-color:var(--destructive);ring:3px var(--destructive)/.2}.Input_root__IY-8R:disabled{cursor:not-allowed;opacity:.5;pointer-events:none}.Input_root__IY-8R[type=file]::file-selector-button{background-color:transparent;border:0;color:var(--foreground);display:inline-flex;font-size:14px;font-weight:500;height:28px}.dark .Input_root__IY-8R{background-color:var(--input)/.3}.dark .Input_root__IY-8R[aria-invalid=true]{ring:3px var(--destructive)/.4}";
4
+ var S = {"root":"Input_root__IY-8R","variant-default":"Input_variant-default__nISPW","variant-clean":"Input_variant-clean__xr6Bi","size-sm":"Input_size-sm__mhl1Y","size-md":"Input_size-md__L5iKp","size-lg":"Input_size-lg__0l--u"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { S as default };
@@ -1,6 +1,6 @@
1
1
  import styleInject from 'style-inject';
2
2
 
3
- var css_248z = ".InteractiveContent_root__FHnlY{box-sizing:border-box;display:inline-block;max-width:100%;min-width:0;overflow-wrap:anywhere;word-break:break-word}.InteractiveContent_root__FHnlY strong{font-weight:600}.InteractiveContent_root__FHnlY em{font-style:italic}.InteractiveContent_root__FHnlY code{background-color:var(--background);border-radius:var(--p-1);box-shadow:0 0 1px var(--foreground);color:var(--foreground);font-family:ui-monospace,SF Mono,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.875em;padding:.2em .35em}.InteractiveContent_textLink__Ubh4i{color:var(--sb-green-600);text-decoration:underline;text-underline-offset:2px}.InteractiveContent_textLink__Ubh4i:hover{color:var(--sb-green-700)}.dark .InteractiveContent_textLink__Ubh4i{color:var(--sb-green-400)}.dark .InteractiveContent_textLink__Ubh4i:hover{color:var(--sb-green-300)}.InteractiveContent_autolinkUrl__W0tQH{align-items:center;border-radius:var(--p-2);box-sizing:border-box;color:var(--link-color);display:inline-flex;font-size:var(--text-xs);gap:6px;line-height:1.4;margin:0 1px;max-width:100%;padding:2px 8px 2px 6px;position:relative;text-decoration:none;vertical-align:middle}.InteractiveContent_autolinkUrl__W0tQH:before{background-color:var(--link-color);border-radius:inherit;content:\"\";display:inline-block;height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%}.InteractiveContent_autolinkUrl__W0tQH:hover:before{opacity:.2}.InteractiveContent_autolinkUrlIcon__QoqlQ{flex-shrink:0}.InteractiveContent_autolinkUrlLabel__CcJOG{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";
3
+ var css_248z = ".InteractiveContent_root__FHnlY{box-sizing:border-box;display:inline-block;max-width:100%;min-width:0;overflow-wrap:anywhere;word-break:break-word}.InteractiveContent_root__FHnlY strong{font-weight:600}.InteractiveContent_root__FHnlY em{font-style:italic}.InteractiveContent_root__FHnlY code{background-color:var(--background);border-radius:var(--p-1);box-shadow:0 0 1px var(--foreground);color:var(--foreground);font-family:ui-monospace,SF Mono,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.875em;padding:.2em .35em}.InteractiveContent_textLink__Ubh4i{text-decoration:underline;text-underline-offset:2px}.InteractiveContent_textLink__Ubh4i:hover{color:var(--link-color-hover);text-decoration:none}.InteractiveContent_autolinkUrl__W0tQH{align-items:center;border-radius:var(--p-2);box-sizing:border-box;color:var(--link-color);display:inline-flex;font-size:var(--text-xs);gap:6px;line-height:1.4;margin:0 1px;max-width:100%;padding:2px 8px 2px 6px;position:relative;text-decoration:none;vertical-align:middle}.InteractiveContent_autolinkUrl__W0tQH:before{background-color:var(--link-color);border-radius:inherit;content:\"\";display:inline-block;height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%}.InteractiveContent_autolinkUrl__W0tQH:hover:before{opacity:.2}.InteractiveContent_autolinkUrlIcon__QoqlQ{flex-shrink:0}.InteractiveContent_autolinkUrlLabel__CcJOG{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";
4
4
  var S = {"root":"InteractiveContent_root__FHnlY","textLink":"InteractiveContent_textLink__Ubh4i","autolinkUrl":"InteractiveContent_autolinkUrl__W0tQH","autolinkUrlIcon":"InteractiveContent_autolinkUrlIcon__QoqlQ","autolinkUrlLabel":"InteractiveContent_autolinkUrlLabel__CcJOG"};
5
5
  styleInject(css_248z);
6
6
 
@@ -1,6 +1,6 @@
1
1
  import styleInject from 'style-inject';
2
2
 
3
- var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.LegacyPlatformLink_link__Ul3uT{color:var(--foreground);text-decoration:underline;text-underline-offset:2px;white-space:nowrap}.LegacyPlatformLink_link__Ul3uT:hover{color:var(--sb-link-color-hover)}";
3
+ var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.LegacyPlatformLink_link__Ul3uT{color:var(--foreground);text-decoration:underline;text-underline-offset:2px;white-space:nowrap}.LegacyPlatformLink_link__Ul3uT:hover{color:var(--link-color-hover)}";
4
4
  var S = {"link":"LegacyPlatformLink_link__Ul3uT"};
5
5
  styleInject(css_248z);
6
6
 
package/dist/esm/index.js CHANGED
@@ -57,6 +57,7 @@ export { Foldable } from './components/ui/Foldable/Foldable.js';
57
57
  export { Gap } from './components/ui/Gap/Gap.js';
58
58
  export { GridLayout } from './components/ui/GridLayout/GridLayout.js';
59
59
  export { Image } from './components/ui/Image/Image.js';
60
+ export { InfoIconTooltip } from './components/ui/InfoIconTooltip/InfoIconTooltip.js';
60
61
  export { ImageWithFallback } from './components/ui/ImageWithFallback/ImageWithFallback.js';
61
62
  export { Input } from './components/ui/Input/Input.js';
62
63
  export { InteractiveContent } from './components/ui/InteractiveContent/InteractiveContent.js';
@@ -0,0 +1 @@
1
+ export default function InfoIconTooltipPage(): import("react/jsx-runtime").JSX.Element;
@@ -38,6 +38,7 @@ export * from './components/ui/Foldable';
38
38
  export * from './components/ui/Gap/Gap';
39
39
  export * from './components/ui/GridLayout/GridLayout';
40
40
  export * from './components/ui/Image';
41
+ export * from './components/ui/InfoIconTooltip/InfoIconTooltip';
41
42
  export * from './components/ui/ImageWithFallback';
42
43
  export * from './components/ui/Input';
43
44
  export * from './components/ui/InteractiveContent';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sybilion/uilib",
3
- "version": "1.4.5",
3
+ "version": "1.4.7",
4
4
  "description": "Sybilion Design System — React UI components (Webpack + Stylus)",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -187,8 +187,10 @@
187
187
  "prettier": "^3.6.2",
188
188
  "react": "^19.0.0",
189
189
  "react-dom": "^19.1.1",
190
+ "react-markdown": "^10.1.0",
190
191
  "react-refresh": "^0.17.0",
191
192
  "react-router-dom": "^6.28.0",
193
+ "remark-gfm": "^4.0.1",
192
194
  "rollup": "^3.17.1",
193
195
  "rollup-plugin-delete": "^2.0.0",
194
196
  "rollup-plugin-dts": "^6.1.1",
@@ -0,0 +1,27 @@
1
+ ---
2
+ summary: Question-icon trigger with a capped-width tooltip for inline supplementary help.
3
+ ---
4
+
5
+ InfoIconTooltip renders a small question icon that opens a Tooltip on hover or focus. Pass `children` as the tooltip body; content is capped at 300px width. Use this for the standard “info next to a label” pattern instead of composing Tooltip, TooltipTrigger, and TooltipContent yourself.
6
+
7
+ ## When to use
8
+
9
+ - To add brief help next to a label, setting name, or metric without expanding the layout.
10
+ - When users expect a familiar info-icon affordance for optional, non-critical context.
11
+ - For short explanatory copy that supplements visible UI text.
12
+
13
+ ## When not to use
14
+
15
+ - When you need a custom trigger (button, link, truncated text); compose Tooltip directly.
16
+ - For information users must read to complete a task; show it in the layout instead.
17
+ - For rich or interactive content; use Popover or HoverCard instead.
18
+
19
+ ## Do
20
+
21
+ - Keep tooltip text concise; one or two sentences is usually enough.
22
+ - Place the icon immediately after the label or control it explains.
23
+
24
+ ## Don't
25
+
26
+ - Repeat text that is already visible next to the icon.
27
+ - Use multiple info icons in a row when a single tooltip or inline description would suffice.
@@ -1,7 +1,7 @@
1
1
  // This file is automatically generated.
2
2
  // Please do not change this file!
3
3
  interface CssExports {
4
- infoIcon: string;
4
+ 'infoIcon': string;
5
5
  }
6
6
  export const cssExports: CssExports;
7
7
  export default cssExports;
@@ -3,8 +3,8 @@ import {
3
3
  TooltipContent,
4
4
  TooltipTrigger,
5
5
  } from '#uilib/components/ui/Tooltip';
6
- import { QuestionIcon } from '@phosphor-icons/react';
7
6
 
7
+ import { QuestionIcon } from '@phosphor-icons/react';
8
8
  import S from './InfoIconTooltip.styl';
9
9
 
10
10
  export function InfoIconTooltip({ children }: { children: React.ReactNode }) {
@@ -7,8 +7,14 @@
7
7
  transition color, box-shadow
8
8
  transition-duration 150ms
9
9
 
10
+ &.variant-default,
11
+ &.variant-clean
12
+ padding-left 14px
13
+ padding-right 14px
14
+
10
15
  &.variant-default
11
- padding 11px 14px
16
+ padding-top 11px
17
+ padding-bottom 11px
12
18
  border-radius var(--radius-input)
13
19
  box-shadow 0 0 0 1px var(--border)
14
20
 
@@ -5,6 +5,7 @@ interface CssExports {
5
5
  'size-lg': string;
6
6
  'size-md': string;
7
7
  'size-sm': string;
8
+ 'variant-clean': string;
8
9
  'variant-default': string;
9
10
  }
10
11
  export const cssExports: CssExports;
@@ -22,18 +22,12 @@
22
22
  box-shadow 0 0 1px var(--foreground)
23
23
 
24
24
  .textLink
25
- color var(--sb-green-600)
26
25
  text-decoration underline
27
26
  text-underline-offset 2px
28
27
 
29
28
  &:hover
30
- color var(--sb-green-700)
31
-
32
- :global(.dark) &
33
- color var(--sb-green-400)
34
-
35
- &:hover
36
- color var(--sb-green-300)
29
+ text-decoration none
30
+ color var(--link-color-hover)
37
31
 
38
32
  .autolinkUrl
39
33
  position relative
@@ -7,4 +7,4 @@
7
7
  white-space nowrap
8
8
 
9
9
  &:hover
10
- color var(--sb-link-color-hover)
10
+ color var(--link-color-hover)
@@ -2,7 +2,7 @@ Colour is defined as a set of core ramps (--sb-cyan/purple/red/green/yellow/gray
2
2
 
3
3
  ## When to use
4
4
 
5
- - Semantic tokens for surfaces, text, borders, and status colour in components.
5
+ - Semantic tokens for surfaces, text, borders, links, and status colour in components. For links, set only `--link-color` per theme; `--link-color-hover` and `--link-color-active` derive from it via `color-mix`.
6
6
  - Ramp steps for data visualisation or decorative accents where a specific hue is needed.
7
7
 
8
8
  ## When not to use
@@ -8,8 +8,14 @@
8
8
  max-width 720px
9
9
  line-height 1.6
10
10
 
11
- :global(.interactive-content)
12
- display block
11
+ :global(h1)
12
+ margin var(--p-4) 0 var(--p-2)
13
+ font-size var(--text-lg)
14
+ font-weight 600
15
+ color var(--foreground)
16
+
17
+ &:first-child
18
+ margin-top 0
13
19
 
14
20
  :global(h2)
15
21
  margin var(--p-4) 0 var(--p-2)
@@ -20,6 +26,15 @@
20
26
  &:first-child
21
27
  margin-top 0
22
28
 
29
+ :global(h3)
30
+ margin var(--p-3) 0 var(--p-2)
31
+ font-size var(--text-sm)
32
+ font-weight 600
33
+ color var(--foreground)
34
+
35
+ &:first-child
36
+ margin-top 0
37
+
23
38
  :global(ul)
24
39
  margin 0 0 var(--p-3)
25
40
  padding-left var(--p-5)
@@ -27,8 +42,71 @@
27
42
  li + li
28
43
  margin-top 2px
29
44
 
45
+ :global(ol)
46
+ margin 0 0 var(--p-3)
47
+ padding-left var(--p-5)
48
+
49
+ li + li
50
+ margin-top 2px
51
+
30
52
  :global(p)
31
53
  margin 0 0 var(--p-3)
32
54
 
33
55
  &:last-child
34
56
  margin-bottom 0
57
+
58
+ :global(code)
59
+ font-family ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace
60
+ font-size 0.875em
61
+ padding 0.2em 0.35em
62
+ border-radius var(--p-1)
63
+ background-color var(--background)
64
+ color var(--foreground)
65
+ box-shadow 0 0 1px var(--foreground)
66
+
67
+ :global(pre)
68
+ margin 0 0 var(--p-3)
69
+ padding var(--p-3)
70
+ overflow-x auto
71
+ border-radius var(--p-2)
72
+ background-color var(--background)
73
+ box-shadow 0 0 1px var(--foreground)
74
+
75
+ code
76
+ padding 0
77
+ box-shadow none
78
+ background none
79
+
80
+ :global(a)
81
+ color var(--sb-green-600)
82
+ text-decoration underline
83
+ text-underline-offset 2px
84
+
85
+ &:hover
86
+ color var(--sb-green-700)
87
+
88
+ :global(.dark) &
89
+ color var(--sb-green-400)
90
+
91
+ &:hover
92
+ color var(--sb-green-300)
93
+
94
+ :global(table)
95
+ width 100%
96
+ margin 0 0 var(--p-3)
97
+ border-collapse collapse
98
+ font-size var(--text-sm)
99
+
100
+ :global(th),
101
+ :global(td)
102
+ padding var(--p-2) var(--p-3)
103
+ border 1px solid var(--border)
104
+ text-align left
105
+ vertical-align top
106
+
107
+ :global(th)
108
+ font-weight 600
109
+ background-color var(--background)
110
+
111
+ :global(strong)
112
+ font-weight 600
@@ -1,5 +1,8 @@
1
- import { InteractiveContent } from '#uilib/components/ui/InteractiveContent';
1
+ import type { Components } from 'react-markdown';
2
+ import ReactMarkdown from 'react-markdown';
3
+
2
4
  import { PageContentSection } from '#uilib/components/ui/Page';
5
+ import remarkGfm from 'remark-gfm';
3
6
 
4
7
  import { stripAgentFrontmatter } from '../../agent-guidance/agent-md-utils';
5
8
  import S from './DocsGuidance.styl';
@@ -9,13 +12,37 @@ export interface DocsGuidanceProps {
9
12
  source: string;
10
13
  }
11
14
 
15
+ function linkTargetRelForHref(href: string): { target?: string; rel?: string } {
16
+ if (/^https?:\/\//i.test(href) || /^mailto:/i.test(href)) {
17
+ return { target: '_blank', rel: 'noopener noreferrer' };
18
+ }
19
+ return {};
20
+ }
21
+
22
+ const markdownComponents: Components = {
23
+ a: ({ href, children, ...props }) => {
24
+ const safeHref = href ?? '';
25
+ const { target, rel } = linkTargetRelForHref(safeHref);
26
+ return (
27
+ <a href={safeHref} target={target} rel={rel} {...props}>
28
+ {children}
29
+ </a>
30
+ );
31
+ },
32
+ };
33
+
12
34
  export function DocsGuidance({ source }: DocsGuidanceProps) {
13
35
  const body = stripAgentFrontmatter(source);
14
36
 
15
37
  return (
16
38
  <PageContentSection grow={false} className={S.root}>
17
39
  <div className={S.markdown}>
18
- <InteractiveContent text={body} variant="full" />
40
+ <ReactMarkdown
41
+ remarkPlugins={[remarkGfm]}
42
+ components={markdownComponents}
43
+ >
44
+ {body}
45
+ </ReactMarkdown>
19
46
  </div>
20
47
  </PageContentSection>
21
48
  );
@@ -21,6 +21,8 @@ const pkg = require('../../../package.json');
21
21
 
22
22
  const themeStyl = pathResolve(paths.src, 'theme.styl');
23
23
  const logoSvgPath = pathResolve(paths.assets, 'logo.svg');
24
+ /** Favicon rasterization has no CSS context; currentColor in logo.svg renders black. */
25
+ const faviconLogoSvgPath = pathResolve(paths.assets, 'logo-favicon.svg');
24
26
 
25
27
  /** GitHub Pages project sites live at /<repo>/; set PUBLIC_PATH=/repo-name/ for production deploy. */
26
28
  function normalizePublicPath(raw) {
@@ -233,9 +235,9 @@ export default (env, argv) => {
233
235
  ...docsHtmlPluginBase,
234
236
  filename: '404.html',
235
237
  }),
236
- existsSync(logoSvgPath) &&
238
+ existsSync(faviconLogoSvgPath) &&
237
239
  new FaviconWebpackPlugin({
238
- logo: logoSvgPath,
240
+ logo: faviconLogoSvgPath,
239
241
  mode: 'webapp',
240
242
  devMode: 'webapp',
241
243
  favicons: {
@@ -47,6 +47,9 @@ const SEMANTIC_TOKENS = [
47
47
  '--status-positive-bg',
48
48
  '--status-negative',
49
49
  '--status-negative-bg',
50
+ '--link-color',
51
+ '--link-color-hover',
52
+ '--link-color-active',
50
53
  ];
51
54
 
52
55
  function Swatch({ token }: { token: string }) {
@@ -0,0 +1,26 @@
1
+ import InfoIconTooltipGuidance from '#uilib/components/ui/InfoIconTooltip/AGENT.md';
2
+ import { InfoIconTooltip } from '#uilib/components/ui/InfoIconTooltip/InfoIconTooltip';
3
+ import { PageContentSection } from '#uilib/components/ui/Page';
4
+
5
+ import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
6
+ import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
7
+ import { DocsHeaderActions } from '../docsHeaderActions';
8
+
9
+ export default function InfoIconTooltipPage() {
10
+ return (
11
+ <>
12
+ <AppPageHeader
13
+ breadcrumbs={[{ label: 'InfoIconTooltip' }]}
14
+ title="InfoIconTooltip"
15
+ subheader="Question icon with supplementary tooltip."
16
+ actions={<DocsHeaderActions />}
17
+ />
18
+ <DocsGuidance source={InfoIconTooltipGuidance} />
19
+ <PageContentSection>
20
+ <div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
21
+ <InfoIconTooltip>Test tooltip content.</InfoIconTooltip>
22
+ </div>
23
+ </PageContentSection>
24
+ </>
25
+ );
26
+ }
@@ -507,6 +507,12 @@ export const DOC_REGISTRY: DocEntry[] = [
507
507
  section: 'Forms',
508
508
  load: () => import('./pages/ToggleGroupPage'),
509
509
  },
510
+ {
511
+ slug: 'info-icon-tooltip',
512
+ title: 'InfoIconTooltip',
513
+ section: 'Overlays',
514
+ load: () => import('./pages/InfoIconTooltipPage'),
515
+ },
510
516
  {
511
517
  slug: 'tooltip',
512
518
  title: 'Tooltip',
package/src/index.ts CHANGED
@@ -43,6 +43,7 @@ export * from './components/ui/Foldable';
43
43
  export * from './components/ui/Gap/Gap';
44
44
  export * from './components/ui/GridLayout/GridLayout';
45
45
  export * from './components/ui/Image';
46
+ export * from './components/ui/InfoIconTooltip/InfoIconTooltip';
46
47
  export * from './components/ui/ImageWithFallback';
47
48
  export * from './components/ui/Input';
48
49
  export * from './components/ui/InteractiveContent';