@jonmilner/ui 0.25.1 → 0.25.2
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/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/Markdown/index.d.mts +10 -1
- package/dist/Markdown/index.mjs +100 -85
- package/dist/Text/Text.css +1 -1
- package/dist/Text/Text.css.mjs +2 -0
- package/dist/docs/Dialog.md +1 -0
- package/dist/docs/Markdown.md +21 -1
- package/dist/docs/Text.md +28 -0
- package/dist/docs/manifest.json +22 -1
- package/dist/index.d.mts +2 -2
- package/package.json +3 -3
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Lucide
|
|
4
4
|
|
|
5
|
-
The components exported from `@jonmilner/ui/icons` are generated from [Lucide](https://lucide.dev) icons (lucide-static 1.
|
|
5
|
+
The components exported from `@jonmilner/ui/icons` are generated from [Lucide](https://lucide.dev) icons (lucide-static 1.73.0). Lucide's license follows.
|
|
6
6
|
|
|
7
7
|
```text
|
|
8
8
|
ISC License
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BodySize } from "../Body/index.mjs";
|
|
1
2
|
import { StyleProps } from "../Box/base.mjs";
|
|
2
3
|
import { OmitEach } from "../types.mjs";
|
|
3
4
|
import { ComponentPropsWithRef, ComponentType, JSX } from "react";
|
|
@@ -22,5 +23,13 @@ export type MarkdownProps = StyleProps & OmitEach<ComponentPropsWithRef<"div">,
|
|
|
22
23
|
components?: MarkdownComponents;
|
|
23
24
|
/** The level `#` renders at; each `#` more is a level deeper, capped at 6. */
|
|
24
25
|
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
26
|
+
/**
|
|
27
|
+
* Which links stay links: `all` (the default), or `absolute`, where a relative URL renders as
|
|
28
|
+
* plain text and only a URL with a scheme, a `//` one or a `#` fragment links.
|
|
29
|
+
*/
|
|
30
|
+
linkPolicy?: MarkdownLinkPolicy;
|
|
31
|
+
/** The size of paragraphs and list item text, as `Body`'s `size`; headings step from it. */
|
|
32
|
+
size?: BodySize;
|
|
25
33
|
};
|
|
26
|
-
export
|
|
34
|
+
export type MarkdownLinkPolicy = "all" | "absolute";
|
|
35
|
+
export declare function Markdown({ children, components, headingLevel, linkPolicy, size, display, flexDirection, gap, ...props }: MarkdownProps): JSX.Element;
|
package/dist/Markdown/index.mjs
CHANGED
|
@@ -15,82 +15,86 @@ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
|
15
15
|
var v = (e) => e?.type === "text" ? e.value ?? "" : (e?.children ?? []).map(v).join(""), y = (e) => {
|
|
16
16
|
let t = e?.properties?.className;
|
|
17
17
|
return Array.isArray(t) ? t.map(String) : [];
|
|
18
|
-
}, b =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
}, b = {
|
|
19
|
+
sm: "med",
|
|
20
|
+
med: "lg",
|
|
21
|
+
lg: "xl"
|
|
22
|
+
}, x = (e, t) => e === 1 ? b[t] : t;
|
|
23
|
+
function S(e, t, n) {
|
|
24
|
+
let r = `h${Math.min(t + e - 1, 6)}`;
|
|
25
|
+
return function({ node: t, children: i, id: o }) {
|
|
22
26
|
return y(t).includes("sr-only") ? /* @__PURE__ */ g(l, {
|
|
23
|
-
as:
|
|
24
|
-
id:
|
|
25
|
-
children:
|
|
27
|
+
as: r,
|
|
28
|
+
id: o,
|
|
29
|
+
children: i
|
|
26
30
|
}) : /* @__PURE__ */ g(a, {
|
|
27
|
-
as:
|
|
28
|
-
id:
|
|
29
|
-
size:
|
|
30
|
-
children:
|
|
31
|
+
as: r,
|
|
32
|
+
id: o,
|
|
33
|
+
size: x(e, n),
|
|
34
|
+
children: i
|
|
31
35
|
});
|
|
32
36
|
};
|
|
33
37
|
}
|
|
34
|
-
var
|
|
35
|
-
function
|
|
38
|
+
var C = (e) => e !== void 0 && /^(?:https?:)?\/\//i.test(e), w = (e) => /^(?:[a-z][a-z\d+.-]*:|\/\/|#)/i.test(e), T = /^(?:p|ul|ol|pre|blockquote|table|hr|div|section|h[1-6])$/;
|
|
39
|
+
function E(e) {
|
|
36
40
|
return typeof e.type == "string" ? e.type : e.props.node?.tagName;
|
|
37
41
|
}
|
|
38
|
-
function
|
|
39
|
-
let
|
|
40
|
-
|
|
41
|
-
as: t &&
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
function D(e, t, r) {
|
|
43
|
+
let i = [], a = [], o = () => {
|
|
44
|
+
a.some((e) => typeof e != "string" || e.trim()) && i.push(/* @__PURE__ */ g(n, {
|
|
45
|
+
as: t && i.length === 0 ? "label" : "div",
|
|
46
|
+
size: r,
|
|
47
|
+
children: a
|
|
48
|
+
}, i.length)), a = [];
|
|
44
49
|
};
|
|
45
50
|
for (let t of m.toArray(e)) {
|
|
46
|
-
let e = h(t) ?
|
|
47
|
-
e !== void 0 &&
|
|
51
|
+
let e = h(t) ? E(t) : void 0;
|
|
52
|
+
e !== void 0 && T.test(e) ? (o(), i.push(t)) : a.push(t);
|
|
48
53
|
}
|
|
49
|
-
return
|
|
54
|
+
return o(), i;
|
|
50
55
|
}
|
|
51
|
-
|
|
52
|
-
let
|
|
56
|
+
var O = (e) => function({ node: t, children: n, id: i }) {
|
|
57
|
+
let a = y(t).includes("task-list-item"), [o, ...s] = D(n, a, e);
|
|
53
58
|
return /* @__PURE__ */ _(r, {
|
|
54
59
|
as: "li",
|
|
55
|
-
className:
|
|
56
|
-
id:
|
|
57
|
-
children: [
|
|
60
|
+
className: a ? p : void 0,
|
|
61
|
+
id: i,
|
|
62
|
+
children: [o, s.length > 0 && /* @__PURE__ */ g(r, {
|
|
58
63
|
display: "flex",
|
|
59
64
|
flexDirection: "column",
|
|
60
65
|
gap: "12",
|
|
61
66
|
paddingBlockStart: "12",
|
|
62
|
-
paddingInlineStart:
|
|
63
|
-
children:
|
|
67
|
+
paddingInlineStart: a ? M.paddingInlineStart : void 0,
|
|
68
|
+
children: s
|
|
64
69
|
})]
|
|
65
70
|
});
|
|
66
|
-
}
|
|
67
|
-
var D = {
|
|
71
|
+
}, k = {
|
|
68
72
|
left: "start",
|
|
69
73
|
center: "center",
|
|
70
74
|
right: "end"
|
|
71
|
-
},
|
|
72
|
-
function
|
|
75
|
+
}, A = (e) => k[e?.textAlign ?? ""];
|
|
76
|
+
function j(e) {
|
|
73
77
|
let t = e?.children?.find((e) => e.tagName === "code");
|
|
74
78
|
return y(t).find((e) => e.startsWith("language-"))?.slice(9);
|
|
75
79
|
}
|
|
76
|
-
var
|
|
80
|
+
var M = {
|
|
77
81
|
display: "flex",
|
|
78
82
|
flexDirection: "column",
|
|
79
83
|
gap: "12",
|
|
80
84
|
paddingInlineStart: "24"
|
|
81
|
-
},
|
|
85
|
+
}, N = (e) => function({ node: t, children: n, className: i, id: a, start: o }) {
|
|
82
86
|
let s = (t?.children ?? []).filter((e) => e.tagName === "li"), c = s.length > 0 && s.every((e) => y(e).includes("task-list-item"));
|
|
83
87
|
return /* @__PURE__ */ g(r, {
|
|
84
88
|
as: e,
|
|
85
|
-
...
|
|
89
|
+
...M,
|
|
86
90
|
className: i,
|
|
87
91
|
id: a,
|
|
88
|
-
paddingInlineStart: c ? "0" :
|
|
92
|
+
paddingInlineStart: c ? "0" : M.paddingInlineStart,
|
|
89
93
|
start: o,
|
|
90
94
|
children: n
|
|
91
95
|
});
|
|
92
96
|
};
|
|
93
|
-
function
|
|
97
|
+
function P() {
|
|
94
98
|
let e = (t) => {
|
|
95
99
|
t.children = t.children?.map((n) => n.type === "raw" && (t.type === "root" || t.tagName === "blockquote") ? {
|
|
96
100
|
type: "element",
|
|
@@ -101,7 +105,7 @@ function M() {
|
|
|
101
105
|
};
|
|
102
106
|
return e;
|
|
103
107
|
}
|
|
104
|
-
function
|
|
108
|
+
function F() {
|
|
105
109
|
return (e) => {
|
|
106
110
|
let t = [], n = (e) => {
|
|
107
111
|
e.tagName === "table" && t.push(e), e.children?.forEach(n);
|
|
@@ -114,34 +118,35 @@ function N() {
|
|
|
114
118
|
});
|
|
115
119
|
};
|
|
116
120
|
}
|
|
117
|
-
var
|
|
121
|
+
var I = (e) => {
|
|
118
122
|
let { tableIndex: t, tableCount: n } = e?.data ?? {};
|
|
119
123
|
return typeof n == "number" && n > 1 ? `Table ${String(t)}` : "Table";
|
|
120
124
|
};
|
|
121
|
-
function
|
|
125
|
+
function L(e) {
|
|
122
126
|
let t = 2166136261;
|
|
123
127
|
for (let n = 0; n < e.length; n++) t = Math.imul(t ^ e.charCodeAt(n), 16777619);
|
|
124
128
|
return `doc-${(t >>> 0).toString(36)}-`;
|
|
125
129
|
}
|
|
126
|
-
function
|
|
130
|
+
function R({ prefix: e }) {
|
|
127
131
|
let t = "footnote-label", n = (r) => {
|
|
128
132
|
let { properties: i } = r;
|
|
129
133
|
i?.id === t && (i.id = `${e}${t}`), Array.isArray(i?.ariaDescribedBy) && (i.ariaDescribedBy = i.ariaDescribedBy.map((n) => n === t ? `${e}${t}` : n)), r.children?.forEach(n);
|
|
130
134
|
};
|
|
131
135
|
return n;
|
|
132
136
|
}
|
|
133
|
-
var
|
|
134
|
-
function
|
|
137
|
+
var z = (e) => m.toArray(e).every((e) => typeof e == "string" && /^[ \t\n\r\f]*$/.test(e));
|
|
138
|
+
function B(e, t, a) {
|
|
135
139
|
return {
|
|
136
|
-
h1:
|
|
137
|
-
h2:
|
|
138
|
-
h3:
|
|
139
|
-
h4:
|
|
140
|
-
h5:
|
|
141
|
-
h6:
|
|
142
|
-
p: ({ node: e, children:
|
|
140
|
+
h1: S(1, e, t),
|
|
141
|
+
h2: S(2, e, t),
|
|
142
|
+
h3: S(3, e, t),
|
|
143
|
+
h4: S(4, e, t),
|
|
144
|
+
h5: S(5, e, t),
|
|
145
|
+
h6: S(6, e, t),
|
|
146
|
+
p: ({ node: e, children: r }) => z(r) ? null : /* @__PURE__ */ g(n, {
|
|
143
147
|
as: e?.children?.[0]?.tagName === "input" ? "label" : "p",
|
|
144
|
-
|
|
148
|
+
size: t,
|
|
149
|
+
children: r
|
|
145
150
|
}),
|
|
146
151
|
strong: ({ children: e }) => /* @__PURE__ */ g(c, {
|
|
147
152
|
as: "strong",
|
|
@@ -160,29 +165,34 @@ function R(e) {
|
|
|
160
165
|
as: "sup",
|
|
161
166
|
children: e
|
|
162
167
|
}),
|
|
163
|
-
a: ({ node: e, color: t, href: n,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
168
|
+
a: ({ node: e, color: t, href: n, children: r, ...i }) => {
|
|
169
|
+
if (!n || a === "absolute" && !w(n)) return /* @__PURE__ */ g(c, {
|
|
170
|
+
as: "span",
|
|
171
|
+
children: r
|
|
172
|
+
});
|
|
173
|
+
let s = C(n);
|
|
174
|
+
return /* @__PURE__ */ _(o, {
|
|
175
|
+
...i,
|
|
176
|
+
href: n,
|
|
177
|
+
...s && {
|
|
178
|
+
rel: "noopener noreferrer",
|
|
179
|
+
target: "_blank"
|
|
180
|
+
},
|
|
181
|
+
children: [r, s && /* @__PURE__ */ g(l, { children: " (opens in a new tab)" })]
|
|
182
|
+
});
|
|
183
|
+
},
|
|
174
184
|
code: ({ children: e }) => /* @__PURE__ */ g(i, { children: e }),
|
|
175
185
|
pre: ({ node: e }) => {
|
|
176
|
-
let t =
|
|
186
|
+
let t = j(e);
|
|
177
187
|
return /* @__PURE__ */ g(i, {
|
|
178
188
|
"aria-label": t ? `Code, ${t}` : "Code",
|
|
179
189
|
block: !0,
|
|
180
190
|
children: v(e).replace(/\n$/, "")
|
|
181
191
|
});
|
|
182
192
|
},
|
|
183
|
-
ul:
|
|
184
|
-
ol:
|
|
185
|
-
li:
|
|
193
|
+
ul: N("ul"),
|
|
194
|
+
ol: N("ol"),
|
|
195
|
+
li: O(t),
|
|
186
196
|
input: ({ checked: e, type: t }) => t === "checkbox" ? /* @__PURE__ */ g(r, {
|
|
187
197
|
as: "input",
|
|
188
198
|
className: u,
|
|
@@ -205,9 +215,9 @@ function R(e) {
|
|
|
205
215
|
className: f
|
|
206
216
|
}),
|
|
207
217
|
table: ({ node: e, children: t }) => /* @__PURE__ */ g(s.ScrollArea, {
|
|
208
|
-
"aria-label":
|
|
218
|
+
"aria-label": I(e),
|
|
209
219
|
children: /* @__PURE__ */ g(s, {
|
|
210
|
-
"aria-label":
|
|
220
|
+
"aria-label": I(e),
|
|
211
221
|
children: t
|
|
212
222
|
})
|
|
213
223
|
}),
|
|
@@ -215,34 +225,39 @@ function R(e) {
|
|
|
215
225
|
tbody: ({ children: e }) => /* @__PURE__ */ g(s.Body, { children: e }),
|
|
216
226
|
tr: ({ children: e }) => /* @__PURE__ */ g(s.Row, { children: e }),
|
|
217
227
|
th: ({ children: e, style: t }) => /* @__PURE__ */ g(s.HeaderCell, {
|
|
218
|
-
textAlign:
|
|
228
|
+
textAlign: A(t),
|
|
219
229
|
children: e
|
|
220
230
|
}),
|
|
221
231
|
td: ({ children: e, style: t }) => /* @__PURE__ */ g(s.Cell, {
|
|
222
|
-
textAlign:
|
|
232
|
+
textAlign: A(t),
|
|
223
233
|
children: e
|
|
224
234
|
})
|
|
225
235
|
};
|
|
226
236
|
}
|
|
227
|
-
var
|
|
228
|
-
function
|
|
229
|
-
let
|
|
237
|
+
var V = /* @__PURE__ */ new Map();
|
|
238
|
+
function H(e, t, n) {
|
|
239
|
+
let r = `${String(e)} ${t} ${n}`, i = V.get(r) ?? B(e, t, n);
|
|
240
|
+
return V.set(r, i), i;
|
|
241
|
+
}
|
|
242
|
+
var U = [t], W = [P, F], G = ["img"];
|
|
243
|
+
function K({ children: t, components: n, headingLevel: i = 1, linkPolicy: a = "all", size: o = "med", display: s = "flex", flexDirection: c = "column", gap: l = "16", ...u }) {
|
|
244
|
+
let d = L(t);
|
|
230
245
|
return /* @__PURE__ */ g(r, {
|
|
231
|
-
display:
|
|
232
|
-
flexDirection:
|
|
233
|
-
gap:
|
|
234
|
-
...
|
|
246
|
+
display: s,
|
|
247
|
+
flexDirection: c,
|
|
248
|
+
gap: l,
|
|
249
|
+
...u,
|
|
235
250
|
children: /* @__PURE__ */ g(e, {
|
|
236
251
|
components: n ? {
|
|
237
|
-
...
|
|
252
|
+
...H(i, o, a),
|
|
238
253
|
...n
|
|
239
|
-
} :
|
|
240
|
-
disallowedElements: n?.img ? void 0 :
|
|
241
|
-
rehypePlugins: [...
|
|
242
|
-
remarkPlugins:
|
|
243
|
-
remarkRehypeOptions: { clobberPrefix:
|
|
254
|
+
} : H(i, o, a),
|
|
255
|
+
disallowedElements: n?.img ? void 0 : G,
|
|
256
|
+
rehypePlugins: [...W, [R, { prefix: d }]],
|
|
257
|
+
remarkPlugins: U,
|
|
258
|
+
remarkRehypeOptions: { clobberPrefix: d },
|
|
244
259
|
children: t
|
|
245
260
|
})
|
|
246
261
|
});
|
|
247
262
|
}
|
|
248
|
-
export {
|
|
263
|
+
export { K as Markdown };
|
package/dist/Text/Text.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.clickable-box, components.flex, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.alert, components.avatar, components.badge, components.body, components.button, components.caption, components.chip, components.code, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.label, components.link, components.menu, components.multiselect, components.number-field, components.popover, components.radio-group, components.run, components.search-field, components.select, components.switch, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.visually-hidden, components.nav-list, components.table, components.markdown;
|
|
2
|
-
@layer components.text{._1mgdisq1{--_1nsw9rp0:var(--line-height-med);--_1mgdisq0:var(--font-tracking-body);--_1nsw9rp1:calc((var(--font-trim-body-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-body-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-body);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-body);font-size:var(--font-size-med);font-weight:var(--font-weight-regular);line-height:var(--_1nsw9rp0)}:where(li)>._1mgdisq2{display:flow-root}:where(li:has(>._1mgdisq2))::marker{font-family:var(--font-body);line-height:0}:where(._1mgdisq1)>._1mgdisq1:where(a,abbr,b,bdi,bdo,cite,code,data,del,dfn,em,i,ins,kbd,label,mark,output,q,s,samp,small,span,strong,sub,sup,time,u,var){--_1nsw9rp0:inherit;--_1mgdisq0:inherit;--_1nsw9rp1:inherit;--_1nsw9rp2:inherit;font-feature-settings:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;display:inline}._1mgdisq4{--_1nsw9rp0:inherit;--_1mgdisq0:inherit;--_1nsw9rp1:inherit;--_1nsw9rp2:inherit;text-overflow:ellipsis;white-space:nowrap;font-feature-settings:inherit;min-block-size:0;min-inline-size:0;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;overflow-y:visible}:where([data-text-reveal]:hover,[data-text-reveal]:focus-within) ._1mgdisq4{white-space:normal;text-overflow:clip}._1mgdisq5{--_1mgdisq0:var(--font-tracking-body);--_1nsw9rp1:calc((var(--font-trim-body-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-body-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-body);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-body)}._1mgdisq6{--_1mgdisq0:var(--font-tracking-heading);--_1nsw9rp1:calc((var(--font-trim-heading-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-heading-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-heading);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-heading)}._1mgdisq7{--_1mgdisq0:var(--font-tracking-display);--_1nsw9rp1:calc((var(--font-trim-display-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-display-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-display);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-display)}._1mgdisq8{--_1mgdisq0:var(--font-tracking-label);--_1nsw9rp1:calc((var(--font-trim-label-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-label-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-label);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-label)}._1mgdisq9{--_1mgdisq0:var(--font-tracking-mono);--_1nsw9rp1:calc((var(--font-trim-mono-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-mono-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-mono);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-mono)}._1mgdisqa{font-size:var(--font-size-xs)}._1mgdisqb{font-size:var(--font-size-sm)}._1mgdisqc{font-size:var(--font-size-med)}._1mgdisqd{font-size:var(--font-size-lg)}._1mgdisqe{font-size:var(--font-size-xl)}._1mgdisqf{font-size:var(--font-size-2xl)}._1mgdisqg{font-size:var(--font-size-3xl)}._1mgdisqh{font-size:var(--font-size-4xl)}._1mgdisqi{font-weight:var(--font-weight-regular)}._1mgdisqj{font-weight:var(--font-weight-medium)}._1mgdisqk{font-weight:var(--font-weight-semibold)}._1mgdisql{font-weight:var(--font-weight-bold)}._1mgdisqm{--_1nsw9rp0:var(--line-height-sm);line-height:var(--_1nsw9rp0)}._1mgdisqn{--_1nsw9rp0:var(--line-height-meta);line-height:var(--_1nsw9rp0)}._1mgdisqo{--_1nsw9rp0:var(--line-height-body);line-height:var(--_1nsw9rp0)}._1mgdisqp{--_1nsw9rp0:var(--line-height-med);line-height:var(--_1nsw9rp0)}._1mgdisqq{--_1nsw9rp0:var(--line-height-lg);line-height:var(--_1nsw9rp0)}._1mgdisqr{font-variant-numeric:tabular-nums}._1mgdisqs{white-space:nowrap}._1mgdisqt{white-space:pre-wrap;overflow-wrap:anywhere}._1mgdisqu{white-space:pre}._1mgdisqv{text-overflow:ellipsis;white-space:nowrap;min-block-size:0;min-inline-size:0;margin-block-start:var(--_1nsw9rp1);margin-block-end:var(--_1nsw9rp2);padding-block-start:calc(-1 * var(--_1nsw9rp1));padding-block-end:calc(-1 * var(--_1nsw9rp2))}:where([data-text-reveal]:hover,[data-text-reveal]:focus-within) ._1mgdisqv{white-space:normal;text-overflow:clip}@supports (text-box:trim-both cap alphabetic){._1mgdisq1{text-box:trim-both cap alphabetic}._1mgdisq3{text-box:normal}._1mgdisq3:before{content:"";margin-block-end:var(--_1nsw9rp1);display:table}._1mgdisq3:after{content:"";margin-block-start:var(--_1nsw9rp2);display:table}:where(li)>._1mgdisq3:before,:where(li)>._1mgdisq3:after{display:block}:where(._1mgdisq1)>._1mgdisq1:where(a,abbr,b,bdi,bdo,cite,code,data,del,dfn,em,i,ins,kbd,label,mark,output,q,s,samp,small,span,strong,sub,sup,time,u,var){text-box-trim:none}:where(._1mgdisq1)>._1mgdisq1:where(a,abbr,b,bdi,bdo,cite,code,data,del,dfn,em,i,ins,kbd,label,mark,output,q,s,samp,small,span,strong,sub,sup,time,u,var):before,:where(._1mgdisq1)>._1mgdisq1:where(a,abbr,b,bdi,bdo,cite,code,data,del,dfn,em,i,ins,kbd,label,mark,output,q,s,samp,small,span,strong,sub,sup,time,u,var):after{content:none}._1mgdisq4{text-box-trim:none}}@supports not (text-box:trim-both cap alphabetic){._1mgdisq1:before{content:"";margin-block-end:var(--_1nsw9rp1);display:table}._1mgdisq1:after{content:"";margin-block-start:var(--_1nsw9rp2);display:table}:where(li)>._1mgdisq2:before,:where(li)>._1mgdisq2:after{display:block}:where(._1mgdisq1)>._1mgdisq1:where(a,abbr,b,bdi,bdo,cite,code,data,del,dfn,em,i,ins,kbd,label,mark,output,q,s,samp,small,span,strong,sub,sup,time,u,var):before,:where(._1mgdisq1)>._1mgdisq1:where(a,abbr,b,bdi,bdo,cite,code,data,del,dfn,em,i,ins,kbd,label,mark,output,q,s,samp,small,span,strong,sub,sup,time,u,var):after,._1mgdisq4:before,._1mgdisq4:after{content:none}}}
|
|
2
|
+
@layer components.text{._1mgdisq1{--_1nsw9rp0:var(--line-height-med);--_1mgdisq0:var(--font-tracking-body);--_1nsw9rp1:calc((var(--font-trim-body-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-body-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-body);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-body);font-size:var(--font-size-med);font-weight:var(--font-weight-regular);line-height:var(--_1nsw9rp0)}:where(li)>._1mgdisq2{display:flow-root}:where(li:has(>._1mgdisq2))::marker{font-family:var(--font-body);line-height:0}:where(._1mgdisq1)>._1mgdisq1:where(a,abbr,b,bdi,bdo,cite,code,data,del,dfn,em,i,ins,kbd,label,mark,output,q,s,samp,small,span,strong,sub,sup,time,u,var){--_1nsw9rp0:inherit;--_1mgdisq0:inherit;--_1nsw9rp1:inherit;--_1nsw9rp2:inherit;font-feature-settings:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;display:inline}._1mgdisq4{--_1nsw9rp0:inherit;--_1mgdisq0:inherit;--_1nsw9rp1:inherit;--_1nsw9rp2:inherit;text-overflow:ellipsis;white-space:nowrap;font-feature-settings:inherit;min-block-size:0;min-inline-size:0;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;overflow-y:visible}:where([data-text-reveal]:hover,[data-text-reveal]:focus-within) ._1mgdisq4{white-space:normal;text-overflow:clip}._1mgdisq5{--_1mgdisq0:var(--font-tracking-body);--_1nsw9rp1:calc((var(--font-trim-body-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-body-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-body);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-body)}._1mgdisq6{--_1mgdisq0:var(--font-tracking-heading);--_1nsw9rp1:calc((var(--font-trim-heading-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-heading-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-heading);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-heading)}._1mgdisq7{--_1mgdisq0:var(--font-tracking-display);--_1nsw9rp1:calc((var(--font-trim-display-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-display-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-display);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-display)}._1mgdisq8{--_1mgdisq0:var(--font-tracking-label);--_1nsw9rp1:calc((var(--font-trim-label-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-label-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-label);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-label)}._1mgdisq9{--_1mgdisq0:var(--font-tracking-mono);--_1nsw9rp1:calc((var(--font-trim-mono-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-mono-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-mono);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-mono)}._1mgdisqa{font-size:var(--font-size-xs)}._1mgdisqb{font-size:var(--font-size-sm)}._1mgdisqc{font-size:var(--font-size-med)}._1mgdisqd{font-size:var(--font-size-lg)}._1mgdisqe{font-size:var(--font-size-xl)}._1mgdisqf{font-size:var(--font-size-2xl)}._1mgdisqg{font-size:var(--font-size-3xl)}._1mgdisqh{font-size:var(--font-size-4xl)}._1mgdisqi{font-weight:var(--font-weight-regular)}._1mgdisqj{font-weight:var(--font-weight-medium)}._1mgdisqk{font-weight:var(--font-weight-semibold)}._1mgdisql{font-weight:var(--font-weight-bold)}._1mgdisqm{--_1nsw9rp0:var(--line-height-sm);line-height:var(--_1nsw9rp0)}._1mgdisqn{--_1nsw9rp0:var(--line-height-meta);line-height:var(--_1nsw9rp0)}._1mgdisqo{--_1nsw9rp0:var(--line-height-body);line-height:var(--_1nsw9rp0)}._1mgdisqp{--_1nsw9rp0:var(--line-height-med);line-height:var(--_1nsw9rp0)}._1mgdisqq{--_1nsw9rp0:var(--line-height-lg);line-height:var(--_1nsw9rp0)}._1mgdisqr{font-variant-numeric:tabular-nums}._1mgdisqs{white-space:nowrap}._1mgdisqt{white-space:pre-wrap;overflow-wrap:anywhere}._1mgdisqu{white-space:pre}._1mgdisqv{text-overflow:ellipsis;white-space:nowrap;min-block-size:0;min-inline-size:0;margin-block-start:var(--_1nsw9rp1);margin-block-end:var(--_1nsw9rp2);padding-block-start:calc(-1 * var(--_1nsw9rp1));padding-block-end:calc(-1 * var(--_1nsw9rp2))}:where([data-text-reveal]:hover,[data-text-reveal]:focus-within) ._1mgdisqv{white-space:normal;text-overflow:clip}@supports (text-box:trim-both cap alphabetic){._1mgdisq1{text-box:trim-both cap alphabetic}._1mgdisq3{text-box:normal}._1mgdisq3:before{content:"";margin-block-end:var(--_1nsw9rp1);display:table}._1mgdisq3:after{content:"";margin-block-start:var(--_1nsw9rp2);display:table}:where(li)>._1mgdisq3:before,:where(li)>._1mgdisq3:after{display:block}:where(._1mgdisq1)>._1mgdisq1:where(a,abbr,b,bdi,bdo,cite,code,data,del,dfn,em,i,ins,kbd,label,mark,output,q,s,samp,small,span,strong,sub,sup,time,u,var){text-box-trim:none}:where(._1mgdisq1)>._1mgdisq1:where(a,abbr,b,bdi,bdo,cite,code,data,del,dfn,em,i,ins,kbd,label,mark,output,q,s,samp,small,span,strong,sub,sup,time,u,var):before,:where(._1mgdisq1)>._1mgdisq1:where(a,abbr,b,bdi,bdo,cite,code,data,del,dfn,em,i,ins,kbd,label,mark,output,q,s,samp,small,span,strong,sub,sup,time,u,var):after{content:none}._1mgdisq4{text-box-trim:none}}@supports not (text-box:trim-both cap alphabetic){._1mgdisq1:before{content:"";margin-block-end:var(--_1nsw9rp1);display:table}._1mgdisq1:after{content:"";margin-block-start:var(--_1nsw9rp2);display:table}._1mgdisq1:where(:has(>._1dkxmm01:is(._1dkxmm014c,._1dkxmm014e):not(._1mgdisq1):first-child)):before,._1mgdisq1:where(:has(>._1dkxmm01:is(._1dkxmm014c,._1dkxmm014e):not(._1mgdisq1):last-child)):after{content:none}:where(li)>._1mgdisq2:before,:where(li)>._1mgdisq2:after{display:block}:where(._1mgdisq1)>._1mgdisq1:where(a,abbr,b,bdi,bdo,cite,code,data,del,dfn,em,i,ins,kbd,label,mark,output,q,s,samp,small,span,strong,sub,sup,time,u,var):before,:where(._1mgdisq1)>._1mgdisq1:where(a,abbr,b,bdi,bdo,cite,code,data,del,dfn,em,i,ins,kbd,label,mark,output,q,s,samp,small,span,strong,sub,sup,time,u,var):after,._1mgdisq4:before,._1mgdisq4:after{content:none}}}
|
package/dist/Text/Text.css.mjs
CHANGED
package/dist/docs/Dialog.md
CHANGED
|
@@ -21,6 +21,7 @@ A modal panel over the page for one short task: edit a name, fill a small form,
|
|
|
21
21
|
|
|
22
22
|
- Compose the parts: `Dialog` > `Dialog.Trigger` + `Dialog.Popup` > `Dialog.Body` + `Dialog.Actions` > `Dialog.Close`. `Dialog` holds the open state and renders no element, so it takes no `className` or `style`; every other part does, plus style props.
|
|
23
23
|
- `Dialog.Popup` takes a required `title` and an optional `description`. They head the panel as an `h2` and muted text, and name and describe the dialog for screen readers. Keep the title short: a noun phrase ("Rename project") or the question asked.
|
|
24
|
+
- The `description` renders inside a Text `p`, so a Text in it is an inline run whatever its `display`. For a long description that scrolls in its own box (a message being replied to), pass a `Box as="span" display="block" overflow="auto" tabIndex={0}` with the text in a `Body as="span"` inside it, as Text's docs say; cap its height with `maxBlockSize`, by the viewport too (`min(12lh, 30svh)`), so the body stays in view at 200% text on a phone. No app CSS sets its `display`.
|
|
24
25
|
- `size` (`sm`, `med`, `lg`; `med` by default) sets the width, 384, 512 or 640 px at the default font size; the panel never gets wider than the viewport less a 16 px edge.
|
|
25
26
|
- Put the content in `Dialog.Body`. When the dialog outgrows the viewport the whole popup scrolls; keep the content short so the actions stay close.
|
|
26
27
|
- `Dialog.Actions` end-aligns its buttons and wraps them on a narrow screen. Put `Dialog.Close` first, then one primary `Button`. A dialog with no buttons still closes on Esc and the backdrop, but give it a `Dialog.Close` so a pointer user sees the way out.
|
package/dist/docs/Markdown.md
CHANGED
|
@@ -18,7 +18,8 @@ A markdown string, trusted or not, rendered as accessible prose in the library's
|
|
|
18
18
|
|
|
19
19
|
- `children` is the markdown source, a string.
|
|
20
20
|
- The root is a `div` that stacks the blocks with a `16` gap. It takes the style props, `className`, `style` and the `div`'s other props; consumer values win.
|
|
21
|
-
- `headingLevel` (default `1`) is the level `#` renders at: `headingLevel={3}` makes `#` an `h3` and `##` an `h4`, capped at `h6`. Set it to one below the heading the content sits under, so the page outline stays correct. Sizes stay at body scale or just above
|
|
21
|
+
- `headingLevel` (default `1`) is the level `#` renders at: `headingLevel={3}` makes `#` an `h3` and `##` an `h4`, capped at `h6`. Set it to one below the heading the content sits under, so the page outline stays correct. Sizes stay at body scale or just above, whatever the level: `#` is one step above `size`, the rest at it.
|
|
22
|
+
- `size` (`sm`, `med` or `lg`, default `med`) is `Body`'s `size` for paragraphs and the text of tight and loose list items. `#` is `med`, `lg` or `xl` with it, and `##` to `######` match it. Code and tables stay `sm`. Use `size` for small prose; never remap a font-size token to shrink it.
|
|
22
23
|
- A fenced block is a `Code block`, named "Code, ts" when the fence names `ts`, and "Code" when it names no language. A table is a `Table` in a `Table.ScrollArea`, both named "Table", or "Table 1", "Table 2" and so on when the document has more than one.
|
|
23
24
|
- Lists keep their markers; a task list item shows a disabled checkbox inside a `label` with the task's text, in place of its marker.
|
|
24
25
|
- `components` takes react-markdown's `components` shape and is shallow-merged over the library's element map: a key the library maps (`a`, `pre`, `p`, `h1`…) is replaced, and a key it does not map is added. Each component gets the element's props plus `node`, the element's syntax tree (hast); strip `node` before spreading props onto a DOM element.
|
|
@@ -29,6 +30,7 @@ A markdown string, trusted or not, rendered as accessible prose in the library's
|
|
|
29
30
|
- Raw HTML in the source (`<script>`, `<b>`, `<img onerror>`) renders as escaped text. There is no `rehype-raw` and no `dangerouslySetInnerHTML`.
|
|
30
31
|
- Link and image URLs keep react-markdown's default `urlTransform`: only `http`, `https`, `irc`, `ircs`, `mailto`, `xmpp` and relative URLs survive. A `javascript:` or `data:` link renders as plain text.
|
|
31
32
|
- An absolute `http` or `https` link opens in a new tab with `rel="noopener noreferrer"`. A relative link stays in the tab.
|
|
33
|
+
- `linkPolicy` (default `all`) picks which links stay links. With `absolute`, only a URL with a scheme (`https:`, `mailto:`), a protocol-relative `//` one or a `#` fragment (footnotes included) is a link; a relative one (`src/file.ts`, `/docs`, `?q=1`) renders as plain text, with no `a` and no tab stop. Set it where the document's relative links have no route, such as a reply that names repo files. To route them instead, override `components.a`.
|
|
32
34
|
- Images are dropped: `` renders nothing and the browser makes no request. An app opts in with `components.img`, which then decides how, and from where, an image loads.
|
|
33
35
|
|
|
34
36
|
## Do
|
|
@@ -37,6 +39,13 @@ A markdown string, trusted or not, rendered as accessible prose in the library's
|
|
|
37
39
|
<Markdown headingLevel={3}>{reply}</Markdown>
|
|
38
40
|
```
|
|
39
41
|
|
|
42
|
+
```tsx
|
|
43
|
+
// Small prose whose relative links point at repo files, not app routes.
|
|
44
|
+
<Markdown linkPolicy="absolute" size="sm">
|
|
45
|
+
{reply}
|
|
46
|
+
</Markdown>
|
|
47
|
+
```
|
|
48
|
+
|
|
40
49
|
```tsx
|
|
41
50
|
// Route links through the app's router, and allow images from the app's own host.
|
|
42
51
|
<Markdown
|
|
@@ -52,6 +61,14 @@ A markdown string, trusted or not, rendered as accessible prose in the library's
|
|
|
52
61
|
|
|
53
62
|
## Don't
|
|
54
63
|
|
|
64
|
+
```tsx
|
|
65
|
+
// Remaps a token to shrink the text, and cancels clicks on links that go nowhere: use
|
|
66
|
+
// `size="sm"` and `linkPolicy="absolute"`.
|
|
67
|
+
<Markdown className={smallText} onClick={stayInApp}>
|
|
68
|
+
{reply}
|
|
69
|
+
</Markdown>
|
|
70
|
+
```
|
|
71
|
+
|
|
55
72
|
```tsx
|
|
56
73
|
// Markdown is for a markdown string, not for text the app writes.
|
|
57
74
|
<Markdown>{"Saved"}</Markdown>
|
|
@@ -65,6 +82,7 @@ A markdown string, trusted or not, rendered as accessible prose in the library's
|
|
|
65
82
|
## Accessibility
|
|
66
83
|
|
|
67
84
|
- Headings follow `headingLevel`, so embedded content continues the page's outline instead of restarting it at `h1`.
|
|
85
|
+
- A link that opens a new tab ends with a visually hidden " (opens in a new tab)", so its accessible name says so; there is no icon.
|
|
68
86
|
- Links keep the browser's underline, so they are never color alone, and take the shared focus ring. Under forced colors they are `LinkText`.
|
|
69
87
|
- A code block or table that overflows scrolls in its own named region, which the keyboard reaches; the page never scrolls sideways.
|
|
70
88
|
- A task's checkbox is disabled and named by the task's text; it reports its state, never takes input.
|
|
@@ -82,5 +100,7 @@ Generated from the TypeScript types.
|
|
|
82
100
|
| `children` | `string` | yes | The markdown source. Raw HTML in it renders as text. |
|
|
83
101
|
| `components` | `MarkdownComponents` | no | Shallow-merged over the library's element map: replaces an element it maps (`a`, `pre`) and adds one it does not (`img`, which renders only through this). |
|
|
84
102
|
| `headingLevel` | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | no | The level `#` renders at; each `#` more is a level deeper, capped at 6. |
|
|
103
|
+
| `linkPolicy` | `"absolute" \| "all"` | no | Which links stay links: `all` (the default), or `absolute`, where a relative URL renders as plain text and only a URL with a scheme, a `//` one or a `#` fragment links. |
|
|
104
|
+
| `size` | `"lg" \| "med" \| "sm"` | no | The size of paragraphs and list item text, as `Body`'s `size`; headings step from it. |
|
|
85
105
|
|
|
86
106
|
Also accepts the style props (see `manifest.json` `styleProps`).
|
package/dist/docs/Text.md
CHANGED
|
@@ -23,6 +23,7 @@ The base of all visible text, and the primitive every text component builds on.
|
|
|
23
23
|
- `as` defaults to `p`, so a run inside a paragraph must set an inline element: `as="span"`, `"strong"`, `"em"`, `"time"`; code is `Code`, not `as="code"`. A `p` inside a `p` is invalid HTML and breaks hydration.
|
|
24
24
|
- A run inherits the outer weight, so `<Text as="strong">` is not bold until it sets `weight="bold"` (or `semibold`).
|
|
25
25
|
- A run is inline whatever its `display` prop, and `truncate` gives it no ellipsis; truncate a block Text instead.
|
|
26
|
+
- For a block inside a Text, such as a box that scrolls a long message in a dialog's `description`, put a `Box as="span" display="block"` there and the text in a Text inside it (in an app, `Body`): `<Box as="span" display="block" overflow="auto" tabIndex={0}><Body as="span" wrap="pre-wrap">…</Body></Box>`. The Box is its own formatting context, so the outer Text's box is exactly the Box's on both trim paths, and the inner Text trims itself; no app CSS or style-prop exception. Make the Box the outer Text's only child. `tabIndex={0}` lets a keyboard scroll it. Its cap (`maxBlockSize`, by the viewport too, such as `min(12lh, 30svh)`) and focus ring are the app's.
|
|
26
27
|
- Do not set `display="flex"` or `"grid"`: natively the box is not trimmed, and on the fallback the trim pseudo-elements become flex or grid items that `gap` spaces. Wrap the text in a `Stack` or `Inline` for layout instead. A block element (`p`, `div`, `h2`) or a Text inside a `Box` inside a Text keeps its own trimmed box.
|
|
27
28
|
- `size` takes a `fontSize` step: `xs`, `sm`, `med`, `lg`, `xl`, `2xl`, `3xl`, `4xl`. The top-level default is `med`.
|
|
28
29
|
- `font` takes a font role: `body` (default), `heading`, `display`, `label`, `mono`. The brand maps roles to fonts.
|
|
@@ -66,6 +67,20 @@ function Eyebrow({ children }: { children: ReactNode }) {
|
|
|
66
67
|
}
|
|
67
68
|
```
|
|
68
69
|
|
|
70
|
+
```tsx
|
|
71
|
+
// A block scroller inside a Text (here a dialog's description): a Box, not a run, so it is a block.
|
|
72
|
+
<Dialog.Popup
|
|
73
|
+
title="Reply"
|
|
74
|
+
description={
|
|
75
|
+
<Box as="span" className={styles.message} display="block" overflow="auto" tabIndex={0}>
|
|
76
|
+
<Body as="span" wrap="pre-wrap">
|
|
77
|
+
{lastMessage}
|
|
78
|
+
</Body>
|
|
79
|
+
</Box>
|
|
80
|
+
}
|
|
81
|
+
/>
|
|
82
|
+
```
|
|
83
|
+
|
|
69
84
|
```tsx
|
|
70
85
|
<Text as="pre" size="sm" wrap="pre-wrap">
|
|
71
86
|
{commitMessage}
|
|
@@ -84,6 +99,19 @@ function Eyebrow({ children }: { children: ReactNode }) {
|
|
|
84
99
|
|
|
85
100
|
## Don't
|
|
86
101
|
|
|
102
|
+
```tsx
|
|
103
|
+
// A run's `display` loses to the run rule: this stays inline, and a class that forces it needs a
|
|
104
|
+
// style-prop exception. Wrap the text in a `Box as="span" display="block"` instead.
|
|
105
|
+
<Dialog.Popup
|
|
106
|
+
title="Reply"
|
|
107
|
+
description={
|
|
108
|
+
<Body as="span" display="block" overflow="auto">
|
|
109
|
+
{lastMessage}
|
|
110
|
+
</Body>
|
|
111
|
+
}
|
|
112
|
+
/>
|
|
113
|
+
```
|
|
114
|
+
|
|
87
115
|
```tsx
|
|
88
116
|
// Raw colors and `md` do not type-check.
|
|
89
117
|
<Text color="#666" size="md" />
|
package/dist/docs/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./manifest.schema.json",
|
|
3
3
|
"package": "@jonmilner/ui",
|
|
4
|
-
"version": "0.25.
|
|
4
|
+
"version": "0.25.2",
|
|
5
5
|
"components": [
|
|
6
6
|
{
|
|
7
7
|
"name": "Alert",
|
|
@@ -1952,6 +1952,27 @@
|
|
|
1952
1952
|
6
|
|
1953
1953
|
],
|
|
1954
1954
|
"description": "The level `#` renders at; each `#` more is a level deeper, capped at 6."
|
|
1955
|
+
},
|
|
1956
|
+
{
|
|
1957
|
+
"name": "linkPolicy",
|
|
1958
|
+
"type": "\"absolute\" | \"all\"",
|
|
1959
|
+
"required": false,
|
|
1960
|
+
"values": [
|
|
1961
|
+
"absolute",
|
|
1962
|
+
"all"
|
|
1963
|
+
],
|
|
1964
|
+
"description": "Which links stay links: `all` (the default), or `absolute`, where a relative URL renders as\nplain text and only a URL with a scheme, a `//` one or a `#` fragment links."
|
|
1965
|
+
},
|
|
1966
|
+
{
|
|
1967
|
+
"name": "size",
|
|
1968
|
+
"type": "\"lg\" | \"med\" | \"sm\"",
|
|
1969
|
+
"required": false,
|
|
1970
|
+
"values": [
|
|
1971
|
+
"lg",
|
|
1972
|
+
"med",
|
|
1973
|
+
"sm"
|
|
1974
|
+
],
|
|
1975
|
+
"description": "The size of paragraphs and list item text, as `Body`'s `size`; headings step from it."
|
|
1955
1976
|
}
|
|
1956
1977
|
],
|
|
1957
1978
|
"parts": [],
|
package/dist/index.d.mts
CHANGED
|
@@ -26,7 +26,7 @@ import { IconButton, IconButtonProps } from "./IconButton/index.mjs";
|
|
|
26
26
|
import { Inline, InlineProps } from "./Inline/index.mjs";
|
|
27
27
|
import { Label, LabelProps, LabelSize } from "./Label/index.mjs";
|
|
28
28
|
import { Link, LinkProps } from "./Link/index.mjs";
|
|
29
|
-
import { Markdown, MarkdownComponents, MarkdownNode, MarkdownProps } from "./Markdown/index.mjs";
|
|
29
|
+
import { Markdown, MarkdownComponents, MarkdownLinkPolicy, MarkdownNode, MarkdownProps } from "./Markdown/index.mjs";
|
|
30
30
|
import { Menu, MenuGroupProps, MenuItemProps, MenuLinkItemProps, MenuPopupProps, MenuProps, MenuSeparatorProps, MenuSubmenuRootProps, MenuSubmenuTriggerProps } from "./Menu/index.mjs";
|
|
31
31
|
import { MultiSelect, MultiSelectOption, MultiSelectProps } from "./MultiSelect/index.mjs";
|
|
32
32
|
import { MenuTriggerProps } from "./Menu/client.mjs";
|
|
@@ -56,4 +56,4 @@ import { ThemeProvider, ThemeProviderProps } from "./theme/ThemeProvider.mjs";
|
|
|
56
56
|
import { Toast } from "./Toast/index.mjs";
|
|
57
57
|
import { Tooltip, TooltipProps, TooltipProviderProps } from "./Tooltip/index.mjs";
|
|
58
58
|
import { VisuallyHidden, VisuallyHiddenProps } from "./VisuallyHidden/index.mjs";
|
|
59
|
-
export { Alert, AlertDialog, type AlertDialogProps, type AlertDialogTriggerProps, type AlertProps, Avatar, type AvatarProps, Badge, type BadgeProps, Body, type BodyProps, type BodySize, Box, type BoxProps, Button, type ButtonProps, Caption, type CaptionProps, Checkbox, type CheckboxProps, Chip, ChipGroup, type ChipGroupProps, type ChipProps, Clickable, ClickableBox, type ClickableBoxProps, type ClickableBoxTargetProps, type ClickableProps, Code, type CodeBlockProps, type CodeInlineProps, type CodeProps, ColorField, type ColorFieldInputProps, type ColorFieldProps, Combobox, type ComboboxOption, type ComboboxProps, Dialog, type DialogActionsProps, type DialogBodyProps, type DialogCloseProps, type DialogPopupProps, type DialogProps, type DialogTriggerProps, Field, type FieldDescriptionProps, type FieldErrorProps, type FieldLabelProps, type FieldProps, Flex, type FlexProps, Heading, type HeadingLevel, type HeadingProps, type HeadingSize, Icon, IconButton, type IconButtonProps, type IconProps, Inline, type InlineProps, Label, type LabelProps, type LabelSize, Link, type LinkProps, Markdown, type MarkdownComponents, type MarkdownNode, type MarkdownProps, Menu, type MenuGroupProps, type MenuItemProps, type MenuLinkItemProps, type MenuPopupProps, type MenuProps, type MenuSeparatorProps, type MenuSubmenuRootProps, type MenuSubmenuTriggerProps, type MenuTriggerProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, NavList, type NavListGroupProps, type NavListItemOwnProps, type NavListItemProps, type NavListProps, NumberField, type NumberFieldInputProps, type NumberFieldProps, Popover, type PopoverCloseProps, type PopoverPopupProps, type PopoverProps, type PopoverTriggerProps, RadioGroup, type RadioGroupOption, type RadioGroupProps, Run, type RunProps, SearchField, type SearchFieldInputProps, type SearchFieldProps, Select, type SelectOption, type SelectProps, Sidebar, SidebarLayout, type SidebarLayoutHeaderProps, type SidebarLayoutMainProps, type SidebarLayoutProps, type SidebarLayoutSidebarProps, type SidebarProps, Stack, type StackProps, type StyleProps, Switch, type SwitchProps, Table, type TableBodyProps, type TableCellProps, type TableColumnGroupProps, type TableColumnProps, type TableFootProps, type TableHeadProps, type TableHeaderCellProps, type TableProps, type TableRowProps, type TableScrollAreaProps, type TableSortDirection, Tabs, type TabsListProps, type TabsPanelProps, type TabsProps, type TabsTabProps, Tag, type TagProps, Text, TextField, type TextFieldInputProps, type TextFieldProps, type TextProps, Textarea, type TextareaInputProps, type TextareaProps, type Theme, ThemeProvider, type ThemeProviderProps, Toast, type ToastOptions, type ToastProviderProps, type ToastVariant, Tooltip, type TooltipPopupProps, type TooltipProps, type TooltipProviderProps, type TooltipTriggerProps, VisuallyHidden, type VisuallyHiddenProps, defineTheme, useToast };
|
|
59
|
+
export { Alert, AlertDialog, type AlertDialogProps, type AlertDialogTriggerProps, type AlertProps, Avatar, type AvatarProps, Badge, type BadgeProps, Body, type BodyProps, type BodySize, Box, type BoxProps, Button, type ButtonProps, Caption, type CaptionProps, Checkbox, type CheckboxProps, Chip, ChipGroup, type ChipGroupProps, type ChipProps, Clickable, ClickableBox, type ClickableBoxProps, type ClickableBoxTargetProps, type ClickableProps, Code, type CodeBlockProps, type CodeInlineProps, type CodeProps, ColorField, type ColorFieldInputProps, type ColorFieldProps, Combobox, type ComboboxOption, type ComboboxProps, Dialog, type DialogActionsProps, type DialogBodyProps, type DialogCloseProps, type DialogPopupProps, type DialogProps, type DialogTriggerProps, Field, type FieldDescriptionProps, type FieldErrorProps, type FieldLabelProps, type FieldProps, Flex, type FlexProps, Heading, type HeadingLevel, type HeadingProps, type HeadingSize, Icon, IconButton, type IconButtonProps, type IconProps, Inline, type InlineProps, Label, type LabelProps, type LabelSize, Link, type LinkProps, Markdown, type MarkdownComponents, type MarkdownLinkPolicy, type MarkdownNode, type MarkdownProps, Menu, type MenuGroupProps, type MenuItemProps, type MenuLinkItemProps, type MenuPopupProps, type MenuProps, type MenuSeparatorProps, type MenuSubmenuRootProps, type MenuSubmenuTriggerProps, type MenuTriggerProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, NavList, type NavListGroupProps, type NavListItemOwnProps, type NavListItemProps, type NavListProps, NumberField, type NumberFieldInputProps, type NumberFieldProps, Popover, type PopoverCloseProps, type PopoverPopupProps, type PopoverProps, type PopoverTriggerProps, RadioGroup, type RadioGroupOption, type RadioGroupProps, Run, type RunProps, SearchField, type SearchFieldInputProps, type SearchFieldProps, Select, type SelectOption, type SelectProps, Sidebar, SidebarLayout, type SidebarLayoutHeaderProps, type SidebarLayoutMainProps, type SidebarLayoutProps, type SidebarLayoutSidebarProps, type SidebarProps, Stack, type StackProps, type StyleProps, Switch, type SwitchProps, Table, type TableBodyProps, type TableCellProps, type TableColumnGroupProps, type TableColumnProps, type TableFootProps, type TableHeadProps, type TableHeaderCellProps, type TableProps, type TableRowProps, type TableScrollAreaProps, type TableSortDirection, Tabs, type TabsListProps, type TabsPanelProps, type TabsProps, type TabsTabProps, Tag, type TagProps, Text, TextField, type TextFieldInputProps, type TextFieldProps, type TextProps, Textarea, type TextareaInputProps, type TextareaProps, type Theme, ThemeProvider, type ThemeProviderProps, Toast, type ToastOptions, type ToastProviderProps, type ToastVariant, Tooltip, type TooltipPopupProps, type TooltipProps, type TooltipProviderProps, type TooltipTriggerProps, VisuallyHidden, type VisuallyHiddenProps, defineTheme, useToast };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jonmilner/ui",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.2",
|
|
4
4
|
"bin": {
|
|
5
5
|
"ui-doctor": "./dist/cli/ui-doctor.mjs"
|
|
6
6
|
},
|
|
@@ -247,8 +247,8 @@
|
|
|
247
247
|
"@vanilla-extract/css": "1.21.3",
|
|
248
248
|
"@vanilla-extract/vite-plugin": "5.2.6",
|
|
249
249
|
"ajv": "8.20.0",
|
|
250
|
-
"lucide-static": "1.
|
|
251
|
-
"playwright": "1.65.
|
|
250
|
+
"lucide-static": "1.73.0",
|
|
251
|
+
"playwright": "1.65.1",
|
|
252
252
|
"publint": "0.3.25",
|
|
253
253
|
"react": "19.3.1",
|
|
254
254
|
"react-dom": "19.3.1",
|