@scalepad/ui 0.1.0 → 0.2.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/README.md +226 -28
- package/package.json +150 -38
- package/scripts/verify-consumption.mjs +242 -0
- package/src/ThemeProvider.tsx +53 -5
- package/src/components/Anchor/Anchor.css.ts +163 -0
- package/src/components/Anchor/Anchor.figma.tsx +57 -0
- package/src/components/Anchor/Anchor.tsx +114 -13
- package/src/components/Anchor/index.ts +1 -1
- package/src/components/FilterMenu/FilterSubMenuTypes/SearchableFilterSubmenu.tsx +8 -5
- package/src/components/FilterMenu/helpers.ts +5 -2
- package/src/components/IconButton/IconButton.tsx +51 -0
- package/src/components/SubNavigation/SubNavigation.css.ts +20 -0
- package/src/components/Typography/Text.tsx +2 -4
- package/src/components/Typography/Title.tsx +2 -4
- package/src/index.ts +3 -1
- package/src/inter-font.ts +21 -0
- package/src/mantine.ts +2 -0
- package/src/theme/themeContract.css.ts +27 -3
- package/src/tokens/color-types.ts +28 -5
- package/src/tokens/colors.ts +52 -10
- package/src/tokens/semantic-colors.ts +177 -73
- package/src/tokens/semantic-tokens-css.ts +34 -12
- package/src/tokens/shadows.ts +30 -6
- package/src/utils/typography-props.ts +19 -0
- package/src/vite.d.ts +37 -0
- package/src/vite.js +79 -0
- package/src/geist-fonts.ts +0 -48
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Anchor } from './Anchor';
|
|
2
|
-
export type { AnchorProps } from './Anchor';
|
|
2
|
+
export type { AnchorProps, AnchorSize, AnchorTone } from './Anchor';
|
|
@@ -193,12 +193,16 @@ export function SearchableFilterSubmenu({
|
|
|
193
193
|
) : displayedItems.length > 0 ? (
|
|
194
194
|
<>
|
|
195
195
|
{displayedItems.map(item => (
|
|
196
|
+
// Toggling flows through the Checkbox's native onChange (input
|
|
197
|
+
// click + label click both delegate there). We deliberately
|
|
198
|
+
// don't put `onClick` on Menu.Item: Mantine's Checkbox renders
|
|
199
|
+
// its label as a `<label for=input>` whose click event keeps
|
|
200
|
+
// bubbling after delegating to the input, so a Menu.Item.onClick
|
|
201
|
+
// would catch the bubbled event and fire a second toggle that
|
|
202
|
+
// net-cancels the first. `onKeyDown` for space stays so the
|
|
203
|
+
// row can still be toggled when focused via keyboard.
|
|
196
204
|
<Menu.Item
|
|
197
205
|
key={item.id}
|
|
198
|
-
onClick={e => {
|
|
199
|
-
e.stopPropagation();
|
|
200
|
-
toggleItem(item.id);
|
|
201
|
-
}}
|
|
202
206
|
closeMenuOnClick={false}
|
|
203
207
|
onKeyDown={e => {
|
|
204
208
|
if (e.key === ' ') {
|
|
@@ -212,7 +216,6 @@ export function SearchableFilterSubmenu({
|
|
|
212
216
|
<Checkbox
|
|
213
217
|
checked={selectedIds.has(item.id)}
|
|
214
218
|
onChange={() => toggleItem(item.id)}
|
|
215
|
-
onClick={e => e.stopPropagation()}
|
|
216
219
|
size="sm"
|
|
217
220
|
label={item.name}
|
|
218
221
|
/>
|
|
@@ -14,8 +14,11 @@ export function extractFilterValue(
|
|
|
14
14
|
);
|
|
15
15
|
|
|
16
16
|
if (schema.type === 'boolean') {
|
|
17
|
-
// Boolean filters
|
|
18
|
-
|
|
17
|
+
// Boolean filters are binary — they have no concept of items. The
|
|
18
|
+
// canonical writer (`createFilterCategory`) emits a stub `{id, name:'True'}`
|
|
19
|
+
// entry, but external consumers also produce the category with `items: []`,
|
|
20
|
+
// so we treat presence of the category as the on-state.
|
|
21
|
+
return Boolean(category);
|
|
19
22
|
}
|
|
20
23
|
|
|
21
24
|
if (schema.type === 'multi-select') {
|
|
@@ -18,11 +18,58 @@ export interface IconButtonProps extends MantineActionIconProps {
|
|
|
18
18
|
variant?: IconButtonVariant;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Mantine's ActionIcon resolves `--ai-color`, `--ai-bg`, `--ai-hover`, and
|
|
23
|
+
* `--ai-hover-color` to the variant resolver's output and applies them as
|
|
24
|
+
* inline `style="..."` on the rendered button. Inline styles win over our
|
|
25
|
+
* vanilla-extract class CSS, so a class-level `color: tokens.color.text.*`
|
|
26
|
+
* can be silently overridden by Mantine's resolved variant color (especially
|
|
27
|
+
* in dark mode where `subtle + primary` resolves to a pale green that reads
|
|
28
|
+
* as washed out or "black" against the dark surface).
|
|
29
|
+
*
|
|
30
|
+
* Returning a `vars` *function* here pins the CSS variables to our semantic
|
|
31
|
+
* tokens at the same level Mantine writes them — instance vars merge into
|
|
32
|
+
* (and override) the varsResolver output, so `color: var(--ai-color)` in
|
|
33
|
+
* Mantine's class rule picks up our token instead. Mantine 8 invokes the
|
|
34
|
+
* `vars` prop as a function (`vars(theme, props)`), so it must be callable —
|
|
35
|
+
* passing a plain object throws "vars is not a function" at render time.
|
|
36
|
+
*/
|
|
37
|
+
type ActionIconVarsFn = MantineActionIconProps['vars'];
|
|
38
|
+
|
|
39
|
+
const ghostVars: ActionIconVarsFn = () => ({
|
|
40
|
+
root: {
|
|
41
|
+
'--ai-color': 'var(--color-text-default)',
|
|
42
|
+
'--ai-bg': 'transparent',
|
|
43
|
+
'--ai-hover': 'var(--color-background-primary-light)',
|
|
44
|
+
'--ai-hover-color': 'var(--color-text-primary-default)',
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const ghostMutedVars: ActionIconVarsFn = () => ({
|
|
49
|
+
root: {
|
|
50
|
+
'--ai-color': 'var(--color-text-subdued-strong)',
|
|
51
|
+
'--ai-bg': 'transparent',
|
|
52
|
+
'--ai-hover': 'var(--color-background-primary-light)',
|
|
53
|
+
'--ai-hover-color': 'var(--color-text-primary-default)',
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const outlineVars: ActionIconVarsFn = () => ({
|
|
58
|
+
root: {
|
|
59
|
+
'--ai-color': 'var(--color-text-default)',
|
|
60
|
+
'--ai-bg': 'var(--color-background-default)',
|
|
61
|
+
'--ai-bd': '1px solid var(--color-stroke-default)',
|
|
62
|
+
'--ai-hover': 'var(--color-background-primary-light)',
|
|
63
|
+
'--ai-hover-color': 'var(--color-text-primary-default)',
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
|
|
21
67
|
const IconButtonBase = forwardRef<HTMLButtonElement, IconButtonProps>(
|
|
22
68
|
({ variant = 'outline', className, ...props }, ref) => {
|
|
23
69
|
let mantineVariant: 'outline' | 'subtle' | 'filled' = 'outline';
|
|
24
70
|
let mantineColor = props.color;
|
|
25
71
|
let customClassName = className;
|
|
72
|
+
let customVars: ActionIconVarsFn | undefined;
|
|
26
73
|
|
|
27
74
|
if (variant === 'primary') {
|
|
28
75
|
mantineVariant = 'filled';
|
|
@@ -40,6 +87,7 @@ const IconButtonBase = forwardRef<HTMLButtonElement, IconButtonProps>(
|
|
|
40
87
|
} else if (variant === 'outline') {
|
|
41
88
|
mantineVariant = 'outline';
|
|
42
89
|
customClassName = `${iconButtonStyles.outlineIconButton}${className ? ` ${className}` : ''}`;
|
|
90
|
+
customVars = outlineVars;
|
|
43
91
|
} else if (variant === 'outline-inverse') {
|
|
44
92
|
mantineVariant = 'outline';
|
|
45
93
|
mantineColor = 'white';
|
|
@@ -47,9 +95,11 @@ const IconButtonBase = forwardRef<HTMLButtonElement, IconButtonProps>(
|
|
|
47
95
|
} else if (variant === 'ghost') {
|
|
48
96
|
mantineVariant = 'subtle';
|
|
49
97
|
customClassName = `${iconButtonStyles.ghostIconButton}${className ? ` ${className}` : ''}`;
|
|
98
|
+
customVars = ghostVars;
|
|
50
99
|
} else if (variant === 'ghost-muted') {
|
|
51
100
|
mantineVariant = 'subtle';
|
|
52
101
|
customClassName = `${iconButtonStyles.ghostMutedIconButton}${className ? ` ${className}` : ''}`;
|
|
102
|
+
customVars = ghostMutedVars;
|
|
53
103
|
}
|
|
54
104
|
|
|
55
105
|
return (
|
|
@@ -58,6 +108,7 @@ const IconButtonBase = forwardRef<HTMLButtonElement, IconButtonProps>(
|
|
|
58
108
|
variant={mantineVariant}
|
|
59
109
|
color={mantineColor}
|
|
60
110
|
className={customClassName}
|
|
111
|
+
vars={customVars}
|
|
61
112
|
{...props}
|
|
62
113
|
radius={props.radius ?? 'lg'}
|
|
63
114
|
/>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { style } from '@vanilla-extract/css';
|
|
2
2
|
|
|
3
|
+
import { mantineVars } from '../../theme/mantineVars';
|
|
3
4
|
import { tokens } from '../../theme/themeContract.css';
|
|
4
5
|
import { textStyleVariants } from '../../tokens/text-styles';
|
|
5
6
|
|
|
@@ -59,6 +60,25 @@ export const itemActive = style({
|
|
|
59
60
|
backgroundColor: tokens.color.background.primaryLightHover,
|
|
60
61
|
color: tokens.color.text.primaryDefault,
|
|
61
62
|
},
|
|
63
|
+
// Dark mode: the global `primaryLight` (greenAlpha 12%) reads as a barely
|
|
64
|
+
// perceivable wash and `primaryDefault` (green[3]) is too pale to register
|
|
65
|
+
// as "selected". The 25-35% tint we initially tried still composited to a
|
|
66
|
+
// dim teal over the dark canvas (≈#243B3B over #161B24). Push the green
|
|
67
|
+
// wash to ~50% / 60% so the active tab reads as a clearly saturated
|
|
68
|
+
// brand surface, and pair with near-white text for a strong "selected"
|
|
69
|
+
// affordance.
|
|
70
|
+
//
|
|
71
|
+
// `mantineVars.darkSelector` already ends in ` &`, so we use it raw
|
|
72
|
+
// rather than appending another ` &` (which would produce an invalid
|
|
73
|
+
// self-descendant selector and silently fail to apply).
|
|
74
|
+
[mantineVars.darkSelector]: {
|
|
75
|
+
backgroundColor: 'rgba(77, 155, 127, 0.5)',
|
|
76
|
+
color: tokens.color.text.title,
|
|
77
|
+
},
|
|
78
|
+
[`${mantineVars.darkSelector}:hover`]: {
|
|
79
|
+
backgroundColor: 'rgba(77, 155, 127, 0.6)',
|
|
80
|
+
color: tokens.color.text.title,
|
|
81
|
+
},
|
|
62
82
|
},
|
|
63
83
|
});
|
|
64
84
|
|
|
@@ -31,15 +31,13 @@ import {
|
|
|
31
31
|
type TextStyleDefinition,
|
|
32
32
|
} from '../../tokens';
|
|
33
33
|
import { resolveColorToken } from '../../utils/color-props';
|
|
34
|
+
import type { TypographyStyleProp } from '../../utils/typography-props';
|
|
34
35
|
|
|
35
36
|
import type { TextColor } from '../../tokens';
|
|
36
37
|
|
|
37
|
-
/** Typography styling props that are controlled by the variant and should not be set directly */
|
|
38
|
-
type TypographyStyleProps = 'fw' | 'fz' | 'size' | 'lh' | 'ff' | 'lts' | 'fs';
|
|
39
|
-
|
|
40
38
|
export type TextProps = Omit<
|
|
41
39
|
MantineTextProps,
|
|
42
|
-
|
|
40
|
+
TypographyStyleProp | 'c' | 'children'
|
|
43
41
|
> & {
|
|
44
42
|
/** Text style variant from the design system. Defaults to 'body1'. */
|
|
45
43
|
variant?: BodyVariant;
|
|
@@ -24,12 +24,10 @@ import {
|
|
|
24
24
|
type HeadingVariant,
|
|
25
25
|
} from '../../tokens/text-styles';
|
|
26
26
|
import { resolveColorToken } from '../../utils/color-props';
|
|
27
|
+
import type { TypographyStyleProp } from '../../utils/typography-props';
|
|
27
28
|
|
|
28
29
|
import type { TextColor } from '../../tokens/color-types';
|
|
29
30
|
|
|
30
|
-
/** Typography styling props that are controlled by the variant and should not be set directly */
|
|
31
|
-
type TypographyStyleProps = 'fw' | 'fz' | 'size' | 'lh' | 'ff' | 'lts' | 'fs';
|
|
32
|
-
|
|
33
31
|
const variantToOrder: Record<HeadingVariant, TitleOrder> = {
|
|
34
32
|
heading1: 1,
|
|
35
33
|
heading2: 2,
|
|
@@ -40,7 +38,7 @@ const variantToOrder: Record<HeadingVariant, TitleOrder> = {
|
|
|
40
38
|
|
|
41
39
|
export type TitleProps = Omit<
|
|
42
40
|
MantineTitleProps,
|
|
43
|
-
|
|
41
|
+
TypographyStyleProp | 'c' | 'children' | 'order'
|
|
44
42
|
> & {
|
|
45
43
|
/** Heading style variant from the design system. */
|
|
46
44
|
variant?: HeadingVariant;
|
package/src/index.ts
CHANGED
|
@@ -30,7 +30,7 @@ export type {
|
|
|
30
30
|
FilterCategory,
|
|
31
31
|
} from './components/AppliedFiltersManagerBar';
|
|
32
32
|
export { Anchor } from './components/Anchor';
|
|
33
|
-
export type { AnchorProps } from './components/Anchor';
|
|
33
|
+
export type { AnchorProps, AnchorSize, AnchorTone } from './components/Anchor';
|
|
34
34
|
export { Badge } from './components/Badge';
|
|
35
35
|
export type { BadgeProps } from './components/Badge';
|
|
36
36
|
export { BulkActionBar } from './components/BulkActionBar';
|
|
@@ -475,8 +475,10 @@ export {
|
|
|
475
475
|
Textarea,
|
|
476
476
|
Tooltip,
|
|
477
477
|
UnstyledButton,
|
|
478
|
+
useMantineColorScheme,
|
|
478
479
|
} from './mantine';
|
|
479
480
|
export type {
|
|
481
|
+
MantineColorScheme,
|
|
480
482
|
PopoverProps,
|
|
481
483
|
ProgressProps,
|
|
482
484
|
UnstyledButtonProps,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Inject the Inter font from Google Fonts as a `<link rel="stylesheet">`.
|
|
2
|
+
//
|
|
3
|
+
// Loading the stylesheet via JS instead of `import './foo.css'` keeps the
|
|
4
|
+
// design system robust against consumer bundlers that don't resolve `.css`
|
|
5
|
+
// files inside `node_modules/@scalepad/ui`. Idempotent — safe to import
|
|
6
|
+
// from multiple entry points.
|
|
7
|
+
|
|
8
|
+
const INTER_FONT_LINK_ID = 'scalepad-ui-inter-font';
|
|
9
|
+
const INTER_FONT_HREF =
|
|
10
|
+
'https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap';
|
|
11
|
+
|
|
12
|
+
if (
|
|
13
|
+
typeof document !== 'undefined' &&
|
|
14
|
+
!document.getElementById(INTER_FONT_LINK_ID)
|
|
15
|
+
) {
|
|
16
|
+
const link = document.createElement('link');
|
|
17
|
+
link.id = INTER_FONT_LINK_ID;
|
|
18
|
+
link.rel = 'stylesheet';
|
|
19
|
+
link.href = INTER_FONT_HREF;
|
|
20
|
+
document.head.appendChild(link);
|
|
21
|
+
}
|
package/src/mantine.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Theme contract for vanilla-extract: typed references to CSS variables
|
|
3
|
+
* injected by ThemeProvider.
|
|
4
|
+
*
|
|
5
|
+
* NOTE: extended by hand to add `background.surface.*`, `background.entity.*`,
|
|
6
|
+
* and the `color.chart.*` group alongside the auto-generated entries from the
|
|
7
|
+
* Figma export. Once the Figma source catches up these can fold back into the
|
|
8
|
+
* generated output.
|
|
5
9
|
*/
|
|
6
10
|
|
|
7
11
|
import { createGlobalThemeContract } from '@vanilla-extract/css';
|
|
@@ -63,6 +67,18 @@ export const tokens = createGlobalThemeContract({
|
|
|
63
67
|
inverseFilledHover: 'color-background-inverse-filled-hover',
|
|
64
68
|
input: 'color-background-input',
|
|
65
69
|
backdrop: 'color-background-backdrop',
|
|
70
|
+
surfaceRaised: 'color-background-surface-raised',
|
|
71
|
+
surfaceOverlay: 'color-background-surface-overlay',
|
|
72
|
+
entityTaskLight: 'color-background-entity-task-light',
|
|
73
|
+
entityTaskIcon: 'color-background-entity-task-icon',
|
|
74
|
+
entityInitiativeLight: 'color-background-entity-initiative-light',
|
|
75
|
+
entityInitiativeIcon: 'color-background-entity-initiative-icon',
|
|
76
|
+
entityGoalLight: 'color-background-entity-goal-light',
|
|
77
|
+
entityGoalIcon: 'color-background-entity-goal-icon',
|
|
78
|
+
entityMeetingLight: 'color-background-entity-meeting-light',
|
|
79
|
+
entityMeetingIcon: 'color-background-entity-meeting-icon',
|
|
80
|
+
entityDeliverableLight: 'color-background-entity-deliverable-light',
|
|
81
|
+
entityDeliverableIcon: 'color-background-entity-deliverable-icon',
|
|
66
82
|
},
|
|
67
83
|
stroke: {
|
|
68
84
|
default: 'color-stroke-default',
|
|
@@ -97,6 +113,14 @@ export const tokens = createGlobalThemeContract({
|
|
|
97
113
|
primaryStrong: 'color-icon-primary-strong',
|
|
98
114
|
medium: 'color-icon-medium',
|
|
99
115
|
},
|
|
116
|
+
chart: {
|
|
117
|
+
series1: 'color-chart-series-1',
|
|
118
|
+
series2: 'color-chart-series-2',
|
|
119
|
+
series3: 'color-chart-series-3',
|
|
120
|
+
series4: 'color-chart-series-4',
|
|
121
|
+
series5: 'color-chart-series-5',
|
|
122
|
+
series6: 'color-chart-series-6',
|
|
123
|
+
},
|
|
100
124
|
},
|
|
101
125
|
radius: {
|
|
102
126
|
xs: 'radius-xs',
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* AUTO-GENERATED - DO NOT EDIT
|
|
3
|
-
* Generated from: packages/figma-tokens/source/semantic-colors.json
|
|
4
|
-
*
|
|
5
2
|
* Typed color token unions grouped by their intended usage.
|
|
6
3
|
* Use these types to restrict color props to only valid tokens.
|
|
4
|
+
*
|
|
5
|
+
* NOTE: extended by hand to add `background.surface.*`, `background.entity.*`,
|
|
6
|
+
* and the new `ChartColor` type alongside the auto-generated entries from the
|
|
7
|
+
* Figma export of `packages/figma-tokens/source/semantic-colors.json`.
|
|
7
8
|
*/
|
|
8
9
|
|
|
9
10
|
/** Text/foreground color tokens (for the `c` prop on text elements) */
|
|
@@ -62,7 +63,19 @@ export type BackgroundColor =
|
|
|
62
63
|
| 'background.inverse.filled'
|
|
63
64
|
| 'background.inverse.filled-hover'
|
|
64
65
|
| 'background.input'
|
|
65
|
-
| 'background.backdrop'
|
|
66
|
+
| 'background.backdrop'
|
|
67
|
+
| 'background.surface.raised'
|
|
68
|
+
| 'background.surface.overlay'
|
|
69
|
+
| 'background.entity.task.light'
|
|
70
|
+
| 'background.entity.task.icon'
|
|
71
|
+
| 'background.entity.initiative.light'
|
|
72
|
+
| 'background.entity.initiative.icon'
|
|
73
|
+
| 'background.entity.goal.light'
|
|
74
|
+
| 'background.entity.goal.icon'
|
|
75
|
+
| 'background.entity.meeting.light'
|
|
76
|
+
| 'background.entity.meeting.icon'
|
|
77
|
+
| 'background.entity.deliverable.light'
|
|
78
|
+
| 'background.entity.deliverable.icon';
|
|
66
79
|
|
|
67
80
|
/** Stroke/border color tokens (for borders and dividers) */
|
|
68
81
|
export type StrokeColor =
|
|
@@ -99,9 +112,19 @@ export type IconColor =
|
|
|
99
112
|
| 'icon.primary.strong'
|
|
100
113
|
| 'icon.medium';
|
|
101
114
|
|
|
115
|
+
/** Chart series color tokens (for Recharts series colors, legend swatches, etc.) */
|
|
116
|
+
export type ChartColor =
|
|
117
|
+
| 'chart.series.1'
|
|
118
|
+
| 'chart.series.2'
|
|
119
|
+
| 'chart.series.3'
|
|
120
|
+
| 'chart.series.4'
|
|
121
|
+
| 'chart.series.5'
|
|
122
|
+
| 'chart.series.6';
|
|
123
|
+
|
|
102
124
|
/** Any semantic color token */
|
|
103
125
|
export type SemanticColor =
|
|
104
126
|
| TextColor
|
|
105
127
|
| BackgroundColor
|
|
106
128
|
| StrokeColor
|
|
107
|
-
| IconColor
|
|
129
|
+
| IconColor
|
|
130
|
+
| ChartColor;
|
package/src/tokens/colors.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Color primitives synced from Figma Design System (VCLfybgU3OaUUPrQdBaVmP).
|
|
3
3
|
* Figma source of truth: Primitives collection.
|
|
4
|
+
*
|
|
5
|
+
* NOTE: `dark[]`, `greenAlpha`, and `grapeAlpha` have been hand-tuned in code
|
|
6
|
+
* ahead of the Figma back-sync to give dark mode real surface depth and proper
|
|
7
|
+
* brand-tinted alphas. Once those values land in Figma the file can revert to
|
|
8
|
+
* fully auto-generated.
|
|
4
9
|
*/
|
|
5
10
|
|
|
6
11
|
import type { MantineColorsTuple } from '@mantine/core';
|
|
@@ -21,6 +26,14 @@ export const green: MantineColorsTuple = [
|
|
|
21
26
|
'#005a3e',
|
|
22
27
|
];
|
|
23
28
|
|
|
29
|
+
export const greenAlpha = {
|
|
30
|
+
'08': 'rgba(77, 155, 127, 0.08)',
|
|
31
|
+
'10': 'rgba(77, 155, 127, 0.10)',
|
|
32
|
+
'12': 'rgba(77, 155, 127, 0.12)',
|
|
33
|
+
'15': 'rgba(77, 155, 127, 0.15)',
|
|
34
|
+
'20': 'rgba(77, 155, 127, 0.20)',
|
|
35
|
+
} as const;
|
|
36
|
+
|
|
24
37
|
export const blue: MantineColorsTuple = [
|
|
25
38
|
'#e7f5ff',
|
|
26
39
|
'#d0ebff',
|
|
@@ -72,19 +85,41 @@ export const grayAlpha = {
|
|
|
72
85
|
'9-60': 'rgba(17, 24, 39, 0.60)',
|
|
73
86
|
} as const;
|
|
74
87
|
|
|
88
|
+
/**
|
|
89
|
+
* Dark neutral scale tuned for sophisticated dark-mode surface depth (cool
|
|
90
|
+
* near-black with a subtle blue cast). 0 → lightest, 9 → darkest, matching
|
|
91
|
+
* the Mantine palette convention so dark-mode semantic mappings flip naturally
|
|
92
|
+
* against the light gray scale.
|
|
93
|
+
*
|
|
94
|
+
* Surface roles per index:
|
|
95
|
+
* 0 (#e7eaf2) headings, inverse content
|
|
96
|
+
* 1 (#c8cdd9) body text
|
|
97
|
+
* 2 (#8a92a6) subdued text
|
|
98
|
+
* 3 (#4a5163) disabled text, subdued borders
|
|
99
|
+
* 4 (#323847) default borders
|
|
100
|
+
* 5 (#252b38) hover / pressed surface
|
|
101
|
+
* 6 (#1c222d) elevated surface (popovers, dropdowns)
|
|
102
|
+
* 7 (#161b24) default surface (cards, panels)
|
|
103
|
+
* 8 (#11151c) body background
|
|
104
|
+
* 9 (#0b0e14) outer canvas / chrome
|
|
105
|
+
*/
|
|
75
106
|
export const dark: MantineColorsTuple = [
|
|
76
|
-
'#
|
|
77
|
-
'#
|
|
78
|
-
'#
|
|
79
|
-
'#
|
|
80
|
-
'#
|
|
81
|
-
'#
|
|
82
|
-
'#
|
|
83
|
-
'#
|
|
84
|
-
'#
|
|
85
|
-
'#
|
|
107
|
+
'#e7eaf2',
|
|
108
|
+
'#c8cdd9',
|
|
109
|
+
'#8a92a6',
|
|
110
|
+
'#4a5163',
|
|
111
|
+
'#323847',
|
|
112
|
+
'#252b38',
|
|
113
|
+
'#1c222d',
|
|
114
|
+
'#161b24',
|
|
115
|
+
'#11151c',
|
|
116
|
+
'#0b0e14',
|
|
86
117
|
];
|
|
87
118
|
|
|
119
|
+
export const darkAlpha = {
|
|
120
|
+
'70': 'rgba(11, 14, 20, 0.70)',
|
|
121
|
+
} as const;
|
|
122
|
+
|
|
88
123
|
export const primary: MantineColorsTuple = [
|
|
89
124
|
'#edf7f3',
|
|
90
125
|
'#d5f0e5',
|
|
@@ -164,6 +199,13 @@ export const grape: MantineColorsTuple = [
|
|
|
164
199
|
'#862e9c',
|
|
165
200
|
];
|
|
166
201
|
|
|
202
|
+
export const grapeAlpha = {
|
|
203
|
+
'10': 'rgba(190, 75, 219, 0.10)',
|
|
204
|
+
'12': 'rgba(190, 75, 219, 0.12)',
|
|
205
|
+
'15': 'rgba(190, 75, 219, 0.15)',
|
|
206
|
+
'20': 'rgba(190, 75, 219, 0.20)',
|
|
207
|
+
} as const;
|
|
208
|
+
|
|
167
209
|
export const cyan: MantineColorsTuple = [
|
|
168
210
|
'#e3fafc',
|
|
169
211
|
'#c5f6fa',
|