@rdna/radiants 0.1.3 → 0.1.5
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/base.css +1 -1
- package/components/core/AppWindow/AppWindow.meta.ts +69 -0
- package/components/core/AppWindow/AppWindow.schema.json +55 -0
- package/components/core/AppWindow/AppWindow.test.tsx +150 -0
- package/components/core/AppWindow/AppWindow.tsx +830 -0
- package/components/core/Button/Button.test.tsx +18 -0
- package/components/core/Button/Button.tsx +26 -16
- package/components/core/DialPanel/DialPanel.tsx +1 -1
- package/components/core/Separator/Separator.tsx +1 -1
- package/components/core/Tabs/Tabs.tsx +14 -2
- package/components/core/__tests__/smoke.test.tsx +2 -0
- package/components/core/index.ts +1 -0
- package/contract/system.ts +18 -4
- package/dark.css +11 -1
- package/eslint/contract.mjs +1 -1
- package/eslint/index.mjs +10 -0
- package/eslint/rules/no-raw-font-family.mjs +91 -0
- package/eslint/rules/no-raw-line-height.mjs +119 -0
- package/fonts/.gitkeep +0 -0
- package/fonts/Mondwest-Bold.woff2 +0 -0
- package/fonts/Mondwest.woff2 +0 -0
- package/fonts/PixeloidSans-Bold.woff2 +0 -0
- package/fonts/PixeloidSans.woff2 +0 -0
- package/fonts/WavesBlackletterCPC-Base.woff2 +0 -0
- package/fonts/WavesTinyCPC-Extended.woff2 +0 -0
- package/fonts-core.css +70 -0
- package/fonts-editorial.css +45 -0
- package/fonts.css +19 -89
- package/generated/ai-contract.json +11 -2
- package/generated/contract.freshness.json +2 -1
- package/generated/eslint-contract.json +35 -4
- package/generated/figma/contracts/app-window.contract.json +82 -0
- package/generated/figma/primitive/color.tokens.json +9 -0
- package/generated/figma/primitive/shape.tokens.json +0 -4
- package/generated/figma/primitive/typography.tokens.json +16 -4
- package/generated/figma/rdna.tokens.json +28 -11
- package/generated/figma/semantic/semantic.tokens.json +3 -3
- package/generated/figma/tokens.d.ts +1 -1
- package/generated/figma/validation-report.json +1 -1
- package/icons/DesktopIcons.tsx +4 -3
- package/icons/Icon.tsx +10 -2
- package/icons/types.ts +7 -1
- package/meta/index.ts +6 -0
- package/package.json +6 -5
- package/patterns/pretext-type-scale.ts +115 -0
- package/pixel-corners.generated.css +15 -0
- package/schemas/index.ts +2 -0
- package/tokens.css +47 -21
- package/typography.css +10 -5
- package/fonts/PixelCode-Black-Italic.woff2 +0 -0
- package/fonts/PixelCode-Black.woff2 +0 -0
- package/fonts/PixelCode-DemiBold-Italic.woff2 +0 -0
- package/fonts/PixelCode-DemiBold.woff2 +0 -0
- package/fonts/PixelCode-ExtraBlack-Italic.woff2 +0 -0
- package/fonts/PixelCode-ExtraBlack.woff2 +0 -0
- package/fonts/PixelCode-ExtraBold-Italic.woff2 +0 -0
- package/fonts/PixelCode-ExtraBold.woff2 +0 -0
- package/fonts/PixelCode-ExtraLight-Italic.woff2 +0 -0
- package/fonts/PixelCode-ExtraLight.woff2 +0 -0
- package/fonts/PixelCode-Thin-Italic.woff2 +0 -0
- package/fonts/PixelCode-Thin.woff2 +0 -0
package/fonts.css
CHANGED
|
@@ -1,105 +1,35 @@
|
|
|
1
1
|
/* =============================================================================
|
|
2
2
|
fonts.css - @rdna/radiants Font Definitions
|
|
3
|
+
Imports core (initial load) and editorial (lazy load) font declarations.
|
|
4
|
+
Existing consumers that import fonts.css get everything.
|
|
5
|
+
Apps can import fonts-core.css alone for initial load.
|
|
3
6
|
============================================================================= */
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
----------------------------------------------------------------------------- */
|
|
8
|
-
|
|
9
|
-
/* Mondwest - Body font
|
|
10
|
-
Consumers may define their own local/project @font-face for Mondwest.
|
|
11
|
-
The RDNA package does not ship those files due licensing.
|
|
12
|
-
----------------------------------------------------------------------------- */
|
|
13
|
-
|
|
14
|
-
/* Joystix - Heading font
|
|
15
|
-
----------------------------------------------------------------------------- */
|
|
16
|
-
|
|
17
|
-
@font-face {
|
|
18
|
-
font-family: 'Joystix Monospace';
|
|
19
|
-
src: url('./fonts/Joystix.woff2') format('woff2');
|
|
20
|
-
font-weight: 400;
|
|
21
|
-
font-style: normal;
|
|
22
|
-
font-display: swap;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/* PixelCode - Monospace font
|
|
26
|
-
----------------------------------------------------------------------------- */
|
|
27
|
-
|
|
28
|
-
@font-face {
|
|
29
|
-
font-family: 'PixelCode';
|
|
30
|
-
src: url('./fonts/PixelCode.woff2') format('woff2');
|
|
31
|
-
font-weight: 400;
|
|
32
|
-
font-style: normal;
|
|
33
|
-
font-display: swap;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
@font-face {
|
|
37
|
-
font-family: 'PixelCode';
|
|
38
|
-
src: url('./fonts/PixelCode-Italic.woff2') format('woff2');
|
|
39
|
-
font-weight: 400;
|
|
40
|
-
font-style: italic;
|
|
41
|
-
font-display: swap;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@font-face {
|
|
45
|
-
font-family: 'PixelCode';
|
|
46
|
-
src: url('./fonts/PixelCode-Bold.woff2') format('woff2');
|
|
47
|
-
font-weight: 700;
|
|
48
|
-
font-style: normal;
|
|
49
|
-
font-display: swap;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
@font-face {
|
|
53
|
-
font-family: 'PixelCode';
|
|
54
|
-
src: url('./fonts/PixelCode-Bold-Italic.woff2') format('woff2');
|
|
55
|
-
font-weight: 700;
|
|
56
|
-
font-style: italic;
|
|
57
|
-
font-display: swap;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
@font-face {
|
|
61
|
-
font-family: 'PixelCode';
|
|
62
|
-
src: url('./fonts/PixelCode-Light.woff2') format('woff2');
|
|
63
|
-
font-weight: 300;
|
|
64
|
-
font-style: normal;
|
|
65
|
-
font-display: swap;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
@font-face {
|
|
69
|
-
font-family: 'PixelCode';
|
|
70
|
-
src: url('./fonts/PixelCode-Light-Italic.woff2') format('woff2');
|
|
71
|
-
font-weight: 300;
|
|
72
|
-
font-style: italic;
|
|
73
|
-
font-display: swap;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
@font-face {
|
|
77
|
-
font-family: 'PixelCode';
|
|
78
|
-
src: url('./fonts/PixelCode-Medium.woff2') format('woff2');
|
|
79
|
-
font-weight: 500;
|
|
80
|
-
font-style: normal;
|
|
81
|
-
font-display: swap;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
@font-face {
|
|
85
|
-
font-family: 'PixelCode';
|
|
86
|
-
src: url('./fonts/PixelCode-Medium-Italic.woff2') format('woff2');
|
|
87
|
-
font-weight: 500;
|
|
88
|
-
font-style: italic;
|
|
89
|
-
font-display: swap;
|
|
90
|
-
}
|
|
8
|
+
@import './fonts-core.css';
|
|
9
|
+
@import './fonts-editorial.css';
|
|
91
10
|
|
|
92
11
|
/* -----------------------------------------------------------------------------
|
|
93
12
|
Font Family Theme Variables
|
|
13
|
+
Available at load time even before editorial fonts resolve — components can
|
|
14
|
+
reference var(--font-blackletter) etc. and the value renders once the font loads.
|
|
94
15
|
----------------------------------------------------------------------------- */
|
|
95
16
|
|
|
96
17
|
@theme {
|
|
97
18
|
/* Semantic font roles */
|
|
98
|
-
--font-sans: 'Mondwest',
|
|
19
|
+
--font-sans: 'Mondwest', Georgia, 'Times New Roman', serif;
|
|
99
20
|
--font-heading: 'Joystix Monospace', monospace;
|
|
100
21
|
--font-mono: 'PixelCode', monospace;
|
|
101
22
|
|
|
102
|
-
/*
|
|
103
|
-
--font-
|
|
23
|
+
/* Semantic font roles — extended */
|
|
24
|
+
--font-display: 'Waves Blackletter CPC', serif;
|
|
25
|
+
--font-caption: 'Pixeloid Sans', sans-serif;
|
|
26
|
+
--font-tiny: 'Waves Tiny CPC', serif;
|
|
27
|
+
|
|
28
|
+
/* Named brand aliases */
|
|
29
|
+
--font-mondwest: 'Mondwest', Georgia, 'Times New Roman', serif;
|
|
104
30
|
--font-joystix: 'Joystix Monospace', monospace;
|
|
31
|
+
--font-pixel-code: 'PixelCode', monospace;
|
|
32
|
+
--font-blackletter: 'Waves Blackletter CPC', serif;
|
|
33
|
+
--font-pixeloid: 'Pixeloid Sans', sans-serif;
|
|
34
|
+
--font-waves-tiny: 'Waves Tiny CPC', serif;
|
|
105
35
|
}
|
|
@@ -289,7 +289,7 @@
|
|
|
289
289
|
},
|
|
290
290
|
{
|
|
291
291
|
"name": "pure-white",
|
|
292
|
-
"hex": "#
|
|
292
|
+
"hex": "#fffcf3"
|
|
293
293
|
},
|
|
294
294
|
{
|
|
295
295
|
"name": "success-mint",
|
|
@@ -305,7 +305,16 @@
|
|
|
305
305
|
"text-lg",
|
|
306
306
|
"text-xl",
|
|
307
307
|
"text-2xl",
|
|
308
|
-
"text-3xl"
|
|
308
|
+
"text-3xl",
|
|
309
|
+
"text-4xl",
|
|
310
|
+
"text-5xl",
|
|
311
|
+
"text-fluid-sm",
|
|
312
|
+
"text-fluid-base",
|
|
313
|
+
"text-fluid-lg",
|
|
314
|
+
"text-fluid-xl",
|
|
315
|
+
"text-fluid-2xl",
|
|
316
|
+
"text-fluid-3xl",
|
|
317
|
+
"text-fluid-4xl"
|
|
309
318
|
],
|
|
310
319
|
"weights": [
|
|
311
320
|
"font-normal",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"sourceHash": "
|
|
2
|
+
"sourceHash": "373835957df725c1500ea1772e9ec44613f94d0049713586b434dbc695f2bd42",
|
|
3
3
|
"inputs": [
|
|
4
4
|
"packages/radiants/components/core/Alert/Alert.meta.ts",
|
|
5
5
|
"packages/radiants/components/core/AlertDialog/AlertDialog.meta.ts",
|
|
6
|
+
"packages/radiants/components/core/AppWindow/AppWindow.meta.ts",
|
|
6
7
|
"packages/radiants/components/core/Avatar/Avatar.meta.ts",
|
|
7
8
|
"packages/radiants/components/core/Badge/Badge.meta.ts",
|
|
8
9
|
"packages/radiants/components/core/Breadcrumbs/Breadcrumbs.meta.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"#fcc383": "sunset-fuzz",
|
|
12
12
|
"#ff6b63": "sun-red",
|
|
13
13
|
"#cef5ca": "mint",
|
|
14
|
-
"#
|
|
14
|
+
"#fffcf3": "pure-white",
|
|
15
15
|
"#22c55e": "success-mint"
|
|
16
16
|
},
|
|
17
17
|
"hexToSemantic": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"bg": "success",
|
|
36
36
|
"text": "success"
|
|
37
37
|
},
|
|
38
|
-
"#
|
|
38
|
+
"#fffcf3": {
|
|
39
39
|
"bg": "card"
|
|
40
40
|
},
|
|
41
41
|
"#22c55e": {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"bg": "status-success",
|
|
72
72
|
"text": "status-success"
|
|
73
73
|
},
|
|
74
|
-
"oklch(
|
|
74
|
+
"oklch(0.9909 0.0123 91.51)": {
|
|
75
75
|
"bg": "card"
|
|
76
76
|
},
|
|
77
77
|
"oklch(0.7227 0.1920 149.58)": {
|
|
@@ -322,13 +322,44 @@
|
|
|
322
322
|
"text-lg",
|
|
323
323
|
"text-xl",
|
|
324
324
|
"text-2xl",
|
|
325
|
-
"text-3xl"
|
|
325
|
+
"text-3xl",
|
|
326
|
+
"text-4xl",
|
|
327
|
+
"text-5xl",
|
|
328
|
+
"text-fluid-sm",
|
|
329
|
+
"text-fluid-base",
|
|
330
|
+
"text-fluid-lg",
|
|
331
|
+
"text-fluid-xl",
|
|
332
|
+
"text-fluid-2xl",
|
|
333
|
+
"text-fluid-3xl",
|
|
334
|
+
"text-fluid-4xl"
|
|
326
335
|
],
|
|
327
336
|
"validWeights": [
|
|
328
337
|
"font-normal",
|
|
329
338
|
"font-medium",
|
|
330
339
|
"font-semibold",
|
|
331
340
|
"font-bold"
|
|
341
|
+
],
|
|
342
|
+
"validLeading": [
|
|
343
|
+
"leading-tight",
|
|
344
|
+
"leading-heading",
|
|
345
|
+
"leading-snug",
|
|
346
|
+
"leading-normal",
|
|
347
|
+
"leading-relaxed",
|
|
348
|
+
"leading-none"
|
|
349
|
+
],
|
|
350
|
+
"validTracking": [
|
|
351
|
+
"tracking-tight",
|
|
352
|
+
"tracking-normal",
|
|
353
|
+
"tracking-wide"
|
|
354
|
+
],
|
|
355
|
+
"validFontFamilies": [
|
|
356
|
+
"font-sans",
|
|
357
|
+
"font-heading",
|
|
358
|
+
"font-mono",
|
|
359
|
+
"font-display",
|
|
360
|
+
"font-caption",
|
|
361
|
+
"font-mondwest",
|
|
362
|
+
"font-joystix"
|
|
332
363
|
]
|
|
333
364
|
},
|
|
334
365
|
"textLikeInputTypes": [
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "app-window",
|
|
3
|
+
"name": "AppWindow",
|
|
4
|
+
"description": "Desktop-style application window with draggable chrome, optional resize handles, and mobile/fullscreen presentations.",
|
|
5
|
+
"sourcePath": "packages/radiants/components/core/AppWindow/AppWindow.tsx",
|
|
6
|
+
"schemaPath": "packages/radiants/components/core/AppWindow/AppWindow.schema.json",
|
|
7
|
+
"importPath": "@rdna/radiants/components/core",
|
|
8
|
+
"platforms": [
|
|
9
|
+
"web"
|
|
10
|
+
],
|
|
11
|
+
"category": "layout",
|
|
12
|
+
"renderMode": "description-only",
|
|
13
|
+
"tags": [
|
|
14
|
+
"window",
|
|
15
|
+
"desktop",
|
|
16
|
+
"shell"
|
|
17
|
+
],
|
|
18
|
+
"props": {
|
|
19
|
+
"id": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Stable window identifier used for aria and share-link behavior."
|
|
22
|
+
},
|
|
23
|
+
"title": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "Window title shown in the title bar."
|
|
26
|
+
},
|
|
27
|
+
"open": {
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"default": true,
|
|
30
|
+
"description": "Whether the window is currently rendered."
|
|
31
|
+
},
|
|
32
|
+
"resizable": {
|
|
33
|
+
"type": "boolean",
|
|
34
|
+
"default": true,
|
|
35
|
+
"description": "Enables resize handles in desktop window presentation."
|
|
36
|
+
},
|
|
37
|
+
"presentation": {
|
|
38
|
+
"type": "enum",
|
|
39
|
+
"values": [
|
|
40
|
+
"window",
|
|
41
|
+
"fullscreen",
|
|
42
|
+
"mobile"
|
|
43
|
+
],
|
|
44
|
+
"default": "window",
|
|
45
|
+
"description": "Selects windowed, fullscreen, or mobile shell presentation."
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"slots": {
|
|
49
|
+
"children": {
|
|
50
|
+
"description": "Window content, usually an AppWindowBody or custom app layout."
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"subcomponents": [
|
|
54
|
+
"AppWindow",
|
|
55
|
+
"AppWindowBody",
|
|
56
|
+
"AppWindowSplitView",
|
|
57
|
+
"AppWindowPane"
|
|
58
|
+
],
|
|
59
|
+
"states": [],
|
|
60
|
+
"variants": [],
|
|
61
|
+
"exampleProps": {},
|
|
62
|
+
"controlledProps": [],
|
|
63
|
+
"examples": [
|
|
64
|
+
{
|
|
65
|
+
"name": "Desktop window shell",
|
|
66
|
+
"code": "<AppWindow id=\"about\" title=\"About\">\n <AppWindowBody>Content</AppWindowBody>\n</AppWindow>"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "Two-pane compare layout",
|
|
70
|
+
"code": "<AppWindow id=\"lab\" title=\"Control Surface Lab\">\n <AppWindowSplitView>\n <AppWindowPane>Legacy</AppWindowPane>\n <AppWindowPane>RDNA</AppWindowPane>\n </AppWindowSplitView>\n</AppWindow>"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"tokens": {},
|
|
74
|
+
"tokenBindings": {},
|
|
75
|
+
"replaces": [],
|
|
76
|
+
"pixelCorners": false,
|
|
77
|
+
"shadowSystem": null,
|
|
78
|
+
"styleOwnership": [],
|
|
79
|
+
"structuralRules": [],
|
|
80
|
+
"wraps": null,
|
|
81
|
+
"a11y": null
|
|
82
|
+
}
|
|
@@ -46,6 +46,15 @@
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
+
"sky-blue-dark": {
|
|
50
|
+
"$type": "color",
|
|
51
|
+
"$value": "oklch(0.47 0.08 237)",
|
|
52
|
+
"$extensions": {
|
|
53
|
+
"rdna": {
|
|
54
|
+
"srgb": "#276182"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
49
58
|
"sunset-fuzz": {
|
|
50
59
|
"$type": "color",
|
|
51
60
|
"$value": "oklch(0.8546 0.1039 68.93)",
|
|
@@ -15,19 +15,31 @@
|
|
|
15
15
|
},
|
|
16
16
|
"lg": {
|
|
17
17
|
"$type": "fontSize",
|
|
18
|
-
"$value": "1.
|
|
18
|
+
"$value": "1.333rem"
|
|
19
19
|
},
|
|
20
20
|
"xl": {
|
|
21
21
|
"$type": "fontSize",
|
|
22
|
-
"$value": "1.
|
|
22
|
+
"$value": "1.777rem"
|
|
23
23
|
},
|
|
24
24
|
"2xl": {
|
|
25
25
|
"$type": "fontSize",
|
|
26
|
-
"$value": "
|
|
26
|
+
"$value": "2.369rem"
|
|
27
27
|
},
|
|
28
28
|
"3xl": {
|
|
29
29
|
"$type": "fontSize",
|
|
30
|
-
"$value": "
|
|
30
|
+
"$value": "3.157rem"
|
|
31
|
+
},
|
|
32
|
+
"4xl": {
|
|
33
|
+
"$type": "fontSize",
|
|
34
|
+
"$value": "4.209rem"
|
|
35
|
+
},
|
|
36
|
+
"5xl": {
|
|
37
|
+
"$type": "fontSize",
|
|
38
|
+
"$value": "5.61rem"
|
|
39
|
+
},
|
|
40
|
+
"display": {
|
|
41
|
+
"$type": "fontSize",
|
|
42
|
+
"$value": "5.61rem"
|
|
31
43
|
}
|
|
32
44
|
}
|
|
33
45
|
}
|
|
@@ -48,6 +48,15 @@
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
|
+
"sky-blue-dark": {
|
|
52
|
+
"$type": "color",
|
|
53
|
+
"$value": "oklch(0.47 0.08 237)",
|
|
54
|
+
"$extensions": {
|
|
55
|
+
"rdna": {
|
|
56
|
+
"srgb": "#276182"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
51
60
|
"sunset-fuzz": {
|
|
52
61
|
"$type": "color",
|
|
53
62
|
"$value": "oklch(0.8546 0.1039 68.93)",
|
|
@@ -254,10 +263,6 @@
|
|
|
254
263
|
"comfortable": {
|
|
255
264
|
"$type": "dimension",
|
|
256
265
|
"$value": "48px"
|
|
257
|
-
},
|
|
258
|
-
"default": {
|
|
259
|
-
"$type": "dimension",
|
|
260
|
-
"$value": "{touchTarget.comfortable}"
|
|
261
266
|
}
|
|
262
267
|
},
|
|
263
268
|
"breakpoint": {
|
|
@@ -367,19 +372,31 @@
|
|
|
367
372
|
},
|
|
368
373
|
"lg": {
|
|
369
374
|
"$type": "fontSize",
|
|
370
|
-
"$value": "1.
|
|
375
|
+
"$value": "1.333rem"
|
|
371
376
|
},
|
|
372
377
|
"xl": {
|
|
373
378
|
"$type": "fontSize",
|
|
374
|
-
"$value": "1.
|
|
379
|
+
"$value": "1.777rem"
|
|
375
380
|
},
|
|
376
381
|
"2xl": {
|
|
377
382
|
"$type": "fontSize",
|
|
378
|
-
"$value": "
|
|
383
|
+
"$value": "2.369rem"
|
|
379
384
|
},
|
|
380
385
|
"3xl": {
|
|
381
386
|
"$type": "fontSize",
|
|
382
|
-
"$value": "
|
|
387
|
+
"$value": "3.157rem"
|
|
388
|
+
},
|
|
389
|
+
"4xl": {
|
|
390
|
+
"$type": "fontSize",
|
|
391
|
+
"$value": "4.209rem"
|
|
392
|
+
},
|
|
393
|
+
"5xl": {
|
|
394
|
+
"$type": "fontSize",
|
|
395
|
+
"$value": "5.61rem"
|
|
396
|
+
},
|
|
397
|
+
"display": {
|
|
398
|
+
"$type": "fontSize",
|
|
399
|
+
"$value": "5.61rem"
|
|
383
400
|
}
|
|
384
401
|
}
|
|
385
402
|
}
|
|
@@ -629,16 +646,16 @@
|
|
|
629
646
|
},
|
|
630
647
|
"link": {
|
|
631
648
|
"$type": "color",
|
|
632
|
-
"$value": "{color.sky-blue}",
|
|
649
|
+
"$value": "{color.sky-blue-dark}",
|
|
633
650
|
"$extensions": {
|
|
634
651
|
"modes": {
|
|
635
|
-
"light": "{color.sky-blue}",
|
|
652
|
+
"light": "{color.sky-blue-dark}",
|
|
636
653
|
"dark": "{color.sky-blue}"
|
|
637
654
|
},
|
|
638
655
|
"rdna": {
|
|
639
656
|
"source": "--color-content-link",
|
|
640
657
|
"srgb": {
|
|
641
|
-
"light": "#
|
|
658
|
+
"light": "#276182",
|
|
642
659
|
"dark": "#95bad2"
|
|
643
660
|
}
|
|
644
661
|
}
|
|
@@ -243,16 +243,16 @@
|
|
|
243
243
|
},
|
|
244
244
|
"link": {
|
|
245
245
|
"$type": "color",
|
|
246
|
-
"$value": "{color.sky-blue}",
|
|
246
|
+
"$value": "{color.sky-blue-dark}",
|
|
247
247
|
"$extensions": {
|
|
248
248
|
"modes": {
|
|
249
|
-
"light": "{color.sky-blue}",
|
|
249
|
+
"light": "{color.sky-blue-dark}",
|
|
250
250
|
"dark": "{color.sky-blue}"
|
|
251
251
|
},
|
|
252
252
|
"rdna": {
|
|
253
253
|
"source": "--color-content-link",
|
|
254
254
|
"srgb": {
|
|
255
|
-
"light": "#
|
|
255
|
+
"light": "#276182",
|
|
256
256
|
"dark": "#95bad2"
|
|
257
257
|
}
|
|
258
258
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// AUTO-GENERATED — DO NOT EDIT
|
|
2
2
|
// Generated by scripts/generate-figma-contracts.ts
|
|
3
3
|
|
|
4
|
-
export type PrimitiveColorTokenName = 'color.cream' | 'color.error-red' | 'color.focus-state' | 'color.ink' | 'color.mint' | 'color.pure-black' | 'color.pure-white' | 'color.sky-blue' | 'color.success-mint' | 'color.sun-red' | 'color.sun-yellow' | 'color.sunset-fuzz' | 'color.warning-yellow';
|
|
4
|
+
export type PrimitiveColorTokenName = 'color.cream' | 'color.error-red' | 'color.focus-state' | 'color.ink' | 'color.mint' | 'color.pure-black' | 'color.pure-white' | 'color.sky-blue' | 'color.sky-blue-dark' | 'color.success-mint' | 'color.sun-red' | 'color.sun-yellow' | 'color.sunset-fuzz' | 'color.warning-yellow';
|
|
5
5
|
export type SemanticColorTokenName = '$description.0' | '$description.1' | '$description.10' | '$description.100' | '$description.101' | '$description.102' | '$description.103' | '$description.104' | '$description.105' | '$description.106' | '$description.107' | '$description.108' | '$description.109' | '$description.11' | '$description.110' | '$description.111' | '$description.112' | '$description.113' | '$description.114' | '$description.115' | '$description.116' | '$description.117' | '$description.12' | '$description.13' | '$description.14' | '$description.15' | '$description.16' | '$description.17' | '$description.18' | '$description.19' | '$description.2' | '$description.20' | '$description.21' | '$description.22' | '$description.23' | '$description.24' | '$description.25' | '$description.26' | '$description.27' | '$description.28' | '$description.29' | '$description.3' | '$description.30' | '$description.31' | '$description.32' | '$description.33' | '$description.34' | '$description.35' | '$description.36' | '$description.37' | '$description.38' | '$description.39' | '$description.4' | '$description.40' | '$description.41' | '$description.42' | '$description.43' | '$description.44' | '$description.45' | '$description.46' | '$description.47' | '$description.48' | '$description.49' | '$description.5' | '$description.50' | '$description.51' | '$description.52' | '$description.53' | '$description.54' | '$description.55' | '$description.56' | '$description.57' | '$description.58' | '$description.59' | '$description.6' | '$description.60' | '$description.61' | '$description.62' | '$description.63' | '$description.64' | '$description.65' | '$description.66' | '$description.67' | '$description.68' | '$description.69' | '$description.7' | '$description.70' | '$description.71' | '$description.72' | '$description.73' | '$description.74' | '$description.75' | '$description.76' | '$description.77' | '$description.78' | '$description.79' | '$description.8' | '$description.80' | '$description.81' | '$description.82' | '$description.83' | '$description.84' | '$description.85' | '$description.86' | '$description.87' | '$description.88' | '$description.89' | '$description.9' | '$description.90' | '$description.91' | '$description.92' | '$description.93' | '$description.94' | '$description.95' | '$description.96' | '$description.97' | '$description.98' | '$description.99' | 'action.accent' | 'action.accent-inv' | 'action.accent-soft' | 'action.danger' | 'action.destructive' | 'action.primary' | 'action.secondary' | 'content.flip' | 'content.head' | 'content.heading' | 'content.inverted' | 'content.link' | 'content.main' | 'content.mute' | 'content.muted' | 'content.primary' | 'content.secondary' | 'content.sub' | 'edge.focus' | 'edge.hover' | 'edge.line' | 'edge.line-hover' | 'edge.muted' | 'edge.primary' | 'edge.rule' | 'status.error' | 'status.info' | 'status.success' | 'status.warning' | 'surface.active' | 'surface.card' | 'surface.depth' | 'surface.hover' | 'surface.inv' | 'surface.page' | 'surface.tinted' | 'surface.window-chrome-from' | 'surface.window-chrome-to';
|
|
6
6
|
export type RadiantsTokenName = PrimitiveColorTokenName | SemanticColorTokenName;
|
package/icons/DesktopIcons.tsx
CHANGED
|
@@ -12,7 +12,8 @@ export { ICON_SIZE, type IconSize } from './types';
|
|
|
12
12
|
// Brand Icons
|
|
13
13
|
// ============================================================================
|
|
14
14
|
|
|
15
|
-
export function RadMarkIcon({ className = '', size =
|
|
15
|
+
export function RadMarkIcon({ className = '', size: sizeProp, large = false }: IconProps) {
|
|
16
|
+
const size = sizeProp ?? (large ? 24 : 16);
|
|
16
17
|
return (
|
|
17
18
|
<svg
|
|
18
19
|
width={size}
|
|
@@ -35,8 +36,8 @@ export function RadMarkIcon({ className = '', size = 65 }: IconProps) {
|
|
|
35
36
|
// Special non-SVG icons
|
|
36
37
|
// ============================================================================
|
|
37
38
|
|
|
38
|
-
export function FontAaIcon({ className = '', size =
|
|
39
|
-
const numSize = typeof
|
|
39
|
+
export function FontAaIcon({ className = '', size: sizeProp, large = false }: IconProps) {
|
|
40
|
+
const numSize = sizeProp ? (typeof sizeProp === 'string' ? parseFloat(sizeProp) || 16 : Number(sizeProp)) : (large ? 24 : 16);
|
|
40
41
|
return (
|
|
41
42
|
<span
|
|
42
43
|
className={`font-mondwest font-bold ${className}`}
|
package/icons/Icon.tsx
CHANGED
|
@@ -8,8 +8,14 @@ import type { IconProps as SvgIconProps, IconSet } from './types';
|
|
|
8
8
|
interface IconProps {
|
|
9
9
|
/** Icon name (filename without .svg extension) */
|
|
10
10
|
name: string;
|
|
11
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* Render size in pixels (applies to both width and height).
|
|
13
|
+
* Prefer using the `large` prop instead. When both are provided, `size` takes precedence.
|
|
14
|
+
* @deprecated Use `large` prop for 24px icons. Omit for default 16px.
|
|
15
|
+
*/
|
|
12
16
|
size?: number;
|
|
17
|
+
/** When true, renders at 24px (1.5rem) using the 24px icon set. Default: 16px (1rem). */
|
|
18
|
+
large?: boolean;
|
|
13
19
|
/**
|
|
14
20
|
* Which icon set to load from (16px pixel-art or 24px detailed).
|
|
15
21
|
* Defaults based on size: ≤20 → 16, >20 → 24.
|
|
@@ -86,12 +92,14 @@ function renderPlaceholder(size: number, className: string, ariaLabel?: string)
|
|
|
86
92
|
*/
|
|
87
93
|
function IconComponent({
|
|
88
94
|
name,
|
|
89
|
-
size
|
|
95
|
+
size: sizeProp,
|
|
96
|
+
large = false,
|
|
90
97
|
iconSet,
|
|
91
98
|
className = '',
|
|
92
99
|
'aria-label': ariaLabel,
|
|
93
100
|
basePath = DEFAULT_ICON_BASE_PATH,
|
|
94
101
|
}: IconProps) {
|
|
102
|
+
const size = sizeProp ?? (large ? 24 : 16);
|
|
95
103
|
const [LoadedIcon, setLoadedIcon] = useState<LoadedIcon | null>(null);
|
|
96
104
|
const [fetchedSvg, setFetchedSvg] = useState<string | null>(null);
|
|
97
105
|
|
package/icons/types.ts
CHANGED
|
@@ -11,8 +11,14 @@ import type { SVGProps } from 'react';
|
|
|
11
11
|
export type IconSet = 16 | 24;
|
|
12
12
|
|
|
13
13
|
export interface IconProps extends SVGProps<SVGSVGElement> {
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* Render size in pixels (applies to both width and height).
|
|
16
|
+
* Prefer using `large` prop instead. When both are provided, `size` takes precedence.
|
|
17
|
+
* @deprecated Use `large` prop for 24px icons. Omit for default 16px.
|
|
18
|
+
*/
|
|
15
19
|
size?: number | string;
|
|
20
|
+
/** When true, renders at 24px. Default: 16px. */
|
|
21
|
+
large?: boolean;
|
|
16
22
|
/** Additional CSS classes */
|
|
17
23
|
className?: string;
|
|
18
24
|
}
|
package/meta/index.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { AlertMeta } from "../components/core/Alert/Alert.meta.ts";
|
|
5
5
|
import { AlertDialogMeta } from "../components/core/AlertDialog/AlertDialog.meta.ts";
|
|
6
|
+
import { AppWindowMeta } from "../components/core/AppWindow/AppWindow.meta.ts";
|
|
6
7
|
import { AvatarMeta } from "../components/core/Avatar/Avatar.meta.ts";
|
|
7
8
|
import { BadgeMeta } from "../components/core/Badge/Badge.meta.ts";
|
|
8
9
|
import { BreadcrumbsMeta } from "../components/core/Breadcrumbs/Breadcrumbs.meta.ts";
|
|
@@ -53,6 +54,11 @@ export const componentMetaIndex = {
|
|
|
53
54
|
sourcePath: "packages/radiants/components/core/AlertDialog/AlertDialog.tsx",
|
|
54
55
|
schemaPath: "packages/radiants/components/core/AlertDialog/AlertDialog.schema.json",
|
|
55
56
|
},
|
|
57
|
+
AppWindow: {
|
|
58
|
+
meta: AppWindowMeta,
|
|
59
|
+
sourcePath: "packages/radiants/components/core/AppWindow/AppWindow.tsx",
|
|
60
|
+
schemaPath: "packages/radiants/components/core/AppWindow/AppWindow.schema.json",
|
|
61
|
+
},
|
|
56
62
|
Avatar: {
|
|
57
63
|
meta: AvatarMeta,
|
|
58
64
|
sourcePath: "packages/radiants/components/core/Avatar/Avatar.tsx",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rdna/radiants",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Radiants theme package for DNA - retro pixel aesthetic",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -48,8 +48,7 @@
|
|
|
48
48
|
"components/",
|
|
49
49
|
"icons/",
|
|
50
50
|
"schemas/",
|
|
51
|
-
"fonts/
|
|
52
|
-
"fonts/PixelCode*.woff2",
|
|
51
|
+
"fonts/",
|
|
53
52
|
"assets/",
|
|
54
53
|
"dna.config.json",
|
|
55
54
|
"LICENSE",
|
|
@@ -102,6 +101,7 @@
|
|
|
102
101
|
"test:components:watch": "vitest"
|
|
103
102
|
},
|
|
104
103
|
"devDependencies": {
|
|
104
|
+
"@rdna/preview": "workspace:*",
|
|
105
105
|
"@svgr/core": "^8.1.0",
|
|
106
106
|
"@svgr/plugin-jsx": "^8.1.0",
|
|
107
107
|
"@testing-library/jest-dom": "^6.9.1",
|
|
@@ -109,7 +109,6 @@
|
|
|
109
109
|
"@testing-library/user-event": "^14.6.1",
|
|
110
110
|
"@types/react": "^19.2.9",
|
|
111
111
|
"@types/react-dom": "^19.2.3",
|
|
112
|
-
"@rdna/preview": "workspace:*",
|
|
113
112
|
"culori": "^4.0.2",
|
|
114
113
|
"eslint": "^9",
|
|
115
114
|
"jsdom": "^28.1.0",
|
|
@@ -119,8 +118,10 @@
|
|
|
119
118
|
},
|
|
120
119
|
"dependencies": {
|
|
121
120
|
"@base-ui/react": "^1.3.0",
|
|
121
|
+
"@chenglou/pretext": "^0.0.2",
|
|
122
122
|
"class-variance-authority": "^0.7.1",
|
|
123
123
|
"dialkit": "^1.1.0",
|
|
124
|
-
"motion": "^12.38.0"
|
|
124
|
+
"motion": "^12.38.0",
|
|
125
|
+
"react-draggable": "^4.5.0"
|
|
125
126
|
}
|
|
126
127
|
}
|