@mindlogic-ai/logician-ui 4.0.0-alpha.16 → 4.0.0-alpha.17

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 +1 @@
1
- {"version":3,"file":"InlineCode.d.ts","sourceRoot":"","sources":["../../../src/components/InlineCode/InlineCode.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,IAAI,eAAe,EAC7B,MAAM,kBAAkB,CAAC;AAE1B,eAAO,MAAM,UAAU,GAAI,uBAAuB,eAAe,4CAmBhE,CAAC"}
1
+ {"version":3,"file":"InlineCode.d.ts","sourceRoot":"","sources":["../../../src/components/InlineCode/InlineCode.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,IAAI,eAAe,EAC7B,MAAM,kBAAkB,CAAC;AAE1B,eAAO,MAAM,UAAU,GAAI,uBAAuB,eAAe,4CA0BhE,CAAC"}
@@ -5,7 +5,16 @@ var jsxRuntime = require('react/jsx-runtime');
5
5
  var react = require('@chakra-ui/react');
6
6
 
7
7
  const InlineCode = ({ children, ...rest }) => {
8
- return (jsxRuntime.jsx(react.Code, { bg: "bg.subtle", color: "primary.dark", borderRadius: "sm", textStyle: "p",
8
+ return (jsxRuntime.jsx(react.Code, { bg: "bg.subtle", color: "primary.dark",
9
+ // `xs` (4px) rather than `sm` (6px): on the small, now-shorter chip a 6px
10
+ // radius reads a little bubbly; the tighter corner is crisper inline.
11
+ borderRadius: "xs",
12
+ // `subtext` rather than `p`: inline code reads a step below body text so
13
+ // its chip (padding + ring) and the mono face's larger x-height don't make
14
+ // it bulge in running prose. `subtext` is the same tier as `p` — same
15
+ // family/weight/line-height — only one size down, so this changes size
16
+ // only (a mono override passed by callers still wins, as with `p`).
17
+ textStyle: "subtext",
9
18
  // bg.subtle (gray.50) matches the bg.sunken page wash, so on a sunken
10
19
  // page the chip fill vanishes. The chip is too small for a fill bump to
11
20
  // register, so (like SegmentedControl) it gets an outline instead — a
@@ -1 +1 @@
1
- {"version":3,"file":"InlineCode.js","sources":["../../../src/components/InlineCode/InlineCode.tsx"],"sourcesContent":[null],"names":["_jsx","ChakraCode"],"mappings":";;;;;;AAKO,MAAM,UAAU,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAmB,KAAI;AACnE,IAAA,QACEA,cAAA,CAACC,UAAU,IACT,EAAE,EAAC,WAAW,EACd,KAAK,EAAC,cAAc,EACpB,YAAY,EAAC,IAAI,EACjB,SAAS,EAAC,GAAG;;;;;;;QAOb,SAAS,EAAC,+CAA+C,EAAA,GACrD,IAAI,YAEP,QAAQ,EAAA,CACE;AAEjB;;;;"}
1
+ {"version":3,"file":"InlineCode.js","sources":["../../../src/components/InlineCode/InlineCode.tsx"],"sourcesContent":[null],"names":["_jsx","ChakraCode"],"mappings":";;;;;;AAKO,MAAM,UAAU,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAmB,KAAI;IACnE,QACEA,cAAA,CAACC,UAAU,EAAA,EACT,EAAE,EAAC,WAAW,EACd,KAAK,EAAC,cAAc;;;AAGpB,QAAA,YAAY,EAAC,IAAI;;;;;;AAMjB,QAAA,SAAS,EAAC,SAAS;;;;;;;QAOnB,SAAS,EAAC,+CAA+C,EAAA,GACrD,IAAI,YAEP,QAAQ,EAAA,CACE;AAEjB;;;;"}
@@ -3,7 +3,16 @@ import { jsx } from 'react/jsx-runtime';
3
3
  import { Code } from '@chakra-ui/react';
4
4
 
5
5
  const InlineCode = ({ children, ...rest }) => {
6
- return (jsx(Code, { bg: "bg.subtle", color: "primary.dark", borderRadius: "sm", textStyle: "p",
6
+ return (jsx(Code, { bg: "bg.subtle", color: "primary.dark",
7
+ // `xs` (4px) rather than `sm` (6px): on the small, now-shorter chip a 6px
8
+ // radius reads a little bubbly; the tighter corner is crisper inline.
9
+ borderRadius: "xs",
10
+ // `subtext` rather than `p`: inline code reads a step below body text so
11
+ // its chip (padding + ring) and the mono face's larger x-height don't make
12
+ // it bulge in running prose. `subtext` is the same tier as `p` — same
13
+ // family/weight/line-height — only one size down, so this changes size
14
+ // only (a mono override passed by callers still wins, as with `p`).
15
+ textStyle: "subtext",
7
16
  // bg.subtle (gray.50) matches the bg.sunken page wash, so on a sunken
8
17
  // page the chip fill vanishes. The chip is too small for a fill bump to
9
18
  // register, so (like SegmentedControl) it gets an outline instead — a
@@ -1 +1 @@
1
- {"version":3,"file":"InlineCode.mjs","sources":["../../../src/components/InlineCode/InlineCode.tsx"],"sourcesContent":[null],"names":["_jsx","ChakraCode"],"mappings":";;;;AAKO,MAAM,UAAU,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAmB,KAAI;AACnE,IAAA,QACEA,GAAA,CAACC,IAAU,IACT,EAAE,EAAC,WAAW,EACd,KAAK,EAAC,cAAc,EACpB,YAAY,EAAC,IAAI,EACjB,SAAS,EAAC,GAAG;;;;;;;QAOb,SAAS,EAAC,+CAA+C,EAAA,GACrD,IAAI,YAEP,QAAQ,EAAA,CACE;AAEjB;;;;"}
1
+ {"version":3,"file":"InlineCode.mjs","sources":["../../../src/components/InlineCode/InlineCode.tsx"],"sourcesContent":[null],"names":["_jsx","ChakraCode"],"mappings":";;;;AAKO,MAAM,UAAU,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAmB,KAAI;IACnE,QACEA,GAAA,CAACC,IAAU,EAAA,EACT,EAAE,EAAC,WAAW,EACd,KAAK,EAAC,cAAc;;;AAGpB,QAAA,YAAY,EAAC,IAAI;;;;;;AAMjB,QAAA,SAAS,EAAC,SAAS;;;;;;;QAOnB,SAAS,EAAC,+CAA+C,EAAA,GACrD,IAAI,YAEP,QAAQ,EAAA,CACE;AAEjB;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindlogic-ai/logician-ui",
3
- "version": "4.0.0-alpha.16",
3
+ "version": "4.0.0-alpha.17",
4
4
  "description": "A comprehensive React design system built on Chakra UI",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -8,8 +8,15 @@ export const InlineCode = ({ children, ...rest }: ChakraCodeProps) => {
8
8
  <ChakraCode
9
9
  bg="bg.subtle"
10
10
  color="primary.dark"
11
- borderRadius="sm"
12
- textStyle="p"
11
+ // `xs` (4px) rather than `sm` (6px): on the small, now-shorter chip a 6px
12
+ // radius reads a little bubbly; the tighter corner is crisper inline.
13
+ borderRadius="xs"
14
+ // `subtext` rather than `p`: inline code reads a step below body text so
15
+ // its chip (padding + ring) and the mono face's larger x-height don't make
16
+ // it bulge in running prose. `subtext` is the same tier as `p` — same
17
+ // family/weight/line-height — only one size down, so this changes size
18
+ // only (a mono override passed by callers still wins, as with `p`).
19
+ textStyle="subtext"
13
20
  // bg.subtle (gray.50) matches the bg.sunken page wash, so on a sunken
14
21
  // page the chip fill vanishes. The chip is too small for a fill bump to
15
22
  // register, so (like SegmentedControl) it gets an outline instead — a
@@ -1,5 +1,7 @@
1
1
  import { Meta, StoryObj } from '@storybook/react';
2
2
 
3
+ import { InlineCode } from '../InlineCode';
4
+
3
5
  import {
4
6
  Caption,
5
7
  H1,
@@ -67,3 +69,27 @@ export const AllTextStyles: Story = {
67
69
  </>
68
70
  ),
69
71
  };
72
+
73
+ // InlineCode nested in each type tier. InlineCode's size is em-relative
74
+ // (textStyle="subtext"), so it tracks whatever it sits in: a readable step below
75
+ // body in a paragraph, and proportionally smaller inside a heading. Use this to
76
+ // eyeball the step-down per context and to confirm a caller's `fontFamily="mono"`
77
+ // still wins (InlineCode has no mono default). Pair with `AllTextStyles` above.
78
+ export const InlineCodeInTextStyles: Story = {
79
+ render: () => {
80
+ const code = <InlineCode fontFamily="mono">inline_code()</InlineCode>;
81
+ return (
82
+ <>
83
+ <H1>H1 heading with {code} inside</H1>
84
+ <H2>H2 heading with {code} inside</H2>
85
+ <H3>H3 heading with {code} inside</H3>
86
+ <H4>H4 heading with {code} inside</H4>
87
+ <H5>H5 heading with {code} inside</H5>
88
+ <Text>Paragraph body text with {code} mid-sentence.</Text>
89
+ <Subtitle>Subtitle with {code} inside</Subtitle>
90
+ <Subtext>Subtext with {code} inside</Subtext>
91
+ <Caption>Caption with {code} inside</Caption>
92
+ </>
93
+ );
94
+ },
95
+ };