@astryxdesign/cli 0.1.1 → 0.1.2-canary.2149fa3
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/CHANGELOG.md +50 -0
- package/docs/theme.doc.mjs +2 -2
- package/docs/working-with-ai.doc.mjs +6 -6
- package/package.json +19 -8
- package/src/api/discover.mjs +78 -26
- package/src/api/index.mjs +1 -0
- package/src/api/layout.mjs +301 -0
- package/src/api/layout.test.mjs +238 -0
- package/src/api/template.mjs +191 -50
- package/src/api/template.test.mjs +2 -0
- package/src/api/theme-add.mjs +182 -0
- package/src/codemods/__tests__/registry.test.mjs +1 -0
- package/src/codemods/registry.mjs +1 -0
- package/src/codemods/transforms/v0.1.2/__tests__/rename-text-color-active-to-accent.test.mjs +120 -0
- package/src/codemods/transforms/v0.1.2/index.mjs +19 -0
- package/src/codemods/transforms/v0.1.2/rename-text-color-active-to-accent.mjs +136 -0
- package/src/commands/build-theme.import-path.test.mjs +22 -2
- package/src/commands/build-theme.mjs +185 -16
- package/src/commands/gap-report.mjs +17 -9
- package/src/commands/gap-report.test.mjs +21 -16
- package/src/commands/init.mjs +34 -8
- package/src/commands/init.next-steps.test.mjs +46 -0
- package/src/commands/layout.mjs +139 -0
- package/src/commands/swizzle.mjs +51 -23
- package/src/commands/upgrade.mjs +2 -71
- package/src/config.mjs +31 -0
- package/src/config.test.mjs +24 -0
- package/src/index.mjs +6 -0
- package/src/lib/config-schema.mjs +119 -0
- package/src/lib/config.mjs +34 -7
- package/src/lib/config.test.mjs +51 -2
- package/src/lib/error-codes.mjs +11 -0
- package/src/lib/integrations.mjs +155 -0
- package/src/lib/integrations.test.mjs +154 -0
- package/src/lib/levenshtein.mjs +29 -0
- package/src/lib/manifest.mjs +10 -0
- package/src/lib/package-scanner.mjs +31 -7
- package/src/lib/string-utils.mjs +5 -14
- package/src/lib/xle/browser.d.ts +100 -0
- package/src/lib/xle/browser.mjs +120 -0
- package/src/lib/xle/expand.mjs +622 -0
- package/src/lib/xle/parse.mjs +581 -0
- package/src/lib/xle/print.mjs +174 -0
- package/src/lib/xle/registry-core.mjs +170 -0
- package/src/lib/xle/registry.mjs +237 -0
- package/src/lib/xle/splice.mjs +137 -0
- package/src/lib/xle/validate.mjs +356 -0
- package/src/lib/xle/xle.test.mjs +333 -0
- package/src/types/config.d.ts +99 -0
- package/src/utils/github.mjs +12 -27
- package/templates/blocks/components/Card/ClickableCardWithNestedButton.doc.mjs +1 -1
- package/templates/blocks/components/Card/SelectableCardMulti.doc.mjs +1 -1
- package/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerWithProgress.tsx +1 -1
- package/templates/blocks/components/ChatDictationButton/ChatDictationButtonShowcase.tsx +3 -3
- package/templates/blocks/components/CommandPaletteEmpty/CommandPaletteEmptyShowcase.doc.mjs +15 -0
- package/templates/blocks/components/CommandPaletteEmpty/CommandPaletteEmptyShowcase.tsx +26 -0
- package/templates/blocks/components/DateInput/DateInputDateRange.doc.mjs +2 -2
- package/templates/blocks/components/FileInput/FileInputShowcase.tsx +4 -2
- package/templates/blocks/components/LinkProvider/LinkProviderCustomLink.doc.mjs +14 -0
- package/templates/blocks/components/LinkProvider/LinkProviderCustomLink.tsx +43 -0
- package/templates/blocks/components/MultiSelector/MultiSelectorShowcase.tsx +6 -2
- package/templates/blocks/components/NumberInput/NumberInputShowcase.tsx +6 -2
- package/templates/blocks/components/Outline/OutlineShowcase.doc.mjs +15 -0
- package/templates/blocks/components/Outline/OutlineShowcase.tsx +22 -0
- package/templates/blocks/components/RadioList/RadioListShowcase.tsx +8 -1
- package/templates/blocks/components/SegmentedControl/SegmentedControlShowcase.tsx +3 -1
- package/templates/blocks/components/Selector/SelectorShowcase.tsx +4 -1
- package/templates/blocks/components/Slider/SliderShowcase.tsx +10 -1
- package/templates/blocks/components/Tab/TabShowcase.tsx +3 -1
- package/templates/blocks/components/TabList/TabListShowcase.tsx +3 -1
- package/templates/blocks/components/TabMenu/TabMenuShowcase.tsx +3 -1
- package/templates/blocks/components/Table/ColumnResizeHookUsage.doc.mjs +14 -0
- package/templates/blocks/components/Table/ColumnResizeHookUsage.tsx +59 -0
- package/templates/blocks/components/Table/StickyColumnsHookUsage.doc.mjs +14 -0
- package/templates/blocks/components/Table/StickyColumnsHookUsage.tsx +104 -0
- package/templates/blocks/components/Text/TextColors.tsx +20 -5
- package/templates/blocks/components/TextArea/TextAreaShowcase.tsx +4 -2
- package/templates/blocks/components/TextInput/TextInputShowcase.tsx +4 -2
- package/templates/blocks/components/Thumbnail/ThumbnailDisabled.tsx +11 -6
- package/templates/blocks/components/Thumbnail/ThumbnailGallery.tsx +43 -7
- package/templates/blocks/components/Thumbnail/ThumbnailRemovable.tsx +40 -3
- package/templates/blocks/components/Thumbnail/ThumbnailShowcase.tsx +6 -5
- package/templates/blocks/components/Thumbnail/ThumbnailStates.tsx +11 -6
- package/templates/blocks/components/Timestamp/TimestampColors.tsx +2 -2
- package/templates/blocks/components/ToggleButton/ToggleButtonGroup.doc.mjs +1 -1
- package/templates/blocks/components/Tokenizer/TokenizerShowcase.tsx +8 -6
- package/templates/blocks/components/Toolbar/ToolbarTableFilter.doc.mjs +2 -2
- package/templates/blocks/components/Toolbar/ToolbarTableFilter.tsx +23 -14
- package/templates/blocks/components/Typeahead/TypeaheadShowcase.tsx +6 -2
- package/templates/pages/shell-nav/page.tsx +321 -0
- package/templates/pages/shell-nav/template.doc.mjs +12 -0
- package/templates/pages/shell-side-nav/page.tsx +242 -0
- package/templates/pages/shell-side-nav/template.doc.mjs +12 -0
- package/templates/pages/shell-top-nav/page.tsx +224 -0
- package/templates/pages/shell-top-nav/template.doc.mjs +12 -0
- package/templates/pages/theme-showcase/page.tsx +8 -19
- package/templates/themes/butter/butterTheme.ts +916 -0
- package/templates/themes/butter/icons.tsx +77 -0
- package/templates/themes/chocolate/chocolateTheme.ts +230 -0
- package/templates/themes/chocolate/icons.tsx +77 -0
- package/templates/themes/gothic/gothicTheme.ts +657 -0
- package/templates/themes/gothic/icons.tsx +77 -0
- package/templates/themes/manifest.json +90 -0
- package/templates/themes/matcha/icons.tsx +67 -0
- package/templates/themes/matcha/matchaTheme.ts +247 -0
- package/templates/themes/neutral/icons.tsx +77 -0
- package/templates/themes/neutral/neutralTheme.ts +603 -0
- package/templates/themes/stone/icons.tsx +77 -0
- package/templates/themes/stone/stoneTheme.ts +652 -0
- package/templates/themes/y2k/icons.tsx +67 -0
- package/templates/themes/y2k/y2kTheme.ts +617 -0
- package/templates/blocks/components/MoreMenu/MoreMenuInToolbar.doc.mjs +0 -14
- package/templates/blocks/components/MoreMenu/MoreMenuInToolbar.tsx +0 -57
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file icons.tsx
|
|
5
|
+
* @input Uses lucide-react icon components, IconRegistry type
|
|
6
|
+
* @output Exports gothicIconRegistry for the neutral theme
|
|
7
|
+
* @position Icon configuration for the neutral theme; consumed by index.ts
|
|
8
|
+
*
|
|
9
|
+
* Maps semantic icon names to Lucide icon components.
|
|
10
|
+
* These icons are bundled with the theme, not with @astryxdesign/core.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import type {IconRegistry} from '@astryxdesign/core/Icon';
|
|
15
|
+
|
|
16
|
+
import {
|
|
17
|
+
X,
|
|
18
|
+
ChevronDown,
|
|
19
|
+
ChevronLeft,
|
|
20
|
+
ChevronRight,
|
|
21
|
+
Check,
|
|
22
|
+
CheckCircle,
|
|
23
|
+
XCircle,
|
|
24
|
+
AlertTriangle,
|
|
25
|
+
Info,
|
|
26
|
+
Calendar,
|
|
27
|
+
Clock,
|
|
28
|
+
ExternalLink,
|
|
29
|
+
Menu,
|
|
30
|
+
MoreHorizontal,
|
|
31
|
+
Search,
|
|
32
|
+
ArrowUp,
|
|
33
|
+
ArrowDown,
|
|
34
|
+
ArrowUpDown,
|
|
35
|
+
Filter,
|
|
36
|
+
EyeOff,
|
|
37
|
+
Columns,
|
|
38
|
+
Copy,
|
|
39
|
+
CheckCheck,
|
|
40
|
+
Wrench,
|
|
41
|
+
Square,
|
|
42
|
+
Mic,
|
|
43
|
+
} from 'lucide-react';
|
|
44
|
+
|
|
45
|
+
const iconProps = {
|
|
46
|
+
size: '1em',
|
|
47
|
+
'aria-hidden': true as const,
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const gothicIconRegistry: IconRegistry = {
|
|
51
|
+
close: <X {...iconProps} />,
|
|
52
|
+
chevronDown: <ChevronDown {...iconProps} />,
|
|
53
|
+
chevronLeft: <ChevronLeft {...iconProps} />,
|
|
54
|
+
chevronRight: <ChevronRight {...iconProps} />,
|
|
55
|
+
check: <Check {...iconProps} />,
|
|
56
|
+
success: <CheckCircle {...iconProps} />,
|
|
57
|
+
error: <XCircle {...iconProps} />,
|
|
58
|
+
warning: <AlertTriangle {...iconProps} />,
|
|
59
|
+
info: <Info {...iconProps} />,
|
|
60
|
+
calendar: <Calendar {...iconProps} />,
|
|
61
|
+
clock: <Clock {...iconProps} />,
|
|
62
|
+
externalLink: <ExternalLink {...iconProps} />,
|
|
63
|
+
menu: <Menu {...iconProps} />,
|
|
64
|
+
moreHorizontal: <MoreHorizontal {...iconProps} />,
|
|
65
|
+
search: <Search {...iconProps} />,
|
|
66
|
+
arrowUp: <ArrowUp {...iconProps} />,
|
|
67
|
+
arrowDown: <ArrowDown {...iconProps} />,
|
|
68
|
+
arrowsUpDown: <ArrowUpDown {...iconProps} />,
|
|
69
|
+
funnel: <Filter {...iconProps} />,
|
|
70
|
+
eyeSlash: <EyeOff {...iconProps} />,
|
|
71
|
+
viewColumns: <Columns {...iconProps} />,
|
|
72
|
+
copy: <Copy {...iconProps} />,
|
|
73
|
+
checkDouble: <CheckCheck {...iconProps} />,
|
|
74
|
+
wrench: <Wrench {...iconProps} />,
|
|
75
|
+
stop: <Square {...iconProps} />,
|
|
76
|
+
microphone: <Mic {...iconProps} />,
|
|
77
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"generatedBy": "scripts/generate-cli-themes.mjs",
|
|
4
|
+
"themes": [
|
|
5
|
+
{
|
|
6
|
+
"slug": "butter",
|
|
7
|
+
"displayName": "Butter",
|
|
8
|
+
"description": "Warm, creamy yellows with a friendly blue accent. Playful enough for consumer surfaces, soft enough to stay readable.",
|
|
9
|
+
"maintained": false,
|
|
10
|
+
"entry": "butterTheme.ts",
|
|
11
|
+
"exportName": "butterTheme",
|
|
12
|
+
"files": [
|
|
13
|
+
"butterTheme.ts",
|
|
14
|
+
"icons.tsx"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"slug": "chocolate",
|
|
19
|
+
"displayName": "Chocolate",
|
|
20
|
+
"description": "Warm chocolate theme for Astryx — rich brown palette with Fraunces headings, Albert Sans body, and Lucide icons",
|
|
21
|
+
"maintained": false,
|
|
22
|
+
"entry": "chocolateTheme.ts",
|
|
23
|
+
"exportName": "chocolateTheme",
|
|
24
|
+
"files": [
|
|
25
|
+
"chocolateTheme.ts",
|
|
26
|
+
"icons.tsx"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"slug": "gothic",
|
|
31
|
+
"displayName": "Gothic",
|
|
32
|
+
"description": "Deep blue-grays and a signature display serif. Dramatic and editorial, for surfaces that want to be remembered.",
|
|
33
|
+
"maintained": false,
|
|
34
|
+
"entry": "gothicTheme.ts",
|
|
35
|
+
"exportName": "gothicTheme",
|
|
36
|
+
"files": [
|
|
37
|
+
"gothicTheme.ts",
|
|
38
|
+
"icons.tsx"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"slug": "matcha",
|
|
43
|
+
"displayName": "Matcha",
|
|
44
|
+
"description": "Earthy greens with a calm, organic feel. Naturalistic and grounded, great for wellness or content-first apps.",
|
|
45
|
+
"maintained": false,
|
|
46
|
+
"entry": "matchaTheme.ts",
|
|
47
|
+
"exportName": "matchaTheme",
|
|
48
|
+
"files": [
|
|
49
|
+
"matchaTheme.ts",
|
|
50
|
+
"icons.tsx"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"slug": "neutral",
|
|
55
|
+
"displayName": "Neutral",
|
|
56
|
+
"description": "Restrained warm grays. Minimal and quiet, so the content stays the focus.",
|
|
57
|
+
"maintained": true,
|
|
58
|
+
"entry": "neutralTheme.ts",
|
|
59
|
+
"exportName": "neutralTheme",
|
|
60
|
+
"files": [
|
|
61
|
+
"neutralTheme.ts",
|
|
62
|
+
"icons.tsx"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"slug": "stone",
|
|
67
|
+
"displayName": "Stone",
|
|
68
|
+
"description": "Warm stone and slate, earthy and understated, with just enough character to feel handcrafted.",
|
|
69
|
+
"maintained": false,
|
|
70
|
+
"entry": "stoneTheme.ts",
|
|
71
|
+
"exportName": "stoneTheme",
|
|
72
|
+
"files": [
|
|
73
|
+
"stoneTheme.ts",
|
|
74
|
+
"icons.tsx"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"slug": "y2k",
|
|
79
|
+
"displayName": "Y2K",
|
|
80
|
+
"description": "Hot pinks, lime greens, and Poppins. Bubbly, playful, and unmistakably retro.",
|
|
81
|
+
"maintained": false,
|
|
82
|
+
"entry": "y2kTheme.ts",
|
|
83
|
+
"exportName": "y2kTheme",
|
|
84
|
+
"files": [
|
|
85
|
+
"y2kTheme.ts",
|
|
86
|
+
"icons.tsx"
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import type {IconRegistry} from '@astryxdesign/core/Icon';
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
X,
|
|
8
|
+
ChevronDown,
|
|
9
|
+
ChevronLeft,
|
|
10
|
+
ChevronRight,
|
|
11
|
+
Check,
|
|
12
|
+
CheckCircle,
|
|
13
|
+
XCircle,
|
|
14
|
+
AlertTriangle,
|
|
15
|
+
Info,
|
|
16
|
+
Calendar,
|
|
17
|
+
Clock,
|
|
18
|
+
ExternalLink,
|
|
19
|
+
Menu,
|
|
20
|
+
MoreHorizontal,
|
|
21
|
+
Search,
|
|
22
|
+
ArrowUp,
|
|
23
|
+
ArrowDown,
|
|
24
|
+
ArrowUpDown,
|
|
25
|
+
Filter,
|
|
26
|
+
EyeOff,
|
|
27
|
+
Columns,
|
|
28
|
+
Copy,
|
|
29
|
+
CheckCheck,
|
|
30
|
+
Wrench,
|
|
31
|
+
Square,
|
|
32
|
+
Mic,
|
|
33
|
+
} from 'lucide-react';
|
|
34
|
+
|
|
35
|
+
const iconProps = {
|
|
36
|
+
size: '1em',
|
|
37
|
+
'aria-hidden': true as const,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const matchaIconRegistry: IconRegistry = {
|
|
41
|
+
close: <X {...iconProps} />,
|
|
42
|
+
chevronDown: <ChevronDown {...iconProps} />,
|
|
43
|
+
chevronLeft: <ChevronLeft {...iconProps} />,
|
|
44
|
+
chevronRight: <ChevronRight {...iconProps} />,
|
|
45
|
+
check: <Check {...iconProps} />,
|
|
46
|
+
success: <CheckCircle {...iconProps} />,
|
|
47
|
+
error: <XCircle {...iconProps} />,
|
|
48
|
+
warning: <AlertTriangle {...iconProps} />,
|
|
49
|
+
info: <Info {...iconProps} />,
|
|
50
|
+
calendar: <Calendar {...iconProps} />,
|
|
51
|
+
clock: <Clock {...iconProps} />,
|
|
52
|
+
externalLink: <ExternalLink {...iconProps} />,
|
|
53
|
+
menu: <Menu {...iconProps} />,
|
|
54
|
+
moreHorizontal: <MoreHorizontal {...iconProps} />,
|
|
55
|
+
search: <Search {...iconProps} />,
|
|
56
|
+
arrowUp: <ArrowUp {...iconProps} />,
|
|
57
|
+
arrowDown: <ArrowDown {...iconProps} />,
|
|
58
|
+
arrowsUpDown: <ArrowUpDown {...iconProps} />,
|
|
59
|
+
funnel: <Filter {...iconProps} />,
|
|
60
|
+
eyeSlash: <EyeOff {...iconProps} />,
|
|
61
|
+
viewColumns: <Columns {...iconProps} />,
|
|
62
|
+
copy: <Copy {...iconProps} />,
|
|
63
|
+
checkDouble: <CheckCheck {...iconProps} />,
|
|
64
|
+
wrench: <Wrench {...iconProps} />,
|
|
65
|
+
stop: <Square {...iconProps} />,
|
|
66
|
+
microphone: <Mic {...iconProps} />,
|
|
67
|
+
};
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Matcha Theme
|
|
5
|
+
*
|
|
6
|
+
* An earthy green theme inspired by matcha tea and natural botanicals.
|
|
7
|
+
* Core palette: #3E481D, #707E46, #C0CBA9, #F0F0E0, #FFFFFF
|
|
8
|
+
* Uses Playwrite US Trad for headings and DM Sans for body text.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import {defineTheme, defineSyntaxTheme} from '@astryxdesign/core/theme';
|
|
12
|
+
import {matchaIconRegistry} from './icons';
|
|
13
|
+
|
|
14
|
+
/** Matcha syntax palette — earthy greens and warm tones. */
|
|
15
|
+
const matchaSyntax = defineSyntaxTheme({
|
|
16
|
+
name: 'xds-matcha',
|
|
17
|
+
tokens: {
|
|
18
|
+
keyword: ['#5a6b2a', '#a8bf6a'],
|
|
19
|
+
string: ['#2e6b4a', '#7bc49e'],
|
|
20
|
+
comment: ['#707E46', '#707E46'],
|
|
21
|
+
number: ['#8c6b30', '#d4b870'],
|
|
22
|
+
function: ['#3a5e8c', '#7ba8d4'],
|
|
23
|
+
type: ['#6b4a8c', '#b08ed4'],
|
|
24
|
+
variable: ['#3E481D', '#C0CBA9'],
|
|
25
|
+
operator: ['#707E46', '#94a468'],
|
|
26
|
+
constant: ['#8c6b30', '#d4b870'],
|
|
27
|
+
tag: ['#8c3a3a', '#d47a7a'],
|
|
28
|
+
attribute: ['#7c5e3a', '#c4a882'],
|
|
29
|
+
property: ['#3a7c6b', '#70c4b0'],
|
|
30
|
+
punctuation: ['#707E46', '#5a6440'],
|
|
31
|
+
background: ['#F0F0E0', '#1a1c14'],
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export const matchaTheme = defineTheme({
|
|
36
|
+
name: 'matcha',
|
|
37
|
+
|
|
38
|
+
typography: {
|
|
39
|
+
// base 16 / ratio 1.25 — aligned with the other themes' geometric scale.
|
|
40
|
+
scale: {base: 16, ratio: 1.25},
|
|
41
|
+
body: {
|
|
42
|
+
family: 'DM Sans',
|
|
43
|
+
fallbacks:
|
|
44
|
+
'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',
|
|
45
|
+
},
|
|
46
|
+
heading: {
|
|
47
|
+
family: 'Playwrite US Trad',
|
|
48
|
+
fallbacks: 'Georgia, "Times New Roman", Times, serif',
|
|
49
|
+
},
|
|
50
|
+
code: {
|
|
51
|
+
family: 'JetBrains Mono',
|
|
52
|
+
fallbacks: '"SF Mono", Monaco, Consolas, monospace',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
motion: {fast: 125, medium: 300, slow: 700, ratio: 0.75},
|
|
57
|
+
|
|
58
|
+
syntax: matchaSyntax,
|
|
59
|
+
|
|
60
|
+
tokens: {
|
|
61
|
+
// =========================================================================
|
|
62
|
+
// Colors — earthy matcha palette
|
|
63
|
+
// Core: #3E481D, #707E46, #C0CBA9, #F0F0E0, #FFFFFF
|
|
64
|
+
// =========================================================================
|
|
65
|
+
|
|
66
|
+
// Core semantic
|
|
67
|
+
'--color-accent': ['#3E481D', '#C0CBA9'],
|
|
68
|
+
'--color-accent-muted': ['#3E481D14', '#C0CBA920'],
|
|
69
|
+
'--color-neutral': ['#3E481D0F', '#C0CBA91A'],
|
|
70
|
+
'--color-background-surface': ['#FFFFFF', '#1a1c14'],
|
|
71
|
+
'--color-background-body': ['#F0F0E0', '#12140e'],
|
|
72
|
+
'--color-overlay': ['#3E481D80', '#3E481DCC'],
|
|
73
|
+
'--color-overlay-hover': ['#3E481D0D', '#C0CBA90D'],
|
|
74
|
+
'--color-overlay-pressed': ['#3E481D1A', '#C0CBA91A'],
|
|
75
|
+
'--color-background-muted': ['#F0F0E0', '#3E481D'],
|
|
76
|
+
|
|
77
|
+
// Text
|
|
78
|
+
'--color-text-primary': ['#3E481D', '#C0CBA9'],
|
|
79
|
+
'--color-text-secondary': ['#707E46', '#94a468'],
|
|
80
|
+
'--color-text-disabled': ['#C0CBA9', '#5a6440'],
|
|
81
|
+
'--color-text-accent': ['#3E481D', '#C0CBA9'],
|
|
82
|
+
'--color-on-dark': '#FFFFFF',
|
|
83
|
+
'--color-on-light': '#3E481D',
|
|
84
|
+
'--color-on-accent': ['#FFFFFF', '#3E481D'],
|
|
85
|
+
'--color-on-success': ['#FFFFFF', '#3E481D'],
|
|
86
|
+
'--color-on-error': ['#FFFFFF', '#3E481D'],
|
|
87
|
+
'--color-on-warning': ['#3E481D', '#3E481D'],
|
|
88
|
+
|
|
89
|
+
// Icon
|
|
90
|
+
'--color-icon-accent': ['#3E481D', '#C0CBA9'],
|
|
91
|
+
'--color-icon-primary': ['#3E481D', '#C0CBA9'],
|
|
92
|
+
'--color-icon-secondary': ['#707E46', '#94a468'],
|
|
93
|
+
'--color-icon-disabled': ['#C0CBA9', '#5a6440'],
|
|
94
|
+
|
|
95
|
+
// Surface variants
|
|
96
|
+
'--color-background-card': ['#FFFFFF', '#1e2016'],
|
|
97
|
+
'--color-background-popover': ['#FFFFFF', '#3E481D'],
|
|
98
|
+
'--color-background-inverted': ['#3E481D', '#C0CBA9'],
|
|
99
|
+
|
|
100
|
+
// Status / Sentiment
|
|
101
|
+
'--color-success': ['#4D9900', '#6dbf2a'],
|
|
102
|
+
'--color-success-muted': ['#4D990020', '#6dbf2a20'],
|
|
103
|
+
'--color-error': ['#FD0000', '#ff5c5c'],
|
|
104
|
+
'--color-error-muted': ['#FD000020', '#ff5c5c20'],
|
|
105
|
+
'--color-warning': ['#FFB600', '#ffc940'],
|
|
106
|
+
'--color-warning-muted': ['#FFB60020', '#ffc94020'],
|
|
107
|
+
|
|
108
|
+
// Border
|
|
109
|
+
// Softer sage borders (default + emphasized/card) in light mode.
|
|
110
|
+
'--color-border': ['#DCE3CE', '#C0CBA91A'],
|
|
111
|
+
'--color-border-emphasized': ['#B7C29E', '#5a6440'],
|
|
112
|
+
|
|
113
|
+
// Effects
|
|
114
|
+
'--color-skeleton': ['#C0CBA9', '#5a6440'],
|
|
115
|
+
'--color-shadow': ['#3E481D1A', '#0000004D'],
|
|
116
|
+
'--color-tint-hover': ['black', 'white'],
|
|
117
|
+
|
|
118
|
+
// Categorical — Blue
|
|
119
|
+
'--color-background-blue': ['#3a5e8c33', '#3a5e8c33'],
|
|
120
|
+
'--color-border-blue': ['#3a5e8c', '#7ba8d4'],
|
|
121
|
+
'--color-icon-blue': ['#3a5e8c', '#7ba8d4'],
|
|
122
|
+
'--color-text-blue': ['#2e4a6e', '#8dbce0'],
|
|
123
|
+
|
|
124
|
+
// Categorical — Cyan
|
|
125
|
+
'--color-background-cyan': ['#3a7c7c33', '#3a7c7c33'],
|
|
126
|
+
'--color-border-cyan': ['#3a7c7c', '#70c4c4'],
|
|
127
|
+
'--color-icon-cyan': ['#3a7c7c', '#70c4c4'],
|
|
128
|
+
'--color-text-cyan': ['#2e6060', '#82d4d4'],
|
|
129
|
+
|
|
130
|
+
// Categorical — Gray
|
|
131
|
+
'--color-background-gray': ['#707E4633', '#5a644033'],
|
|
132
|
+
'--color-border-gray': ['#707E46', '#707E46'],
|
|
133
|
+
'--color-icon-gray': ['#707E46', '#94a468'],
|
|
134
|
+
'--color-text-gray': ['#3E481D', '#C0CBA9'],
|
|
135
|
+
|
|
136
|
+
// Categorical — Green
|
|
137
|
+
'--color-background-green': ['#4D990033', '#6dbf2a33'],
|
|
138
|
+
'--color-border-green': ['#4D9900', '#6dbf2a'],
|
|
139
|
+
'--color-icon-green': ['#4D9900', '#6dbf2a'],
|
|
140
|
+
'--color-text-green': ['#3d7a00', '#80d43a'],
|
|
141
|
+
|
|
142
|
+
// Categorical — Orange
|
|
143
|
+
'--color-background-orange': ['#c4762033', '#d4903a33'],
|
|
144
|
+
'--color-border-orange': ['#c47620', '#d4903a'],
|
|
145
|
+
'--color-icon-orange': ['#c47620', '#d4903a'],
|
|
146
|
+
'--color-text-orange': ['#a06018', '#e0a04a'],
|
|
147
|
+
|
|
148
|
+
// Categorical — Pink
|
|
149
|
+
'--color-background-pink': ['#c44a7033', '#e07a9a33'],
|
|
150
|
+
'--color-border-pink': ['#c44a70', '#e07a9a'],
|
|
151
|
+
'--color-icon-pink': ['#c44a70', '#e07a9a'],
|
|
152
|
+
'--color-text-pink': ['#a03a5a', '#f08aaa'],
|
|
153
|
+
|
|
154
|
+
// Categorical — Purple
|
|
155
|
+
'--color-background-purple': ['#6b4a8c33', '#b08ed433'],
|
|
156
|
+
'--color-border-purple': ['#6b4a8c', '#b08ed4'],
|
|
157
|
+
'--color-icon-purple': ['#6b4a8c', '#b08ed4'],
|
|
158
|
+
'--color-text-purple': ['#553a70', '#c0a0e0'],
|
|
159
|
+
|
|
160
|
+
// Categorical — Red
|
|
161
|
+
'--color-background-red': ['#FD000033', '#ff5c5c33'],
|
|
162
|
+
'--color-border-red': ['#FD0000', '#ff5c5c'],
|
|
163
|
+
'--color-icon-red': ['#FD0000', '#ff5c5c'],
|
|
164
|
+
'--color-text-red': ['#cc0000', '#ff7a7a'],
|
|
165
|
+
|
|
166
|
+
// Categorical — Teal
|
|
167
|
+
'--color-background-teal': ['#2e6b5a33', '#5ab89833'],
|
|
168
|
+
'--color-border-teal': ['#2e6b5a', '#5ab898'],
|
|
169
|
+
'--color-icon-teal': ['#2e6b5a', '#5ab898'],
|
|
170
|
+
'--color-text-teal': ['#245546', '#6ccaaa'],
|
|
171
|
+
|
|
172
|
+
// Categorical — Yellow
|
|
173
|
+
'--color-background-yellow': ['#FFB60033', '#ffc94033'],
|
|
174
|
+
'--color-border-yellow': ['#FFB600', '#ffc940'],
|
|
175
|
+
'--color-icon-yellow': ['#FFB600', '#ffc940'],
|
|
176
|
+
'--color-text-yellow': ['#cc9200', '#ffd960'],
|
|
177
|
+
|
|
178
|
+
// =========================================================================
|
|
179
|
+
// Spacing
|
|
180
|
+
// =========================================================================
|
|
181
|
+
'--spacing-0-5': '3px',
|
|
182
|
+
'--spacing-1': '6px',
|
|
183
|
+
'--spacing-1-5': '9px',
|
|
184
|
+
'--spacing-2': '12px',
|
|
185
|
+
'--spacing-3': '18px',
|
|
186
|
+
'--spacing-4': '24px',
|
|
187
|
+
'--spacing-5': '30px',
|
|
188
|
+
'--spacing-6': '36px',
|
|
189
|
+
'--spacing-7': '42px',
|
|
190
|
+
'--spacing-8': '48px',
|
|
191
|
+
'--spacing-9': '54px',
|
|
192
|
+
'--spacing-10': '60px',
|
|
193
|
+
'--spacing-11': '66px',
|
|
194
|
+
'--spacing-12': '72px',
|
|
195
|
+
|
|
196
|
+
// =========================================================================
|
|
197
|
+
// Radius — soft and rounded
|
|
198
|
+
// =========================================================================
|
|
199
|
+
'--radius-inner': '6px',
|
|
200
|
+
'--radius-element': '12px',
|
|
201
|
+
'--radius-container': '18px',
|
|
202
|
+
'--radius-page': '42px',
|
|
203
|
+
|
|
204
|
+
// No explicit --font-size-* overrides — font sizes come from
|
|
205
|
+
// typography.scale above, keeping the scale the single source of truth.
|
|
206
|
+
|
|
207
|
+
// =========================================================================
|
|
208
|
+
// Element sizes
|
|
209
|
+
// =========================================================================
|
|
210
|
+
'--size-element-sm': '36px',
|
|
211
|
+
'--size-element-md': '40px',
|
|
212
|
+
'--size-element-lg': '44px',
|
|
213
|
+
|
|
214
|
+
// =========================================================================
|
|
215
|
+
// Shadows
|
|
216
|
+
// =========================================================================
|
|
217
|
+
'--shadow-low': '0 2px 4px #3E481D0D, 0 4px 8px #3E481D1A',
|
|
218
|
+
'--shadow-med': '0 2px 4px #3E481D0D, 0 4px 12px #3E481D1A',
|
|
219
|
+
'--shadow-high': '0 4px 6px #3E481D1A, 0 12px 24px #3E481D26',
|
|
220
|
+
'--shadow-inset-hover': 'inset 0px 0px 0px 2px #3E481D30',
|
|
221
|
+
'--shadow-inset-selected': 'inset 0px 0px 0px 2px #3E481D50',
|
|
222
|
+
'--shadow-inset-success': 'inset 0px 0px 0px 2px #4D990050',
|
|
223
|
+
'--shadow-inset-warning': 'inset 0px 0px 0px 2px #FFB60050',
|
|
224
|
+
'--shadow-inset-error': 'inset 0px 0px 0px 2px #FD000050',
|
|
225
|
+
},
|
|
226
|
+
|
|
227
|
+
components: {
|
|
228
|
+
button: {
|
|
229
|
+
base: {
|
|
230
|
+
borderRadius: 'var(--radius-full)',
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
card: {
|
|
234
|
+
base: {
|
|
235
|
+
borderRadius: 'var(--radius-page)',
|
|
236
|
+
padding: 'var(--spacing-3)',
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
section: {
|
|
240
|
+
base: {
|
|
241
|
+
padding: 'var(--spacing-3)',
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
|
|
246
|
+
icons: matchaIconRegistry,
|
|
247
|
+
});
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file icons.tsx
|
|
5
|
+
* @input Uses lucide-react icon components, IconRegistry type
|
|
6
|
+
* @output Exports neutralIconRegistry for the neutral theme
|
|
7
|
+
* @position Icon configuration for the neutral theme; consumed by index.ts
|
|
8
|
+
*
|
|
9
|
+
* Maps semantic icon names to Lucide icon components.
|
|
10
|
+
* These icons are bundled with the theme, not with @astryxdesign/core.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import type {IconRegistry} from '@astryxdesign/core/Icon';
|
|
15
|
+
|
|
16
|
+
import {
|
|
17
|
+
X,
|
|
18
|
+
ChevronDown,
|
|
19
|
+
ChevronLeft,
|
|
20
|
+
ChevronRight,
|
|
21
|
+
Check,
|
|
22
|
+
CheckCircle,
|
|
23
|
+
XCircle,
|
|
24
|
+
AlertTriangle,
|
|
25
|
+
Info,
|
|
26
|
+
Calendar,
|
|
27
|
+
Clock,
|
|
28
|
+
ExternalLink,
|
|
29
|
+
Menu,
|
|
30
|
+
MoreHorizontal,
|
|
31
|
+
Search,
|
|
32
|
+
ArrowUp,
|
|
33
|
+
ArrowDown,
|
|
34
|
+
ArrowUpDown,
|
|
35
|
+
Filter,
|
|
36
|
+
EyeOff,
|
|
37
|
+
Columns,
|
|
38
|
+
Copy,
|
|
39
|
+
CheckCheck,
|
|
40
|
+
Wrench,
|
|
41
|
+
Square,
|
|
42
|
+
Mic,
|
|
43
|
+
} from 'lucide-react';
|
|
44
|
+
|
|
45
|
+
const iconProps = {
|
|
46
|
+
size: '1em',
|
|
47
|
+
'aria-hidden': true as const,
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const neutralIconRegistry: IconRegistry = {
|
|
51
|
+
close: <X {...iconProps} />,
|
|
52
|
+
chevronDown: <ChevronDown {...iconProps} />,
|
|
53
|
+
chevronLeft: <ChevronLeft {...iconProps} />,
|
|
54
|
+
chevronRight: <ChevronRight {...iconProps} />,
|
|
55
|
+
check: <Check {...iconProps} />,
|
|
56
|
+
success: <CheckCircle {...iconProps} />,
|
|
57
|
+
error: <XCircle {...iconProps} />,
|
|
58
|
+
warning: <AlertTriangle {...iconProps} />,
|
|
59
|
+
info: <Info {...iconProps} />,
|
|
60
|
+
calendar: <Calendar {...iconProps} />,
|
|
61
|
+
clock: <Clock {...iconProps} />,
|
|
62
|
+
externalLink: <ExternalLink {...iconProps} />,
|
|
63
|
+
menu: <Menu {...iconProps} />,
|
|
64
|
+
moreHorizontal: <MoreHorizontal {...iconProps} />,
|
|
65
|
+
search: <Search {...iconProps} />,
|
|
66
|
+
arrowUp: <ArrowUp {...iconProps} />,
|
|
67
|
+
arrowDown: <ArrowDown {...iconProps} />,
|
|
68
|
+
arrowsUpDown: <ArrowUpDown {...iconProps} />,
|
|
69
|
+
funnel: <Filter {...iconProps} />,
|
|
70
|
+
eyeSlash: <EyeOff {...iconProps} />,
|
|
71
|
+
viewColumns: <Columns {...iconProps} />,
|
|
72
|
+
copy: <Copy {...iconProps} />,
|
|
73
|
+
checkDouble: <CheckCheck {...iconProps} />,
|
|
74
|
+
wrench: <Wrench {...iconProps} />,
|
|
75
|
+
stop: <Square {...iconProps} />,
|
|
76
|
+
microphone: <Mic {...iconProps} />,
|
|
77
|
+
};
|