@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,695 +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 geometry of an interactive control at each shared size.
73
- *
74
- * Every control in the trigger family needs the same answer to "how big is the
75
- * icon, the box, the spinner at this size". That table was copy-pasted into
76
- * `Button` (text padding, icon-only padding, icon and spinner sizes) and
77
- * `IconButton` (square box, icon, `<Spinner>` size) — two copies of one scale,
78
- * drifting independently. It lives here once; the components import it.
79
- */
80
- type ControlSizeTokens = {
81
- /** Font size and padding of a labelled control. */
82
- text: string;
83
- /** Padding of a square (icon-only) control. */
84
- iconOnly: string;
85
- /** Fixed box of a square control (`IconButton`). */
86
- box: string;
87
- /** Space between an icon and its label. */
88
- gap: string;
89
- /** Icon dimensions at this control size — identical across controls. */
90
- icon: string;
91
- /** Dimensions of the inline spinner inside a labelled control. */
92
- spinner: string;
93
- /** Size to pass to `<Spinner>` inside a square control. */
94
- spinnerSize: ControlSize;
95
- };
96
- declare const getControlSizeTokens: (size: ControlSize) => ControlSizeTokens;
97
- /**
98
- * The corner radius every trigger-family control shares, so a `Button` next to
99
- * an `Input` is the same box (both `rounded-lg`). Panel-family containers use
100
- * `DEFAULT_SURFACE_CORNER` instead — a different scale, deliberately.
101
- */
102
- declare const DEFAULT_TRIGGER_CORNER = "rounded-lg";
103
- /**
104
- * Strength of a decorative glow behind a control (currently `SearchBar`'s
105
- * gradient variant).
106
- */
107
- declare const GLOW_INTENSITIES: readonly ["subtle", "soft", "medium", "strong"];
108
- type GlowIntensity = (typeof GLOW_INTENSITIES)[number];
109
- /**
110
- * Surface treatments shared by every text-entry control — `Input`, `Textarea`,
111
- * `SearchBar`. Defined once here so the three are the same box when they sit
112
- * next to each other in a form.
113
- */
114
- declare const INPUT_VARIANTS: readonly ["flat", "elevated", "ghost", "underline", "glass", "gradient"];
115
- type InputVariant = (typeof INPUT_VARIANTS)[number];
116
- type InputVariantTokens = {
117
- /** Border, fill, radius, shadow, backdrop. */
118
- surface: string;
119
- /** Text and placeholder colours. */
120
- text: string;
121
- /** Resting colour for a leading icon or other adornment. */
122
- icon: string;
123
- /** True when the surface is see-through and sits over unknown content. */
124
- translucent: boolean;
125
- };
126
- /**
127
- * The variant's surface with its border colour removed, keeping the width and
128
- * sides.
129
- *
130
- * A validation state paints its own border colour, and `border-rose-500`
131
- * beside the variant's `border-neutral-300` is a same-specificity collision
132
- * whose winner is emission order — measured in the built stylesheet,
133
- * `.border-emerald-500` lands *before* `.border-neutral-300` and
134
- * `.border-rose-500` after it, so an errored field turned rose and a
135
- * successful one stayed grey. Strip the colour so only one class can apply.
136
- */
137
- declare const stripBorderColor: (surface: string) => string;
138
- declare const getInputVariantTokens: (variant: InputVariant) => InputVariantTokens;
139
- /**
140
- * Surface treatments for containers — `Panel` and anything built on it
141
- * (`FormSection`). Kept here so the type and the text that sits on those
142
- * surfaces are defined once, not per component.
143
- */
144
- declare const SURFACE_VARIANTS: readonly ["elevated", "outlined", "subtle", "tonal", "default", "glass", "simple", "liquid-glass"];
145
- type SurfaceVariant = (typeof SURFACE_VARIANTS)[number];
146
- type SurfaceTextTokens = {
147
- /** Section and card headings. */
148
- heading: string;
149
- /** Body copy. */
150
- body: string;
151
- /** Secondary copy — descriptions under a label. */
152
- description: string;
153
- /** Tertiary copy — hints, counters, "optional" markers. */
154
- muted: string;
155
- /** Hairline between regions of the surface. */
156
- divider: string;
157
- translucent: boolean;
158
- };
159
- declare const getSurfaceTextTokens: (variant: SurfaceVariant) => SurfaceTextTokens;
160
- /**
161
- * A full-bleed interactive region on a container surface — a disclosure header,
162
- * a clickable card row.
163
- *
164
- * Two rules learned the hard way, both encoded here so callers cannot get them
165
- * wrong: a ring colour is inert without a ring *width*, and an outer ring is
166
- * clipped by any ancestor with `overflow: hidden` (which every `Panel` has), so
167
- * the ring is inset.
168
- */
169
- type SurfaceTriggerTokens = {
170
- /** Background wash on hover. Low-alpha, so it works on glass too. */
171
- hover: string;
172
- /** Complete focus indicator: outline reset, width, inset, colour. */
173
- focusRing: string;
174
- };
175
- declare const getSurfaceTriggerTokens: (color: TrueColor) => SurfaceTriggerTokens;
176
- /**
177
- * Corner radius scale for container surfaces.
178
- *
179
- * The token names are historical and do NOT map 1:1 onto Tailwind's radius
180
- * utilities — `rounded-sm` here is Tailwind's `rounded-lg`. They are kept as
181
- * they are because the whole kit already calls them by these names and the
182
- * scale itself is monotonic and correct; renaming would silently reshape every
183
- * existing card. `getSurfaceCornerRem` exposes the real radius so a demo can
184
- * label them honestly.
185
- *
186
- * `pill` used to be a duplicate of `rounded-lg` (both `rounded-3xl`), which is
187
- * not what a pill is; it is now a true capsule.
188
- */
189
- declare const SURFACE_CORNERS: readonly ["none", "rounded", "rounded-sm", "rounded-md", "rounded-lg", "rounded-xl", "rounded-full", "pill"];
190
- type SurfaceCorner = (typeof SURFACE_CORNERS)[number];
191
- /** The radius a container uses when the caller does not pick one. */
192
- declare const DEFAULT_SURFACE_CORNER: SurfaceCorner;
193
- declare const getSurfaceCornerClass: (corner: SurfaceCorner) => string;
194
- declare const getSurfaceCornerRem: (corner: SurfaceCorner) => string;
195
- /**
196
- * Container padding, on the same scale every control uses plus a `none` step,
197
- * so a Panel's padding and the Button inside it are described in one language.
198
- */
199
- declare const SURFACE_PADDINGS: readonly ["none", "xs", "sm", "md", "lg", "xl"];
200
- type SurfacePadding = "none" | ControlSize;
201
- declare const getSurfacePaddingClass: (padding: SurfacePadding) => string;
202
- /** Every padding token but `none`, for the callers that require a real inset. */
203
- declare const getSurfacePaddingClasses: () => Record<SurfacePadding, string>;
204
- /**
205
- * Geometry and opacity of the `gradient` variant's glow.
206
- *
207
- * `pad` is reserved on the control's own wrapper and `inset` positions the glow
208
- * inside it, so the halo is drawn **within the control's layout box**. Painting
209
- * it outside — the obvious way — means any ancestor with `overflow: auto`
210
- * clips it, and `Panel`'s body is `overflow-auto` by default. Same rule as the
211
- * inset focus ring.
212
- */
213
- type GlowTokens = {
214
- /** Padding reserved on the wrapper to hold the halo. */
215
- pad: string;
216
- /** Glow position inside that padding. The gap left over absorbs the blur. */
217
- inset: string;
218
- blur: string;
219
- idleOpacity: number;
220
- focusOpacity: number;
221
- };
222
- declare const getGlowTokens: (intensity: GlowIntensity) => GlowTokens;
223
- /**
224
- * Glow gradient stops: the tone's 600 and 400 shades, read from Tailwind's own
225
- * custom properties rather than a hard-coded hex table.
226
- */
227
- declare const resolveGlowGradient: (tone: TrueColor, from?: string, to?: string) => [string, string];
228
- /**
229
- * Surface treatments for the `SideMenu` container.
230
- *
231
- * `sidebar` is the kit's standing look (a translucent blur pushed into the
232
- * layout), `inset` is a flat panel with a hairline on the content edge,
233
- * `floating` is a detached rounded card, and `glass` is the kit's liquid-glass
234
- * language tinted with the menu's tone. The rows inside a menu take the
235
- * matching treatment automatically.
236
- */
237
- declare const SIDEBAR_VARIANTS: readonly ["sidebar", "inset", "floating", "glass"];
238
- type SidebarVariant = (typeof SIDEBAR_VARIANTS)[number];
239
- /**
240
- * How a `SideMenu` collapses on desktop.
241
- *
242
- * `icon` shrinks it to an icon rail, `offcanvas` removes the panel from the
243
- * layout entirely (a small handle at the edge opens it again), and `none`
244
- * makes the panel non-collapsible.
245
- */
246
- declare const SIDEBAR_COLLAPSIBLE_MODES: readonly ["icon", "offcanvas", "none"];
247
- type SidebarCollapsible = (typeof SIDEBAR_COLLAPSIBLE_MODES)[number];
248
- /** Which edge of the layout the `SideMenu` sits on. */
249
- declare const SIDEBAR_SIDES: readonly ["left", "right"];
250
- type SidebarSide = (typeof SIDEBAR_SIDES)[number];
251
- /**
252
- * The media query at which a responsive `SideMenu` becomes an offcanvas
253
- * overlay (below it) instead of using its desktop collapsible mode (above it).
254
- */
255
- declare const SIDEBAR_MOBILE_QUERY = "(max-width: 1023px)";
256
- interface SideMenuItemTokens {
257
- /** Fill of the active row. */
258
- bg: string;
259
- /** Copy of the active row. */
260
- text: string;
261
- /** Wash under the cursor on an idle row. */
262
- hoverBg: string;
263
- /** Copy of an idle row under the cursor. */
264
- hoverText: string;
265
- /** Icon of the active row. */
266
- iconActive: string;
267
- /** Icon of an idle row under the cursor. */
268
- iconHover: string;
269
- }
270
- declare const getSideMenuItemTokens: (color: TrueColor) => SideMenuItemTokens;
271
- /**
272
- * Resting copy for an idle `SideMenu` row, per surface context.
273
- *
274
- * A see-through surface composites over unknown content, so the light end of
275
- * the neutral scale disappears on it — the same two-step rule as
276
- * `getSurfaceTextTokens`.
277
- */
278
- declare const SIDEBAR_IDLE_COPY: {
279
- readonly solid: {
280
- readonly text: "text-neutral-600 dark:text-neutral-400";
281
- readonly icon: "text-neutral-400 dark:text-neutral-500";
282
- };
283
- readonly glass: {
284
- readonly text: "text-neutral-800 dark:text-neutral-100";
285
- readonly icon: "text-neutral-600 dark:text-neutral-300";
286
- };
287
- };
288
- type SidebarIdleCopyKind = keyof typeof SIDEBAR_IDLE_COPY;
289
- interface SidebarSurfaceTokens {
290
- /** Fill and blur of the layer painted behind the content. */
291
- fill: string;
292
- /**
293
- * Opaque counterpart of `fill`, for states where the panel grows over other
294
- * content (the hover-rail expansion) and must not show it through. A
295
- * translucent `fill` there reads as a second, see-through layer.
296
- */
297
- solidFill: string;
298
- /** Edge treatment. Empty when the panel is flush and borderless. */
299
- border: string;
300
- /** Which edges carry the border: the content-facing one only, or all. */
301
- borderSides: "start" | "all";
302
- /** Shadow cast toward the content (left-side panel). */
303
- shadow: string;
304
- /** Shadow cast toward the content (right-side panel). */
305
- shadowRight: string;
306
- /** Corner radius. Empty when flush. */
307
- radius: string;
308
- /** Offset from the layout edges ("" = flush, a margin when detached). */
309
- offset: string;
310
- /** Whether to paint the dither-noise layer. */
311
- noise: boolean;
312
- /** Whether the row copy needs the see-through contrast step. */
313
- idleCopy: SidebarIdleCopyKind;
314
- }
315
- /**
316
- * The container treatment for a `SideMenu` variant. `glass` is resolved from
317
- * the shared glass module at the call site, so its fill is tinted with the
318
- * menu's tone and cannot drift from `Panel`'s glass.
319
- */
320
- declare const getSidebarSurfaceTokens: (variant: SidebarVariant, color: TrueColor) => SidebarSurfaceTokens;
321
- type ButtonTheme = Record<ButtonVariant, Record<TrueColor, string>>;
322
- type ButtonHoverTheme = Record<ButtonVariant, Record<TrueColor, string>>;
323
- type ButtonActiveTheme = Record<ButtonVariant, Record<TrueColor, string>>;
324
- type ButtonActiveHoverTheme = Record<ButtonVariant, Record<TrueColor, string>>;
325
- type ToggleTheme = Record<TrueColor, string>;
326
- type CheckboxTheme = Record<TrueColor, string>;
327
- type SpinnerTheme = Record<TrueColor, [string, string, string, string]>;
328
- type LoaderTheme = Record<TrueColor, {
329
- track: string;
330
- bar: string;
331
- }>;
332
- type MultiToggleTheme = Record<TrueColor, {
333
- active: string;
334
- activeText: string;
335
- indicator: string;
336
- hover: string;
337
- }>;
338
- type MultiToggleVariantTokens = {
339
- softIndicator: string;
340
- activeText: string;
341
- hover: string;
342
- };
343
- type MultiToggleVariantTheme = Record<TrueColor, MultiToggleVariantTokens>;
344
- type TabsColorTokens = {
345
- hoverText: string;
346
- activeText: string;
347
- onAccentText: string;
348
- focusRing: string;
349
- accentBg: string;
350
- subtleBg: string;
351
- subtleHoverBg: string;
352
- segmentedContainer: string;
353
- badgeSubtle: string;
354
- badgeStrong: string;
355
- badgeOnAccent: string;
356
- underlineActive: string;
357
- };
358
- type TabsTheme = Record<TrueColor, TabsColorTokens>;
359
- type PanelToneConfig = {
360
- border: string;
361
- /**
362
- * Hairline for the `outlined` variant. Deliberately lighter than `border`
363
- * and paired with a low-alpha dark value, so the outline reads as a hairline
364
- * in both modes instead of a hard rule in light mode.
365
- */
366
- outlineBorder: string;
367
- heading: string;
368
- muted: string;
369
- badge: string;
370
- subtleBg: string;
371
- tonalBg: string;
372
- glassBg: string;
373
- glassBorder: string;
374
- liquidBg: string;
375
- liquidBorder: string;
376
- liquidShadow: string;
377
- liquidHeading: string;
378
- overlayGradient: string;
379
- decorationShape: string;
380
- decorationGradient: string;
381
- };
382
- type PanelTheme = Record<TrueColor, PanelToneConfig>;
383
- type StepperToneConfig = {
384
- activeBg: string;
385
- activeText: string;
386
- completedBg: string;
387
- completedText: string;
388
- pendingBorder: string;
389
- pendingText: string;
390
- underlineBase: string;
391
- };
392
- type StepperTheme = Record<TrueColor, StepperToneConfig>;
393
- type BadgeTheme = Record<TrueColor, string>;
394
- type PillTheme = Record<TrueColor, Record<"solid" | "soft" | "outline", {
395
- base: string;
396
- border?: string;
397
- }>>;
398
- type AlertTheme = Record<TrueColor, {
399
- subtle: string;
400
- solid: string;
401
- outline: string;
402
- icon: string;
403
- text: string;
404
- border: string;
405
- dismiss: string;
406
- }>;
407
- type StatTileTheme = Record<TrueColor, {
408
- decorationBg: string;
409
- iconColor: string;
410
- divider: string;
411
- }>;
412
- type ButtonSelectorColorTokens = {
413
- selectedBorder: string;
414
- selectedBg: string;
415
- selectedIcon: string;
416
- selectedLabel: string;
417
- selectedIndicatorBg: string;
418
- selectedIndicatorBorder: string;
419
- selectedIndicatorDot: string;
420
- };
421
- type ButtonSelectorTheme = Record<TrueColor, ButtonSelectorColorTokens>;
422
- interface ThemeDefinition {
423
- button: ButtonTheme;
424
- buttonHover: ButtonHoverTheme;
425
- buttonActive: ButtonActiveTheme;
426
- buttonActiveHover: ButtonActiveHoverTheme;
427
- toggle: ToggleTheme;
428
- checkbox: CheckboxTheme;
429
- spinner: SpinnerTheme;
430
- loader: LoaderTheme;
431
- multiToggle: MultiToggleTheme;
432
- multiToggleVariant: MultiToggleVariantTheme;
433
- tabs: TabsTheme;
434
- panel: PanelTheme;
435
- stepper: StepperTheme;
436
- badge: BadgeTheme;
437
- pill: PillTheme;
438
- alert: AlertTheme;
439
- statTile: StatTileTheme;
440
- buttonSelector: ButtonSelectorTheme;
441
- }
442
- type DeepPartial<T> = {
443
- [K in keyof T]?: T[K] extends Record<string, unknown> ? DeepPartial<T[K]> : T[K];
444
- };
445
- declare const configureTheme: (overrides: DeepPartial<ThemeDefinition>) => void;
446
- declare const resetTheme: () => void;
447
- declare const getButtonColorClasses: (variant: ButtonVariant, color: TrueColor) => string;
448
- declare const getButtonHoverClasses: (variant: ButtonVariant, color: TrueColor) => string;
449
- declare const getButtonActiveClasses: (variant: ButtonVariant, color: TrueColor) => string;
450
- declare const getButtonActiveHoverClasses: (variant: ButtonVariant, color: TrueColor) => string;
451
- declare const getButtonBaseClasses: (variant: ButtonVariant, color: TrueColor) => string;
452
- /**
453
- * The `ButtonVariant`s that read as a slider.
454
- *
455
- * `link` and `clear` are text treatments — a slider has no text to treat —
456
- * and `icon` is a square affordance, so all three are excluded rather than
457
- * aliased onto something else. What remains covers the full range a track
458
- * can express: a saturated fill, a tinted one, a bordered wash, a quiet
459
- * translucent one and a frosted one.
460
- */
461
- declare const SLIDER_VARIANTS: readonly ["solid", "soft", "outline", "ghost", "glass"];
462
- type SliderVariant = (typeof SLIDER_VARIANTS)[number];
463
- interface SliderVariantTokens {
464
- /** Paint for the active track segment, from the start (or min handle) to the value. */
465
- fill: string;
466
- /** Border of the handle. */
467
- handle: string;
468
- /** The handle's focus-ring colour, including its `focus-visible:` prefix. */
469
- ring: string;
470
- }
471
- /**
472
- * Slider treatments — the same visual language `Button` uses, mapped onto a
473
- * slider's two paintable surfaces (the track segment and the handle) so a
474
- * slider dropped next to a button row reads as part of the same UI.
475
- */
476
- declare const getSliderVariantTokens: (color: TrueColor, variant: SliderVariant) => SliderVariantTokens;
477
- /**
478
- * The `ButtonVariant`s that read as a toggle.
479
- *
480
- * Same rationale as `SLIDER_VARIANTS`: `link` and `clear` are text treatments
481
- * a track has nothing to treat, and `icon` is a square affordance. What
482
- * remains covers the full range a track can express — a saturated fill, a
483
- * tinted one, a bordered wash, a quiet translucent one and a frosted one.
484
- */
485
- declare const TOGGLE_VARIANTS: readonly ["solid", "soft", "outline", "ghost", "glass"];
486
- type ToggleVariant = (typeof TOGGLE_VARIANTS)[number];
487
- interface ToggleVariantTokens {
488
- /** Paint for the track when the switch is on (carries `peer-checked:`). */
489
- track: string;
490
- /** The thumb's focus-ring colour, driven off the input's `focus-visible`. */
491
- ring: string;
492
- /** True when the on-state fill is see-through and sits over unknown content. */
493
- translucent: boolean;
494
- }
495
- /**
496
- * Toggle treatments — the same visual language `Button` and `Slider` use,
497
- * mapped onto the toggle's one paintable surface (the on-state track fill) so
498
- * a toggle dropped next to a button or slider reads as part of the same UI.
499
- *
500
- * The off-state track is deliberately identical across variants — the neutral
501
- * base — so the on-state fill is what expresses the treatment, exactly as a
502
- * slider's neutral track does.
503
- *
504
- * The `glass` token only carries the frosted fill; the backdrop blur,
505
- * vibrancy and specular overlay stay with the component, because they depend
506
- * on the `glassOpacity` / `vibrancy` / `specularMode` props. The same numeric
507
- * opacity caveat as `getGlassFillClass` applies: only the three presets are
508
- * safelisted.
509
- */
510
- declare const getToggleVariantTokens: (color: TrueColor, variant: ToggleVariant, glassOpacity?: GlassOpacity) => ToggleVariantTokens;
511
- declare const getToggleColorClasses: (color: TrueColor) => string;
512
- /**
513
- * @deprecated Returns `accent-{color}-600`, which only paints a *native*
514
- * checkbox — and a native checkbox ignores border, radius and background, so
515
- * every other class the control carried was dead. Use
516
- * `getCheckboxControlTokens`, which styles a real box.
517
- */
518
- declare const getCheckboxColorClasses: (color: TrueColor) => string;
519
- interface CheckboxControlTokens {
520
- /** Fill and border of the box once checked or indeterminate. */
521
- checked: string;
522
- /** Focus ring, driven off the sibling input's focus. */
523
- ring: string;
524
- /** Colour of the tick/dash glyph, which sits on the checked fill. */
525
- glyph: string;
526
- }
527
- /**
528
- * Fills step to `-700` light / `-400` dark rather than the `-600` / `-500` the
529
- * native `accent-color` used, for the same reason `Alert`'s solid variant does:
530
- * a white glyph on `{color}-600` measures 2.94:1 on yellow and 3.06 on lime,
531
- * under even the 3:1 that WCAG asks of a *graphical* object, and on a `-500`
532
- * fill it is worse. At `-700` under white and `-400` under `{color}-950` the
533
- * worst case across all 21 tones is 4.93:1.
534
- */
535
- interface CheckboxVariantTokens {
536
- /** Fill, shadow and backdrop of the resting box. */
537
- fill: string;
538
- /** Resting border colour. Replaced wholesale by the error state. */
539
- border: string;
540
- /** Border colour under the cursor. */
541
- hover: string;
542
- /** True when the box is see-through and sits over unknown content. */
543
- translucent: boolean;
544
- }
545
- declare const getCheckboxVariantTokens: (variant: InputVariant) => CheckboxVariantTokens;
546
- declare const getCheckboxControlTokens: (color: TrueColor) => CheckboxControlTokens;
547
- declare const getSpinnerColorTokens: (color: TrueColor) => [string, string, string, string];
548
- declare const getLoaderProgressColors: (color: TrueColor) => {
549
- track: string;
550
- bar: string;
551
- };
552
- declare const getMultiToggleColorTokens: (color: TrueColor) => {
553
- active: string;
554
- activeText: string;
555
- indicator: string;
556
- hover: string;
557
- };
558
- declare const getMultiToggleVariantTokens: (color: TrueColor) => MultiToggleVariantTokens;
559
- declare const getTabsColorTokens: (color: TrueColor) => TabsColorTokens;
560
- declare const getPanelToneStyles: (tone: TrueColor) => PanelToneConfig;
561
- declare const getStepperTonePalette: (tone: TrueColor) => StepperToneConfig;
562
- declare const getBadgeColorClasses: (color: TrueColor) => string;
563
- declare const getPillColorClasses: (color: TrueColor, variant: "solid" | "soft" | "outline") => {
564
- base: string;
565
- border?: string;
566
- };
567
- /**
568
- * @deprecated Use `getAlertVariantTokens(color, variant)`. This bag hands the
569
- * same icon/text/dismiss classes to every variant, which is unreadable on
570
- * `solid`. Kept so existing call sites keep compiling.
571
- */
572
- declare const getAlertColorClasses: (color: TrueColor) => AlertTheme[TrueColor];
573
- /**
574
- * Alert treatments. `glass` and `liquid-glass` are the same pair `Panel` and
575
- * `Pill` offer, so a callout dropped on a glass card no longer has to be the
576
- * one opaque slab in the layout.
577
- */
578
- declare const ALERT_VARIANTS: readonly ["subtle", "solid", "outline", "glass", "liquid-glass"];
579
- type AlertVariant = (typeof ALERT_VARIANTS)[number];
580
- /**
581
- * Where the leading icon sits against the callout's content.
582
- *
583
- * `top` is the default and the only one that was previously possible: the icon
584
- * centres on the *title's* line box, which is what you want for a one- or
585
- * two-line callout. `center` centres it against the whole block — right when
586
- * the body runs long enough that a top-aligned glyph looks stranded — and
587
- * `bottom` pins it to the last line.
588
- */
589
- declare const ALERT_ICON_ALIGNMENTS: readonly ["top", "center", "bottom"];
590
- type AlertIconAlign = (typeof ALERT_ICON_ALIGNMENTS)[number];
591
- /**
592
- * What the callout *means*, as opposed to what colour it is.
593
- *
594
- * Both kits' demos have been passing `tone="info"` / `"success"` / `"warning"`
595
- * / `"danger"` since tone became a `TrueColor` — none of them are one, so every
596
- * such alert fell through to the blue fallback and four "different" tones
597
- * rendered identically. The semantics were real and worth keeping; they just
598
- * belong in their own prop, which resolves to a tone *and* the right icon *and*
599
- * the right live-region politeness.
600
- */
601
- declare const ALERT_INTENTS: readonly ["info", "success", "warning", "danger", "neutral"];
602
- type AlertIntent = (typeof ALERT_INTENTS)[number];
603
- interface AlertIntentConfig {
604
- tone: TrueColor;
605
- /** Registry icon name used when the caller does not supply one. */
606
- icon: string;
607
- /**
608
- * How assistive technology should announce it. `role="alert"` is an
609
- * *assertive* live region: it interrupts whatever the user is reading, which
610
- * is right for a failure and wrong for a page that merely renders an
611
- * informational banner on load.
612
- */
613
- live: "assertive" | "polite";
614
- }
615
- declare const ALERT_INTENT_CONFIG: Record<AlertIntent, AlertIntentConfig>;
616
- interface AlertVariantTokens {
617
- /** Fill plus the callout's base copy colour. */
618
- surface: string;
619
- /** Border colour. The `border` utility itself is on the base class. */
620
- border: string;
621
- /** Leading icon. */
622
- icon: string;
623
- /** Secondary copy under the title. */
624
- text: string;
625
- /** Dismiss button: rest, hover and focus ring. */
626
- dismiss: string;
627
- }
628
- /**
629
- * Replaces the old flat `getAlertColorClasses` bag, which handed the *same*
630
- * `icon`, `text` and `dismiss` classes to every variant. On `solid` — a
631
- * `{color}-600` fill — that painted the description `{color}-700` and the icon
632
- * `{color}-500`, i.e. a dark tone on a saturated tone of itself. It was
633
- * unreadable at every tone and no test could see it.
634
- */
635
- declare const getAlertVariantTokens: (color: TrueColor, variant: AlertVariant) => AlertVariantTokens;
636
- declare const getStatTileColorClasses: (color: TrueColor) => StatTileTheme[TrueColor];
637
-
638
- 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";
639
- declare const iconRegistry: Record<IconName, React__default.ForwardRefExoticComponent<React__default.SVGProps<SVGSVGElement>>>;
640
-
641
- type HelpButtonPlacement = "top" | "bottom" | "left" | "right" | "auto";
642
- interface HelpButtonProps {
643
- /**
644
- * Help content to display in the panel.
645
- * Pass a `string` to render as Markdown (tables and URLs supported).
646
- * Pass a `ReactNode` to render arbitrary JSX directly.
647
- */
648
- content: string | React__default.ReactNode;
649
- /** Optional title shown in the panel header. Defaults to "Help". */
650
- title?: React__default.ReactNode;
651
- /**
652
- * Preferred placement of the floating panel relative to the trigger button.
653
- * "auto" (default) picks the side with the most available space.
654
- */
655
- placement?: HelpButtonPlacement;
656
- /** Accent color for the trigger button and the panel header stripe. */
657
- color?: TrueColor;
658
- /** Size of the trigger icon button. */
659
- size?: "xs" | "sm" | "md" | "lg";
660
- /** Icon for the trigger button. Defaults to "Help". */
661
- icon?: IconName;
662
- /** Maximum width of the floating panel in px. Defaults to 360. */
663
- maxWidth?: number;
664
- /** Extra class applied to the root wrapper. */
665
- className?: string;
666
- }
667
- declare const HelpButton: React__default.FC<HelpButtonProps>;
668
-
669
- declare enum CapsuleBlueprintValueType {
670
- String = "string",
671
- Int = "int",
672
- Boolean = "boolean",
673
- Select = "select",
674
- List = "list",
675
- Map = "map"
676
- }
677
- interface CapsuleBlueprintParameter {
678
- name: string;
679
- key: string;
680
- description?: string;
681
- type?: string;
682
- value_type?: CapsuleBlueprintValueType;
683
- default?: any;
684
- required?: boolean;
685
- is_required?: boolean;
686
- is_secret?: boolean;
687
- options?: any;
688
- hint?: string;
689
- help?: string;
690
- service_name?: string;
691
- depends_on?: string[];
692
- [key: string]: any;
693
- }
694
-
695
- export { type SideMenuItemTokens as $, type AlertIntent as A, type ButtonVariant as B, type ControlSize as C, CapsuleBlueprintValueType as D, type CheckboxControlTokens as E, type CheckboxVariantTokens as F, type GlassOpacity as G, type HelpButtonProps as H, type IconName as I, type ControlSizeTokens as J, DEFAULT_SURFACE_CORNER as K, DEFAULT_TRIGGER_CORNER as L, GLOW_INTENSITIES as M, type GlowTokens as N, INPUT_VARIANTS as O, type InputVariantTokens as P, SIDEBAR_COLLAPSIBLE_MODES as Q, SIDEBAR_IDLE_COPY as R, type SurfaceCorner as S, type TrueColor as T, SIDEBAR_MOBILE_QUERY as U, SIDEBAR_SIDES as V, SIDEBAR_VARIANTS as W, SLIDER_VARIANTS as X, SURFACE_CORNERS as Y, SURFACE_PADDINGS as Z, SURFACE_VARIANTS as _, type AlertVariant as a, type SidebarIdleCopyKind as a0, type SidebarSurfaceTokens as a1, type SliderVariantTokens as a2, type SurfaceTriggerTokens as a3, TOGGLE_VARIANTS as a4, TRUE_COLORS as a5, type ToggleVariantTokens as a6, configureTheme as a7, getAlertColorClasses as a8, getAlertVariantTokens as a9, getSurfacePaddingClasses as aA, getSurfaceTextTokens as aB, getSurfaceTriggerTokens as aC, getTabsColorTokens as aD, getToggleColorClasses as aE, getToggleVariantTokens as aF, iconRegistry as aG, resetTheme as aH, resolveGlowGradient as aI, stripBorderColor as aJ, HelpButton as aK, getBadgeColorClasses as aa, getButtonActiveClasses as ab, getButtonActiveHoverClasses as ac, getButtonBaseClasses as ad, getButtonColorClasses as ae, getButtonHoverClasses as af, getCheckboxColorClasses as ag, getCheckboxControlTokens as ah, getCheckboxVariantTokens as ai, getControlSizeTokens as aj, getGlowTokens as ak, getInputVariantTokens as al, getLoaderProgressColors as am, getMultiToggleColorTokens as an, getMultiToggleVariantTokens as ao, getPanelToneStyles as ap, getPillColorClasses as aq, getSideMenuItemTokens as ar, getSidebarSurfaceTokens as as, getSliderVariantTokens as at, getSpinnerColorTokens as au, getStatTileColorClasses as av, getStepperTonePalette as aw, getSurfaceCornerClass as ax, getSurfaceCornerRem as ay, getSurfacePaddingClass as az, type AlertIconAlign as b, type GlassVibrancy as c, type SpecularMode as d, type ButtonWeight as e, type SurfacePadding as f, type SurfaceVariant as g, type InputVariant as h, type GlowIntensity 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 CapsuleBlueprintParameter as p, type SurfaceTextTokens as q, ALERT_ICON_ALIGNMENTS as r, ALERT_INTENTS as s, ALERT_INTENT_CONFIG as t, ALERT_VARIANTS as u, type AlertIntentConfig as v, type AlertVariantTokens as w, BUTTON_VARIANTS as x, BUTTON_WEIGHTS as y, CONTROL_SIZES as z };