@ostack.tech/ui-exhibit 0.10.0 → 0.10.2

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 CHANGED
@@ -1,3 +1,3 @@
1
- # `@ostack.tech/exhibit`
1
+ # `@ostack.tech/ui-exhibit`
2
2
 
3
3
  Exhibit of ostack/UI components.
@@ -37,7 +37,7 @@ body {
37
37
  overflow-x: auto;
38
38
  }
39
39
  .exhibit-grid:focus-visible {
40
- border-radius: var(--o-ui-border-radius-sm);
40
+ border-radius: var(--o-ui-border-radius-xs);
41
41
  outline: 2px solid var(--o-ui-primary-8);
42
42
  outline-offset: 2px;
43
43
  }
@@ -1,11 +1,10 @@
1
1
  import { jsxs, jsx, Fragment as Fragment$1 } from "react/jsx-runtime";
2
- import { Stack, Heading, Link, VisuallyHidden, AlertDialog, AlertDialogTrigger, Button, AlertDialogContent, AlertDialogHeader, AlertDialogTitle, AlertDialogBody, AlertDialogDescription, AlertDialogFooter, AlertDialogCancel, AlertDialogAction, Alert, AlertTitle, ButtonGroup, IconButton, Calendar, Field, Label, CheckboxGroup, Checkbox, Feedback, HelperText, Code, useSpacing, Collapsible, CollapsibleTrigger, CollapsibleContent, useCssVars, useKeyboardShortcut, Keybinds, CommandMenuDialog, CommandMenu, CommandMenuGroup, CommandMenuItem, DataTable, DataTableFilter, DataTableContent, DataTableRowsPerPage, DataTablePagination, DateInput, DateRangeInput, Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, DialogBody, DialogDescription, Input, DialogFooter, DialogClose, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuCheckboxItem, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, Keyboard, Mark, MenuList, MenuListGroup, MenuListItem, NumericInput, ControlAddon, Output, Popover, PopoverTrigger, PopoverContent, TextArea, RadioGroup, Radio, Select, Option, Spinner, Table, TableHead, TableColumn, TableBody, TableRow, TableCell, TableFoot, Tabs, TabList, Tab, TabContent, Tag, useToastManager, Tooltip, Root, enGB, Container } from "@ostack.tech/ui";
2
+ import { useCssVars, Stack, Heading, Link, VisuallyHidden, AlertDialog, AlertDialogTrigger, Button, AlertDialogContent, AlertDialogHeader, AlertDialogTitle, AlertDialogBody, AlertDialogDescription, AlertDialogFooter, AlertDialogCancel, AlertDialogAction, Alert, AlertTitle, ButtonGroup, IconButton, Calendar, Field, Label, CheckboxGroup, Checkbox, Feedback, HelperText, Code, useSpacing, Collapsible, CollapsibleTrigger, CollapsibleContent, useKeyboardShortcut, Keybinds, CommandMenuDialog, CommandMenu, CommandMenuGroup, CommandMenuItem, DataTable, DataTableFilter, DataTableContent, DataTableRowsPerPage, DataTablePagination, DateInput, DateRangeInput, Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, DialogBody, DialogDescription, Input, DialogFooter, DialogClose, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuCheckboxItem, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, Keyboard, Mark, MenuList, MenuListGroup, MenuListItem, NumericInput, ControlAddon, Output, Popover, PopoverTrigger, PopoverContent, TextArea, RadioGroup, Radio, Select, Option, Spinner, Table, TableHead, TableColumn, TableBody, TableRow, TableCell, TableFoot, Tabs, TabList, Tab, TabContent, Tag, useToastManager, Tooltip, Root, enGB, Container } from "@ostack.tech/ui";
3
3
  import { createContext, useContext, Fragment, useState } from "react";
4
4
  import { faFolderOpen, faSave, faTrashCan, faBolt, faCaretUp, faCaretDown, faGear, faWifi, faNetworkWired, faDisplay, faVolumeHigh, faKeyboard, faPrint, faClock, faUser, faCircleXmark, faSeedling, faEye, faPencil, faComment, faStar, faBookmark } from "@fortawesome/free-solid-svg-icons";
5
- const DEV_DOCS_URL = "http://localhost:6006/";
6
5
  const ExhibitContext = createContext(null);
7
6
  function useDocsUrl() {
8
- return useContext(ExhibitContext)?.docsUrl ?? DEV_DOCS_URL;
7
+ return useContext(ExhibitContext).docsUrl;
9
8
  }
10
9
  function ExhibitGrid({
11
10
  rows,
@@ -38,16 +37,17 @@ function ExhibitSection({
38
37
  docsPage,
39
38
  children
40
39
  }) {
40
+ const { cssVar } = useCssVars();
41
41
  const docsUrl = useDocsUrl();
42
42
  const headingId = title.toLowerCase().replace(/[^a-z0-9]/g, "-");
43
43
  return /* @__PURE__ */ jsx(Stack, { asChild: true, children: /* @__PURE__ */ jsxs("section", { className: "exhibit-section", "aria-labelledby": headingId, children: [
44
- /* @__PURE__ */ jsx(Stack, { asChild: true, direction: "row", gap: 4, alignItems: "center", children: /* @__PURE__ */ jsxs("header", { children: [
44
+ /* @__PURE__ */ jsx(Stack, { asChild: true, direction: "row", gap: 4, alignItems: "baseline", children: /* @__PURE__ */ jsxs("header", { children: [
45
45
  /* @__PURE__ */ jsx(Heading, { id: headingId, children: /* @__PURE__ */ jsx(
46
46
  Link,
47
47
  {
48
48
  href: `#${headingId}`,
49
49
  color: "neutral",
50
- style: { color: "var(--o-ui-neutral-12)" },
50
+ style: { color: cssVar("neutral-a12") },
51
51
  children: title
52
52
  }
53
53
  ) }),
@@ -1410,9 +1410,9 @@ function ToastSection() {
1410
1410
  function TooltipSection() {
1411
1411
  return /* @__PURE__ */ jsx(ExhibitSection, { title: "Tooltip", docsPage: "ostack-ui-overlay-tooltip", children: /* @__PURE__ */ jsx(Tooltip, { content: "Press to reload all content", children: /* @__PURE__ */ jsx(Button, { children: "Refresh" }) }) });
1412
1412
  }
1413
- const DEFAULT_PROD_DOCS_URL = "https://ui.ostack.tech/";
1413
+ const DEFAULT_DOCS_URL = process.env.NODE_ENV === "production" ? "https://ui.ostack.tech/" : "http://localhost:6006/";
1414
1414
  function ExhibitApp({
1415
- docsUrl = DEFAULT_PROD_DOCS_URL,
1415
+ docsUrl = DEFAULT_DOCS_URL,
1416
1416
  title = document.title,
1417
1417
  prefix,
1418
1418
  actions