@tachui/primitives 0.8.0-alpha → 0.8.5-alpha
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/{BasicInput-CWFHw9rL.js → BasicInput-BHfrSdoi.js} +46 -33
- package/dist/{Picker-DrZ7ibdt.js → Picker-DKphYduj.js} +243 -244
- package/dist/ScrollView-CBqSqatM.js +704 -0
- package/dist/Text-D0CYYD-Q.js +170 -0
- package/dist/controls/Button.d.ts +19 -28
- package/dist/controls/Button.d.ts.map +1 -1
- package/dist/controls/index.js +1 -1
- package/dist/display/HTML.d.ts +13 -13
- package/dist/display/Image.d.ts +8 -8
- package/dist/display/Image.d.ts.map +1 -1
- package/dist/display/ScrollView.d.ts +216 -0
- package/dist/display/ScrollView.d.ts.map +1 -0
- package/dist/display/Text.d.ts +37 -44
- package/dist/display/Text.d.ts.map +1 -1
- package/dist/display/index.d.ts +1 -0
- package/dist/display/index.d.ts.map +1 -1
- package/dist/display/index.js +20 -17
- package/dist/forms/BasicForm.d.ts +5 -1
- package/dist/forms/BasicForm.d.ts.map +1 -1
- package/dist/forms/index.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +66 -59
- package/dist/layout/Divider.d.ts +9 -3
- package/dist/layout/Divider.d.ts.map +1 -1
- package/dist/layout/Spacer.d.ts +8 -2
- package/dist/layout/Spacer.d.ts.map +1 -1
- package/dist/layout/Stack.d.ts +19 -69
- package/dist/layout/Stack.d.ts.map +1 -1
- package/dist/layout/index.js +267 -13
- package/dist/version.d.ts +14 -0
- package/dist/version.d.ts.map +1 -0
- package/package.json +6 -4
- package/dist/Divider-DWgDKavU.js +0 -474
- package/dist/HTML-aWcvQ0VC.js +0 -321
- package/dist/Text-DYyFBJ6i.js +0 -165
package/dist/HTML-aWcvQ0VC.js
DELETED
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
import { withModifiers as a, ComponentWithCSSClasses as b, processElementOverride as w, createSignal as y, useLifecycle as C, ImageAsset as v, registerComponentWithLifecycleHooks as T, h as p, createEffect as E, ConcatenatedComponent as g, text as R } from "@tachui/core";
|
|
2
|
-
import { aspectRatio as S } from "@tachui/modifiers";
|
|
3
|
-
var I = Object.defineProperty, P = (t, e, i) => e in t ? I(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, c = (t, e, i) => P(t, typeof e != "symbol" ? e + "" : e, i);
|
|
4
|
-
class m extends b {
|
|
5
|
-
constructor(e) {
|
|
6
|
-
super(), this.props = e, c(this, "type", "component"), c(this, "id"), c(this, "mounted", !1), c(this, "cleanup", []), c(this, "effectiveTag"), c(this, "validationResult"), c(this, "loadingStateSignal"), c(this, "setLoadingState"), this.id = `image-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
7
|
-
const i = w("Image", "img", this.props.element);
|
|
8
|
-
this.effectiveTag = i.tag, this.validationResult = i.validation;
|
|
9
|
-
const o = this.props.src ? "idle" : "error", [n, r] = y(o);
|
|
10
|
-
this.loadingStateSignal = n, this.setLoadingState = r, C(this, {
|
|
11
|
-
onDOMReady: (s, f) => {
|
|
12
|
-
this.props.src instanceof v && f instanceof HTMLImageElement && this.setupImageAssetReactivityForDOMElement(
|
|
13
|
-
this.props.src,
|
|
14
|
-
f
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
}), T(this);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Set loading state and notify callback
|
|
21
|
-
*/
|
|
22
|
-
setLoadingStateWithCallback(e) {
|
|
23
|
-
this.setLoadingState(e), this.props.onLoadingStateChange && this.props.onLoadingStateChange(e);
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Render the image component with reactive content handling
|
|
27
|
-
*/
|
|
28
|
-
render() {
|
|
29
|
-
const e = this.loadingStateSignal();
|
|
30
|
-
if (e === "loading" && this.props.placeholder) {
|
|
31
|
-
if (typeof this.props.placeholder == "string")
|
|
32
|
-
return [p("img", {
|
|
33
|
-
class: "tachui-image-placeholder",
|
|
34
|
-
src: this.props.placeholder,
|
|
35
|
-
alt: "Loading..."
|
|
36
|
-
})];
|
|
37
|
-
if (this.props.placeholder && typeof this.props.placeholder == "object")
|
|
38
|
-
return this.props.placeholder.render();
|
|
39
|
-
}
|
|
40
|
-
if (e === "error" && this.props.errorPlaceholder) {
|
|
41
|
-
if (typeof this.props.errorPlaceholder == "string")
|
|
42
|
-
return [p("img", {
|
|
43
|
-
class: "tachui-image-error",
|
|
44
|
-
src: this.props.errorPlaceholder,
|
|
45
|
-
alt: "Error loading image"
|
|
46
|
-
})];
|
|
47
|
-
if (this.props.errorPlaceholder && typeof this.props.errorPlaceholder == "object")
|
|
48
|
-
return this.props.errorPlaceholder.render();
|
|
49
|
-
}
|
|
50
|
-
const i = this.props.src instanceof v ? this.props.src.resolve() : this.props.src, o = ["tachui-image"], n = this.createClassString(this.props, o), r = p(this.effectiveTag, {
|
|
51
|
-
className: n,
|
|
52
|
-
src: i,
|
|
53
|
-
// Pass resolved src for initial render
|
|
54
|
-
alt: this.props.alt,
|
|
55
|
-
// Pass reactive alt directly
|
|
56
|
-
loading: this.props.loadingStrategy || "lazy",
|
|
57
|
-
crossorigin: this.props.crossOrigin,
|
|
58
|
-
decoding: this.props.decoding || "async",
|
|
59
|
-
fetchpriority: this.props.fetchPriority
|
|
60
|
-
});
|
|
61
|
-
return r.componentMetadata = {
|
|
62
|
-
id: this.id,
|
|
63
|
-
type: "Image",
|
|
64
|
-
originalType: "Image",
|
|
65
|
-
overriddenTo: this.effectiveTag !== "img" ? this.effectiveTag : void 0,
|
|
66
|
-
validationResult: this.validationResult
|
|
67
|
-
}, [r];
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Set up ImageAsset reactivity for a real DOM element (called from onDOMReady)
|
|
71
|
-
*/
|
|
72
|
-
setupImageAssetReactivityForDOMElement(e, i) {
|
|
73
|
-
const o = E(() => {
|
|
74
|
-
const n = e.resolve();
|
|
75
|
-
i.src = n, this.setLoadingStateWithCallback("loading");
|
|
76
|
-
});
|
|
77
|
-
this.cleanup.push(() => o.dispose());
|
|
78
|
-
}
|
|
79
|
-
// ============================================================================
|
|
80
|
-
// Concatenation Support (Phase 3.1)
|
|
81
|
-
// ============================================================================
|
|
82
|
-
/**
|
|
83
|
-
* Concatenate this image with another concatenatable component
|
|
84
|
-
*/
|
|
85
|
-
concat(e) {
|
|
86
|
-
const i = this.toSegment(), o = e.toSegment(), n = {
|
|
87
|
-
totalSegments: e instanceof g ? e.segments.length + 1 : 2,
|
|
88
|
-
accessibilityRole: e instanceof g ? this.mergeAccessibilityRoles(
|
|
89
|
-
"group",
|
|
90
|
-
e.metadata.accessibilityRole
|
|
91
|
-
) : this.determineAccessibilityRole(e),
|
|
92
|
-
semanticStructure: "inline"
|
|
93
|
-
// Images are typically inline in concatenation
|
|
94
|
-
};
|
|
95
|
-
return new g([i, o], n);
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Convert this image to a segment for concatenation
|
|
99
|
-
*/
|
|
100
|
-
toSegment() {
|
|
101
|
-
return {
|
|
102
|
-
id: this.id,
|
|
103
|
-
component: this,
|
|
104
|
-
modifiers: [],
|
|
105
|
-
// Images don't typically have concatenation-specific modifiers
|
|
106
|
-
render: () => {
|
|
107
|
-
const e = this.render();
|
|
108
|
-
return Array.isArray(e) ? e[0] : e;
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Check if this component supports concatenation
|
|
114
|
-
*/
|
|
115
|
-
isConcatenatable() {
|
|
116
|
-
return !0;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Determine accessibility role for concatenation
|
|
120
|
-
*/
|
|
121
|
-
determineAccessibilityRole(e) {
|
|
122
|
-
switch (e.constructor.name) {
|
|
123
|
-
case "EnhancedText":
|
|
124
|
-
return "group";
|
|
125
|
-
// Image + Text = group
|
|
126
|
-
case "EnhancedImage":
|
|
127
|
-
return "group";
|
|
128
|
-
// Image + Image = group
|
|
129
|
-
case "EnhancedButton":
|
|
130
|
-
case "EnhancedLink":
|
|
131
|
-
return "composite";
|
|
132
|
-
// Image + Interactive = composite
|
|
133
|
-
default:
|
|
134
|
-
return "composite";
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Merge accessibility roles when combining components
|
|
139
|
-
*/
|
|
140
|
-
mergeAccessibilityRoles(e, i) {
|
|
141
|
-
return e === "composite" || i === "composite" ? "composite" : "group";
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
function u(t, e = {}) {
|
|
145
|
-
const i = { ...e, src: t }, o = new m(i), n = a(o);
|
|
146
|
-
return n.scaledToFit = function() {
|
|
147
|
-
const r = new m({
|
|
148
|
-
...i,
|
|
149
|
-
aspectRatio: void 0,
|
|
150
|
-
contentMode: "fit"
|
|
151
|
-
}), s = a(r);
|
|
152
|
-
return s.scaledToFit = n.scaledToFit, s.scaledToFill = n.scaledToFill, s.modifiers.push(S(void 0, "fit")), s;
|
|
153
|
-
}, n.scaledToFill = function() {
|
|
154
|
-
const r = new m({
|
|
155
|
-
...i,
|
|
156
|
-
aspectRatio: void 0,
|
|
157
|
-
contentMode: "fill"
|
|
158
|
-
}), s = a(r);
|
|
159
|
-
return s.scaledToFit = n.scaledToFit, s.scaledToFill = n.scaledToFill, s.modifiers.push(S(void 0, "fill")), s;
|
|
160
|
-
}, n;
|
|
161
|
-
}
|
|
162
|
-
const H = {
|
|
163
|
-
idle: "idle",
|
|
164
|
-
loading: "loading",
|
|
165
|
-
loaded: "loaded",
|
|
166
|
-
error: "error"
|
|
167
|
-
}, A = {
|
|
168
|
-
fit: "fit",
|
|
169
|
-
fill: "fill",
|
|
170
|
-
stretch: "stretch",
|
|
171
|
-
center: "center",
|
|
172
|
-
scaleDown: "scaleDown"
|
|
173
|
-
}, $ = {
|
|
174
|
-
/**
|
|
175
|
-
* Create a responsive image with multiple sources
|
|
176
|
-
*/
|
|
177
|
-
responsive(t, e, i = {}) {
|
|
178
|
-
const o = t.map((n) => {
|
|
179
|
-
const r = [n.src];
|
|
180
|
-
return n.width && r.push(`${n.width}w`), r.join(" ");
|
|
181
|
-
}).join(", ");
|
|
182
|
-
return u(e, { ...i, srcSet: o });
|
|
183
|
-
},
|
|
184
|
-
/**
|
|
185
|
-
* Create an image with progressive loading
|
|
186
|
-
*/
|
|
187
|
-
progressive(t, e, i = {}) {
|
|
188
|
-
return u(t, {
|
|
189
|
-
...i,
|
|
190
|
-
lowQualitySrc: t,
|
|
191
|
-
highQualitySrc: e
|
|
192
|
-
});
|
|
193
|
-
},
|
|
194
|
-
/**
|
|
195
|
-
* Create an image with loading placeholder
|
|
196
|
-
*/
|
|
197
|
-
withPlaceholder(t, e, i = {}) {
|
|
198
|
-
return u(t, {
|
|
199
|
-
...i,
|
|
200
|
-
placeholder: e
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
var F = Object.defineProperty, L = (t, e, i) => e in t ? F(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, h = (t, e, i) => L(t, typeof e != "symbol" ? e + "" : e, i);
|
|
205
|
-
class l {
|
|
206
|
-
constructor(e, i, o, n = {}) {
|
|
207
|
-
this.props = e, this.tag = i, this.content = o, this.attributes = n, h(this, "type", "component"), h(this, "id"), h(this, "mounted", !1), h(this, "cleanup", []), this.id = `element-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
208
|
-
}
|
|
209
|
-
render() {
|
|
210
|
-
return [
|
|
211
|
-
p(this.tag, this.attributes, this.content ? R(this.content) : "")
|
|
212
|
-
];
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
const d = {
|
|
216
|
-
/**
|
|
217
|
-
* Create a div element with modifier support
|
|
218
|
-
*/
|
|
219
|
-
div: (t = {}) => {
|
|
220
|
-
const e = new l(
|
|
221
|
-
t,
|
|
222
|
-
"div",
|
|
223
|
-
t.children ? String(t.children) : void 0
|
|
224
|
-
);
|
|
225
|
-
return a(e);
|
|
226
|
-
},
|
|
227
|
-
/**
|
|
228
|
-
* Create a span element with modifier support
|
|
229
|
-
*/
|
|
230
|
-
span: (t = {}) => {
|
|
231
|
-
const e = new l(
|
|
232
|
-
t,
|
|
233
|
-
"span",
|
|
234
|
-
t.children ? String(t.children) : void 0
|
|
235
|
-
);
|
|
236
|
-
return a(e);
|
|
237
|
-
},
|
|
238
|
-
/**
|
|
239
|
-
* Create a paragraph element with modifier support
|
|
240
|
-
*/
|
|
241
|
-
p: (t = {}) => {
|
|
242
|
-
const e = new l(
|
|
243
|
-
t,
|
|
244
|
-
"p",
|
|
245
|
-
t.children ? String(t.children) : void 0
|
|
246
|
-
);
|
|
247
|
-
return a(e);
|
|
248
|
-
},
|
|
249
|
-
/**
|
|
250
|
-
* Create a button element with modifier support
|
|
251
|
-
*
|
|
252
|
-
* Note: For enhanced button features (press states, variants, accessibility),
|
|
253
|
-
* use the main Button component instead.
|
|
254
|
-
*/
|
|
255
|
-
button: (t = {}) => {
|
|
256
|
-
const e = new l(
|
|
257
|
-
t,
|
|
258
|
-
"button",
|
|
259
|
-
t.children ? String(t.children) : void 0,
|
|
260
|
-
{
|
|
261
|
-
onclick: t.onClick
|
|
262
|
-
}
|
|
263
|
-
);
|
|
264
|
-
return process.env.NODE_ENV === "test" && (e.props || (e.props = {}), e.props.tabIndex = 0), a(e);
|
|
265
|
-
},
|
|
266
|
-
/**
|
|
267
|
-
* Create an input element with modifier support
|
|
268
|
-
*/
|
|
269
|
-
input: (t = {}) => {
|
|
270
|
-
const e = new l(t, "input", void 0, {
|
|
271
|
-
type: t.type || "text",
|
|
272
|
-
value: t.value || "",
|
|
273
|
-
placeholder: t.placeholder || "",
|
|
274
|
-
oninput: (i) => {
|
|
275
|
-
const o = i.target;
|
|
276
|
-
t.onChange?.(o.value);
|
|
277
|
-
}
|
|
278
|
-
});
|
|
279
|
-
return a(e);
|
|
280
|
-
},
|
|
281
|
-
/**
|
|
282
|
-
* Create an image element with modifier support
|
|
283
|
-
*
|
|
284
|
-
* Note: For enhanced image features (loading states, content modes, progressive loading),
|
|
285
|
-
* use the main Image component instead.
|
|
286
|
-
*/
|
|
287
|
-
img: (t) => {
|
|
288
|
-
const e = new l(t, "img", void 0, {
|
|
289
|
-
src: t.src,
|
|
290
|
-
alt: t.alt || "",
|
|
291
|
-
width: t.width,
|
|
292
|
-
height: t.height
|
|
293
|
-
});
|
|
294
|
-
return a(e);
|
|
295
|
-
},
|
|
296
|
-
/**
|
|
297
|
-
* Create a heading element with modifier support
|
|
298
|
-
*/
|
|
299
|
-
heading: (t) => (e = {}) => {
|
|
300
|
-
const i = new l(
|
|
301
|
-
e,
|
|
302
|
-
`h${t}`,
|
|
303
|
-
e.children ? String(e.children) : void 0
|
|
304
|
-
);
|
|
305
|
-
return a(i);
|
|
306
|
-
}
|
|
307
|
-
}, D = d.heading(1), O = d.heading(2), x = d.heading(3), N = d.heading(4), W = d.heading(5), j = d.heading(6);
|
|
308
|
-
export {
|
|
309
|
-
m as E,
|
|
310
|
-
d as H,
|
|
311
|
-
u as I,
|
|
312
|
-
H as a,
|
|
313
|
-
A as b,
|
|
314
|
-
$ as c,
|
|
315
|
-
D as d,
|
|
316
|
-
O as e,
|
|
317
|
-
x as f,
|
|
318
|
-
N as g,
|
|
319
|
-
W as h,
|
|
320
|
-
j as i
|
|
321
|
-
};
|
package/dist/Text-DYyFBJ6i.js
DELETED
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { ComponentWithCSSClasses as l, processElementOverride as c, h, text as f, createModifiableComponent as d, createModifierBuilder as u } from "@tachui/core";
|
|
2
|
-
var p = Object.defineProperty, g = (e, t, i) => t in e ? p(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, s = (e, t, i) => g(e, typeof t != "symbol" ? t + "" : t, i);
|
|
3
|
-
const a = {
|
|
4
|
-
largeTitle: { size: 34, weight: "400", lineHeight: 1.2 },
|
|
5
|
-
title: { size: 28, weight: "400", lineHeight: 1.3 },
|
|
6
|
-
title2: { size: 22, weight: "400", lineHeight: 1.3 },
|
|
7
|
-
title3: { size: 20, weight: "400", lineHeight: 1.4 },
|
|
8
|
-
headline: { size: 17, weight: "600", lineHeight: 1.4 },
|
|
9
|
-
body: { size: 17, weight: "400", lineHeight: 1.5 },
|
|
10
|
-
callout: { size: 16, weight: "400", lineHeight: 1.4 },
|
|
11
|
-
subheadline: { size: 15, weight: "400", lineHeight: 1.4 },
|
|
12
|
-
footnote: { size: 13, weight: "400", lineHeight: 1.3 },
|
|
13
|
-
caption: { size: 12, weight: "400", lineHeight: 1.2 },
|
|
14
|
-
caption2: { size: 11, weight: "400", lineHeight: 1.1 }
|
|
15
|
-
};
|
|
16
|
-
function b(e) {
|
|
17
|
-
const t = d(e), i = u(t), n = {
|
|
18
|
-
...t,
|
|
19
|
-
modifier: i,
|
|
20
|
-
modifierBuilder: i
|
|
21
|
-
};
|
|
22
|
-
return e && typeof e.concat == "function" && (n.concat = function(r) {
|
|
23
|
-
return e.concat(r);
|
|
24
|
-
}, n.toSegment = function() {
|
|
25
|
-
return e.toSegment();
|
|
26
|
-
}, n.isConcatenatable = function() {
|
|
27
|
-
return e.isConcatenatable();
|
|
28
|
-
}), n;
|
|
29
|
-
}
|
|
30
|
-
class m extends l {
|
|
31
|
-
constructor(t) {
|
|
32
|
-
super(), this.props = t, s(this, "type", "component"), s(this, "id"), s(this, "mounted", !1), s(this, "cleanup", []), s(this, "effectiveTag"), s(this, "validationResult"), this.id = `text-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
33
|
-
const i = c("Text", "span", this.props.element);
|
|
34
|
-
this.effectiveTag = i.tag, this.validationResult = i.validation;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Render the text component with reactive content handling, element override support, and CSS classes
|
|
38
|
-
*/
|
|
39
|
-
render() {
|
|
40
|
-
const t = ["tachui-text"], i = this.createClassString(this.props, t);
|
|
41
|
-
return [h(
|
|
42
|
-
this.effectiveTag,
|
|
43
|
-
{
|
|
44
|
-
className: i,
|
|
45
|
-
// Pass through debug label for debug system
|
|
46
|
-
...this.props.debugLabel && { debugLabel: this.props.debugLabel },
|
|
47
|
-
// Add component metadata for semantic role processing
|
|
48
|
-
componentMetadata: {
|
|
49
|
-
originalType: "Text",
|
|
50
|
-
overriddenTo: this.effectiveTag !== "span" ? this.effectiveTag : void 0,
|
|
51
|
-
validationResult: this.validationResult
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
f(this.props.content || "")
|
|
55
|
-
)];
|
|
56
|
-
}
|
|
57
|
-
// Concatenation support - simplified for now
|
|
58
|
-
concat(t) {
|
|
59
|
-
return this;
|
|
60
|
-
}
|
|
61
|
-
toSegment() {
|
|
62
|
-
return this;
|
|
63
|
-
}
|
|
64
|
-
isConcatenatable() {
|
|
65
|
-
return !0;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Cleanup resources
|
|
69
|
-
*/
|
|
70
|
-
dispose() {
|
|
71
|
-
this.cleanup.forEach((t) => {
|
|
72
|
-
try {
|
|
73
|
-
t();
|
|
74
|
-
} catch (i) {
|
|
75
|
-
console.error("Text component cleanup error:", i);
|
|
76
|
-
}
|
|
77
|
-
}), this.cleanup = [];
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
function o(e, t) {
|
|
81
|
-
const i = new m({ content: e, ...t });
|
|
82
|
-
return b(i);
|
|
83
|
-
}
|
|
84
|
-
const y = {
|
|
85
|
-
/**
|
|
86
|
-
* Create formatted text with multiple styling options
|
|
87
|
-
*/
|
|
88
|
-
formatted(e, t, i) {
|
|
89
|
-
const n = { ...i };
|
|
90
|
-
return t.bold && (n.font = { ...n.font, weight: "bold" }), t.italic && (n.font = { ...n.font, style: "italic" }), t.underline && (n.textDecoration = "underline"), t.strikethrough && (n.textDecoration = "line-through"), t.monospace && (n.font = { ...n.font, family: "monospace" }), t.smallCaps && (n.font = { ...n.font, variant: "small-caps" }), o(e, n);
|
|
91
|
-
},
|
|
92
|
-
/**
|
|
93
|
-
* Create bold text
|
|
94
|
-
*/
|
|
95
|
-
bold(e, t) {
|
|
96
|
-
return o(e, {
|
|
97
|
-
font: { weight: "bold" },
|
|
98
|
-
...t
|
|
99
|
-
});
|
|
100
|
-
},
|
|
101
|
-
/**
|
|
102
|
-
* Create italic text
|
|
103
|
-
*/
|
|
104
|
-
italic(e, t) {
|
|
105
|
-
return o(e, {
|
|
106
|
-
font: { style: "italic" },
|
|
107
|
-
...t
|
|
108
|
-
});
|
|
109
|
-
},
|
|
110
|
-
/**
|
|
111
|
-
* Create underlined text
|
|
112
|
-
*/
|
|
113
|
-
underline(e, t) {
|
|
114
|
-
return o(e, {
|
|
115
|
-
textDecoration: "underline",
|
|
116
|
-
...t
|
|
117
|
-
});
|
|
118
|
-
},
|
|
119
|
-
/**
|
|
120
|
-
* Create monospace text
|
|
121
|
-
*/
|
|
122
|
-
monospace(e, t) {
|
|
123
|
-
return o(e, {
|
|
124
|
-
font: { family: "monospace" },
|
|
125
|
-
...t
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
}, w = {
|
|
129
|
-
heading: (e = 1) => ({
|
|
130
|
-
font: a[e === 1 ? "largeTitle" : e === 2 ? "title" : e === 3 ? "title2" : e === 4 ? "title3" : e === 5 ? "headline" : "body"],
|
|
131
|
-
accessibilityRole: "heading",
|
|
132
|
-
accessibilityLevel: e
|
|
133
|
-
}),
|
|
134
|
-
body: () => ({
|
|
135
|
-
font: a.body,
|
|
136
|
-
accessibilityRole: "text"
|
|
137
|
-
}),
|
|
138
|
-
caption: () => ({
|
|
139
|
-
font: a.caption,
|
|
140
|
-
color: "#666666"
|
|
141
|
-
}),
|
|
142
|
-
footnote: () => ({
|
|
143
|
-
font: a.footnote,
|
|
144
|
-
color: "#888888"
|
|
145
|
-
}),
|
|
146
|
-
// Typography preset functions
|
|
147
|
-
LargeTitle: (e, t) => o(e, { font: a.largeTitle, ...t }),
|
|
148
|
-
Title: (e, t) => o(e, { font: a.title, ...t }),
|
|
149
|
-
Title2: (e, t) => o(e, { font: a.title2, ...t }),
|
|
150
|
-
Title3: (e, t) => o(e, { font: a.title3, ...t }),
|
|
151
|
-
Headline: (e, t) => o(e, { font: a.headline, ...t }),
|
|
152
|
-
Body: (e, t) => o(e, { font: a.body, ...t }),
|
|
153
|
-
Callout: (e, t) => o(e, { font: a.callout, ...t }),
|
|
154
|
-
Subheadline: (e, t) => o(e, { font: a.subheadline, ...t }),
|
|
155
|
-
Footnote: (e, t) => o(e, { font: a.footnote, ...t }),
|
|
156
|
-
Caption: (e, t) => o(e, { font: a.caption, ...t }),
|
|
157
|
-
Caption2: (e, t) => o(e, { font: a.caption2, ...t })
|
|
158
|
-
};
|
|
159
|
-
export {
|
|
160
|
-
m as E,
|
|
161
|
-
o as T,
|
|
162
|
-
y as a,
|
|
163
|
-
w as b,
|
|
164
|
-
a as c
|
|
165
|
-
};
|