@fiestaboard/ui 5.8.0 → 5.10.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.
Files changed (50) hide show
  1. package/README.md +2 -2
  2. package/dist/components/chrome/pagination.d.ts +75 -0
  3. package/dist/components/chrome/pagination.js +93 -0
  4. package/dist/components/chrome/pagination.js.map +1 -0
  5. package/dist/components/chrome/top-nav.d.ts +102 -0
  6. package/dist/components/chrome/top-nav.js +91 -0
  7. package/dist/components/chrome/top-nav.js.map +1 -0
  8. package/dist/components/containment/action-card.d.ts +95 -0
  9. package/dist/components/containment/action-card.js +91 -0
  10. package/dist/components/containment/action-card.js.map +1 -0
  11. package/dist/components/containment/card.d.ts +24 -1
  12. package/dist/components/containment/card.js +11 -10
  13. package/dist/components/containment/card.js.map +1 -1
  14. package/dist/components/containment/icon-tile.d.ts +1 -1
  15. package/dist/components/editor/color-picker-content.js +17 -17
  16. package/dist/components/editor/filter-picker-content.js +20 -20
  17. package/dist/components/editor/formatting-picker-content.js +20 -20
  18. package/dist/components/editor/formula/formula-editor-panel.js +184 -184
  19. package/dist/components/editor/formula/formula-editor-panel.js.map +1 -1
  20. package/dist/components/editor/node-views/color-tile-node-view.js +5 -5
  21. package/dist/components/editor/node-views/formula-node-view.js +9 -9
  22. package/dist/components/editor/template-editor-toolbar.js +44 -44
  23. package/dist/components/editor/template-editor.js +23 -23
  24. package/dist/components/editor/toolbar-dropdown.js +6 -6
  25. package/dist/components/editor/variable-picker-content.js +79 -79
  26. package/dist/components/feedback/alert.d.ts +1 -1
  27. package/dist/components/feedback/badge.d.ts +1 -1
  28. package/dist/components/feedback/badge.js +6 -6
  29. package/dist/components/feedback/chip.js +6 -6
  30. package/dist/components/feedback/spinner.d.ts +1 -1
  31. package/dist/components/feedback/status-dot.d.ts +1 -1
  32. package/dist/components/forms/button.d.ts +2 -2
  33. package/dist/components/forms/button.js +6 -6
  34. package/dist/components/forms/field.d.ts +66 -0
  35. package/dist/components/forms/field.js +64 -0
  36. package/dist/components/forms/field.js.map +1 -0
  37. package/dist/components/forms/swatch.d.ts +4 -4
  38. package/dist/components/forms/time-picker.js +24 -24
  39. package/dist/components/forms/toggle-card.d.ts +2 -2
  40. package/dist/components/forms/toggle.d.ts +1 -1
  41. package/dist/components/plugin/plugin-card.js +5 -5
  42. package/dist/components/typography/heading.d.ts +2 -2
  43. package/dist/components/typography/kbd.d.ts +35 -0
  44. package/dist/components/typography/kbd.js +115 -0
  45. package/dist/components/typography/kbd.js.map +1 -0
  46. package/dist/components/typography/text.d.ts +2 -2
  47. package/dist/index.d.ts +5 -0
  48. package/dist/index.js +113 -108
  49. package/dist/theme.css +54 -9
  50. package/package.json +1 -1
@@ -0,0 +1,64 @@
1
+ import { cn as e } from "../../lib/utils.js";
2
+ import { Text as t } from "../typography/text.js";
3
+ import { Label as n } from "./label.js";
4
+ import * as r from "react";
5
+ import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
6
+ //#region src/components/forms/field.tsx
7
+ function s(e) {
8
+ return e != null && e !== !1 && e !== "";
9
+ }
10
+ function c({ label: c, description: l, error: u, required: d, requiredLabel: f = "(required)", id: p, descriptionPlacement: m = "below", orientation: h = "stacked", children: g, className: _ }) {
11
+ let v = r.useId(), y = r.Children.only(g), b = y.props, x = p ?? b.id ?? v, S = `${x}-description`, C = `${x}-error`, w = s(l), T = s(u), E = [T ? C : w ? S : void 0, b["aria-describedby"]].filter(Boolean).join(" ") || void 0, D = r.cloneElement(y, {
12
+ id: x,
13
+ "aria-describedby": E,
14
+ "aria-invalid": b["aria-invalid"] ?? (T ? !0 : void 0),
15
+ required: b.required ?? d
16
+ }), O = w ? /* @__PURE__ */ a(t, {
17
+ id: S,
18
+ "data-slot": "field-description",
19
+ size: "xs",
20
+ tone: "muted",
21
+ children: l
22
+ }) : null;
23
+ return /* @__PURE__ */ o("div", {
24
+ "data-slot": "field",
25
+ "data-orientation": h,
26
+ className: e(h === "inline" ? "grid grid-cols-1 gap-1.5 sm:grid-cols-[minmax(6rem,14rem)_minmax(0,1fr)] sm:items-start sm:gap-x-4 sm:gap-y-0" : "flex flex-col gap-1.5", _),
27
+ children: [/* @__PURE__ */ o(n, {
28
+ htmlFor: x,
29
+ className: h === "inline" ? "sm:pt-2" : void 0,
30
+ children: [c, d ? /* @__PURE__ */ o(i, { children: [
31
+ /* @__PURE__ */ a("span", {
32
+ "data-slot": "field-required",
33
+ "aria-hidden": "true",
34
+ className: "ml-0.5 text-destructive",
35
+ children: "*"
36
+ }),
37
+ " ",
38
+ /* @__PURE__ */ a("span", {
39
+ className: "sr-only",
40
+ children: f
41
+ })
42
+ ] }) : null]
43
+ }), /* @__PURE__ */ o("div", {
44
+ "data-slot": "field-content",
45
+ className: "flex flex-col gap-1.5",
46
+ children: [
47
+ m === "above" ? O : null,
48
+ D,
49
+ m === "below" ? O : null,
50
+ T ? /* @__PURE__ */ a(t, {
51
+ id: C,
52
+ "data-slot": "field-error",
53
+ size: "xs",
54
+ tone: "destructive",
55
+ children: u
56
+ }) : null
57
+ ]
58
+ })]
59
+ });
60
+ }
61
+ //#endregion
62
+ export { c as Field };
63
+
64
+ //# sourceMappingURL=field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field.js","names":[],"sources":["../../../src/components/forms/field.tsx"],"mappings":";;;;;;AAmJA,SAAS,EAAU,GAAgC;CACjD,OAAO,KAA+B,QAAQ,MAAS,MAAS,MAAS;AAC3E;AAkEA,SAAS,EAAM,EACb,UACA,gBACA,UACA,aACA,mBAAgB,cAChB,IAAI,GACJ,0BAAuB,SACvB,iBAAc,WACd,aACA,gBACa;CAGb,IAAM,IAAc,EAAM,MAAM,GAI1B,IAAQ,EAAM,SAAS,KAAK,CAAQ,GACpC,IAAa,EAAM,OAEnB,IAAY,KAAU,EAAW,MAAM,GACvC,IAAgB,GAAG,EAAU,eAC7B,IAAU,GAAG,EAAU,SAEvB,IAAiB,EAAU,CAAW,GACtC,IAAW,EAAU,CAAK,GAK1B,IACJ,CAAC,IAAW,IAAU,IAAiB,IAAgB,KAAA,GAAW,EAAW,mBAAmB,CAAC,CAC9F,OAAO,OAAO,CAAC,CACf,KAAK,GAAG,KAAK,KAAA,GAEZ,IAAU,EAAM,aAAa,GAAmD;EACpF,IAAI;EACJ,oBAAoB;EAIpB,gBAAgB,EAAW,oBAAoB,IAAW,KAAO,KAAA;EACjE,UAAU,EAAW,YAAY;CACnC,CAAC,GAEK,IAAkB,IACtB,kBAAC,GAAD;EAAM,IAAI;EAAe,aAAU;EAAoB,MAAK;EAAK,MAAK;EACnE,UAAA;CACG,CAAA,IACJ;CAEJ,OACE,kBAAC,OAAD;EACE,aAAU;EACV,oBAAkB;EAClB,WAAW,EACT,MAAgB,WAGZ,kHACA,yBACJ,CACF;EAVF,UAAA,CAYE,kBAAC,GAAD;GACE,SAAS;GAGT,WAAW,MAAgB,WAAW,YAAY,KAAA;GAJpD,UAAA,CAMG,GACA,IACC,kBAAA,GAAA,EAAA,UAAA;IAIE,kBAAC,QAAD;KAAM,aAAU;KAAiB,eAAY;KAAO,WAAU;KAA0B,UAAA;IAElF,CAAA;IAK0B;IAChC,kBAAC,QAAD;KAAM,WAAU;KAAW,UAAA;IAAoB,CAAA;GAC/C,EAAA,CAAA,IACA,IACC;EACP,CAAA,GAAA,kBAAC,OAAD;GAAK,aAAU;GAAgB,WAAU;GAAzC,UAAA;IACG,MAAyB,UAAU,IAAkB;IACrD;IACA,MAAyB,UAAU,IAAkB;IACrD,IACC,kBAAC,GAAD;KAAM,IAAI;KAAS,aAAU;KAAc,MAAK;KAAK,MAAK;KACvD,UAAA;IACG,CAAA,IACJ;GACD;EACF,CAAA,CAAA;;AAET"}
@@ -5,10 +5,10 @@ declare const swatchGroupVariants: (props?: ({
5
5
  wrap?: boolean | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  declare const swatchVariants: (props?: ({
8
- size?: "lg" | "sm" | "md" | null | undefined;
8
+ size?: "sm" | "md" | "lg" | null | undefined;
9
9
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
10
  declare const swatchFillVariants: (props?: ({
11
- size?: "lg" | "sm" | "md" | null | undefined;
11
+ size?: "sm" | "md" | "lg" | null | undefined;
12
12
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
13
13
  /**
14
14
  * The glyph a content swatch carries, sized to its fill (#261).
@@ -18,10 +18,10 @@ declare const swatchFillVariants: (props?: ({
18
18
  * optically centred in the circle rather than sitting on a text baseline.
19
19
  */
20
20
  declare const swatchGlyphVariants: (props?: ({
21
- size?: "lg" | "sm" | "md" | null | undefined;
21
+ size?: "sm" | "md" | "lg" | null | undefined;
22
22
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
23
23
  declare const swatchIndicatorVariants: (props?: ({
24
- size?: "lg" | "sm" | "md" | null | undefined;
24
+ size?: "sm" | "md" | "lg" | null | undefined;
25
25
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
26
26
  type SwatchSize = NonNullable<VariantProps<typeof swatchVariants>["size"]>;
27
27
  export type SwatchGroupProps = SelectionGroupBaseProps & SelectionGroupNameProps & VariantProps<typeof swatchGroupVariants> & {
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../lib/utils.js";
3
3
  import { Button as t } from "./button.js";
4
- import { Flex as n } from "../layout/flex.js";
5
- import { Popover as r, PopoverContent as i, PopoverTrigger as a } from "../overlays/popover.js";
6
- import { Text as o } from "../typography/text.js";
4
+ import { Text as n } from "../typography/text.js";
5
+ import { Flex as r } from "../layout/flex.js";
6
+ import { Popover as i, PopoverContent as a, PopoverTrigger as o } from "../overlays/popover.js";
7
7
  import { Clock as s } from "lucide-react";
8
8
  import * as c from "react";
9
9
  import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
@@ -52,8 +52,8 @@ var b = {
52
52
  am: "AM",
53
53
  pm: "PM"
54
54
  };
55
- function x({ value: n, defaultValue: o = "", onValueChange: l, placeholder: f = "00:00", className: g, contentClassName: _, disabled: v, id: y, "aria-label": x, "aria-labelledby": C, "aria-describedby": w, "aria-invalid": T, hourCycle: E = "12", minuteStep: D = 5, presets: O, labels: k, defaultOpen: A = !1, open: j, onOpenChange: M, ref: N }) {
56
- let [P, F] = c.useState(A), I = j ?? P, [L, R] = c.useState(o), z = n ?? L, B = c.useId(), V = {
55
+ function x({ value: n, defaultValue: r = "", onValueChange: l, placeholder: f = "00:00", className: g, contentClassName: _, disabled: v, id: y, "aria-label": x, "aria-labelledby": C, "aria-describedby": w, "aria-invalid": T, hourCycle: E = "12", minuteStep: D = 5, presets: O, labels: k, defaultOpen: A = !1, open: j, onOpenChange: M, ref: N }) {
56
+ let [P, F] = c.useState(A), I = j ?? P, [L, R] = c.useState(r), z = n ?? L, B = c.useId(), V = {
57
57
  ...b,
58
58
  ...k
59
59
  }, H = m(z), U = H ?? p, W = (e) => {
@@ -61,10 +61,10 @@ function x({ value: n, defaultValue: o = "", onValueChange: l, placeholder: f =
61
61
  }, G = (e) => {
62
62
  n === void 0 && R(e), l?.(e);
63
63
  }, K = H ? h(H, E, V.am, V.pm) : f, q = `${B}-value`, J = `${B}-label`, Y = C ?? (x ? J : void 0);
64
- return /* @__PURE__ */ d(r, {
64
+ return /* @__PURE__ */ d(i, {
65
65
  open: I,
66
66
  onOpenChange: W,
67
- children: [/* @__PURE__ */ u(a, {
67
+ children: [/* @__PURE__ */ u(o, {
68
68
  asChild: !0,
69
69
  children: /* @__PURE__ */ d(t, {
70
70
  ref: N,
@@ -92,7 +92,7 @@ function x({ value: n, defaultValue: o = "", onValueChange: l, placeholder: f =
92
92
  })
93
93
  ]
94
94
  })
95
- }), /* @__PURE__ */ u(i, {
95
+ }), /* @__PURE__ */ u(a, {
96
96
  className: e("w-64", _),
97
97
  align: "start",
98
98
  label: V.panel,
@@ -110,12 +110,12 @@ function x({ value: n, defaultValue: o = "", onValueChange: l, placeholder: f =
110
110
  })]
111
111
  });
112
112
  }
113
- function S({ baseId: e, parts: r, hasValue: i, hourCycle: a, minuteStep: s, presets: f, text: y, onChange: b, onClose: x }) {
113
+ function S({ baseId: e, parts: i, hasValue: a, hourCycle: o, minuteStep: s, presets: f, text: y, onChange: b, onClose: x }) {
114
114
  let S = c.useRef(null), w = c.useMemo(() => Array.from({ length: 24 }, (e, t) => ({
115
115
  value: String(t).padStart(2, "0"),
116
- label: g(t, a, y.am, y.pm)
116
+ label: g(t, o, y.am, y.pm)
117
117
  })), [
118
- a,
118
+ o,
119
119
  y.am,
120
120
  y.pm
121
121
  ]), T = c.useMemo(() => {
@@ -135,12 +135,12 @@ function S({ baseId: e, parts: r, hasValue: i, hourCycle: a, minuteStep: s, pres
135
135
  return () => cancelAnimationFrame(e);
136
136
  }, []);
137
137
  let D = `${e}-hour`, O = `${e}-minute`, k = `${e}-presets`;
138
- return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ d(n, {
138
+ return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ d(r, {
139
139
  gap: "4",
140
140
  children: [/* @__PURE__ */ d("div", {
141
141
  className: "flex-1",
142
142
  ref: S,
143
- children: [/* @__PURE__ */ u(o, {
143
+ children: [/* @__PURE__ */ u(n, {
144
144
  as: "span",
145
145
  id: D,
146
146
  size: "xs",
@@ -151,12 +151,12 @@ function S({ baseId: e, parts: r, hasValue: i, hourCycle: a, minuteStep: s, pres
151
151
  }), /* @__PURE__ */ u(C, {
152
152
  labelId: D,
153
153
  options: w,
154
- selected: r.hours,
155
- onSelect: (e) => b(`${e}:${r.minutes}`)
154
+ selected: i.hours,
155
+ onSelect: (e) => b(`${e}:${i.minutes}`)
156
156
  })]
157
157
  }), /* @__PURE__ */ d("div", {
158
158
  className: "flex-1",
159
- children: [/* @__PURE__ */ u(o, {
159
+ children: [/* @__PURE__ */ u(n, {
160
160
  as: "span",
161
161
  id: O,
162
162
  size: "xs",
@@ -167,13 +167,13 @@ function S({ baseId: e, parts: r, hasValue: i, hourCycle: a, minuteStep: s, pres
167
167
  }), /* @__PURE__ */ u(C, {
168
168
  labelId: O,
169
169
  options: T,
170
- selected: r.minutes,
171
- onSelect: (e) => b(`${r.hours}:${e}`)
170
+ selected: i.minutes,
171
+ onSelect: (e) => b(`${i.hours}:${e}`)
172
172
  })]
173
173
  })]
174
174
  }), E.length > 0 && /* @__PURE__ */ d("div", {
175
175
  className: "mt-4 border-t pt-4",
176
- children: [/* @__PURE__ */ u(o, {
176
+ children: [/* @__PURE__ */ u(n, {
177
177
  as: "span",
178
178
  id: k,
179
179
  size: "xs",
@@ -181,23 +181,23 @@ function S({ baseId: e, parts: r, hasValue: i, hourCycle: a, minuteStep: s, pres
181
181
  tone: "muted",
182
182
  className: "mb-2 block",
183
183
  children: y.quickPresets
184
- }), /* @__PURE__ */ u(n, {
184
+ }), /* @__PURE__ */ u(r, {
185
185
  gap: "2",
186
186
  wrap: !0,
187
187
  role: "group",
188
188
  "aria-labelledby": k,
189
189
  children: E.map((e) => {
190
- let n = m(e.value) ?? p, o = `${n.hours}:${n.minutes}`;
190
+ let n = m(e.value) ?? p, r = `${n.hours}:${n.minutes}`;
191
191
  return /* @__PURE__ */ u(t, {
192
192
  type: "button",
193
193
  variant: "outline",
194
194
  size: "sm",
195
- "aria-current": i && o === `${r.hours}:${r.minutes}` ? !0 : void 0,
195
+ "aria-current": a && r === `${i.hours}:${i.minutes}` ? !0 : void 0,
196
196
  onClick: () => {
197
- b(o), x();
197
+ b(r), x();
198
198
  },
199
199
  className: "h-7 px-2 text-xs aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",
200
- children: e.label ?? h(n, a, y.am, y.pm)
200
+ children: e.label ?? h(n, o, y.am, y.pm)
201
201
  }, e.value);
202
202
  })
203
203
  })]
@@ -13,7 +13,7 @@ declare const toggleCardGroupVariants: (props?: ({
13
13
  columns?: "1" | "2" | "3" | null | undefined;
14
14
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
15
15
  declare const toggleCardVariants: (props?: ({
16
- size?: "lg" | "sm" | "md" | null | undefined;
16
+ size?: "sm" | "md" | "lg" | null | undefined;
17
17
  align?: "start" | "center" | null | undefined;
18
18
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
19
19
  type ToggleCardSize = NonNullable<VariantProps<typeof toggleCardVariants>["size"]>;
@@ -81,7 +81,7 @@ declare const segmentedControlVariants: (props?: ({
81
81
  wrap?: boolean | null | undefined;
82
82
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
83
83
  declare const segmentedControlItemVariants: (props?: ({
84
- size?: "lg" | "sm" | "md" | null | undefined;
84
+ size?: "sm" | "md" | "lg" | null | undefined;
85
85
  layout?: "grid" | "inline" | null | undefined;
86
86
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
87
87
  type SegmentedControlSize = NonNullable<VariantProps<typeof segmentedControlItemVariants>["size"]>;
@@ -5,7 +5,7 @@ import * as React from "react";
5
5
  import type { SelectionGroupNameProps } from "./toggle-card";
6
6
  declare const toggleVariants: (props?: ({
7
7
  variant?: "default" | "outline" | null | undefined;
8
- size?: "lg" | "icon" | "sm" | "default" | "icon-sm" | null | undefined;
8
+ size?: "sm" | "lg" | "icon" | "default" | "icon-sm" | null | undefined;
9
9
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
10
  export type ToggleProps = Omit<React.ComponentProps<typeof TogglePrimitive>, "onPressedChange"> & VariantProps<typeof toggleVariants> & {
11
11
  /**
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../lib/utils.js";
3
- import { Heading as t } from "../typography/heading.js";
4
- import { Text as n } from "../typography/text.js";
3
+ import { Text as t } from "../typography/text.js";
4
+ import { Heading as n } from "../typography/heading.js";
5
5
  import { PluginCategoryBadge as r } from "./plugin-category-badge.js";
6
6
  import { ScaledBoardTeaser as i } from "./scaled-board-teaser.js";
7
7
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
@@ -17,7 +17,7 @@ function c({ name: c, description: l, authorLabel: u, category: d, categoryLabel
17
17
  children: [
18
18
  /* @__PURE__ */ o("div", {
19
19
  className: "flex flex-wrap items-center gap-2",
20
- children: [/* @__PURE__ */ a(t, {
20
+ children: [/* @__PURE__ */ a(n, {
21
21
  level: 3,
22
22
  className: "min-w-0 text-base",
23
23
  children: g({
@@ -30,7 +30,7 @@ function c({ name: c, description: l, authorLabel: u, category: d, categoryLabel
30
30
  className: "ml-auto"
31
31
  })]
32
32
  }),
33
- l && /* @__PURE__ */ a(n, {
33
+ l && /* @__PURE__ */ a(t, {
34
34
  tone: "muted",
35
35
  size: "sm",
36
36
  className: "line-clamp-3 flex-1 leading-relaxed",
@@ -38,7 +38,7 @@ function c({ name: c, description: l, authorLabel: u, category: d, categoryLabel
38
38
  }),
39
39
  /* @__PURE__ */ o("div", {
40
40
  className: "mt-auto flex items-center justify-between gap-2 pt-1",
41
- children: [u ? /* @__PURE__ */ a(n, {
41
+ children: [u ? /* @__PURE__ */ a(t, {
42
42
  as: "span",
43
43
  tone: "muted",
44
44
  size: "xs",
@@ -1,8 +1,8 @@
1
1
  import { type VariantProps } from "class-variance-authority";
2
2
  import * as React from "react";
3
3
  declare const headingVariants: (props?: ({
4
- tone?: "muted" | "default" | "destructive" | null | undefined;
5
- size?: "base" | "lg" | "sm" | "xl" | null | undefined;
4
+ tone?: "muted" | "destructive" | "default" | null | undefined;
5
+ size?: "base" | "sm" | "lg" | "xl" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement>, VariantProps<typeof headingVariants> {
8
8
  /** Semantic heading element. h1 is reserved for PageHeader. */
@@ -0,0 +1,35 @@
1
+ import * as React from "react";
2
+ /** Which spelling of the modifier keys to render. */
3
+ export type KbdPlatform = "apple" | "generic";
4
+ export type KbdProps = Omit<React.ComponentProps<"kbd">, "children"> & {
5
+ /**
6
+ * The chord, one entry per key — `["Mod", "K"]`, `["Shift", "Enter"]`. Each
7
+ * key becomes its own cap inside a wrapping `<kbd>`. Omit it and pass
8
+ * `children` instead for a single free-form cap.
9
+ */
10
+ keys?: readonly string[];
11
+ /**
12
+ * Which modifier spelling to print. Defaults to `"generic"` (words); pass
13
+ * `useKbdPlatform()` to follow the reader's actual machine.
14
+ * @default "generic"
15
+ */
16
+ platform?: KbdPlatform;
17
+ /** A single key's label, when `keys` is not used. */
18
+ children?: React.ReactNode;
19
+ };
20
+ declare function Kbd({ keys, platform, className, children, ...props }: KbdProps): React.JSX.Element;
21
+ /**
22
+ * The reader's platform, resolved without breaking hydration.
23
+ *
24
+ * `useSyncExternalStore` is what makes that guarantee structural rather than
25
+ * careful: React uses the SERVER snapshot for the server pass and for the
26
+ * hydrating client render, then re-renders with the real one. So the two trees
27
+ * always agree — a `useEffect` + `setState` version would work too, but it
28
+ * would flip the value on a client-only mount as well, costing a second render
29
+ * on every page whether or not it was ever hydrated.
30
+ *
31
+ * On a plain `createRoot` render (Storybook, the app) there is no server pass,
32
+ * so the real platform is read on the first render and no flash occurs at all.
33
+ */
34
+ declare function useKbdPlatform(): KbdPlatform;
35
+ export { Kbd, useKbdPlatform };
@@ -0,0 +1,115 @@
1
+ "use client";
2
+ import { cn as e } from "../../lib/utils.js";
3
+ import * as t from "react";
4
+ import { jsx as n } from "react/jsx-runtime";
5
+ //#region src/components/typography/kbd.tsx
6
+ var r = {
7
+ mod: {
8
+ apple: "⌘",
9
+ generic: "Ctrl"
10
+ },
11
+ meta: {
12
+ apple: "⌘",
13
+ generic: "Win"
14
+ },
15
+ command: {
16
+ apple: "⌘",
17
+ generic: "Ctrl"
18
+ },
19
+ ctrl: {
20
+ apple: "⌃",
21
+ generic: "Ctrl"
22
+ },
23
+ control: {
24
+ apple: "⌃",
25
+ generic: "Ctrl"
26
+ },
27
+ alt: {
28
+ apple: "⌥",
29
+ generic: "Alt"
30
+ },
31
+ option: {
32
+ apple: "⌥",
33
+ generic: "Alt"
34
+ },
35
+ shift: {
36
+ apple: "⇧",
37
+ generic: "Shift"
38
+ },
39
+ enter: {
40
+ apple: "⏎",
41
+ generic: "Enter"
42
+ },
43
+ return: {
44
+ apple: "⏎",
45
+ generic: "Enter"
46
+ },
47
+ tab: {
48
+ apple: "⇥",
49
+ generic: "Tab"
50
+ },
51
+ backspace: {
52
+ apple: "⌫",
53
+ generic: "Backspace"
54
+ },
55
+ delete: {
56
+ apple: "⌦",
57
+ generic: "Delete"
58
+ },
59
+ escape: {
60
+ apple: "Esc",
61
+ generic: "Esc"
62
+ },
63
+ esc: {
64
+ apple: "Esc",
65
+ generic: "Esc"
66
+ },
67
+ space: {
68
+ apple: "Space",
69
+ generic: "Space"
70
+ },
71
+ up: {
72
+ apple: "↑",
73
+ generic: "↑"
74
+ },
75
+ down: {
76
+ apple: "↓",
77
+ generic: "↓"
78
+ },
79
+ left: {
80
+ apple: "←",
81
+ generic: "←"
82
+ },
83
+ right: {
84
+ apple: "→",
85
+ generic: "→"
86
+ }
87
+ };
88
+ function i(e, t) {
89
+ return r[e.toLowerCase()]?.[t] ?? e;
90
+ }
91
+ var a = "inline-flex items-center gap-1 whitespace-nowrap align-middle font-mono text-[0.8125em]", o = "inline-flex min-w-[1.6em] items-center justify-center rounded-sm border border-border bg-muted px-1 py-0.5 leading-none text-foreground";
92
+ function s({ keys: t, platform: r = "generic", className: s, children: c, ...l }) {
93
+ return /* @__PURE__ */ n("kbd", {
94
+ "data-slot": "kbd",
95
+ className: e(a, !t && o, s),
96
+ ...l,
97
+ children: t ? t.map((e, t) => /* @__PURE__ */ n("kbd", {
98
+ "data-slot": "kbd-key",
99
+ className: o,
100
+ children: i(e, r)
101
+ }, `${e}-${t}`)) : c
102
+ });
103
+ }
104
+ var c = () => () => {};
105
+ function l() {
106
+ return typeof navigator > "u" ? "generic" : /mac|iphone|ipad|ipod/i.test(`${navigator.platform ?? ""} ${navigator.userAgent ?? ""}`) ? "apple" : "generic";
107
+ }
108
+ var u = () => "generic";
109
+ function d() {
110
+ return t.useSyncExternalStore(c, l, u);
111
+ }
112
+ //#endregion
113
+ export { s as Kbd, d as useKbdPlatform };
114
+
115
+ //# sourceMappingURL=kbd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kbd.js","names":[],"sources":["../../../src/components/typography/kbd.tsx"],"mappings":";;;;;AAgFA,IAAM,IAAiE;CACrE,KAAK;EAAE,OAAO;EAAK,SAAS;CAAO;CACnC,MAAM;EAAE,OAAO;EAAK,SAAS;CAAM;CACnC,SAAS;EAAE,OAAO;EAAK,SAAS;CAAO;CACvC,MAAM;EAAE,OAAO;EAAK,SAAS;CAAO;CACpC,SAAS;EAAE,OAAO;EAAK,SAAS;CAAO;CACvC,KAAK;EAAE,OAAO;EAAK,SAAS;CAAM;CAClC,QAAQ;EAAE,OAAO;EAAK,SAAS;CAAM;CACrC,OAAO;EAAE,OAAO;EAAK,SAAS;CAAQ;CACtC,OAAO;EAAE,OAAO;EAAK,SAAS;CAAQ;CACtC,QAAQ;EAAE,OAAO;EAAK,SAAS;CAAQ;CACvC,KAAK;EAAE,OAAO;EAAK,SAAS;CAAM;CAClC,WAAW;EAAE,OAAO;EAAK,SAAS;CAAY;CAC9C,QAAQ;EAAE,OAAO;EAAK,SAAS;CAAS;CACxC,QAAQ;EAAE,OAAO;EAAO,SAAS;CAAM;CACvC,KAAK;EAAE,OAAO;EAAO,SAAS;CAAM;CACpC,OAAO;EAAE,OAAO;EAAS,SAAS;CAAQ;CAC1C,IAAI;EAAE,OAAO;EAAK,SAAS;CAAI;CAC/B,MAAM;EAAE,OAAO;EAAK,SAAS;CAAI;CACjC,MAAM;EAAE,OAAO;EAAK,SAAS;CAAI;CACjC,OAAO;EAAE,OAAO;EAAK,SAAS;CAAI;AACpC;AAGA,SAAS,EAAS,GAAa,GAA+B;CAC5D,OAAO,EAAW,EAAI,YAAY,EAAE,GAAG,MAAa;AACtD;AAIA,IAAM,IAAW,2FAKX,IACJ;AAmBF,SAAS,EAAI,EAAE,SAAM,cAAW,WAAW,cAAW,aAAU,GAAG,KAAmB;CACpF,OACE,kBAAC,OAAD;EAAK,aAAU;EAAM,WAAW,EAAG,GAAU,CAAC,KAAQ,GAAS,CAAS;EAAG,GAAI;EAC5E,UAAA,IACG,EAAK,KAAK,GAAK,MAIb,kBAAC,OAAD;GAA6B,aAAU;GAAU,WAAW;GACzD,UAAA,EAAS,GAAK,CAAQ;EACpB,GAFK,GAAG,EAAI,GAAG,GAEf,CACN,IACD;CACD,CAAA;AAET;AAOA,IAAM,gBAAiC,CAAC;AAOxC,SAAS,IAA4B;CAEnC,OADI,OAAO,YAAc,MAAoB,YACtC,wBAAwB,KAAK,GAAG,UAAU,YAAY,GAAG,GAAG,UAAU,aAAa,IAAI,IAAI,UAAU;AAC9G;AAGA,IAAM,UAAoC;AAe1C,SAAS,IAA8B;CACrC,OAAO,EAAM,qBAAqB,GAAoB,GAAc,CAAc;AACpF"}
@@ -1,8 +1,8 @@
1
1
  import { type VariantProps } from "class-variance-authority";
2
2
  import * as React from "react";
3
3
  declare const textVariants: (props?: ({
4
- size?: "base" | "lg" | "sm" | "xs" | null | undefined;
5
- tone?: "muted" | "default" | "destructive" | "info" | "success" | "warning" | null | undefined;
4
+ size?: "base" | "sm" | "lg" | "xs" | null | undefined;
5
+ tone?: "muted" | "destructive" | "default" | "info" | "success" | "warning" | null | undefined;
6
6
  weight?: "normal" | "medium" | "semibold" | null | undefined;
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
8
  interface TextProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof textVariants> {
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@
7
7
  * @source "../node_modules/@fiestaboard/ui/dist";
8
8
  */
9
9
  export * from "./components/containment/accordion";
10
+ export * from "./components/containment/action-card";
10
11
  export * from "./components/containment/card";
11
12
  export * from "./components/containment/collapsible";
12
13
  export * from "./components/containment/icon-tile";
@@ -20,6 +21,7 @@ export * from "./components/forms/button";
20
21
  export * from "./components/forms/checkbox";
21
22
  export * from "./components/forms/combobox";
22
23
  export * from "./components/forms/copy-button";
24
+ export * from "./components/forms/field";
23
25
  export * from "./components/forms/input";
24
26
  export * from "./components/forms/label";
25
27
  export * from "./components/forms/secret-input";
@@ -33,6 +35,7 @@ export * from "./components/overlays/lightbox";
33
35
  export * from "./components/overlays/popover";
34
36
  export * from "./components/typography/code";
35
37
  export * from "./components/typography/heading";
38
+ export * from "./components/typography/kbd";
36
39
  export * from "./components/typography/list";
37
40
  export * from "./components/containment/scroll-area";
38
41
  export * from "./components/containment/table";
@@ -67,9 +70,11 @@ export * from "./components/chrome/page-header";
67
70
  export * from "./components/chrome/page-inset";
68
71
  export * from "./components/chrome/page-layout";
69
72
  export * from "./components/chrome/page-toolbar";
73
+ export * from "./components/chrome/pagination";
70
74
  export * from "./components/chrome/sidebar";
71
75
  export * from "./components/chrome/skip-to-content";
72
76
  export * from "./components/chrome/theme-toggle";
77
+ export * from "./components/chrome/top-nav";
73
78
  export * from "./components/wizard/wizard-progress";
74
79
  export * from "./components/wizard/wizard-shell";
75
80
  export { cn } from "./lib/utils";