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