@cjlapao/ui-kit 0.2.3 → 0.2.5

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 (102) hide show
  1. package/dist/{CapsuleBlueprint-DwDZ7nii.d.cts → CapsuleBlueprint-BI0jdbTt.d.cts} +16 -1
  2. package/dist/{CapsuleBlueprint-DwDZ7nii.d.ts → CapsuleBlueprint-BI0jdbTt.d.ts} +16 -1
  3. package/dist/index.cjs +1158 -713
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.css +73 -0
  6. package/dist/index.d.cts +320 -46
  7. package/dist/index.d.ts +320 -46
  8. package/dist/index.js +1077 -639
  9. package/dist/index.js.map +1 -1
  10. package/dist/markdown.cjs.map +1 -1
  11. package/dist/markdown.d.cts +2 -2
  12. package/dist/markdown.d.ts +2 -2
  13. package/dist/markdown.js.map +1 -1
  14. package/package.json +3 -3
  15. package/dist/CapsuleBlueprint--CgRT7dr.d.cts +0 -426
  16. package/dist/CapsuleBlueprint--CgRT7dr.d.ts +0 -426
  17. package/dist/CapsuleBlueprint-12uQWAvU.d.cts +0 -732
  18. package/dist/CapsuleBlueprint-12uQWAvU.d.ts +0 -732
  19. package/dist/CapsuleBlueprint-1FP6avn4.d.cts +0 -1017
  20. package/dist/CapsuleBlueprint-1FP6avn4.d.ts +0 -1017
  21. package/dist/CapsuleBlueprint-6DmJgar9.d.cts +0 -358
  22. package/dist/CapsuleBlueprint-6DmJgar9.d.ts +0 -358
  23. package/dist/CapsuleBlueprint-B7MPc5wu.d.cts +0 -835
  24. package/dist/CapsuleBlueprint-B7MPc5wu.d.ts +0 -835
  25. package/dist/CapsuleBlueprint-BFHAMKUF.d.cts +0 -991
  26. package/dist/CapsuleBlueprint-BFHAMKUF.d.ts +0 -991
  27. package/dist/CapsuleBlueprint-BG23ZWsl.d.cts +0 -460
  28. package/dist/CapsuleBlueprint-BG23ZWsl.d.ts +0 -460
  29. package/dist/CapsuleBlueprint-BGx-KPqS.d.cts +0 -925
  30. package/dist/CapsuleBlueprint-BGx-KPqS.d.ts +0 -925
  31. package/dist/CapsuleBlueprint-BJYVRyFD.d.cts +0 -449
  32. package/dist/CapsuleBlueprint-BJYVRyFD.d.ts +0 -449
  33. package/dist/CapsuleBlueprint-BQq4ywG4.d.cts +0 -835
  34. package/dist/CapsuleBlueprint-BQq4ywG4.d.ts +0 -835
  35. package/dist/CapsuleBlueprint-BTgmUcyF.d.cts +0 -278
  36. package/dist/CapsuleBlueprint-BTgmUcyF.d.ts +0 -278
  37. package/dist/CapsuleBlueprint-BX2YI1yC.d.cts +0 -415
  38. package/dist/CapsuleBlueprint-BX2YI1yC.d.ts +0 -415
  39. package/dist/CapsuleBlueprint-BfPODmvJ.d.cts +0 -822
  40. package/dist/CapsuleBlueprint-BfPODmvJ.d.ts +0 -822
  41. package/dist/CapsuleBlueprint-BfSPPu5k.d.cts +0 -616
  42. package/dist/CapsuleBlueprint-BfSPPu5k.d.ts +0 -616
  43. package/dist/CapsuleBlueprint-BoPkPR2J.d.cts +0 -785
  44. package/dist/CapsuleBlueprint-BoPkPR2J.d.ts +0 -785
  45. package/dist/CapsuleBlueprint-CJeLH0j2.d.cts +0 -228
  46. package/dist/CapsuleBlueprint-CJeLH0j2.d.ts +0 -228
  47. package/dist/CapsuleBlueprint-CJwXDMzM.d.cts +0 -622
  48. package/dist/CapsuleBlueprint-CJwXDMzM.d.ts +0 -622
  49. package/dist/CapsuleBlueprint-CM125BJI.d.cts +0 -811
  50. package/dist/CapsuleBlueprint-CM125BJI.d.ts +0 -811
  51. package/dist/CapsuleBlueprint-CQPeacGV.d.cts +0 -426
  52. package/dist/CapsuleBlueprint-CQPeacGV.d.ts +0 -426
  53. package/dist/CapsuleBlueprint-CQy2O0UN.d.cts +0 -889
  54. package/dist/CapsuleBlueprint-CQy2O0UN.d.ts +0 -889
  55. package/dist/CapsuleBlueprint-CRy04iCR.d.cts +0 -695
  56. package/dist/CapsuleBlueprint-CRy04iCR.d.ts +0 -695
  57. package/dist/CapsuleBlueprint-CixXdjMu.d.cts +0 -925
  58. package/dist/CapsuleBlueprint-CixXdjMu.d.ts +0 -925
  59. package/dist/CapsuleBlueprint-CjCxwO1O.d.cts +0 -786
  60. package/dist/CapsuleBlueprint-CjCxwO1O.d.ts +0 -786
  61. package/dist/CapsuleBlueprint-Cm10IA2w.d.cts +0 -342
  62. package/dist/CapsuleBlueprint-Cm10IA2w.d.ts +0 -342
  63. package/dist/CapsuleBlueprint-CoGsooJJ.d.cts +0 -492
  64. package/dist/CapsuleBlueprint-CoGsooJJ.d.ts +0 -492
  65. package/dist/CapsuleBlueprint-CpHqUsJK.d.cts +0 -786
  66. package/dist/CapsuleBlueprint-CpHqUsJK.d.ts +0 -786
  67. package/dist/CapsuleBlueprint-CrRg8EVW.d.cts +0 -358
  68. package/dist/CapsuleBlueprint-CrRg8EVW.d.ts +0 -358
  69. package/dist/CapsuleBlueprint-DGxsd0aY.d.cts +0 -785
  70. package/dist/CapsuleBlueprint-DGxsd0aY.d.ts +0 -785
  71. package/dist/CapsuleBlueprint-DYnwizSo.d.cts +0 -698
  72. package/dist/CapsuleBlueprint-DYnwizSo.d.ts +0 -698
  73. package/dist/CapsuleBlueprint-DbLSB78P.d.cts +0 -235
  74. package/dist/CapsuleBlueprint-DbLSB78P.d.ts +0 -235
  75. package/dist/CapsuleBlueprint-DfV8XBEZ.d.cts +0 -1001
  76. package/dist/CapsuleBlueprint-DfV8XBEZ.d.ts +0 -1001
  77. package/dist/CapsuleBlueprint-DiG1FUoM.d.cts +0 -757
  78. package/dist/CapsuleBlueprint-DiG1FUoM.d.ts +0 -757
  79. package/dist/CapsuleBlueprint-DvdeHC13.d.cts +0 -289
  80. package/dist/CapsuleBlueprint-DvdeHC13.d.ts +0 -289
  81. package/dist/CapsuleBlueprint-DvinXyHp.d.cts +0 -342
  82. package/dist/CapsuleBlueprint-DvinXyHp.d.ts +0 -342
  83. package/dist/CapsuleBlueprint-DwW8YOJg.d.cts +0 -925
  84. package/dist/CapsuleBlueprint-DwW8YOJg.d.ts +0 -925
  85. package/dist/CapsuleBlueprint-E069msDY.d.cts +0 -310
  86. package/dist/CapsuleBlueprint-E069msDY.d.ts +0 -310
  87. package/dist/CapsuleBlueprint-LECoxlXA.d.cts +0 -497
  88. package/dist/CapsuleBlueprint-LECoxlXA.d.ts +0 -497
  89. package/dist/CapsuleBlueprint-V9pDg6lh.d.cts +0 -247
  90. package/dist/CapsuleBlueprint-V9pDg6lh.d.ts +0 -247
  91. package/dist/CapsuleBlueprint-bOLrWbIc.d.cts +0 -858
  92. package/dist/CapsuleBlueprint-bOLrWbIc.d.ts +0 -858
  93. package/dist/CapsuleBlueprint-if_tP8K8.d.cts +0 -1022
  94. package/dist/CapsuleBlueprint-if_tP8K8.d.ts +0 -1022
  95. package/dist/CapsuleBlueprint-pP0Ima0I.d.cts +0 -768
  96. package/dist/CapsuleBlueprint-pP0Ima0I.d.ts +0 -768
  97. package/dist/CapsuleBlueprint-w82xP6zg.d.cts +0 -222
  98. package/dist/CapsuleBlueprint-w82xP6zg.d.ts +0 -222
  99. package/dist/CapsuleBlueprint-wdlxOX4L.d.cts +0 -472
  100. package/dist/CapsuleBlueprint-wdlxOX4L.d.ts +0 -472
  101. package/dist/CapsuleBlueprint-wxqu6jA3.d.cts +0 -529
  102. package/dist/CapsuleBlueprint-wxqu6jA3.d.ts +0 -529
@@ -1,925 +0,0 @@
1
- import React__default from 'react';
2
-
3
- /**
4
- * common/theme/glass.ts — Framework-agnostic glass utility module.
5
- *
6
- * Extracts all glass logic from Panel into reusable functions and types
7
- * so that any control (Button, IconButton, DropdownButton, etc.) can
8
- * compose glass styling without duplicating the Panel implementation.
9
- *
10
- * This file is pure TypeScript — no React, Vue, or DOM imports.
11
- */
12
-
13
- /**
14
- * Backdrop vibrancy level for glass surfaces.
15
- * - `"low"` → 1.0× saturation
16
- * - `"medium"` → 1.2× saturation (default)
17
- * - `"high"` → 1.4× saturation
18
- * - `number` → arbitrary multiplier (0 – 2 recommended)
19
- */
20
- type GlassVibrancy = "low" | "medium" | "high" | number;
21
- /**
22
- * Glass fill transparency level.
23
- * - `"frosted"` → 65 % light / 25 % dark (default)
24
- * - `"light"` → 85 % light / 35 % dark
25
- * - `"clear"` → 30 % light / 10 % dark (sheer — pair with a light backdrop)
26
- * - `number` → 0–1 fraction; light = round(frac × 100), dark = min(round(frac × 30), 30)
27
- *
28
- * Only the three presets (and their +10 hover steps) are safelisted. A numeric
29
- * value emits an arbitrary opacity that Tailwind's scanner cannot see, so the
30
- * fill silently disappears unless that exact step happens to be generated —
31
- * see `scripts/generate-safelist.mjs`.
32
- */
33
- type GlassOpacity = "frosted" | "light" | "clear" | number;
34
- /**
35
- * Specular highlight mode for glass surfaces.
36
- * - `"none"` → no specular overlay
37
- * - `"classic"` → sheen falling from the top edge
38
- * - `"halo"` → broad bloom plus two off-centre corner glints
39
- */
40
- type SpecularMode = "none" | "classic" | "halo";
41
-
42
- declare const BUTTON_VARIANTS: readonly ["solid", "soft", "outline", "ghost", "link", "clear", "icon", "glass"];
43
- type ButtonVariant = (typeof BUTTON_VARIANTS)[number];
44
- /** Label weight. Derived from the runtime list for the same reason. */
45
- declare const BUTTON_WEIGHTS: readonly ["normal", "medium", "semibold", "bold"];
46
- type ButtonWeight = (typeof BUTTON_WEIGHTS)[number];
47
- /**
48
- * The 21 Tailwind palette colours the kit supports.
49
- *
50
- * `TrueColor` is derived from this array rather than declared alongside it, so
51
- * the runtime list and the type can never drift — adding a colour here adds it
52
- * to the type, the generated theme, and every consumer that enumerates colours.
53
- */
54
- declare const TRUE_COLORS: readonly ["red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "rose", "slate", "gray", "zinc", "neutral", "stone"];
55
- /**
56
- * TrueColor is the only valid color type in the ui-kit theme system.
57
- * All components, tokens, and utilities must use TrueColor exclusively.
58
- */
59
- type TrueColor = (typeof TRUE_COLORS)[number];
60
- /**
61
- * Shared size type used across all frameworks and components.
62
- * Replaces both the old ThemeSize (dead code) and ModalSize.
63
- */
64
- type Size = "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "2xl" | "3xl" | "full";
65
- /**
66
- * The size scale every interactive control shares. Derived from the runtime
67
- * list so the two cannot drift, and so demos/docs can enumerate it.
68
- */
69
- declare const CONTROL_SIZES: readonly ["xs", "sm", "md", "lg", "xl"];
70
- type ControlSize = (typeof CONTROL_SIZES)[number];
71
- /**
72
- * The two layouts a linear control can take.
73
- *
74
- * This union was declared independently in `Slider`, `Rating`, `AppDivider`,
75
- * `Stepper` and `Tabs` (five names for one scale), so a rename or addition in
76
- * the theme would never reach any of them. It lives here once; each control
77
- * keeps its own alias (`SliderOrientation`, …) so call sites and the barrels
78
- * are unaffected.
79
- */
80
- declare const ORIENTATIONS: readonly ["horizontal", "vertical"];
81
- type Orientation = (typeof ORIENTATIONS)[number];
82
- /**
83
- * The geometry of an interactive control at each shared size.
84
- *
85
- * Every control in the trigger family needs the same answer to "how big is the
86
- * icon, the box, the spinner at this size". That table was copy-pasted into
87
- * `Button` (text padding, icon-only padding, icon and spinner sizes) and
88
- * `IconButton` (square box, icon, `<Spinner>` size) — two copies of one scale,
89
- * drifting independently. It lives here once; the components import it.
90
- */
91
- type ControlSizeTokens = {
92
- /** Font size and padding of a labelled control. */
93
- text: string;
94
- /** Padding of a square (icon-only) control. */
95
- iconOnly: string;
96
- /** Fixed box of a square control (`IconButton`). */
97
- box: string;
98
- /** Space between an icon and its label. */
99
- gap: string;
100
- /** Icon dimensions at this control size — identical across controls. */
101
- icon: string;
102
- /** Dimensions of the inline spinner inside a labelled control. */
103
- spinner: string;
104
- /** Size to pass to `<Spinner>` inside a square control. */
105
- spinnerSize: ControlSize;
106
- };
107
- declare const getControlSizeTokens: (size: ControlSize) => ControlSizeTokens;
108
- /**
109
- * The corner radius every trigger-family control shares, so a `Button` next to
110
- * an `Input` is the same box (both `rounded-lg`). Panel-family containers use
111
- * `DEFAULT_SURFACE_CORNER` instead — a different scale, deliberately.
112
- */
113
- declare const DEFAULT_TRIGGER_CORNER = "rounded-lg";
114
- /**
115
- * Strength of a decorative glow behind a control (currently `SearchBar`'s
116
- * gradient variant).
117
- */
118
- declare const GLOW_INTENSITIES: readonly ["subtle", "soft", "medium", "strong"];
119
- type GlowIntensity = (typeof GLOW_INTENSITIES)[number];
120
- /**
121
- * Surface treatments shared by every text-entry control — `Input`, `Textarea`,
122
- * `SearchBar`. Defined once here so the three are the same box when they sit
123
- * next to each other in a form.
124
- */
125
- declare const INPUT_VARIANTS: readonly ["flat", "elevated", "ghost", "underline", "glass", "gradient"];
126
- type InputVariant = (typeof INPUT_VARIANTS)[number];
127
- type InputVariantTokens = {
128
- /** Border, fill, radius, shadow, backdrop. */
129
- surface: string;
130
- /** Text and placeholder colours. */
131
- text: string;
132
- /** Resting colour for a leading icon or other adornment. */
133
- icon: string;
134
- /** True when the surface is see-through and sits over unknown content. */
135
- translucent: boolean;
136
- };
137
- /**
138
- * The variant's surface with its border colour removed, keeping the width and
139
- * sides.
140
- *
141
- * A validation state paints its own border colour, and `border-rose-500`
142
- * beside the variant's `border-neutral-300` is a same-specificity collision
143
- * whose winner is emission order — measured in the built stylesheet,
144
- * `.border-emerald-500` lands *before* `.border-neutral-300` and
145
- * `.border-rose-500` after it, so an errored field turned rose and a
146
- * successful one stayed grey. Strip the colour so only one class can apply.
147
- */
148
- declare const stripBorderColor: (surface: string) => string;
149
- /** True when a caller-supplied class string sets a text colour of its own. */
150
- declare const hasTextColor: (className?: string) => boolean;
151
- /**
152
- * A class string with its text colour removed.
153
- *
154
- * Same trap as `stripBorderColor`: a component's own `text-neutral-500` and a
155
- * caller's `text-emerald-600` are the same specificity, so the winner is
156
- * emission order in the built stylesheet — which means a documented override
157
- * works for some colours and silently does nothing for others.
158
- */
159
- declare const stripTextColor: (className: string) => string;
160
- declare const getInputVariantTokens: (variant: InputVariant) => InputVariantTokens;
161
- type FieldToneTokens = {
162
- /** Border colour while anything inside the field has focus. */
163
- focusBorder: string;
164
- /** Glow ring while anything inside the field has focus. */
165
- focusRing: string;
166
- /** Leading/trailing icon colour while the field has focus. */
167
- icon: string;
168
- /** Focus ring for an inline trailing button. */
169
- buttonFocusRing: string;
170
- };
171
- declare const getFieldToneTokens: (color: TrueColor) => FieldToneTokens;
172
- type FieldSizeTokens = {
173
- px: string;
174
- py: string;
175
- /** `underline` has no box to inset from, and needs room above the rule. */
176
- underlinePy: string;
177
- text: string;
178
- icon: ControlSize;
179
- /** Inline trailing button. */
180
- button: string;
181
- };
182
- /** Padding and type scale, so any two fields line up when stacked. */
183
- declare const FIELD_SIZE_STYLES: Record<ControlSize, FieldSizeTokens>;
184
- declare const getFieldSizeTokens: (size: ControlSize) => FieldSizeTokens;
185
- /**
186
- * Border only at rest; the ring is part of the focus state, exactly as it is
187
- * for the tone tokens. A status used to add a bare `ring-2 ring-inset` at rest
188
- * with no ring *colour* — an unset ring colour resolves to `currentColor`, so
189
- * every errored or successful field carried a near-black 2px halo inside its
190
- * coloured border.
191
- *
192
- * These also carry no copy colour. Forcing `text-neutral-900 dark:text-neutral-100`
193
- * alongside the border costs an errored `underline` or `glass` field the
194
- * high-contrast pair it needs to stay legible over a backdrop.
195
- */
196
- declare const FIELD_STATUS_CLASSES: Record<"error" | "success", string>;
197
- /**
198
- * Surface treatments for containers — `Panel` and anything built on it
199
- * (`FormSection`). Kept here so the type and the text that sits on those
200
- * surfaces are defined once, not per component.
201
- */
202
- declare const SURFACE_VARIANTS: readonly ["elevated", "outlined", "subtle", "tonal", "default", "glass", "simple", "liquid-glass"];
203
- type SurfaceVariant = (typeof SURFACE_VARIANTS)[number];
204
- /**
205
- * The surface family plus `plain` — "draw a card, or draw nothing at all".
206
- *
207
- * A control that may already sit inside a card the app owns needs a way to say
208
- * "no surface of my own"; nine components had each spelled that out for
209
- * themselves (`PanelVariant | "plain"` seven times, `[...SURFACE_VARIANTS,
210
- * "plain"]` twice) and only one of them exported a runtime list, so demos could
211
- * not enumerate the others. Same list, nine names: the day `SURFACE_VARIANTS`
212
- * gains a member, eight of them keep working only by luck.
213
- */
214
- declare const PLAIN_SURFACE_VARIANTS: readonly ["elevated", "outlined", "subtle", "tonal", "default", "glass", "simple", "liquid-glass", "plain"];
215
- type PlainSurfaceVariant = (typeof PLAIN_SURFACE_VARIANTS)[number];
216
- type SurfaceTextTokens = {
217
- /** Section and card headings. */
218
- heading: string;
219
- /** Body copy. */
220
- body: string;
221
- /** Secondary copy — descriptions under a label. */
222
- description: string;
223
- /** Tertiary copy — hints, counters, "optional" markers. */
224
- muted: string;
225
- /** Hairline between regions of the surface. */
226
- divider: string;
227
- translucent: boolean;
228
- };
229
- declare const getSurfaceTextTokens: (variant: SurfaceVariant) => SurfaceTextTokens;
230
- /**
231
- * A full-bleed interactive region on a container surface — a disclosure header,
232
- * a clickable card row.
233
- *
234
- * Two rules learned the hard way, both encoded here so callers cannot get them
235
- * wrong: a ring colour is inert without a ring *width*, and an outer ring is
236
- * clipped by any ancestor with `overflow: hidden` (which every `Panel` has), so
237
- * the ring is inset.
238
- */
239
- type SurfaceTriggerTokens = {
240
- /** Background wash on hover. Low-alpha, so it works on glass too. */
241
- hover: string;
242
- /** Complete focus indicator: outline reset, width, inset, colour. */
243
- focusRing: string;
244
- };
245
- declare const getSurfaceTriggerTokens: (color: TrueColor) => SurfaceTriggerTokens;
246
- /**
247
- * Corner radius scale for container surfaces.
248
- *
249
- * The token names are historical and do NOT map 1:1 onto Tailwind's radius
250
- * utilities — `rounded-sm` here is Tailwind's `rounded-lg`. They are kept as
251
- * they are because the whole kit already calls them by these names and the
252
- * scale itself is monotonic and correct; renaming would silently reshape every
253
- * existing card. `getSurfaceCornerRem` exposes the real radius so a demo can
254
- * label them honestly.
255
- *
256
- * Capsule radii (`rounded-full` / `pill`) are not part of the container scale:
257
- * a capsule is a shape, and the `Pill` component owns it. Containers that need
258
- * one take a `rounded-full` class directly.
259
- */
260
- declare const SURFACE_CORNERS: readonly ["none", "rounded", "rounded-sm", "rounded-md", "rounded-lg", "rounded-xl"];
261
- type SurfaceCorner = (typeof SURFACE_CORNERS)[number];
262
- /** The radius a container uses when the caller does not pick one. */
263
- declare const DEFAULT_SURFACE_CORNER: SurfaceCorner;
264
- declare const getSurfaceCornerClass: (corner: SurfaceCorner) => string;
265
- declare const getSurfaceCornerRem: (corner: SurfaceCorner) => string;
266
- /**
267
- * Container padding, on the same scale every control uses plus a `none` step,
268
- * so a Panel's padding and the Button inside it are described in one language.
269
- */
270
- declare const SURFACE_PADDINGS: readonly ["none", "xs", "sm", "md", "lg", "xl"];
271
- type SurfacePadding = "none" | ControlSize;
272
- declare const getSurfacePaddingClass: (padding: SurfacePadding) => string;
273
- /** Every padding token but `none`, for the callers that require a real inset. */
274
- declare const getSurfacePaddingClasses: () => Record<SurfacePadding, string>;
275
- /**
276
- * The tones that read as "no tint". Consumers that tint chrome per tone
277
- * (Table's header band, for instance) route these through the neutral
278
- * treatment instead of painting a grey-blue header.
279
- */
280
- declare const NEUTRAL_TONES: TrueColor[];
281
- /**
282
- * Cell density for data grids. Deliberately orthogonal to the surface
283
- * variant: the variant decides how the container is drawn, the density how
284
- * tight the cells inside it sit. A compact table on glass must read the same
285
- * as a compact table on an outlined card.
286
- */
287
- declare const TABLE_DENSITIES: readonly ["default", "compact", "minimal"];
288
- type TableDensity = (typeof TABLE_DENSITIES)[number];
289
- type TableDensityTokens = {
290
- /** Padding + text size for body and header cells. */
291
- cell: string;
292
- /** Leading cell of a row (overrides `cell`'s left padding). */
293
- sideLeft: string;
294
- /** Trailing cell of a row (overrides `cell`'s right padding). */
295
- sideRight: string;
296
- /** Vertical padding inside the cell's inner flex wrapper. */
297
- contentVertical: string;
298
- };
299
- declare const getTableDensityTokens: (density: TableDensity) => TableDensityTokens;
300
- /**
301
- * Geometry and opacity of the `gradient` variant's glow.
302
- *
303
- * `pad` is reserved on the control's own wrapper and `inset` positions the glow
304
- * inside it, so the halo is drawn **within the control's layout box**. Painting
305
- * it outside — the obvious way — means any ancestor with `overflow: auto`
306
- * clips it, and `Panel`'s body is `overflow-auto` by default. Same rule as the
307
- * inset focus ring.
308
- */
309
- type GlowTokens = {
310
- /** Padding reserved on the wrapper to hold the halo. */
311
- pad: string;
312
- /** Glow position inside that padding. The gap left over absorbs the blur. */
313
- inset: string;
314
- blur: string;
315
- idleOpacity: number;
316
- focusOpacity: number;
317
- };
318
- declare const getGlowTokens: (intensity: GlowIntensity) => GlowTokens;
319
- /**
320
- * Glow gradient stops: the tone's 600 and 400 shades, read from Tailwind's own
321
- * custom properties rather than a hard-coded hex table.
322
- */
323
- declare const resolveGlowGradient: (tone: TrueColor, from?: string, to?: string) => [string, string];
324
- /**
325
- * Surface treatments for the `SideMenu` container.
326
- *
327
- * `sidebar` is the kit's standing look (a translucent blur pushed into the
328
- * layout), `inset` is a flat panel with a hairline on the content edge,
329
- * `floating` is a detached rounded card, `floating-glass` is that card in the
330
- * kit's liquid-glass language, and `glass` is the liquid-glass language flush
331
- * in the layout — both glass treatments are tinted with the menu's tone. The
332
- * rows inside a menu take the matching treatment automatically.
333
- */
334
- declare const SIDEBAR_VARIANTS: readonly ["sidebar", "inset", "floating", "floating-glass", "glass"];
335
- type SidebarVariant = (typeof SIDEBAR_VARIANTS)[number];
336
- /**
337
- * How a `SideMenu` collapses on desktop.
338
- *
339
- * `icon` shrinks it to an icon rail, `offcanvas` removes the panel from the
340
- * layout entirely (a small handle at the edge opens it again), and `none`
341
- * makes the panel non-collapsible.
342
- */
343
- declare const SIDEBAR_COLLAPSIBLE_MODES: readonly ["icon", "offcanvas", "none"];
344
- type SidebarCollapsible = (typeof SIDEBAR_COLLAPSIBLE_MODES)[number];
345
- /** Which edge of the layout the `SideMenu` sits on. */
346
- declare const SIDEBAR_SIDES: readonly ["left", "right"];
347
- type SidebarSide = (typeof SIDEBAR_SIDES)[number];
348
- /**
349
- * The media query at which a responsive `SideMenu` becomes an offcanvas
350
- * overlay (below it) instead of using its desktop collapsible mode (above it).
351
- */
352
- declare const SIDEBAR_MOBILE_QUERY = "(max-width: 1023px)";
353
- interface SideMenuItemTokens {
354
- /** Fill of the active row. */
355
- bg: string;
356
- /** Copy of the active row. */
357
- text: string;
358
- /** Wash under the cursor on an idle row. */
359
- hoverBg: string;
360
- /** Copy of an idle row under the cursor. */
361
- hoverText: string;
362
- /** Icon of the active row. */
363
- iconActive: string;
364
- /** Icon of an idle row under the cursor. */
365
- iconHover: string;
366
- }
367
- declare const getSideMenuItemTokens: (color: TrueColor) => SideMenuItemTokens;
368
- /**
369
- * Resting copy for an idle `SideMenu` row, per surface context.
370
- *
371
- * A see-through surface composites over unknown content, so the light end of
372
- * the neutral scale disappears on it — the same two-step rule as
373
- * `getSurfaceTextTokens`.
374
- */
375
- declare const SIDEBAR_IDLE_COPY: {
376
- readonly solid: {
377
- readonly text: "text-neutral-600 dark:text-neutral-400";
378
- readonly icon: "text-neutral-400 dark:text-neutral-500";
379
- };
380
- readonly glass: {
381
- readonly text: "text-neutral-800 dark:text-neutral-100";
382
- readonly icon: "text-neutral-600 dark:text-neutral-300";
383
- };
384
- };
385
- type SidebarIdleCopyKind = keyof typeof SIDEBAR_IDLE_COPY;
386
- interface SidebarSurfaceTokens {
387
- /** Fill and blur of the layer painted behind the content. */
388
- fill: string;
389
- /**
390
- * Opaque counterpart of `fill`, for states where the panel grows over other
391
- * content (the hover-rail expansion) and must not show it through. A
392
- * translucent `fill` there reads as a second, see-through layer.
393
- */
394
- solidFill: string;
395
- /** Edge treatment. Empty when the panel is flush and borderless. */
396
- border: string;
397
- /** Which edges carry the border: the content-facing one only, or all. */
398
- borderSides: "start" | "all";
399
- /** Shadow cast toward the content (left-side panel). */
400
- shadow: string;
401
- /** Shadow cast toward the content (right-side panel). */
402
- shadowRight: string;
403
- /** Corner radius. Empty when flush. */
404
- radius: string;
405
- /** Offset from the layout edges ("" = flush, a margin when detached). */
406
- offset: string;
407
- /** Whether the row copy needs the see-through contrast step. */
408
- idleCopy: SidebarIdleCopyKind;
409
- }
410
- /**
411
- * The container treatment for a `SideMenu` variant. The glass treatments are
412
- * resolved from the shared glass module at the call site, so their fill is
413
- * tinted with the menu's tone and cannot drift from `Panel`'s glass.
414
- * `floating-glass` is the glass treatment with the floating card's geometry
415
- * (offset, radius) layered on top.
416
- */
417
- declare const getSidebarSurfaceTokens: (variant: SidebarVariant, color: TrueColor) => SidebarSurfaceTokens;
418
- type ButtonTheme = Record<ButtonVariant, Record<TrueColor, string>>;
419
- type ButtonHoverTheme = Record<ButtonVariant, Record<TrueColor, string>>;
420
- type ButtonActiveTheme = Record<ButtonVariant, Record<TrueColor, string>>;
421
- type ButtonActiveHoverTheme = Record<ButtonVariant, Record<TrueColor, string>>;
422
- type ToggleTheme = Record<TrueColor, string>;
423
- type CheckboxTheme = Record<TrueColor, string>;
424
- type SpinnerTheme = Record<TrueColor, [string, string, string, string]>;
425
- type LoaderTheme = Record<TrueColor, {
426
- track: string;
427
- bar: string;
428
- }>;
429
- type MultiToggleTheme = Record<TrueColor, {
430
- active: string;
431
- activeText: string;
432
- indicator: string;
433
- hover: string;
434
- }>;
435
- type MultiToggleVariantTokens = {
436
- softIndicator: string;
437
- activeText: string;
438
- hover: string;
439
- };
440
- type MultiToggleVariantTheme = Record<TrueColor, MultiToggleVariantTokens>;
441
- type TabsColorTokens = {
442
- hoverText: string;
443
- activeText: string;
444
- onAccentText: string;
445
- focusRing: string;
446
- accentBg: string;
447
- subtleBg: string;
448
- subtleHoverBg: string;
449
- segmentedContainer: string;
450
- badgeSubtle: string;
451
- badgeStrong: string;
452
- badgeOnAccent: string;
453
- underlineActive: string;
454
- };
455
- type TabsTheme = Record<TrueColor, TabsColorTokens>;
456
- type PanelToneConfig = {
457
- border: string;
458
- /**
459
- * Hairline for the `outlined` variant. Deliberately lighter than `border`
460
- * and paired with a low-alpha dark value, so the outline reads as a hairline
461
- * in both modes instead of a hard rule in light mode.
462
- */
463
- outlineBorder: string;
464
- heading: string;
465
- muted: string;
466
- badge: string;
467
- subtleBg: string;
468
- tonalBg: string;
469
- glassBg: string;
470
- glassBorder: string;
471
- liquidBg: string;
472
- liquidBorder: string;
473
- liquidShadow: string;
474
- liquidHeading: string;
475
- overlayGradient: string;
476
- decorationShape: string;
477
- decorationGradient: string;
478
- };
479
- type PanelTheme = Record<TrueColor, PanelToneConfig>;
480
- type StepperToneConfig = {
481
- activeBg: string;
482
- activeText: string;
483
- completedBg: string;
484
- completedText: string;
485
- pendingBorder: string;
486
- pendingText: string;
487
- underlineBase: string;
488
- };
489
- type StepperTheme = Record<TrueColor, StepperToneConfig>;
490
- type BadgeTheme = Record<TrueColor, string>;
491
- type PillTheme = Record<TrueColor, Record<"solid" | "soft" | "outline", {
492
- base: string;
493
- border?: string;
494
- }>>;
495
- type AlertTheme = Record<TrueColor, {
496
- subtle: string;
497
- solid: string;
498
- outline: string;
499
- icon: string;
500
- text: string;
501
- border: string;
502
- dismiss: string;
503
- }>;
504
- type StatTileTheme = Record<TrueColor, {
505
- decorationBg: string;
506
- iconColor: string;
507
- divider: string;
508
- }>;
509
- type ButtonSelectorColorTokens = {
510
- selectedBorder: string;
511
- selectedBg: string;
512
- selectedIcon: string;
513
- selectedLabel: string;
514
- selectedIndicatorBg: string;
515
- selectedIndicatorBorder: string;
516
- selectedIndicatorDot: string;
517
- };
518
- type ButtonSelectorTheme = Record<TrueColor, ButtonSelectorColorTokens>;
519
- interface ThemeDefinition {
520
- button: ButtonTheme;
521
- buttonHover: ButtonHoverTheme;
522
- buttonActive: ButtonActiveTheme;
523
- buttonActiveHover: ButtonActiveHoverTheme;
524
- toggle: ToggleTheme;
525
- checkbox: CheckboxTheme;
526
- spinner: SpinnerTheme;
527
- loader: LoaderTheme;
528
- multiToggle: MultiToggleTheme;
529
- multiToggleVariant: MultiToggleVariantTheme;
530
- tabs: TabsTheme;
531
- panel: PanelTheme;
532
- stepper: StepperTheme;
533
- badge: BadgeTheme;
534
- pill: PillTheme;
535
- alert: AlertTheme;
536
- statTile: StatTileTheme;
537
- buttonSelector: ButtonSelectorTheme;
538
- }
539
- type DeepPartial<T> = {
540
- [K in keyof T]?: T[K] extends Record<string, unknown> ? DeepPartial<T[K]> : T[K];
541
- };
542
- declare const configureTheme: (overrides: DeepPartial<ThemeDefinition>) => void;
543
- declare const resetTheme: () => void;
544
- declare const getButtonColorClasses: (variant: ButtonVariant, color: TrueColor) => string;
545
- declare const getButtonHoverClasses: (variant: ButtonVariant, color: TrueColor) => string;
546
- declare const getButtonActiveClasses: (variant: ButtonVariant, color: TrueColor) => string;
547
- declare const getButtonActiveHoverClasses: (variant: ButtonVariant, color: TrueColor) => string;
548
- declare const getButtonBaseClasses: (variant: ButtonVariant, color: TrueColor) => string;
549
- /**
550
- * The `ButtonVariant`s that read as a slider.
551
- *
552
- * `link` and `clear` are text treatments — a slider has no text to treat —
553
- * and `icon` is a square affordance, so all three are excluded rather than
554
- * aliased onto something else. What remains covers the full range a track
555
- * can express: a saturated fill, a tinted one, a bordered wash, a quiet
556
- * translucent one and a frosted one.
557
- */
558
- declare const SLIDER_VARIANTS: readonly ["solid", "soft", "outline", "ghost", "glass"];
559
- type SliderVariant = (typeof SLIDER_VARIANTS)[number];
560
- interface SliderVariantTokens {
561
- /** Paint for the active track segment, from the start (or min handle) to the value. */
562
- fill: string;
563
- /** Border of the handle. */
564
- handle: string;
565
- /** The handle's focus-ring colour, including its `focus-visible:` prefix. */
566
- ring: string;
567
- }
568
- /**
569
- * Slider treatments — the same visual language `Button` uses, mapped onto a
570
- * slider's two paintable surfaces (the track segment and the handle) so a
571
- * slider dropped next to a button row reads as part of the same UI.
572
- */
573
- declare const getSliderVariantTokens: (color: TrueColor, variant: SliderVariant) => SliderVariantTokens;
574
- /**
575
- * The `ButtonVariant`s that read as a toggle.
576
- *
577
- * Same rationale as `SLIDER_VARIANTS`: `link` and `clear` are text treatments
578
- * a track has nothing to treat, and `icon` is a square affordance. What
579
- * remains covers the full range a track can express — a saturated fill, a
580
- * tinted one, a bordered wash, a quiet translucent one and a frosted one.
581
- */
582
- declare const TOGGLE_VARIANTS: readonly ["solid", "soft", "outline", "ghost", "glass"];
583
- type ToggleVariant = (typeof TOGGLE_VARIANTS)[number];
584
- interface ToggleVariantTokens {
585
- /** Paint for the track when the switch is on (carries `peer-checked:`). */
586
- track: string;
587
- /** The thumb's focus-ring colour, driven off the input's `focus-visible`. */
588
- ring: string;
589
- /** True when the on-state fill is see-through and sits over unknown content. */
590
- translucent: boolean;
591
- }
592
- /**
593
- * Toggle treatments — the same visual language `Button` and `Slider` use,
594
- * mapped onto the toggle's one paintable surface (the on-state track fill) so
595
- * a toggle dropped next to a button or slider reads as part of the same UI.
596
- *
597
- * The off-state track is deliberately identical across variants — the neutral
598
- * base — so the on-state fill is what expresses the treatment, exactly as a
599
- * slider's neutral track does.
600
- *
601
- * The `glass` token only carries the frosted fill; the backdrop blur,
602
- * vibrancy and specular overlay stay with the component, because they depend
603
- * on the `glassOpacity` / `vibrancy` / `specularMode` props. The same numeric
604
- * opacity caveat as `getGlassFillClass` applies: only the three presets are
605
- * safelisted.
606
- */
607
- declare const getToggleVariantTokens: (color: TrueColor, variant: ToggleVariant, glassOpacity?: GlassOpacity) => ToggleVariantTokens;
608
- declare const getToggleColorClasses: (color: TrueColor) => string;
609
- /**
610
- * @deprecated Returns `accent-{color}-600`, which only paints a *native*
611
- * checkbox — and a native checkbox ignores border, radius and background, so
612
- * every other class the control carried was dead. Use
613
- * `getCheckboxControlTokens`, which styles a real box.
614
- */
615
- declare const getCheckboxColorClasses: (color: TrueColor) => string;
616
- interface CheckboxControlTokens {
617
- /** Fill and border of the box once checked or indeterminate. */
618
- checked: string;
619
- /** Focus ring, driven off the sibling input's focus. */
620
- ring: string;
621
- /** Colour of the tick/dash glyph, which sits on the checked fill. */
622
- glyph: string;
623
- }
624
- /**
625
- * Fills step to `-700` light / `-400` dark rather than the `-600` / `-500` the
626
- * native `accent-color` used, for the same reason `Alert`'s solid variant does:
627
- * a white glyph on `{color}-600` measures 2.94:1 on yellow and 3.06 on lime,
628
- * under even the 3:1 that WCAG asks of a *graphical* object, and on a `-500`
629
- * fill it is worse. At `-700` under white and `-400` under `{color}-950` the
630
- * worst case across all 21 tones is 4.93:1.
631
- */
632
- interface CheckboxVariantTokens {
633
- /** Fill, shadow and backdrop of the resting box. */
634
- fill: string;
635
- /** Resting border colour. Replaced wholesale by the error state. */
636
- border: string;
637
- /** Border colour under the cursor. */
638
- hover: string;
639
- /** True when the box is see-through and sits over unknown content. */
640
- translucent: boolean;
641
- }
642
- declare const getCheckboxVariantTokens: (variant: InputVariant) => CheckboxVariantTokens;
643
- declare const getCheckboxControlTokens: (color: TrueColor) => CheckboxControlTokens;
644
- declare const getSpinnerColorTokens: (color: TrueColor) => [string, string, string, string];
645
- /**
646
- * The geometry of a `StatusSpinner` at each shared control size.
647
- *
648
- * The wrapper is the same circle `Spinner` draws at that size, so the two can
649
- * sit side by side and line up; the dot and the ring width scale with it.
650
- */
651
- interface StatusSpinnerSizeTokens {
652
- /** Outer circle. Matches `Spinner`'s diameter at the same size. */
653
- wrapper: string;
654
- /** Centre dot. */
655
- dot: string;
656
- /** Ring border width. */
657
- border: string;
658
- }
659
- declare const getStatusSpinnerSizeTokens: (size: ControlSize) => StatusSpinnerSizeTokens;
660
- /**
661
- * The paint of a `StatusSpinner` in one tone.
662
- *
663
- * Generated from `TRUE_COLORS` — there is no hand-written per-colour map to
664
- * drift. `dot` is the one class-shaped token (both steps are already in the
665
- * generated safelist); the arc and track are CSS colours rather than classes,
666
- * because the four border sides carry four different values and a `dark:`
667
- * variant cannot reach an inline style. They read the tone's own Tailwind
668
- * variable — emitted for all 21 tones — and `color-mix` derives the track and
669
- * the glow from it, so a tone can never render as another colour.
670
- */
671
- interface StatusSpinnerToneTokens {
672
- /** Centre dot fill. */
673
- dot: string;
674
- /** The rotating arc, as a CSS colour. */
675
- arc: string;
676
- /** The idle ring (30% of the tone), as a CSS colour. */
677
- track: string;
678
- /** The halo around the dot, as a CSS colour. */
679
- glow: string;
680
- }
681
- declare const getStatusSpinnerToneTokens: (tone: TrueColor) => StatusSpinnerToneTokens;
682
- /**
683
- * The paint of a `ProgressSpinner` in one tone.
684
- *
685
- * The same generated-from-`TRUE_COLORS` approach as `StatusSpinner`: the arc
686
- * reads the tone's own Tailwind variable and `color-mix` derives the idle
687
- * track from it, so a tone can never render as another colour. The inline
688
- * SVG cannot use `dark:` variants, which is why these are CSS colours rather
689
- * than classes.
690
- */
691
- interface ProgressSpinnerToneTokens {
692
- /** The moving arc (or the determinate range), as a CSS colour. */
693
- arc: string;
694
- /** The idle ring (30% of the tone), as a CSS colour. */
695
- track: string;
696
- }
697
- declare const getProgressSpinnerToneTokens: (tone: TrueColor) => ProgressSpinnerToneTokens;
698
- declare const getLoaderProgressColors: (color: TrueColor) => {
699
- track: string;
700
- bar: string;
701
- };
702
- declare const getMultiToggleColorTokens: (color: TrueColor) => {
703
- active: string;
704
- activeText: string;
705
- indicator: string;
706
- hover: string;
707
- };
708
- declare const getMultiToggleVariantTokens: (color: TrueColor) => MultiToggleVariantTokens;
709
- declare const getTabsColorTokens: (color: TrueColor) => TabsColorTokens;
710
- /**
711
- * Base treatment per surface variant — the shadow, ring, blur and fill that do
712
- * not depend on tone.
713
- *
714
- * Lifted out of `Panel` so any control that draws a *surface* can mirror it
715
- * exactly rather than copying the switch. `MultiToggle`'s track is the first
716
- * other consumer: a segmented control is a container holding segments, so it
717
- * belongs to the same family and has to read identically beside a `Panel`.
718
- */
719
- declare const SURFACE_VARIANT_BASE: Record<SurfaceVariant, string>;
720
- /**
721
- * Rim for the translucent variants. Deliberately tone-independent: a saturated
722
- * `{tone}-500` edge fights the backdrop it is meant to sit over, so glass gets
723
- * a light rim that reads as a bevel instead of an outline.
724
- */
725
- declare const SURFACE_GLASS_RIM = "border-white/50 dark:border-white/10";
726
- /** Variants whose surface is see-through. */
727
- declare const TRANSLUCENT_SURFACE_VARIANTS: readonly SurfaceVariant[];
728
- interface SurfaceVariantOverrides {
729
- /** Replaces the variant's own fill, keeping its shadow and ring. */
730
- bgClass?: string;
731
- /** Replaces the variant's own rim colour. */
732
- borderClass?: string;
733
- /** Extra classes folded in for `liquid-glass` (vibrancy, glass fill). */
734
- liquidExtras?: string;
735
- }
736
- /**
737
- * The full class set for a surface variant at a tone — the same combination
738
- * `Panel` renders, so a control using this sits flush beside one.
739
- */
740
- declare const getSurfaceVariantClasses: (variant: SurfaceVariant, tone: TrueColor, overrides?: SurfaceVariantOverrides) => string;
741
- declare const getPanelToneStyles: (tone: TrueColor) => PanelToneConfig;
742
- declare const getStepperTonePalette: (tone: TrueColor) => StepperToneConfig;
743
- declare const getBadgeColorClasses: (color: TrueColor) => string;
744
- declare const getPillColorClasses: (color: TrueColor, variant: "solid" | "soft" | "outline") => {
745
- base: string;
746
- border?: string;
747
- };
748
- /**
749
- * @deprecated Use `getAlertVariantTokens(color, variant)`. This bag hands the
750
- * same icon/text/dismiss classes to every variant, which is unreadable on
751
- * `solid`. Kept so existing call sites keep compiling.
752
- */
753
- declare const getAlertColorClasses: (color: TrueColor) => AlertTheme[TrueColor];
754
- /**
755
- * Alert treatments. `glass` and `liquid-glass` are the same pair `Panel` and
756
- * `Pill` offer, so a callout dropped on a glass card no longer has to be the
757
- * one opaque slab in the layout.
758
- */
759
- declare const ALERT_VARIANTS: readonly ["subtle", "solid", "outline", "glass", "liquid-glass"];
760
- type AlertVariant = (typeof ALERT_VARIANTS)[number];
761
- /**
762
- * Where the leading icon sits against the callout's content.
763
- *
764
- * `top` is the default and the only one that was previously possible: the icon
765
- * centres on the *title's* line box, which is what you want for a one- or
766
- * two-line callout. `center` centres it against the whole block — right when
767
- * the body runs long enough that a top-aligned glyph looks stranded — and
768
- * `bottom` pins it to the last line.
769
- */
770
- declare const ALERT_ICON_ALIGNMENTS: readonly ["top", "center", "bottom"];
771
- type AlertIconAlign = (typeof ALERT_ICON_ALIGNMENTS)[number];
772
- /**
773
- * What the callout *means*, as opposed to what colour it is.
774
- *
775
- * Both kits' demos have been passing `tone="info"` / `"success"` / `"warning"`
776
- * / `"danger"` since tone became a `TrueColor` — none of them are one, so every
777
- * such alert fell through to the blue fallback and four "different" tones
778
- * rendered identically. The semantics were real and worth keeping; they just
779
- * belong in their own prop, which resolves to a tone *and* the right icon *and*
780
- * the right live-region politeness.
781
- */
782
- declare const ALERT_INTENTS: readonly ["info", "success", "warning", "danger", "neutral"];
783
- type AlertIntent = (typeof ALERT_INTENTS)[number];
784
- interface AlertIntentConfig {
785
- tone: TrueColor;
786
- /** Registry icon name used when the caller does not supply one. */
787
- icon: string;
788
- /**
789
- * How assistive technology should announce it. `role="alert"` is an
790
- * *assertive* live region: it interrupts whatever the user is reading, which
791
- * is right for a failure and wrong for a page that merely renders an
792
- * informational banner on load.
793
- */
794
- live: "assertive" | "polite";
795
- }
796
- declare const ALERT_INTENT_CONFIG: Record<AlertIntent, AlertIntentConfig>;
797
- /**
798
- * Whether a field is reporting a problem.
799
- *
800
- * One list, because it was six: `INPUT_`, `SELECT_`, `CHECKBOX_` and
801
- * `INPUT_GROUP_VALIDATION_STATUSES` each declared it, and `Textarea` and
802
- * `FormField` had bare unions exporting no runtime list at all — so their
803
- * demos could not enumerate the states they support. Same three strings, six
804
- * names: the day one changes, the other five will not.
805
- */
806
- declare const VALIDATION_STATUSES: readonly ["none", "error", "success"];
807
- type ValidationStatus = (typeof VALIDATION_STATUSES)[number];
808
- /**
809
- * What went wrong with a request, as opposed to what colour to paint it.
810
- *
811
- * The same reasoning as `ALERT_INTENTS`: a failing call already knows whether
812
- * it was refused, throttled, or simply could not be reached, and every caller
813
- * translating that into a tone *and* a glyph *and* two strings is how one
814
- * screen ends up saying "Connection Error" for a 403. The kind resolves all
815
- * four; anything the caller states explicitly still wins.
816
- */
817
- declare const API_ERROR_KINDS: readonly ["unknown", "offline", "server", "forbidden", "notFound", "rateLimited"];
818
- type ApiErrorKind = (typeof API_ERROR_KINDS)[number];
819
- interface ApiErrorKindConfig {
820
- tone: TrueColor;
821
- /** Registry icon name used when the caller does not supply one. */
822
- icon: string;
823
- title: string;
824
- subtitle: string;
825
- /**
826
- * Whether retrying it stands a chance. A 403 does not get a "Try again"
827
- * button by default — offering one for a failure the user cannot clear is
828
- * how a dead end starts looking like a bug.
829
- */
830
- retryable: boolean;
831
- }
832
- declare const API_ERROR_KIND_CONFIG: Record<ApiErrorKind, ApiErrorKindConfig>;
833
- interface AlertVariantTokens {
834
- /** Fill plus the callout's base copy colour. */
835
- surface: string;
836
- /** Border colour. The `border` utility itself is on the base class. */
837
- border: string;
838
- /** Leading icon. */
839
- icon: string;
840
- /** Secondary copy under the title. */
841
- text: string;
842
- /** Dismiss button: rest, hover and focus ring. */
843
- dismiss: string;
844
- }
845
- /**
846
- * Replaces the old flat `getAlertColorClasses` bag, which handed the *same*
847
- * `icon`, `text` and `dismiss` classes to every variant. On `solid` — a
848
- * `{color}-600` fill — that painted the description `{color}-700` and the icon
849
- * `{color}-500`, i.e. a dark tone on a saturated tone of itself. It was
850
- * unreadable at every tone and no test could see it.
851
- */
852
- declare const getAlertVariantTokens: (color: TrueColor, variant: AlertVariant) => AlertVariantTokens;
853
- declare const getStatTileColorClasses: (color: TrueColor) => StatTileTheme[TrueColor];
854
-
855
- type IconName = "Add" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "ArrowUp" | "Attached" | "Attachment" | "Back" | "Blueprint" | "Bug" | "Chat" | "CheckCircle" | "ChevronLeft" | "ChevronRight" | "Clean" | "Close" | "Close1" | "CloudOff" | "Cog" | "Complete" | "Container" | "CopyClipboard" | "Dashboard" | "Details" | "Docker copy" | "Docker" | "Dots" | "Download" | "Edit" | "Equal" | "Error" | "Export" | "EyeClosed" | "EyeOpen" | "Globe" | "Help" | "Idea" | "Image" | "Info" | "Key" | "LXC-Old" | "LXC" | "Log" | "Moon" | "Notification" | "Official" | "Offline" | "OpenApp" | "Parameter" | "Pause" | "Praise" | "ReportFeedback" | "Reset" | "Restart" | "Rocket" | "Run" | "Save" | "Scale" | "Script" | "Search" | "Send" | "Settings" | "Shop" | "Star" | "Stop" | "Sun" | "Suspend" | "ThemeAuto" | "ThemeDark" | "ThemeLight" | "Trash" | "UX" | "User" | "Users" | "Verified" | "ViewGrid" | "ViewRows" | "Library" | "Host" | "VirtualMachine" | "Role" | "Roles" | "Cache" | "Claim" | "Claims" | "KeyManagement" | "Windows" | "Ubuntu" | "Debian" | "Apple" | "KaliLinux" | "RedHat" | "Fedora" | "CentOS" | "Clone" | "Copy" | "Live" | "HealthCheck" | "ReverseProxy" | "ReverseProxyCORS" | "ReverseProxyRoutes" | "ReverseProxyFrom" | "ReverseProxyHeadersRequest" | "ReverseProxyHeadersResponse" | "ReverseProxyHTTP" | "ReverseProxyTo" | "ReverseProxyTLS" | "ReverseProxyTCP" | "Refresh" | "Calendar" | "Folder" | "Jobs" | "Warning" | "Artifactory" | "Azure" | "Minio" | "Aws" | "Orchestrator" | "Podman" | "PodmanDesktop" | "Group" | "Pin" | "Database" | "RemoteHost" | "Login" | "Logout" | "Snapshot" | "Revert" | "CleanBrush" | "Pull" | "Push" | "CatalogVersion" | "File" | "Revoke" | "Taint" | "Unlock" | "Check" | "ArrowChevronLeft" | "ArrowChevronRight" | "Drag" | "ChartLine" | "Accordion";
856
- declare const iconRegistry: Record<IconName, React__default.ForwardRefExoticComponent<React__default.SVGProps<SVGSVGElement>>>;
857
-
858
- type HelpButtonPlacement = "top" | "bottom" | "left" | "right" | "auto";
859
- interface HelpButtonProps {
860
- /**
861
- * Help content to display in the panel.
862
- * Pass a `string` to render as Markdown (tables and URLs supported).
863
- * Pass a `ReactNode` to render arbitrary JSX directly.
864
- */
865
- content: string | React__default.ReactNode;
866
- /** Optional title shown in the panel header. Defaults to "Help". */
867
- title?: React__default.ReactNode;
868
- /**
869
- * Preferred placement of the floating panel relative to the trigger button.
870
- * "auto" (default) picks the side with the most available space.
871
- */
872
- placement?: HelpButtonPlacement;
873
- /** Accent color for the trigger button and the panel header band. @default "sky" */
874
- color?: TrueColor;
875
- /**
876
- * Surface treatment of the floating panel — the shared container family the
877
- * `Panel` reference owns, so a help panel and a card beside it read the same.
878
- * @default "elevated"
879
- */
880
- variant?: SurfaceVariant;
881
- /** Corner radius of the panel, on the shared container scale. @default "rounded-md" */
882
- corner?: SurfaceCorner;
883
- /** Size of the trigger icon button, on the shared control scale. @default "xs" */
884
- size?: ControlSize;
885
- /** Icon for the trigger button. Defaults to "Help". */
886
- icon?: IconName;
887
- /** Maximum width of the floating panel in px. Defaults to 360. */
888
- maxWidth?: number;
889
- /**
890
- * When true the panel body is a pulsing skeleton shaped like the help copy,
891
- * so a slow help fetch does not flash empty text. @default false
892
- */
893
- loading?: boolean;
894
- /** Extra class applied to the root wrapper. */
895
- className?: string;
896
- }
897
- declare const HelpButton: React__default.FC<HelpButtonProps>;
898
-
899
- declare enum CapsuleBlueprintValueType {
900
- String = "string",
901
- Int = "int",
902
- Boolean = "boolean",
903
- Select = "select",
904
- List = "list",
905
- Map = "map"
906
- }
907
- interface CapsuleBlueprintParameter {
908
- name: string;
909
- key: string;
910
- description?: string;
911
- type?: string;
912
- value_type?: CapsuleBlueprintValueType;
913
- default?: any;
914
- required?: boolean;
915
- is_required?: boolean;
916
- is_secret?: boolean;
917
- options?: any;
918
- hint?: string;
919
- help?: string;
920
- service_name?: string;
921
- depends_on?: string[];
922
- [key: string]: any;
923
- }
924
-
925
- export { type GlowTokens as $, type AlertIntent as A, type ButtonVariant as B, type ControlSize as C, type AlertVariantTokens as D, type ApiErrorKindConfig as E, BUTTON_VARIANTS as F, type GlassOpacity as G, type HelpButtonProps as H, type IconName as I, BUTTON_WEIGHTS as J, CONTROL_SIZES as K, CapsuleBlueprintValueType as L, type CheckboxControlTokens as M, type CheckboxVariantTokens as N, type Orientation as O, type PlainSurfaceVariant as P, type ControlSizeTokens as Q, DEFAULT_SURFACE_CORNER as R, type SurfaceCorner as S, type TrueColor as T, DEFAULT_TRIGGER_CORNER as U, type ValidationStatus as V, FIELD_SIZE_STYLES as W, FIELD_STATUS_CLASSES as X, type FieldSizeTokens as Y, type FieldToneTokens as Z, GLOW_INTENSITIES as _, type AlertVariant as a, getStatusSpinnerToneTokens as a$, HelpButton as a0, type HelpButtonPlacement as a1, INPUT_VARIANTS as a2, type InputVariantTokens as a3, NEUTRAL_TONES as a4, ORIENTATIONS as a5, PLAIN_SURFACE_VARIANTS as a6, type ProgressSpinnerToneTokens as a7, SIDEBAR_COLLAPSIBLE_MODES as a8, SIDEBAR_IDLE_COPY as a9, getAlertVariantTokens as aA, getBadgeColorClasses as aB, getButtonActiveClasses as aC, getButtonActiveHoverClasses as aD, getButtonBaseClasses as aE, getButtonColorClasses as aF, getButtonHoverClasses as aG, getCheckboxColorClasses as aH, getCheckboxControlTokens as aI, getCheckboxVariantTokens as aJ, getControlSizeTokens as aK, getFieldSizeTokens as aL, getFieldToneTokens as aM, getGlowTokens as aN, getInputVariantTokens as aO, getLoaderProgressColors as aP, getMultiToggleColorTokens as aQ, getMultiToggleVariantTokens as aR, getPanelToneStyles as aS, getPillColorClasses as aT, getProgressSpinnerToneTokens as aU, getSideMenuItemTokens as aV, getSidebarSurfaceTokens as aW, getSliderVariantTokens as aX, getSpinnerColorTokens as aY, getStatTileColorClasses as aZ, getStatusSpinnerSizeTokens as a_, SIDEBAR_MOBILE_QUERY as aa, SIDEBAR_SIDES as ab, SIDEBAR_VARIANTS as ac, SLIDER_VARIANTS as ad, SURFACE_VARIANTS as ae, SURFACE_CORNERS as af, SURFACE_GLASS_RIM as ag, SURFACE_PADDINGS as ah, SURFACE_VARIANT_BASE as ai, type SideMenuItemTokens as aj, type SidebarIdleCopyKind as ak, type SidebarSurfaceTokens as al, type SliderVariantTokens as am, type StatusSpinnerSizeTokens as an, type StatusSpinnerToneTokens as ao, type SurfaceTriggerTokens as ap, type SurfaceVariantOverrides as aq, TABLE_DENSITIES as ar, TOGGLE_VARIANTS as as, TRANSLUCENT_SURFACE_VARIANTS as at, TRUE_COLORS as au, type TableDensityTokens as av, type ToggleVariantTokens as aw, VALIDATION_STATUSES as ax, configureTheme as ay, getAlertColorClasses as az, type AlertIconAlign as b, getStepperTonePalette as b0, getSurfaceCornerClass as b1, getSurfaceCornerRem as b2, getSurfacePaddingClass as b3, getSurfacePaddingClasses as b4, getSurfaceTextTokens as b5, getSurfaceTriggerTokens as b6, getSurfaceVariantClasses as b7, getTableDensityTokens as b8, getTabsColorTokens as b9, getToggleColorClasses as ba, getToggleVariantTokens as bb, hasTextColor as bc, iconRegistry as bd, resetTheme as be, resolveGlowGradient as bf, stripBorderColor as bg, stripTextColor as bh, type GlassVibrancy as c, type SpecularMode as d, type ButtonWeight as e, type SurfacePadding as f, type SurfaceVariant as g, type GlowIntensity as h, type InputVariant as i, type SliderVariant as j, type ToggleVariant as k, type Size as l, type SidebarVariant as m, type SidebarSide as n, type SidebarCollapsible as o, type SurfaceTextTokens as p, type TableDensity as q, type ApiErrorKind as r, type CapsuleBlueprintParameter as s, ALERT_ICON_ALIGNMENTS as t, ALERT_INTENTS as u, ALERT_INTENT_CONFIG as v, ALERT_VARIANTS as w, API_ERROR_KINDS as x, API_ERROR_KIND_CONFIG as y, type AlertIntentConfig as z };