@imfusion/web-ui 0.6.4-dev.1.g4ec1264f → 0.6.4-dev.22.ge7bf54c9
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/dist/code-Ce8uiPsv.js +134 -0
- package/dist/components/button/button.d.ts +4 -1
- package/dist/components/card/card.d.ts +5 -2
- package/dist/components/code/code.d.ts +4 -6
- package/dist/components/collapsible/collapsible.d.ts +1 -1
- package/dist/components/drawer/drawer.d.ts +15 -15
- package/dist/components/icon/icon.d.ts +1 -1
- package/dist/components/logo/logo.d.ts +1 -1
- package/dist/components/select/select.d.ts +26 -26
- package/dist/components/toast/toast.d.ts +1 -1
- package/dist/components/typo/typo.d.ts +3 -3
- package/dist/index.js +345 -341
- package/dist/integrations/code-highlight.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -1
- package/src/docgen/doc.gen.json +36 -28
- package/dist/code-BFMQnmu9.js +0 -147
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imfusion/web-ui",
|
|
3
|
-
"version": "0.6.4-dev.
|
|
3
|
+
"version": "0.6.4-dev.22.ge7bf54c9",
|
|
4
4
|
"description": "The official Web UI component library for ImFusion web apps",
|
|
5
5
|
"author": "ImFusion GmbH",
|
|
6
6
|
"homepage": "https://imfusion.com",
|
|
@@ -152,6 +152,7 @@
|
|
|
152
152
|
"playwright": "1.60.0",
|
|
153
153
|
"prettier": "3.8.3",
|
|
154
154
|
"react-docgen-typescript": "2.4.0",
|
|
155
|
+
"remark-gfm": "4.0.1",
|
|
155
156
|
"storybook": "10.4.3",
|
|
156
157
|
"tsx": "4.21.0",
|
|
157
158
|
"typescript": "6.0.3",
|
package/src/docgen/doc.gen.json
CHANGED
|
@@ -81,6 +81,13 @@
|
|
|
81
81
|
"defaultValue": null,
|
|
82
82
|
"description": ""
|
|
83
83
|
},
|
|
84
|
+
{
|
|
85
|
+
"name": "context",
|
|
86
|
+
"required": false,
|
|
87
|
+
"type": "\"default\" | \"oncolor\" | null",
|
|
88
|
+
"defaultValue": "default",
|
|
89
|
+
"description": ""
|
|
90
|
+
},
|
|
84
91
|
{
|
|
85
92
|
"name": "endIcon",
|
|
86
93
|
"required": false,
|
|
@@ -255,7 +262,15 @@
|
|
|
255
262
|
{
|
|
256
263
|
"name": "Card.Image",
|
|
257
264
|
"description": "Card.Image — an edge-to-edge media slot. Has no padding, so the image bleeds\nto the card edges. Always place it first among the slots.",
|
|
258
|
-
"props": [
|
|
265
|
+
"props": [
|
|
266
|
+
{
|
|
267
|
+
"name": "aspectRatio",
|
|
268
|
+
"required": false,
|
|
269
|
+
"type": "number | \"auto\"",
|
|
270
|
+
"defaultValue": "16 / 10",
|
|
271
|
+
"description": "Width divided by height, or \"auto\" to use the image's intrinsic ratio."
|
|
272
|
+
}
|
|
273
|
+
]
|
|
259
274
|
}
|
|
260
275
|
]
|
|
261
276
|
},
|
|
@@ -545,21 +560,14 @@
|
|
|
545
560
|
},
|
|
546
561
|
{
|
|
547
562
|
"name": "Code.InlineLink",
|
|
548
|
-
"description": "Code.InlineLink — the inline-code chip rendered as a link: the same hairline\nbox, with
|
|
563
|
+
"description": "Code.InlineLink — the inline-code chip rendered as a link: the same hairline\nbox, with an optional directional arrow behind the separator instead of a copy button.\nSibling of `Code.Inline`, sharing its chip visual (`.inline`) — never both a\ncopy button and a link on the same chip. Mirrors `ChipLink`'s shape (anchor\nis the chip root, trailing icon nudges on hover, `data-kind` picks the icon).",
|
|
549
564
|
"props": [
|
|
550
|
-
{
|
|
551
|
-
"name": "children",
|
|
552
|
-
"required": true,
|
|
553
|
-
"type": "string",
|
|
554
|
-
"defaultValue": null,
|
|
555
|
-
"description": "The link text, as a raw string, rendered as a code fragment."
|
|
556
|
-
},
|
|
557
565
|
{
|
|
558
566
|
"name": "kind",
|
|
559
567
|
"required": false,
|
|
560
568
|
"type": "CodeInlineLinkKind",
|
|
561
569
|
"defaultValue": "external",
|
|
562
|
-
"description": "Link target scope. `\"external\"` (default) opens in a new tab
|
|
570
|
+
"description": "Link target scope. `\"external\"` (default) opens in a new tab; `\"internal\"` stays in the current tab."
|
|
563
571
|
},
|
|
564
572
|
{
|
|
565
573
|
"name": "render",
|
|
@@ -732,6 +740,13 @@
|
|
|
732
740
|
"defaultValue": null,
|
|
733
741
|
"description": ""
|
|
734
742
|
},
|
|
743
|
+
{
|
|
744
|
+
"name": "context",
|
|
745
|
+
"required": false,
|
|
746
|
+
"type": "\"default\" | \"oncolor\" | null",
|
|
747
|
+
"defaultValue": null,
|
|
748
|
+
"description": ""
|
|
749
|
+
},
|
|
735
750
|
{
|
|
736
751
|
"name": "copiedLabel",
|
|
737
752
|
"required": false,
|
|
@@ -2658,7 +2673,7 @@
|
|
|
2658
2673
|
{
|
|
2659
2674
|
"name": "defaultValue",
|
|
2660
2675
|
"required": false,
|
|
2661
|
-
"type": "
|
|
2676
|
+
"type": "SelectValueType<Value, Multiple> | null",
|
|
2662
2677
|
"defaultValue": null,
|
|
2663
2678
|
"description": ""
|
|
2664
2679
|
},
|
|
@@ -2700,7 +2715,7 @@
|
|
|
2700
2715
|
{
|
|
2701
2716
|
"name": "isItemEqualToValue",
|
|
2702
2717
|
"required": false,
|
|
2703
|
-
"type": "(itemValue:
|
|
2718
|
+
"type": "(itemValue: Value, value: Value) => boolean",
|
|
2704
2719
|
"defaultValue": null,
|
|
2705
2720
|
"description": ""
|
|
2706
2721
|
},
|
|
@@ -2714,14 +2729,14 @@
|
|
|
2714
2729
|
{
|
|
2715
2730
|
"name": "itemToStringLabel",
|
|
2716
2731
|
"required": false,
|
|
2717
|
-
"type": "(itemValue:
|
|
2732
|
+
"type": "(itemValue: Value) => string",
|
|
2718
2733
|
"defaultValue": null,
|
|
2719
2734
|
"description": ""
|
|
2720
2735
|
},
|
|
2721
2736
|
{
|
|
2722
2737
|
"name": "itemToStringValue",
|
|
2723
2738
|
"required": false,
|
|
2724
|
-
"type": "(itemValue:
|
|
2739
|
+
"type": "(itemValue: Value) => string",
|
|
2725
2740
|
"defaultValue": null,
|
|
2726
2741
|
"description": ""
|
|
2727
2742
|
},
|
|
@@ -2763,7 +2778,7 @@
|
|
|
2763
2778
|
{
|
|
2764
2779
|
"name": "onValueChange",
|
|
2765
2780
|
"required": false,
|
|
2766
|
-
"type": "(\n value:
|
|
2781
|
+
"type": "(\n value:\n | SelectValueType<Value, Multiple>\n | (Multiple extends true ? never : null),\n eventDetails: SelectRootChangeEventDetails\n) => void",
|
|
2767
2782
|
"defaultValue": null,
|
|
2768
2783
|
"description": ""
|
|
2769
2784
|
},
|
|
@@ -2798,7 +2813,7 @@
|
|
|
2798
2813
|
{
|
|
2799
2814
|
"name": "value",
|
|
2800
2815
|
"required": false,
|
|
2801
|
-
"type": "
|
|
2816
|
+
"type": "SelectValueType<Value, Multiple> | null",
|
|
2802
2817
|
"defaultValue": null,
|
|
2803
2818
|
"description": ""
|
|
2804
2819
|
}
|
|
@@ -5294,14 +5309,14 @@
|
|
|
5294
5309
|
},
|
|
5295
5310
|
{
|
|
5296
5311
|
"name": "Typo.Link",
|
|
5297
|
-
"description": "Typo.Link — inline anchor
|
|
5312
|
+
"description": "Typo.Link — inline anchor with an optional local Web UI directional icon.",
|
|
5298
5313
|
"props": [
|
|
5299
5314
|
{
|
|
5300
5315
|
"name": "kind",
|
|
5301
5316
|
"required": false,
|
|
5302
5317
|
"type": "TypoLinkKind",
|
|
5303
5318
|
"defaultValue": "external",
|
|
5304
|
-
"description": "Link target scope. `\"external\"` (default) opens in a new tab
|
|
5319
|
+
"description": "Link target scope. `\"external\"` (default) opens in a new tab; `\"internal\"` stays in the current tab."
|
|
5305
5320
|
},
|
|
5306
5321
|
{
|
|
5307
5322
|
"name": "render",
|
|
@@ -5314,7 +5329,7 @@
|
|
|
5314
5329
|
"name": "variant",
|
|
5315
5330
|
"required": false,
|
|
5316
5331
|
"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",
|
|
5317
|
-
"defaultValue": "
|
|
5332
|
+
"defaultValue": "primary",
|
|
5318
5333
|
"description": ""
|
|
5319
5334
|
}
|
|
5320
5335
|
]
|
|
@@ -5492,21 +5507,14 @@
|
|
|
5492
5507
|
},
|
|
5493
5508
|
{
|
|
5494
5509
|
"name": "CodeHighlight.InlineLink",
|
|
5495
|
-
"description": "Code.InlineLink — the inline-code chip rendered as a link: the same hairline\nbox, with
|
|
5510
|
+
"description": "Code.InlineLink — the inline-code chip rendered as a link: the same hairline\nbox, with an optional directional arrow behind the separator instead of a copy button.\nSibling of `Code.Inline`, sharing its chip visual (`.inline`) — never both a\ncopy button and a link on the same chip. Mirrors `ChipLink`'s shape (anchor\nis the chip root, trailing icon nudges on hover, `data-kind` picks the icon).",
|
|
5496
5511
|
"props": [
|
|
5497
|
-
{
|
|
5498
|
-
"name": "children",
|
|
5499
|
-
"required": true,
|
|
5500
|
-
"type": "string",
|
|
5501
|
-
"defaultValue": null,
|
|
5502
|
-
"description": "The link text, as a raw string, rendered as a code fragment."
|
|
5503
|
-
},
|
|
5504
5512
|
{
|
|
5505
5513
|
"name": "kind",
|
|
5506
5514
|
"required": false,
|
|
5507
5515
|
"type": "CodeInlineLinkKind",
|
|
5508
5516
|
"defaultValue": "external",
|
|
5509
|
-
"description": "Link target scope. `\"external\"` (default) opens in a new tab
|
|
5517
|
+
"description": "Link target scope. `\"external\"` (default) opens in a new tab; `\"internal\"` stays in the current tab."
|
|
5510
5518
|
},
|
|
5511
5519
|
{
|
|
5512
5520
|
"name": "render",
|
package/dist/code-BFMQnmu9.js
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./chunk-DmhlhrBa.js";
|
|
2
|
-
import { t } from "./meta-CySnRuVp.js";
|
|
3
|
-
import { Ma as n, Qt as r, Xo as i, hn as a, r as o } from "./icons-Cy1HAosO.js";
|
|
4
|
-
import { cx as s } from "class-variance-authority";
|
|
5
|
-
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
6
|
-
import { useCallback as d, useEffect as f, useRef as p, useState as m } from "react";
|
|
7
|
-
import { mergeProps as h } from "@base-ui/react/merge-props";
|
|
8
|
-
import { useRender as g } from "@base-ui/react/use-render";
|
|
9
|
-
//#region src/hooks/use-clipboard.ts
|
|
10
|
-
function _({ timeout: e = 1500 } = {}) {
|
|
11
|
-
let [t, n] = m(!1), r = p(void 0);
|
|
12
|
-
return f(() => () => clearTimeout(r.current), []), {
|
|
13
|
-
copied: t,
|
|
14
|
-
copy: d((t) => {
|
|
15
|
-
navigator.clipboard.writeText(t).then(() => {
|
|
16
|
-
n(!0), clearTimeout(r.current), r.current = setTimeout(() => n(!1), e);
|
|
17
|
-
});
|
|
18
|
-
}, [e])
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
var v = {
|
|
22
|
-
block: "imf-ui-code-module-block",
|
|
23
|
-
copy: "imf-ui-code-module-copy",
|
|
24
|
-
icon: "imf-ui-code-module-icon",
|
|
25
|
-
inline: "imf-ui-code-module-inline",
|
|
26
|
-
inlineCopy: "imf-ui-code-module-inlineCopy",
|
|
27
|
-
inlineLink: "imf-ui-code-module-inlineLink",
|
|
28
|
-
language: "imf-ui-code-module-language",
|
|
29
|
-
pre: "imf-ui-code-module-pre",
|
|
30
|
-
separator: "imf-ui-code-module-separator"
|
|
31
|
-
}, y = /* @__PURE__ */ e({
|
|
32
|
-
Block: () => S,
|
|
33
|
-
Inline: () => b,
|
|
34
|
-
InlineLink: () => x
|
|
35
|
-
});
|
|
36
|
-
function b({ className: e, copyable: t = !1, children: r, render: a, ...d }) {
|
|
37
|
-
let { copied: f, copy: m } = _(), y = p(null), b = f ? n : i;
|
|
38
|
-
return g({
|
|
39
|
-
defaultTagName: "code",
|
|
40
|
-
render: a,
|
|
41
|
-
props: {
|
|
42
|
-
...h(d, {
|
|
43
|
-
className: s(v.inline, e),
|
|
44
|
-
children: /* @__PURE__ */ u(c, { children: [
|
|
45
|
-
/* @__PURE__ */ l("span", {
|
|
46
|
-
ref: y,
|
|
47
|
-
children: r
|
|
48
|
-
}),
|
|
49
|
-
t && /* @__PURE__ */ l("span", { className: v.separator }),
|
|
50
|
-
t && /* @__PURE__ */ l("button", {
|
|
51
|
-
type: "button",
|
|
52
|
-
className: v.inlineCopy,
|
|
53
|
-
"data-copied": f || void 0,
|
|
54
|
-
"aria-label": f ? "Copied" : "Copy",
|
|
55
|
-
onClick: () => m(y.current?.textContent ?? ""),
|
|
56
|
-
children: /* @__PURE__ */ l(o, {
|
|
57
|
-
glyph: b,
|
|
58
|
-
size: 12,
|
|
59
|
-
strokeWidth: 2,
|
|
60
|
-
"aria-hidden": !0
|
|
61
|
-
})
|
|
62
|
-
})
|
|
63
|
-
] })
|
|
64
|
-
}),
|
|
65
|
-
"data-imf-ui-component": "Code.Inline"
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
b.displayName = "Code.Inline";
|
|
70
|
-
function x({ className: e, kind: t = "external", children: n, render: i, ...d }) {
|
|
71
|
-
let f = t === "external" ? a : r;
|
|
72
|
-
return g({
|
|
73
|
-
defaultTagName: "a",
|
|
74
|
-
render: i,
|
|
75
|
-
props: {
|
|
76
|
-
...h(t === "external" ? {
|
|
77
|
-
target: "_blank",
|
|
78
|
-
rel: "noreferrer"
|
|
79
|
-
} : {}, d, {
|
|
80
|
-
className: s(v.inline, v.inlineLink, e),
|
|
81
|
-
children: /* @__PURE__ */ u(c, { children: [
|
|
82
|
-
n,
|
|
83
|
-
/* @__PURE__ */ l("span", { className: v.separator }),
|
|
84
|
-
/* @__PURE__ */ l("span", {
|
|
85
|
-
className: v.icon,
|
|
86
|
-
"aria-hidden": !0,
|
|
87
|
-
children: /* @__PURE__ */ l(o, {
|
|
88
|
-
glyph: f,
|
|
89
|
-
size: 12,
|
|
90
|
-
strokeWidth: 2
|
|
91
|
-
})
|
|
92
|
-
})
|
|
93
|
-
] })
|
|
94
|
-
}),
|
|
95
|
-
"data-imf-ui-component": "Code.InlineLink",
|
|
96
|
-
"data-kind": t
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
x.displayName = "Code.InlineLink";
|
|
101
|
-
function S({ className: e, language: t, hideCopy: r = !1, children: a, ...c }) {
|
|
102
|
-
let { copied: d, copy: f } = _(), m = p(null), h = d ? n : i;
|
|
103
|
-
return /* @__PURE__ */ u("div", {
|
|
104
|
-
"data-imf-ui-component": "Code.Block",
|
|
105
|
-
className: s(v.block, e),
|
|
106
|
-
children: [
|
|
107
|
-
t != null && /* @__PURE__ */ l("span", {
|
|
108
|
-
className: v.language,
|
|
109
|
-
children: t
|
|
110
|
-
}),
|
|
111
|
-
!r && /* @__PURE__ */ l("button", {
|
|
112
|
-
type: "button",
|
|
113
|
-
className: v.copy,
|
|
114
|
-
"data-copied": d || void 0,
|
|
115
|
-
"aria-label": d ? "Copied" : "Copy",
|
|
116
|
-
onClick: () => f(m.current?.textContent ?? ""),
|
|
117
|
-
children: /* @__PURE__ */ l(o, {
|
|
118
|
-
glyph: h,
|
|
119
|
-
size: 12,
|
|
120
|
-
strokeWidth: 2,
|
|
121
|
-
"aria-hidden": !0
|
|
122
|
-
})
|
|
123
|
-
}),
|
|
124
|
-
/* @__PURE__ */ l("pre", {
|
|
125
|
-
...c,
|
|
126
|
-
className: v.pre,
|
|
127
|
-
children: /* @__PURE__ */ l("code", {
|
|
128
|
-
ref: m,
|
|
129
|
-
children: a
|
|
130
|
-
})
|
|
131
|
-
})
|
|
132
|
-
]
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
S.displayName = "Code.Block";
|
|
136
|
-
//#endregion
|
|
137
|
-
//#region src/components/code/code.meta.ts
|
|
138
|
-
var C = {
|
|
139
|
-
name: "Code",
|
|
140
|
-
category: t.display,
|
|
141
|
-
status: "stable",
|
|
142
|
-
namespace: !0,
|
|
143
|
-
description: "Displays source code inline or in a block, with optional language labels and copying. Also called a code snippet or code block.",
|
|
144
|
-
origin: "native"
|
|
145
|
-
};
|
|
146
|
-
//#endregion
|
|
147
|
-
export { y as a, x as i, S as n, _ as o, b as r, C as t };
|