@kushagradhawan/kookie-ui 0.1.55 → 0.1.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/theme.props.tsx"],
4
- "sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColors, grayColors } from '../props/color.prop.js';\nimport { radii } from '../props/radius.prop.js';\n\nimport type { GetPropDefTypes, PropDef } from '../props/prop-def.js';\n\nconst appearances = ['inherit', 'light', 'dark'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\nconst materials = ['solid', 'translucent'] as const;\nconst scalings = ['90%', '95%', '100%', '105%', '110%'] as const;\nconst fontFamilies = ['sans', 'mono'] as const;\n\nconst themePropDefs = {\n ...asChildPropDef,\n /**\n * Whether to apply background color to the Theme element.\n *\n * Defaults to true for the root Theme and for Theme elements that\n * have an explicit light or dark appearance prop.\n */\n hasBackground: { type: 'boolean', default: true },\n /**\n * Sets the color scheme of the theme, typcially referred to as light and dark mode.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/dark-mode\n */\n appearance: { type: 'enum', values: appearances, default: 'inherit' },\n /**\n * Selects one of the accent color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n accentColor: { type: 'enum', values: accentColors, default: 'blue' },\n /**\n * Selects one of the gray color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n grayColor: { type: 'enum', values: grayColors, default: 'slate' },\n /**\n * Controls whether to use a solid or translucent background color on panelled\n * elements such as Card or Table is solid or translucent.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n material: { type: 'enum', values: materials, default: 'translucent' },\n /**\n * Controls whether to use a solid or translucent background color on panelled\n * elements such as Card or Table is solid or translucent.\n *\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: 'translucent' },\n /**\n * Sets the default radius of the components.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n radius: { type: 'enum', values: radii, default: 'medium' },\n /**\n * Sets a scaling multiplier for values like spacing, font sizes, line heights, etc. are scaled.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/layout\n */\n scaling: { type: 'enum', values: scalings, default: '100%' },\n /**\n * Sets the font family for the theme.\n *\n * @default 'sans'\n */\n fontFamily: { type: 'enum', values: fontFamilies, default: 'sans' },\n} satisfies {\n hasBackground: PropDef<boolean>;\n appearance: PropDef<(typeof appearances)[number]>;\n accentColor: PropDef<(typeof accentColors)[number]>;\n grayColor: PropDef<(typeof grayColors)[number]>;\n material: PropDef<(typeof materials)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number]>;\n radius: PropDef<(typeof radii)[number]>;\n scaling: PropDef<(typeof scalings)[number]>;\n fontFamily: PropDef<(typeof fontFamilies)[number]>;\n};\n\ntype ThemeOwnProps = GetPropDefTypes<typeof themePropDefs & typeof asChildPropDef>;\n\nexport { themePropDefs };\nexport type { ThemeOwnProps };\n"],
5
- "mappings": "AAAA,OAAS,kBAAAA,MAAsB,4BAC/B,OAAS,gBAAAC,EAAc,cAAAC,MAAkB,yBACzC,OAAS,SAAAC,MAAa,0BAItB,MAAMC,EAAc,CAAC,UAAW,QAAS,MAAM,EACzCC,EAAmB,CAAC,QAAS,aAAa,EAC1CC,EAAY,CAAC,QAAS,aAAa,EACnCC,EAAW,CAAC,MAAO,MAAO,OAAQ,OAAQ,MAAM,EAChDC,EAAe,CAAC,OAAQ,MAAM,EAE9BC,EAAgB,CACpB,GAAGT,EAOH,cAAe,CAAE,KAAM,UAAW,QAAS,EAAK,EAOhD,WAAY,CAAE,KAAM,OAAQ,OAAQI,EAAa,QAAS,SAAU,EAOpE,YAAa,CAAE,KAAM,OAAQ,OAAQH,EAAc,QAAS,MAAO,EAOnE,UAAW,CAAE,KAAM,OAAQ,OAAQC,EAAY,QAAS,OAAQ,EAQhE,SAAU,CAAE,KAAM,OAAQ,OAAQI,EAAW,QAAS,aAAc,EAUpE,gBAAiB,CAAE,KAAM,OAAQ,OAAQD,EAAkB,QAAS,aAAc,EAOlF,OAAQ,CAAE,KAAM,OAAQ,OAAQF,EAAO,QAAS,QAAS,EAOzD,QAAS,CAAE,KAAM,OAAQ,OAAQI,EAAU,QAAS,MAAO,EAM3D,WAAY,CAAE,KAAM,OAAQ,OAAQC,EAAc,QAAS,MAAO,CACpE",
4
+ "sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColors, grayColors } from '../props/color.prop.js';\nimport { radii } from '../props/radius.prop.js';\n\nimport type { GetPropDefTypes, PropDef } from '../props/prop-def.js';\n\nconst appearances = ['inherit', 'light', 'dark'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\nconst materials = ['solid', 'translucent'] as const;\nconst scalings = ['90%', '95%', '100%', '105%', '110%'] as const;\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst themePropDefs = {\n ...asChildPropDef,\n /**\n * Whether to apply background color to the Theme element.\n *\n * Defaults to true for the root Theme and for Theme elements that\n * have an explicit light or dark appearance prop.\n */\n hasBackground: { type: 'boolean', default: true },\n /**\n * Sets the color scheme of the theme, typcially referred to as light and dark mode.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/dark-mode\n */\n appearance: { type: 'enum', values: appearances, default: 'inherit' },\n /**\n * Selects one of the accent color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n accentColor: { type: 'enum', values: accentColors, default: 'blue' },\n /**\n * Selects one of the gray color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n grayColor: { type: 'enum', values: grayColors, default: 'slate' },\n /**\n * Controls whether to use a solid or translucent background color on panelled\n * elements such as Card or Table is solid or translucent.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n material: { type: 'enum', values: materials, default: 'translucent' },\n /**\n * Controls whether to use a solid or translucent background color on panelled\n * elements such as Card or Table is solid or translucent.\n *\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: 'translucent' },\n /**\n * Sets the default radius of the components.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n radius: { type: 'enum', values: radii, default: 'medium' },\n /**\n * Sets a scaling multiplier for values like spacing, font sizes, line heights, etc. are scaled.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/layout\n */\n scaling: { type: 'enum', values: scalings, default: '100%' },\n /**\n * Sets the font family for the theme.\n *\n * @default 'sans'\n */\n fontFamily: { type: 'enum', values: fontFamilies, default: 'sans' },\n} satisfies {\n hasBackground: PropDef<boolean>;\n appearance: PropDef<(typeof appearances)[number]>;\n accentColor: PropDef<(typeof accentColors)[number]>;\n grayColor: PropDef<(typeof grayColors)[number]>;\n material: PropDef<(typeof materials)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number]>;\n radius: PropDef<(typeof radii)[number]>;\n scaling: PropDef<(typeof scalings)[number]>;\n fontFamily: PropDef<(typeof fontFamilies)[number]>;\n};\n\ntype ThemeOwnProps = GetPropDefTypes<typeof themePropDefs & typeof asChildPropDef>;\n\nexport { themePropDefs };\nexport type { ThemeOwnProps };\n"],
5
+ "mappings": "AAAA,OAAS,kBAAAA,MAAsB,4BAC/B,OAAS,gBAAAC,EAAc,cAAAC,MAAkB,yBACzC,OAAS,SAAAC,MAAa,0BAItB,MAAMC,EAAc,CAAC,UAAW,QAAS,MAAM,EACzCC,EAAmB,CAAC,QAAS,aAAa,EAC1CC,EAAY,CAAC,QAAS,aAAa,EACnCC,EAAW,CAAC,MAAO,MAAO,OAAQ,OAAQ,MAAM,EAChDC,EAAe,CAAC,OAAQ,OAAQ,OAAO,EAEvCC,EAAgB,CACpB,GAAGT,EAOH,cAAe,CAAE,KAAM,UAAW,QAAS,EAAK,EAOhD,WAAY,CAAE,KAAM,OAAQ,OAAQI,EAAa,QAAS,SAAU,EAOpE,YAAa,CAAE,KAAM,OAAQ,OAAQH,EAAc,QAAS,MAAO,EAOnE,UAAW,CAAE,KAAM,OAAQ,OAAQC,EAAY,QAAS,OAAQ,EAQhE,SAAU,CAAE,KAAM,OAAQ,OAAQI,EAAW,QAAS,aAAc,EAUpE,gBAAiB,CAAE,KAAM,OAAQ,OAAQD,EAAkB,QAAS,aAAc,EAOlF,OAAQ,CAAE,KAAM,OAAQ,OAAQF,EAAO,QAAS,QAAS,EAOzD,QAAS,CAAE,KAAM,OAAQ,OAAQI,EAAU,QAAS,MAAO,EAM3D,WAAY,CAAE,KAAM,OAAQ,OAAQC,EAAc,QAAS,MAAO,CACpE",
6
6
  "names": ["asChildPropDef", "accentColors", "grayColors", "radii", "appearances", "panelBackgrounds", "materials", "scalings", "fontFamilies", "themePropDefs"]
7
7
  }
@@ -12,10 +12,14 @@ export interface FontConfig {
12
12
  sans?: string;
13
13
  /** Monospace font stack for fontFamily="mono" */
14
14
  mono?: string;
15
+ /** Serif font stack for fontFamily="serif" */
16
+ serif?: string;
15
17
  /** Base Inter font replacement */
16
18
  inter?: string;
17
19
  /** Base JetBrains Mono font replacement */
18
20
  jetbrainsMono?: string;
21
+ /** Base Playfair Display font replacement */
22
+ playfairDisplay?: string;
19
23
  }
20
24
  /**
21
25
  * CSS variable names used by Kookie UI for fonts
@@ -23,8 +27,10 @@ export interface FontConfig {
23
27
  export declare const FONT_CSS_VARIABLES: {
24
28
  readonly sans: "--font-sans";
25
29
  readonly mono: "--font-mono";
30
+ readonly serif: "--font-serif";
26
31
  readonly inter: "--font-inter";
27
32
  readonly jetbrainsMono: "--font-jetbrains-mono";
33
+ readonly playfairDisplay: "--font-playfair-display";
28
34
  readonly defaultFamily: "--default-font-family";
29
35
  readonly headingFamily: "--heading-font-family";
30
36
  readonly strongFamily: "--strong-font-family";
@@ -42,6 +48,10 @@ export declare const FONT_STACKS: {
42
48
  readonly firaCode: "'Fira Code', 'JetBrains Mono', 'Consolas', 'Liberation Mono', monospace";
43
49
  readonly sourceCodePro: "'Source Code Pro', 'JetBrains Mono', 'Consolas', monospace";
44
50
  readonly systemMono: "'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', 'Courier New', monospace";
51
+ readonly playfair: "'Playfair Display', 'Times New Roman', 'Times', 'Georgia', 'Cambria', serif";
52
+ readonly times: "'Times New Roman', 'Times', 'Georgia', 'Cambria', serif";
53
+ readonly georgia: "'Georgia', 'Times New Roman', 'Times', serif";
54
+ readonly lora: "'Lora', 'Times New Roman', 'Times', serif";
45
55
  };
46
56
  /**
47
57
  * Apply font configuration to CSS variables
@@ -1 +1 @@
1
- {"version":3,"file":"font-config.d.ts","sourceRoot":"","sources":["../../../src/helpers/font-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,kDAAkD;IAClD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;CASrB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;CAad,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,UAAU,EAClB,MAAM,GAAE,WAAsC,GAC7C,IAAI,CAkBN;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAsB1D;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,MAAM,GAAE,WAAsC,GAAG,IAAI,CAQ/E;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,GAAE,WAAsC,GAAG,UAAU,CAU/F"}
1
+ {"version":3,"file":"font-config.d.ts","sourceRoot":"","sources":["../../../src/helpers/font-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,kDAAkD;IAClD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,6CAA6C;IAC7C,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;CAWrB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;CAkBd,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,GAAE,WAAsC,GAAG,IAAI,CA0BxG;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CA8B1D;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,MAAM,GAAE,WAAsC,GAAG,IAAI,CAU/E;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,GAAE,WAAsC,GAAG,UAAU,CAW/F"}
@@ -1,3 +1,3 @@
1
- const n={sans:"--font-sans",mono:"--font-mono",inter:"--font-inter",jetbrainsMono:"--font-jetbrains-mono",defaultFamily:"--default-font-family",headingFamily:"--heading-font-family",strongFamily:"--strong-font-family",codeFamily:"--code-font-family"},s={inter:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",system:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",poppins:"'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif",openSans:"'Open Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif",jetbrainsMono:"'JetBrains Mono', 'Fira Code', 'Consolas', 'Liberation Mono', monospace",firaCode:"'Fira Code', 'JetBrains Mono', 'Consolas', 'Liberation Mono', monospace",sourceCodePro:"'Source Code Pro', 'JetBrains Mono', 'Consolas', monospace",systemMono:"'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', 'Courier New', monospace"};function r(o,e=document.documentElement){const t=e.style;o.sans&&t.setProperty(n.sans,o.sans),o.mono&&t.setProperty(n.mono,o.mono),o.inter&&t.setProperty(n.inter,o.inter),o.jetbrainsMono&&t.setProperty(n.jetbrainsMono,o.jetbrainsMono)}function i(o){const e=[":root {"];return o.sans&&e.push(` ${n.sans}: ${o.sans};`),o.mono&&e.push(` ${n.mono}: ${o.mono};`),o.inter&&e.push(` ${n.inter}: ${o.inter};`),o.jetbrainsMono&&e.push(` ${n.jetbrainsMono}: ${o.jetbrainsMono};`),e.push("}"),e.join(`
2
- `)}function a(o=document.documentElement){const e=o.style;e.removeProperty(n.sans),e.removeProperty(n.mono),e.removeProperty(n.inter),e.removeProperty(n.jetbrainsMono)}function m(o=document.documentElement){const e=getComputedStyle(o);return{sans:e.getPropertyValue(n.sans).trim()||void 0,mono:e.getPropertyValue(n.mono).trim()||void 0,inter:e.getPropertyValue(n.inter).trim()||void 0,jetbrainsMono:e.getPropertyValue(n.jetbrainsMono).trim()||void 0}}export{n as FONT_CSS_VARIABLES,s as FONT_STACKS,r as applyFontConfig,i as generateFontCSS,m as getCurrentFontConfig,a as resetFonts};
1
+ const n={sans:"--font-sans",mono:"--font-mono",serif:"--font-serif",inter:"--font-inter",jetbrainsMono:"--font-jetbrains-mono",playfairDisplay:"--font-playfair-display",defaultFamily:"--default-font-family",headingFamily:"--heading-font-family",strongFamily:"--strong-font-family",codeFamily:"--code-font-family"},r={inter:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",system:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",poppins:"'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif",openSans:"'Open Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif",jetbrainsMono:"'JetBrains Mono', 'Fira Code', 'Consolas', 'Liberation Mono', monospace",firaCode:"'Fira Code', 'JetBrains Mono', 'Consolas', 'Liberation Mono', monospace",sourceCodePro:"'Source Code Pro', 'JetBrains Mono', 'Consolas', monospace",systemMono:"'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', 'Courier New', monospace",playfair:"'Playfair Display', 'Times New Roman', 'Times', 'Georgia', 'Cambria', serif",times:"'Times New Roman', 'Times', 'Georgia', 'Cambria', serif",georgia:"'Georgia', 'Times New Roman', 'Times', serif",lora:"'Lora', 'Times New Roman', 'Times', serif"};function s(e,o=document.documentElement){const t=o.style;e.sans&&t.setProperty(n.sans,e.sans),e.mono&&t.setProperty(n.mono,e.mono),e.serif&&t.setProperty(n.serif,e.serif),e.inter&&t.setProperty(n.inter,e.inter),e.jetbrainsMono&&t.setProperty(n.jetbrainsMono,e.jetbrainsMono),e.playfairDisplay&&t.setProperty(n.playfairDisplay,e.playfairDisplay)}function i(e){const o=[":root {"];return e.sans&&o.push(` ${n.sans}: ${e.sans};`),e.mono&&o.push(` ${n.mono}: ${e.mono};`),e.serif&&o.push(` ${n.serif}: ${e.serif};`),e.inter&&o.push(` ${n.inter}: ${e.inter};`),e.jetbrainsMono&&o.push(` ${n.jetbrainsMono}: ${e.jetbrainsMono};`),e.playfairDisplay&&o.push(` ${n.playfairDisplay}: ${e.playfairDisplay};`),o.push("}"),o.join(`
2
+ `)}function a(e=document.documentElement){const o=e.style;o.removeProperty(n.sans),o.removeProperty(n.mono),o.removeProperty(n.serif),o.removeProperty(n.inter),o.removeProperty(n.jetbrainsMono),o.removeProperty(n.playfairDisplay)}function p(e=document.documentElement){const o=getComputedStyle(e);return{sans:o.getPropertyValue(n.sans).trim()||void 0,mono:o.getPropertyValue(n.mono).trim()||void 0,serif:o.getPropertyValue(n.serif).trim()||void 0,inter:o.getPropertyValue(n.inter).trim()||void 0,jetbrainsMono:o.getPropertyValue(n.jetbrainsMono).trim()||void 0,playfairDisplay:o.getPropertyValue(n.playfairDisplay).trim()||void 0}}export{n as FONT_CSS_VARIABLES,r as FONT_STACKS,s as applyFontConfig,i as generateFontCSS,p as getCurrentFontConfig,a as resetFonts};
3
3
  //# sourceMappingURL=font-config.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/helpers/font-config.ts"],
4
- "sourcesContent": ["/**\n * Font configuration utilities for Kookie UI\n *\n * These utilities help users configure custom fonts through CSS variables\n * and provide type-safe font configuration options.\n */\n\n/**\n * Font family configuration interface\n */\nexport interface FontConfig {\n /** Sans-serif font stack for fontFamily=\"sans\" */\n sans?: string;\n /** Monospace font stack for fontFamily=\"mono\" */\n mono?: string;\n /** Base Inter font replacement */\n inter?: string;\n /** Base JetBrains Mono font replacement */\n jetbrainsMono?: string;\n}\n\n/**\n * CSS variable names used by Kookie UI for fonts\n */\nexport const FONT_CSS_VARIABLES = {\n sans: '--font-sans',\n mono: '--font-mono',\n inter: '--font-inter',\n jetbrainsMono: '--font-jetbrains-mono',\n defaultFamily: '--default-font-family',\n headingFamily: '--heading-font-family',\n strongFamily: '--strong-font-family',\n codeFamily: '--code-font-family',\n} as const;\n\n/**\n * Popular font stacks for common use cases\n */\nexport const FONT_STACKS = {\n // Sans-serif options\n inter: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif\",\n system:\n \"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif\",\n poppins: \"'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif\",\n openSans: \"'Open Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif\",\n\n // Monospace options\n jetbrainsMono: \"'JetBrains Mono', 'Fira Code', 'Consolas', 'Liberation Mono', monospace\",\n firaCode: \"'Fira Code', 'JetBrains Mono', 'Consolas', 'Liberation Mono', monospace\",\n sourceCodePro: \"'Source Code Pro', 'JetBrains Mono', 'Consolas', monospace\",\n systemMono: \"'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', 'Courier New', monospace\",\n} as const;\n\n/**\n * Apply font configuration to CSS variables\n *\n * @param config Font configuration object\n * @param target Target element (defaults to document.documentElement)\n *\n * @example\n * ```ts\n * // Use Google Fonts\n * applyFontConfig({\n * sans: FONT_STACKS.poppins,\n * mono: FONT_STACKS.firaCode\n * });\n *\n * // Use system fonts only\n * applyFontConfig({\n * sans: FONT_STACKS.system,\n * mono: FONT_STACKS.systemMono\n * });\n * ```\n */\nexport function applyFontConfig(\n config: FontConfig,\n target: HTMLElement = document.documentElement,\n): void {\n const style = target.style;\n\n if (config.sans) {\n style.setProperty(FONT_CSS_VARIABLES.sans, config.sans);\n }\n\n if (config.mono) {\n style.setProperty(FONT_CSS_VARIABLES.mono, config.mono);\n }\n\n if (config.inter) {\n style.setProperty(FONT_CSS_VARIABLES.inter, config.inter);\n }\n\n if (config.jetbrainsMono) {\n style.setProperty(FONT_CSS_VARIABLES.jetbrainsMono, config.jetbrainsMono);\n }\n}\n\n/**\n * Generate CSS string for font configuration\n *\n * @param config Font configuration object\n * @returns CSS string that can be injected into a stylesheet\n *\n * @example\n * ```ts\n * const css = generateFontCSS({\n * sans: FONT_STACKS.poppins,\n * mono: FONT_STACKS.firaCode\n * });\n *\n * // Inject into document\n * const style = document.createElement('style');\n * style.textContent = css;\n * document.head.appendChild(style);\n * ```\n */\nexport function generateFontCSS(config: FontConfig): string {\n const rules: string[] = [':root {'];\n\n if (config.sans) {\n rules.push(` ${FONT_CSS_VARIABLES.sans}: ${config.sans};`);\n }\n\n if (config.mono) {\n rules.push(` ${FONT_CSS_VARIABLES.mono}: ${config.mono};`);\n }\n\n if (config.inter) {\n rules.push(` ${FONT_CSS_VARIABLES.inter}: ${config.inter};`);\n }\n\n if (config.jetbrainsMono) {\n rules.push(` ${FONT_CSS_VARIABLES.jetbrainsMono}: ${config.jetbrainsMono};`);\n }\n\n rules.push('}');\n\n return rules.join('\\n');\n}\n\n/**\n * Reset fonts to Kookie UI defaults\n */\nexport function resetFonts(target: HTMLElement = document.documentElement): void {\n const style = target.style;\n\n // Remove custom font variables to fall back to defaults\n style.removeProperty(FONT_CSS_VARIABLES.sans);\n style.removeProperty(FONT_CSS_VARIABLES.mono);\n style.removeProperty(FONT_CSS_VARIABLES.inter);\n style.removeProperty(FONT_CSS_VARIABLES.jetbrainsMono);\n}\n\n/**\n * Get current font configuration from CSS variables\n */\nexport function getCurrentFontConfig(target: HTMLElement = document.documentElement): FontConfig {\n const computedStyle = getComputedStyle(target);\n\n return {\n sans: computedStyle.getPropertyValue(FONT_CSS_VARIABLES.sans).trim() || undefined,\n mono: computedStyle.getPropertyValue(FONT_CSS_VARIABLES.mono).trim() || undefined,\n inter: computedStyle.getPropertyValue(FONT_CSS_VARIABLES.inter).trim() || undefined,\n jetbrainsMono:\n computedStyle.getPropertyValue(FONT_CSS_VARIABLES.jetbrainsMono).trim() || undefined,\n };\n}\n"],
5
- "mappings": "AAwBO,MAAMA,EAAqB,CAChC,KAAM,cACN,KAAM,cACN,MAAO,eACP,cAAe,wBACf,cAAe,wBACf,cAAe,wBACf,aAAc,uBACd,WAAY,oBACd,EAKaC,EAAc,CAEzB,MAAO,6EACP,OACE,6FACF,QAAS,oEACT,SAAU,sEAGV,cAAe,0EACf,SAAU,0EACV,cAAe,6DACf,WAAY,6EACd,EAuBO,SAASC,EACdC,EACAC,EAAsB,SAAS,gBACzB,CACN,MAAMC,EAAQD,EAAO,MAEjBD,EAAO,MACTE,EAAM,YAAYL,EAAmB,KAAMG,EAAO,IAAI,EAGpDA,EAAO,MACTE,EAAM,YAAYL,EAAmB,KAAMG,EAAO,IAAI,EAGpDA,EAAO,OACTE,EAAM,YAAYL,EAAmB,MAAOG,EAAO,KAAK,EAGtDA,EAAO,eACTE,EAAM,YAAYL,EAAmB,cAAeG,EAAO,aAAa,CAE5E,CAqBO,SAASG,EAAgBH,EAA4B,CAC1D,MAAMI,EAAkB,CAAC,SAAS,EAElC,OAAIJ,EAAO,MACTI,EAAM,KAAK,KAAKP,EAAmB,IAAI,KAAKG,EAAO,IAAI,GAAG,EAGxDA,EAAO,MACTI,EAAM,KAAK,KAAKP,EAAmB,IAAI,KAAKG,EAAO,IAAI,GAAG,EAGxDA,EAAO,OACTI,EAAM,KAAK,KAAKP,EAAmB,KAAK,KAAKG,EAAO,KAAK,GAAG,EAG1DA,EAAO,eACTI,EAAM,KAAK,KAAKP,EAAmB,aAAa,KAAKG,EAAO,aAAa,GAAG,EAG9EI,EAAM,KAAK,GAAG,EAEPA,EAAM,KAAK;AAAA,CAAI,CACxB,CAKO,SAASC,EAAWJ,EAAsB,SAAS,gBAAuB,CAC/E,MAAMC,EAAQD,EAAO,MAGrBC,EAAM,eAAeL,EAAmB,IAAI,EAC5CK,EAAM,eAAeL,EAAmB,IAAI,EAC5CK,EAAM,eAAeL,EAAmB,KAAK,EAC7CK,EAAM,eAAeL,EAAmB,aAAa,CACvD,CAKO,SAASS,EAAqBL,EAAsB,SAAS,gBAA6B,CAC/F,MAAMM,EAAgB,iBAAiBN,CAAM,EAE7C,MAAO,CACL,KAAMM,EAAc,iBAAiBV,EAAmB,IAAI,EAAE,KAAK,GAAK,OACxE,KAAMU,EAAc,iBAAiBV,EAAmB,IAAI,EAAE,KAAK,GAAK,OACxE,MAAOU,EAAc,iBAAiBV,EAAmB,KAAK,EAAE,KAAK,GAAK,OAC1E,cACEU,EAAc,iBAAiBV,EAAmB,aAAa,EAAE,KAAK,GAAK,MAC/E,CACF",
4
+ "sourcesContent": ["/**\n * Font configuration utilities for Kookie UI\n *\n * These utilities help users configure custom fonts through CSS variables\n * and provide type-safe font configuration options.\n */\n\n/**\n * Font family configuration interface\n */\nexport interface FontConfig {\n /** Sans-serif font stack for fontFamily=\"sans\" */\n sans?: string;\n /** Monospace font stack for fontFamily=\"mono\" */\n mono?: string;\n /** Serif font stack for fontFamily=\"serif\" */\n serif?: string;\n /** Base Inter font replacement */\n inter?: string;\n /** Base JetBrains Mono font replacement */\n jetbrainsMono?: string;\n /** Base Playfair Display font replacement */\n playfairDisplay?: string;\n}\n\n/**\n * CSS variable names used by Kookie UI for fonts\n */\nexport const FONT_CSS_VARIABLES = {\n sans: '--font-sans',\n mono: '--font-mono',\n serif: '--font-serif',\n inter: '--font-inter',\n jetbrainsMono: '--font-jetbrains-mono',\n playfairDisplay: '--font-playfair-display',\n defaultFamily: '--default-font-family',\n headingFamily: '--heading-font-family',\n strongFamily: '--strong-font-family',\n codeFamily: '--code-font-family',\n} as const;\n\n/**\n * Popular font stacks for common use cases\n */\nexport const FONT_STACKS = {\n // Sans-serif options\n inter: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif\",\n system: \"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif\",\n poppins: \"'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif\",\n openSans: \"'Open Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif\",\n\n // Monospace options\n jetbrainsMono: \"'JetBrains Mono', 'Fira Code', 'Consolas', 'Liberation Mono', monospace\",\n firaCode: \"'Fira Code', 'JetBrains Mono', 'Consolas', 'Liberation Mono', monospace\",\n sourceCodePro: \"'Source Code Pro', 'JetBrains Mono', 'Consolas', monospace\",\n systemMono: \"'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', 'Courier New', monospace\",\n\n // Serif options\n playfair: \"'Playfair Display', 'Times New Roman', 'Times', 'Georgia', 'Cambria', serif\",\n times: \"'Times New Roman', 'Times', 'Georgia', 'Cambria', serif\",\n georgia: \"'Georgia', 'Times New Roman', 'Times', serif\",\n lora: \"'Lora', 'Times New Roman', 'Times', serif\",\n} as const;\n\n/**\n * Apply font configuration to CSS variables\n *\n * @param config Font configuration object\n * @param target Target element (defaults to document.documentElement)\n *\n * @example\n * ```ts\n * // Use Google Fonts\n * applyFontConfig({\n * sans: FONT_STACKS.poppins,\n * mono: FONT_STACKS.firaCode\n * });\n *\n * // Use system fonts only\n * applyFontConfig({\n * sans: FONT_STACKS.system,\n * mono: FONT_STACKS.systemMono\n * });\n * ```\n */\nexport function applyFontConfig(config: FontConfig, target: HTMLElement = document.documentElement): void {\n const style = target.style;\n\n if (config.sans) {\n style.setProperty(FONT_CSS_VARIABLES.sans, config.sans);\n }\n\n if (config.mono) {\n style.setProperty(FONT_CSS_VARIABLES.mono, config.mono);\n }\n\n if (config.serif) {\n style.setProperty(FONT_CSS_VARIABLES.serif, config.serif);\n }\n\n if (config.inter) {\n style.setProperty(FONT_CSS_VARIABLES.inter, config.inter);\n }\n\n if (config.jetbrainsMono) {\n style.setProperty(FONT_CSS_VARIABLES.jetbrainsMono, config.jetbrainsMono);\n }\n\n if (config.playfairDisplay) {\n style.setProperty(FONT_CSS_VARIABLES.playfairDisplay, config.playfairDisplay);\n }\n}\n\n/**\n * Generate CSS string for font configuration\n *\n * @param config Font configuration object\n * @returns CSS string that can be injected into a stylesheet\n *\n * @example\n * ```ts\n * const css = generateFontCSS({\n * sans: FONT_STACKS.poppins,\n * mono: FONT_STACKS.firaCode\n * });\n *\n * // Inject into document\n * const style = document.createElement('style');\n * style.textContent = css;\n * document.head.appendChild(style);\n * ```\n */\nexport function generateFontCSS(config: FontConfig): string {\n const rules: string[] = [':root {'];\n\n if (config.sans) {\n rules.push(` ${FONT_CSS_VARIABLES.sans}: ${config.sans};`);\n }\n\n if (config.mono) {\n rules.push(` ${FONT_CSS_VARIABLES.mono}: ${config.mono};`);\n }\n\n if (config.serif) {\n rules.push(` ${FONT_CSS_VARIABLES.serif}: ${config.serif};`);\n }\n\n if (config.inter) {\n rules.push(` ${FONT_CSS_VARIABLES.inter}: ${config.inter};`);\n }\n\n if (config.jetbrainsMono) {\n rules.push(` ${FONT_CSS_VARIABLES.jetbrainsMono}: ${config.jetbrainsMono};`);\n }\n\n if (config.playfairDisplay) {\n rules.push(` ${FONT_CSS_VARIABLES.playfairDisplay}: ${config.playfairDisplay};`);\n }\n\n rules.push('}');\n\n return rules.join('\\n');\n}\n\n/**\n * Reset fonts to Kookie UI defaults\n */\nexport function resetFonts(target: HTMLElement = document.documentElement): void {\n const style = target.style;\n\n // Remove custom font variables to fall back to defaults\n style.removeProperty(FONT_CSS_VARIABLES.sans);\n style.removeProperty(FONT_CSS_VARIABLES.mono);\n style.removeProperty(FONT_CSS_VARIABLES.serif);\n style.removeProperty(FONT_CSS_VARIABLES.inter);\n style.removeProperty(FONT_CSS_VARIABLES.jetbrainsMono);\n style.removeProperty(FONT_CSS_VARIABLES.playfairDisplay);\n}\n\n/**\n * Get current font configuration from CSS variables\n */\nexport function getCurrentFontConfig(target: HTMLElement = document.documentElement): FontConfig {\n const computedStyle = getComputedStyle(target);\n\n return {\n sans: computedStyle.getPropertyValue(FONT_CSS_VARIABLES.sans).trim() || undefined,\n mono: computedStyle.getPropertyValue(FONT_CSS_VARIABLES.mono).trim() || undefined,\n serif: computedStyle.getPropertyValue(FONT_CSS_VARIABLES.serif).trim() || undefined,\n inter: computedStyle.getPropertyValue(FONT_CSS_VARIABLES.inter).trim() || undefined,\n jetbrainsMono: computedStyle.getPropertyValue(FONT_CSS_VARIABLES.jetbrainsMono).trim() || undefined,\n playfairDisplay: computedStyle.getPropertyValue(FONT_CSS_VARIABLES.playfairDisplay).trim() || undefined,\n };\n}\n"],
5
+ "mappings": "AA4BO,MAAMA,EAAqB,CAChC,KAAM,cACN,KAAM,cACN,MAAO,eACP,MAAO,eACP,cAAe,wBACf,gBAAiB,0BACjB,cAAe,wBACf,cAAe,wBACf,aAAc,uBACd,WAAY,oBACd,EAKaC,EAAc,CAEzB,MAAO,6EACP,OAAQ,6FACR,QAAS,oEACT,SAAU,sEAGV,cAAe,0EACf,SAAU,0EACV,cAAe,6DACf,WAAY,8EAGZ,SAAU,8EACV,MAAO,0DACP,QAAS,+CACT,KAAM,2CACR,EAuBO,SAASC,EAAgBC,EAAoBC,EAAsB,SAAS,gBAAuB,CACxG,MAAMC,EAAQD,EAAO,MAEjBD,EAAO,MACTE,EAAM,YAAYL,EAAmB,KAAMG,EAAO,IAAI,EAGpDA,EAAO,MACTE,EAAM,YAAYL,EAAmB,KAAMG,EAAO,IAAI,EAGpDA,EAAO,OACTE,EAAM,YAAYL,EAAmB,MAAOG,EAAO,KAAK,EAGtDA,EAAO,OACTE,EAAM,YAAYL,EAAmB,MAAOG,EAAO,KAAK,EAGtDA,EAAO,eACTE,EAAM,YAAYL,EAAmB,cAAeG,EAAO,aAAa,EAGtEA,EAAO,iBACTE,EAAM,YAAYL,EAAmB,gBAAiBG,EAAO,eAAe,CAEhF,CAqBO,SAASG,EAAgBH,EAA4B,CAC1D,MAAMI,EAAkB,CAAC,SAAS,EAElC,OAAIJ,EAAO,MACTI,EAAM,KAAK,KAAKP,EAAmB,IAAI,KAAKG,EAAO,IAAI,GAAG,EAGxDA,EAAO,MACTI,EAAM,KAAK,KAAKP,EAAmB,IAAI,KAAKG,EAAO,IAAI,GAAG,EAGxDA,EAAO,OACTI,EAAM,KAAK,KAAKP,EAAmB,KAAK,KAAKG,EAAO,KAAK,GAAG,EAG1DA,EAAO,OACTI,EAAM,KAAK,KAAKP,EAAmB,KAAK,KAAKG,EAAO,KAAK,GAAG,EAG1DA,EAAO,eACTI,EAAM,KAAK,KAAKP,EAAmB,aAAa,KAAKG,EAAO,aAAa,GAAG,EAG1EA,EAAO,iBACTI,EAAM,KAAK,KAAKP,EAAmB,eAAe,KAAKG,EAAO,eAAe,GAAG,EAGlFI,EAAM,KAAK,GAAG,EAEPA,EAAM,KAAK;AAAA,CAAI,CACxB,CAKO,SAASC,EAAWJ,EAAsB,SAAS,gBAAuB,CAC/E,MAAMC,EAAQD,EAAO,MAGrBC,EAAM,eAAeL,EAAmB,IAAI,EAC5CK,EAAM,eAAeL,EAAmB,IAAI,EAC5CK,EAAM,eAAeL,EAAmB,KAAK,EAC7CK,EAAM,eAAeL,EAAmB,KAAK,EAC7CK,EAAM,eAAeL,EAAmB,aAAa,EACrDK,EAAM,eAAeL,EAAmB,eAAe,CACzD,CAKO,SAASS,EAAqBL,EAAsB,SAAS,gBAA6B,CAC/F,MAAMM,EAAgB,iBAAiBN,CAAM,EAE7C,MAAO,CACL,KAAMM,EAAc,iBAAiBV,EAAmB,IAAI,EAAE,KAAK,GAAK,OACxE,KAAMU,EAAc,iBAAiBV,EAAmB,IAAI,EAAE,KAAK,GAAK,OACxE,MAAOU,EAAc,iBAAiBV,EAAmB,KAAK,EAAE,KAAK,GAAK,OAC1E,MAAOU,EAAc,iBAAiBV,EAAmB,KAAK,EAAE,KAAK,GAAK,OAC1E,cAAeU,EAAc,iBAAiBV,EAAmB,aAAa,EAAE,KAAK,GAAK,OAC1F,gBAAiBU,EAAc,iBAAiBV,EAAmB,eAAe,EAAE,KAAK,GAAK,MAChG,CACF",
6
6
  "names": ["FONT_CSS_VARIABLES", "FONT_STACKS", "applyFontConfig", "config", "target", "style", "generateFontCSS", "rules", "resetFonts", "getCurrentFontConfig", "computedStyle"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kushagradhawan/kookie-ui",
3
- "version": "0.1.55",
3
+ "version": "0.1.57",
4
4
  "description": "A modern React component library with beautiful design tokens, flexible theming, and comprehensive docs",
5
5
  "keywords": [
6
6
  "react",
@@ -279,6 +279,6 @@
279
279
  "title": "Base-button Component Props",
280
280
  "description": "Props schema for the base-button component in Kookie UI",
281
281
  "version": "1.0.0",
282
- "generatedAt": "2025-09-29T10:27:20.201Z",
282
+ "generatedAt": "2025-10-08T07:00:40.002Z",
283
283
  "source": "Zod schema"
284
284
  }
@@ -530,6 +530,6 @@
530
530
  "title": "Button Component Props",
531
531
  "description": "Props schema for the button component in Kookie UI",
532
532
  "version": "1.0.0",
533
- "generatedAt": "2025-09-29T10:27:20.206Z",
533
+ "generatedAt": "2025-10-08T07:00:40.007Z",
534
534
  "source": "Zod schema"
535
535
  }
@@ -313,6 +313,6 @@
313
313
  "title": "Icon-button Component Props",
314
314
  "description": "Props schema for the icon-button component in Kookie UI",
315
315
  "version": "1.0.0",
316
- "generatedAt": "2025-09-29T10:27:20.207Z",
316
+ "generatedAt": "2025-10-08T07:00:40.009Z",
317
317
  "source": "Zod schema"
318
318
  }
@@ -3,7 +3,7 @@
3
3
  "title": "Kookie UI Button Components",
4
4
  "description": "Complete JSON Schema collection for all button components in Kookie UI",
5
5
  "version": "1.0.0",
6
- "generatedAt": "2025-09-29T10:27:20.210Z",
6
+ "generatedAt": "2025-10-08T07:00:40.012Z",
7
7
  "source": "Zod schemas",
8
8
  "components": {
9
9
  "base-button": {
@@ -287,7 +287,7 @@
287
287
  "title": "Base-button Component Props",
288
288
  "description": "Props schema for the base-button component in Kookie UI",
289
289
  "version": "1.0.0",
290
- "generatedAt": "2025-09-29T10:27:20.201Z",
290
+ "generatedAt": "2025-10-08T07:00:40.002Z",
291
291
  "source": "Zod schema"
292
292
  },
293
293
  "button": {
@@ -822,7 +822,7 @@
822
822
  "title": "Button Component Props",
823
823
  "description": "Props schema for the button component in Kookie UI",
824
824
  "version": "1.0.0",
825
- "generatedAt": "2025-09-29T10:27:20.206Z",
825
+ "generatedAt": "2025-10-08T07:00:40.007Z",
826
826
  "source": "Zod schema"
827
827
  },
828
828
  "icon-button": {
@@ -1140,7 +1140,7 @@
1140
1140
  "title": "Icon-button Component Props",
1141
1141
  "description": "Props schema for the icon-button component in Kookie UI",
1142
1142
  "version": "1.0.0",
1143
- "generatedAt": "2025-09-29T10:27:20.207Z",
1143
+ "generatedAt": "2025-10-08T07:00:40.009Z",
1144
1144
  "source": "Zod schema"
1145
1145
  },
1146
1146
  "toggle-button": {
@@ -1683,7 +1683,7 @@
1683
1683
  "title": "Toggle-button Component Props",
1684
1684
  "description": "Props schema for the toggle-button component in Kookie UI",
1685
1685
  "version": "1.0.0",
1686
- "generatedAt": "2025-09-29T10:27:20.209Z",
1686
+ "generatedAt": "2025-10-08T07:00:40.011Z",
1687
1687
  "source": "Zod schema"
1688
1688
  },
1689
1689
  "toggle-icon-button": {
@@ -2009,7 +2009,7 @@
2009
2009
  "title": "Toggle-icon-button Component Props",
2010
2010
  "description": "Props schema for the toggle-icon-button component in Kookie UI",
2011
2011
  "version": "1.0.0",
2012
- "generatedAt": "2025-09-29T10:27:20.210Z",
2012
+ "generatedAt": "2025-10-08T07:00:40.012Z",
2013
2013
  "source": "Zod schema"
2014
2014
  }
2015
2015
  }
@@ -538,6 +538,6 @@
538
538
  "title": "Toggle-button Component Props",
539
539
  "description": "Props schema for the toggle-button component in Kookie UI",
540
540
  "version": "1.0.0",
541
- "generatedAt": "2025-09-29T10:27:20.209Z",
541
+ "generatedAt": "2025-10-08T07:00:40.011Z",
542
542
  "source": "Zod schema"
543
543
  }
@@ -321,6 +321,6 @@
321
321
  "title": "Toggle-icon-button Component Props",
322
322
  "description": "Props schema for the toggle-icon-button component in Kookie UI",
323
323
  "version": "1.0.0",
324
- "generatedAt": "2025-09-29T10:27:20.210Z",
324
+ "generatedAt": "2025-10-08T07:00:40.012Z",
325
325
  "source": "Zod schema"
326
326
  }
@@ -159,7 +159,7 @@
159
159
  padding-inline-start: var(--space-3);
160
160
  padding-top: calc(var(--space-1) * 0.75);
161
161
  padding-bottom: calc(var(--space-1) * 0.75);
162
- min-height: var(--space-5); /* 20px */
162
+ min-height: var(--space-6); /* bumped from space-5 */
163
163
  font-size: var(--font-size-1);
164
164
  }
165
165
 
@@ -167,10 +167,18 @@
167
167
  padding-inline-start: var(--space-3);
168
168
  padding-top: var(--space-1);
169
169
  padding-bottom: var(--space-1);
170
- min-height: var(--space-6); /* 32px */
170
+ min-height: var(--space-7); /* bumped from space-6 */
171
171
  font-size: var(--font-size-2);
172
172
  }
173
173
 
174
+ :where(.rt-SidebarContent.rt-r-size-3) :where(.rt-SidebarMenuSubList) .rt-SidebarMenuButton {
175
+ padding-inline-start: var(--space-3);
176
+ padding-top: var(--space-2);
177
+ padding-bottom: var(--space-2);
178
+ min-height: var(--space-8);
179
+ font-size: var(--font-size-3);
180
+ }
181
+
174
182
  .rt-SidebarGroupLabel {
175
183
  /* Inherit all BaseMenuLabel styles */
176
184
  display: flex;
@@ -220,6 +228,13 @@
220
228
 
221
229
  /* Add balanced spacing for sidebar menu items while preserving base menu border radius */
222
230
  .rt-SidebarContent :where(.rt-BaseMenuItem) {
223
- margin-top: calc(var(--space-1) / 4);
224
- margin-bottom: calc(var(--space-1) / 4);
231
+ margin-top: 1px;
232
+ margin-bottom: 1px;
233
+ }
234
+
235
+ /* Add same balanced spacing for submenu items */
236
+ /* stylelint-disable-next-line selector-max-specificity */
237
+ .rt-SidebarContent :where(.rt-SidebarMenuSubList) .rt-SidebarMenuButton {
238
+ margin-top: 1px;
239
+ margin-bottom: 1px;
225
240
  }
@@ -1,6 +1,6 @@
1
1
  .rt-Separator {
2
2
  display: block;
3
- background-color: var(--accent-a6);
3
+ background-color: var(--accent-a5);
4
4
  }
5
5
 
6
6
  /***************************************************************************************************
@@ -510,11 +510,15 @@
510
510
  .rt-SidebarContainer {
511
511
  &:where(.rt-r-size-1) {
512
512
  --sidebar-base-padding: var(--space-3);
513
- --sidebar-item-height: var(--space-5);
513
+ --sidebar-item-height: var(--space-6);
514
514
  }
515
515
  &:where(.rt-r-size-2) {
516
516
  --sidebar-base-padding: var(--space-4);
517
- --sidebar-item-height: var(--space-6);
517
+ --sidebar-item-height: var(--space-7);
518
+ }
519
+ &:where(.rt-r-size-3) {
520
+ --sidebar-base-padding: var(--space-4);
521
+ --sidebar-item-height: var(--space-8);
518
522
  }
519
523
  }
520
524
 
@@ -525,6 +529,7 @@
525
529
  --sidebar-item-padding-left: var(--base-menu-item-padding-left);
526
530
  --sidebar-item-padding-right: var(--base-menu-item-padding-right);
527
531
  --sidebar-item-padding-y: var(--base-menu-item-padding-y);
532
+ --base-menu-item-height: var(--space-6);
528
533
  --sidebar-item-height: var(--base-menu-item-height);
529
534
  }
530
535
  &:where(.rt-r-size-2) {
@@ -532,6 +537,15 @@
532
537
  --sidebar-item-padding-left: var(--base-menu-item-padding-left);
533
538
  --sidebar-item-padding-right: var(--base-menu-item-padding-right);
534
539
  --sidebar-item-padding-y: var(--base-menu-item-padding-y);
540
+ --base-menu-item-height: var(--space-7);
541
+ --sidebar-item-height: var(--base-menu-item-height);
542
+ }
543
+ &:where(.rt-r-size-3) {
544
+ --sidebar-content-padding: var(--base-menu-content-padding);
545
+ --sidebar-item-padding-left: var(--base-menu-item-padding-left);
546
+ --sidebar-item-padding-right: var(--base-menu-item-padding-right);
547
+ --sidebar-item-padding-y: var(--base-menu-item-padding-y);
548
+ --base-menu-item-height: var(--space-8);
535
549
  --sidebar-item-height: var(--base-menu-item-height);
536
550
  }
537
551
  }
@@ -548,8 +562,8 @@
548
562
 
549
563
  /* stylelint-disable-next-line selector-max-type */
550
564
  & :where(svg) {
551
- width: var(--content-icon-size-1);
552
- height: var(--content-icon-size-1);
565
+ width: var(--content-icon-size-2);
566
+ height: var(--content-icon-size-2);
553
567
  flex-shrink: 0;
554
568
  }
555
569
  }
@@ -574,11 +588,23 @@
574
588
 
575
589
  /* stylelint-disable-next-line selector-max-type */
576
590
  & :where(svg) {
577
- width: var(--content-icon-size-2);
578
- height: var(--content-icon-size-2);
591
+ width: var(--content-icon-size-3);
592
+ height: var(--content-icon-size-3);
579
593
  flex-shrink: 0;
580
594
  }
581
595
  }
596
+ /* stylelint-disable-next-line selector-max-specificity */
597
+ .rt-SidebarContent:where(.rt-r-size-3) {
598
+ /* stylelint-disable-next-line selector-max-specificity */
599
+ & :where(.rt-SidebarMenuButton) {
600
+ /* stylelint-disable-next-line selector-max-type, selector-max-specificity */
601
+ & :where(svg) {
602
+ width: var(--content-icon-size-3);
603
+ height: var(--content-icon-size-3);
604
+ flex-shrink: 0;
605
+ }
606
+ }
607
+ }
582
608
 
583
609
  /* Sub-trigger icon sizing - matches base menu exactly */
584
610
  & :where(.rt-BaseMenuSubTriggerIcon) {
@@ -8,7 +8,7 @@ const appearances = ['inherit', 'light', 'dark'] as const;
8
8
  const panelBackgrounds = ['solid', 'translucent'] as const;
9
9
  const materials = ['solid', 'translucent'] as const;
10
10
  const scalings = ['90%', '95%', '100%', '105%', '110%'] as const;
11
- const fontFamilies = ['sans', 'mono'] as const;
11
+ const fontFamilies = ['sans', 'mono', 'serif'] as const;
12
12
 
13
13
  const themePropDefs = {
14
14
  ...asChildPropDef,
@@ -13,10 +13,14 @@ export interface FontConfig {
13
13
  sans?: string;
14
14
  /** Monospace font stack for fontFamily="mono" */
15
15
  mono?: string;
16
+ /** Serif font stack for fontFamily="serif" */
17
+ serif?: string;
16
18
  /** Base Inter font replacement */
17
19
  inter?: string;
18
20
  /** Base JetBrains Mono font replacement */
19
21
  jetbrainsMono?: string;
22
+ /** Base Playfair Display font replacement */
23
+ playfairDisplay?: string;
20
24
  }
21
25
 
22
26
  /**
@@ -25,8 +29,10 @@ export interface FontConfig {
25
29
  export const FONT_CSS_VARIABLES = {
26
30
  sans: '--font-sans',
27
31
  mono: '--font-mono',
32
+ serif: '--font-serif',
28
33
  inter: '--font-inter',
29
34
  jetbrainsMono: '--font-jetbrains-mono',
35
+ playfairDisplay: '--font-playfair-display',
30
36
  defaultFamily: '--default-font-family',
31
37
  headingFamily: '--heading-font-family',
32
38
  strongFamily: '--strong-font-family',
@@ -39,8 +45,7 @@ export const FONT_CSS_VARIABLES = {
39
45
  export const FONT_STACKS = {
40
46
  // Sans-serif options
41
47
  inter: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
42
- system:
43
- "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
48
+ system: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
44
49
  poppins: "'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif",
45
50
  openSans: "'Open Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif",
46
51
 
@@ -49,6 +54,12 @@ export const FONT_STACKS = {
49
54
  firaCode: "'Fira Code', 'JetBrains Mono', 'Consolas', 'Liberation Mono', monospace",
50
55
  sourceCodePro: "'Source Code Pro', 'JetBrains Mono', 'Consolas', monospace",
51
56
  systemMono: "'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', 'Courier New', monospace",
57
+
58
+ // Serif options
59
+ playfair: "'Playfair Display', 'Times New Roman', 'Times', 'Georgia', 'Cambria', serif",
60
+ times: "'Times New Roman', 'Times', 'Georgia', 'Cambria', serif",
61
+ georgia: "'Georgia', 'Times New Roman', 'Times', serif",
62
+ lora: "'Lora', 'Times New Roman', 'Times', serif",
52
63
  } as const;
53
64
 
54
65
  /**
@@ -72,10 +83,7 @@ export const FONT_STACKS = {
72
83
  * });
73
84
  * ```
74
85
  */
75
- export function applyFontConfig(
76
- config: FontConfig,
77
- target: HTMLElement = document.documentElement,
78
- ): void {
86
+ export function applyFontConfig(config: FontConfig, target: HTMLElement = document.documentElement): void {
79
87
  const style = target.style;
80
88
 
81
89
  if (config.sans) {
@@ -86,6 +94,10 @@ export function applyFontConfig(
86
94
  style.setProperty(FONT_CSS_VARIABLES.mono, config.mono);
87
95
  }
88
96
 
97
+ if (config.serif) {
98
+ style.setProperty(FONT_CSS_VARIABLES.serif, config.serif);
99
+ }
100
+
89
101
  if (config.inter) {
90
102
  style.setProperty(FONT_CSS_VARIABLES.inter, config.inter);
91
103
  }
@@ -93,6 +105,10 @@ export function applyFontConfig(
93
105
  if (config.jetbrainsMono) {
94
106
  style.setProperty(FONT_CSS_VARIABLES.jetbrainsMono, config.jetbrainsMono);
95
107
  }
108
+
109
+ if (config.playfairDisplay) {
110
+ style.setProperty(FONT_CSS_VARIABLES.playfairDisplay, config.playfairDisplay);
111
+ }
96
112
  }
97
113
 
98
114
  /**
@@ -125,6 +141,10 @@ export function generateFontCSS(config: FontConfig): string {
125
141
  rules.push(` ${FONT_CSS_VARIABLES.mono}: ${config.mono};`);
126
142
  }
127
143
 
144
+ if (config.serif) {
145
+ rules.push(` ${FONT_CSS_VARIABLES.serif}: ${config.serif};`);
146
+ }
147
+
128
148
  if (config.inter) {
129
149
  rules.push(` ${FONT_CSS_VARIABLES.inter}: ${config.inter};`);
130
150
  }
@@ -133,6 +153,10 @@ export function generateFontCSS(config: FontConfig): string {
133
153
  rules.push(` ${FONT_CSS_VARIABLES.jetbrainsMono}: ${config.jetbrainsMono};`);
134
154
  }
135
155
 
156
+ if (config.playfairDisplay) {
157
+ rules.push(` ${FONT_CSS_VARIABLES.playfairDisplay}: ${config.playfairDisplay};`);
158
+ }
159
+
136
160
  rules.push('}');
137
161
 
138
162
  return rules.join('\n');
@@ -147,8 +171,10 @@ export function resetFonts(target: HTMLElement = document.documentElement): void
147
171
  // Remove custom font variables to fall back to defaults
148
172
  style.removeProperty(FONT_CSS_VARIABLES.sans);
149
173
  style.removeProperty(FONT_CSS_VARIABLES.mono);
174
+ style.removeProperty(FONT_CSS_VARIABLES.serif);
150
175
  style.removeProperty(FONT_CSS_VARIABLES.inter);
151
176
  style.removeProperty(FONT_CSS_VARIABLES.jetbrainsMono);
177
+ style.removeProperty(FONT_CSS_VARIABLES.playfairDisplay);
152
178
  }
153
179
 
154
180
  /**
@@ -160,8 +186,9 @@ export function getCurrentFontConfig(target: HTMLElement = document.documentElem
160
186
  return {
161
187
  sans: computedStyle.getPropertyValue(FONT_CSS_VARIABLES.sans).trim() || undefined,
162
188
  mono: computedStyle.getPropertyValue(FONT_CSS_VARIABLES.mono).trim() || undefined,
189
+ serif: computedStyle.getPropertyValue(FONT_CSS_VARIABLES.serif).trim() || undefined,
163
190
  inter: computedStyle.getPropertyValue(FONT_CSS_VARIABLES.inter).trim() || undefined,
164
- jetbrainsMono:
165
- computedStyle.getPropertyValue(FONT_CSS_VARIABLES.jetbrainsMono).trim() || undefined,
191
+ jetbrainsMono: computedStyle.getPropertyValue(FONT_CSS_VARIABLES.jetbrainsMono).trim() || undefined,
192
+ playfairDisplay: computedStyle.getPropertyValue(FONT_CSS_VARIABLES.playfairDisplay).trim() || undefined,
166
193
  };
167
194
  }
@@ -1,23 +1,19 @@
1
- /* Inter and JetBrains Mono from Google Fonts */
1
+ /* Inter, JetBrains Mono, and Playfair Display from Google Fonts */
2
2
  @import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,100..900;1,100..900&display=swap');
3
3
  @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');
4
+ @import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');
4
5
 
5
6
  /* Font Variables - Customize these to change fonts throughout your app */
6
7
  :root {
7
- /* Base font definitions - override these in your CSS to customize fonts */
8
- --font-inter:
9
- 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
10
- sans-serif;
11
- --font-jetbrains-mono:
12
- 'JetBrains Mono', 'Fira Code', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
8
+ /* Base font definitions - these are the actual font stacks */
9
+ --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
10
+ --font-jetbrains-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
11
+ --font-playfair-display: 'Playfair Display', 'Times New Roman', 'Times', 'Georgia', 'Cambria', serif;
13
12
 
14
- /* Primary font variables - these map to theme fontFamily values */
15
- --font-general-sans: var(--font-inter); /* Used when fontFamily="sans" */
16
- --font-inter-mono: var(--font-jetbrains-mono); /* Used for code elements */
17
-
18
- /* Tailwind-compatible aliases - override these to change theme fonts */
19
- --font-sans: var(--font-inter); /* Theme fontFamily="sans" uses this */
20
- --font-mono: var(--font-jetbrains-mono); /* Theme fontFamily="mono" uses this */
13
+ /* Theme font family overrides - change these to customize fonts globally */
14
+ --font-sans: var(--font-inter); /* Override this for custom sans-serif */
15
+ --font-mono: var(--font-jetbrains-mono); /* Override this for custom monospace */
16
+ --font-serif: var(--font-playfair-display); /* Override this for custom serif */
21
17
 
22
18
  /* Force proper font weight rendering */
23
19
  font-synthesis: none; /* Prevent browser from synthesizing weights */
@@ -26,7 +22,7 @@
26
22
  /* Radix Themes font weight enforcement */
27
23
  .radix-themes {
28
24
  font-synthesis: none;
29
- font-family: var(--font-inter);
25
+ font-family: var(--default-font-family);
30
26
  }
31
27
 
32
28
  /* System font fallback for critical loading scenarios */
@@ -44,16 +44,15 @@
44
44
  /* default values */
45
45
 
46
46
  --default-font-family:
47
- var(--font-inter, 'Inter'), -apple-system, BlinkMacSystemFont, 'Segoe UI (Custom)', Roboto,
48
- 'Helvetica Neue', 'Open Sans (Custom)', system-ui, sans-serif, 'Apple Color Emoji',
47
+ var(--font-sans, var(--font-inter, 'Inter')), -apple-system, BlinkMacSystemFont, 'Segoe UI (Custom)', Roboto, 'Helvetica Neue', 'Open Sans (Custom)', system-ui, sans-serif, 'Apple Color Emoji',
49
48
  'Segoe UI Emoji';
50
49
 
51
50
  /* Font family overrides based on theme data attribute */
52
51
  --default-font-family-sans:
53
- var(--font-inter, 'Inter'), -apple-system, BlinkMacSystemFont, 'Segoe UI (Custom)', Roboto,
54
- 'Helvetica Neue', 'Open Sans (Custom)', system-ui, sans-serif, 'Apple Color Emoji',
52
+ var(--font-sans, var(--font-inter, 'Inter')), -apple-system, BlinkMacSystemFont, 'Segoe UI (Custom)', Roboto, 'Helvetica Neue', 'Open Sans (Custom)', system-ui, sans-serif, 'Apple Color Emoji',
55
53
  'Segoe UI Emoji';
56
54
  --default-font-family-mono: var(--font-mono);
55
+ --default-font-family-serif: var(--font-serif);
57
56
  --default-font-size: var(--font-size-3); /* Same size used for `<Text size="3">` */
58
57
  --default-font-style: normal;
59
58
  --default-font-weight: var(--font-weight-regular);
@@ -84,9 +83,7 @@
84
83
 
85
84
  /* Code */
86
85
 
87
- --code-font-family:
88
- var(--font-inter-mono, 'JetBrains Mono'), 'Menlo', 'Consolas (Custom)',
89
- 'Bitstream Vera Sans Mono', monospace, 'Apple Color Emoji', 'Segoe UI Emoji';
86
+ --code-font-family: var(--font-mono, var(--font-jetbrains-mono, 'JetBrains Mono')), 'Menlo', 'Consolas (Custom)', 'Bitstream Vera Sans Mono', monospace, 'Apple Color Emoji', 'Segoe UI Emoji';
90
87
  --code-font-size-adjust: 0.95;
91
88
  --code-font-style: normal;
92
89
  --code-font-weight: inherit;
@@ -327,3 +324,16 @@
327
324
  --heading-font-family: var(--default-font-family-mono);
328
325
  --strong-font-family: var(--default-font-family-mono);
329
326
  }
327
+
328
+ [data-font-family='serif'] {
329
+ /* Map serif directly to --font-serif to avoid resolution issues */
330
+ --default-font-family: var(--font-serif);
331
+ --heading-font-family: var(--font-serif);
332
+ --strong-font-family: var(--font-serif);
333
+ }
334
+
335
+ /* Ensure serif font takes precedence over .radix-themes */
336
+ /* stylelint-disable-next-line selector-max-specificity */
337
+ .radix-themes[data-font-family='serif'] {
338
+ font-family: var(--font-serif) !important;
339
+ }