@filipgutica/ui 1.11.2 → 1.13.0
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/README.md +44 -6
- package/dist/components/UiSwitch.vue.d.ts +25 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +187 -115
- package/dist/site.js +65 -62
- package/package.json +7 -3
- package/src/components.css +112 -34
- package/src/fonts/OFL-IBM-Plex-Mono.txt +93 -0
- package/src/fonts/OFL-IBM-Plex-Sans.txt +93 -0
- package/src/fonts/ibm-plex-mono-latin-400-normal.woff2 +0 -0
- package/src/fonts/ibm-plex-mono-latin-500-normal.woff2 +0 -0
- package/src/fonts/ibm-plex-mono-latin-600-normal.woff2 +0 -0
- package/src/fonts/ibm-plex-sans-latin-400-normal.woff2 +0 -0
- package/src/fonts/ibm-plex-sans-latin-500-normal.woff2 +0 -0
- package/src/fonts/ibm-plex-sans-latin-600-normal.woff2 +0 -0
- package/src/fonts.css +55 -0
- package/src/site.css +132 -50
- package/src/theme.css +118 -89
- package/src/themes/graphite-indigo.css +62 -44
package/dist/index.js
CHANGED
|
@@ -1,66 +1,67 @@
|
|
|
1
1
|
import { a as e, i as t, n, o as r, r as i, t as a } from "./use-active-section-DCS_wyYq.js";
|
|
2
|
-
import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, inject as h, mergeModels as g, mergeProps as _, normalizeStyle as v, openBlock as y, provide as b, ref as ee, renderList as x, renderSlot as S, resolveDynamicComponent as C, shallowRef as te, toDisplayString as w, unref as T,
|
|
3
|
-
import { CheckboxIndicator as
|
|
2
|
+
import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, inject as h, mergeModels as g, mergeProps as _, normalizeStyle as v, openBlock as y, provide as b, ref as ee, renderList as x, renderSlot as S, resolveDynamicComponent as C, shallowRef as te, toDisplayString as w, unref as T, useAttrs as E, useId as D, useModel as O, useSlots as k, watch as ne, withCtx as A } from "vue";
|
|
3
|
+
import { CheckboxIndicator as re, CheckboxRoot as j, Primitive as M, ProgressIndicator as N, ProgressRoot as P, RadioGroupItem as F, RadioGroupRoot as I, SliderRange as L, SliderRoot as R, SliderThumb as z, SliderTrack as B, Toggle as V } from "reka-ui";
|
|
4
4
|
//#region src/components/UiCard.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
5
|
+
var H = { class: "fg-card" }, U = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "fg-card__header"
|
|
8
|
-
},
|
|
8
|
+
}, W = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "fg-card__actions"
|
|
11
|
-
},
|
|
11
|
+
}, G = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "fg-card__body"
|
|
14
|
-
},
|
|
14
|
+
}, K = {
|
|
15
15
|
key: 2,
|
|
16
16
|
class: "fg-card__footer"
|
|
17
|
-
},
|
|
17
|
+
}, q = /* @__PURE__ */ m({
|
|
18
18
|
__name: "UiCard",
|
|
19
19
|
props: {
|
|
20
20
|
title: { default: () => void 0 },
|
|
21
21
|
titleTag: { default: "h3" }
|
|
22
22
|
},
|
|
23
23
|
setup(e) {
|
|
24
|
-
let t =
|
|
25
|
-
return (n, r) => (y(), u("div",
|
|
26
|
-
e.title || t.title || t.actions ? (y(), u("header",
|
|
24
|
+
let t = k();
|
|
25
|
+
return (n, r) => (y(), u("div", H, [
|
|
26
|
+
e.title || t.title || t.actions ? (y(), u("header", U, [e.title || t.title ? (y(), c(C(e.titleTag), {
|
|
27
27
|
key: 0,
|
|
28
28
|
class: "fg-card__title"
|
|
29
29
|
}, {
|
|
30
|
-
default:
|
|
30
|
+
default: A(() => [S(n.$slots, "title", {}, () => [f(w(e.title), 1)])]),
|
|
31
31
|
_: 3
|
|
32
|
-
})) : l("", !0), t.actions ? (y(), u("div",
|
|
33
|
-
t.default ? (y(), u("div",
|
|
34
|
-
t.footer ? (y(), u("footer",
|
|
32
|
+
})) : l("", !0), t.actions ? (y(), u("div", W, [S(n.$slots, "actions")])) : l("", !0)])) : l("", !0),
|
|
33
|
+
t.default ? (y(), u("div", G, [S(n.$slots, "default")])) : l("", !0),
|
|
34
|
+
t.footer ? (y(), u("footer", K, [S(n.$slots, "footer")])) : l("", !0)
|
|
35
35
|
]));
|
|
36
36
|
}
|
|
37
|
-
}),
|
|
37
|
+
}), J = [
|
|
38
|
+
"data-command",
|
|
38
39
|
"data-wrap",
|
|
39
40
|
"data-line-numbers",
|
|
40
41
|
"data-variant"
|
|
41
|
-
],
|
|
42
|
+
], Y = {
|
|
42
43
|
key: 0,
|
|
43
44
|
class: "fg-code-block__header"
|
|
44
|
-
},
|
|
45
|
+
}, X = {
|
|
45
46
|
key: 0,
|
|
46
47
|
class: "fg-code-block__title"
|
|
47
|
-
},
|
|
48
|
+
}, ie = {
|
|
48
49
|
key: 1,
|
|
49
50
|
class: "fg-code-block__language"
|
|
50
|
-
},
|
|
51
|
+
}, ae = { class: "fg-code-block__actions" }, oe = ["disabled", "title"], se = {
|
|
51
52
|
viewBox: "0 0 24 24",
|
|
52
53
|
fill: "none",
|
|
53
54
|
stroke: "currentColor",
|
|
54
55
|
"stroke-width": "1.5",
|
|
55
56
|
"aria-hidden": "true"
|
|
56
|
-
},
|
|
57
|
+
}, ce = {
|
|
57
58
|
key: 0,
|
|
58
59
|
d: "m5 12 4 4L19 6"
|
|
59
|
-
},
|
|
60
|
+
}, le = { key: 0 }, ue = ["aria-label"], de = {
|
|
60
61
|
key: 0,
|
|
61
62
|
class: "fg-code-block__number",
|
|
62
63
|
"aria-hidden": "true"
|
|
63
|
-
},
|
|
64
|
+
}, fe = { class: "fg-code-block__text" }, pe = ["data-state"], me = /* @__PURE__ */ m({
|
|
64
65
|
__name: "UiCodeBlock",
|
|
65
66
|
props: {
|
|
66
67
|
code: {},
|
|
@@ -81,7 +82,14 @@ var V = { class: "fg-card" }, H = {
|
|
|
81
82
|
variant: { default: "default" }
|
|
82
83
|
},
|
|
83
84
|
setup(t) {
|
|
84
|
-
let n =
|
|
85
|
+
let n = s(() => {
|
|
86
|
+
let e = t.language.trim().toLowerCase(), n = [
|
|
87
|
+
"bash",
|
|
88
|
+
"sh",
|
|
89
|
+
"shell"
|
|
90
|
+
].includes(e);
|
|
91
|
+
return t.variant === "compact" ? n || e === "text" : n && !t.title;
|
|
92
|
+
}), r = te(), i = ee(""), a = s(() => r.value ?? t.code.split("\n").map((e) => [{ content: e }])), c = {
|
|
85
93
|
vue: "vue",
|
|
86
94
|
ts: "typescript",
|
|
87
95
|
typescript: "typescript",
|
|
@@ -94,104 +102,105 @@ var V = { class: "fg-card" }, H = {
|
|
|
94
102
|
sh: "bash",
|
|
95
103
|
shell: "bash"
|
|
96
104
|
};
|
|
97
|
-
|
|
98
|
-
let
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}),
|
|
102
|
-
let
|
|
105
|
+
ne(() => [t.code, t.language], async ([e, t], n, a) => {
|
|
106
|
+
let o = !1;
|
|
107
|
+
a(() => {
|
|
108
|
+
o = !0;
|
|
109
|
+
}), r.value = void 0, i.value = "";
|
|
110
|
+
let s = t.trim().toLowerCase(), l = Object.hasOwn(c, s) ? c[s] : void 0;
|
|
103
111
|
if (l) try {
|
|
104
112
|
let { highlightCode: t } = await import("./code-highlight-BuTmXL3w.js");
|
|
105
|
-
if (
|
|
106
|
-
let
|
|
113
|
+
if (o) return;
|
|
114
|
+
let n = await t({
|
|
107
115
|
code: e,
|
|
108
116
|
language: l
|
|
109
117
|
});
|
|
110
|
-
if (
|
|
118
|
+
if (o) return;
|
|
111
119
|
let i = e.split("\n");
|
|
112
|
-
|
|
113
|
-
let
|
|
114
|
-
return e.endsWith("\r") ? [...
|
|
120
|
+
r.value = i.map((e, t) => {
|
|
121
|
+
let r = n[t] ?? [];
|
|
122
|
+
return e.endsWith("\r") ? [...r, { content: "\r" }] : r;
|
|
115
123
|
});
|
|
116
124
|
} catch {
|
|
117
|
-
|
|
125
|
+
o || (i.value = "Syntax highlighting unavailable. Showing plain text.");
|
|
118
126
|
}
|
|
119
127
|
}, { immediate: !0 });
|
|
120
|
-
let { copied:
|
|
128
|
+
let { copied: p, pending: m, error: h, copy: g } = e({
|
|
121
129
|
unavailableMessage: "Clipboard unavailable. Select the code to copy it.",
|
|
122
130
|
failureMessage: "Could not copy. Select the code to copy it."
|
|
123
|
-
}),
|
|
124
|
-
return (e,
|
|
131
|
+
}), _ = s(() => p.value && !h.value), b = s(() => t.variant === "compact" && _.value && !i.value), C = s(() => h.value ? h.value : t.variant === "compact" && i.value ? p.value ? `Code copied to clipboard. ${i.value}` : i.value : p.value ? "Code copied to clipboard." : i.value), E = () => g(t.code);
|
|
132
|
+
return (e, r) => (y(), u("div", {
|
|
125
133
|
class: "fg-code-block",
|
|
134
|
+
"data-command": n.value || void 0,
|
|
126
135
|
"data-wrap": t.wrap,
|
|
127
136
|
"data-line-numbers": t.lineNumbers,
|
|
128
137
|
"data-variant": t.variant
|
|
129
138
|
}, [
|
|
130
|
-
t.variant === "default" || t.copyable || e.$slots.actions ? (y(), u("div",
|
|
131
|
-
t.variant === "default" ? (y(), u("span",
|
|
132
|
-
t.title && t.variant === "default" ? (y(), u("span",
|
|
133
|
-
d("div",
|
|
139
|
+
t.variant === "default" || t.copyable || e.$slots.actions ? (y(), u("div", Y, [
|
|
140
|
+
t.variant === "default" ? (y(), u("span", X, w(t.title || t.language), 1)) : l("", !0),
|
|
141
|
+
t.title && t.variant === "default" ? (y(), u("span", ie, w(t.language), 1)) : l("", !0),
|
|
142
|
+
d("div", ae, [S(e.$slots, "actions"), t.copyable ? (y(), u("button", {
|
|
134
143
|
key: 0,
|
|
135
144
|
type: "button",
|
|
136
145
|
class: "fg-code-block__copy",
|
|
137
|
-
disabled: T(
|
|
146
|
+
disabled: T(m),
|
|
138
147
|
"aria-label": "Copy code",
|
|
139
|
-
title: t.variant === "compact" ?
|
|
140
|
-
onClick:
|
|
141
|
-
}, [(y(), u("svg",
|
|
148
|
+
title: t.variant === "compact" ? _.value ? "Copied" : "Copy code" : void 0,
|
|
149
|
+
onClick: E
|
|
150
|
+
}, [(y(), u("svg", se, [t.variant === "compact" && _.value ? (y(), u("path", ce)) : (y(), u(o, { key: 1 }, [r[0] ||= d("rect", {
|
|
142
151
|
x: "8",
|
|
143
152
|
y: "8",
|
|
144
153
|
width: "12",
|
|
145
154
|
height: "13",
|
|
146
155
|
rx: "2"
|
|
147
|
-
}, null, -1),
|
|
156
|
+
}, null, -1), r[1] ||= d("path", { d: "M16 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h3" }, null, -1)], 64))])), t.variant === "default" ? (y(), u("span", le, w(_.value ? "Copied" : "Copy"), 1)) : l("", !0)], 8, oe)) : l("", !0)])
|
|
148
157
|
])) : l("", !0),
|
|
149
158
|
d("pre", {
|
|
150
159
|
class: "fg-code-block__pre",
|
|
151
160
|
tabindex: "0",
|
|
152
161
|
"aria-label": t.title || `${t.language} code`
|
|
153
|
-
}, [d("code", null, [(y(!0), u(o, null, x(
|
|
162
|
+
}, [d("code", null, [(y(!0), u(o, null, x(a.value, (e, n) => (y(), u("span", {
|
|
154
163
|
key: n,
|
|
155
164
|
class: "fg-code-block__line"
|
|
156
|
-
}, [t.lineNumbers ? (y(), u("span",
|
|
165
|
+
}, [t.lineNumbers ? (y(), u("span", de, w(n + 1), 1)) : l("", !0), d("span", fe, [(y(!0), u(o, null, x(e, (e, t) => (y(), u("span", {
|
|
157
166
|
key: t,
|
|
158
167
|
style: v({ color: e.color })
|
|
159
|
-
}, w(e.content), 5))), 128)), f(w(n <
|
|
168
|
+
}, w(e.content), 5))), 128)), f(w(n < a.value.length - 1 ? "\n" : ""), 1)])]))), 128))])], 8, ue),
|
|
160
169
|
d("span", {
|
|
161
170
|
class: "fg-code-block__status",
|
|
162
171
|
role: "status",
|
|
163
|
-
"data-state":
|
|
164
|
-
}, w(
|
|
165
|
-
], 8,
|
|
172
|
+
"data-state": b.value ? "success" : void 0
|
|
173
|
+
}, w(C.value), 9, pe)
|
|
174
|
+
], 8, J));
|
|
166
175
|
}
|
|
167
|
-
}),
|
|
176
|
+
}), he = /* @__PURE__ */ m({
|
|
168
177
|
__name: "UiAlert",
|
|
169
178
|
props: { tone: { default: "neutral" } },
|
|
170
179
|
setup(e) {
|
|
171
|
-
return (t, n) => (y(), c(T(
|
|
180
|
+
return (t, n) => (y(), c(T(M), {
|
|
172
181
|
as: "div",
|
|
173
182
|
class: "fg-alert",
|
|
174
183
|
"data-tone": e.tone,
|
|
175
184
|
role: e.tone === "danger" || e.tone === "error" ? "alert" : "status"
|
|
176
185
|
}, {
|
|
177
|
-
default:
|
|
186
|
+
default: A(() => [S(t.$slots, "default")]),
|
|
178
187
|
_: 3
|
|
179
188
|
}, 8, ["data-tone", "role"]));
|
|
180
189
|
}
|
|
181
|
-
}),
|
|
190
|
+
}), ge = /* @__PURE__ */ m({
|
|
182
191
|
__name: "UiBadge",
|
|
183
192
|
props: { tone: { default: "neutral" } },
|
|
184
193
|
setup(e) {
|
|
185
|
-
return (t, n) => (y(), c(T(
|
|
194
|
+
return (t, n) => (y(), c(T(M), {
|
|
186
195
|
as: "span",
|
|
187
196
|
class: "fg-badge",
|
|
188
197
|
"data-tone": e.tone
|
|
189
198
|
}, {
|
|
190
|
-
default:
|
|
199
|
+
default: A(() => [S(t.$slots, "default")]),
|
|
191
200
|
_: 3
|
|
192
201
|
}, 8, ["data-tone"]));
|
|
193
202
|
}
|
|
194
|
-
}),
|
|
203
|
+
}), _e = ["data-size", "data-disabled"], ve = { class: "fg-checkbox__label" }, ye = /* @__PURE__ */ m({
|
|
195
204
|
__name: "UiCheckbox",
|
|
196
205
|
props: {
|
|
197
206
|
disabled: {
|
|
@@ -213,20 +222,20 @@ var V = { class: "fg-card" }, H = {
|
|
|
213
222
|
class: "fg-checkbox",
|
|
214
223
|
"data-size": e.size,
|
|
215
224
|
"data-disabled": e.disabled ? "true" : void 0
|
|
216
|
-
}, [p(T(
|
|
225
|
+
}, [p(T(j), {
|
|
217
226
|
class: "fg-checkbox__control",
|
|
218
227
|
disabled: e.disabled,
|
|
219
228
|
"model-value": e.modelValue,
|
|
220
229
|
"onUpdate:modelValue": r
|
|
221
230
|
}, {
|
|
222
|
-
default:
|
|
223
|
-
default:
|
|
231
|
+
default: A(() => [p(T(re), { class: "fg-checkbox__indicator" }, {
|
|
232
|
+
default: A(() => [...n[0] ||= [f("✓", -1)]]),
|
|
224
233
|
_: 1
|
|
225
234
|
})]),
|
|
226
235
|
_: 1
|
|
227
|
-
}, 8, ["disabled", "model-value"]), d("span",
|
|
236
|
+
}, 8, ["disabled", "model-value"]), d("span", ve, [S(t.$slots, "default")])], 8, _e));
|
|
228
237
|
}
|
|
229
|
-
}), Z = Symbol("UiFieldContext"),
|
|
238
|
+
}), Z = Symbol("UiFieldContext"), be = ["data-invalid"], xe = ["for"], Se = ["id"], Ce = ["id"], we = /* @__PURE__ */ m({
|
|
230
239
|
__name: "UiField",
|
|
231
240
|
props: {
|
|
232
241
|
controlId: {},
|
|
@@ -248,7 +257,7 @@ var V = { class: "fg-card" }, H = {
|
|
|
248
257
|
d("label", {
|
|
249
258
|
class: "fg-field__label",
|
|
250
259
|
for: e.controlId
|
|
251
|
-
}, w(e.label), 9,
|
|
260
|
+
}, w(e.label), 9, xe),
|
|
252
261
|
S(r.$slots, "default", {
|
|
253
262
|
descriptionId: t.value,
|
|
254
263
|
errorId: n.value
|
|
@@ -258,40 +267,40 @@ var V = { class: "fg-card" }, H = {
|
|
|
258
267
|
id: t.value,
|
|
259
268
|
class: "fg-field__description",
|
|
260
269
|
"data-field-description": ""
|
|
261
|
-
}, w(e.description), 9,
|
|
270
|
+
}, w(e.description), 9, Se)) : l("", !0),
|
|
262
271
|
e.error ? (y(), u("p", {
|
|
263
272
|
key: 1,
|
|
264
273
|
id: n.value,
|
|
265
274
|
class: "fg-field__error",
|
|
266
275
|
"data-field-error": ""
|
|
267
|
-
}, w(e.error), 9,
|
|
268
|
-
], 8,
|
|
276
|
+
}, w(e.error), 9, Ce)) : l("", !0)
|
|
277
|
+
], 8, be));
|
|
269
278
|
}
|
|
270
|
-
}),
|
|
279
|
+
}), Te = { class: "fg-figure" }, Ee = ["aria-labelledby", "aria-label"], De = ["id"], Oe = {
|
|
271
280
|
key: 0,
|
|
272
281
|
class: "fg-figure__number"
|
|
273
|
-
},
|
|
282
|
+
}, ke = /* @__PURE__ */ m({
|
|
274
283
|
__name: "UiFigure",
|
|
275
284
|
props: { number: { default: () => void 0 } },
|
|
276
285
|
setup(e) {
|
|
277
|
-
let t =
|
|
278
|
-
return (t, i) => (y(), u("figure",
|
|
286
|
+
let t = k(), n = D(), r = () => e.number !== void 0 || !!t.caption;
|
|
287
|
+
return (t, i) => (y(), u("figure", Te, [d("div", {
|
|
279
288
|
class: "fg-figure__plate",
|
|
280
289
|
role: "region",
|
|
281
290
|
tabindex: "0",
|
|
282
291
|
"aria-labelledby": r() ? T(n) : void 0,
|
|
283
292
|
"aria-label": r() ? void 0 : "Figure"
|
|
284
|
-
}, [S(t.$slots, "default")], 8,
|
|
293
|
+
}, [S(t.$slots, "default")], 8, Ee), r() ? (y(), u("figcaption", {
|
|
285
294
|
key: 0,
|
|
286
295
|
id: T(n),
|
|
287
296
|
class: "fg-figure__caption"
|
|
288
297
|
}, [
|
|
289
|
-
e.number === void 0 ? l("", !0) : (y(), u("span",
|
|
298
|
+
e.number === void 0 ? l("", !0) : (y(), u("span", Oe, "Figure " + w(e.number) + ".", 1)),
|
|
290
299
|
i[0] ||= f(),
|
|
291
300
|
S(t.$slots, "caption")
|
|
292
|
-
], 8,
|
|
301
|
+
], 8, De)) : l("", !0)]));
|
|
293
302
|
}
|
|
294
|
-
}),
|
|
303
|
+
}), Ae = /* @__PURE__ */ m({
|
|
295
304
|
__name: "UiInput",
|
|
296
305
|
props: {
|
|
297
306
|
disabled: {
|
|
@@ -312,7 +321,7 @@ var V = { class: "fg-card" }, H = {
|
|
|
312
321
|
let n = h(Z, void 0), r = t, i = (e) => {
|
|
313
322
|
e.currentTarget instanceof HTMLInputElement && r("update:modelValue", e.currentTarget.value);
|
|
314
323
|
};
|
|
315
|
-
return (t, r) => (y(), c(T(
|
|
324
|
+
return (t, r) => (y(), c(T(M), {
|
|
316
325
|
id: T(n)?.controlId.value ?? e.id,
|
|
317
326
|
as: "input",
|
|
318
327
|
class: "fg-input",
|
|
@@ -335,7 +344,7 @@ var V = { class: "fg-card" }, H = {
|
|
|
335
344
|
"value"
|
|
336
345
|
]));
|
|
337
346
|
}
|
|
338
|
-
}),
|
|
347
|
+
}), je = 100, Me = /* @__PURE__ */ m({
|
|
339
348
|
__name: "UiProgress",
|
|
340
349
|
props: {
|
|
341
350
|
label: {},
|
|
@@ -344,19 +353,19 @@ var V = { class: "fg-card" }, H = {
|
|
|
344
353
|
},
|
|
345
354
|
setup(e) {
|
|
346
355
|
let t = s(() => {
|
|
347
|
-
let t = Number.isFinite(e.max) && e.max > 0 ? e.max :
|
|
356
|
+
let t = Number.isFinite(e.max) && e.max > 0 ? e.max : je;
|
|
348
357
|
return {
|
|
349
358
|
max: t,
|
|
350
359
|
value: e.value === null || !Number.isFinite(e.value) ? null : Math.min(t, Math.max(0, e.value))
|
|
351
360
|
};
|
|
352
361
|
}), n = s(() => t.value.value === null ? 0 : t.value.value / t.value.max * 100);
|
|
353
|
-
return (r, i) => (y(), c(T(
|
|
362
|
+
return (r, i) => (y(), c(T(P), {
|
|
354
363
|
class: "fg-progress",
|
|
355
364
|
"aria-label": e.label,
|
|
356
365
|
max: t.value.max,
|
|
357
366
|
"model-value": t.value.value
|
|
358
367
|
}, {
|
|
359
|
-
default:
|
|
368
|
+
default: A(() => [p(T(N), {
|
|
360
369
|
class: "fg-progress__indicator",
|
|
361
370
|
style: v({ transform: `translateX(-${100 - n.value}%)` })
|
|
362
371
|
}, null, 8, ["style"])]),
|
|
@@ -367,7 +376,7 @@ var V = { class: "fg-card" }, H = {
|
|
|
367
376
|
"model-value"
|
|
368
377
|
]));
|
|
369
378
|
}
|
|
370
|
-
}),
|
|
379
|
+
}), Ne = { class: "fg-radio-card__content" }, Pe = /* @__PURE__ */ m({
|
|
371
380
|
__name: "UiRadioCard",
|
|
372
381
|
props: {
|
|
373
382
|
disabled: {
|
|
@@ -377,19 +386,19 @@ var V = { class: "fg-card" }, H = {
|
|
|
377
386
|
value: {}
|
|
378
387
|
},
|
|
379
388
|
setup(e) {
|
|
380
|
-
return (t, n) => (y(), c(T(
|
|
389
|
+
return (t, n) => (y(), c(T(F), {
|
|
381
390
|
class: "fg-radio-card",
|
|
382
391
|
disabled: e.disabled,
|
|
383
392
|
value: e.value
|
|
384
393
|
}, {
|
|
385
|
-
default:
|
|
394
|
+
default: A(() => [n[0] ||= d("span", {
|
|
386
395
|
class: "fg-radio-card__indicator",
|
|
387
396
|
"aria-hidden": "true"
|
|
388
|
-
}, null, -1), d("span",
|
|
397
|
+
}, null, -1), d("span", Ne, [S(t.$slots, "default")])]),
|
|
389
398
|
_: 3
|
|
390
399
|
}, 8, ["disabled", "value"]));
|
|
391
400
|
}
|
|
392
|
-
}),
|
|
401
|
+
}), Fe = /* @__PURE__ */ m({
|
|
393
402
|
__name: "UiRadioCardGroup",
|
|
394
403
|
props: /*@__PURE__*/ g({
|
|
395
404
|
disabled: {
|
|
@@ -407,7 +416,7 @@ var V = { class: "fg-card" }, H = {
|
|
|
407
416
|
}),
|
|
408
417
|
emits: ["update:modelValue"],
|
|
409
418
|
setup(e) {
|
|
410
|
-
let t =
|
|
419
|
+
let t = O(e, "modelValue"), n = (t) => {
|
|
411
420
|
if (t.altKey || t.ctrlKey || t.metaKey || t.shiftKey) return;
|
|
412
421
|
let n = t.currentTarget, r = t.target;
|
|
413
422
|
if (!(n instanceof HTMLElement) || !(r instanceof HTMLElement)) return;
|
|
@@ -423,14 +432,14 @@ var V = { class: "fg-card" }, H = {
|
|
|
423
432
|
let d = o[u];
|
|
424
433
|
!d || d === r || (t.preventDefault(), d.focus(), d.click());
|
|
425
434
|
};
|
|
426
|
-
return (r, i) => (y(), c(T(
|
|
435
|
+
return (r, i) => (y(), c(T(I), _({
|
|
427
436
|
modelValue: t.value,
|
|
428
437
|
"onUpdate:modelValue": i[0] ||= (e) => t.value = e,
|
|
429
438
|
class: "fg-radio-card-group",
|
|
430
439
|
disabled: e.disabled,
|
|
431
440
|
loop: e.loop
|
|
432
441
|
}, e.orientation === void 0 ? {} : { orientation: e.orientation }, { onKeydown: n }), {
|
|
433
|
-
default:
|
|
442
|
+
default: A(() => [S(r.$slots, "default")]),
|
|
434
443
|
_: 3
|
|
435
444
|
}, 16, [
|
|
436
445
|
"modelValue",
|
|
@@ -438,30 +447,30 @@ var V = { class: "fg-card" }, H = {
|
|
|
438
447
|
"loop"
|
|
439
448
|
]));
|
|
440
449
|
}
|
|
441
|
-
}),
|
|
450
|
+
}), Ie = { class: "fg-score" }, Le = {
|
|
442
451
|
class: "fg-score__pips",
|
|
443
452
|
"aria-hidden": "true"
|
|
444
|
-
},
|
|
453
|
+
}, Re = ["data-filled"], ze = { class: "fg-score__value" }, Be = { class: "fg-score__max" }, Q = 3, Ve = /* @__PURE__ */ m({
|
|
445
454
|
__name: "UiScore",
|
|
446
455
|
props: {
|
|
447
|
-
max: { default: () =>
|
|
456
|
+
max: { default: () => Q },
|
|
448
457
|
score: {}
|
|
449
458
|
},
|
|
450
459
|
setup(e) {
|
|
451
460
|
let t = s(() => {
|
|
452
|
-
let t = Number.isInteger(e.max) && e.max > 0 ? e.max :
|
|
461
|
+
let t = Number.isInteger(e.max) && e.max > 0 ? e.max : Q;
|
|
453
462
|
return {
|
|
454
463
|
max: t,
|
|
455
464
|
score: Number.isFinite(e.score) ? Math.min(t, Math.max(0, e.score)) : 0
|
|
456
465
|
};
|
|
457
466
|
});
|
|
458
|
-
return (e, n) => (y(), u("span",
|
|
467
|
+
return (e, n) => (y(), u("span", Ie, [d("span", Le, [(y(!0), u(o, null, x(t.value.max, (e) => (y(), u("span", {
|
|
459
468
|
key: e,
|
|
460
469
|
class: "fg-score__pip",
|
|
461
470
|
"data-filled": e <= t.value.score ? "true" : void 0
|
|
462
|
-
}, null, 8,
|
|
471
|
+
}, null, 8, Re))), 128))]), d("span", ze, [f(w(t.value.score), 1), d("span", Be, "/" + w(t.value.max), 1)])]));
|
|
463
472
|
}
|
|
464
|
-
}),
|
|
473
|
+
}), $ = /* @__PURE__ */ m({
|
|
465
474
|
__name: "UiSelect",
|
|
466
475
|
props: {
|
|
467
476
|
disabled: {
|
|
@@ -481,7 +490,7 @@ var V = { class: "fg-card" }, H = {
|
|
|
481
490
|
let n = h(Z, void 0), r = t, i = (e) => {
|
|
482
491
|
e.currentTarget instanceof HTMLSelectElement && r("update:modelValue", e.currentTarget.value);
|
|
483
492
|
};
|
|
484
|
-
return (t, r) => (y(), c(T(
|
|
493
|
+
return (t, r) => (y(), c(T(M), {
|
|
485
494
|
id: T(n)?.controlId.value ?? e.id,
|
|
486
495
|
as: "select",
|
|
487
496
|
class: "fg-select",
|
|
@@ -493,7 +502,7 @@ var V = { class: "fg-card" }, H = {
|
|
|
493
502
|
value: e.modelValue,
|
|
494
503
|
onChange: i
|
|
495
504
|
}, {
|
|
496
|
-
default:
|
|
505
|
+
default: A(() => [S(t.$slots, "default")]),
|
|
497
506
|
_: 3
|
|
498
507
|
}, 8, [
|
|
499
508
|
"id",
|
|
@@ -505,7 +514,7 @@ var V = { class: "fg-card" }, H = {
|
|
|
505
514
|
"value"
|
|
506
515
|
]));
|
|
507
516
|
}
|
|
508
|
-
}),
|
|
517
|
+
}), He = /* @__PURE__ */ m({
|
|
509
518
|
__name: "UiSlider",
|
|
510
519
|
props: {
|
|
511
520
|
disabled: {
|
|
@@ -538,7 +547,7 @@ var V = { class: "fg-card" }, H = {
|
|
|
538
547
|
e !== void 0 && i("update:modelValue", e);
|
|
539
548
|
}
|
|
540
549
|
});
|
|
541
|
-
return (t, i) => (y(), c(T(
|
|
550
|
+
return (t, i) => (y(), c(T(R), {
|
|
542
551
|
modelValue: a.value,
|
|
543
552
|
"onUpdate:modelValue": i[0] ||= (e) => a.value = e,
|
|
544
553
|
class: "fg-slider",
|
|
@@ -548,10 +557,10 @@ var V = { class: "fg-card" }, H = {
|
|
|
548
557
|
min: r.value.min,
|
|
549
558
|
step: r.value.step
|
|
550
559
|
}, {
|
|
551
|
-
default:
|
|
552
|
-
default:
|
|
560
|
+
default: A(() => [p(T(B), { class: "fg-slider__track" }, {
|
|
561
|
+
default: A(() => [p(T(L), { class: "fg-slider__range" })]),
|
|
553
562
|
_: 1
|
|
554
|
-
}), p(T(
|
|
563
|
+
}), p(T(z), {
|
|
555
564
|
id: T(n)?.controlId.value ?? e.id,
|
|
556
565
|
class: "fg-slider__thumb",
|
|
557
566
|
"aria-describedby": T(n)?.descriptionId.value,
|
|
@@ -575,10 +584,73 @@ var V = { class: "fg-card" }, H = {
|
|
|
575
584
|
"step"
|
|
576
585
|
]));
|
|
577
586
|
}
|
|
578
|
-
}),
|
|
587
|
+
}), Ue = ["data-size", "data-disabled"], We = [
|
|
588
|
+
"id",
|
|
589
|
+
"aria-checked",
|
|
590
|
+
"aria-describedby",
|
|
591
|
+
"aria-errormessage",
|
|
592
|
+
"aria-invalid",
|
|
593
|
+
"disabled"
|
|
594
|
+
], Ge = {
|
|
595
|
+
key: 0,
|
|
596
|
+
class: "fg-switch__text"
|
|
597
|
+
}, Ke = ["for"], qe = ["id"], Je = /* @__PURE__ */ m({
|
|
598
|
+
inheritAttrs: !1,
|
|
599
|
+
__name: "UiSwitch",
|
|
600
|
+
props: {
|
|
601
|
+
description: { default: () => void 0 },
|
|
602
|
+
disabled: {
|
|
603
|
+
type: Boolean,
|
|
604
|
+
default: !1
|
|
605
|
+
},
|
|
606
|
+
id: { default: () => void 0 },
|
|
607
|
+
label: { default: () => void 0 },
|
|
608
|
+
modelValue: {
|
|
609
|
+
type: Boolean,
|
|
610
|
+
default: !1
|
|
611
|
+
},
|
|
612
|
+
size: { default: "md" }
|
|
613
|
+
},
|
|
614
|
+
emits: ["update:modelValue"],
|
|
615
|
+
setup(e, { emit: t }) {
|
|
616
|
+
let n = t, r = k(), i = E(), a = h(Z, void 0), o = D(), c = s(() => a?.controlId.value ?? e.id ?? o), p = s(() => `${c.value}-switch-description`), m = () => [
|
|
617
|
+
i["aria-describedby"],
|
|
618
|
+
a?.descriptionId.value,
|
|
619
|
+
e.description ? p.value : void 0
|
|
620
|
+
].filter(Boolean).join(" ") || void 0, g = () => {
|
|
621
|
+
e.disabled || n("update:modelValue", !e.modelValue);
|
|
622
|
+
};
|
|
623
|
+
return (t, n) => (y(), u("div", {
|
|
624
|
+
class: "fg-switch",
|
|
625
|
+
"data-size": e.size,
|
|
626
|
+
"data-disabled": e.disabled ? "true" : void 0
|
|
627
|
+
}, [d("button", _(T(i), {
|
|
628
|
+
id: c.value,
|
|
629
|
+
class: "fg-switch__control",
|
|
630
|
+
type: "button",
|
|
631
|
+
role: "switch",
|
|
632
|
+
"aria-checked": e.modelValue,
|
|
633
|
+
"aria-describedby": m(),
|
|
634
|
+
"aria-errormessage": T(a)?.errorId.value,
|
|
635
|
+
"aria-invalid": T(a)?.invalid.value ? "true" : void 0,
|
|
636
|
+
disabled: e.disabled,
|
|
637
|
+
onClick: g
|
|
638
|
+
}), [...n[0] ||= [d("span", {
|
|
639
|
+
class: "fg-switch__track",
|
|
640
|
+
"aria-hidden": "true"
|
|
641
|
+
}, null, -1)]], 16, We), r.default || e.label || e.description ? (y(), u("span", Ge, [r.default || e.label ? (y(), u("label", {
|
|
642
|
+
key: 0,
|
|
643
|
+
for: c.value
|
|
644
|
+
}, [S(t.$slots, "default", {}, () => [f(w(e.label), 1)])], 8, Ke)) : l("", !0), e.description ? (y(), u("span", {
|
|
645
|
+
key: 1,
|
|
646
|
+
id: p.value,
|
|
647
|
+
class: "fg-switch__description"
|
|
648
|
+
}, w(e.description), 9, qe)) : l("", !0)])) : l("", !0)], 8, Ue));
|
|
649
|
+
}
|
|
650
|
+
}), Ye = { class: "fg-toggle-button__text" }, Xe = { class: "fg-toggle-button__label" }, Ze = {
|
|
579
651
|
key: 0,
|
|
580
652
|
class: "fg-toggle-button__description"
|
|
581
|
-
},
|
|
653
|
+
}, Qe = /* @__PURE__ */ m({
|
|
582
654
|
__name: "UiToggleButton",
|
|
583
655
|
props: {
|
|
584
656
|
disabled: {
|
|
@@ -593,20 +665,20 @@ var V = { class: "fg-card" }, H = {
|
|
|
593
665
|
},
|
|
594
666
|
emits: ["update:pressed"],
|
|
595
667
|
setup(e, { emit: t }) {
|
|
596
|
-
let n = t, r =
|
|
668
|
+
let n = t, r = k(), i = (e) => {
|
|
597
669
|
n("update:pressed", e);
|
|
598
670
|
};
|
|
599
|
-
return (t, n) => (y(), c(T(
|
|
671
|
+
return (t, n) => (y(), c(T(V), {
|
|
600
672
|
class: "fg-toggle-button",
|
|
601
673
|
"data-size": e.size,
|
|
602
674
|
disabled: e.disabled,
|
|
603
675
|
"model-value": e.pressed,
|
|
604
676
|
"onUpdate:modelValue": i
|
|
605
677
|
}, {
|
|
606
|
-
default:
|
|
678
|
+
default: A(() => [n[0] ||= d("span", {
|
|
607
679
|
class: "fg-toggle-button__switch",
|
|
608
680
|
"aria-hidden": "true"
|
|
609
|
-
}, null, -1), d("span",
|
|
681
|
+
}, null, -1), d("span", Ye, [d("span", Xe, [S(t.$slots, "default")]), r.description ? (y(), u("span", Ze, [S(t.$slots, "description")])) : l("", !0)])]),
|
|
610
682
|
_: 3
|
|
611
683
|
}, 8, [
|
|
612
684
|
"data-size",
|
|
@@ -614,22 +686,22 @@ var V = { class: "fg-card" }, H = {
|
|
|
614
686
|
"model-value"
|
|
615
687
|
]));
|
|
616
688
|
}
|
|
617
|
-
}),
|
|
689
|
+
}), $e = /* @__PURE__ */ m({
|
|
618
690
|
__name: "UiSurface",
|
|
619
691
|
props: {
|
|
620
692
|
as: { default: "section" },
|
|
621
693
|
padding: { default: "default" }
|
|
622
694
|
},
|
|
623
695
|
setup(e) {
|
|
624
|
-
return (t, n) => (y(), c(T(
|
|
696
|
+
return (t, n) => (y(), c(T(M), {
|
|
625
697
|
as: e.as,
|
|
626
698
|
class: "fg-surface",
|
|
627
699
|
"data-padding": e.padding
|
|
628
700
|
}, {
|
|
629
|
-
default:
|
|
701
|
+
default: A(() => [S(t.$slots, "default")]),
|
|
630
702
|
_: 3
|
|
631
703
|
}, 8, ["as", "data-padding"]));
|
|
632
704
|
}
|
|
633
705
|
});
|
|
634
706
|
//#endregion
|
|
635
|
-
export {
|
|
707
|
+
export { he as UiAlert, ge as UiBadge, r as UiButton, q as UiCard, ye as UiCheckbox, me as UiCodeBlock, t as UiDialog, i as UiDrawer, we as UiField, ke as UiFigure, Ae as UiInput, Me as UiProgress, Pe as UiRadioCard, Fe as UiRadioCardGroup, Ve as UiScore, $ as UiSelect, He as UiSlider, $e as UiSurface, Je as UiSwitch, n as UiTabs, Qe as UiToggleButton, a as useActiveSection };
|