import {
  a as i,
  b as m,
  c,
  e as F
} from "./chunk-WFS5M5IB.js";
import {
  a as o
} from "./chunk-IO47FP3U.js";

// src/theming/base.ts
var e = {
  // Official color palette
  primary: "#FF4785",
  // coral
  secondary: "#029CFD",
  // ocean
  tertiary: "#FAFBFC",
  ancillary: "#22a699",
  // Complimentary
  orange: "#FC521F",
  gold: "#FFAE00",
  green: "#66BF3C",
  seafoam: "#37D5D3",
  purple: "#6F2CAC",
  ultraviolet: "#2A0481",
  // Monochrome
  lightest: "#FFFFFF",
  lighter: "#F7FAFC",
  light: "#EEF3F6",
  mediumlight: "#ECF4F9",
  medium: "#D9E8F2",
  mediumdark: "#73828C",
  dark: "#5C6870",
  darker: "#454E54",
  darkest: "#2E3438",
  // For borders
  border: "hsla(203, 50%, 30%, 0.15)",
  // Status
  positive: "#66BF3C",
  negative: "#FF4400",
  warning: "#E69D00",
  critical: "#FFFFFF",
  // Text
  defaultText: "#2E3438",
  inverseText: "#FFFFFF",
  positiveText: "#448028",
  negativeText: "#D43900",
  warningText: "#A15C20"
}, s = {
  app: "#F6F9FC",
  bar: e.lightest,
  content: e.lightest,
  preview: e.lightest,
  gridCellSize: 10,
  hoverable: F(0.9, e.secondary),
  // hover state for items in a list
  // Notification, error, and warning backgrounds
  positive: "#E1FFD4",
  negative: "#FEDED2",
  warning: "#FFF5CF",
  critical: "#FF4400"
}, a = {
  fonts: {
    base: [
      '"Nunito Sans"',
      "-apple-system",
      '".SFNSText-Regular"',
      '"San Francisco"',
      "BlinkMacSystemFont",
      '"Segoe UI"',
      '"Helvetica Neue"',
      "Helvetica",
      "Arial",
      "sans-serif"
    ].join(", "),
    mono: [
      "ui-monospace",
      "Menlo",
      "Monaco",
      '"Roboto Mono"',
      '"Oxygen Mono"',
      '"Ubuntu Monospace"',
      '"Source Code Pro"',
      '"Droid Sans Mono"',
      '"Courier New"',
      "monospace"
    ].join(", ")
  },
  weight: {
    regular: 400,
    bold: 700
  },
  size: {
    s1: 12,
    s2: 14,
    s3: 16,
    m1: 20,
    m2: 24,
    m3: 28,
    l1: 32,
    l2: 40,
    l3: 48,
    code: 90
  }
};

// src/theming/themes/dark.ts
var b = {
  base: "dark",
  // Storybook-specific color palette
  colorPrimary: "#FF4785",
  // coral
  colorSecondary: "#029CFD",
  // ocean
  // UI
  appBg: "#222425",
  appContentBg: "#1B1C1D",
  appPreviewBg: e.lightest,
  appBorderColor: "rgba(255,255,255,.1)",
  appBorderRadius: 4,
  // Fonts
  fontBase: a.fonts.base,
  fontCode: a.fonts.mono,
  // Text colors
  textColor: "#C9CDCF",
  textInverseColor: "#222425",
  textMutedColor: "#798186",
  // Toolbar default and active colors
  barTextColor: e.mediumdark,
  barHoverColor: e.secondary,
  barSelectedColor: e.secondary,
  barBg: "#292C2E",
  // Form colors
  buttonBg: "#222425",
  buttonBorder: "rgba(255,255,255,.1)",
  booleanBg: "#222425",
  booleanSelectedBg: "#2E3438",
  inputBg: "#1B1C1D",
  inputBorder: "rgba(255,255,255,.1)",
  inputTextColor: e.lightest,
  inputBorderRadius: 4
}, h = b;

// src/theming/themes/light.ts
var f = {
  base: "light",
  // Storybook-specific color palette
  colorPrimary: "#FF4785",
  // coral
  colorSecondary: "#029CFD",
  // ocean
  // UI
  appBg: s.app,
  appContentBg: e.lightest,
  appPreviewBg: e.lightest,
  appBorderColor: e.border,
  appBorderRadius: 4,
  // Fonts
  fontBase: a.fonts.base,
  fontCode: a.fonts.mono,
  // Text colors
  textColor: e.darkest,
  textInverseColor: e.lightest,
  textMutedColor: e.dark,
  // Toolbar default and active colors
  barTextColor: e.mediumdark,
  barHoverColor: e.secondary,
  barSelectedColor: e.secondary,
  barBg: e.lightest,
  // Form colors
  buttonBg: s.app,
  buttonBorder: e.medium,
  booleanBg: e.mediumlight,
  booleanSelectedBg: e.lightest,
  inputBg: e.lightest,
  inputBorder: e.border,
  inputTextColor: e.darkest,
  inputBorderRadius: 4
}, l = f;

// src/theming/utils.ts
import { logger as y } from "storybook/internal/client-logger";
import { global as B } from "@storybook/global";
var { window: d } = B, A = /* @__PURE__ */ o((r) => ({ color: r }), "mkColor"), x = /* @__PURE__ */ o((r) => typeof r != "string" ? (y.warn(
  `Color passed to theme object should be a string. Instead ${r}(${typeof r}) was passed.`
), !1) : !0, "isColorString"), k = /* @__PURE__ */ o((r) => !/(gradient|var|calc)/.test(r), "isValidColorForPolished"), T = /* @__PURE__ */ o((r, t) => r === "darken" ? i(`${m(1, t)}`, 0.95) : r === "lighten" ? i(`${c(1, t)}`, 0.95) : t, "applyPolished"), u = /* @__PURE__ */ o((r) => (t) => {
  if (!x(t) || !k(t))
    return t;
  try {
    return T(r, t);
  } catch {
    return t;
  }
}, "colorFactory"), H = u("lighten"), I = u("darken"), C = /* @__PURE__ */ o(() => !d || !d.matchMedia ? "light" : d.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", "getPreferredColorScheme");

// src/theming/create.ts
var p = {
  light: l,
  dark: h,
  normal: l
}, g = C(), O = /* @__PURE__ */ o((r = { base: g }, t) => {
  let n = {
    ...p[g],
    ...p[r.base] || {},
    ...r,
    base: p[r.base] ? r.base : g
  };
  return {
    ...t,
    ...n,
    barSelectedColor: r.barSelectedColor || n.colorSecondary
  };
}, "create");

export {
  e as a,
  s as b,
  a as c,
  l as d,
  A as e,
  H as f,
  I as g,
  C as h,
  p as i,
  O as j
};
