softable-pixels-web 1.1.6 → 1.1.8

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 (62) hide show
  1. package/dist/{Button-BiSdxI2A.js → Button-BrV5pWD2.js} +6 -6
  2. package/dist/Button-BrV5pWD2.js.map +1 -0
  3. package/dist/{CheckItem-DsIiS-2X.js → CheckItem-DEUwzhbF.js} +5 -5
  4. package/dist/CheckItem-DEUwzhbF.js.map +1 -0
  5. package/dist/{Checkbox-6ivVbzcX.js → Checkbox-CA11dJ4h.js} +8 -8
  6. package/dist/Checkbox-CA11dJ4h.js.map +1 -0
  7. package/dist/{Icon-Cv0qztmq.js → Icon-D40nGMJM.js} +4 -4
  8. package/dist/Icon-D40nGMJM.js.map +1 -0
  9. package/dist/{InfoSummary-Bsczs0X6.js → InfoSummary-Cft-E1GO.js} +20 -19
  10. package/dist/InfoSummary-Cft-E1GO.js.map +1 -0
  11. package/dist/{Input-BvbMEjwE.js → Input-BcDV2JOa.js} +3 -3
  12. package/dist/Input-BcDV2JOa.js.map +1 -0
  13. package/dist/{Label-QQpNWSeV.js → Label-DXpBz2AN.js} +2 -2
  14. package/dist/Label-DXpBz2AN.js.map +1 -0
  15. package/dist/{TabSwitch-De30bFX2.js → TabSwitch-D6WJc7Bf.js} +6 -6
  16. package/dist/TabSwitch-D6WJc7Bf.js.map +1 -0
  17. package/dist/{TextArea-CpIx36BV.js → TextArea-DY9c18r6.js} +4 -4
  18. package/dist/TextArea-DY9c18r6.js.map +1 -0
  19. package/dist/{ThemeContext-Dro_peJg.js → ThemeContext-0pOYSNvl.js} +10 -4
  20. package/dist/ThemeContext-0pOYSNvl.js.map +1 -0
  21. package/dist/{Typography-BE-vQSfx.js → Typography-XA7uwbWe.js} +4 -4
  22. package/dist/Typography-XA7uwbWe.js.map +1 -0
  23. package/dist/button.d.ts +2 -2
  24. package/dist/button.js +2 -2
  25. package/dist/check-item.d.ts +1 -1
  26. package/dist/check-item.js +3 -3
  27. package/dist/checkbox.d.ts +2 -2
  28. package/dist/checkbox.js +3 -3
  29. package/dist/{index-DVz2cTUe.d.ts → index-B9MqmTLB.d.ts} +2 -2
  30. package/dist/{index-CIxyqe-m.d.ts → index-Cg3ejKX9.d.ts} +2 -2
  31. package/dist/{index-C9iMLJTU.d.ts → index-DQMtfFqC.d.ts} +4 -4
  32. package/dist/{index-DUrGjyKy.d.ts → index-DZqSyBAN.d.ts} +6 -6
  33. package/dist/{index-pnnP9M22.d.ts → index-De1q2lSW.d.ts} +2 -2
  34. package/dist/{index-akSk71wZ.d.ts → index-RcFYZiMi.d.ts} +3 -3
  35. package/dist/{index-BspBF3Mv.d.ts → index-vtqd-Akd.d.ts} +2 -2
  36. package/dist/index.d.ts +8 -8
  37. package/dist/index.js +11 -11
  38. package/dist/info-summary.d.ts +2 -2
  39. package/dist/info-summary.js +2 -2
  40. package/dist/input.d.ts +2 -2
  41. package/dist/input.js +4 -4
  42. package/dist/tab-switch.d.ts +1 -1
  43. package/dist/tab-switch.js +2 -2
  44. package/dist/text-area.d.ts +2 -2
  45. package/dist/text-area.js +4 -4
  46. package/dist/theme-context.d.ts +1 -1
  47. package/dist/theme-context.js +1 -1
  48. package/dist/{types-CDUx-y9q.d.ts → types-ESf1Pmhi.d.ts} +3 -3
  49. package/dist/typography.d.ts +2 -2
  50. package/dist/typography.js +1 -1
  51. package/package.json +1 -1
  52. package/dist/Button-BiSdxI2A.js.map +0 -1
  53. package/dist/CheckItem-DsIiS-2X.js.map +0 -1
  54. package/dist/Checkbox-6ivVbzcX.js.map +0 -1
  55. package/dist/Icon-Cv0qztmq.js.map +0 -1
  56. package/dist/InfoSummary-Bsczs0X6.js.map +0 -1
  57. package/dist/Input-BvbMEjwE.js.map +0 -1
  58. package/dist/Label-QQpNWSeV.js.map +0 -1
  59. package/dist/TabSwitch-De30bFX2.js.map +0 -1
  60. package/dist/TextArea-CpIx36BV.js.map +0 -1
  61. package/dist/ThemeContext-Dro_peJg.js.map +0 -1
  62. package/dist/Typography-BE-vQSfx.js.map +0 -1
@@ -115,10 +115,12 @@ const defaultThemes = {
115
115
  },
116
116
  ...COMMON_MAP,
117
117
  shadows: {
118
+ xs: "0px -1px 0px #0A0D120D inset, 0px 1px 2px #0A0D120D",
118
119
  sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
119
120
  md: "0 4px 6px -1px rgba(0, 0, 0, 0.10)",
120
121
  lg: "0 10px 15px -3px rgba(0, 0, 0, 0.10)",
121
- xl: "0 20px 25px -5px rgba(0, 0, 0, 0.10)"
122
+ xl: "0 20px 25px -5px rgba(0, 0, 0, 0.10)",
123
+ "2xl": "0 25px 50px -12px rgba(0, 0, 0, 0.25)"
122
124
  }
123
125
  },
124
126
  dark: {
@@ -164,10 +166,12 @@ const defaultThemes = {
164
166
  },
165
167
  ...COMMON_MAP,
166
168
  shadows: {
169
+ xs: "0px -1px 0px #0A0D120D inset, 0px 1px 2px #0A0D120D",
167
170
  sm: "0 1px 2px 0 rgba(0, 0, 0, 0.35)",
168
171
  md: "0 4px 6px -1px rgba(0, 0, 0, 0.45)",
169
172
  lg: "0 10px 15px -3px rgba(0, 0, 0, 0.50)",
170
- xl: "0 20px 25px -5px rgba(0, 0, 0, 0.55)"
173
+ xl: "0 20px 25px -5px rgba(0, 0, 0, 0.55)",
174
+ "2xl": "0 25px 50px -12px rgba(0, 0, 0, 0.65)"
171
175
  }
172
176
  }
173
177
  };
@@ -401,10 +405,12 @@ function themeToCssVars(theme) {
401
405
  "--px-fw-medium": theme.fontWeight.medium,
402
406
  "--px-fw-semibold": theme.fontWeight.semibold,
403
407
  "--px-fw-bold": theme.fontWeight.bold,
408
+ "--px-shadow-xs": theme.shadows.xs,
404
409
  "--px-shadow-sm": theme.shadows.sm,
405
410
  "--px-shadow-md": theme.shadows.md,
406
411
  "--px-shadow-lg": theme.shadows.lg,
407
- "--px-shadow-xl": theme.shadows.xl
412
+ "--px-shadow-xl": theme.shadows.xl,
413
+ "--px-shadow-2xl": theme.shadows["2xl"]
408
414
  };
409
415
  }
410
416
 
@@ -516,4 +522,4 @@ function useTheme() {
516
522
 
517
523
  //#endregion
518
524
  export { useTheme as n, ThemeProvider as t };
519
- //# sourceMappingURL=ThemeContext-Dro_peJg.js.map
525
+ //# sourceMappingURL=ThemeContext-0pOYSNvl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeContext-0pOYSNvl.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 disabled: '#D5D7DA',\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 filled: {\n label: '#FFFFFF',\n background: '#0EB24C'\n },\n\n outlined: {\n label: '#222222',\n borderColor: '#DDDDDD'\n },\n\n ghost: {\n label: '#6C6C6C'\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 xs: '0px -1px 0px #0A0D120D inset, 0px 1px 2px #0A0D120D',\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 '2xl': '0 25px 50px -12px rgba(0, 0, 0, 0.25)'\n }\n },\n\n dark: {\n colors: {\n scrollbar: '#858585',\n disabled: '#D5D7DA',\n\n primary: '#0EB24C',\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 filled: {\n label: '#FFFFFF',\n background: '#0EB24C'\n },\n\n outlined: {\n label: '#ECECEC',\n borderColor: '#DDDDDD'\n },\n\n ghost: {\n label: '#6C6C6C'\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 xs: '0px -1px 0px #0A0D120D inset, 0px 1px 2px #0A0D120D',\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 '2xl': '0 25px 50px -12px rgba(0, 0, 0, 0.65)'\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 handler()\n\n if (mq.addEventListener) {\n mq.addEventListener('change', handler)\n return () => mq.removeEventListener('change', handler)\n }\n\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 * Brand & intent colors\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 '--px-color-disabled': theme.colors.disabled,\n\n /**\n * Scrollbar\n */\n '--px-scrollbar': theme.colors.scrollbar,\n\n /**\n * Surfaces / backgrounds\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 '--px-background-card-secondary': theme.colors.background.card.secondary,\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 * Buttons – Filled\n * ----------------\n * Filled button colors\n */\n '--px-btn-filled-bg': theme.colors.button.filled.background,\n '--px-btn-filled-label': theme.colors.button.filled.label,\n\n /**\n * Buttons – Outlined\n * ------------------\n * Outlined button colors\n */\n '--px-btn-outlined-border': theme.colors.button.outlined.borderColor,\n '--px-btn-outlined-label': theme.colors.button.outlined.label,\n\n /**\n * Buttons – Ghost\n * --------------\n * Ghost button colors\n */\n '--px-btn-ghost-label': theme.colors.button.ghost.label,\n /**\n * Spacing\n * -------------\n * Numeric spacing tokens (commonly used as px).\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-xs': theme.shadows.xs,\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 '--px-shadow-2xl': theme.shadows['2xl']\n }\n}\n","/** biome-ignore-all lint/suspicious/noExplicitAny: <Not needed> */\n\n'use client'\n\n// External Libraries\nimport {\n useMemo,\n useState,\n useEffect,\n useContext,\n createContext,\n useLayoutEffect\n} 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\nconst ThemeContext = createContext<ThemeContextData | null>(null)\n\n/**\n * useIsomorphicLayoutEffect\n * - On client: runs before paint (layout effect)\n * - On server: falls back to useEffect (no warnings)\n */\nconst useIsomorphicLayoutEffect =\n typeof window !== 'undefined' ? useLayoutEffect : useEffect\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 fallback = null\n}) => {\n const registry = useMemo(() => buildRegistry(themes), [themes])\n\n function makeInitialMode(): ThemeMode {\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 const ls = getLocalStorageSafe()\n if (!ls) return defaultMode\n const raw = ls.getItem(storageKey)?.replaceAll('\"', '')\n return isThemeMode(raw) ? raw : defaultMode\n }\n\n const [mode, setMode] = useState<ThemeMode>(makeInitialMode)\n\n /**\n * Gate: only render children after we applied class + vars at least once.\n * This prevents \"unstyled flash\" for your components.\n */\n const [isReady, setReady] = useState(false)\n\n const resolvedName = useMemo(() => {\n if (typeof window === 'undefined') return mode === 'system' ? 'light' : mode\n return resolveName(mode)\n }, [mode])\n\n const theme = useMemo(\n () => buildTheme(registry, resolvedName, override),\n [registry, resolvedName, override]\n )\n\n // keep in sync with OS when mode === \"system\"\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 * Apply theme BEFORE paint (client) and then unlock rendering.\n */\n useIsomorphicLayoutEffect(() => {\n if (typeof window === 'undefined') return\n\n applyThemeClass(resolvedName === 'dark' ? 'dark' : 'light')\n applyCssVars(themeToCssVars(theme))\n\n // unlock after first successful application\n setReady(true)\n }, [resolvedName, theme])\n\n /**\n * Persist mode changes (optional).\n */\n useEffect(() => {\n if (persistence) {\n try {\n persistence.set(mode)\n } catch {}\n return\n }\n\n if (!persist) return\n const ls = getLocalStorageSafe()\n if (!ls) return\n\n try {\n ls.setItem(storageKey, mode)\n } catch {}\n }, [mode, persist, storageKey, persistence])\n\n function setTheme(next: ThemeMode) {\n setMode(next)\n }\n\n function toggleTheme(a: string = 'light', b: string = 'dark') {\n setMode(resolvedName === a ? b : a)\n }\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: <Not needed>\n const ctxValue = useMemo(\n () => ({\n mode,\n resolvedName,\n theme,\n isLoading: !isReady,\n setTheme,\n toggleTheme\n }),\n [mode, resolvedName, theme, isReady]\n )\n\n return (\n <ThemeContext.Provider value={ctxValue}>\n {isReady ? children : fallback}\n </ThemeContext.Provider>\n )\n}\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,E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,UAAU,WAAW;GACA;;AAI5B,SAAgB,WAA6B;CAC3C,MAAM,MAAM,WAAW,aAAa;AACpC,KAAI,CAAC,IAAK,OAAM,IAAI,MAAM,+CAA+C;AACzE,QAAO"}
@@ -1,7 +1,7 @@
1
1
  import { n as styled, r as WEIGHTS, t as useThemedStyles } from "./useThemedStyles-3rUXJYgS.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
 
4
- //#region src/components/toolkit/Typography/config.ts
4
+ //#region src/components/commons/toolkit/Typography/config.ts
5
5
  const primaryColor = "var(--px-text-primary)";
6
6
  const secondaryColor = "var(--px-text-secondary)";
7
7
  const typographyVariants = {
@@ -88,7 +88,7 @@ const alignText = {
88
88
  };
89
89
 
90
90
  //#endregion
91
- //#region src/components/toolkit/Typography/style.ts
91
+ //#region src/components/commons/toolkit/Typography/style.ts
92
92
  function createTypographyStyles(props) {
93
93
  const { isLoading, variant, align = "left", color } = props;
94
94
  return styled({
@@ -116,7 +116,7 @@ function createTypographyStyles(props) {
116
116
  }
117
117
 
118
118
  //#endregion
119
- //#region src/components/toolkit/Typography/index.tsx
119
+ //#region src/components/commons/toolkit/Typography/index.tsx
120
120
  function Typography(props) {
121
121
  const { id, as, href, variant, children, className, placeholder, isLoading = false, styles: styleTypography } = props;
122
122
  const { styles } = useThemedStyles(props, createTypographyStyles, {
@@ -158,4 +158,4 @@ function Typography(props) {
158
158
 
159
159
  //#endregion
160
160
  export { Typography as t };
161
- //# sourceMappingURL=Typography-BE-vQSfx.js.map
161
+ //# sourceMappingURL=Typography-XA7uwbWe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Typography-XA7uwbWe.js","names":["typographyVariants: Record<TypographyVariant, SlotStyle>","variantToElement: Record<\n TypographyVariant,\n keyof JSX.IntrinsicElements\n>","alignText: Record<TextAlign, SlotStyle>"],"sources":["../src/components/commons/toolkit/Typography/config.ts","../src/components/commons/toolkit/Typography/style.ts","../src/components/commons/toolkit/Typography/index.tsx"],"sourcesContent":["// External Libraries\nimport type { JSX } from 'react'\n\n// Types\nimport type { TextAlign, TypographyVariant } from './types'\nimport { type SlotStyle, WEIGHTS } from '@hooks/useThemedStyles/types'\n\nconst primaryColor = 'var(--px-text-primary)'\nconst secondaryColor = 'var(--px-text-secondary)'\n\nexport const typographyVariants: Record<TypographyVariant, SlotStyle> = {\n h1: {\n fontSize: '3rem',\n fontWeight: '700',\n lineHeight: WEIGHTS.bold,\n color: primaryColor\n },\n h2: {\n fontSize: '2.25rem',\n fontWeight: WEIGHTS.bold,\n lineHeight: 'calc(2.5 / 2.25)',\n color: primaryColor\n },\n h3: {\n fontSize: '1.875rem',\n fontWeight: WEIGHTS.bold,\n lineHeight: 'calc(2.25 / 1.875)',\n color: primaryColor\n },\n h4: {\n fontSize: '1.5rem',\n fontWeight: WEIGHTS.bold,\n lineHeight: 'calc(2 / 1.5)',\n color: primaryColor\n },\n h5: {\n fontSize: '1.25rem',\n fontWeight: WEIGHTS.bold,\n lineHeight: 'calc(1.75 / 1.25)',\n color: primaryColor\n },\n b1: {\n fontSize: '1rem',\n fontWeight: WEIGHTS.medium,\n lineHeight: '1.5',\n color: primaryColor\n },\n b2: {\n fontSize: '0.875rem',\n fontWeight: WEIGHTS.medium,\n lineHeight: 'calc(1.25 / 0.875)',\n color: secondaryColor\n },\n b3: {\n fontSize: '0.75rem',\n fontWeight: WEIGHTS.medium,\n lineHeight: 'calc(1 / 0.75)',\n color: secondaryColor\n },\n caption: {\n fontSize: '0.65rem',\n fontWeight: WEIGHTS.regular,\n lineHeight: 'calc(1 / 0.65)',\n color: secondaryColor\n },\n legal: {\n fontSize: '0.65rem',\n lineHeight: 'calc(1 / 0.65)',\n fontWeight: WEIGHTS.light,\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, SlotStyle> = {\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 SlotStyle, styled } from '@hooks/useThemedStyles/types'\n\nexport function createTypographyStyles(props: TypographyProps) {\n const { isLoading, variant, align = 'left', color } = props\n\n return styled({\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 } as SlotStyle\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 className,\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 className\n }\n\n if (href) {\n return (\n <a href={href} {...sharedProps}>\n {children}\n </a>\n )\n }\n\n return <Component {...shar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ACT,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;GACtB,OAAO,SAAS,mBAAmB,SAAS;GAC7C;EACF,CAAC;;;;;ACrBJ,SAAgB,WAAW,OAAwB;CACjD,MAAM,EACJ,IACA,IACA,MACA,SACA,UACA,WACA,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;EACd;EACD;AAED,KAAI,KACF,QACE,oBAAC;EAAQ;EAAM,GAAI;EAChB;GACC;AAIR,QAAO,oBAAC;EAAU,GAAI;EAAc;GAAqB"}
package/dist/button.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import "./types-CDUx-y9q.js";
2
- import { t as Button } from "./index-DVz2cTUe.js";
1
+ import "./types-ESf1Pmhi.js";
2
+ import { t as Button } from "./index-B9MqmTLB.js";
3
3
  export { Button };
package/dist/button.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./useThemedStyles-3rUXJYgS.js";
2
- import "./Typography-BE-vQSfx.js";
3
- import { t as Button } from "./Button-BiSdxI2A.js";
2
+ import "./Typography-XA7uwbWe.js";
3
+ import { t as Button } from "./Button-BrV5pWD2.js";
4
4
 
5
5
  export { Button };
@@ -1,2 +1,2 @@
1
- import { t as CheckItem } from "./index-akSk71wZ.js";
1
+ import { t as CheckItem } from "./index-RcFYZiMi.js";
2
2
  export { CheckItem };
@@ -1,6 +1,6 @@
1
- import "./Icon-Cv0qztmq.js";
1
+ import "./Icon-D40nGMJM.js";
2
2
  import "./useThemedStyles-3rUXJYgS.js";
3
- import "./Typography-BE-vQSfx.js";
4
- import { t as CheckItem } from "./CheckItem-DsIiS-2X.js";
3
+ import "./Typography-XA7uwbWe.js";
4
+ import { t as CheckItem } from "./CheckItem-DEUwzhbF.js";
5
5
 
6
6
  export { CheckItem };
@@ -1,3 +1,3 @@
1
- import "./types-CDUx-y9q.js";
2
- import { t as Checkbox } from "./index-C9iMLJTU.js";
1
+ import "./types-ESf1Pmhi.js";
2
+ import { t as Checkbox } from "./index-DQMtfFqC.js";
3
3
  export { Checkbox };
package/dist/checkbox.js CHANGED
@@ -1,6 +1,6 @@
1
- import "./Icon-Cv0qztmq.js";
1
+ import "./Icon-D40nGMJM.js";
2
2
  import "./useThemedStyles-3rUXJYgS.js";
3
- import "./Typography-BE-vQSfx.js";
4
- import { t as Checkbox } from "./Checkbox-6ivVbzcX.js";
3
+ import "./Typography-XA7uwbWe.js";
4
+ import { t as Checkbox } from "./Checkbox-CA11dJ4h.js";
5
5
 
6
6
  export { Checkbox };
@@ -1,6 +1,6 @@
1
1
  import { i as PaddingProps } from "./styleProps-D405c8KF.js";
2
2
  import { i as styled, r as TypeStyles } from "./useThemedStyles-B7irjShy.js";
3
- import { n as TypographyVariant } from "./types-CDUx-y9q.js";
3
+ import { n as TypographyVariant } from "./types-ESf1Pmhi.js";
4
4
  import React, { MouseEvent, ReactNode } from "react";
5
5
 
6
6
  //#region src/components/commons/buttons/Button/styles.d.ts
@@ -80,4 +80,4 @@ interface ButtonProps extends PaddingProps {
80
80
  declare const Button: React.FC<ButtonProps>;
81
81
  //#endregion
82
82
  export { Button as t };
83
- //# sourceMappingURL=index-DVz2cTUe.d.ts.map
83
+ //# sourceMappingURL=index-B9MqmTLB.d.ts.map
@@ -139,7 +139,7 @@ interface ThemeTokens {
139
139
  /**
140
140
  * Shadow tokens (CSS shadow strings).
141
141
  */
142
- shadows: Record<'sm' | 'md' | 'lg' | 'xl', string>;
142
+ shadows: Record<'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl', string>;
143
143
  /**
144
144
  * Extension point.
145
145
  *
@@ -288,4 +288,4 @@ declare const ThemeProvider: React.FC<ThemeProviderProps>;
288
288
  declare function useTheme(): ThemeContextData;
289
289
  //#endregion
290
290
  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 };
291
- //# sourceMappingURL=index-CIxyqe-m.d.ts.map
291
+ //# sourceMappingURL=index-Cg3ejKX9.d.ts.map
@@ -1,7 +1,7 @@
1
- import { n as TypographyVariant } from "./types-CDUx-y9q.js";
1
+ import { n as TypographyVariant } from "./types-ESf1Pmhi.js";
2
2
  import React$1 from "react";
3
3
 
4
- //#region src/components/toolkit/Checkbox/types.d.ts
4
+ //#region src/components/commons/toolkit/Checkbox/types.d.ts
5
5
  type CheckboxSize = 'sm' | 'md' | 'lg';
6
6
  type CheckboxRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
7
7
  type LabelPlacement = 'left' | 'right';
@@ -22,8 +22,8 @@ interface CheckboxProps {
22
22
  onLabelChange?: (text: string) => void;
23
23
  }
24
24
  //#endregion
25
- //#region src/components/toolkit/Checkbox/index.d.ts
25
+ //#region src/components/commons/toolkit/Checkbox/index.d.ts
26
26
  declare const Checkbox: React$1.FC<CheckboxProps>;
27
27
  //#endregion
28
28
  export { Checkbox as t };
29
- //# sourceMappingURL=index-C9iMLJTU.d.ts.map
29
+ //# sourceMappingURL=index-DQMtfFqC.d.ts.map
@@ -1,12 +1,12 @@
1
1
  import { t as CommonStyleProps } from "./styleProps-D405c8KF.js";
2
2
  import { n as StyleMap } from "./useThemedStyles-B7irjShy.js";
3
3
  import { ReactNode } from "react";
4
- import * as react_jsx_runtime1 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
5
5
 
6
- //#region src/components/toolkit/TabSwitch/styles.d.ts
6
+ //#region src/components/commons/toolkit/TabSwitch/styles.d.ts
7
7
  declare function createTabSwitchStyles<T>(props: TabSwitchProps<T>): StyleMap;
8
8
  //#endregion
9
- //#region src/components/toolkit/TabSwitch/types.d.ts
9
+ //#region src/components/commons/toolkit/TabSwitch/types.d.ts
10
10
  interface SwitchOption<T> {
11
11
  value: T;
12
12
  label: string;
@@ -26,8 +26,8 @@ interface TabSwitchProps<T> extends CommonStyleProps {
26
26
  onChange: (value: T) => void;
27
27
  }
28
28
  //#endregion
29
- //#region src/components/toolkit/TabSwitch/index.d.ts
30
- declare const TabSwitch: <T>(props: TabSwitchProps<T>) => react_jsx_runtime1.JSX.Element;
29
+ //#region src/components/commons/toolkit/TabSwitch/index.d.ts
30
+ declare const TabSwitch: <T>(props: TabSwitchProps<T>) => react_jsx_runtime0.JSX.Element;
31
31
  //#endregion
32
32
  export { SwitchOption as n, TabSwitchProps as r, TabSwitch as t };
33
- //# sourceMappingURL=index-DUrGjyKy.d.ts.map
33
+ //# sourceMappingURL=index-DZqSyBAN.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { i as PaddingProps, n as LayoutProps } from "./styleProps-D405c8KF.js";
2
2
  import { n as StyleMap } from "./useThemedStyles-B7irjShy.js";
3
- import { n as TypographyVariant } from "./types-CDUx-y9q.js";
3
+ import { n as TypographyVariant } from "./types-ESf1Pmhi.js";
4
4
  import React, { ReactNode } from "react";
5
5
 
6
6
  //#region src/components/commons/inputs/Input/styles.d.ts
@@ -46,4 +46,4 @@ interface InputProps extends LayoutProps, PaddingProps {
46
46
  declare const Input: React.FC<InputProps>;
47
47
  //#endregion
48
48
  export { Input as t };
49
- //# sourceMappingURL=index-pnnP9M22.d.ts.map
49
+ //# sourceMappingURL=index-De1q2lSW.d.ts.map
@@ -1,13 +1,13 @@
1
1
  import React from "react";
2
2
 
3
- //#region src/components/toolkit/CheckItem/types.d.ts
3
+ //#region src/components/commons/toolkit/CheckItem/types.d.ts
4
4
  interface CheckItemProps {
5
5
  label: string;
6
6
  checked: boolean;
7
7
  }
8
8
  //#endregion
9
- //#region src/components/toolkit/CheckItem/index.d.ts
9
+ //#region src/components/commons/toolkit/CheckItem/index.d.ts
10
10
  declare const CheckItem: React.FC<CheckItemProps>;
11
11
  //#endregion
12
12
  export { CheckItem as t };
13
- //# sourceMappingURL=index-akSk71wZ.d.ts.map
13
+ //# sourceMappingURL=index-RcFYZiMi.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { n as StyleMap } from "./useThemedStyles-B7irjShy.js";
2
- import { n as TypographyVariant } from "./types-CDUx-y9q.js";
2
+ import { n as TypographyVariant } from "./types-ESf1Pmhi.js";
3
3
  import * as react_jsx_runtime2 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/assets/icons/index.d.ts
@@ -45,4 +45,4 @@ interface TextAreaProps {
45
45
  declare const TextArea: (props: TextAreaProps) => react_jsx_runtime2.JSX.Element;
46
46
  //#endregion
47
47
  export { TextArea as t };
48
- //# sourceMappingURL=index-BspBF3Mv.d.ts.map
48
+ //# sourceMappingURL=index-vtqd-Akd.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- import "./types-CDUx-y9q.js";
2
- import { t as Button } from "./index-DVz2cTUe.js";
1
+ import "./types-ESf1Pmhi.js";
2
+ import { t as Button } from "./index-B9MqmTLB.js";
3
3
  import { t as IconButton } from "./index-CyvtOmP2.js";
4
- import { t as Input } from "./index-pnnP9M22.js";
5
- import { t as TextArea } from "./index-BspBF3Mv.js";
6
- import { t as CheckItem } from "./index-akSk71wZ.js";
7
- import { t as Checkbox } from "./index-C9iMLJTU.js";
4
+ import { t as Input } from "./index-De1q2lSW.js";
5
+ import { t as TextArea } from "./index-vtqd-Akd.js";
6
+ import { t as CheckItem } from "./index-RcFYZiMi.js";
7
+ import { t as Checkbox } from "./index-DQMtfFqC.js";
8
8
  import { InfoSummary, InfoSummaryItem, InfoSummaryProps } from "./info-summary.js";
9
- import { n as SwitchOption, r as TabSwitchProps, t as TabSwitch } from "./index-DUrGjyKy.js";
9
+ import { n as SwitchOption, r as TabSwitchProps, t as TabSwitch } from "./index-DZqSyBAN.js";
10
10
  import { Typography } from "./typography.js";
11
- 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-CIxyqe-m.js";
11
+ 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-Cg3ejKX9.js";
12
12
  export { Button, CheckItem, Checkbox, IconButton, InfoSummary, InfoSummaryItem, InfoSummaryProps, Input, SwitchOption, TabSwitch, TabSwitchProps, TextArea, ThemeContextData, ThemeMode, ThemeName, ThemePersistence, ThemeProvider, ThemeProviderProps, ThemeRegistry, ThemeTokens, Typography, useTheme };
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
- import "./Icon-Cv0qztmq.js";
1
+ import "./Icon-D40nGMJM.js";
2
2
  import "./useThemedStyles-3rUXJYgS.js";
3
- import { t as Typography } from "./Typography-BE-vQSfx.js";
4
- import { t as Checkbox } from "./Checkbox-6ivVbzcX.js";
5
- import { n as useTheme, t as ThemeProvider } from "./ThemeContext-Dro_peJg.js";
6
- import { t as TabSwitch } from "./TabSwitch-De30bFX2.js";
7
- import { t as InfoSummary } from "./InfoSummary-Bsczs0X6.js";
8
- import { t as CheckItem } from "./CheckItem-DsIiS-2X.js";
9
- import { t as Button } from "./Button-BiSdxI2A.js";
3
+ import { t as Typography } from "./Typography-XA7uwbWe.js";
4
+ import { t as Checkbox } from "./Checkbox-CA11dJ4h.js";
5
+ import { n as useTheme, t as ThemeProvider } from "./ThemeContext-0pOYSNvl.js";
6
+ import { t as TabSwitch } from "./TabSwitch-D6WJc7Bf.js";
7
+ import { t as CheckItem } from "./CheckItem-DEUwzhbF.js";
8
+ import { t as InfoSummary } from "./InfoSummary-Cft-E1GO.js";
9
+ import { t as Button } from "./Button-BrV5pWD2.js";
10
10
  import { t as IconButton } from "./IconButton-BBdkzg3b.js";
11
- import "./Label-QQpNWSeV.js";
12
- import { t as Input } from "./Input-BvbMEjwE.js";
13
- import { t as TextArea } from "./TextArea-CpIx36BV.js";
11
+ import "./Label-DXpBz2AN.js";
12
+ import { t as Input } from "./Input-BcDV2JOa.js";
13
+ import { t as TextArea } from "./TextArea-DY9c18r6.js";
14
14
 
15
15
  export { Button, CheckItem, Checkbox, IconButton, InfoSummary, Input, TabSwitch, TextArea, ThemeProvider, Typography, useTheme };
@@ -1,6 +1,6 @@
1
1
  import React, { ReactNode } from "react";
2
2
 
3
- //#region src/components/toolkit/InfoSummary/types.d.ts
3
+ //#region src/components/commons/toolkit/InfoSummary/types.d.ts
4
4
  interface InfoSummaryProps {
5
5
  /**
6
6
  * Indicates whether the component is in a loading state.
@@ -55,7 +55,7 @@ interface InfoSummaryItem {
55
55
  caption?: string;
56
56
  }
57
57
  //#endregion
58
- //#region src/components/toolkit/InfoSummary/index.d.ts
58
+ //#region src/components/commons/toolkit/InfoSummary/index.d.ts
59
59
  declare const InfoSummary: React.FC<InfoSummaryProps>;
60
60
  //#endregion
61
61
  export { InfoSummary, InfoSummaryItem, InfoSummaryProps };
@@ -1,5 +1,5 @@
1
1
  import "./useThemedStyles-3rUXJYgS.js";
2
- import "./Typography-BE-vQSfx.js";
3
- import { t as InfoSummary } from "./InfoSummary-Bsczs0X6.js";
2
+ import "./Typography-XA7uwbWe.js";
3
+ import { t as InfoSummary } from "./InfoSummary-Cft-E1GO.js";
4
4
 
5
5
  export { InfoSummary };
package/dist/input.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import "./types-CDUx-y9q.js";
2
- import { t as Input } from "./index-pnnP9M22.js";
1
+ import "./types-ESf1Pmhi.js";
2
+ import { t as Input } from "./index-De1q2lSW.js";
3
3
  export { Input };
package/dist/input.js CHANGED
@@ -1,7 +1,7 @@
1
- import "./Icon-Cv0qztmq.js";
1
+ import "./Icon-D40nGMJM.js";
2
2
  import "./useThemedStyles-3rUXJYgS.js";
3
- import "./Typography-BE-vQSfx.js";
4
- import "./Label-QQpNWSeV.js";
5
- import { t as Input } from "./Input-BvbMEjwE.js";
3
+ import "./Typography-XA7uwbWe.js";
4
+ import "./Label-DXpBz2AN.js";
5
+ import { t as Input } from "./Input-BcDV2JOa.js";
6
6
 
7
7
  export { Input };
@@ -1,2 +1,2 @@
1
- import { n as SwitchOption, r as TabSwitchProps, t as TabSwitch } from "./index-DUrGjyKy.js";
1
+ import { n as SwitchOption, r as TabSwitchProps, t as TabSwitch } from "./index-DZqSyBAN.js";
2
2
  export { SwitchOption, TabSwitch, TabSwitchProps };
@@ -1,5 +1,5 @@
1
1
  import "./useThemedStyles-3rUXJYgS.js";
2
- import "./Typography-BE-vQSfx.js";
3
- import { t as TabSwitch } from "./TabSwitch-De30bFX2.js";
2
+ import "./Typography-XA7uwbWe.js";
3
+ import { t as TabSwitch } from "./TabSwitch-D6WJc7Bf.js";
4
4
 
5
5
  export { TabSwitch };
@@ -1,3 +1,3 @@
1
- import "./types-CDUx-y9q.js";
2
- import { t as TextArea } from "./index-BspBF3Mv.js";
1
+ import "./types-ESf1Pmhi.js";
2
+ import { t as TextArea } from "./index-vtqd-Akd.js";
3
3
  export { TextArea };
package/dist/text-area.js CHANGED
@@ -1,7 +1,7 @@
1
- import "./Icon-Cv0qztmq.js";
1
+ import "./Icon-D40nGMJM.js";
2
2
  import "./useThemedStyles-3rUXJYgS.js";
3
- import "./Typography-BE-vQSfx.js";
4
- import "./Label-QQpNWSeV.js";
5
- import { t as TextArea } from "./TextArea-CpIx36BV.js";
3
+ import "./Typography-XA7uwbWe.js";
4
+ import "./Label-DXpBz2AN.js";
5
+ import { t as TextArea } from "./TextArea-DY9c18r6.js";
6
6
 
7
7
  export { TextArea };
@@ -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-CIxyqe-m.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-Cg3ejKX9.js";
2
2
  export { ThemeContextData, ThemeMode, ThemeName, ThemePersistence, ThemeProvider, ThemeProviderProps, ThemeRegistry, ThemeTokens, useTheme };
@@ -1,5 +1,5 @@
1
1
  'use client';
2
2
 
3
- import { n as useTheme, t as ThemeProvider } from "./ThemeContext-Dro_peJg.js";
3
+ import { n as useTheme, t as ThemeProvider } from "./ThemeContext-0pOYSNvl.js";
4
4
 
5
5
  export { ThemeProvider, useTheme };
@@ -2,7 +2,7 @@ import { a as TextProps, r as MarginProps } from "./styleProps-D405c8KF.js";
2
2
  import { r as TypeStyles, t as SlotStyle } from "./useThemedStyles-B7irjShy.js";
3
3
  import { ElementType, ReactNode } from "react";
4
4
 
5
- //#region src/components/toolkit/Typography/style.d.ts
5
+ //#region src/components/commons/toolkit/Typography/style.d.ts
6
6
  declare function createTypographyStyles(props: TypographyProps): {
7
7
  base: {
8
8
  display: "flex";
@@ -22,7 +22,7 @@ declare function createTypographyStyles(props: TypographyProps): {
22
22
  text: SlotStyle;
23
23
  };
24
24
  //#endregion
25
- //#region src/components/toolkit/Typography/types.d.ts
25
+ //#region src/components/commons/toolkit/Typography/types.d.ts
26
26
  interface TypographyProps extends TextProps, MarginProps {
27
27
  variant: TypographyVariant;
28
28
  id?: string;
@@ -40,4 +40,4 @@ type TextAlign = 'left' | 'center' | 'right' | 'justify';
40
40
  type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'b1' | 'b2' | 'b3' | 'caption' | 'legal';
41
41
  //#endregion
42
42
  export { TypographyVariant as n, TypographyProps as t };
43
- //# sourceMappingURL=types-CDUx-y9q.d.ts.map
43
+ //# sourceMappingURL=types-ESf1Pmhi.d.ts.map
@@ -1,7 +1,7 @@
1
- import { t as TypographyProps } from "./types-CDUx-y9q.js";
1
+ import { t as TypographyProps } from "./types-ESf1Pmhi.js";
2
2
  import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
- //#region src/components/toolkit/Typography/index.d.ts
4
+ //#region src/components/commons/toolkit/Typography/index.d.ts
5
5
  declare function Typography(props: TypographyProps): react_jsx_runtime0.JSX.Element;
6
6
  //#endregion
7
7
  export { Typography };
@@ -1,4 +1,4 @@
1
1
  import "./useThemedStyles-3rUXJYgS.js";
2
- import { t as Typography } from "./Typography-BE-vQSfx.js";
2
+ import { t as Typography } from "./Typography-XA7uwbWe.js";
3
3
 
4
4
  export { Typography };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "softable-pixels-web",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "softable",
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button-BiSdxI2A.js","names":["getBorder","createButtonLoaderStyles","getBorder","Loader: React.FC<LoaderProps>","createButtonLoaderStyles","ButtonLoader: React.FC<Props>","Button: React.FC<ButtonProps>"],"sources":["../src/utils/animations/spiner.ts","../src/components/toolkit/Loader/constants.ts","../src/components/toolkit/Loader/utils.ts","../src/components/toolkit/Loader/styles.ts","../src/components/toolkit/Loader/index.tsx","../src/components/commons/buttons/Button/components/ButtonLoader/styles.ts","../src/components/commons/buttons/Button/components/ButtonLoader/index.tsx","../src/components/commons/buttons/Button/styles.ts","../src/components/commons/buttons/Button/index.tsx"],"sourcesContent":["export const SPINNER_ANIMATION = {\n animate: { rotate: 360 },\n transition: {\n repeat: Infinity,\n duration: 1,\n ease: 'linear'\n }\n}\n","const DEFAULT_SIZE = '20px'\nconst DEFAULT_THICKNESS = '2px'\n\nconst DEFAULT_COLOR = 'white'\nconst DEFAULT_EMPTY_COLOR = 'transparent'\n\nexport { DEFAULT_SIZE, DEFAULT_THICKNESS, DEFAULT_COLOR, DEFAULT_EMPTY_COLOR }\n","// Utils\nimport { DEFAULT_THICKNESS, DEFAULT_EMPTY_COLOR } from './constants'\n\n// Types\nimport type { LoaderProps } from './types'\n\nexport function getBorder(props: LoaderProps) {\n const thickness = props.thickness || DEFAULT_THICKNESS\n const emptyColor = props.emptyColor || DEFAULT_EMPTY_COLOR\n\n return `${thickness} solid ${emptyColor}`\n}\n","// Types\nimport { styled, type StyleMap } from '@hooks/useThemedStyles/types'\nimport type { LoaderProps } from './types'\nimport { getBorder } from './utils'\nimport { DEFAULT_COLOR, DEFAULT_SIZE } from './constants'\n\nexport function createButtonLoaderStyles(props: LoaderProps): StyleMap {\n return styled({\n container: {\n display: ' inline-block',\n\n width: props.size || DEFAULT_SIZE,\n height: props.size || DEFAULT_SIZE,\n\n borderRadius: '50%',\n border: getBorder(props),\n borderLeftColor: props.color || DEFAULT_COLOR\n }\n })\n}\n","// External Libraries\nimport type React from 'react'\nimport { motion } from 'framer-motion'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Utils\nimport { SPINNER_ANIMATION } from '@utils/animations'\n\n// Types\nimport type { LoaderProps } from './types'\n\n// Styles\nimport { createButtonLoaderStyles } from './styles'\n\nexport const Loader: React.FC<LoaderProps> = props => {\n // Hooks\n const { styles } = useThemedStyles(props, createButtonLoaderStyles, {})\n\n return (\n <motion.div\n role=\"status\"\n aria-label=\"Loading\"\n style={styles.container}\n {...SPINNER_ANIMATION}\n />\n )\n}\n","// Types\nimport { styled, type StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createButtonLoaderStyles(): StyleMap {\n return styled({\n container: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n\n borderRadius: 'var(--px-border-radius-button)'\n }\n })\n}\n","// External Libraries\nimport type React from 'react'\nimport { motion } from 'framer-motion'\n\n// Components\nimport { Loader } from '@components/toolkit/Loader'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Styles\nimport { createButtonLoaderStyles } from './styles'\n\ntype Props = {\n color: string\n}\n\nexport const ButtonLoader: React.FC<Props> = ({ color }) => {\n // Hooks\n const { styles } = useThemedStyles({}, createButtonLoaderStyles, {})\n\n return (\n <motion.div\n style={styles.container}\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n >\n <Loader color={color} />\n </motion.div>\n )\n}\n","// Types\nimport { styled } from '@hooks/useThemedStyles/types'\nimport type { ButtonProps, ButtonSize, ButtonVariant } from './types'\nimport type { CSSProperties } from 'react'\n\nexport function createButtonStyles({\n size,\n color,\n variant,\n disabled,\n fullWidth,\n textAlign,\n outlineColor\n}: ButtonProps): ReturnType<typeof styled> {\n const finalVariant = variant ?? 'filled'\n\n return styled({\n container: {\n ...getSize(size || 'md'),\n\n width: fullWidth ? '100%' : 'fit-content',\n\n position: 'relative',\n display: 'flex',\n justifyContent: textAlign || 'center',\n\n padding: '10px var(--px-space-xl)',\n gap: 'var(--px-space-sm)',\n\n borderRadius: 'var(--px-radius-md)',\n\n cursor: 'pointer',\n\n transition: 'background-color 0.5s',\n\n border: getBorder(finalVariant, outlineColor || color),\n backgroundColor: getBackgroundColor(finalVariant, color),\n\n boxShadow:\n variant === 'outlined'\n ? `0px -1px 0px #0A0D120D inset, 0px 1px 2px #0A0D120D`\n : 'none',\n\n __rules: {\n '&:hover': {\n opacity: '0.85 !important'\n },\n '&:disabled': {\n opacity: '0.5 !important',\n cursor: 'not-allowed !important'\n }\n }\n },\n\n content: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n\n padding: '0',\n borderRadius: 'inherit',\n\n whiteSpace: 'nowrap',\n columnGap: 'var(--px-space-sm)'\n }\n })\n}\n\nfunction getSize(size: ButtonSize | string): CSSProperties {\n switch (size) {\n case 'lg':\n return { minHeight: '3.25rem' }\n case 'md':\n return { minHeight: '2.75rem' }\n case 'sm':\n return { minHeight: '2.25rem' }\n case 'xs':\n return { minHeight: '1.75rem' }\n default:\n return { minHeight: size }\n }\n}\n\nfunction getBackgroundColor(variant: ButtonVariant, color?: string): string {\n if (color) return color\n\n if (variant === 'filled') return 'var(--px-btn-filled-bg)'\n\n if (variant === 'outlined') return 'transparent'\n\n if (variant === 'ghost') return 'transparent'\n\n return 'var(--px-btn-filled-bg)'\n}\n\nfunction getBorder(variant: ButtonVariant, color?: string): string {\n if (color) return `1px solid ${color}`\n\n if (variant === 'filled') return '1px solid var(--px-btn-filled-bg)'\n\n if (variant === 'outlined') return '1px solid var(--px-border-primary)'\n\n if (variant === 'ghost') return 'none'\n\n return '1px solid var(--px-color-primary)'\n}\n\nexport function getTextColor({ variant, labelColor }: ButtonProps) {\n if (labelColor) return labelColor\n\n if (variant === 'filled') return 'var(--px-btn-filled-label)'\n\n if (variant === 'outlined') return 'var(--px-btn-outlined-label)'\n\n if (variant === 'ghost') return '--px-btn-ghost-label'\n\n return 'var(--px-btn-filled-label)'\n}\n","// External Libraries\nimport type React from 'react'\nimport type { MouseEvent } from 'react'\nimport { AnimatePresence } from 'framer-motion'\n\n// Components\nimport { Typography } from '@components/toolkit/Typography'\nimport { ButtonLoader } from './components/ButtonLoader'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { ButtonProps } from './types'\n\n// Styles\nimport { createButtonStyles, getTextColor } from './styles'\n\nexport const Button: React.FC<ButtonProps> = ({\n type = 'button',\n variant = 'filled',\n ...rest\n}) => {\n // Constants\n const disabled = rest.disabled || rest.loading\n const resolvedProps = { type, variant, disabled, ...rest }\n const textColor = getTextColor(resolvedProps)\n const { label, endIcon, startIcon, loading } = resolvedProps\n\n // Hooks\n const { styles, classes } = useThemedStyles(\n resolvedProps,\n createButtonStyles,\n {\n override: rest.styles,\n applyCommonProps: true,\n commonSlot: 'container',\n pick: p => [p.disabled, p.loading, p.label, p.color]\n }\n )\n\n // Functions\n function handleButtonClick(event: MouseEvent<HTMLButtonElement>) {\n if (disabled) return\n\n if (rest.onClick) rest.onClick(event)\n }\n\n return (\n <button\n type={type}\n disabled={disabled}\n aria-busy={rest.loading}\n style={styles.container}\n className={classes.container}\n onClick={handleButtonClick}\n >\n <div style={styles.content}>\n {startIcon ?? null}\n\n <Typography variant={rest.labelVariant || 'b1'} color={textColor}>\n {label}\n </Typography>\n\n {endIcon ?? null}\n\n {loading ? (\n <AnimatePresence>\n <ButtonLoader color={textColor} />\n </AnimatePresence>\n ) : null}\n </div>\n </button>\n )\n}\n"],"mappings":";;;;;;AAAA,MAAa,oBAAoB;CAC/B,SAAS,EAAE,QAAQ,KAAK;CACxB,YAAY;EACV,QAAQ;EACR,UAAU;EACV,MAAM;EACP;CACF;;;;ACPD,MAAM,eAAe;AACrB,MAAM,oBAAoB;AAE1B,MAAM,gBAAgB;AACtB,MAAM,sBAAsB;;;;ACE5B,SAAgBA,YAAU,OAAoB;AAI5C,QAAO,GAHW,MAAM,aAAa,kBAGjB,SAFD,MAAM,cAAc;;;;;ACFzC,SAAgBC,2BAAyB,OAA8B;AACrE,QAAO,OAAO,EACZ,WAAW;EACT,SAAS;EAET,OAAO,MAAM,QAAQ;EACrB,QAAQ,MAAM,QAAQ;EAEtB,cAAc;EACd,QAAQC,YAAU,MAAM;EACxB,iBAAiB,MAAM,SAAS;EACjC,EACF,CAAC;;;;;ACFJ,MAAaC,UAAgC,UAAS;CAEpD,MAAM,EAAE,WAAW,gBAAgB,OAAOC,4BAA0B,EAAE,CAAC;AAEvE,QACE,oBAAC,OAAO;EACN,MAAK;EACL,cAAW;EACX,OAAO,OAAO;EACd,GAAI;GACJ;;;;;ACvBN,SAAgB,2BAAqC;AACnD,QAAO,OAAO,EACZ,WAAW;EACT,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,oBAAC,gBAAa,OAAO,YAAa,GAClB,GAChB;;IACA;GACC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"CheckItem-DsIiS-2X.js","names":["CheckItem: React.FC<CheckItemProps>"],"sources":["../src/components/toolkit/CheckItem/styles.ts","../src/components/toolkit/CheckItem/index.tsx"],"sourcesContent":["// Types\nimport type { CheckItemProps } from './types'\nimport { styled, type StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createCheckItemStyles({ checked }: CheckItemProps): StyleMap {\n return styled({\n container: {\n display: 'flex',\n flexDirection: 'row',\n columnGap: 'var(--px-space-sm)'\n },\n\n iconContainer: {\n width: '20px',\n height: '20px',\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n\n backgroundColor: checked\n ? 'var(--px-color-success)'\n : 'var(--px-color-disabled)',\n\n borderRadius: '50%'\n }\n })\n}\n","// External Libraries\nimport type React from 'react'\n\n// Components\nimport { Icon } from '../Icon'\nimport { Typography } from '../Typography'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { CheckItemProps } from './types'\n\n// Styles\nimport { createCheckItemStyles } from './styles'\n\nexport const CheckItem: React.FC<CheckItemProps> = props => {\n // Hooks\n const { styles } = useThemedStyles(props, createCheckItemStyles)\n\n return (\n <div style={styles.container}>\n <div style={styles.iconContainer}>\n <Icon name=\"general-check\" color=\"white\" size=\"sm\" />\n </div>\n\n <Typography variant=\"b2\">{props.label}</Typography>\n </div>\n )\n}\n"],"mappings":";;;;;;AAIA,SAAgB,sBAAsB,EAAE,WAAqC;AAC3E,QAAO,OAAO;EACZ,WAAW;GACT,SAAS;GACT,eAAe;GACf,WAAW;GACZ;EAED,eAAe;GACb,OAAO;GACP,QAAQ;GAER,SAAS;GACT,YAAY;GACZ,gBAAgB;GAEhB,iBAAiB,UACb,4BACA;GAEJ,cAAc;GACf;EACF,CAAC;;;;;ACVJ,MAAaA,aAAsC,UAAS;CAE1D,MAAM,EAAE,WAAW,gBAAgB,OAAO,sBAAsB;AAEhE,QACE,qBAAC;EAAI,OAAO,OAAO;aACjB,oBAAC;GAAI,OAAO,OAAO;aACjB,oBAAC;IAAK,MAAK;IAAgB,OAAM;IAAQ,MAAK;KAAO;IACjD,EAEN,oBAAC;GAAW,SAAQ;aAAM,MAAM;IAAmB;GAC/C"}