@wallarm-org/design-system 1.1.0-rc-feature-AS-1060.1 → 1.1.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.
@@ -2,19 +2,19 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { Slot } from "@radix-ui/react-slot";
3
3
  import { cva } from "class-variance-authority";
4
4
  import { cn } from "../../utils/cn.js";
5
- const headingVariants = cva('font-sans-display text-text-primary tracking-[-0.02em]', {
5
+ const headingVariants = cva('font-sans-display text-text-primary', {
6
6
  variants: {
7
7
  size: {
8
- sm: 'text-sm',
9
- md: 'text-base',
10
- lg: 'text-lg',
11
- xl: 'text-xl',
12
- '2xl': 'text-2xl',
13
- '3xl': 'text-3xl',
14
- '4xl': 'text-4xl',
15
- '5xl': 'text-5xl',
16
- '6xl': 'text-6xl',
17
- '7xl': 'text-7xl'
8
+ sm: 'text-sm tracking-normal',
9
+ md: 'text-base tracking-normal',
10
+ lg: 'text-lg tracking-normal',
11
+ xl: 'text-xl tracking-xl',
12
+ '2xl': 'text-2xl tracking-2xl',
13
+ '3xl': 'text-3xl tracking-3xl',
14
+ '4xl': 'text-4xl tracking-4xl',
15
+ '5xl': 'text-5xl tracking-5xl',
16
+ '6xl': 'text-6xl tracking-6xl',
17
+ '7xl': 'text-7xl tracking-7xl'
18
18
  },
19
19
  weight: {
20
20
  light: 'font-light',
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "1.0.0",
3
- "generatedAt": "2026-08-20T14:13:55.149Z",
3
+ "generatedAt": "2026-08-20T14:43:33.279Z",
4
4
  "components": [
5
5
  {
6
6
  "name": "Accordion",
@@ -17761,7 +17761,7 @@
17761
17761
  },
17762
17762
  {
17763
17763
  "name": "Sizes",
17764
- "code": "({ ...args }) => (\n <VStack align='start'>\n <Code {...args} size='xs'>\n console.log('Extra small code text');\n </Code>\n <Code {...args} size='s'>\n console.log('Small code text');\n </Code>\n <Code {...args} size='m'>\n console.log('Medium code text');\n </Code>\n <Code {...args} size='l'>\n console.log('Large code text');\n </Code>\n </VStack>\n)"
17764
+ "code": "({ ...args }) => (\n <VStack gap={24} align='start'>\n {SIZES.map(({ size, metrics }) => (\n <VStack key={size} gap={4} align='start'>\n <Text size='xs' color='secondary'>\n size=&apos;{size}&apos; · {metrics}\n </Text>\n <Code {...args} size={size}>\n console.log('hello world');\n </Code>\n </VStack>\n ))}\n </VStack>\n)"
17765
17765
  },
17766
17766
  {
17767
17767
  "name": "Weights",
@@ -31625,7 +31625,7 @@
31625
31625
  },
31626
31626
  {
31627
31627
  "name": "Sizes",
31628
- "code": "({ ...args }) => (\n <VStack align='start'>\n <Heading {...args} size='sm'>\n Small Heading\n </Heading>\n <Heading {...args} size='md'>\n Medium Heading\n </Heading>\n <Heading {...args} size='lg'>\n Large Heading\n </Heading>\n <Heading {...args} size='xl'>\n Extra Large Heading\n </Heading>\n <Heading {...args} size='2xl'>\n 2XL Heading\n </Heading>\n <Heading {...args} size='3xl'>\n 3XL Heading\n </Heading>\n <Heading {...args} size='4xl'>\n 4XL Heading\n </Heading>\n <Heading {...args} size='5xl'>\n 5XL Heading\n </Heading>\n <Heading {...args} size='6xl'>\n 6XL Heading\n </Heading>\n <Heading {...args} size='7xl'>\n 7XL Heading\n </Heading>\n </VStack>\n)"
31628
+ "code": "({ ...args }) => (\n <VStack gap={24} align='start'>\n {SIZES.map(({ size, metrics }) => (\n <VStack key={size} gap={4} align='start'>\n <Text size='xs' color='secondary'>\n size=&apos;{size}&apos; · {metrics}\n </Text>\n <Heading {...args} size={size}>\n The quick brown fox\n </Heading>\n </VStack>\n ))}\n </VStack>\n)"
31629
31629
  },
31630
31630
  {
31631
31631
  "name": "Weights",
@@ -79107,7 +79107,7 @@
79107
79107
  },
79108
79108
  {
79109
79109
  "name": "Sizes",
79110
- "code": "({ ...args }) => (\n <VStack align='start'>\n <Text {...args} size='xs'>\n Extra Small Body Text\n </Text>\n <Text {...args} size='sm'>\n Small Body Text\n </Text>\n <Text {...args} size='md'>\n Medium Body Text\n </Text>\n <Text {...args} size='lg'>\n Large Body Text\n </Text>\n <Text {...args} size='xl'>\n Extra Large Body Text\n </Text>\n </VStack>\n)"
79110
+ "code": "({ ...args }) => (\n <VStack gap={24} align='start'>\n {SIZES.map(({ size, metrics }) => (\n <VStack key={size} gap={4} align='start'>\n <Text size='xs' color='secondary'>\n size=&apos;{size}&apos; · {metrics}\n </Text>\n <Text {...args} size={size}>\n The quick brown fox jumps over the lazy dog\n </Text>\n </VStack>\n ))}\n </VStack>\n)"
79111
79111
  },
79112
79112
  {
79113
79113
  "name": "Weights",
@@ -89989,6 +89989,34 @@
89989
89989
  {
89990
89990
  "name": "--leading-9xl",
89991
89991
  "value": "128px"
89992
+ },
89993
+ {
89994
+ "name": "--tracking-xl",
89995
+ "value": "-0.005em"
89996
+ },
89997
+ {
89998
+ "name": "--tracking-2xl",
89999
+ "value": "-0.01em"
90000
+ },
90001
+ {
90002
+ "name": "--tracking-3xl",
90003
+ "value": "-0.01em"
90004
+ },
90005
+ {
90006
+ "name": "--tracking-4xl",
90007
+ "value": "-0.015em"
90008
+ },
90009
+ {
90010
+ "name": "--tracking-5xl",
90011
+ "value": "-0.015em"
90012
+ },
90013
+ {
90014
+ "name": "--tracking-6xl",
90015
+ "value": "-0.02em"
90016
+ },
90017
+ {
90018
+ "name": "--tracking-7xl",
90019
+ "value": "-0.02em"
89992
90020
  }
89993
90021
  ]
89994
90022
  },
@@ -0,0 +1,79 @@
1
+ import type { Meta, StoryFn } from 'storybook-react-rsbuild';
2
+ import { HStack, VStack } from '../components/Stack';
3
+ import { Text } from '../components/Text';
4
+
5
+ const DESCRIPTION = [
6
+ 'Geist Pixel is the decorative typeface. Use it for empty states, and for moments that want personality rather than information.',
7
+ 'There is no `Pixel` component. Pixel type is composed from the `font-pixel` utility plus the shared `text-*` size utilities, so the steps below are conventions rather than a component API. The only place it ships today is `EmptyStateTitle`, at 16/24.',
8
+ 'One cut only: Square at regular weight. There is no light or bold, so `font-bold` on pixel type renders as a browser-synthesized fake — emphasis has to come from size or colour, never from weight.',
9
+ 'Not for UI copy, labels, or anything read at length; that is the text ramp. Keep it to short strings, where the blocky letterforms stay legible.',
10
+ ].join('\n\n');
11
+
12
+ const meta = {
13
+ title: 'Typography/Pixel',
14
+ parameters: {
15
+ layout: 'padded',
16
+ docs: {
17
+ description: {
18
+ component: DESCRIPTION,
19
+ },
20
+ },
21
+ },
22
+ } satisfies Meta;
23
+
24
+ export default meta;
25
+
26
+ type PixelStep = {
27
+ /** Name of the matching text style in Figma. */
28
+ token: string;
29
+ /** Utilities that reproduce it — note lg is 16px, so it maps to text-base. */
30
+ utilities: string;
31
+ /** Size / leading in px. */
32
+ metrics: string;
33
+ };
34
+
35
+ const STEPS: PixelStep[] = [
36
+ { token: 'pixel-3xl', utilities: 'font-pixel text-3xl', metrics: '30 / 36' },
37
+ { token: 'pixel-2xl', utilities: 'font-pixel text-2xl', metrics: '24 / 32' },
38
+ { token: 'pixel-xl', utilities: 'font-pixel text-xl', metrics: '20 / 28' },
39
+ { token: 'pixel-lg', utilities: 'font-pixel text-base', metrics: '16 / 24' },
40
+ ];
41
+
42
+ export const Scale: StoryFn<typeof meta> = () => (
43
+ <VStack gap={32} align='start'>
44
+ {STEPS.map(({ token, utilities, metrics }) => (
45
+ <VStack key={token} gap={8} align='start'>
46
+ <HStack gap={12} align='baseline'>
47
+ <Text size='sm' weight='medium'>
48
+ {token}
49
+ </Text>
50
+ <Text size='xs' color='secondary'>
51
+ {metrics} · {utilities}
52
+ </Text>
53
+ </HStack>
54
+ <span className={`${utilities} text-text-primary`}>The quick brown fox</span>
55
+ </VStack>
56
+ ))}
57
+ </VStack>
58
+ );
59
+
60
+ export const Decorative: StoryFn<typeof meta> = () => (
61
+ <VStack gap={40} align='start'>
62
+ <VStack gap={12} align='start'>
63
+ <Text size='xs' color='secondary'>
64
+ What it is for — a short, decorative line carrying the personality
65
+ </Text>
66
+ <span className='font-pixel text-base text-text-primary'>No attacks detected</span>
67
+ </VStack>
68
+
69
+ <VStack gap={12} align='start'>
70
+ <Text size='xs' color='secondary'>
71
+ What it is not for — running copy belongs to the text ramp
72
+ </Text>
73
+ <Text size='sm' color='secondary' className='max-w-100'>
74
+ Wallarm did not find any attacks in the selected period. Try widening the time range, or
75
+ check that the filters above are not excluding traffic you expect to see.
76
+ </Text>
77
+ </VStack>
78
+ </VStack>
79
+ );
@@ -79,4 +79,17 @@
79
79
  --leading-7xl: 72px;
80
80
  --leading-8xl: 96px;
81
81
  --leading-9xl: 128px;
82
+
83
+ /* Optical tracking for the heading ramp. Tightens as the size grows, because
84
+ large type sets too loose at the spacing Geist is drawn for.
85
+ Zero below 20px system-wide: at UI sizes the font's own spacing is already
86
+ right, and negative tracking there costs legibility. Steps sm/md/lg get no
87
+ token on purpose — they use tracking-normal. */
88
+ --tracking-xl: -0.005em;
89
+ --tracking-2xl: -0.01em;
90
+ --tracking-3xl: -0.01em;
91
+ --tracking-4xl: -0.015em;
92
+ --tracking-5xl: -0.015em;
93
+ --tracking-6xl: -0.02em;
94
+ --tracking-7xl: -0.02em;
82
95
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wallarm-org/design-system",
3
- "version": "1.1.0-rc-feature-AS-1060.1",
3
+ "version": "1.1.0",
4
4
  "description": "Core design system library with React components and Storybook documentation",
5
5
  "publishConfig": {
6
6
  "access": "public",