@robert-stackflow/oneui 0.5.2 → 0.6.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 (51) hide show
  1. package/CHANGELOG.md +0 -12
  2. package/README.md +169 -149
  3. package/components/AppShell.d.ts +6 -13
  4. package/components/AppShell.js +28 -17
  5. package/components/AppShell.module.css +0 -20
  6. package/components/AuthLayout.d.ts +8 -0
  7. package/components/AuthLayout.js +25 -0
  8. package/components/AuthLayout.module.css +36 -0
  9. package/components/Badge.d.ts +2 -2
  10. package/components/Badge.js +4 -2
  11. package/components/BarChart.d.ts +8 -0
  12. package/components/BarChart.js +37 -0
  13. package/components/BarChart.module.css +34 -0
  14. package/components/Button.d.ts +1 -1
  15. package/components/Button.module.css +3 -6
  16. package/components/ContributionCalendar.js +2 -2
  17. package/components/ContributionCalendar.module.css +3 -0
  18. package/components/CopyButton.d.ts +9 -0
  19. package/components/CopyButton.js +23 -0
  20. package/components/Dialog.module.css +0 -9
  21. package/components/Drawer.module.css +0 -9
  22. package/components/Layout.d.ts +81 -0
  23. package/components/Layout.js +271 -0
  24. package/components/Layout.module.css +66 -0
  25. package/components/Menu.d.ts +4 -1
  26. package/components/Menu.js +10 -4
  27. package/components/MultiSelect.d.ts +1 -2
  28. package/components/MultiSelect.js +13 -82
  29. package/components/MultiSelect.module.css +0 -6
  30. package/components/NumberInput.d.ts +1 -0
  31. package/components/NumberInput.js +4 -0
  32. package/components/NumberInput.module.css +11 -0
  33. package/components/Page.d.ts +7 -1
  34. package/components/Page.js +15 -8
  35. package/components/Page.module.css +1 -11
  36. package/components/Pagination.d.ts +2 -1
  37. package/components/Pagination.js +3 -2
  38. package/components/ResourceCard.d.ts +12 -0
  39. package/components/ResourceCard.js +24 -0
  40. package/components/ResourceCard.module.css +13 -0
  41. package/components/SidebarNavigation.d.ts +29 -0
  42. package/components/SidebarNavigation.js +139 -0
  43. package/components/SidebarNavigation.module.css +109 -0
  44. package/components/Table.module.css +2 -2
  45. package/components/TableMarkup.d.ts +23 -0
  46. package/components/TableMarkup.js +41 -0
  47. package/components/Tooltip.d.ts +2 -1
  48. package/components/Tooltip.js +3 -1
  49. package/components/index.d.ts +12 -2
  50. package/components/index.js +42 -1
  51. package/package.json +42 -2
@@ -1,6 +1,6 @@
1
1
  .scroll {
2
2
  overflow-x: auto;
3
- border-radius: var(--radius);
3
+ border-radius: inherit;
4
4
  max-width: 100%;
5
5
  }
6
6
  .table {
@@ -12,7 +12,7 @@
12
12
  }
13
13
  .table th {
14
14
  color: var(--muted);
15
- font-size: 11px;
15
+ font-size: 12px;
16
16
  font-weight: 500;
17
17
  background: var(--canvas);
18
18
  padding: 12px 16px;
@@ -0,0 +1,23 @@
1
+ import type { HTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, CSSProperties, ReactNode } from "react";
2
+ /** Semantic table composition for cells with forms, selection and nested content. */
3
+ declare function Markup({ children, className, ...props }: HTMLAttributes<HTMLTableElement>): import("react").JSX.Element;
4
+ declare function ScrollContainer({ children, minWidth, }: {
5
+ children: ReactNode;
6
+ minWidth?: number;
7
+ }): import("react").JSX.Element;
8
+ declare function Th({ ta, w, style, ...props }: ThHTMLAttributes<HTMLTableCellElement> & {
9
+ ta?: CSSProperties["textAlign"];
10
+ w?: CSSProperties["width"];
11
+ }): import("react").JSX.Element;
12
+ declare function Td({ ta, style, ...props }: TdHTMLAttributes<HTMLTableCellElement> & {
13
+ ta?: CSSProperties["textAlign"];
14
+ }): import("react").JSX.Element;
15
+ export declare const TableMarkup: typeof Markup & {
16
+ ScrollContainer: typeof ScrollContainer;
17
+ Thead: "thead";
18
+ Tbody: "tbody";
19
+ Tr: "tr";
20
+ Th: typeof Th;
21
+ Td: typeof Td;
22
+ };
23
+ export {};
@@ -0,0 +1,41 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import s from "./Table.module.css";
3
+ function Markup({
4
+ children,
5
+ className = "",
6
+ ...props
7
+ }) {
8
+ return /* @__PURE__ */ jsx("table", { ...props, className: `${s.table} ${className}`, children });
9
+ }
10
+ function ScrollContainer({
11
+ children,
12
+ minWidth = 600
13
+ }) {
14
+ return /* @__PURE__ */ jsx("div", { className: s.scroll, children: /* @__PURE__ */ jsx("div", { style: { minWidth }, children }) });
15
+ }
16
+ function Th({
17
+ ta,
18
+ w,
19
+ style,
20
+ ...props
21
+ }) {
22
+ return /* @__PURE__ */ jsx("th", { ...props, style: { textAlign: ta, width: w, ...style } });
23
+ }
24
+ function Td({
25
+ ta,
26
+ style,
27
+ ...props
28
+ }) {
29
+ return /* @__PURE__ */ jsx("td", { ...props, style: { textAlign: ta, ...style } });
30
+ }
31
+ const TableMarkup = Object.assign(Markup, {
32
+ ScrollContainer,
33
+ Thead: "thead",
34
+ Tbody: "tbody",
35
+ Tr: "tr",
36
+ Th,
37
+ Td
38
+ });
39
+ export {
40
+ TableMarkup
41
+ };
@@ -1,7 +1,8 @@
1
1
  import { type ReactElement } from "react";
2
2
  type Side = "top" | "bottom" | "left" | "right";
3
- export declare function Tooltip({ content, placement, children, }: {
3
+ export declare function Tooltip({ content, placement, children, disabled, }: {
4
4
  content: string;
5
+ disabled?: boolean;
5
6
  placement?: Side;
6
7
  children: ReactElement<{
7
8
  "aria-describedby"?: string;
@@ -23,7 +23,8 @@ import { useSurfacePortal } from "./surfacePortal.js";
23
23
  function Tooltip({
24
24
  content,
25
25
  placement,
26
- children
26
+ children,
27
+ disabled = false
27
28
  }) {
28
29
  const config = useUIConfig();
29
30
  const preferred = placement || config.tooltipPlacement, id = useId();
@@ -127,6 +128,7 @@ function Tooltip({
127
128
  }[actual];
128
129
  void surfaceMotion(node, "enter", node.dataset.offset);
129
130
  }, [open, preferred, portalHost]);
131
+ if (disabled) return children;
130
132
  return /* @__PURE__ */ jsxs(Fragment, { children: [
131
133
  /* @__PURE__ */ jsx(
132
134
  "span",
@@ -12,7 +12,7 @@ export { IconButton } from "./IconButton";
12
12
  export { Input } from "./Input";
13
13
  export { MultiSelect } from "./MultiSelect";
14
14
  export { NumberInput } from "./NumberInput";
15
- export { Page } from "./Page";
15
+ export { Page, PageHeading } from "./Page";
16
16
  export { Popover } from "./Popover";
17
17
  export { Progress } from "./Progress";
18
18
  export { SearchField } from "./SearchField";
@@ -151,7 +151,9 @@ export { ThemeProvider } from "./ThemeProvider";
151
151
  export type { UITheme, ColorMode } from "./ThemeProvider";
152
152
  export { ThemeStylePicker } from "./ThemeStylePicker";
153
153
  export { AppShell, ShellHeader } from "./AppShell";
154
- export type { NavigationItem, NavigationGroup, AppShellProps, } from "./AppShell";
154
+ export type { NavigationItem, AppShellProps } from "./AppShell";
155
+ export { SidebarNavigation } from "./SidebarNavigation";
156
+ export type { SidebarNavigationProps } from "./SidebarNavigation";
155
157
  export { SettingsLayout, SettingsCard } from "./SettingsLayout";
156
158
  export { AppearanceSettings } from "./AppearanceSettings";
157
159
  export { appearanceDefaults, normalizeAppearance } from "./appearance";
@@ -159,3 +161,11 @@ export type { AppearancePreferences } from "./appearance";
159
161
  export { MessageDialog, ConfirmDialog, FormDialog } from "./DialogVariants";
160
162
  export { TreeTable, type TreeTableProps } from "./TreeTable";
161
163
  export { createToaster, type ToastController, type ToastNotify, } from "./createToaster";
164
+ export { Box, Stack, Group, Center, SimpleGrid, Surface, Text, Heading, Code, ScrollArea, IconSurface, } from "./Layout";
165
+ export { TableMarkup } from "./TableMarkup";
166
+ export { CopyButton } from "./CopyButton";
167
+ export { NavigationButton } from "./SidebarNavigation";
168
+ export { AuthLayout } from "./AuthLayout";
169
+ export { BarChart } from "./BarChart";
170
+ export { Mark } from "./Layout";
171
+ export { ResourceCard } from "./ResourceCard";
@@ -12,7 +12,7 @@ import { IconButton } from "./IconButton.js";
12
12
  import { Input } from "./Input.js";
13
13
  import { MultiSelect } from "./MultiSelect.js";
14
14
  import { NumberInput } from "./NumberInput.js";
15
- import { Page } from "./Page.js";
15
+ import { Page, PageHeading } from "./Page.js";
16
16
  import { Popover } from "./Popover.js";
17
17
  import { Progress } from "./Progress.js";
18
18
  import { SearchField } from "./SearchField.js";
@@ -107,6 +107,7 @@ import { UIProvider, useUIConfig } from "./UIProvider.js";
107
107
  import { ThemeProvider } from "./ThemeProvider.js";
108
108
  import { ThemeStylePicker } from "./ThemeStylePicker.js";
109
109
  import { AppShell, ShellHeader } from "./AppShell.js";
110
+ import { SidebarNavigation } from "./SidebarNavigation.js";
110
111
  import { SettingsLayout, SettingsCard } from "./SettingsLayout.js";
111
112
  import { AppearanceSettings } from "./AppearanceSettings.js";
112
113
  import { appearanceDefaults, normalizeAppearance } from "./appearance.js";
@@ -115,6 +116,26 @@ import { TreeTable } from "./TreeTable.js";
115
116
  import {
116
117
  createToaster
117
118
  } from "./createToaster.js";
119
+ import {
120
+ Box,
121
+ Stack,
122
+ Group,
123
+ Center,
124
+ SimpleGrid,
125
+ Surface,
126
+ Text,
127
+ Heading,
128
+ Code,
129
+ ScrollArea,
130
+ IconSurface
131
+ } from "./Layout.js";
132
+ import { TableMarkup } from "./TableMarkup.js";
133
+ import { CopyButton } from "./CopyButton.js";
134
+ import { NavigationButton } from "./SidebarNavigation.js";
135
+ import { AuthLayout } from "./AuthLayout.js";
136
+ import { BarChart } from "./BarChart.js";
137
+ import { Mark } from "./Layout.js";
138
+ import { ResourceCard } from "./ResourceCard.js";
118
139
  export {
119
140
  Accordion,
120
141
  AccountItem,
@@ -122,18 +143,23 @@ export {
122
143
  Alert,
123
144
  AppShell,
124
145
  AppearanceSettings,
146
+ AuthLayout,
125
147
  Avatar,
126
148
  AvatarGroup,
127
149
  Badge,
150
+ BarChart,
128
151
  BlockedTab,
152
+ Box,
129
153
  Breadcrumb,
130
154
  Button,
131
155
  Calendar,
132
156
  Card,
133
157
  Cascader,
134
158
  CatalogIcon,
159
+ Center,
135
160
  CharacterPicker,
136
161
  Checkbox,
162
+ Code,
137
163
  ColorField,
138
164
  ColorPicker,
139
165
  Combobox,
@@ -142,6 +168,7 @@ export {
142
168
  ContextMenu,
143
169
  ContextMenuPanel,
144
170
  ContributionCalendar,
171
+ CopyButton,
145
172
  DataTable,
146
173
  DatePicker,
147
174
  DateRangePicker,
@@ -162,18 +189,24 @@ export {
162
189
  FormErrorSummary,
163
190
  FormField,
164
191
  FormGroup,
192
+ Group,
193
+ Heading,
165
194
  IconButton,
166
195
  IconPicker,
196
+ IconSurface,
167
197
  Indicator,
168
198
  Input,
169
199
  LoadingOverlay,
170
200
  LoadingState,
201
+ Mark,
171
202
  Menu,
172
203
  MenuItem,
173
204
  MessageDialog,
174
205
  MultiSelect,
206
+ NavigationButton,
175
207
  NumberInput,
176
208
  Page,
209
+ PageHeading,
177
210
  Pagination,
178
211
  PasskeyItem,
179
212
  PasswordField,
@@ -185,6 +218,8 @@ export {
185
218
  RadioGroup,
186
219
  RangeSlider,
187
220
  ResizablePanel,
221
+ ResourceCard,
222
+ ScrollArea,
188
223
  SearchField,
189
224
  Section,
190
225
  Segmented,
@@ -197,21 +232,27 @@ export {
197
232
  SettingsLayout,
198
233
  ShellHeader,
199
234
  ShortcutInput,
235
+ SidebarNavigation,
236
+ SimpleGrid,
200
237
  Skeleton,
201
238
  SkeletonRows,
202
239
  SkinTonePicker,
203
240
  Slider,
204
241
  Spinner,
205
242
  SplitButton,
243
+ Stack,
206
244
  Statistic,
207
245
  Steps,
246
+ Surface,
208
247
  Switch,
209
248
  SymbolPicker,
210
249
  Table,
211
250
  TableColumnFilter,
212
251
  TableColumnVisibility,
252
+ TableMarkup,
213
253
  Tabs,
214
254
  TagInput,
255
+ Text,
215
256
  Textarea,
216
257
  ThemePicker,
217
258
  ThemeProvider,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robert-stackflow/oneui",
3
- "version": "0.5.2",
3
+ "version": "0.6.0",
4
4
  "description": "OneUI React components, application shell and portable visual themes",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -821,7 +821,47 @@
821
821
  "import": "./components/FormLayout.js",
822
822
  "default": "./components/FormLayout.js"
823
823
  },
824
- "./AccountItem.module.css": "./components/AccountItem.module.css"
824
+ "./AccountItem.module.css": "./components/AccountItem.module.css",
825
+ "./SidebarNavigation": {
826
+ "types": "./components/SidebarNavigation.d.ts",
827
+ "import": "./components/SidebarNavigation.js",
828
+ "default": "./components/SidebarNavigation.js"
829
+ },
830
+ "./SidebarNavigation.module.css": "./components/SidebarNavigation.module.css",
831
+ "./Layout": {
832
+ "types": "./components/Layout.d.ts",
833
+ "import": "./components/Layout.js",
834
+ "default": "./components/Layout.js"
835
+ },
836
+ "./TableMarkup": {
837
+ "types": "./components/TableMarkup.d.ts",
838
+ "import": "./components/TableMarkup.js",
839
+ "default": "./components/TableMarkup.js"
840
+ },
841
+ "./CopyButton": {
842
+ "types": "./components/CopyButton.d.ts",
843
+ "import": "./components/CopyButton.js",
844
+ "default": "./components/CopyButton.js"
845
+ },
846
+ "./Layout.module.css": "./components/Layout.module.css",
847
+ "./AuthLayout": {
848
+ "types": "./components/AuthLayout.d.ts",
849
+ "import": "./components/AuthLayout.js",
850
+ "default": "./components/AuthLayout.js"
851
+ },
852
+ "./AuthLayout.module.css": "./components/AuthLayout.module.css",
853
+ "./BarChart": {
854
+ "types": "./components/BarChart.d.ts",
855
+ "import": "./components/BarChart.js",
856
+ "default": "./components/BarChart.js"
857
+ },
858
+ "./BarChart.module.css": "./components/BarChart.module.css",
859
+ "./ResourceCard": {
860
+ "types": "./components/ResourceCard.d.ts",
861
+ "import": "./components/ResourceCard.js",
862
+ "default": "./components/ResourceCard.js"
863
+ },
864
+ "./ResourceCard.module.css": "./components/ResourceCard.module.css"
825
865
  },
826
866
  "files": [
827
867
  "components",