@caseparts-org/caseblocks 0.0.194 → 0.0.195
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/assets/Admonition.css +1 -0
- package/dist/assets/MainNav.css +1 -1
- package/dist/assets/Markdown.css +1 -1
- package/dist/atoms/Markdown/Markdown.js +794 -776
- package/dist/atoms/Markdown/Markdown.stories.d.ts +2 -0
- package/dist/atoms/Markdown/Markdown.stories.js +88 -18
- package/dist/atoms/Markdown/PreprocessedMarkdown.js +6 -6
- package/dist/atoms/Markdown/remarkAdmonition.d.ts +15 -0
- package/dist/atoms/Markdown/remarkAdmonition.js +120 -0
- package/dist/main-client.js +54 -52
- package/dist/main-server.d.ts +2 -0
- package/dist/main-server.js +16 -14
- package/dist/main.d.ts +2 -0
- package/dist/main.js +18 -16
- package/dist/molecules/Admonition/Admonition.d.ts +10 -0
- package/dist/molecules/Admonition/Admonition.js +46 -0
- package/dist/molecules/Admonition/Admonition.stories.d.ts +13 -0
- package/dist/molecules/Admonition/Admonition.stories.js +51 -0
- package/dist/organisms/MainNav/MainNav.js +77 -75
- package/package.json +1 -1
|
@@ -1,12 +1,43 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { jsx as t, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { useState as u, useEffect as h } from "react";
|
|
3
|
+
import { Markdown as s } from "./Markdown.js";
|
|
4
|
+
import { usePreprocessedMarkdown as g } from "./usePreprocessedMarkdown.js";
|
|
5
|
+
const x = {
|
|
5
6
|
title: "Case Parts/Atoms/Markdown",
|
|
6
|
-
component:
|
|
7
|
+
component: s,
|
|
7
8
|
parameters: { layout: "padded" },
|
|
8
9
|
tags: ["autodocs"]
|
|
9
|
-
},
|
|
10
|
+
}, a = `# Admonitions
|
|
11
|
+
|
|
12
|
+
:::warning[Electrical Hazard]{icon="bolt"}
|
|
13
|
+
Disconnect power before servicing this unit.
|
|
14
|
+
:::
|
|
15
|
+
|
|
16
|
+
:::warning[Electrical Hazard]{icon="bolt"}
|
|
17
|
+
|
|
18
|
+
Disconnect power before servicing this unit.
|
|
19
|
+
|
|
20
|
+
:::
|
|
21
|
+
`;
|
|
22
|
+
function w(e) {
|
|
23
|
+
const [n, o] = u(e.children ?? a);
|
|
24
|
+
return h(() => {
|
|
25
|
+
o(e.children ?? a);
|
|
26
|
+
}, [e.children]), /* @__PURE__ */ p("div", { style: { display: "grid", gap: 12 }, children: [
|
|
27
|
+
/* @__PURE__ */ t("label", { style: { fontWeight: 600 }, children: "Edit Markdown (live):" }),
|
|
28
|
+
/* @__PURE__ */ t(
|
|
29
|
+
"textarea",
|
|
30
|
+
{
|
|
31
|
+
value: n,
|
|
32
|
+
onChange: (i) => o(i.target.value),
|
|
33
|
+
rows: 14,
|
|
34
|
+
style: { width: "100%", fontFamily: "monospace" }
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
/* @__PURE__ */ t(s, { ...e, children: n })
|
|
38
|
+
] });
|
|
39
|
+
}
|
|
40
|
+
const k = {
|
|
10
41
|
args: {
|
|
11
42
|
children: `# Heading 1
|
|
12
43
|
|
|
@@ -43,27 +74,66 @@ export default greet;
|
|
|
43
74
|
|------:|:------|
|
|
44
75
|
| 123 | text |`
|
|
45
76
|
}
|
|
46
|
-
},
|
|
77
|
+
}, C = {
|
|
47
78
|
name: "Item Description Variant",
|
|
48
|
-
render: (
|
|
49
|
-
const
|
|
50
|
-
if (await new Promise((
|
|
79
|
+
render: (e) => /* @__PURE__ */ t(({ text: i }) => {
|
|
80
|
+
const l = async (r) => {
|
|
81
|
+
if (await new Promise((m) => setTimeout(m, 50)), /^\d+$/.test(r)) return !0;
|
|
51
82
|
throw new Error("invalid");
|
|
52
|
-
}, { output:
|
|
53
|
-
|
|
54
|
-
(
|
|
55
|
-
|
|
83
|
+
}, { output: d, loading: c } = g(
|
|
84
|
+
i,
|
|
85
|
+
(r) => `https://example.com/parts/${encodeURIComponent(r)}`,
|
|
86
|
+
l,
|
|
56
87
|
!0
|
|
57
88
|
);
|
|
58
|
-
return /* @__PURE__ */ t(
|
|
89
|
+
return /* @__PURE__ */ t(s, { ...e, children: c ? "Validating…" : d });
|
|
59
90
|
}, { text: `Kason 171 Latch
|
|
60
91
|
|
|
61
92
|
This fits part [171] and an invalid token [bad]. Already linked should remain: [171](https://example.com/should-stay).
|
|
62
93
|
|
|
63
94
|
Another valid numeric: [172].` })
|
|
95
|
+
}, A = {
|
|
96
|
+
args: {
|
|
97
|
+
children: `# Admonitions
|
|
98
|
+
|
|
99
|
+
:::note
|
|
100
|
+
Confirm model and serial number before ordering.
|
|
101
|
+
:::
|
|
102
|
+
|
|
103
|
+
:::important[Compatibility]
|
|
104
|
+
Fits only selected revisions.
|
|
105
|
+
:::
|
|
106
|
+
|
|
107
|
+
:::warning[Electrical Hazard]{icon="fa-solid fa-bolt"}
|
|
108
|
+
Disconnect power before servicing this unit.
|
|
109
|
+
:::
|
|
110
|
+
|
|
111
|
+
:::tip[Screw Size]{icon="fa-solid fa-screwdriver-wrench"}
|
|
112
|
+
Uses (6) #12 Flat Head screws
|
|
113
|
+
:::
|
|
114
|
+
|
|
115
|
+
:::custom-alert{title="Compatibility Note"}
|
|
116
|
+
Unknown type is preserved and rendered with neutral styling.
|
|
117
|
+
:::
|
|
118
|
+
|
|
119
|
+
Malformed opening should remain plain markdown:
|
|
120
|
+
|
|
121
|
+
:::warning[Missing end title
|
|
122
|
+
This block should not be transformed.
|
|
123
|
+
:::
|
|
124
|
+
`
|
|
125
|
+
}
|
|
126
|
+
}, M = {
|
|
127
|
+
name: "Live Playground",
|
|
128
|
+
args: {
|
|
129
|
+
children: a
|
|
130
|
+
},
|
|
131
|
+
render: (e) => /* @__PURE__ */ t(w, { ...e })
|
|
64
132
|
};
|
|
65
133
|
export {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
134
|
+
A as Admonitions,
|
|
135
|
+
k as Basic,
|
|
136
|
+
C as ItemDescription,
|
|
137
|
+
M as Playground,
|
|
138
|
+
x as default
|
|
69
139
|
};
|
|
@@ -7,10 +7,10 @@ function l({
|
|
|
7
7
|
batchValidate: n,
|
|
8
8
|
debug: t,
|
|
9
9
|
className: p,
|
|
10
|
-
children:
|
|
10
|
+
children: d
|
|
11
11
|
}) {
|
|
12
|
-
const { output:
|
|
13
|
-
|
|
12
|
+
const { output: s } = c(
|
|
13
|
+
d ?? "",
|
|
14
14
|
o,
|
|
15
15
|
e,
|
|
16
16
|
t,
|
|
@@ -21,16 +21,16 @@ function l({
|
|
|
21
21
|
{
|
|
22
22
|
className: p,
|
|
23
23
|
components: {
|
|
24
|
-
a: ({ node: f, ...
|
|
24
|
+
a: ({ node: f, ...a }) => /* @__PURE__ */ r(
|
|
25
25
|
"a",
|
|
26
26
|
{
|
|
27
|
-
...
|
|
27
|
+
...a,
|
|
28
28
|
target: "_blank",
|
|
29
29
|
rel: "noopener noreferrer"
|
|
30
30
|
}
|
|
31
31
|
)
|
|
32
32
|
},
|
|
33
|
-
children:
|
|
33
|
+
children: s
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
36
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type MarkdownNode = {
|
|
2
|
+
type: string;
|
|
3
|
+
value?: string;
|
|
4
|
+
children?: MarkdownNode[];
|
|
5
|
+
data?: {
|
|
6
|
+
hName?: string;
|
|
7
|
+
hProperties?: Record<string, unknown>;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
type MarkdownRoot = {
|
|
11
|
+
type: "root";
|
|
12
|
+
children: MarkdownNode[];
|
|
13
|
+
};
|
|
14
|
+
export declare function remarkAdmonition(): (tree: MarkdownRoot) => void;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
const g = /^[a-z][a-z0-9_-]*/, y = /^\s*(?:[a-z][a-z0-9_-]*="(?:[^"\\]|\\.)*"(?:[ \t]+[a-z][a-z0-9_-]*="(?:[^"\\]|\\.)*")*)?\s*$/, x = /([a-z][a-z0-9_-]*)="((?:[^"\\]|\\.)*)"/g, d = /^:::[ \t]*$/, b = /* @__PURE__ */ new Set(["note", "tip", "important", "caution", "warning"]), f = (n) => {
|
|
2
|
+
if (n.type !== "paragraph" || !n.children || n.children.length === 0) return null;
|
|
3
|
+
let t = "";
|
|
4
|
+
for (const e of n.children) {
|
|
5
|
+
if (e.type === "text" && typeof e.value == "string") {
|
|
6
|
+
t += e.value;
|
|
7
|
+
continue;
|
|
8
|
+
}
|
|
9
|
+
if (e.type === "break") {
|
|
10
|
+
t += `
|
|
11
|
+
`;
|
|
12
|
+
continue;
|
|
13
|
+
}
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
return t;
|
|
17
|
+
}, T = (n) => ({
|
|
18
|
+
type: "paragraph",
|
|
19
|
+
children: [{ type: "text", value: n }]
|
|
20
|
+
}), _ = (n) => n.replace(/\\(.)/g, "$1"), v = (n) => {
|
|
21
|
+
if (!y.test(n)) return null;
|
|
22
|
+
const t = {};
|
|
23
|
+
for (const e of n.matchAll(x)) {
|
|
24
|
+
const i = e[1], o = _(e[2]);
|
|
25
|
+
(i === "icon" || i === "title") && (t[i] = o);
|
|
26
|
+
}
|
|
27
|
+
return t;
|
|
28
|
+
}, E = (n) => {
|
|
29
|
+
let t = !1, e = !1;
|
|
30
|
+
for (let i = 1; i < n.length; i += 1) {
|
|
31
|
+
const o = n[i];
|
|
32
|
+
if (e) {
|
|
33
|
+
e = !1;
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
if (o === "\\") {
|
|
37
|
+
e = !0;
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
if (o === '"') {
|
|
41
|
+
t = !t;
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
if (o === "}" && !t)
|
|
45
|
+
return i;
|
|
46
|
+
}
|
|
47
|
+
return -1;
|
|
48
|
+
}, I = (n) => {
|
|
49
|
+
if (!n.startsWith(":::")) return null;
|
|
50
|
+
let t = n.slice(3);
|
|
51
|
+
const e = t.match(g);
|
|
52
|
+
if (!e) return null;
|
|
53
|
+
const i = e[0];
|
|
54
|
+
t = t.slice(i.length);
|
|
55
|
+
let o;
|
|
56
|
+
if (t.startsWith("[")) {
|
|
57
|
+
const r = t.indexOf("]");
|
|
58
|
+
if (r < 0) return null;
|
|
59
|
+
o = t.slice(1, r), t = t.slice(r + 1);
|
|
60
|
+
}
|
|
61
|
+
let c = {};
|
|
62
|
+
if (t.startsWith("{")) {
|
|
63
|
+
const r = E(t);
|
|
64
|
+
if (r < 0) return null;
|
|
65
|
+
const a = v(t.slice(1, r));
|
|
66
|
+
if (!a) return null;
|
|
67
|
+
c = a, t = t.slice(r + 1);
|
|
68
|
+
}
|
|
69
|
+
return /^[ \t]*$/.test(t) ? { name: i, title: o, attributes: c } : null;
|
|
70
|
+
}, A = (n, t) => {
|
|
71
|
+
for (let e = t; e < n.length; e += 1) {
|
|
72
|
+
const i = f(n[e]);
|
|
73
|
+
if (i && d.test(i))
|
|
74
|
+
return e;
|
|
75
|
+
}
|
|
76
|
+
return -1;
|
|
77
|
+
}, N = (n) => {
|
|
78
|
+
const t = n.join(`
|
|
79
|
+
`);
|
|
80
|
+
return t.trim() ? t.split(/\n{2,}/).map((e) => e.trim()).filter(Boolean).map((e) => T(e)) : [];
|
|
81
|
+
};
|
|
82
|
+
function z() {
|
|
83
|
+
return (n) => {
|
|
84
|
+
if (!(!n || n.type !== "root" || !Array.isArray(n.children)))
|
|
85
|
+
for (let t = 0; t < n.children.length; t += 1) {
|
|
86
|
+
const e = f(n.children[t]);
|
|
87
|
+
if (!e) continue;
|
|
88
|
+
const i = e.split(/\r?\n/), o = I(i[0] ?? "");
|
|
89
|
+
if (!o) continue;
|
|
90
|
+
let c = [], r = 0;
|
|
91
|
+
if (i.length > 1) {
|
|
92
|
+
const l = i.findIndex((u, m) => m > 0 && d.test(u));
|
|
93
|
+
if (l < 0 || i.slice(l + 1).some((u) => u.trim().length > 0))
|
|
94
|
+
continue;
|
|
95
|
+
c = N(i.slice(1, l)), r = 1;
|
|
96
|
+
} else {
|
|
97
|
+
const l = A(n.children, t + 1);
|
|
98
|
+
if (l < 0) continue;
|
|
99
|
+
c = n.children.slice(t + 1, l), r = l - t + 1;
|
|
100
|
+
}
|
|
101
|
+
const a = o.title ?? o.attributes.title, h = b.has(o.name) ? o.name : "unknown", s = {
|
|
102
|
+
"data-admonition": o.name,
|
|
103
|
+
"data-admonition-variant": h
|
|
104
|
+
};
|
|
105
|
+
a !== void 0 && (s["data-admonition-title"] = a), o.attributes.icon !== void 0 && (s["data-admonition-icon"] = o.attributes.icon);
|
|
106
|
+
const p = {
|
|
107
|
+
type: "admonition",
|
|
108
|
+
data: {
|
|
109
|
+
hName: "aside",
|
|
110
|
+
hProperties: s
|
|
111
|
+
},
|
|
112
|
+
children: c
|
|
113
|
+
};
|
|
114
|
+
n.children.splice(t, r, p);
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
export {
|
|
119
|
+
z as remarkAdmonition
|
|
120
|
+
};
|
package/dist/main-client.js
CHANGED
|
@@ -6,8 +6,8 @@ import { Icon as l } from "./atoms/Icon/Icon.js";
|
|
|
6
6
|
import { Root as u } from "./atoms/Root/Root.js";
|
|
7
7
|
import { Separator as C } from "./atoms/Separator/Separator.js";
|
|
8
8
|
import { Text as S } from "./atoms/Text/Text.js";
|
|
9
|
-
import { Input as
|
|
10
|
-
import { ToggleSwitch as
|
|
9
|
+
import { Input as A } from "./atoms/Input/Input.js";
|
|
10
|
+
import { ToggleSwitch as k } from "./atoms/ToggleSwitch/ToggleSwitch.js";
|
|
11
11
|
import { Link as P } from "./atoms/Link/Link.js";
|
|
12
12
|
import { linkClassName as h } from "./atoms/Link/linkClassName.js";
|
|
13
13
|
import { configureLink as L, routerOverride as w } from "./atoms/Link/configureLink.js";
|
|
@@ -24,78 +24,80 @@ import { BannerCard as U } from "./molecules/BannerCard/BannerCard.js";
|
|
|
24
24
|
import { CardLink as X } from "./molecules/CardLink/CardLink.js";
|
|
25
25
|
import { Breadcrumbs as _ } from "./molecules/Breadcrumbs/Breadcrumbs.js";
|
|
26
26
|
import { Disclaimer as oo } from "./molecules/Disclaimer/Disclaimer.js";
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
27
|
+
import { Admonition as eo } from "./molecules/Admonition/Admonition.js";
|
|
28
|
+
import { NotFound as mo } from "./organisms/NotFound/NotFound.js";
|
|
29
|
+
import { HorizontalScroll as fo } from "./atoms/HorizontalScroll/HorizontalScroll.js";
|
|
30
|
+
import { SlideInPanel as ao } from "./atoms/SlideInPanel/SlideInPanel.js";
|
|
31
|
+
import { Tooltip as no } from "./atoms/Tooltip/Tooltip.js";
|
|
32
|
+
import { Popover as uo } from "./atoms/Popover/Popover.js";
|
|
33
|
+
import { Account as Co } from "./molecules/Account/Account.js";
|
|
34
|
+
import { Chip as So } from "./molecules/Chip/Chip.js";
|
|
35
|
+
import { ToggleView as Ao } from "./molecules/ToggleView/ToggleView.js";
|
|
36
|
+
import { CartPart as ko } from "./molecules/Cart/CartPart.js";
|
|
37
|
+
import { AddToCartPart as Po } from "./molecules/AddToCartPart/AddToCartPart.js";
|
|
38
|
+
import { CartSlideInPanel as ho } from "./molecules/Cart/CartSlideInPanel.js";
|
|
39
|
+
import { StatefulButton as Lo } from "./molecules/StatefulButton/StatefulButton.js";
|
|
40
|
+
import { AnimatedCheckMark as bo } from "./molecules/StatefulButton/AnimatedCheckmark.js";
|
|
41
|
+
import { AddToCart as Fo } from "./molecules/AddToCart/AddToCart.js";
|
|
42
|
+
import { Modal as Mo } from "./molecules/Modal/Modal.js";
|
|
43
|
+
import { ImageViewer as Vo } from "./molecules/ImageViewer/ImageViewer.js";
|
|
44
|
+
import { T as Do } from "./Table-BX4PtCNE.js";
|
|
45
|
+
import { Error as Go } from "./molecules/Error/Error.js";
|
|
46
|
+
import { MainNav as Qo } from "./organisms/MainNav/MainNav.js";
|
|
47
|
+
import { ChipSelector as Zo } from "./organisms/ChipSelector/ChipSelector.js";
|
|
48
|
+
import { Product as qo } from "./organisms/Product/Product.js";
|
|
49
|
+
import { Carousel as Ko } from "./organisms/Carousel/Carousel.js";
|
|
50
|
+
import { Footer as Wo } from "./organisms/Footer/Footer.js";
|
|
51
|
+
import { default as Yo } from "./organisms/SpinZoomViewer/SpinZoomViewer.js";
|
|
51
52
|
export {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
Co as Account,
|
|
54
|
+
Fo as AddToCart,
|
|
55
|
+
Po as AddToCartPart,
|
|
56
|
+
eo as Admonition,
|
|
57
|
+
bo as AnimatedCheckMark,
|
|
56
58
|
j as Availability,
|
|
57
59
|
J as Avatar,
|
|
58
60
|
U as BannerCard,
|
|
59
61
|
_ as Breadcrumbs,
|
|
60
62
|
e as Button,
|
|
61
63
|
X as CardLink,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
Ko as Carousel,
|
|
65
|
+
ko as CartPart,
|
|
66
|
+
ho as CartSlideInPanel,
|
|
67
|
+
So as Chip,
|
|
68
|
+
Zo as ChipSelector,
|
|
67
69
|
f as Column,
|
|
68
70
|
oo as Disclaimer,
|
|
69
|
-
|
|
71
|
+
Go as Error,
|
|
70
72
|
m as Flex,
|
|
71
|
-
|
|
73
|
+
Wo as Footer,
|
|
72
74
|
x as Grid,
|
|
73
75
|
i as Head,
|
|
74
|
-
|
|
76
|
+
fo as HorizontalScroll,
|
|
75
77
|
l as Icon,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
Vo as ImageViewer,
|
|
79
|
+
A as Input,
|
|
78
80
|
P as Link,
|
|
79
81
|
y as LinkButton,
|
|
80
82
|
z as Logo,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
Qo as MainNav,
|
|
84
|
+
Mo as Modal,
|
|
85
|
+
mo as NotFound,
|
|
86
|
+
uo as Popover,
|
|
85
87
|
R as Pricing,
|
|
86
|
-
|
|
88
|
+
qo as Product,
|
|
87
89
|
O as QuantityInput,
|
|
88
90
|
u as Root,
|
|
89
91
|
E as SearchBox,
|
|
90
92
|
C as Separator,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
ao as SlideInPanel,
|
|
94
|
+
Yo as SpinZoomViewer,
|
|
95
|
+
Lo as StatefulButton,
|
|
96
|
+
Do as Table,
|
|
95
97
|
S as Text,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
k as ToggleSwitch,
|
|
99
|
+
Ao as ToggleView,
|
|
100
|
+
no as Tooltip,
|
|
99
101
|
H as configureImage,
|
|
100
102
|
L as configureLink,
|
|
101
103
|
N as getHideAtStyles,
|
package/dist/main-server.d.ts
CHANGED
|
@@ -46,5 +46,7 @@ export { Breadcrumbs } from './molecules/Breadcrumbs/Breadcrumbs';
|
|
|
46
46
|
export type { BreadcrumbProps, Breadcrumb } from './molecules/Breadcrumbs/Breadcrumbs';
|
|
47
47
|
export { Disclaimer } from './molecules/Disclaimer/Disclaimer';
|
|
48
48
|
export type { DisclaimerProps, DisclaimerSeverity } from './molecules/Disclaimer/Disclaimer';
|
|
49
|
+
export { Admonition } from './molecules/Admonition/Admonition';
|
|
50
|
+
export type { AdmonitionProps, AdmonitionVariant } from './molecules/Admonition/Admonition';
|
|
49
51
|
export { NotFound } from './organisms/NotFound/NotFound';
|
|
50
52
|
export type { NotFoundProps } from './organisms/NotFound/NotFound';
|
package/dist/main-server.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Button as
|
|
1
|
+
import { Button as t } from "./atoms/Button/Button.js";
|
|
2
2
|
import { Flex as m } from "./atoms/Flex/Flex.js";
|
|
3
3
|
import { Column as x, Grid as f } from "./atoms/Grid/Grid.js";
|
|
4
4
|
import { Head as n } from "./atoms/Root/Head.js";
|
|
5
5
|
import { Icon as u } from "./atoms/Icon/Icon.js";
|
|
6
|
-
import { Root as
|
|
6
|
+
import { Root as l } from "./atoms/Root/Root.js";
|
|
7
7
|
import { Separator as g } from "./atoms/Separator/Separator.js";
|
|
8
8
|
import { Text as s } from "./atoms/Text/Text.js";
|
|
9
9
|
import { Input as L } from "./atoms/Input/Input.js";
|
|
10
|
-
import { ToggleSwitch as
|
|
11
|
-
import { Link as
|
|
12
|
-
import { linkClassName as
|
|
10
|
+
import { ToggleSwitch as C } from "./atoms/ToggleSwitch/ToggleSwitch.js";
|
|
11
|
+
import { Link as S } from "./atoms/Link/Link.js";
|
|
12
|
+
import { linkClassName as y } from "./atoms/Link/linkClassName.js";
|
|
13
13
|
import { configureLink as h, routerOverride as F } from "./atoms/Link/configureLink.js";
|
|
14
14
|
import { LinkButton as N } from "./atoms/LinkButton/LinkButton.js";
|
|
15
15
|
import { configureImage as w } from "./atoms/Image/configureImage.js";
|
|
@@ -23,36 +23,38 @@ import { Avatar as U } from "./molecules/Avatar/Avatar.js";
|
|
|
23
23
|
import { BannerCard as W } from "./molecules/BannerCard/BannerCard.js";
|
|
24
24
|
import { CardLink as Y } from "./molecules/CardLink/CardLink.js";
|
|
25
25
|
import { Breadcrumbs as _ } from "./molecules/Breadcrumbs/Breadcrumbs.js";
|
|
26
|
-
import { Disclaimer as
|
|
27
|
-
import {
|
|
26
|
+
import { Disclaimer as oo } from "./molecules/Disclaimer/Disclaimer.js";
|
|
27
|
+
import { Admonition as to } from "./molecules/Admonition/Admonition.js";
|
|
28
|
+
import { NotFound as mo } from "./organisms/NotFound/NotFound.js";
|
|
28
29
|
export {
|
|
30
|
+
to as Admonition,
|
|
29
31
|
K as Availability,
|
|
30
32
|
U as Avatar,
|
|
31
33
|
W as BannerCard,
|
|
32
34
|
_ as Breadcrumbs,
|
|
33
|
-
|
|
35
|
+
t as Button,
|
|
34
36
|
Y as CardLink,
|
|
35
37
|
x as Column,
|
|
36
|
-
|
|
38
|
+
oo as Disclaimer,
|
|
37
39
|
m as Flex,
|
|
38
40
|
f as Grid,
|
|
39
41
|
n as Head,
|
|
40
42
|
u as Icon,
|
|
41
43
|
L as Input,
|
|
42
|
-
|
|
44
|
+
S as Link,
|
|
43
45
|
N as LinkButton,
|
|
44
46
|
P as Logo,
|
|
45
|
-
|
|
47
|
+
mo as NotFound,
|
|
46
48
|
E as Pricing,
|
|
47
49
|
q as QuantityInput,
|
|
48
|
-
|
|
50
|
+
l as Root,
|
|
49
51
|
R as SearchBox,
|
|
50
52
|
g as Separator,
|
|
51
53
|
s as Text,
|
|
52
|
-
|
|
54
|
+
C as ToggleSwitch,
|
|
53
55
|
w as configureImage,
|
|
54
56
|
h as configureLink,
|
|
55
57
|
G as getHideAtStyles,
|
|
56
|
-
|
|
58
|
+
y as linkClassName,
|
|
57
59
|
F as routerOverride
|
|
58
60
|
};
|
package/dist/main.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ export { SearchBox } from './molecules/SearchBox/SearchBox';
|
|
|
24
24
|
export type { SearchBoxProps } from './molecules/SearchBox/SearchBox';
|
|
25
25
|
export { Error } from './molecules/Error/Error';
|
|
26
26
|
export type { ErrorProps, ErrorMessageProps, ErrorDetailsProps, } from './molecules/Error/Error';
|
|
27
|
+
export { Admonition } from './molecules/Admonition/Admonition';
|
|
28
|
+
export type { AdmonitionProps, AdmonitionVariant } from './molecules/Admonition/Admonition';
|
|
27
29
|
export { ToggleView } from './molecules/ToggleView/ToggleView';
|
|
28
30
|
export type { ToggleViewProps, ToggleOptionProps, ToggleOptionBaseProps, } from './molecules/ToggleView/ToggleView';
|
|
29
31
|
export { MainNav } from './organisms/MainNav/MainNav';
|
package/dist/main.js
CHANGED
|
@@ -1,39 +1,41 @@
|
|
|
1
|
-
import { Button as
|
|
1
|
+
import { Button as t } from "./atoms/Button/Button.js";
|
|
2
2
|
import { Flex as p } from "./atoms/Flex/Flex.js";
|
|
3
3
|
import { Column as m, Grid as f } from "./atoms/Grid/Grid.js";
|
|
4
4
|
import { Head as n } from "./atoms/Root/Head.js";
|
|
5
|
-
import { Icon as
|
|
5
|
+
import { Icon as c } from "./atoms/Icon/Icon.js";
|
|
6
6
|
import { Root as u } from "./atoms/Root/Root.js";
|
|
7
|
-
import { Separator as
|
|
8
|
-
import { Text as
|
|
9
|
-
import { Input as
|
|
7
|
+
import { Separator as g } from "./atoms/Separator/Separator.js";
|
|
8
|
+
import { Text as A } from "./atoms/Text/Text.js";
|
|
9
|
+
import { Input as S } from "./atoms/Input/Input.js";
|
|
10
10
|
import { Account as B } from "./molecules/Account/Account.js";
|
|
11
11
|
import { Avatar as T } from "./molecules/Avatar/Avatar.js";
|
|
12
12
|
import { Chip as E } from "./molecules/Chip/Chip.js";
|
|
13
13
|
import { Logo as G } from "./molecules/Logo/Logo.js";
|
|
14
14
|
import { SearchBox as L } from "./molecules/SearchBox/SearchBox.js";
|
|
15
15
|
import { Error as N } from "./molecules/Error/Error.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
16
|
+
import { Admonition as V } from "./molecules/Admonition/Admonition.js";
|
|
17
|
+
import { ToggleView as j } from "./molecules/ToggleView/ToggleView.js";
|
|
18
|
+
import { MainNav as q } from "./organisms/MainNav/MainNav.js";
|
|
19
|
+
import { ChipSelector as y } from "./organisms/ChipSelector/ChipSelector.js";
|
|
19
20
|
export {
|
|
20
21
|
B as Account,
|
|
22
|
+
V as Admonition,
|
|
21
23
|
T as Avatar,
|
|
22
|
-
|
|
24
|
+
t as Button,
|
|
23
25
|
E as Chip,
|
|
24
|
-
|
|
26
|
+
y as ChipSelector,
|
|
25
27
|
m as Column,
|
|
26
28
|
N as Error,
|
|
27
29
|
p as Flex,
|
|
28
30
|
f as Grid,
|
|
29
31
|
n as Head,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
c as Icon,
|
|
33
|
+
S as Input,
|
|
32
34
|
G as Logo,
|
|
33
|
-
|
|
35
|
+
q as MainNav,
|
|
34
36
|
u as Root,
|
|
35
37
|
L as SearchBox,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
g as Separator,
|
|
39
|
+
A as Text,
|
|
40
|
+
j as ToggleView
|
|
39
41
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
export type AdmonitionVariant = "note" | "tip" | "important" | "caution" | "warning" | "unknown";
|
|
3
|
+
export type AdmonitionProps = ComponentPropsWithoutRef<"aside"> & {
|
|
4
|
+
admonitionType: string;
|
|
5
|
+
variant: AdmonitionVariant | string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export declare function Admonition({ admonitionType, variant, icon, title, className, children, ...props }: AdmonitionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsxs as m, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { Icon as _ } from "../../atoms/Icon/Icon.js";
|
|
3
|
+
import { Text as p } from "../../atoms/Text/Text.js";
|
|
4
|
+
import { c as u } from "../../clsx-OuTLNxxd.js";
|
|
5
|
+
import '../../assets/Admonition.css';const N = "_admonition_1iwl5_1", w = "_admonitionHeader_1iwl5_12", g = "_admonitionTitle_1iwl5_18", C = "_admonitionBody_1iwl5_22", T = "_admonitionNote_1iwl5_34", h = "_admonitionTip_1iwl5_38", I = "_admonitionImportant_1iwl5_43", f = "_admonitionCaution_1iwl5_48", x = "_admonitionWarning_1iwl5_54", B = "_admonitionNeutral_1iwl5_60", i = {
|
|
6
|
+
admonition: N,
|
|
7
|
+
admonitionHeader: w,
|
|
8
|
+
admonitionTitle: g,
|
|
9
|
+
admonitionBody: C,
|
|
10
|
+
admonitionNote: T,
|
|
11
|
+
admonitionTip: h,
|
|
12
|
+
admonitionImportant: I,
|
|
13
|
+
admonitionCaution: f,
|
|
14
|
+
admonitionWarning: x,
|
|
15
|
+
admonitionNeutral: B
|
|
16
|
+
}, W = {
|
|
17
|
+
note: "Note",
|
|
18
|
+
tip: "Tip",
|
|
19
|
+
important: "Important",
|
|
20
|
+
caution: "Caution",
|
|
21
|
+
warning: "Warning"
|
|
22
|
+
}, y = (n) => {
|
|
23
|
+
const t = n.trim().replace(/[_-]+/g, " ");
|
|
24
|
+
return t ? t.split(/\s+/).map((o) => `${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()}`).join(" ") : "Admonition";
|
|
25
|
+
}, A = (n) => n === "note" ? i.admonitionNote : n === "tip" ? i.admonitionTip : n === "important" ? i.admonitionImportant : n === "caution" ? i.admonitionCaution : n === "warning" ? i.admonitionWarning : i.admonitionNeutral;
|
|
26
|
+
function b({
|
|
27
|
+
admonitionType: n,
|
|
28
|
+
variant: t,
|
|
29
|
+
icon: o,
|
|
30
|
+
title: d,
|
|
31
|
+
className: e,
|
|
32
|
+
children: s,
|
|
33
|
+
...r
|
|
34
|
+
}) {
|
|
35
|
+
const l = d ?? W[n] ?? y(n), c = A(t);
|
|
36
|
+
return /* @__PURE__ */ m("aside", { ...r, className: u(i.admonition, c, e), "data-admonition": n, children: [
|
|
37
|
+
/* @__PURE__ */ m("div", { className: i.admonitionHeader, children: [
|
|
38
|
+
o ? /* @__PURE__ */ a("span", { className: i.admonitionIcon, "aria-hidden": "true", children: /* @__PURE__ */ a(_, { iconKey: o, size: "xs" }) }) : null,
|
|
39
|
+
/* @__PURE__ */ a(p, { size: "sm", weight: "semibold", className: i.admonitionTitle, children: l })
|
|
40
|
+
] }),
|
|
41
|
+
/* @__PURE__ */ a("div", { className: i.admonitionBody, children: s })
|
|
42
|
+
] });
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
b as Admonition
|
|
46
|
+
};
|