@cjlapao/ui-kit-vue 0.2.17 → 0.2.18

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.
@@ -1,4 +1,6 @@
1
1
  import { type GlassOpacity } from "./glass";
2
+ import { type SurfaceTransparency } from "./surfaceTransparency";
3
+ export { SURFACE_TRANSPARENCIES, resolveSurfaceTransparency, getSurfaceTransparencyClasses, type SurfaceTransparency } from "./surfaceTransparency";
2
4
  export declare const BUTTON_VARIANTS: readonly ["solid", "soft", "outline", "ghost", "link", "clear", "icon", "glass"];
3
5
  export type ButtonVariant = (typeof BUTTON_VARIANTS)[number];
4
6
  /** Label weight. Derived from the runtime list for the same reason. */
@@ -431,6 +433,10 @@ export declare const DEFAULT_SURFACE_PADDING: SurfacePadding;
431
433
  export declare const getSurfacePaddingClass: (padding: SurfacePadding) => string;
432
434
  /** Every padding token but `none`, for the callers that require a real inset. */
433
435
  export declare const getSurfacePaddingClasses: () => Record<SurfacePadding, string>;
436
+ export declare const DEFAULT_COMPACT_SURFACE_PADDING: SurfacePadding;
437
+ /** Shared smaller-component inset scale, independent of the component's size. */
438
+ export declare const getCompactSurfacePaddingClass: (padding?: SurfacePadding) => string;
439
+ export declare const getCompactSurfacePaddingClasses: () => Record<SurfacePadding, string>;
434
440
  /**
435
441
  * The gutter a detached card leaves OUTSIDE itself — the margin between the
436
442
  * card and the edges of its container, controllable on every axis on its
@@ -964,6 +970,8 @@ export declare const SURFACE_GLASS_RIM = "border-white/50 dark:border-white/10";
964
970
  /** Variants whose surface is see-through. */
965
971
  export declare const TRANSLUCENT_SURFACE_VARIANTS: readonly SurfaceVariant[];
966
972
  export interface SurfaceVariantOverrides {
973
+ /** Defaults to opaque except glass, liquid-glass and subtle. High keeps the existing alpha. */
974
+ transparency?: SurfaceTransparency;
967
975
  /** Replaces the variant's own fill, keeping its shadow and ring. */
968
976
  bgClass?: string;
969
977
  /** Replaces the variant's own rim colour. */
@@ -971,12 +979,9 @@ export interface SurfaceVariantOverrides {
971
979
  /** Extra classes folded in for `liquid-glass` (vibrancy, glass fill). */
972
980
  liquidExtras?: string;
973
981
  }
974
- /**
975
- * The full class set for a surface variant at a tone — the same combination
976
- * `Panel` renders, so a control using this sits flush beside one.
977
- */
978
- export declare const getSurfaceVariantClasses: (variant: SurfaceVariant, tone: TrueColor, overrides?: SurfaceVariantOverrides) => string;
979
982
  export declare const getPanelToneStyles: (tone: TrueColor) => PanelToneConfig;
983
+ /** Shared surface paint, including the four-level background transparency scale. */
984
+ export declare const getSurfaceVariantClasses: (variant: SurfaceVariant, tone: TrueColor, overrides?: SurfaceVariantOverrides) => string;
980
985
  export declare const getStepperTonePalette: (tone: TrueColor) => StepperToneConfig;
981
986
  export declare const getBadgeColorClasses: (color: TrueColor) => string;
982
987
  export declare const getPillColorClasses: (color: TrueColor, variant: "solid" | "soft" | "outline") => {
@@ -1156,4 +1161,3 @@ export interface AlertVariantTokens {
1156
1161
  */
1157
1162
  export declare const getAlertVariantTokens: (color: TrueColor, variant: AlertVariant) => AlertVariantTokens;
1158
1163
  export declare const getStatTileColorClasses: (color: TrueColor) => StatTileTheme[TrueColor];
1159
- export {};
@@ -0,0 +1,12 @@
1
+ import type { SurfaceVariant } from "./Theme";
2
+ export declare const SURFACE_TRANSPARENCIES: readonly ["none", "low", "medium", "high"];
3
+ export type SurfaceTransparency = (typeof SURFACE_TRANSPARENCIES)[number];
4
+ /** The existing alpha is the upper bound; only these surfaces opt in by default. */
5
+ export declare function resolveSurfaceTransparency(variant: SurfaceVariant, value?: SurfaceTransparency): SurfaceTransparency;
6
+ /**
7
+ * Change only background alpha, never content, borders, shadows or decorations.
8
+ * Opaque fills precompose the existing tint on white / neutral-900, preserving
9
+ * its appearance without allowing the application's backdrop to bleed through.
10
+ * The CSS variable utilities below are generated by generate-safelist.mjs.
11
+ */
12
+ export declare function getSurfaceTransparencyClasses(classes: string, variant: SurfaceVariant, transparency?: SurfaceTransparency): string;
@@ -154,7 +154,7 @@ export declare const ConfirmInlinePanel: import("vue").DefineComponent<import("v
154
154
  cancelLabel: string | VNode<import("vue").RendererNode, import("vue").RendererElement, {
155
155
  [key: string]: any;
156
156
  }>;
157
- confirmVariant: "clear" | "solid" | "soft" | "outline" | "ghost" | "link" | "icon" | "glass";
157
+ confirmVariant: "clear" | "glass" | "solid" | "soft" | "outline" | "ghost" | "link" | "icon";
158
158
  confirmColor: "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "rose" | "slate" | "gray" | "zinc" | "neutral" | "stone";
159
159
  isConfirmDisabled: boolean;
160
160
  showBackdrop: boolean;
@@ -148,7 +148,7 @@ export declare const ConfirmModal: import("vue").DefineComponent<import("vue").E
148
148
  cancelLabel: string | VNode<import("vue").RendererNode, import("vue").RendererElement, {
149
149
  [key: string]: any;
150
150
  }>;
151
- confirmVariant: "clear" | "solid" | "soft" | "outline" | "ghost" | "link" | "icon" | "glass";
151
+ confirmVariant: "clear" | "glass" | "solid" | "soft" | "outline" | "ghost" | "link" | "icon";
152
152
  confirmColor: "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "rose" | "slate" | "gray" | "zinc" | "neutral" | "stone";
153
153
  isConfirmDisabled: boolean;
154
154
  confirmButtonProps: ButtonProps & Record<string, unknown>;
@@ -1,7 +1,7 @@
1
1
  import type { CSSProperties, VNode } from "vue";
2
2
  import type { ButtonProps } from "./Button.vue";
3
3
  import type { LoaderProps } from "./Loader.vue";
4
- import type { SurfaceCorner, SurfacePadding, SurfaceVariant, TrueColor } from "../theme/Theme";
4
+ import type { SurfaceCorner, SurfacePadding, SurfaceVariant, SurfaceTransparency, TrueColor } from "../theme/Theme";
5
5
  /**
6
6
  * Aliased from the shared theme rather than redeclared, so the Vue and React
7
7
  * kits cannot drift. These were three separate hand-written unions; the corner
@@ -34,6 +34,7 @@ export interface PanelProps {
34
34
  actions?: PanelAction[];
35
35
  actionLayout?: PanelActionLayout;
36
36
  variant?: PanelVariant;
37
+ transparency?: SurfaceTransparency;
37
38
  tone?: TrueColor;
38
39
  padding?: PanelPadding;
39
40
  corner?: PanelCorner;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cjlapao/ui-kit-vue",
3
- "version": "0.2.17",
3
+ "version": "0.2.18",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cjlapao/ui-kit.git",