@imfusion/web-ui 0.8.0 → 0.8.1-dev.1.g11d9ffbe

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imfusion/web-ui",
3
- "version": "0.8.0",
3
+ "version": "0.8.1-dev.1.g11d9ffbe",
4
4
  "description": "The official Web UI component library for ImFusion web apps",
5
5
  "author": "ImFusion GmbH",
6
6
  "homepage": "https://imfusion.com",
@@ -1,4 +1,70 @@
1
1
  {
2
+ "account-card": {
3
+ "root": {
4
+ "name": "AccountCard.Root",
5
+ "description": "AccountCard.Root — the link to the signed-in person's account, holding `AccountCard.Avatar`, `AccountCard.Title`, and\n`AccountCard.Description`. Pass a router link through `render`. `aria-current=\"page\"` marks it current with a tint and\nan inset rule. Its accessible name is the title and description; the avatar stays decorative.\n\nPlace `AccountCard.Action` beside the root, not inside it: a link cannot contain a button.",
6
+ "props": [
7
+ {
8
+ "name": "context",
9
+ "required": false,
10
+ "type": "\"default\" | \"oncolor\" | null",
11
+ "defaultValue": "default",
12
+ "description": ""
13
+ },
14
+ {
15
+ "name": "ref",
16
+ "required": false,
17
+ "type": "Ref<HTMLAnchorElement>",
18
+ "defaultValue": null,
19
+ "description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
20
+ },
21
+ {
22
+ "name": "render",
23
+ "required": false,
24
+ "type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, {}>",
25
+ "defaultValue": null,
26
+ "description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
27
+ }
28
+ ]
29
+ },
30
+ "subComponents": [
31
+ {
32
+ "name": "AccountCard.Action",
33
+ "description": "AccountCard.Action — a trailing slot beside `AccountCard.Root`, such as a ghost icon `Button` that logs out. The\nbutton carries its own `aria-label` and its own `context`.",
34
+ "props": []
35
+ },
36
+ {
37
+ "name": "AccountCard.Avatar",
38
+ "description": "AccountCard.Avatar — a decorative `Avatar` in the card's context. Its children are the initials; without them it shows\na person glyph.",
39
+ "props": [
40
+ {
41
+ "name": "size",
42
+ "required": false,
43
+ "type": "\"sm\" | \"md\" | \"lg\" | null",
44
+ "defaultValue": "md",
45
+ "description": "The avatar size."
46
+ },
47
+ {
48
+ "name": "src",
49
+ "required": false,
50
+ "type": "string",
51
+ "defaultValue": null,
52
+ "description": "The person's photo. Until it loads, and when it fails, the initials or the person glyph show instead."
53
+ }
54
+ ]
55
+ },
56
+ {
57
+ "name": "AccountCard.Description",
58
+ "description": "AccountCard.Description — a second line such as organization and role. Truncates to one line.",
59
+ "props": []
60
+ },
61
+ {
62
+ "name": "AccountCard.Title",
63
+ "description": "AccountCard.Title — the account's name, or its email until a name exists. Truncates to one line.",
64
+ "props": []
65
+ }
66
+ ]
67
+ },
2
68
  "app-shell": {
3
69
  "root": {
4
70
  "name": "AppShell.Root",
@@ -62,6 +128,140 @@
62
128
  }
63
129
  ]
64
130
  },
131
+ "avatar": {
132
+ "root": {
133
+ "name": "Avatar.Root",
134
+ "description": "Avatar.Root — a round badge that stands for a person. Also called a profile picture or user badge.\n\nWithout `aria-label` or `aria-labelledby` it is decorative and hidden from assistive tech, for use next to a visible\nname. With a label it is announced as an image with that name.",
135
+ "props": [
136
+ {
137
+ "name": "className",
138
+ "required": false,
139
+ "type": "string | ((state: AvatarRootState) => string)",
140
+ "defaultValue": null,
141
+ "description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
142
+ },
143
+ {
144
+ "name": "context",
145
+ "required": false,
146
+ "type": "\"default\" | \"oncolor\" | null",
147
+ "defaultValue": "default",
148
+ "description": ""
149
+ },
150
+ {
151
+ "name": "ref",
152
+ "required": false,
153
+ "type": "Ref<HTMLSpanElement>",
154
+ "defaultValue": null,
155
+ "description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
156
+ },
157
+ {
158
+ "name": "render",
159
+ "required": false,
160
+ "type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, AvatarRootState>",
161
+ "defaultValue": null,
162
+ "description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
163
+ },
164
+ {
165
+ "name": "size",
166
+ "required": false,
167
+ "type": "\"sm\" | \"md\" | \"lg\" | null",
168
+ "defaultValue": "md",
169
+ "description": ""
170
+ },
171
+ {
172
+ "name": "style",
173
+ "required": false,
174
+ "type": "| CSSProperties\n| ((state: AvatarRootState) => CSSProperties)",
175
+ "defaultValue": null,
176
+ "description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
177
+ }
178
+ ]
179
+ },
180
+ "subComponents": [
181
+ {
182
+ "name": "Avatar.Fallback",
183
+ "description": "Avatar.Fallback — the initials the consumer passes, one or two letters. Without children it shows a person glyph.\nIt derives nothing from a name or email.",
184
+ "props": [
185
+ {
186
+ "name": "className",
187
+ "required": false,
188
+ "type": "string | ((state: AvatarFallbackState) => string)",
189
+ "defaultValue": null,
190
+ "description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
191
+ },
192
+ {
193
+ "name": "delay",
194
+ "required": false,
195
+ "type": "number",
196
+ "defaultValue": null,
197
+ "description": "How long to wait before showing the fallback. Specified in milliseconds."
198
+ },
199
+ {
200
+ "name": "ref",
201
+ "required": false,
202
+ "type": "Ref<HTMLSpanElement>",
203
+ "defaultValue": null,
204
+ "description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
205
+ },
206
+ {
207
+ "name": "render",
208
+ "required": false,
209
+ "type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, AvatarFallbackState>",
210
+ "defaultValue": null,
211
+ "description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
212
+ },
213
+ {
214
+ "name": "style",
215
+ "required": false,
216
+ "type": "| CSSProperties\n| ((state: AvatarFallbackState) => CSSProperties)",
217
+ "defaultValue": null,
218
+ "description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
219
+ }
220
+ ]
221
+ },
222
+ {
223
+ "name": "Avatar.Image",
224
+ "description": "Avatar.Image — the person's photo, cropped to the circle. It shows once `src` has loaded; until then, and when it\nfails, `Avatar.Fallback` shows instead.",
225
+ "props": [
226
+ {
227
+ "name": "className",
228
+ "required": false,
229
+ "type": "string | ((state: AvatarImageState) => string)",
230
+ "defaultValue": null,
231
+ "description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
232
+ },
233
+ {
234
+ "name": "onLoadingStatusChange",
235
+ "required": false,
236
+ "type": "(status: ImageLoadingStatus) => void",
237
+ "defaultValue": null,
238
+ "description": "Callback fired when the loading status changes."
239
+ },
240
+ {
241
+ "name": "ref",
242
+ "required": false,
243
+ "type": "Ref<HTMLSpanElement>",
244
+ "defaultValue": null,
245
+ "description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
246
+ },
247
+ {
248
+ "name": "render",
249
+ "required": false,
250
+ "type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, AvatarImageState>",
251
+ "defaultValue": null,
252
+ "description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
253
+ },
254
+ {
255
+ "name": "style",
256
+ "required": false,
257
+ "type": "| CSSProperties\n| ((state: AvatarImageState) => CSSProperties)",
258
+ "defaultValue": null,
259
+ "description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
260
+ }
261
+ ]
262
+ }
263
+ ]
264
+ },
65
265
  "button": {
66
266
  "root": {
67
267
  "name": "Button",
@@ -9,11 +9,22 @@ reading the whole file. `further reading` links (when present) point at
9
9
  the upstream library's own docs for usage/anatomy/composition — not for
10
10
  props, which always live in the docgen file above.
11
11
 
12
+ ## AccountCard
13
+ - category: Display, status: experimental
14
+ Link to the signed-in person's account, with avatar, name or email, and a second line such as organization and role. Also called an ID card or user row; for a bare person badge, use Avatar.
15
+ - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .account-card (jq: jq '.account-card' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
16
+
12
17
  ## AppShell
13
18
  - category: Layout, status: stable
14
19
  Application layout shell for a header, sidebars, footer, and scrolling main area. Also called an app layout or dashboard shell; sizing is CSS-driven and sidebars can become sliding panels on small screens.
15
20
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .app-shell (jq: jq '.app-shell' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
16
21
 
22
+ ## Avatar
23
+ - category: Display, status: experimental
24
+ Round badge that stands for a person, showing their photo, their initials, or a person glyph. Also called a profile picture or user badge; for a signed-in account row with a name, use AccountCard.
25
+ - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .avatar (jq: jq '.avatar' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
26
+ - further reading (usage/anatomy, not props): https://base-ui.com/react/components/avatar.md
27
+
17
28
  ## Button
18
29
  - category: Buttons, status: stable
19
30
  Triggers an action such as submit, confirm, cancel, navigate, or delete. Also called a CTA or action button; variants and sizes communicate its importance.