softable-pixels-web 1.0.2 → 1.0.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 (36) hide show
  1. package/dist/Checkbox-ChOwHDqG.js +149 -0
  2. package/dist/Checkbox-ChOwHDqG.js.map +1 -0
  3. package/dist/Icon-DP_mHQ2j.js +209 -0
  4. package/dist/Icon-DP_mHQ2j.js.map +1 -0
  5. package/dist/InfoSummary-DG1mzcP0.js +250 -0
  6. package/dist/InfoSummary-DG1mzcP0.js.map +1 -0
  7. package/dist/Input-DQA00Ogn.js +398 -0
  8. package/dist/Input-DQA00Ogn.js.map +1 -0
  9. package/dist/{TabSwitch-bxVgCnTw.js → TabSwitch-CXyetOBu.js} +3 -3
  10. package/dist/{TabSwitch-bxVgCnTw.js.map → TabSwitch-CXyetOBu.js.map} +1 -1
  11. package/dist/{ThemeContext-DiQ-_KUr.js → ThemeContext-C0tdHJcj.js} +46 -4
  12. package/dist/ThemeContext-C0tdHJcj.js.map +1 -0
  13. package/dist/{Typography-Dn1vnPBy.js → Typography-B9X7_xlT.js} +4 -3
  14. package/dist/{Typography-Dn1vnPBy.js.map → Typography-B9X7_xlT.js.map} +1 -1
  15. package/dist/checkbox.d.ts +3 -0
  16. package/dist/checkbox.js +5 -0
  17. package/dist/{index--nD5Wzza.d.ts → index-CCkDXM6z.d.ts} +4 -4
  18. package/dist/{index-B0CCFNqx.d.ts → index-CDW6xFdv.d.ts} +24 -2
  19. package/dist/index-CMnvjaqX.d.ts +31 -0
  20. package/dist/index-DmDV6MR_.d.ts +44 -0
  21. package/dist/index.d.ts +8 -4
  22. package/dist/index.js +8 -4
  23. package/dist/info-summary.d.ts +62 -0
  24. package/dist/info-summary.js +4 -0
  25. package/dist/input.d.ts +3 -0
  26. package/dist/input.js +5 -0
  27. package/dist/tab-switch.d.ts +1 -1
  28. package/dist/tab-switch.js +2 -2
  29. package/dist/theme-context.d.ts +1 -1
  30. package/dist/theme-context.js +1 -1
  31. package/dist/{index-C_T04IuG.d.ts → types-2d-4sjMo.d.ts} +4 -7
  32. package/dist/typography.d.ts +8 -2
  33. package/dist/typography.js +1 -1
  34. package/dist/{useThemedStyles-DyrejrCM.d.ts → useThemedStyles-01zK-tbY.d.ts} +9 -2
  35. package/package.json +23 -2
  36. package/dist/ThemeContext-DiQ-_KUr.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeContext-C0tdHJcj.js","names":["result: any","out: any","defaultThemes: ThemeRegistry","ThemeProvider: React.FC<ThemeProviderProps>"],"sources":["../src/utils/functions/deepMerge.ts","../src/contexts/ThemeContext/constants.ts","../src/contexts/ThemeContext/utils/general.ts","../src/contexts/ThemeContext/utils/themeToCSSVars.ts","../src/contexts/ThemeContext/index.tsx"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\nexport type DeepPartial<T> = {\n [P in keyof T]?: T[P] extends Array<infer U>\n ? Array<DeepPartial<U>>\n : T[P] extends object\n ? DeepPartial<T[P]>\n : T[P]\n}\n\nexport function deepMerge<T>(base: T, override?: DeepPartial<T>): T {\n if (override === undefined) return clone(base)\n\n if (!isPlainObject(base) || !isPlainObject(override)) {\n return clone(override as T)\n }\n\n const result: any = Array.isArray(base) ? [] : {}\n\n const baseKeys = Object.keys(base as any) as (keyof T)[]\n const overrideKeys = Object.keys(override as any) as (keyof T)[]\n\n const allKeys = Array.from(new Set([...baseKeys, ...overrideKeys]))\n\n for (const k of allKeys) {\n const baseVal = (base as any)[k]\n const overrideVal = (override as any)[k]\n\n if (overrideVal === undefined) {\n result[k] = clone(baseVal)\n continue\n }\n\n if (isPlainObject(baseVal) && isPlainObject(overrideVal)) {\n result[k] = deepMerge(baseVal, overrideVal)\n continue\n }\n\n result[k] = clone(overrideVal)\n }\n\n return result as T\n}\n\nfunction isPlainObject(x: any): x is Record<string, any> {\n return !!x && typeof x === 'object' && !Array.isArray(x)\n}\n\nfunction clone<T>(v: T): T {\n if (v === undefined || v === null) return v\n if (Array.isArray(v)) return v.map(item => clone(item)) as unknown as T\n if (isPlainObject(v)) {\n const out: any = {}\n for (const k of Object.keys(v)) out[k] = clone((v as any)[k])\n return out\n }\n return v\n}\n","// theme/defaultThemes.ts\nimport type { ThemeRegistry } from './types'\n\nconst COMMON_MAP = {\n spacing: {\n xs: '0.25rem', // 4px\n sm: '0.5rem', // 8px\n md: '1rem', // 16px\n lg: '1.5rem', // 24px\n xl: '2rem', // 32px\n '2xl': '3rem' // 48px\n },\n borderRadius: {\n none: '0rem', // 0px\n sm: '0.25rem', // 4px\n md: '0.375rem', // 6px\n lg: '0.5rem', // 8px\n full: '9999rem' // \"infinite\" radius equivalent\n },\n fontSize: {\n xs: '0.75rem', // 12px\n sm: '0.875rem', // 14px\n md: '1rem', // 16px\n lg: '1.125rem', // 18px\n xl: '1.25rem', // 20px\n '2xl': '1.5rem' // 24px\n },\n fontWeight: { normal: 400, medium: 500, semibold: 600, bold: 700 }\n} as const\n\nexport const defaultThemes: ThemeRegistry = {\n light: {\n colors: {\n scrollbar: '#0000001a',\n\n primary: '#0EB24C',\n secondary: '#6C6C6C',\n success: '#0EB24C',\n warning: '#f59e0b',\n error: '#ef4444',\n invalid: '#f87171',\n info: '#06b6d4',\n\n background: {\n primary: '#FFFFFF',\n card: {\n primary: '#F4F4F4',\n secondary: '#F3F6F9'\n }\n },\n button: {\n primary: {\n label: '#FFFFFF',\n background: '#003566',\n disabled_background: '#FFFFFF'\n },\n\n secondary: {\n label: '#FFFFFF',\n background: '#5A595B',\n disabled_background: '#FFFFFF'\n }\n },\n\n surface: '#FBFBFB',\n border: {\n primary: '#E8E8E9',\n secondary: '#E8E8E9'\n },\n\n text: {\n primary: '#222222',\n secondary: '#6C6C6C',\n disabled: '#A0A0A0',\n inverse: '#FFFFFF'\n }\n },\n\n ...COMMON_MAP,\n\n shadows: {\n sm: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n md: '0 4px 6px -1px rgba(0, 0, 0, 0.10)',\n lg: '0 10px 15px -3px rgba(0, 0, 0, 0.10)',\n xl: '0 20px 25px -5px rgba(0, 0, 0, 0.10)'\n }\n },\n\n dark: {\n colors: {\n scrollbar: '#858585',\n primary: '#0EB24C', // brand se mantém (ou pode clarear depois)\n secondary: '#C7CFD8',\n success: '#0EB24C',\n warning: '#f59e0b',\n error: '#ef4444',\n invalid: '#f87171',\n info: '#06b6d4',\n\n background: {\n primary: '#090909',\n card: {\n primary: '#F4F4F4',\n secondary: '#202020'\n }\n },\n button: {\n primary: {\n label: '#FFFFFF',\n background: '#003566',\n disabled_background: '#FFFFFF'\n },\n\n secondary: {\n label: '#FFFFFF',\n background: '#5A595B',\n disabled_background: '#FFFFFF'\n }\n },\n\n surface: '#090909',\n\n border: {\n primary: '#27282D',\n secondary: '#27282D'\n },\n\n text: {\n primary: '#ECECEC',\n secondary: '#C7CFD8',\n disabled: '#8B93A0',\n inverse: '#090909'\n }\n },\n\n ...COMMON_MAP,\n\n shadows: {\n sm: '0 1px 2px 0 rgba(0, 0, 0, 0.35)',\n md: '0 4px 6px -1px rgba(0, 0, 0, 0.45)',\n lg: '0 10px 15px -3px rgba(0, 0, 0, 0.50)',\n xl: '0 20px 25px -5px rgba(0, 0, 0, 0.55)'\n }\n }\n}\n","// Utils\n/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\nimport { deepMerge } from '@utils/functions'\nimport { defaultThemes } from '../constants'\n\n// Types\nimport type { ThemeMode, ThemeRegistry, ThemeTokens } from '../types'\n\n/**\n * Theme Utilities\n * ===============\n * Small DOM utilities used by the ThemeProvider to:\n * - toggle dark mode class for Tailwind compatibility\n * - inject CSS variables (`--px-*`) into the document root\n * - read/watch the OS/browser theme preference (`prefers-color-scheme`)\n *\n * These helpers are:\n * - **client-safe** (guarded for SSR)\n * - **framework-agnostic** (only touch `documentElement`)\n * - **tiny** (no dependencies)\n */\n\n/**\n * CSSVarMap\n * ---------\n * A map of CSS custom properties to be applied on the document root.\n *\n * Notes:\n * - Keys must be valid CSS variable names (e.g. `\"--px-bg\"`, `\"--px-text-primary\"`).\n * - Values can be strings or numbers.\n * - If you store numbers (e.g. 16), you decide at consumption time whether it means px.\n *\n * You can keep it generic:\n * Record<`--${string}`, string | number>\n *\n * Or restrict to your library prefix:\n * Record<`--px-${string}`, string | number>\n */\nexport type CSSVarMap = Partial<Record<`--${string}`, string | number>>\n\n/**\n * applyThemeClass(themeName)\n * -------------------------\n * Applies the light/dark mode class to the `<html>` element.\n *\n * Tailwind’s dark mode (in the common \"class\" strategy) typically relies on a\n * `.dark` class. This function toggles ONLY the `dark` class:\n *\n * - themeName `\"dark\"` => adds `.dark`\n * - themeName `\"light\"` => removes `.dark`\n *\n * SSR:\n * - No-op on the server (when `document` is undefined).\n */\nexport function applyThemeClass(themeName: 'light' | 'dark') {\n if (typeof document === 'undefined') return\n const root = document.documentElement\n root.classList.toggle('dark', themeName === 'dark')\n}\n\n/**\n * applyCssVars(vars)\n * ------------------\n * Injects CSS variables into the document root (`<html>`).\n *\n * This is how the library exposes theme tokens as CSS variables.\n * Components can then use `var(--px-...)` in styles.\n *\n * Example:\n * ```ts\n * applyCssVars({ '--px-bg': '#fff', '--px-text-primary': '#111' })\n * ```\n *\n * Behavior:\n * - Ignores `null` / `undefined` values.\n * - Converts all values to string before applying.\n *\n * SSR:\n * - No-op on the server (when `document` is undefined).\n */\nexport function applyCssVars(vars: CSSVarMap) {\n if (typeof document === 'undefined') return\n const root = document.documentElement\n\n for (const [key, value] of Object.entries(vars)) {\n if (value == null) continue\n root.style.setProperty(key, String(value))\n }\n}\n\n/**\n * getSystemThemeName()\n * --------------------\n * Returns the current OS/browser color scheme preference.\n *\n * It reads `prefers-color-scheme: dark` using `window.matchMedia`.\n *\n * Returns:\n * - `\"dark\"` if the user prefers dark mode\n * - `\"light\"` otherwise\n *\n * SSR:\n * - Returns `\"light\"` on the server (safe default).\n */\nexport function getSystemThemeName(): 'light' | 'dark' {\n if (typeof window === 'undefined') return 'light'\n const prefersDark =\n window.matchMedia?.('(prefers-color-scheme: dark)').matches ?? false\n return prefersDark ? 'dark' : 'light'\n}\n\n/**\n * watchSystemTheme(onChange)\n * --------------------------\n * Subscribes to changes in OS/browser theme preference.\n *\n * Use this when your selected mode is `\"system\"` so the app immediately reacts\n * when the user changes their OS theme.\n *\n * - Calls `onChange('light' | 'dark')` whenever the preference changes.\n * - Returns an `unsubscribe()` function.\n *\n * Implementation details:\n * - Uses `matchMedia('(prefers-color-scheme: dark)')`.\n * - Supports both modern `addEventListener('change', ...)` and legacy Safari\n * `addListener(...)` APIs.\n *\n * SSR:\n * - Returns a no-op unsubscribe function on the server.\n */\nexport function watchSystemTheme(onChange: (name: 'light' | 'dark') => void) {\n if (typeof window === 'undefined') return () => {}\n\n const mq = window.matchMedia('(prefers-color-scheme: dark)')\n\n const handler = () => onChange(mq.matches ? 'dark' : 'light')\n\n // Optional: sync immediately on subscribe\n handler()\n\n // Modern browsers\n if (mq.addEventListener) {\n mq.addEventListener('change', handler)\n return () => mq.removeEventListener('change', handler)\n }\n\n // Legacy Safari\n mq.addListener(handler as any)\n return () => mq.removeListener(handler as any)\n}\n\n/**\n * Resolves an effective theme name from a mode.\n */\nexport function resolveName(mode: ThemeMode): string {\n if (mode !== 'system') return mode\n return getSystemThemeName()\n}\n\n/**\n * Builds a registry of user theme patches.\n */\nexport function buildRegistry(\n userThemes?: Partial<ThemeRegistry>\n): ThemeRegistry {\n return {\n light: {},\n dark: {},\n ...(userThemes ?? {})\n } as ThemeRegistry\n}\n\n/**\n * Builds the final resolved theme tokens.\n */\nexport function buildTheme(\n registry: ThemeRegistry,\n resolvedName: string,\n override?: Partial<ThemeTokens>\n): ThemeTokens {\n const base: ThemeTokens =\n resolvedName === 'dark'\n ? (defaultThemes.dark as ThemeTokens)\n : (defaultThemes.light as ThemeTokens)\n\n const selectedPatch = (registry[resolvedName] ?? registry.light) as any\n\n const merged = deepMerge(base, selectedPatch)\n return deepMerge(merged, override)\n}\n\nexport function isThemeMode(value: unknown): value is ThemeMode {\n return typeof value === 'string' && value.length > 0\n}\n\nexport function getLocalStorageSafe(): Storage | null {\n if (typeof window === 'undefined') return null\n try {\n return window.localStorage\n } catch {\n return null\n }\n}\n","// Types\nimport type { CSSVarMap } from './general'\nimport type { ThemeTokens } from '../types'\n\n/**\n * themeToCssVars(theme)\n * ---------------------\n * Converts a resolved `ThemeTokens` object into a CSS variable map (`CSSVarMap`).\n *\n * The ThemeProvider uses this function to inject `--px-*` variables into the\n * document root (`<html>`). Components can then rely on stable CSS variables,\n * making them framework-agnostic and compatible with Tailwind (via `.dark`).\n *\n * Why CSS variables?\n * - They are fast (native to the browser)\n * - They work across any styling strategy (inline styles, CSS modules, Tailwind, etc.)\n * - They enable dynamic theme switching without rerendering every component\n *\n * Requirements / Assumptions:\n * - The input `theme` must be **fully resolved** (i.e. complete `ThemeTokens`).\n * The ThemeProvider is responsible for merging partial theme patches on top\n * of a complete base theme (light/dark defaults).\n *\n * Variable naming:\n * - All variables are prefixed with `--px-` to avoid collisions.\n * - Tokens are grouped by category (colors, surfaces, borders, text, spacing, radius, typography, shadows).\n *\n * Notes:\n * - Spacing/radius/fontSize tokens are stored as numbers (e.g. `16`), which is valid\n * for CSS variables. When consuming them, you can:\n * - append `px` in JS (`${var}px`), or\n * - store them as strings here (e.g. `\"16px\"`) if you prefer.\n *\n * Example usage (component styles):\n * ```ts\n * const styles = {\n * background: 'var(--px-bg)',\n * color: 'var(--px-text-primary)',\n * borderColor: 'var(--px-border-primary)',\n * }\n * ```\n *\n * Example usage (Tailwind config / CSS):\n * ```css\n * .card {\n * background: var(--px-surface);\n * color: var(--px-text-primary);\n * border: 1px solid var(--px-border-primary);\n * }\n * ```\n */\nexport function themeToCssVars(theme: ThemeTokens): CSSVarMap {\n return {\n /**\n * Colors (semantic)\n * -----------------\n * Brand + intent colors. Prefer using these instead of raw palette values.\n */\n '--px-color-primary': theme.colors.primary,\n '--px-color-secondary': theme.colors.secondary,\n '--px-color-success': theme.colors.success,\n '--px-color-warning': theme.colors.warning,\n '--px-color-error': theme.colors.error,\n '--px-color-invalid': theme.colors.invalid,\n '--px-color-info': theme.colors.info,\n\n /**\n * Surfaces\n * --------\n * Neutral surfaces for layouts and elevated containers.\n */\n '--px-bg': theme.colors.background.primary,\n '--px-surface': theme.colors.surface,\n '--px-background-card-primary': theme.colors.background.card.primary,\n\n /**\n * Borders\n * -------\n * Divider and outline colors.\n */\n '--px-border-primary': theme.colors.border.primary,\n '--px-border-secondary': theme.colors.border.secondary,\n\n /**\n * Text\n * ----\n * Text colors for different emphasis levels.\n */\n '--px-text-primary': theme.colors.text.primary,\n '--px-text-secondary': theme.colors.text.secondary,\n '--px-text-disabled': theme.colors.text.disabled,\n '--px-text-inverse': theme.colors.text.inverse,\n\n /**\n * Spacing scale\n * -------------\n * Numeric spacing tokens (commonly used as px in the component factories).\n */\n '--px-space-xs': theme.spacing.xs,\n '--px-space-sm': theme.spacing.sm,\n '--px-space-md': theme.spacing.md,\n '--px-space-lg': theme.spacing.lg,\n '--px-space-xl': theme.spacing.xl,\n '--px-space-2xl': theme.spacing['2xl'],\n\n /**\n * Border radius scale\n * -------------------\n * Numeric radius tokens (commonly used as px).\n */\n '--px-radius-none': theme.borderRadius.none,\n '--px-radius-sm': theme.borderRadius.sm,\n '--px-radius-md': theme.borderRadius.md,\n '--px-radius-lg': theme.borderRadius.lg,\n '--px-radius-full': theme.borderRadius.full,\n\n /**\n * Typography scale\n * ----------------\n * Font sizes and font weights.\n */\n '--px-fs-xs': theme.fontSize.xs,\n '--px-fs-sm': theme.fontSize.sm,\n '--px-fs-md': theme.fontSize.md,\n '--px-fs-lg': theme.fontSize.lg,\n '--px-fs-xl': theme.fontSize.xl,\n '--px-fs-2xl': theme.fontSize['2xl'],\n\n '--px-fw-normal': theme.fontWeight.normal,\n '--px-fw-medium': theme.fontWeight.medium,\n '--px-fw-semibold': theme.fontWeight.semibold,\n '--px-fw-bold': theme.fontWeight.bold,\n\n /**\n * Shadows\n * -------\n * CSS shadow strings for elevation.\n */\n '--px-shadow-sm': theme.shadows.sm,\n '--px-shadow-md': theme.shadows.md,\n '--px-shadow-lg': theme.shadows.lg,\n '--px-shadow-xl': theme.shadows.xl\n }\n}\n","/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\n\n// External Libraries\nimport { useMemo, useState, useEffect, useContext, createContext } from 'react'\n\n// Utils\nimport {\n buildTheme,\n isThemeMode,\n resolveName,\n applyCssVars,\n buildRegistry,\n themeToCssVars,\n applyThemeClass,\n watchSystemTheme,\n getLocalStorageSafe\n} from './utils'\n\n// Types\nimport type { ThemeMode, ThemeContextData, ThemeProviderProps } from './types'\n\nexport * from './types'\n\n/**\n * Theme Context\n * -------------\n * Internal context used by `ThemeProvider` and consumed by `useTheme()`.\n *\n * The value is always non-null inside a `<ThemeProvider />`.\n */\nconst ThemeContext = createContext<ThemeContextData | null>(null)\n\n/**\n * ThemeProvider\n * -------------\n * Provides theme state + resolved theme tokens to your app.\n */\nexport const ThemeProvider: React.FC<ThemeProviderProps> = ({\n themes,\n children,\n override,\n persistence,\n persist = false,\n defaultMode = 'system',\n storageKey = 'px-theme'\n}) => {\n /**\n * Registry of user patches (stable unless `themes` changes).\n */\n const registry = useMemo(() => buildRegistry(themes), [themes])\n\n // States\n /**\n * Selected mode (with optional persistence).\n *\n * Priority:\n * 1) `persistence` adapter (advanced)\n * 2) `persist === true` + localStorage (quick)\n * 3) `defaultMode`\n */\n const [mode, setMode] = useState<ThemeMode>(makeInitialMode)\n\n /**\n * Loading flag (mainly useful if consumers want to wait for first mount).\n */\n const [isLoading, setLoading] = useState(true)\n\n // UseEffects\n useEffect(() => {\n setLoading(false)\n }, [])\n\n /**\n * Keep in sync with OS when mode === \"system\".\n */\n useEffect(() => {\n if (typeof window === 'undefined') return\n if (mode !== 'system') return\n\n return watchSystemTheme(() => {\n setMode('system')\n })\n }, [mode])\n\n /**\n * Resolved name is the actual currently applied theme name.\n * If `mode === \"system\"`, it becomes \"light\" or \"dark\".\n */\n const resolvedName = useMemo(() => {\n if (typeof window === 'undefined') return mode === 'system' ? 'light' : mode\n return resolveName(mode)\n }, [mode])\n\n /**\n * Build final resolved theme tokens (always complete).\n */\n const theme = useMemo(\n () => buildTheme(registry, resolvedName, override),\n [registry, resolvedName, override]\n )\n\n /**\n * Apply theme effects:\n * - toggles `.dark` class on <html> (Tailwind)\n * - injects --px-* variables on <html>\n */\n useEffect(() => {\n if (typeof window === 'undefined') return\n applyThemeClass(resolvedName === 'dark' ? 'dark' : 'light')\n applyCssVars(themeToCssVars(theme))\n }, [resolvedName, theme])\n\n /**\n * Persist mode changes (optional).\n *\n * We persist the selected `mode` (including \"system\"), not the resolvedName.\n *\n * Priority:\n * - If `persistence` exists, use it.\n * - Else if `persist === true`, use localStorage.\n */\n useEffect(() => {\n // advanced adapter\n if (persistence) {\n try {\n persistence.set(mode)\n } catch {\n // ignore\n }\n return\n }\n\n // quick localStorage mode\n if (!persist) return\n const ls = getLocalStorageSafe()\n if (!ls) return\n\n try {\n ls.setItem(storageKey, mode)\n } catch {\n // ignore\n }\n }, [mode, persist, storageKey, persistence])\n\n // Functions\n function makeInitialMode() {\n // 1) advanced adapter\n if (persistence) {\n try {\n const saved = persistence.get()\n return (saved ?? defaultMode) as ThemeMode\n } catch {\n return defaultMode\n }\n }\n\n // 2) quick localStorage mode\n // if (persist) {\n const ls = getLocalStorageSafe()\n if (!ls) return defaultMode\n const raw = ls.getItem(storageKey)\n return isThemeMode(raw) ? raw : defaultMode\n // }\n\n // 3) fallback\n // return defaultMode\n }\n\n /**\n * Sets the selected theme mode.\n */\n function setTheme(next: ThemeMode) {\n setMode(next)\n }\n\n /**\n * Toggles between two theme names (defaults to \"light\" and \"dark\").\n */\n function toggleTheme(a: string = 'light', b: string = 'dark') {\n setMode(resolvedName === a ? b : a)\n }\n\n return (\n <ThemeContext.Provider\n value={{ mode, resolvedName, theme, isLoading, setTheme, toggleTheme }}\n >\n {children}\n </ThemeContext.Provider>\n )\n}\n\n/**\n * useTheme()\n *\n * Returns the current theme context.\n *\n * @throws If called outside of `<ThemeProvider />`.\n */\nexport function useTheme(): ThemeContextData {\n const ctx = useContext(ThemeContext)\n if (!ctx) throw new Error('useTheme must be used within a ThemeProvider')\n return ctx\n}\n"],"mappings":";;;;AASA,SAAgB,UAAa,MAAS,UAA8B;AAClE,KAAI,aAAa,OAAW,QAAO,MAAM,KAAK;AAE9C,KAAI,CAAC,cAAc,KAAK,IAAI,CAAC,cAAc,SAAS,CAClD,QAAO,MAAM,SAAc;CAG7B,MAAMA,SAAc,MAAM,QAAQ,KAAK,GAAG,EAAE,GAAG,EAAE;CAEjD,MAAM,WAAW,OAAO,KAAK,KAAY;CACzC,MAAM,eAAe,OAAO,KAAK,SAAgB;CAEjD,MAAM,UAAU,MAAM,KAAK,IAAI,IAAI,CAAC,GAAG,UAAU,GAAG,aAAa,CAAC,CAAC;AAEnE,MAAK,MAAM,KAAK,SAAS;EACvB,MAAM,UAAW,KAAa;EAC9B,MAAM,cAAe,SAAiB;AAEtC,MAAI,gBAAgB,QAAW;AAC7B,UAAO,KAAK,MAAM,QAAQ;AAC1B;;AAGF,MAAI,cAAc,QAAQ,IAAI,cAAc,YAAY,EAAE;AACxD,UAAO,KAAK,UAAU,SAAS,YAAY;AAC3C;;AAGF,SAAO,KAAK,MAAM,YAAY;;AAGhC,QAAO;;AAGT,SAAS,cAAc,GAAkC;AACvD,QAAO,CAAC,CAAC,KAAK,OAAO,MAAM,YAAY,CAAC,MAAM,QAAQ,EAAE;;AAG1D,SAAS,MAAS,GAAS;AACzB,KAAI,MAAM,UAAa,MAAM,KAAM,QAAO;AAC1C,KAAI,MAAM,QAAQ,EAAE,CAAE,QAAO,EAAE,KAAI,SAAQ,MAAM,KAAK,CAAC;AACvD,KAAI,cAAc,EAAE,EAAE;EACpB,MAAMC,MAAW,EAAE;AACnB,OAAK,MAAM,KAAK,OAAO,KAAK,EAAE,CAAE,KAAI,KAAK,MAAO,EAAU,GAAG;AAC7D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MAAI,aAAa;AACf,OAAI;AACF,gBAAY,IAAI,KAAK;WACf;AAGR;;AAIF,MAAI,CAAC,QAAS;EACd,MAAM,KAAK,qBAAqB;AAChC,MAAI,CAAC,GAAI;AAET,MAAI;AACF,MAAG,QAAQ,YAAY,KAAK;UACtB;IAGP;EAAC;EAAM;EAAS;EAAY;EAAY,CAAC;CAG5C,SAAS,kBAAkB;AAEzB,MAAI,YACF,KAAI;AAEF,UADc,YAAY,KAAK,IACd;UACX;AACN,UAAO;;EAMX,MAAM,KAAK,qBAAqB;AAChC,MAAI,CAAC,GAAI,QAAO;EAChB,MAAM,MAAM,GAAG,QAAQ,WAAW;AAClC,SAAO,YAAY,IAAI,GAAG,MAAM;;;;;CAUlC,SAAS,SAAS,MAAiB;AACjC,UAAQ,KAAK;;;;;CAMf,SAAS,YAAY,IAAY,SAAS,IAAY,QAAQ;AAC5D,UAAQ,iBAAiB,IAAI,IAAI,EAAE;;AAGrC,QACE,oBAAC,aAAa;EACZ,OAAO;GAAE;GAAM;GAAc;GAAO;GAAW;GAAU;GAAa;EAErE;GACqB;;;;;;;;;AAW5B,SAAgB,WAA6B;CAC3C,MAAM,MAAM,WAAW,aAAa;AACpC,KAAI,CAAC,IAAK,OAAM,IAAI,MAAM,+CAA+C;AACzE,QAAO"}
@@ -459,7 +459,7 @@ const alignText = {
459
459
  //#endregion
460
460
  //#region src/components/toolkit/Typography/style.ts
461
461
  function createTypographyStyles(props) {
462
- const { isLoading, variant, align = "left" } = props;
462
+ const { isLoading, variant, align = "left", color } = props;
463
463
  return {
464
464
  base: {
465
465
  display: "flex",
@@ -478,7 +478,8 @@ function createTypographyStyles(props) {
478
478
  },
479
479
  text: {
480
480
  ...alignText[align],
481
- ...typographyVariants[variant]
481
+ ...typographyVariants[variant],
482
+ color: color ?? typographyVariants[variant].color
482
483
  }
483
484
  };
484
485
  }
@@ -525,4 +526,4 @@ function Typography(props) {
525
526
 
526
527
  //#endregion
527
528
  export { useThemedStyles as n, Typography as t };
528
- //# sourceMappingURL=Typography-Dn1vnPBy.js.map
529
+ //# sourceMappingURL=Typography-B9X7_xlT.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Typography-Dn1vnPBy.js","names":["parts: string[]","COMMON_MAP: Record<\n keyof CommonStyleProps,\n (value: any, out: React.CSSProperties) => void\n>","out: React.CSSProperties","inline: any","rulesBySlot: any","out: any","typographyVariants: Record<TypographyVariant, CSSProperties>","variantToElement: Record<\n TypographyVariant,\n keyof JSX.IntrinsicElements\n>","alignText: Record<TextAlign, CSSProperties>"],"sources":["../src/hooks/useThemedStyles/utils/hasString.ts","../src/hooks/useThemedStyles/utils/stableStringfy.ts","../src/hooks/useThemedStyles/utils/injectSlotsRule.ts","../src/hooks/useThemedStyles/utils/mergeStyleMaps.ts","../src/hooks/useThemedStyles/utils/resolveCommonStyleProps.ts","../src/hooks/useThemedStyles/utils/splitRules.ts","../src/hooks/useThemedStyles/utils/stripCommonProps.ts","../src/hooks/useThemedStyles/index.ts","../src/components/toolkit/Typography/config.ts","../src/components/toolkit/Typography/style.ts","../src/components/toolkit/Typography/index.tsx"],"sourcesContent":["/**\n * Small deterministic hash for strings (djb2 variant).\n * Used to generate stable class ids and cache keys.\n */\nexport function hashStr(str: string) {\n let h = 5381\n for (let i = 0; i < str.length; i++) h = (h * 33) ^ str.charCodeAt(i)\n return (h >>> 0).toString(36)\n}\n","/**\n * Stable stringify (order-independent) for hashing.\n * Sorts object keys to keep output deterministic.\n */\nexport function stableStringify(obj: any): string {\n if (obj == null || typeof obj !== 'object') return String(obj)\n if (Array.isArray(obj)) return `[${obj.map(stableStringify).join(',')}]`\n const keys = Object.keys(obj).sort()\n return `{${keys.map(k => `${k}:${stableStringify(obj[k])}`).join(',')}}`\n}\n","/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\n\n// Utils\nimport { hashStr } from './hasString'\nimport { stableStringify } from './stableStringfy'\n\n// Types\nimport type { RuleMap } from '../types'\n\n/**\n * Single <style> tag used for all runtime rules.\n */\nconst STYLE_ID = '__px_runtime_rules__'\n\n/**\n * Prevents injecting identical rules multiple times.\n */\nconst CACHE = new Set<string>()\n\n/**\n * Ensures the runtime <style> element exists and returns it.\n */\nfunction ensureStyleEl(): HTMLStyleElement | null {\n if (typeof document === 'undefined') return null\n let el = document.getElementById(STYLE_ID) as HTMLStyleElement | null\n if (!el) {\n el = document.createElement('style')\n el.id = STYLE_ID\n document.head.appendChild(el)\n }\n return el\n}\n\n/**\n * CSS properties that should NOT automatically receive \"px\" when given a number.\n *\n * Example:\n * - opacity: 0.5 (NOT 0.5px)\n * - zIndex: 10 (NOT 10px)\n * - lineHeight: 1.2 (NOT 1.2px)\n */\nconst UNITLESS = new Set([\n 'opacity',\n 'zIndex',\n 'fontWeight',\n 'flex',\n 'flexGrow',\n 'flexShrink',\n 'order',\n 'lineHeight'\n])\n\n/**\n * Converts camelCase CSS property names to kebab-case.\n * Keeps CSS variables intact (e.g. \"--px-bg\").\n */\nfunction toKebab(prop: string) {\n if (prop.startsWith('--')) return prop\n return prop.replace(/[A-Z]/g, m => `-${m.toLowerCase()}`)\n}\n\n/**\n * Converts a JS value to a CSS value.\n *\n * - `number` => `\"${n}px\"` for most properties\n * - `number` => `\"${n}\"` for unitless properties\n * - `string` => string as-is\n */\nfunction toCssValue(prop: string, value: any) {\n if (value == null) return null\n if (typeof value === 'number' && !UNITLESS.has(prop)) return `${value}px`\n return String(value)\n}\n\n/**\n * Converts a declaration object to CSS string.\n *\n * Example:\n * `{ backgroundColor: \"red\", padding: 8 }`\n * => `\"background-color:red;padding:8px;\"`\n */\nfunction declToCss(decl: Record<string, any>) {\n const parts: string[] = []\n for (const [k, v] of Object.entries(decl)) {\n const cssValue = toCssValue(k, v)\n if (cssValue == null) continue\n parts.push(`${toKebab(k)}:${cssValue};`)\n }\n return parts.join('')\n}\n\n/**\n * Scopes a selector to a generated slot class.\n *\n * Rules:\n * - selectors containing \"&\" are replaced: \"&:hover\" => \".slot:hover\"\n * - selectors starting with \":\" become pseudo: \":hover\" => \".slot:hover\"\n * - otherwise it's treated as descendant: \"p\" => \".slot p\"\n */\nfunction scopeSelector(selector: string, baseClass: string) {\n const base = `.${baseClass}`\n\n if (selector.includes('&')) return selector.replaceAll('&', base)\n if (selector.startsWith(':')) return `${base}${selector}`\n return `${base} ${selector}`\n}\n\n/**\n * Injects CSS rules for one slot class into the runtime <style> tag.\n *\n * The injected CSS is cached using a hash of (slotClass + rules).\n */\nexport function injectSlotRules(slotClass: string, rules?: RuleMap) {\n if (!rules || Object.keys(rules).length === 0) return\n if (typeof document === 'undefined') return\n\n const signature = `${slotClass}:${stableStringify(rules)}`\n const key = hashStr(signature)\n if (CACHE.has(key)) return\n\n const css = Object.entries(rules)\n .map(\n ([sel, decl]) => `${scopeSelector(sel, slotClass)}{${declToCss(decl)}}`\n )\n .join('\\n')\n\n const el = ensureStyleEl()\n if (!el) return\n\n el.appendChild(document.createTextNode(`\\n${css}\\n`))\n CACHE.add(key)\n}\n","/**\n * Shallow-merge style maps slot-by-slot.\n * Warns when override contains unknown slots (developer UX).\n */\n/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\nexport function mergeStyleMaps<T extends Record<string, any>>(\n base: T,\n override?: Partial<T>\n): T {\n if (!override) return base\n const out = { ...base } as T\n\n for (const key in override) {\n if (!(key in base)) {\n console.warn(\n `[useThemedStyles] Unknown style slot \"${key}\". Available slots: ${Object.keys(base).join(', ')}`\n )\n }\n\n out[key] = { ...(base[key] ?? {}), ...(override[key] ?? {}) } as any\n }\n\n return out\n}\n","/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\n\n// Types\nimport type { CommonStyleProps } from '../types'\n\nfunction toCss(v: number | string | undefined) {\n return typeof v === 'number' ? `${v}rem` : v\n}\n\n/**\n * Source of truth: common prop -> how it maps into CSSProperties.\n * Add new common props ONLY here.\n */\nconst COMMON_MAP: Record<\n keyof CommonStyleProps,\n (value: any, out: React.CSSProperties) => void\n> = {\n // margin\n m: (v, o) => {\n o.margin = toCss(v)\n },\n mx: (v, o) => {\n o.marginLeft = toCss(v)\n o.marginRight = toCss(v)\n },\n my: (v, o) => {\n o.marginTop = toCss(v)\n o.marginBottom = toCss(v)\n },\n mt: (v, o) => {\n o.marginTop = toCss(v)\n },\n mr: (v, o) => {\n o.marginRight = toCss(v)\n },\n mb: (v, o) => {\n o.marginBottom = toCss(v)\n },\n ml: (v, o) => {\n o.marginLeft = toCss(v)\n },\n\n // padding\n p: (v, o) => {\n o.padding = toCss(v)\n },\n px: (v, o) => {\n o.paddingLeft = toCss(v)\n o.paddingRight = toCss(v)\n },\n py: (v, o) => {\n o.paddingTop = toCss(v)\n o.paddingBottom = toCss(v)\n },\n pt: (v, o) => {\n o.paddingTop = toCss(v)\n },\n pr: (v, o) => {\n o.paddingRight = toCss(v)\n },\n pb: (v, o) => {\n o.paddingBottom = toCss(v)\n },\n pl: (v, o) => {\n o.paddingLeft = toCss(v)\n },\n\n // text\n fontSize: (v, o) => {\n o.fontSize = toCss(v)\n },\n fontWeight: (v, o) => {\n o.fontWeight = v\n },\n lineHeight: (v, o) => {\n o.lineHeight = toCss(v)\n },\n textAlign: (v, o) => {\n o.textAlign = v\n },\n\n // layout\n w: (v, o) => {\n o.width = toCss(v)\n },\n h: (v, o) => {\n o.height = toCss(v)\n },\n minW: (v, o) => {\n o.minWidth = toCss(v)\n },\n maxW: (v, o) => {\n o.maxWidth = toCss(v)\n },\n minH: (v, o) => {\n o.minHeight = toCss(v)\n },\n maxH: (v, o) => {\n o.maxHeight = toCss(v)\n }\n}\n\nexport const COMMON_KEYS = Object.keys(COMMON_MAP) as Array<\n keyof CommonStyleProps\n>\n\nexport function hasAnyCommonStyleProps(props: Partial<CommonStyleProps>) {\n for (const k of COMMON_KEYS) {\n if (props[k] != null) return true\n }\n return false\n}\n\nexport function resolveCommonStyleProps(\n props: Partial<CommonStyleProps>\n): React.CSSProperties {\n const out: React.CSSProperties = {}\n\n for (const k of COMMON_KEYS) {\n const value = props[k]\n if (value != null) COMMON_MAP[k](value, out)\n }\n\n return out\n}\n\n/**\n * Applies common style props (if present) to a chosen slot.\n * Common props are resolved by `resolveCommonStyleProps`.\n */\nexport function applyCommonsToStyles<TStyles extends Record<string, any>>(\n styles: TStyles,\n props: Partial<CommonStyleProps>,\n slotOverride?: keyof TStyles\n): TStyles {\n if (!hasAnyCommonStyleProps(props)) return styles\n\n const keys = Object.keys(styles)\n if (keys.length === 0) return styles\n\n const slot =\n slotOverride ??\n (('container' in styles ? 'container' : keys[0]) as keyof TStyles)\n\n const common = resolveCommonStyleProps(props)\n\n return {\n ...styles,\n [slot]: { ...(styles[slot] ?? {}), ...common }\n } as TStyles\n}\n","// Types\n/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\nimport type { SplitResult, StyleMap } from '../types'\n\n/**\n * Splits the style map into:\n * - `inline`: slot styles without `__rules`\n * - `rulesBySlot`: extracted `__rules` grouped by slot\n *\n * This lets us:\n * - apply inline styles directly via `style={...}`\n * - inject selectors/pseudos via generated CSS classes\n */\nexport function splitRules<TStyles extends StyleMap>(\n styles: TStyles\n): SplitResult<TStyles> {\n const inline: any = {}\n const rulesBySlot: any = {}\n\n for (const key in styles) {\n const slot = styles[key]\n if (!slot) continue\n\n const { __rules, ...rest } = slot as any\n inline[key] = rest\n\n if (__rules && Object.keys(__rules).length > 0) {\n rulesBySlot[key] = __rules\n }\n }\n\n return { inline, rulesBySlot }\n}\n","/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\n\nimport type { CommonStyleProps } from '../types'\n\nimport { COMMON_KEYS } from './resolveCommonStyleProps'\n\nconst COMMON_KEY_SET = new Set<string>(COMMON_KEYS as readonly string[])\n\nexport function stripCommonProps<T extends object>(\n props: T\n): Omit<T, keyof CommonStyleProps> {\n const out: Record<string, unknown> = {}\n\n for (const key of Object.keys(props as any)) {\n if (!COMMON_KEY_SET.has(key)) {\n out[key] = (props as any)[key]\n }\n }\n\n return out as Omit<T, keyof CommonStyleProps>\n}\n","/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\n\n// External Libraries\nimport { useMemo, useInsertionEffect } from 'react'\n\n// Utils\nimport {\n hashStr,\n splitRules,\n mergeStyleMaps,\n injectSlotRules,\n stableStringify,\n applyCommonsToStyles\n} from './utils'\n\n// Types\nimport type {\n CSSVars,\n RuleMap,\n StyleMap,\n StylesFactory,\n UseThemedStylesOptions\n} from './types'\n\n/**\n * useThemedStyles\n *\n * A React-Native-like style factory hook for React Web that also supports:\n * - CSS variables in inline styles\n * - Pseudo selectors, nested selectors, and vendor selectors via `__rules`\n *\n * It returns two maps:\n * - `styles`: inline styles for each slot\n * - `classes`: generated classes for each slot (needed for `__rules`)\n *\n * Usage:\n * ```tsx\n * const { styles, classes } = useThemedStyles(props, createStyles)\n *\n * return (\n * <button style={styles.item} className={classes.item}>\n * <p style={styles.label} className={classes.label}>Hello</p>\n * </button>\n * )\n * ```\n *\n * Notes:\n * - If a slot has no `__rules`, you can omit `className` for that slot.\n * - If you use `__rules`, you MUST apply the corresponding class for scoping.\n */\nexport function useThemedStyles<TProps, TStyles extends StyleMap>(\n props: TProps,\n factory: StylesFactory<TProps, TStyles>,\n options?: UseThemedStylesOptions<TProps, TStyles>\n): {\n styles: Record<keyof TStyles, React.CSSProperties | CSSVars>\n classes: Record<keyof TStyles, string>\n} {\n /**\n * Memoization priority:\n * 1) deps (manual)\n * 2) pick(props) (recommended)\n * 3) props reference (default behavior)\n */\n const memoKey =\n options?.deps ?? (options?.pick ? options.pick(props) : [props])\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: controlled by deps/pick\n const raw = useMemo(() => factory(props), [factory, ...memoKey])\n\n const { inline, rulesBySlot } = useMemo(() => splitRules(raw), [raw])\n\n const merged = useMemo(\n () => mergeStyleMaps(inline as any, options?.override),\n [inline, options?.override]\n )\n\n const withCommons = useMemo(() => {\n if (!options?.applyCommonProps) return merged\n return applyCommonsToStyles(merged as any, props as any, options.commonSlot)\n }, [merged, props, options?.applyCommonProps, options?.commonSlot])\n\n /**\n * Base id is derived only from the rules signature.\n * This keeps class names stable whenever rules don't change.\n */\n const baseId = useMemo(() => {\n const sig = stableStringify(rulesBySlot)\n const key = hashStr(sig)\n return options?.debugName ? `pxr-${options.debugName}-${key}` : `pxr-${key}`\n }, [rulesBySlot, options?.debugName])\n\n /**\n * Generated class per slot.\n * Example: pxr-<hash>__item\n */\n const classes = useMemo(() => {\n const out: any = {}\n for (const slotKey of Object.keys(withCommons)) {\n out[slotKey] = `${baseId}__${slotKey}`\n }\n return out as Record<keyof TStyles, string>\n }, [baseId, withCommons])\n\n /**\n * Inject rules into the runtime <style> tag.\n *\n * We use `useInsertionEffect` so styles are inserted before layout/paint\n * when supported (best for CSS-in-JS style injection).\n */\n useInsertionEffect(() => {\n for (const slotKey of Object.keys(rulesBySlot as any)) {\n const rules = (rulesBySlot as any)[slotKey] as RuleMap | undefined\n if (!rules) continue\n injectSlotRules((classes as any)[slotKey], rules)\n }\n }, [rulesBySlot, classes])\n\n return { styles: withCommons as any, classes }\n}\n","// External Libraries\nimport type { CSSProperties, JSX } from 'react'\n\n// Types\nimport type { TextAlign, TypographyVariant } from './types'\n\nconst primaryColor = 'var(--px-text-primary)'\nconst secondaryColor = 'var(--px-text-secondary)'\n\nexport const typographyVariants: Record<TypographyVariant, CSSProperties> = {\n h1: {\n fontSize: '3rem',\n fontWeight: '700',\n lineHeight: '1.25',\n color: primaryColor\n },\n h2: {\n fontSize: '2.25rem',\n fontWeight: '600',\n lineHeight: '1.35',\n color: primaryColor\n },\n h3: {\n fontSize: '1.875rem',\n fontWeight: '600',\n color: primaryColor\n },\n h4: {\n fontSize: '1.5rem',\n fontWeight: '500',\n color: primaryColor\n },\n h5: {\n fontSize: '1.25rem',\n fontWeight: '500',\n color: primaryColor\n },\n b1: {\n fontSize: '1rem',\n fontWeight: '500',\n color: primaryColor\n },\n b2: {\n fontSize: '0.875rem',\n color: secondaryColor\n },\n b3: {\n fontSize: '0.75rem',\n color: secondaryColor\n },\n caption: {\n fontSize: '0.75rem',\n color: secondaryColor\n },\n legal: {\n fontSize: '0.65rem',\n textTransform: 'uppercase',\n letterSpacing: '0.025em',\n color: secondaryColor\n }\n}\n\nexport const variantToElement: Record<\n TypographyVariant,\n keyof JSX.IntrinsicElements\n> = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n b1: 'p',\n b2: 'p',\n b3: 'p',\n caption: 'span',\n legal: 'span'\n}\n\nexport const alignText: Record<TextAlign, CSSProperties> = {\n left: { textAlign: 'left' },\n center: { textAlign: 'center' },\n right: { textAlign: 'right' },\n justify: { textAlign: 'justify' }\n}\n","// Utils\nimport { alignText, typographyVariants } from './config'\n\n// Types\nimport type { TypographyProps } from './types'\nimport type { StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createTypographyStyles(props: TypographyProps): StyleMap {\n const { isLoading, variant, align = 'left' } = props\n\n return {\n base: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n borderBottom: '1px solid var(--pixel-border, #e5e7eb)',\n gap: 0,\n animation: isLoading ? 'animate-pulse 1.5s infinite' : undefined\n },\n\n loading: {\n width: '50%',\n height: '1em',\n display: 'inline-block',\n backgroundColor: 'var(--pixel-gray-300, #d1d5db)',\n borderRadius: '0.25rem'\n },\n\n text: {\n ...alignText[align],\n ...typographyVariants[variant]\n }\n }\n}\n","// Utils\nimport { variantToElement } from './config'\n\n// Types\nimport type { TypographyProps } from './types'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Styles\nimport { createTypographyStyles } from './style'\n\nexport function Typography(props: TypographyProps) {\n const {\n id,\n as,\n href,\n variant,\n children,\n placeholder,\n isLoading = false,\n styles: styleTypography\n } = props\n\n const { styles } = useThemedStyles(props, createTypographyStyles, {\n pick: p => [p.isLoading, p.variant, p.align],\n commonSlot: 'text',\n applyCommonProps: true,\n override: styleTypography\n })\n\n const Component = as ?? variantToElement[variant]\n\n if (isLoading) {\n return (\n <span\n id={id}\n aria-hidden=\"true\"\n role=\"presentation\"\n style={{ ...styles.text, ...styles.loading }}\n />\n )\n }\n\n const sharedProps = {\n id,\n style: styles.text,\n 'aria-label': placeholder\n }\n\n if (href) {\n return (\n <a href={href} {...sharedProps}>\n {children}\n </a>\n )\n }\n\n return <Component {...sharedProps}>{children}</Component>\n}\n"],"mappings":";;;;;;;;AAIA,SAAgB,QAAQ,KAAa;CACnC,IAAI,IAAI;AACR,MAAK,IAAI,IAAI,GAAG,IAAI,IAAI,QAAQ,IAAK,KAAK,IAAI,KAAM,IAAI,WAAW,EAAE;AACrE,SAAQ,MAAM,GAAG,SAAS,GAAG;;;;;;;;;ACH/B,SAAgB,gBAAgB,KAAkB;AAChD,KAAI,OAAO,QAAQ,OAAO,QAAQ,SAAU,QAAO,OAAO,IAAI;AAC9D,KAAI,MAAM,QAAQ,IAAI,CAAE,QAAO,IAAI,IAAI,IAAI,gBAAgB,CAAC,KAAK,IAAI,CAAC;AAEtE,QAAO,IADM,OAAO,KAAK,IAAI,CAAC,MAAM,CACpB,KAAI,MAAK,GAAG,EAAE,GAAG,gBAAgB,IAAI,GAAG,GAAG,CAAC,KAAK,IAAI,CAAC;;;;;;;;;ACIxE,MAAM,WAAW;;;;AAKjB,MAAM,wBAAQ,IAAI,KAAa;;;;AAK/B,SAAS,gBAAyC;AAChD,KAAI,OAAO,aAAa,YAAa,QAAO;CAC5C,IAAI,KAAK,SAAS,eAAe,SAAS;AAC1C,KAAI,CAAC,IAAI;AACP,OAAK,SAAS,cAAc,QAAQ;AACpC,KAAG,KAAK;AACR,WAAS,KAAK,YAAY,GAAG;;AAE/B,QAAO;;;;;;;;;;AAWT,MAAM,WAAW,IAAI,IAAI;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;;;;AAMF,SAAS,QAAQ,MAAc;AAC7B,KAAI,KAAK,WAAW,KAAK,CAAE,QAAO;AAClC,QAAO,KAAK,QAAQ,WAAU,MAAK,IAA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AW,SAAS,QAAQ,WAAW;AAE/C,QAAO;EACL,MAAM;GACJ,SAAS;GACT,eAAe;GACf,YAAY;GACZ,cAAc;GACd,KAAK;GACL,WAAW,YAAY,gCAAgC;GACxD;EAED,SAAS;GACP,OAAO;GACP,QAAQ;GACR,SAAS;GACT,iBAAiB;GACjB,cAAc;GACf;EAED,MAAM;GACJ,GAAG,UAAU;GACb,GAAG,mBAAmB;GACvB;EACF;;;;;ACpBH,SAAgB,WAAW,OAAwB;CACjD,MAAM,EACJ,IACA,IACA,MACA,SACA,UACA,aACA,YAAY,OACZ,QAAQ,oBACN;CAEJ,MAAM,EAAE,WAAW,gBAAgB,OAAO,wBAAwB;EAChE,OAAM,MAAK;GAAC,EAAE;GAAW,EAAE;GAAS,EAAE;GAAM;EAC5C,YAAY;EACZ,kBAAkB;EAClB,UAAU;EACX,CAAC;CAEF,MAAM,YAAY,MAAM,iBAAiB;AAEzC,KAAI,UACF,QACE,oBAAC;EACK;EACJ,eAAY;EACZ,MAAK;EACL,OAAO;GAAE,GAAG,OAAO;GAAM,GAAG,OAAO;GAAS;GAC5C;CAIN,MAAM,cAAc;EAClB;EACA,OAAO,OAAO;EACd,cAAc;EACf;AAED,KAAI,KACF,QACE,oBAAC;EAAQ;EAAM,GAAI;EAChB;GACC;AAIR,QAAO,oBAAC;EAAU,GAAI;EAAc;GAAqB"}
1
+ {"version":3,"file":"Typography-B9X7_xlT.js","names":["parts: string[]","COMMON_MAP: Record<\n keyof CommonStyleProps,\n (value: any, out: React.CSSProperties) => void\n>","out: React.CSSProperties","inline: any","rulesBySlot: any","out: any","typographyVariants: Record<TypographyVariant, CSSProperties>","variantToElement: Record<\n TypographyVariant,\n keyof JSX.IntrinsicElements\n>","alignText: Record<TextAlign, CSSProperties>"],"sources":["../src/hooks/useThemedStyles/utils/hasString.ts","../src/hooks/useThemedStyles/utils/stableStringfy.ts","../src/hooks/useThemedStyles/utils/injectSlotsRule.ts","../src/hooks/useThemedStyles/utils/mergeStyleMaps.ts","../src/hooks/useThemedStyles/utils/resolveCommonStyleProps.ts","../src/hooks/useThemedStyles/utils/splitRules.ts","../src/hooks/useThemedStyles/utils/stripCommonProps.ts","../src/hooks/useThemedStyles/index.ts","../src/components/toolkit/Typography/config.ts","../src/components/toolkit/Typography/style.ts","../src/components/toolkit/Typography/index.tsx"],"sourcesContent":["/**\n * Small deterministic hash for strings (djb2 variant).\n * Used to generate stable class ids and cache keys.\n */\nexport function hashStr(str: string) {\n let h = 5381\n for (let i = 0; i < str.length; i++) h = (h * 33) ^ str.charCodeAt(i)\n return (h >>> 0).toString(36)\n}\n","/**\n * Stable stringify (order-independent) for hashing.\n * Sorts object keys to keep output deterministic.\n */\nexport function stableStringify(obj: any): string {\n if (obj == null || typeof obj !== 'object') return String(obj)\n if (Array.isArray(obj)) return `[${obj.map(stableStringify).join(',')}]`\n const keys = Object.keys(obj).sort()\n return `{${keys.map(k => `${k}:${stableStringify(obj[k])}`).join(',')}}`\n}\n","/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\n\n// Utils\nimport { hashStr } from './hasString'\nimport { stableStringify } from './stableStringfy'\n\n// Types\nimport type { RuleMap } from '../types'\n\n/**\n * Single <style> tag used for all runtime rules.\n */\nconst STYLE_ID = '__px_runtime_rules__'\n\n/**\n * Prevents injecting identical rules multiple times.\n */\nconst CACHE = new Set<string>()\n\n/**\n * Ensures the runtime <style> element exists and returns it.\n */\nfunction ensureStyleEl(): HTMLStyleElement | null {\n if (typeof document === 'undefined') return null\n let el = document.getElementById(STYLE_ID) as HTMLStyleElement | null\n if (!el) {\n el = document.createElement('style')\n el.id = STYLE_ID\n document.head.appendChild(el)\n }\n return el\n}\n\n/**\n * CSS properties that should NOT automatically receive \"px\" when given a number.\n *\n * Example:\n * - opacity: 0.5 (NOT 0.5px)\n * - zIndex: 10 (NOT 10px)\n * - lineHeight: 1.2 (NOT 1.2px)\n */\nconst UNITLESS = new Set([\n 'opacity',\n 'zIndex',\n 'fontWeight',\n 'flex',\n 'flexGrow',\n 'flexShrink',\n 'order',\n 'lineHeight'\n])\n\n/**\n * Converts camelCase CSS property names to kebab-case.\n * Keeps CSS variables intact (e.g. \"--px-bg\").\n */\nfunction toKebab(prop: string) {\n if (prop.startsWith('--')) return prop\n return prop.replace(/[A-Z]/g, m => `-${m.toLowerCase()}`)\n}\n\n/**\n * Converts a JS value to a CSS value.\n *\n * - `number` => `\"${n}px\"` for most properties\n * - `number` => `\"${n}\"` for unitless properties\n * - `string` => string as-is\n */\nfunction toCssValue(prop: string, value: any) {\n if (value == null) return null\n if (typeof value === 'number' && !UNITLESS.has(prop)) return `${value}px`\n return String(value)\n}\n\n/**\n * Converts a declaration object to CSS string.\n *\n * Example:\n * `{ backgroundColor: \"red\", padding: 8 }`\n * => `\"background-color:red;padding:8px;\"`\n */\nfunction declToCss(decl: Record<string, any>) {\n const parts: string[] = []\n for (const [k, v] of Object.entries(decl)) {\n const cssValue = toCssValue(k, v)\n if (cssValue == null) continue\n parts.push(`${toKebab(k)}:${cssValue};`)\n }\n return parts.join('')\n}\n\n/**\n * Scopes a selector to a generated slot class.\n *\n * Rules:\n * - selectors containing \"&\" are replaced: \"&:hover\" => \".slot:hover\"\n * - selectors starting with \":\" become pseudo: \":hover\" => \".slot:hover\"\n * - otherwise it's treated as descendant: \"p\" => \".slot p\"\n */\nfunction scopeSelector(selector: string, baseClass: string) {\n const base = `.${baseClass}`\n\n if (selector.includes('&')) return selector.replaceAll('&', base)\n if (selector.startsWith(':')) return `${base}${selector}`\n return `${base} ${selector}`\n}\n\n/**\n * Injects CSS rules for one slot class into the runtime <style> tag.\n *\n * The injected CSS is cached using a hash of (slotClass + rules).\n */\nexport function injectSlotRules(slotClass: string, rules?: RuleMap) {\n if (!rules || Object.keys(rules).length === 0) return\n if (typeof document === 'undefined') return\n\n const signature = `${slotClass}:${stableStringify(rules)}`\n const key = hashStr(signature)\n if (CACHE.has(key)) return\n\n const css = Object.entries(rules)\n .map(\n ([sel, decl]) => `${scopeSelector(sel, slotClass)}{${declToCss(decl)}}`\n )\n .join('\\n')\n\n const el = ensureStyleEl()\n if (!el) return\n\n el.appendChild(document.createTextNode(`\\n${css}\\n`))\n CACHE.add(key)\n}\n","/**\n * Shallow-merge style maps slot-by-slot.\n * Warns when override contains unknown slots (developer UX).\n */\n/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\nexport function mergeStyleMaps<T extends Record<string, any>>(\n base: T,\n override?: Partial<T>\n): T {\n if (!override) return base\n const out = { ...base } as T\n\n for (const key in override) {\n if (!(key in base)) {\n console.warn(\n `[useThemedStyles] Unknown style slot \"${key}\". Available slots: ${Object.keys(base).join(', ')}`\n )\n }\n\n out[key] = { ...(base[key] ?? {}), ...(override[key] ?? {}) } as any\n }\n\n return out\n}\n","/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\n\n// Types\nimport type { CommonStyleProps } from '../types'\n\nfunction toCss(v: number | string | undefined) {\n return typeof v === 'number' ? `${v}rem` : v\n}\n\n/**\n * Source of truth: common prop -> how it maps into CSSProperties.\n * Add new common props ONLY here.\n */\nconst COMMON_MAP: Record<\n keyof CommonStyleProps,\n (value: any, out: React.CSSProperties) => void\n> = {\n // margin\n m: (v, o) => {\n o.margin = toCss(v)\n },\n mx: (v, o) => {\n o.marginLeft = toCss(v)\n o.marginRight = toCss(v)\n },\n my: (v, o) => {\n o.marginTop = toCss(v)\n o.marginBottom = toCss(v)\n },\n mt: (v, o) => {\n o.marginTop = toCss(v)\n },\n mr: (v, o) => {\n o.marginRight = toCss(v)\n },\n mb: (v, o) => {\n o.marginBottom = toCss(v)\n },\n ml: (v, o) => {\n o.marginLeft = toCss(v)\n },\n\n // padding\n p: (v, o) => {\n o.padding = toCss(v)\n },\n px: (v, o) => {\n o.paddingLeft = toCss(v)\n o.paddingRight = toCss(v)\n },\n py: (v, o) => {\n o.paddingTop = toCss(v)\n o.paddingBottom = toCss(v)\n },\n pt: (v, o) => {\n o.paddingTop = toCss(v)\n },\n pr: (v, o) => {\n o.paddingRight = toCss(v)\n },\n pb: (v, o) => {\n o.paddingBottom = toCss(v)\n },\n pl: (v, o) => {\n o.paddingLeft = toCss(v)\n },\n\n // text\n fontSize: (v, o) => {\n o.fontSize = toCss(v)\n },\n fontWeight: (v, o) => {\n o.fontWeight = v\n },\n lineHeight: (v, o) => {\n o.lineHeight = toCss(v)\n },\n textAlign: (v, o) => {\n o.textAlign = v\n },\n\n // layout\n w: (v, o) => {\n o.width = toCss(v)\n },\n h: (v, o) => {\n o.height = toCss(v)\n },\n minW: (v, o) => {\n o.minWidth = toCss(v)\n },\n maxW: (v, o) => {\n o.maxWidth = toCss(v)\n },\n minH: (v, o) => {\n o.minHeight = toCss(v)\n },\n maxH: (v, o) => {\n o.maxHeight = toCss(v)\n }\n}\n\nexport const COMMON_KEYS = Object.keys(COMMON_MAP) as Array<\n keyof CommonStyleProps\n>\n\nexport function hasAnyCommonStyleProps(props: Partial<CommonStyleProps>) {\n for (const k of COMMON_KEYS) {\n if (props[k] != null) return true\n }\n return false\n}\n\nexport function resolveCommonStyleProps(\n props: Partial<CommonStyleProps>\n): React.CSSProperties {\n const out: React.CSSProperties = {}\n\n for (const k of COMMON_KEYS) {\n const value = props[k]\n if (value != null) COMMON_MAP[k](value, out)\n }\n\n return out\n}\n\n/**\n * Applies common style props (if present) to a chosen slot.\n * Common props are resolved by `resolveCommonStyleProps`.\n */\nexport function applyCommonsToStyles<TStyles extends Record<string, any>>(\n styles: TStyles,\n props: Partial<CommonStyleProps>,\n slotOverride?: keyof TStyles\n): TStyles {\n if (!hasAnyCommonStyleProps(props)) return styles\n\n const keys = Object.keys(styles)\n if (keys.length === 0) return styles\n\n const slot =\n slotOverride ??\n (('container' in styles ? 'container' : keys[0]) as keyof TStyles)\n\n const common = resolveCommonStyleProps(props)\n\n return {\n ...styles,\n [slot]: { ...(styles[slot] ?? {}), ...common }\n } as TStyles\n}\n","// Types\n/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\nimport type { SplitResult, StyleMap } from '../types'\n\n/**\n * Splits the style map into:\n * - `inline`: slot styles without `__rules`\n * - `rulesBySlot`: extracted `__rules` grouped by slot\n *\n * This lets us:\n * - apply inline styles directly via `style={...}`\n * - inject selectors/pseudos via generated CSS classes\n */\nexport function splitRules<TStyles extends StyleMap>(\n styles: TStyles\n): SplitResult<TStyles> {\n const inline: any = {}\n const rulesBySlot: any = {}\n\n for (const key in styles) {\n const slot = styles[key]\n if (!slot) continue\n\n const { __rules, ...rest } = slot as any\n inline[key] = rest\n\n if (__rules && Object.keys(__rules).length > 0) {\n rulesBySlot[key] = __rules\n }\n }\n\n return { inline, rulesBySlot }\n}\n","/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\n\nimport type { CommonStyleProps } from '../types'\n\nimport { COMMON_KEYS } from './resolveCommonStyleProps'\n\nconst COMMON_KEY_SET = new Set<string>(COMMON_KEYS as readonly string[])\n\nexport function stripCommonProps<T extends object>(\n props: T\n): Omit<T, keyof CommonStyleProps> {\n const out: Record<string, unknown> = {}\n\n for (const key of Object.keys(props as any)) {\n if (!COMMON_KEY_SET.has(key)) {\n out[key] = (props as any)[key]\n }\n }\n\n return out as Omit<T, keyof CommonStyleProps>\n}\n","/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\n\n// External Libraries\nimport { useMemo, useInsertionEffect } from 'react'\n\n// Utils\nimport {\n hashStr,\n splitRules,\n mergeStyleMaps,\n injectSlotRules,\n stableStringify,\n applyCommonsToStyles\n} from './utils'\n\n// Types\nimport type {\n CSSVars,\n RuleMap,\n StyleMap,\n StylesFactory,\n UseThemedStylesOptions\n} from './types'\n\n/**\n * useThemedStyles\n *\n * A React-Native-like style factory hook for React Web that also supports:\n * - CSS variables in inline styles\n * - Pseudo selectors, nested selectors, and vendor selectors via `__rules`\n *\n * It returns two maps:\n * - `styles`: inline styles for each slot\n * - `classes`: generated classes for each slot (needed for `__rules`)\n *\n * Usage:\n * ```tsx\n * const { styles, classes } = useThemedStyles(props, createStyles)\n *\n * return (\n * <button style={styles.item} className={classes.item}>\n * <p style={styles.label} className={classes.label}>Hello</p>\n * </button>\n * )\n * ```\n *\n * Notes:\n * - If a slot has no `__rules`, you can omit `className` for that slot.\n * - If you use `__rules`, you MUST apply the corresponding class for scoping.\n */\nexport function useThemedStyles<TProps, TStyles extends StyleMap>(\n props: TProps,\n factory: StylesFactory<TProps, TStyles>,\n options?: UseThemedStylesOptions<TProps, TStyles>\n): {\n styles: Record<keyof TStyles, React.CSSProperties | CSSVars>\n classes: Record<keyof TStyles, string>\n} {\n /**\n * Memoization priority:\n * 1) deps (manual)\n * 2) pick(props) (recommended)\n * 3) props reference (default behavior)\n */\n const memoKey =\n options?.deps ?? (options?.pick ? options.pick(props) : [props])\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: controlled by deps/pick\n const raw = useMemo(() => factory(props), [factory, ...memoKey])\n\n const { inline, rulesBySlot } = useMemo(() => splitRules(raw), [raw])\n\n const merged = useMemo(\n () => mergeStyleMaps(inline as any, options?.override),\n [inline, options?.override]\n )\n\n const withCommons = useMemo(() => {\n if (!options?.applyCommonProps) return merged\n return applyCommonsToStyles(merged as any, props as any, options.commonSlot)\n }, [merged, props, options?.applyCommonProps, options?.commonSlot])\n\n /**\n * Base id is derived only from the rules signature.\n * This keeps class names stable whenever rules don't change.\n */\n const baseId = useMemo(() => {\n const sig = stableStringify(rulesBySlot)\n const key = hashStr(sig)\n return options?.debugName ? `pxr-${options.debugName}-${key}` : `pxr-${key}`\n }, [rulesBySlot, options?.debugName])\n\n /**\n * Generated class per slot.\n * Example: pxr-<hash>__item\n */\n const classes = useMemo(() => {\n const out: any = {}\n for (const slotKey of Object.keys(withCommons)) {\n out[slotKey] = `${baseId}__${slotKey}`\n }\n return out as Record<keyof TStyles, string>\n }, [baseId, withCommons])\n\n /**\n * Inject rules into the runtime <style> tag.\n *\n * We use `useInsertionEffect` so styles are inserted before layout/paint\n * when supported (best for CSS-in-JS style injection).\n */\n useInsertionEffect(() => {\n for (const slotKey of Object.keys(rulesBySlot as any)) {\n const rules = (rulesBySlot as any)[slotKey] as RuleMap | undefined\n if (!rules) continue\n injectSlotRules((classes as any)[slotKey], rules)\n }\n }, [rulesBySlot, classes])\n\n return { styles: withCommons as any, classes }\n}\n","// External Libraries\nimport type { CSSProperties, JSX } from 'react'\n\n// Types\nimport type { TextAlign, TypographyVariant } from './types'\n\nconst primaryColor = 'var(--px-text-primary)'\nconst secondaryColor = 'var(--px-text-secondary)'\n\nexport const typographyVariants: Record<TypographyVariant, CSSProperties> = {\n h1: {\n fontSize: '3rem',\n fontWeight: '700',\n lineHeight: '1.25',\n color: primaryColor\n },\n h2: {\n fontSize: '2.25rem',\n fontWeight: '600',\n lineHeight: '1.35',\n color: primaryColor\n },\n h3: {\n fontSize: '1.875rem',\n fontWeight: '600',\n color: primaryColor\n },\n h4: {\n fontSize: '1.5rem',\n fontWeight: '500',\n color: primaryColor\n },\n h5: {\n fontSize: '1.25rem',\n fontWeight: '500',\n color: primaryColor\n },\n b1: {\n fontSize: '1rem',\n fontWeight: '500',\n color: primaryColor\n },\n b2: {\n fontSize: '0.875rem',\n color: secondaryColor\n },\n b3: {\n fontSize: '0.75rem',\n color: secondaryColor\n },\n caption: {\n fontSize: '0.75rem',\n color: secondaryColor\n },\n legal: {\n fontSize: '0.65rem',\n textTransform: 'uppercase',\n letterSpacing: '0.025em',\n color: secondaryColor\n }\n}\n\nexport const variantToElement: Record<\n TypographyVariant,\n keyof JSX.IntrinsicElements\n> = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n b1: 'p',\n b2: 'p',\n b3: 'p',\n caption: 'span',\n legal: 'span'\n}\n\nexport const alignText: Record<TextAlign, CSSProperties> = {\n left: { textAlign: 'left' },\n center: { textAlign: 'center' },\n right: { textAlign: 'right' },\n justify: { textAlign: 'justify' }\n}\n","// Utils\nimport { alignText, typographyVariants } from './config'\n\n// Types\nimport type { TypographyProps } from './types'\nimport type { StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createTypographyStyles(props: TypographyProps): StyleMap {\n const { isLoading, variant, align = 'left', color } = props\n\n return {\n base: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n borderBottom: '1px solid var(--pixel-border, #e5e7eb)',\n gap: 0,\n animation: isLoading ? 'animate-pulse 1.5s infinite' : undefined\n },\n\n loading: {\n width: '50%',\n height: '1em',\n display: 'inline-block',\n backgroundColor: 'var(--pixel-gray-300, #d1d5db)',\n borderRadius: '0.25rem'\n },\n\n text: {\n ...alignText[align],\n ...typographyVariants[variant],\n color: color ?? typographyVariants[variant].color\n }\n }\n}\n","// Utils\nimport { variantToElement } from './config'\n\n// Types\nimport type { TypographyProps } from './types'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Styles\nimport { createTypographyStyles } from './style'\n\nexport function Typography(props: TypographyProps) {\n const {\n id,\n as,\n href,\n variant,\n children,\n placeholder,\n isLoading = false,\n styles: styleTypography\n } = props\n\n const { styles } = useThemedStyles(props, createTypographyStyles, {\n pick: p => [p.isLoading, p.variant, p.align],\n commonSlot: 'text',\n applyCommonProps: true,\n override: styleTypography\n })\n\n const Component = as ?? variantToElement[variant]\n\n if (isLoading) {\n return (\n <span\n id={id}\n aria-hidden=\"true\"\n role=\"presentation\"\n style={{ ...styles.text, ...styles.loading }}\n />\n )\n }\n\n const sharedProps = {\n id,\n style: styles.text,\n 'aria-label': placeholder\n }\n\n if (href) {\n return (\n <a href={href} {...sharedProps}>\n {children}\n </a>\n )\n }\n\n return <Component {...sharedProps}>{children}</Component>\n}\n"],"mappings":";;;;;;;;AAIA,SAAgB,QAAQ,KAAa;CACnC,IAAI,IAAI;AACR,MAAK,IAAI,IAAI,GAAG,IAAI,IAAI,QAAQ,IAAK,KAAK,IAAI,KAAM,IAAI,WAAW,EAAE;AACrE,SAAQ,MAAM,GAAG,SAAS,GAAG;;;;;;;;;ACH/B,SAAgB,gBAAgB,KAAkB;AA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BAAwB;EAChE,OAAM,MAAK;GAAC,EAAE;GAAW,EAAE;GAAS,EAAE;GAAM;EAC5C,YAAY;EACZ,kBAAkB;EAClB,UAAU;EACX,CAAC;CAEF,MAAM,YAAY,MAAM,iBAAiB;AAEzC,KAAI,UACF,QACE,oBAAC;EACK;EACJ,eAAY;EACZ,MAAK;EACL,OAAO;GAAE,GAAG,OAAO;GAAM,GAAG,OAAO;GAAS;GAC5C;CAIN,MAAM,cAAc;EAClB;EACA,OAAO,OAAO;EACd,cAAc;EACf;AAED,KAAI,KACF,QACE,oBAAC;EAAQ;EAAM,GAAI;EAChB;GACC;AAIR,QAAO,oBAAC;EAAU,GAAI;EAAc;GAAqB"}
@@ -0,0 +1,3 @@
1
+ import "./types-2d-4sjMo.js";
2
+ import { t as Checkbox } from "./index-CMnvjaqX.js";
3
+ export { Checkbox };
@@ -0,0 +1,5 @@
1
+ import "./Icon-DP_mHQ2j.js";
2
+ import "./Typography-B9X7_xlT.js";
3
+ import { t as Checkbox } from "./Checkbox-ChOwHDqG.js";
4
+
5
+ export { Checkbox };
@@ -1,6 +1,6 @@
1
- import { n as CommonStyleProps, t as StyleMap } from "./useThemedStyles-DyrejrCM.js";
1
+ import { n as CommonStyleProps, t as StyleMap } from "./useThemedStyles-01zK-tbY.js";
2
2
  import { ReactNode } from "react";
3
- import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/components/toolkit/TabSwitch/styles.d.ts
6
6
  declare function createTabSwitchStyles<T>(props: TabSwitchProps<T>): StyleMap;
@@ -26,7 +26,7 @@ interface TabSwitchProps<T> extends CommonStyleProps {
26
26
  }
27
27
  //#endregion
28
28
  //#region src/components/toolkit/TabSwitch/index.d.ts
29
- declare const TabSwitch: <T>(props: TabSwitchProps<T>) => react_jsx_runtime0.JSX.Element;
29
+ declare const TabSwitch: <T>(props: TabSwitchProps<T>) => react_jsx_runtime1.JSX.Element;
30
30
  //#endregion
31
31
  export { SwitchOption as n, TabSwitchProps as r, TabSwitch as t };
32
- //# sourceMappingURL=index--nD5Wzza.d.ts.map
32
+ //# sourceMappingURL=index-CCkDXM6z.d.ts.map
@@ -72,9 +72,31 @@ interface ThemeTokens {
72
72
  success: string;
73
73
  warning: string;
74
74
  error: string;
75
+ invalid: string;
75
76
  info: string;
77
+ scrollbar: string;
78
+ button: {
79
+ primary: {
80
+ label: string;
81
+ background: string;
82
+ disabled_background: string;
83
+ };
84
+ secondary: {
85
+ label: string;
86
+ background: string;
87
+ disabled_background: string;
88
+ };
89
+ };
76
90
  /** Neutral surfaces */
77
- background: string;
91
+ background: {
92
+ /** Main page background */
93
+ primary: string;
94
+ /** Card background */
95
+ card: {
96
+ primary: string;
97
+ secondary: string;
98
+ };
99
+ };
78
100
  surface: string;
79
101
  /** Border colors */
80
102
  border: {
@@ -274,4 +296,4 @@ declare const ThemeProvider: React.FC<ThemeProviderProps>;
274
296
  declare function useTheme(): ThemeContextData;
275
297
  //#endregion
276
298
  export { ThemeName as a, ThemeRegistry as c, ThemeMode as i, ThemeTokens as l, useTheme as n, ThemePersistence as o, ThemeContextData as r, ThemeProviderProps as s, ThemeProvider as t };
277
- //# sourceMappingURL=index-B0CCFNqx.d.ts.map
299
+ //# sourceMappingURL=index-CDW6xFdv.d.ts.map
@@ -0,0 +1,31 @@
1
+ import { n as TypographyVariant } from "./types-2d-4sjMo.js";
2
+ import React$1 from "react";
3
+ import { ChecklistAlertResponse } from "@api/checklist/alerts/dtos";
4
+
5
+ //#region src/components/toolkit/Checkbox/types.d.ts
6
+ type CheckboxSize = 'sm' | 'md' | 'lg';
7
+ type CheckboxRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
8
+ type LabelPlacement = 'left' | 'right';
9
+ type LabelVariant = TypographyVariant;
10
+ interface CheckboxProps {
11
+ icon?: React.ReactNode;
12
+ size?: CheckboxSize;
13
+ label?: string;
14
+ color?: string;
15
+ value?: boolean;
16
+ radius?: CheckboxRadius;
17
+ checked?: boolean;
18
+ disabled?: boolean;
19
+ alert?: ChecklistAlertResponse;
20
+ labelVariant?: LabelVariant;
21
+ labelPlacement?: LabelPlacement;
22
+ labelLineThrough?: boolean;
23
+ onChange: (checked: boolean) => void;
24
+ onLabelChange?: (text: string) => void;
25
+ }
26
+ //#endregion
27
+ //#region src/components/toolkit/Checkbox/index.d.ts
28
+ declare const Checkbox: React$1.FC<CheckboxProps>;
29
+ //#endregion
30
+ export { Checkbox as t };
31
+ //# sourceMappingURL=index-CMnvjaqX.d.ts.map
@@ -0,0 +1,44 @@
1
+ import { t as StyleMap } from "./useThemedStyles-01zK-tbY.js";
2
+ import { n as TypographyVariant } from "./types-2d-4sjMo.js";
3
+ import { InputHTMLAttributes, ReactNode } from "react";
4
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
5
+
6
+ //#region src/components/commons/inputs/Input/styles.d.ts
7
+
8
+ declare function createInputStyles(props: InputProps): StyleMap;
9
+ //#endregion
10
+ //#region src/components/commons/inputs/Input/types.d.ts
11
+ type InputVariant = 'bordered';
12
+ type InputSize = 'sm' | 'md' | 'lg';
13
+ type InputRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
14
+ type InputType = 'text' | 'email' | 'url' | 'password' | 'tel' | 'search';
15
+ type InputWidth = 'auto' | 'full' | 'md' | 'lg' | 'xl' | '2xl';
16
+ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'value' | 'defaultValue' | 'onChange'> {
17
+ size?: InputSize;
18
+ type?: InputType;
19
+ width?: InputWidth;
20
+ label?: string;
21
+ value?: string;
22
+ radius?: InputRadius;
23
+ variant?: InputVariant;
24
+ isInvalid?: boolean;
25
+ fullWidth?: boolean;
26
+ endContent?: ReactNode;
27
+ requiredColor?: string;
28
+ focusedRingColor?: string;
29
+ labelColor?: string;
30
+ styles?: Partial<ReturnType<typeof createInputStyles>>;
31
+ isDisabled?: boolean;
32
+ labelWeight?: string;
33
+ labelVariant?: TypographyVariant;
34
+ defaultValue?: string;
35
+ errorMessage?: string;
36
+ startContent?: ReactNode;
37
+ onChange: (value: string) => void;
38
+ }
39
+ //#endregion
40
+ //#region src/components/commons/inputs/Input/index.d.ts
41
+ declare const Input: (props: InputProps) => react_jsx_runtime0.JSX.Element;
42
+ //#endregion
43
+ export { Input as t };
44
+ //# sourceMappingURL=index-DmDV6MR_.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,4 +1,8 @@
1
- import { n as SwitchOption, r as TabSwitchProps, t as TabSwitch } from "./index--nD5Wzza.js";
2
- import { t as Typography } from "./index-C_T04IuG.js";
3
- import { a as ThemeName, c as ThemeRegistry, i as ThemeMode, l as ThemeTokens, n as useTheme, o as ThemePersistence, r as ThemeContextData, s as ThemeProviderProps, t as ThemeProvider } from "./index-B0CCFNqx.js";
4
- export { SwitchOption, TabSwitch, TabSwitchProps, ThemeContextData, ThemeMode, ThemeName, ThemePersistence, ThemeProvider, ThemeProviderProps, ThemeRegistry, ThemeTokens, Typography, useTheme };
1
+ import "./types-2d-4sjMo.js";
2
+ import { t as Input } from "./index-DmDV6MR_.js";
3
+ import { t as Checkbox } from "./index-CMnvjaqX.js";
4
+ import { InfoSummary, InfoSummaryItem, InfoSummaryProps } from "./info-summary.js";
5
+ import { n as SwitchOption, r as TabSwitchProps, t as TabSwitch } from "./index-CCkDXM6z.js";
6
+ import { Typography } from "./typography.js";
7
+ import { a as ThemeName, c as ThemeRegistry, i as ThemeMode, l as ThemeTokens, n as useTheme, o as ThemePersistence, r as ThemeContextData, s as ThemeProviderProps, t as ThemeProvider } from "./index-CDW6xFdv.js";
8
+ export { Checkbox, InfoSummary, InfoSummaryItem, InfoSummaryProps, Input, SwitchOption, TabSwitch, TabSwitchProps, ThemeContextData, ThemeMode, ThemeName, ThemePersistence, ThemeProvider, ThemeProviderProps, ThemeRegistry, ThemeTokens, Typography, useTheme };
package/dist/index.js CHANGED
@@ -1,5 +1,9 @@
1
- import { t as Typography } from "./Typography-Dn1vnPBy.js";
2
- import { t as TabSwitch } from "./TabSwitch-bxVgCnTw.js";
3
- import { n as useTheme, t as ThemeProvider } from "./ThemeContext-DiQ-_KUr.js";
1
+ import "./Icon-DP_mHQ2j.js";
2
+ import { t as Typography } from "./Typography-B9X7_xlT.js";
3
+ import { t as Checkbox } from "./Checkbox-ChOwHDqG.js";
4
+ import { t as TabSwitch } from "./TabSwitch-CXyetOBu.js";
5
+ import { t as InfoSummary } from "./InfoSummary-DG1mzcP0.js";
6
+ import { t as Input } from "./Input-DQA00Ogn.js";
7
+ import { n as useTheme, t as ThemeProvider } from "./ThemeContext-C0tdHJcj.js";
4
8
 
5
- export { TabSwitch, ThemeProvider, Typography, useTheme };
9
+ export { Checkbox, InfoSummary, Input, TabSwitch, ThemeProvider, Typography, useTheme };
@@ -0,0 +1,62 @@
1
+ import React, { ReactNode } from "react";
2
+
3
+ //#region src/components/toolkit/InfoSummary/types.d.ts
4
+ interface InfoSummaryProps {
5
+ /**
6
+ * Indicates whether the component is in a loading state.
7
+ *
8
+ * When true, the component should render a skeleton or loading placeholder.
9
+ * @default false
10
+ */
11
+ loading?: boolean;
12
+ /**
13
+ * List of information items to be displayed.
14
+ *
15
+ * Each item represents a summarized piece of information
16
+ * such as metrics, status, weather, or time-related data.
17
+ * @requires
18
+ */
19
+ infos: InfoSummaryItem[];
20
+ }
21
+ interface InfoSummaryItem {
22
+ /**
23
+ * Unique identifier for the item.
24
+ */
25
+ id: string;
26
+ /**
27
+ * Item title.
28
+ *
29
+ * Short, descriptive label that identifies the information being shown.
30
+ * Example: "Área", "Temperatura", "Pôr do sol".
31
+ */
32
+ title: string;
33
+ /**
34
+ * Optional icon displayed next to the item title.
35
+ */
36
+ titleIcon?: ReactNode;
37
+ /**
38
+ * Highlighted content of the item.
39
+ *
40
+ * Represents the main information, such as a value, time, temperature,
41
+ * or short descriptive text.
42
+ * Example: "3.210,21", "27°C", "Chuva e vento".
43
+ */
44
+ highlight?: string;
45
+ /**
46
+ * Optional icon displayed next to the highlighted content.
47
+ */
48
+ highlightIcon?: ReactNode;
49
+ /**
50
+ * Supporting text displayed below the highlight.
51
+ *
52
+ * Used for units, ranges, or additional context.
53
+ * Example: "hectares", "19°C – 32°C", "pontos".
54
+ */
55
+ caption?: string;
56
+ }
57
+ //#endregion
58
+ //#region src/components/toolkit/InfoSummary/index.d.ts
59
+ declare const InfoSummary: React.FC<InfoSummaryProps>;
60
+ //#endregion
61
+ export { InfoSummary, InfoSummaryItem, InfoSummaryProps };
62
+ //# sourceMappingURL=info-summary.d.ts.map
@@ -0,0 +1,4 @@
1
+ import "./Typography-B9X7_xlT.js";
2
+ import { t as InfoSummary } from "./InfoSummary-DG1mzcP0.js";
3
+
4
+ export { InfoSummary };
@@ -0,0 +1,3 @@
1
+ import "./types-2d-4sjMo.js";
2
+ import { t as Input } from "./index-DmDV6MR_.js";
3
+ export { Input };
package/dist/input.js ADDED
@@ -0,0 +1,5 @@
1
+ import "./Icon-DP_mHQ2j.js";
2
+ import "./Typography-B9X7_xlT.js";
3
+ import { t as Input } from "./Input-DQA00Ogn.js";
4
+
5
+ export { Input };
@@ -1,2 +1,2 @@
1
- import { n as SwitchOption, r as TabSwitchProps, t as TabSwitch } from "./index--nD5Wzza.js";
1
+ import { n as SwitchOption, r as TabSwitchProps, t as TabSwitch } from "./index-CCkDXM6z.js";
2
2
  export { SwitchOption, TabSwitch, TabSwitchProps };
@@ -1,4 +1,4 @@
1
- import "./Typography-Dn1vnPBy.js";
2
- import { t as TabSwitch } from "./TabSwitch-bxVgCnTw.js";
1
+ import "./Typography-B9X7_xlT.js";
2
+ import { t as TabSwitch } from "./TabSwitch-CXyetOBu.js";
3
3
 
4
4
  export { TabSwitch };
@@ -1,2 +1,2 @@
1
- import { a as ThemeName, c as ThemeRegistry, i as ThemeMode, l as ThemeTokens, n as useTheme, o as ThemePersistence, r as ThemeContextData, s as ThemeProviderProps, t as ThemeProvider } from "./index-B0CCFNqx.js";
1
+ import { a as ThemeName, c as ThemeRegistry, i as ThemeMode, l as ThemeTokens, n as useTheme, o as ThemePersistence, r as ThemeContextData, s as ThemeProviderProps, t as ThemeProvider } from "./index-CDW6xFdv.js";
2
2
  export { ThemeContextData, ThemeMode, ThemeName, ThemePersistence, ThemeProvider, ThemeProviderProps, ThemeRegistry, ThemeTokens, useTheme };
@@ -1,3 +1,3 @@
1
- import { n as useTheme, t as ThemeProvider } from "./ThemeContext-DiQ-_KUr.js";
1
+ import { n as useTheme, t as ThemeProvider } from "./ThemeContext-C0tdHJcj.js";
2
2
 
3
3
  export { ThemeProvider, useTheme };
@@ -1,6 +1,5 @@
1
- import { r as TextProps, t as StyleMap } from "./useThemedStyles-DyrejrCM.js";
1
+ import { r as TextProps, t as StyleMap } from "./useThemedStyles-01zK-tbY.js";
2
2
  import { ElementType, ReactNode } from "react";
3
- import * as react_jsx_runtime0 from "react/jsx-runtime";
4
3
 
5
4
  //#region src/components/toolkit/Typography/style.d.ts
6
5
  declare function createTypographyStyles(props: TypographyProps): StyleMap;
@@ -13,6 +12,7 @@ interface TypographyProps extends TextProps {
13
12
  as?: ElementType;
14
13
  children: ReactNode;
15
14
  align?: TextAlign;
15
+ color?: string;
16
16
  isLoading?: boolean;
17
17
  placeholder?: string;
18
18
  styles?: Partial<ReturnType<typeof createTypographyStyles>>;
@@ -20,8 +20,5 @@ interface TypographyProps extends TextProps {
20
20
  type TextAlign = 'left' | 'center' | 'right' | 'justify';
21
21
  type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'b1' | 'b2' | 'b3' | 'caption' | 'legal';
22
22
  //#endregion
23
- //#region src/components/toolkit/Typography/index.d.ts
24
- declare function Typography(props: TypographyProps): react_jsx_runtime0.JSX.Element;
25
- //#endregion
26
- export { Typography as t };
27
- //# sourceMappingURL=index-C_T04IuG.d.ts.map
23
+ export { TypographyVariant as n, TypographyProps as t };
24
+ //# sourceMappingURL=types-2d-4sjMo.d.ts.map
@@ -1,2 +1,8 @@
1
- import { t as Typography } from "./index-C_T04IuG.js";
2
- export { Typography };
1
+ import { t as TypographyProps } from "./types-2d-4sjMo.js";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/components/toolkit/Typography/index.d.ts
5
+ declare function Typography(props: TypographyProps): react_jsx_runtime0.JSX.Element;
6
+ //#endregion
7
+ export { Typography };
8
+ //# sourceMappingURL=typography.d.ts.map
@@ -1,3 +1,3 @@
1
- import { t as Typography } from "./Typography-Dn1vnPBy.js";
1
+ import { t as Typography } from "./Typography-B9X7_xlT.js";
2
2
 
3
3
  export { Typography };
@@ -79,7 +79,14 @@ type SlotStyle = (React.CSSProperties | CSSVars) & {
79
79
  * Example:
80
80
  * ```ts
81
81
  * {
82
- * container: { ... },
82
+ * container: {
83
+ * ...,
84
+ *
85
+ * __rules: {
86
+ * '&:hover': { ... },
87
+ * ...
88
+ * }
89
+ * },
83
90
  * label: { ... },
84
91
  * icon: { ... }
85
92
  * }
@@ -88,4 +95,4 @@ type SlotStyle = (React.CSSProperties | CSSVars) & {
88
95
  type StyleMap = Record<string, SlotStyle>;
89
96
  //#endregion
90
97
  export { CommonStyleProps as n, TextProps as r, StyleMap as t };
91
- //# sourceMappingURL=useThemedStyles-DyrejrCM.d.ts.map
98
+ //# sourceMappingURL=useThemedStyles-01zK-tbY.d.ts.map