@knpkv/rly 0.6.1 → 0.9.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 (64) hide show
  1. package/README.md +85 -1
  2. package/dist/{Dialog-CplGpe1F.js → Dialog-_t9OodCK.js} +16 -12
  3. package/dist/Dialog-_t9OodCK.js.map +1 -0
  4. package/dist/ThemeProvider-BFeldMeE.js +87 -0
  5. package/dist/ThemeProvider-BFeldMeE.js.map +1 -0
  6. package/dist/base.css +17 -0
  7. package/dist/components.css +1 -1
  8. package/dist/dts/foundations/ThemeProvider.d.ts +31 -1
  9. package/dist/dts/foundations/ThemeProvider.d.ts.map +1 -1
  10. package/dist/dts/foundations/index.d.ts +2 -2
  11. package/dist/dts/foundations/index.d.ts.map +1 -1
  12. package/dist/dts/patterns/DecisionBar.d.ts +68 -0
  13. package/dist/dts/patterns/DecisionBar.d.ts.map +1 -0
  14. package/dist/dts/patterns/Hero.d.ts +69 -0
  15. package/dist/dts/patterns/Hero.d.ts.map +1 -0
  16. package/dist/dts/patterns/Region.d.ts +56 -0
  17. package/dist/dts/patterns/Region.d.ts.map +1 -0
  18. package/dist/dts/patterns/RelayDock.d.ts.map +1 -1
  19. package/dist/dts/patterns/StageRail.d.ts +11 -1
  20. package/dist/dts/patterns/StageRail.d.ts.map +1 -1
  21. package/dist/dts/patterns/TimelineRow.d.ts +25 -0
  22. package/dist/dts/patterns/TimelineRow.d.ts.map +1 -1
  23. package/dist/dts/patterns/index.d.ts +8 -2
  24. package/dist/dts/patterns/index.d.ts.map +1 -1
  25. package/dist/dts/primitives/ChartLegend.d.ts +23 -0
  26. package/dist/dts/primitives/ChartLegend.d.ts.map +1 -0
  27. package/dist/dts/primitives/LimitTrack.d.ts +62 -0
  28. package/dist/dts/primitives/LimitTrack.d.ts.map +1 -0
  29. package/dist/dts/primitives/Notice.d.ts +64 -0
  30. package/dist/dts/primitives/Notice.d.ts.map +1 -0
  31. package/dist/dts/primitives/Select.d.ts.map +1 -1
  32. package/dist/dts/primitives/StatePanel.d.ts +8 -1
  33. package/dist/dts/primitives/StatePanel.d.ts.map +1 -1
  34. package/dist/dts/primitives/ThemeSelect.d.ts +27 -0
  35. package/dist/dts/primitives/ThemeSelect.d.ts.map +1 -0
  36. package/dist/dts/primitives/TrackKey.d.ts +20 -0
  37. package/dist/dts/primitives/TrackKey.d.ts.map +1 -0
  38. package/dist/dts/primitives/index.d.ts +10 -0
  39. package/dist/dts/primitives/index.d.ts.map +1 -1
  40. package/dist/dts/tokens/semantic-tokens.d.ts +1 -1
  41. package/dist/dts/tokens/semantic-tokens.d.ts.map +1 -1
  42. package/dist/foundations/index.js +4 -4
  43. package/dist/generated-tokens.css +36 -0
  44. package/dist/index.js +9 -8
  45. package/dist/patterns/index.js +2 -2
  46. package/dist/{patterns-QMuqnQKw.js → patterns-lOWLKH70.js} +1247 -948
  47. package/dist/patterns-lOWLKH70.js.map +1 -0
  48. package/dist/primitives/index.js +3 -3
  49. package/dist/primitives-Dj-qYrUZ.js +583 -0
  50. package/dist/primitives-Dj-qYrUZ.js.map +1 -0
  51. package/dist/styles.css +1 -1
  52. package/dist/tokens/index.js +1 -1
  53. package/dist/{tokens-CjK9bxo7.js → tokens-DaF1m6rr.js} +2 -2
  54. package/dist/tokens-DaF1m6rr.js.map +1 -0
  55. package/package.json +3 -2
  56. package/registry/components.json +856 -12
  57. package/registry/search.json +215 -2
  58. package/dist/Dialog-CplGpe1F.js.map +0 -1
  59. package/dist/foundations-CEGDSEb-.js +0 -29
  60. package/dist/foundations-CEGDSEb-.js.map +0 -1
  61. package/dist/patterns-QMuqnQKw.js.map +0 -1
  62. package/dist/primitives-BXWPLy2C.js +0 -346
  63. package/dist/primitives-BXWPLy2C.js.map +0 -1
  64. package/dist/tokens-CjK9bxo7.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { A as e, C as t, D as n, E as r, O as i, S as a, T as o, _ as s, a as c, b as l, c as u, d, f, g as p, h as m, i as h, k as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T, v as E, w as D, x as O, y as k } from "../Dialog-CplGpe1F.js";
3
- import { a as A, c as j, d as M, f as N, h as P, i as F, l as I, m as L, n as R, o as z, p as B, r as V, s as H, t as U, u as W } from "../primitives-BXWPLy2C.js";
4
- export { k as Avatar, o as Button, w as Dialog, B as Divider, h as Field, p as IconButton, l as RLY_AVATAR_DEFAULT_VARIANTS, O as RLY_AVATAR_VARIANTS, r as RLY_BUTTON_DEFAULT_VARIANTS, n as RLY_BUTTON_VARIANTS, y as RLY_DIALOG_DEFAULT_VARIANTS, S as RLY_DIALOG_VARIANTS, L as RLY_DIVIDER_DEFAULT_VARIANTS, P as RLY_DIVIDER_VARIANTS, c as RLY_FIELD_DEFAULT_VARIANTS, b as RLY_FIELD_VARIANTS, s as RLY_ICON_BUTTON_DEFAULT_VARIANTS, E as RLY_ICON_BUTTON_VARIANTS, x as RLY_SELECT_DEFAULT_VARIANTS, v as RLY_SELECT_VARIANTS, i as RLY_SHEET_DEFAULT_VARIANTS, g as RLY_SHEET_VARIANTS, T as RLY_SKELETON_DEFAULT_VARIANTS, d as RLY_SKELETON_VARIANTS, a as RLY_STATE_LABEL_DEFAULT_VARIANTS, t as RLY_STATE_LABEL_VARIANTS, C as RLY_STATE_PANEL_DEFAULT_VARIANTS, u as RLY_STATE_PANEL_VARIANTS, W as RLY_SURFACE_DEFAULT_VARIANTS, M as RLY_SURFACE_VARIANTS, H as RLY_TABS_DEFAULT_VARIANTS, j as RLY_TABS_VARIANTS, F as RLY_TEXT_DEFAULT_VARIANTS, A as RLY_TEXT_VARIANTS, U as RLY_TOGGLE_GROUP_DEFAULT_VARIANTS, R as RLY_TOGGLE_GROUP_VARIANTS, m as Select, e as Sheet, f as Skeleton, D as StateLabel, _ as StatePanel, N as Surface, I as Tabs, z as Text, V as ToggleGroup };
2
+ import { A as e, C as t, D as n, E as r, O as i, S as a, T as o, _ as s, a as c, b as l, c as u, d, f, g as p, h as m, i as h, k as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T, v as E, w as D, x as O, y as k } from "../Dialog-_t9OodCK.js";
3
+ import { C as A, D as j, E as M, O as N, S as P, T as F, _ as I, a as L, b as R, c as z, d as B, f as V, g as H, h as U, i as W, l as G, m as K, n as q, o as J, p as Y, r as X, s as Z, t as Q, u as $, v as ee, w as te, x as ne, y as re } from "../primitives-Dj-qYrUZ.js";
4
+ export { k as Avatar, o as Button, M as ChartLegend, w as Dialog, A as Divider, h as Field, p as IconButton, re as LimitTrack, H as Notice, l as RLY_AVATAR_DEFAULT_VARIANTS, O as RLY_AVATAR_VARIANTS, r as RLY_BUTTON_DEFAULT_VARIANTS, n as RLY_BUTTON_VARIANTS, y as RLY_DIALOG_DEFAULT_VARIANTS, S as RLY_DIALOG_VARIANTS, te as RLY_DIVIDER_DEFAULT_VARIANTS, F as RLY_DIVIDER_VARIANTS, c as RLY_FIELD_DEFAULT_VARIANTS, b as RLY_FIELD_VARIANTS, s as RLY_ICON_BUTTON_DEFAULT_VARIANTS, E as RLY_ICON_BUTTON_VARIANTS, R as RLY_LIMIT_TRACK_DEFAULT_VARIANTS, ne as RLY_LIMIT_TRACK_VARIANTS, I as RLY_NOTICE_DEFAULT_VARIANTS, ee as RLY_NOTICE_VARIANTS, x as RLY_SELECT_DEFAULT_VARIANTS, v as RLY_SELECT_VARIANTS, j as RLY_SERIES, i as RLY_SHEET_DEFAULT_VARIANTS, g as RLY_SHEET_VARIANTS, T as RLY_SKELETON_DEFAULT_VARIANTS, d as RLY_SKELETON_VARIANTS, a as RLY_STATE_LABEL_DEFAULT_VARIANTS, t as RLY_STATE_LABEL_VARIANTS, C as RLY_STATE_PANEL_DEFAULT_VARIANTS, u as RLY_STATE_PANEL_VARIANTS, Y as RLY_SURFACE_DEFAULT_VARIANTS, K as RLY_SURFACE_VARIANTS, $ as RLY_TABS_DEFAULT_VARIANTS, B as RLY_TABS_VARIANTS, Z as RLY_TEXT_DEFAULT_VARIANTS, z as RLY_TEXT_VARIANTS, X as RLY_TOGGLE_GROUP_DEFAULT_VARIANTS, W as RLY_TOGGLE_GROUP_VARIANTS, Q as RLY_TRACK_KEY_MARKS, m as Select, e as Sheet, f as Skeleton, D as StateLabel, _ as StatePanel, U as Surface, V as Tabs, G as Text, J as ThemeSelect, L as ToggleGroup, q as TrackKey, P as limitTrackTone, N as rlySeriesColor };
5
5
 
6
6
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,583 @@
1
+ import { r as e, t } from "./ThemeProvider-BFeldMeE.js";
2
+ import { i as n } from "./PortalProvider-CN_81Fy3.js";
3
+ import { i as r, n as i, r as a, t as o } from "./component-DKy8kjZl.js";
4
+ import { h as s, i as c } from "./Dialog-_t9OodCK.js";
5
+ import { RadioGroup as l, Tabs as u } from "radix-ui";
6
+ import { createElement as d, useRef as f } from "react";
7
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
8
+ var h = {
9
+ root: "rly_ChartLegend-module__root",
10
+ item: "rly_ChartLegend-module__item",
11
+ swatch: "rly_ChartLegend-module__swatch"
12
+ }, g = (e) => i(h, e), _ = [
13
+ 1,
14
+ 2,
15
+ 3,
16
+ 4,
17
+ 5,
18
+ 6,
19
+ 7,
20
+ 8,
21
+ "other"
22
+ ], v = (e) => `var(--rly-color-series-${e})`, y = (e) => {
23
+ let t = /* @__PURE__ */ new Set();
24
+ for (let n of e) {
25
+ let e = r(n.id, "ChartLegend item id");
26
+ if (t.has(e)) throw Error(`ChartLegend item ids must be unique: ${e}`);
27
+ t.add(e);
28
+ }
29
+ }, b = ({ className: e, items: t, label: n, ...i }) => (y(t), t.length === 0 ? null : /* @__PURE__ */ p("ul", {
30
+ ...i,
31
+ "aria-label": r(n, "ChartLegend label"),
32
+ className: o(g("root"), e),
33
+ role: "list",
34
+ children: t.map((e) => /* @__PURE__ */ m("li", {
35
+ className: g("item"),
36
+ children: [/* @__PURE__ */ p("span", {
37
+ "aria-hidden": "true",
38
+ className: g("swatch"),
39
+ "data-series": String(e.series),
40
+ style: { background: v(e.series) }
41
+ }), r(e.label, "ChartLegend item label")]
42
+ }, e.id))
43
+ })), x = {
44
+ root: "rly_Divider-module__root",
45
+ horizontal: "rly_Divider-module__horizontal",
46
+ vertical: "rly_Divider-module__vertical",
47
+ subtle: "rly_Divider-module__subtle",
48
+ strong: "rly_Divider-module__strong"
49
+ }, S = (e) => i(x, e), C = a({
50
+ orientation: {
51
+ horizontal: {
52
+ className: S("horizontal"),
53
+ purpose: "Separate stacked content",
54
+ tokens: ["space-0"]
55
+ },
56
+ vertical: {
57
+ className: S("vertical"),
58
+ purpose: "Separate adjacent content",
59
+ tokens: ["space-0"]
60
+ }
61
+ },
62
+ strength: {
63
+ subtle: {
64
+ className: S("subtle"),
65
+ purpose: "Quiet structural boundary",
66
+ tokens: ["color-border-1"]
67
+ },
68
+ strong: {
69
+ className: S("strong"),
70
+ purpose: "Explicit structural boundary",
71
+ tokens: ["color-border-2"]
72
+ }
73
+ }
74
+ }), ee = a({
75
+ orientation: "horizontal",
76
+ strength: "subtle"
77
+ }), te = ({ className: e, decorative: t = !0, label: n, orientation: i = "horizontal", strength: a = "subtle", ...s }) => {
78
+ if (!t && n === void 0) throw Error("Semantic Divider label must contain visible text");
79
+ let c = t || n === void 0 ? void 0 : r(n, "Semantic Divider label");
80
+ return /* @__PURE__ */ p("div", {
81
+ ...s,
82
+ "aria-hidden": t ? "true" : void 0,
83
+ "aria-label": c,
84
+ "aria-orientation": t ? void 0 : i,
85
+ className: o(S("root"), C.orientation[i].className, C.strength[a].className, e),
86
+ role: t ? "presentation" : "separator"
87
+ });
88
+ }, w = {
89
+ root: "rly_LimitTrack-module__root",
90
+ defaultSize: "rly_LimitTrack-module__defaultSize",
91
+ slim: "rly_LimitTrack-module__slim",
92
+ fill: "rly_LimitTrack-module__fill",
93
+ projection: "rly_LimitTrack-module__projection",
94
+ near: "rly_LimitTrack-module__near"
95
+ }, T = (e) => i(w, e), E = a({ size: {
96
+ default: {
97
+ className: T("defaultSize"),
98
+ purpose: "A limit beside its numbers",
99
+ tokens: ["space-12", "radius-tag"]
100
+ },
101
+ slim: {
102
+ className: T("slim"),
103
+ purpose: "A limit inside a dense row",
104
+ tokens: ["space-6", "radius-tag"]
105
+ }
106
+ } }), D = a({ size: "default" }), O = (e) => e !== null && Number.isFinite(e) ? e : null, k = (e, t) => {
107
+ if (!Number.isFinite(e)) throw Error(`${t} must be a finite number`);
108
+ return e;
109
+ }, A = (e, t) => {
110
+ let n = k(t, "limitTrackTone near"), r = O(e);
111
+ return r === null ? "unknown" : r >= 100 ? "full" : r >= n ? "near" : "ok";
112
+ }, j = (e) => Math.min(100, Math.max(0, e)), M = ({ className: e, decorative: t = !0, label: n, near: i = 80, projected: a, size: s = D.size, stale: c = !1, value: l, valueText: u, ...d }) => {
113
+ let f = O(l), h = k(i, "LimitTrack near"), g = !t, _ = g ? r(n ?? "", "LimitTrack label") : void 0, v = g ? r(u ?? "", "LimitTrack valueText") : void 0, y = g && f !== null, b = f !== null && a !== void 0 && Number.isFinite(a) && a > f ? {
114
+ start: j(f),
115
+ length: j(a) - j(f)
116
+ } : null;
117
+ return /* @__PURE__ */ m("span", {
118
+ ...d,
119
+ "aria-hidden": g ? void 0 : "true",
120
+ "aria-label": g && !y ? `${_}: ${v}` : _,
121
+ "aria-valuemax": y ? 100 : void 0,
122
+ "aria-valuemin": y ? 0 : void 0,
123
+ "aria-valuenow": y && f !== null ? j(f) : void 0,
124
+ "aria-valuetext": y ? v : void 0,
125
+ className: o(T("root"), E.size[s].className, e),
126
+ "data-stale": c ? "true" : void 0,
127
+ "data-tone": A(f, h),
128
+ role: g ? y ? "meter" : "img" : void 0,
129
+ children: [
130
+ f === null ? null : /* @__PURE__ */ p("span", {
131
+ className: T("fill"),
132
+ "data-part": "fill",
133
+ style: { inlineSize: `${j(f)}%` }
134
+ }),
135
+ b === null ? null : /* @__PURE__ */ p("span", {
136
+ className: T("projection"),
137
+ "data-part": "projection",
138
+ style: {
139
+ inlineSize: `${b.length}%`,
140
+ insetInlineStart: `${b.start}%`
141
+ }
142
+ }),
143
+ /* @__PURE__ */ p("span", {
144
+ className: T("near"),
145
+ "data-part": "near",
146
+ style: { insetInlineStart: `min(${j(h)}%, 100% - 1px)` }
147
+ })
148
+ ]
149
+ });
150
+ }, ne = {
151
+ root: "rly_Notice-module__root",
152
+ neutral: "rly_Notice-module__neutral",
153
+ positive: "rly_Notice-module__positive",
154
+ critical: "rly_Notice-module__critical",
155
+ caution: "rly_Notice-module__caution",
156
+ progress: "rly_Notice-module__progress",
157
+ icon: "rly_Notice-module__icon",
158
+ lead: "rly_Notice-module__lead",
159
+ message: "rly_Notice-module__message",
160
+ action: "rly_Notice-module__action"
161
+ }, N = (e) => i(ne, e), P = a({ tone: {
162
+ neutral: {
163
+ className: N("neutral"),
164
+ purpose: "Neutral context",
165
+ tokens: [
166
+ "color-text-2",
167
+ "color-surface-2",
168
+ "color-border-1"
169
+ ]
170
+ },
171
+ positive: {
172
+ className: N("positive"),
173
+ purpose: "Completed outcome",
174
+ tokens: ["color-success-ink", "color-success-tint"]
175
+ },
176
+ critical: {
177
+ className: N("critical"),
178
+ purpose: "Failure that needs attention",
179
+ tokens: ["color-blocked-ink", "color-blocked-tint"]
180
+ },
181
+ caution: {
182
+ className: N("caution"),
183
+ purpose: "Limitation or warning",
184
+ tokens: ["color-held-ink", "color-held-tint"]
185
+ },
186
+ progress: {
187
+ className: N("progress"),
188
+ purpose: "Work in progress",
189
+ tokens: ["color-deploying-ink", "color-deploying-tint"]
190
+ }
191
+ } }), F = a({ tone: "neutral" }), I = {
192
+ neutral: void 0,
193
+ positive: "check",
194
+ critical: "alert",
195
+ caution: "clock",
196
+ progress: "loader"
197
+ }, re = ({ action: e, announce: t = "off", children: r, className: i, icon: a, tone: s = "neutral", ...c }) => {
198
+ let l = a ?? I[s], u = t === "assertive" ? "alert" : t === "polite" ? "status" : c.role;
199
+ return /* @__PURE__ */ m("div", {
200
+ ...c,
201
+ "aria-live": t === "off" ? void 0 : t,
202
+ className: o(N("root"), P.tone[s].className, i),
203
+ role: u,
204
+ children: [/* @__PURE__ */ m("div", {
205
+ className: N("lead"),
206
+ children: [l === void 0 ? null : /* @__PURE__ */ p("span", {
207
+ "aria-hidden": "true",
208
+ className: N("icon"),
209
+ children: /* @__PURE__ */ p(n, {
210
+ decorative: !0,
211
+ name: l,
212
+ size: "small"
213
+ })
214
+ }), /* @__PURE__ */ p("div", {
215
+ className: N("message"),
216
+ children: r
217
+ })]
218
+ }), e === void 0 ? null : /* @__PURE__ */ p("div", {
219
+ className: N("action"),
220
+ children: e
221
+ })]
222
+ });
223
+ }, ie = {
224
+ root: "rly_Surface-module__root",
225
+ tonePrimary: "rly_Surface-module__tonePrimary",
226
+ toneSecondary: "rly_Surface-module__toneSecondary",
227
+ toneTertiary: "rly_Surface-module__toneTertiary",
228
+ shapeCard: "rly_Surface-module__shapeCard",
229
+ shapeGrouped: "rly_Surface-module__shapeGrouped",
230
+ paddingNone: "rly_Surface-module__paddingNone",
231
+ paddingCompact: "rly_Surface-module__paddingCompact",
232
+ paddingDefault: "rly_Surface-module__paddingDefault",
233
+ paddingSpacious: "rly_Surface-module__paddingSpacious"
234
+ }, L = (e) => i(ie, e), R = a({
235
+ tone: {
236
+ primary: {
237
+ className: L("tonePrimary"),
238
+ purpose: "Primary bordered surface",
239
+ tokens: ["color-surface-1", "color-border-1"]
240
+ },
241
+ secondary: {
242
+ className: L("toneSecondary"),
243
+ purpose: "Quiet secondary surface",
244
+ tokens: ["color-surface-2"]
245
+ },
246
+ tertiary: {
247
+ className: L("toneTertiary"),
248
+ purpose: "Inset tertiary surface",
249
+ tokens: ["color-surface-3"]
250
+ }
251
+ },
252
+ form: {
253
+ card: {
254
+ className: L("shapeCard"),
255
+ purpose: "Standard card geometry",
256
+ tokens: ["radius-control"]
257
+ },
258
+ grouped: {
259
+ className: L("shapeGrouped"),
260
+ purpose: "Grouped content geometry",
261
+ tokens: ["radius-group"]
262
+ }
263
+ },
264
+ padding: {
265
+ none: {
266
+ className: L("paddingNone"),
267
+ purpose: "Caller-owned internal layout",
268
+ tokens: ["space-0"]
269
+ },
270
+ compact: {
271
+ className: L("paddingCompact"),
272
+ purpose: "Dense supporting content",
273
+ tokens: ["space-16"]
274
+ },
275
+ default: {
276
+ className: L("paddingDefault"),
277
+ purpose: "Standard content",
278
+ tokens: ["space-24"]
279
+ },
280
+ spacious: {
281
+ className: L("paddingSpacious"),
282
+ purpose: "Prominent grouped content",
283
+ tokens: ["space-32"]
284
+ }
285
+ }
286
+ }), ae = a({
287
+ tone: "primary",
288
+ form: "card",
289
+ padding: "default"
290
+ }), z = ({ as: e, children: t, className: n, form: r = "card", padding: i = "default", ref: a, tone: s = "primary", ...c }) => d(e ?? "div", {
291
+ ...c,
292
+ className: o(L("root"), R.tone[s].className, R.form[r].className, R.padding[i].className, n),
293
+ ref: a
294
+ }, t), B = {
295
+ root: "rly_Tabs-module__root",
296
+ list: "rly_Tabs-module__list",
297
+ trigger: "rly_Tabs-module__trigger",
298
+ defaultSize: "rly_Tabs-module__defaultSize",
299
+ large: "rly_Tabs-module__large",
300
+ panel: "rly_Tabs-module__panel"
301
+ }, V = (e) => i(B, e), H = a({ size: {
302
+ default: {
303
+ className: V("defaultSize"),
304
+ purpose: "Standard section navigation",
305
+ tokens: [
306
+ "type-label",
307
+ "space-40",
308
+ "space-4"
309
+ ]
310
+ },
311
+ large: {
312
+ className: V("large"),
313
+ purpose: "Prominent page-level navigation",
314
+ tokens: ["type-body", "space-48"]
315
+ }
316
+ } }), U = a({ size: "default" }), W = (e) => {
317
+ if (e.length === 0) throw Error("Tabs items must contain at least one enabled tab");
318
+ let t = /* @__PURE__ */ new Set(), n;
319
+ for (let i of e) {
320
+ let e = r(i.value, "Tab value");
321
+ if (r(i.label, `Tab label for ${e}`), t.has(e)) throw Error(`Tabs item values must be unique: ${e}`);
322
+ t.add(e), !i.disabled && n === void 0 && (n = i);
323
+ }
324
+ if (n === void 0) throw Error("Tabs items must contain at least one enabled tab");
325
+ return n;
326
+ }, G = ({ "aria-label": e, className: t, defaultValue: n, direction: i, items: a, onValueChange: s, ref: c, size: l = "default", value: f, ...h }) => {
327
+ let g = r(e, "Tabs aria-label"), _ = W(a), v = f ?? n ?? _.value, y = a.find((e) => e.value === v);
328
+ if (y === void 0 || y.disabled) throw Error(`Tabs selected value must identify an enabled tab: ${v}`);
329
+ let b = f === void 0 ? s === void 0 ? { defaultValue: v } : {
330
+ defaultValue: v,
331
+ onValueChange: s
332
+ } : {
333
+ onValueChange: s,
334
+ value: f
335
+ }, x = i === void 0 ? {} : { dir: i };
336
+ return /* @__PURE__ */ m(u.Root, {
337
+ ...h,
338
+ ...b,
339
+ ...x,
340
+ activationMode: "automatic",
341
+ className: o(V("root"), H.size[l].className, t),
342
+ orientation: "horizontal",
343
+ ref: c,
344
+ children: [/* @__PURE__ */ p(u.List, {
345
+ "aria-label": g,
346
+ className: V("list"),
347
+ loop: !0,
348
+ children: a.map((e) => /* @__PURE__ */ p(u.Trigger, {
349
+ className: V("trigger"),
350
+ "data-tab-value": e.value,
351
+ disabled: e.disabled,
352
+ value: e.value,
353
+ children: e.label
354
+ }, e.value))
355
+ }), a.map((e) => /* @__PURE__ */ d(u.Content, {
356
+ className: V("panel"),
357
+ ...e.forceMount === void 0 ? {} : { forceMount: e.forceMount },
358
+ key: e.value,
359
+ value: e.value
360
+ }, e.content))]
361
+ });
362
+ }, K = {
363
+ root: "rly_Text-module__root",
364
+ verdict: "rly_Text-module__verdict",
365
+ pageTitle: "rly_Text-module__pageTitle",
366
+ sectionTitle: "rly_Text-module__sectionTitle",
367
+ cardTitle: "rly_Text-module__cardTitle",
368
+ bodyLarge: "rly_Text-module__bodyLarge",
369
+ body: "rly_Text-module__body",
370
+ label: "rly_Text-module__label",
371
+ meta: "rly_Text-module__meta",
372
+ code: "rly_Text-module__code",
373
+ tonePrimary: "rly_Text-module__tonePrimary",
374
+ toneSecondary: "rly_Text-module__toneSecondary",
375
+ toneTertiary: "rly_Text-module__toneTertiary",
376
+ toneInherit: "rly_Text-module__toneInherit"
377
+ }, q = (e) => i(K, e), J = a({
378
+ variant: {
379
+ verdict: {
380
+ className: q("verdict"),
381
+ purpose: "One restrained verdict thesis",
382
+ tokens: ["type-verdict"]
383
+ },
384
+ "page-title": {
385
+ className: q("pageTitle"),
386
+ purpose: "Primary page title",
387
+ tokens: ["type-page-title"]
388
+ },
389
+ "section-title": {
390
+ className: q("sectionTitle"),
391
+ purpose: "Section heading",
392
+ tokens: ["type-section-title"]
393
+ },
394
+ "card-title": {
395
+ className: q("cardTitle"),
396
+ purpose: "Card or panel heading",
397
+ tokens: ["type-card-title"]
398
+ },
399
+ "body-large": {
400
+ className: q("bodyLarge"),
401
+ purpose: "Leading explanatory copy",
402
+ tokens: ["type-body-large"]
403
+ },
404
+ body: {
405
+ className: q("body"),
406
+ purpose: "Default interface copy",
407
+ tokens: ["type-body"]
408
+ },
409
+ label: {
410
+ className: q("label"),
411
+ purpose: "Control and metadata labels",
412
+ tokens: ["type-label"]
413
+ },
414
+ meta: {
415
+ className: q("meta"),
416
+ purpose: "Supporting metadata",
417
+ tokens: ["type-meta"]
418
+ },
419
+ code: {
420
+ className: q("code"),
421
+ purpose: "Code and tabular data",
422
+ tokens: ["type-code"]
423
+ }
424
+ },
425
+ tone: {
426
+ primary: {
427
+ className: q("tonePrimary"),
428
+ purpose: "Primary readable text",
429
+ tokens: ["color-text-1"]
430
+ },
431
+ secondary: {
432
+ className: q("toneSecondary"),
433
+ purpose: "Supporting text",
434
+ tokens: ["color-text-2"]
435
+ },
436
+ tertiary: {
437
+ className: q("toneTertiary"),
438
+ purpose: "Restricted tertiary text",
439
+ tokens: ["color-text-3"]
440
+ },
441
+ inherit: {
442
+ className: q("toneInherit"),
443
+ purpose: "Inherit semantic context",
444
+ tokens: []
445
+ }
446
+ }
447
+ }), Y = a({
448
+ variant: "body",
449
+ tone: "primary"
450
+ }), oe = (e) => e === "code" ? "code" : e === "verdict" ? "p" : e === "label" || e === "meta" ? "span" : "p", se = ({ as: e, children: t, className: n, ref: r, tone: i = Y.tone, variant: a = Y.variant, ...s }) => d(e ?? oe(a), {
451
+ ...s,
452
+ className: o(q("root"), J.variant[a].className, J.tone[i].className, n),
453
+ ref: r
454
+ }, t), ce = { intrinsic: "rly_ThemeSelect-module__intrinsic" }, le = {
455
+ system: "System",
456
+ light: "Light",
457
+ dark: "Dark"
458
+ }, X = t.map((e) => ({
459
+ label: le[e],
460
+ value: e
461
+ })), ue = ({ className: t, label: n = "Appearance", labelVisibility: r = "visible", onValueChange: a, size: l = "compact", value: u }) => {
462
+ let d = (t) => {
463
+ let n = e(t);
464
+ n !== void 0 && a(n);
465
+ };
466
+ return r === "hidden" ? /* @__PURE__ */ p(s, {
467
+ "aria-label": n,
468
+ className: o(i(ce, "intrinsic"), t),
469
+ onValueChange: d,
470
+ options: X,
471
+ size: l,
472
+ value: u
473
+ }) : /* @__PURE__ */ p(c, {
474
+ ...t === void 0 ? {} : { className: t },
475
+ label: n,
476
+ size: l,
477
+ children: (e) => /* @__PURE__ */ p(s, {
478
+ ...e,
479
+ onValueChange: d,
480
+ options: X,
481
+ size: l,
482
+ value: u
483
+ })
484
+ });
485
+ }, de = {
486
+ root: "rly_ToggleGroup-module__root",
487
+ item: "rly_ToggleGroup-module__item",
488
+ defaultSize: "rly_ToggleGroup-module__defaultSize",
489
+ compact: "rly_ToggleGroup-module__compact"
490
+ }, Z = (e) => i(de, e), Q = a({ size: {
491
+ compact: {
492
+ className: Z("compact"),
493
+ purpose: "Dense filter rows beside other controls",
494
+ tokens: [
495
+ "type-meta",
496
+ "space-32",
497
+ "space-2"
498
+ ]
499
+ },
500
+ default: {
501
+ className: Z("defaultSize"),
502
+ purpose: "Standard view and filter choices",
503
+ tokens: [
504
+ "type-label",
505
+ "space-40",
506
+ "space-2"
507
+ ]
508
+ }
509
+ } }), fe = a({ size: "default" }), pe = (e) => e === "ArrowLeft" || e === "ArrowUp" ? -1 : e === "ArrowRight" || e === "ArrowDown" ? 1 : null, me = (e, t) => {
510
+ let n = /* @__PURE__ */ new Set();
511
+ for (let t of e) {
512
+ let e = r(t.value, "ToggleGroup item value");
513
+ if (r(t.label, `ToggleGroup item label for ${e}`), n.has(e)) throw Error(`ToggleGroup item values must be unique: ${e}`);
514
+ n.add(e);
515
+ }
516
+ if (!n.has(t)) throw Error(`ToggleGroup value must identify an option: ${t}`);
517
+ }, he = ({ "aria-label": e, className: t, items: n, onValueChange: i, ref: a, size: s = "default", value: c, ...u }) => {
518
+ let d = r(e, "ToggleGroup aria-label");
519
+ me(n, c);
520
+ let m = f(/* @__PURE__ */ new Map()), h = (e, t) => {
521
+ let r = pe(e.key);
522
+ if (r === null) return;
523
+ e.preventDefault();
524
+ let a = n[(t + r + n.length) % n.length];
525
+ a !== void 0 && (a.value !== c && i(a.value), m.current.get(a.value)?.focus());
526
+ };
527
+ return /* @__PURE__ */ p(l.Root, {
528
+ ...u,
529
+ "aria-label": d,
530
+ className: o(Z("root"), Q.size[s].className, t),
531
+ loop: !0,
532
+ onValueChange: i,
533
+ orientation: "horizontal",
534
+ ref: a,
535
+ value: c,
536
+ children: n.map((e, t) => /* @__PURE__ */ p(l.Item, {
537
+ className: Z("item"),
538
+ onKeyDown: (e) => h(e, t),
539
+ ref: (t) => {
540
+ t === null ? m.current.delete(e.value) : m.current.set(e.value, t);
541
+ },
542
+ value: e.value,
543
+ children: e.label
544
+ }, e.value))
545
+ });
546
+ }, ge = {
547
+ root: "rly_TrackKey-module__root",
548
+ item: "rly_TrackKey-module__item",
549
+ near: "rly_TrackKey-module__near",
550
+ projected: "rly_TrackKey-module__projected",
551
+ stale: "rly_TrackKey-module__stale",
552
+ unknown: "rly_TrackKey-module__unknown"
553
+ }, $ = (e) => i(ge, e), _e = [
554
+ "near",
555
+ "projected",
556
+ "stale",
557
+ "unknown"
558
+ ], ve = ({ className: e, items: t, label: n, ...i }) => {
559
+ if (t.length === 0) throw Error("TrackKey needs at least one mark to explain");
560
+ let a = /* @__PURE__ */ new Set();
561
+ for (let e of t) {
562
+ if (a.has(e.mark)) throw Error(`TrackKey marks must be unique: ${e.mark}`);
563
+ a.add(e.mark);
564
+ }
565
+ return /* @__PURE__ */ p("ul", {
566
+ ...i,
567
+ "aria-label": r(n, "TrackKey label"),
568
+ className: o($("root"), e),
569
+ role: "list",
570
+ children: t.map((e) => /* @__PURE__ */ m("li", {
571
+ className: $("item"),
572
+ children: [/* @__PURE__ */ p("span", {
573
+ "aria-hidden": "true",
574
+ className: $(e.mark),
575
+ "data-mark": e.mark
576
+ }), r(e.label, "TrackKey item label")]
577
+ }, e.mark))
578
+ });
579
+ };
580
+ //#endregion
581
+ export { te as C, _ as D, b as E, v as O, A as S, C as T, F as _, he as a, D as b, J as c, H as d, G as f, re as g, z as h, Q as i, se as l, R as m, ve as n, ue as o, ae as p, fe as r, Y as s, _e as t, U as u, P as v, ee as w, E as x, M as y };
582
+
583
+ //# sourceMappingURL=primitives-Dj-qYrUZ.js.map