@chronogrove/ui 0.84.1 → 0.85.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chronogrove/ui",
3
- "version": "0.84.1",
3
+ "version": "0.85.0",
4
4
  "description": "Chronogrove Theme UI theme, color mode helpers, and shared UI primitives",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -918,6 +918,16 @@ exports[`Theme Configuration a snapshot of the configuration matches the snapsho
918
918
  },
919
919
  },
920
920
  "text": {
921
+ "mutedSans": {
922
+ "color": "textMuted",
923
+ "fontFamily": "heading",
924
+ "fontSize": [
925
+ 0,
926
+ 1,
927
+ ],
928
+ "fontStyle": "italic",
929
+ "lineHeight": 1.35,
930
+ },
921
931
  "title": {
922
932
  "color": "primary",
923
933
  "fontFamily": "heading",
@@ -25,7 +25,9 @@ const ActionButton = ({ children, href, onClick, variant = 'primary', size = 'me
25
25
  const sizeVariants = {
26
26
  small: { fontSize: ['11px', '12px'], padding: '6px 10px', gap: 1 },
27
27
  medium: { fontSize: ['12px', '13px'], padding: '8px 12px', gap: 1 },
28
- large: { fontSize: ['13px', '14px'], padding: '10px 16px', gap: 2 }
28
+ large: { fontSize: ['13px', '14px'], padding: '10px 16px', gap: 2 },
29
+ /** Prominent inline actions (e.g. widget read-more toggles) */
30
+ xlarge: { fontSize: ['14px', '16px'], padding: '12px 20px', gap: 2 }
29
31
  }
30
32
  const sizeStyles = sizeVariants[size] || sizeVariants.medium
31
33
 
@@ -116,6 +116,16 @@ describe('ActionButton', () => {
116
116
  })
117
117
  })
118
118
 
119
+ it('applies xlarge size styles', () => {
120
+ renderWithProviders(<ActionButton size='xlarge'>XLarge Button</ActionButton>)
121
+
122
+ const button = screen.getByRole('button', { name: /xlarge button/i })
123
+ expect(button).toHaveStyle({
124
+ fontSize: '14px',
125
+ padding: '12px 20px'
126
+ })
127
+ })
128
+
119
129
  it('renders with icon', () => {
120
130
  const TestIcon = () => <span data-testid='test-icon'>→</span>
121
131
  renderWithProviders(<ActionButton icon={<TestIcon />}>Button with Icon</ActionButton>)
package/src/theme.js CHANGED
@@ -683,6 +683,17 @@ export default merge(tailwind, {
683
683
  fontSize: [1, 2],
684
684
  fontWeight: '550',
685
685
  textTransform: 'uppercase'
686
+ },
687
+ /**
688
+ * Secondary / meta lines (e.g. AI attribution): sans, italic, one step under `[1,2]` on the scale.
689
+ * Use `textMuted` (surface tokens), not Tailwind `colors.muted`—preset grays are often below WCAG AA for this size on `background` / panels.
690
+ */
691
+ mutedSans: {
692
+ color: 'textMuted',
693
+ fontFamily: 'heading',
694
+ fontSize: [0, 1],
695
+ fontStyle: 'italic',
696
+ lineHeight: 1.35
686
697
  }
687
698
  },
688
699
 
@@ -21,7 +21,7 @@ const METRIC_CHIP_BORDER_ALPHA = 34 / 255
21
21
  * a label on a physical card index tab. Metrics are monospaced square chips:
22
22
  * number + unit in a bordered box, no rounded pills.
23
23
  */
24
- const WidgetHeader = ({ aside, children, icon, metrics, metricsLoading }) => {
24
+ const WidgetHeader = ({ aside, children, icon, metrics, metricsLoading, sx: sxProp }) => {
25
25
  const hasMetrics = (Array.isArray(metrics) && metrics.length > 0) || metricsLoading
26
26
 
27
27
  // Placeholder chips while loading
@@ -38,7 +38,8 @@ const WidgetHeader = ({ aside, children, icon, metrics, metricsLoading }) => {
38
38
  gap: [2, 3],
39
39
  flexWrap: 'wrap',
40
40
  pb: 3,
41
- mb: hasMetrics ? 4 : 2
41
+ mb: hasMetrics ? 4 : 2,
42
+ ...(typeof sxProp === 'object' && sxProp !== null ? sxProp : {})
42
43
  }}
43
44
  >
44
45
  {/* Left cluster: icon chip (center-aligned) + heading/CTA sub-row (baseline-aligned) */}