@imfusion/web-ui 0.11.0 → 0.11.1-dev.16.g726f3414

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.
@@ -1,5 +1,5 @@
1
1
  import { n as e, r as t, t as n } from "./resolve-state-props-DQf9WiGv.js";
2
- import { mh as r, pM as i } from "./icons-BsK_o-Cb.js";
2
+ import { _M as r, mh as i } from "./icons-vc1WZCxX.js";
3
3
  import { t as a } from "./meta-V_KyLeGn.js";
4
4
  import { cva as o } from "class-variance-authority";
5
5
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
@@ -26,8 +26,8 @@ function v({ variant: e = "default", icon: t = !1, children: n, ...a }) {
26
26
  variant: e,
27
27
  className: a.className
28
28
  }),
29
- children: [t && /* @__PURE__ */ s(i, {
30
- glyph: r,
29
+ children: [t && /* @__PURE__ */ s(r, {
30
+ glyph: i,
31
31
  strokeWidth: 2,
32
32
  "aria-hidden": !0,
33
33
  className: g.icon
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imfusion/web-ui",
3
- "version": "0.11.0",
3
+ "version": "0.11.1-dev.16.g726f3414",
4
4
  "description": "The official Web UI component library for ImFusion web apps",
5
5
  "author": "ImFusion GmbH",
6
6
  "homepage": "https://imfusion.com",
@@ -599,7 +599,7 @@
599
599
  "name": "maxWidth",
600
600
  "required": false,
601
601
  "type": "\"sm\" | \"md\" | \"lg\" | \"full\" | null",
602
- "defaultValue": "md",
602
+ "defaultValue": "lg",
603
603
  "description": ""
604
604
  },
605
605
  {
@@ -10549,6 +10549,13 @@
10549
10549
  "name": "Typo.UnorderedList",
10550
10550
  "description": "Typo.UnorderedList — bulleted list.",
10551
10551
  "props": [
10552
+ {
10553
+ "name": "markerVariant",
10554
+ "required": false,
10555
+ "type": "| \"main\"\n| \"support\"\n| \"minor\"\n| \"brand\"\n| \"primary\"\n| \"negative\"\n| \"positive\"\n| \"warning\"\n| \"info\"\n| \"oncolor\"\n| \"accent-1\"\n| \"accent-2\"\n| \"accent-3\"\n| null",
10556
+ "defaultValue": null,
10557
+ "description": "Colour of the dash. Omit to follow the text colour."
10558
+ },
10552
10559
  {
10553
10560
  "name": "ref",
10554
10561
  "required": false,
@@ -7571,6 +7571,30 @@
7571
7571
  "origin": "iconoir",
7572
7572
  "file": "regular/laptop-warning.svg"
7573
7573
  },
7574
+ {
7575
+ "name": "LayoutAuto",
7576
+ "category": "Layout",
7577
+ "tags": ["layout", "auto", "masonry", "viewports", "tiles", "grid"],
7578
+ "style": "regular",
7579
+ "origin": "imfusion",
7580
+ "file": "regular/layout-auto.svg"
7581
+ },
7582
+ {
7583
+ "name": "LayoutFocusPlusRows",
7584
+ "category": "Layout",
7585
+ "tags": ["layout", "focus", "rows", "main viewport", "viewports", "split"],
7586
+ "style": "regular",
7587
+ "origin": "imfusion",
7588
+ "file": "regular/layout-focus-plus-rows.svg"
7589
+ },
7590
+ {
7591
+ "name": "LayoutFocusPlusStack",
7592
+ "category": "Layout",
7593
+ "tags": ["layout", "focus", "stack", "main viewport", "sidebar", "viewports"],
7594
+ "style": "regular",
7595
+ "origin": "imfusion",
7596
+ "file": "regular/layout-focus-plus-stack.svg"
7597
+ },
7574
7598
  {
7575
7599
  "name": "LayoutLeft",
7576
7600
  "category": "Layout",
@@ -7587,6 +7611,14 @@
7587
7611
  "origin": "iconoir",
7588
7612
  "file": "regular/layout-right.svg"
7589
7613
  },
7614
+ {
7615
+ "name": "LayoutRows",
7616
+ "category": "Layout",
7617
+ "tags": ["layout", "rows", "viewports", "grid", "2x2", "tiles"],
7618
+ "style": "regular",
7619
+ "origin": "imfusion",
7620
+ "file": "regular/layout-rows.svg"
7621
+ },
7590
7622
  {
7591
7623
  "name": "Leaderboard",
7592
7624
  "category": "Activities",
@@ -66,9 +66,8 @@ next action is the add from that topic. A Vite config that reads tsconfig `paths
66
66
  `vite-tsconfig-paths`) is Broken: it loads the React types package as React once Web UI comes from the registry. The fix is
67
67
  to drop it and give the `#/` alias through `imports` in `package.json`. A major or minor mismatch between the project and Web
68
68
  UI on a package listed under Aligned runtime packages in the `tooling` topic is a Deviation. Report both versions, with
69
- `npm install <package>@<Web UI's version>` as the fix. A route-local file that the inline rule in the `project-structure`
70
- topic says belongs in its route file is a Deviation, and so is a route file over 250 lines that inlines parts the rule would
71
- keep in its `-` folder. Report the line counts, with the move as the fix.
69
+ `npm install <package>@<Web UI's version>` as the fix. A route file that holds several views inline is a Deviation, and so is
70
+ a route whose only view sits alone in its `-` folder. Name the views, with the move as the fix.
72
71
 
73
72
  ## Topics
74
73
 
@@ -127,7 +127,7 @@ sections one to one — change a topic's sections and this file follows in the s
127
127
  ## Assets — `assets`
128
128
 
129
129
  - [ ] Importing
130
- - [ ] Photographs — WebP
130
+ - [ ] Photographs: WebP
131
131
  - [ ] Other formats
132
132
  - [ ] Scope
133
133
 
@@ -37,9 +37,9 @@ the route file's name: `route.tsx` gets `-route/`, `products.tsx` gets `-product
37
37
  folders with a leading `-` when it builds the route tree, so the folder never becomes a route. The folder holds the route's
38
38
  views with their props types, hooks, `.module.css` files, and tests.
39
39
 
40
- A part used by one route file is inlined into it when it is a component under 50 lines, calls no `use*` hook, has no
41
- stylesheet or test of its own, and leaves that route file under 250 lines. Every other single-route part goes in the `-`
42
- folder. The thresholds keep tiny wrappers out of their own files without letting a route file grow into a page of views.
40
+ The route component is the page. When the page is a single view, such as a form, that view is the route component and stays
41
+ in the route file, hooks included. When the page composes several views, each view goes in the `-` folder and the route
42
+ component wires them together. Small presentational helpers stay inline.
43
43
 
44
44
  `partials/` holds only parts that more than one route uses.
45
45
 
@@ -54,6 +54,19 @@ hook, not a state flag.
54
54
  }
55
55
  ```
56
56
 
57
+ Your own components follow the same seam. A container that changes a child sets a custom property; the child reads it with
58
+ its own default as the fallback, so it works with or without the container:
59
+
60
+ ```css
61
+ .panel {
62
+ --panel-row-gap: var(--imf-ui-size-2);
63
+ }
64
+
65
+ .row {
66
+ padding-block: var(--panel-row-gap, var(--imf-ui-size-3));
67
+ }
68
+ ```
69
+
57
70
  ## Spacing
58
71
 
59
72
  Web UI components have no outer margin. The parent sets the distance between its children: `Stack` and `Row` gaps in UI,
@@ -6,6 +6,7 @@ Prefer pure functions, immutable values, and side effects at the edges.
6
6
 
7
7
  - Do not use `any`. Accept `unknown` at an untrusted boundary and narrow it.
8
8
  - Infer local values; give exported functions explicit return types.
9
+ - React components return their inferred JSX type. An annotation there adds no contract a caller relies on.
9
10
  - TanStack options factories (`queryOptions`, `mutationOptions`, and similar) return their helper's inferred type. Spelling
10
11
  it out loses the typed query key (`DataTag`) or repeats the helper's own generics.
11
12
  - Model states directly instead of filling a nullable value later.