@graphty/compact-mantine 0.9.29 → 0.9.31
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 +19 -0
- package/dist/index.cjs +178 -152
- package/dist/index.d.cts +36 -6
- package/dist/index.d.ts +36 -6
- package/dist/index.js +2094 -2000
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -678,6 +678,9 @@ export declare const COMPACT_SIZING: {
|
|
|
678
678
|
readonly SECTION_GAP: 4;
|
|
679
679
|
};
|
|
680
680
|
|
|
681
|
+
/** The accents the theme ships: Figma's blue, or the graphty brand lime and ink. */
|
|
682
|
+
export declare type CompactAccent = "figma" | "graphty";
|
|
683
|
+
|
|
681
684
|
/**
|
|
682
685
|
* The accent palette, the theme's `primaryColor` (spec 3.3). Mantine reads shade 6 filled and
|
|
683
686
|
* 7 hover in light (#0d99ff / #007be5), 8 / 9 in dark (#0c8ce9 / #0a6dc2), and shade 4 as the
|
|
@@ -881,12 +884,13 @@ export declare interface CompactColorInputProps {
|
|
|
881
884
|
}
|
|
882
885
|
|
|
883
886
|
/**
|
|
884
|
-
* Color configuration for the compact theme: every Mantine color, the neutral `dark` ramp
|
|
885
|
-
* the `
|
|
887
|
+
* Color configuration for the compact theme: every Mantine color, the neutral `dark` ramp, the
|
|
888
|
+
* `brand` accent and the `graphty` accent.
|
|
886
889
|
*/
|
|
887
890
|
export declare const compactColors: {
|
|
888
891
|
dark: MantineColorsTuple;
|
|
889
892
|
brand: MantineColorsTuple;
|
|
893
|
+
graphty: MantineColorsTuple;
|
|
890
894
|
gray: MantineColorsTuple;
|
|
891
895
|
red: MantineColorsTuple;
|
|
892
896
|
pink: MantineColorsTuple;
|
|
@@ -915,13 +919,22 @@ export declare const compactColors: {
|
|
|
915
919
|
export declare const compactDarkColors: MantineColorsTuple;
|
|
916
920
|
|
|
917
921
|
/**
|
|
918
|
-
* The whole stylesheet, for SSR or a shadow root. With `highContrast` the AA tokens
|
|
919
|
-
* applied unconditionally, so the result
|
|
922
|
+
* The whole stylesheet, for SSR or a shadow root. With `highContrast` the AA tokens, and with
|
|
923
|
+
* `accent: "graphty"` the graphty accent tokens, are also applied unconditionally, so the result
|
|
924
|
+
* needs no `data-cm-contrast` or `data-cm-accent` attribute.
|
|
920
925
|
* @param options - the theme options
|
|
921
926
|
* @returns the CSS text
|
|
922
927
|
*/
|
|
923
928
|
export declare function compactGlobalCss(options?: CompactThemeOptions): string;
|
|
924
929
|
|
|
930
|
+
/**
|
|
931
|
+
* The graphty brand lime, the `primaryColor` of `createCompactTheme({ accent: "graphty" })`, for
|
|
932
|
+
* the Mantine components that read the primary palette directly: 0 the lime-50 tint, 6 the mark
|
|
933
|
+
* green #97c800 (the light fill), 7 the olive #588300 (light text), 8 the bright lime #c4f23a
|
|
934
|
+
* (the dark fill). The `--cm-*` accent tokens take their values from CM_GRAPHTY_ACCENT.
|
|
935
|
+
*/
|
|
936
|
+
export declare const compactGraphtyColors: MantineColorsTuple;
|
|
937
|
+
|
|
925
938
|
/**
|
|
926
939
|
* Every user-visible or assistive-technology-visible string this library
|
|
927
940
|
* produces.
|
|
@@ -1246,6 +1259,12 @@ export declare interface CompactThemeOptions {
|
|
|
1246
1259
|
* Apply the WCAG 2.2 AA token set (spec 2.9). Default false: exact Figma.
|
|
1247
1260
|
*/
|
|
1248
1261
|
highContrast?: boolean;
|
|
1262
|
+
/**
|
|
1263
|
+
* The accent: `"figma"` (default) is Figma's blue; `"graphty"` is the graphty brand lime,
|
|
1264
|
+
* with ink labels on lime fills and olive text on light, which meets AA in both contrast
|
|
1265
|
+
* modes. It sets the theme's `primaryColor` to `"graphty"`.
|
|
1266
|
+
*/
|
|
1267
|
+
accent?: CompactAccent;
|
|
1249
1268
|
}
|
|
1250
1269
|
|
|
1251
1270
|
/**
|
|
@@ -1426,6 +1445,7 @@ export declare const compactThemeOverride: {
|
|
|
1426
1445
|
} | undefined;
|
|
1427
1446
|
compact?: {
|
|
1428
1447
|
highContrast?: boolean | undefined;
|
|
1448
|
+
accent?: CompactAccent | undefined;
|
|
1429
1449
|
} | undefined;
|
|
1430
1450
|
} | undefined;
|
|
1431
1451
|
};
|
|
@@ -1905,7 +1925,8 @@ export declare function createColorStop(offset: number, color: string): ColorSto
|
|
|
1905
1925
|
*
|
|
1906
1926
|
* Light and dark are Mantine's own color scheme (`defaultColorScheme`, `forceColorScheme`,
|
|
1907
1927
|
* `useMantineColorScheme`); one theme object serves both.
|
|
1908
|
-
* @param options - `highContrast` switches on the AA tokens
|
|
1928
|
+
* @param options - `highContrast` switches on the AA tokens; `accent: "graphty"` the graphty
|
|
1929
|
+
* brand accent
|
|
1909
1930
|
* @returns a theme override for `MantineProvider`
|
|
1910
1931
|
* @example
|
|
1911
1932
|
* ```tsx
|
|
@@ -3833,8 +3854,16 @@ export declare const PANEL_INK: {
|
|
|
3833
3854
|
readonly DIVIDER: "var(--cm-border)";
|
|
3834
3855
|
/** a filled accent surface: primary button, checked box (#0d99ff / #0c8ce9) */
|
|
3835
3856
|
readonly ACCENT: "var(--cm-bg-brand)";
|
|
3836
|
-
/** text and glyphs on the accent (#fff) */
|
|
3857
|
+
/** text and glyphs on the accent (#fff; ink on the graphty lime) */
|
|
3837
3858
|
readonly ON_ACCENT: "var(--cm-text-onbrand)";
|
|
3859
|
+
/**
|
|
3860
|
+
* an accent graphic that has to be seen on the panel: a status dot, a meter's fill, a
|
|
3861
|
+
* highlighted bar, a stroke (= ACCENT, except where the accent fill is too light to read as
|
|
3862
|
+
* a graphic: the graphty olive #588300 on light)
|
|
3863
|
+
*/
|
|
3864
|
+
readonly ACCENT_GRAPHIC: "var(--cm-graphic-brand)";
|
|
3865
|
+
/** the white label on the danger, success and inverse fills, which no accent changes */
|
|
3866
|
+
readonly ON_SOLID: "var(--cm-text-onsolid)";
|
|
3838
3867
|
/** warning (#ffcd29 / #f3c11b) */
|
|
3839
3868
|
readonly WARNING: "var(--cm-bg-warning)";
|
|
3840
3869
|
/** success (#14ae5c / #198f51) */
|
|
@@ -7133,6 +7162,7 @@ declare module "@mantine/core" {
|
|
|
7133
7162
|
/** The options this theme was created with, resolved. */
|
|
7134
7163
|
compact?: {
|
|
7135
7164
|
highContrast: boolean;
|
|
7165
|
+
accent?: CompactAccent;
|
|
7136
7166
|
};
|
|
7137
7167
|
}
|
|
7138
7168
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -678,6 +678,9 @@ export declare const COMPACT_SIZING: {
|
|
|
678
678
|
readonly SECTION_GAP: 4;
|
|
679
679
|
};
|
|
680
680
|
|
|
681
|
+
/** The accents the theme ships: Figma's blue, or the graphty brand lime and ink. */
|
|
682
|
+
export declare type CompactAccent = "figma" | "graphty";
|
|
683
|
+
|
|
681
684
|
/**
|
|
682
685
|
* The accent palette, the theme's `primaryColor` (spec 3.3). Mantine reads shade 6 filled and
|
|
683
686
|
* 7 hover in light (#0d99ff / #007be5), 8 / 9 in dark (#0c8ce9 / #0a6dc2), and shade 4 as the
|
|
@@ -881,12 +884,13 @@ export declare interface CompactColorInputProps {
|
|
|
881
884
|
}
|
|
882
885
|
|
|
883
886
|
/**
|
|
884
|
-
* Color configuration for the compact theme: every Mantine color, the neutral `dark` ramp
|
|
885
|
-
* the `
|
|
887
|
+
* Color configuration for the compact theme: every Mantine color, the neutral `dark` ramp, the
|
|
888
|
+
* `brand` accent and the `graphty` accent.
|
|
886
889
|
*/
|
|
887
890
|
export declare const compactColors: {
|
|
888
891
|
dark: MantineColorsTuple;
|
|
889
892
|
brand: MantineColorsTuple;
|
|
893
|
+
graphty: MantineColorsTuple;
|
|
890
894
|
gray: MantineColorsTuple;
|
|
891
895
|
red: MantineColorsTuple;
|
|
892
896
|
pink: MantineColorsTuple;
|
|
@@ -915,13 +919,22 @@ export declare const compactColors: {
|
|
|
915
919
|
export declare const compactDarkColors: MantineColorsTuple;
|
|
916
920
|
|
|
917
921
|
/**
|
|
918
|
-
* The whole stylesheet, for SSR or a shadow root. With `highContrast` the AA tokens
|
|
919
|
-
* applied unconditionally, so the result
|
|
922
|
+
* The whole stylesheet, for SSR or a shadow root. With `highContrast` the AA tokens, and with
|
|
923
|
+
* `accent: "graphty"` the graphty accent tokens, are also applied unconditionally, so the result
|
|
924
|
+
* needs no `data-cm-contrast` or `data-cm-accent` attribute.
|
|
920
925
|
* @param options - the theme options
|
|
921
926
|
* @returns the CSS text
|
|
922
927
|
*/
|
|
923
928
|
export declare function compactGlobalCss(options?: CompactThemeOptions): string;
|
|
924
929
|
|
|
930
|
+
/**
|
|
931
|
+
* The graphty brand lime, the `primaryColor` of `createCompactTheme({ accent: "graphty" })`, for
|
|
932
|
+
* the Mantine components that read the primary palette directly: 0 the lime-50 tint, 6 the mark
|
|
933
|
+
* green #97c800 (the light fill), 7 the olive #588300 (light text), 8 the bright lime #c4f23a
|
|
934
|
+
* (the dark fill). The `--cm-*` accent tokens take their values from CM_GRAPHTY_ACCENT.
|
|
935
|
+
*/
|
|
936
|
+
export declare const compactGraphtyColors: MantineColorsTuple;
|
|
937
|
+
|
|
925
938
|
/**
|
|
926
939
|
* Every user-visible or assistive-technology-visible string this library
|
|
927
940
|
* produces.
|
|
@@ -1246,6 +1259,12 @@ export declare interface CompactThemeOptions {
|
|
|
1246
1259
|
* Apply the WCAG 2.2 AA token set (spec 2.9). Default false: exact Figma.
|
|
1247
1260
|
*/
|
|
1248
1261
|
highContrast?: boolean;
|
|
1262
|
+
/**
|
|
1263
|
+
* The accent: `"figma"` (default) is Figma's blue; `"graphty"` is the graphty brand lime,
|
|
1264
|
+
* with ink labels on lime fills and olive text on light, which meets AA in both contrast
|
|
1265
|
+
* modes. It sets the theme's `primaryColor` to `"graphty"`.
|
|
1266
|
+
*/
|
|
1267
|
+
accent?: CompactAccent;
|
|
1249
1268
|
}
|
|
1250
1269
|
|
|
1251
1270
|
/**
|
|
@@ -1426,6 +1445,7 @@ export declare const compactThemeOverride: {
|
|
|
1426
1445
|
} | undefined;
|
|
1427
1446
|
compact?: {
|
|
1428
1447
|
highContrast?: boolean | undefined;
|
|
1448
|
+
accent?: CompactAccent | undefined;
|
|
1429
1449
|
} | undefined;
|
|
1430
1450
|
} | undefined;
|
|
1431
1451
|
};
|
|
@@ -1905,7 +1925,8 @@ export declare function createColorStop(offset: number, color: string): ColorSto
|
|
|
1905
1925
|
*
|
|
1906
1926
|
* Light and dark are Mantine's own color scheme (`defaultColorScheme`, `forceColorScheme`,
|
|
1907
1927
|
* `useMantineColorScheme`); one theme object serves both.
|
|
1908
|
-
* @param options - `highContrast` switches on the AA tokens
|
|
1928
|
+
* @param options - `highContrast` switches on the AA tokens; `accent: "graphty"` the graphty
|
|
1929
|
+
* brand accent
|
|
1909
1930
|
* @returns a theme override for `MantineProvider`
|
|
1910
1931
|
* @example
|
|
1911
1932
|
* ```tsx
|
|
@@ -3833,8 +3854,16 @@ export declare const PANEL_INK: {
|
|
|
3833
3854
|
readonly DIVIDER: "var(--cm-border)";
|
|
3834
3855
|
/** a filled accent surface: primary button, checked box (#0d99ff / #0c8ce9) */
|
|
3835
3856
|
readonly ACCENT: "var(--cm-bg-brand)";
|
|
3836
|
-
/** text and glyphs on the accent (#fff) */
|
|
3857
|
+
/** text and glyphs on the accent (#fff; ink on the graphty lime) */
|
|
3837
3858
|
readonly ON_ACCENT: "var(--cm-text-onbrand)";
|
|
3859
|
+
/**
|
|
3860
|
+
* an accent graphic that has to be seen on the panel: a status dot, a meter's fill, a
|
|
3861
|
+
* highlighted bar, a stroke (= ACCENT, except where the accent fill is too light to read as
|
|
3862
|
+
* a graphic: the graphty olive #588300 on light)
|
|
3863
|
+
*/
|
|
3864
|
+
readonly ACCENT_GRAPHIC: "var(--cm-graphic-brand)";
|
|
3865
|
+
/** the white label on the danger, success and inverse fills, which no accent changes */
|
|
3866
|
+
readonly ON_SOLID: "var(--cm-text-onsolid)";
|
|
3838
3867
|
/** warning (#ffcd29 / #f3c11b) */
|
|
3839
3868
|
readonly WARNING: "var(--cm-bg-warning)";
|
|
3840
3869
|
/** success (#14ae5c / #198f51) */
|
|
@@ -7133,6 +7162,7 @@ declare module "@mantine/core" {
|
|
|
7133
7162
|
/** The options this theme was created with, resolved. */
|
|
7134
7163
|
compact?: {
|
|
7135
7164
|
highContrast: boolean;
|
|
7165
|
+
accent?: CompactAccent;
|
|
7136
7166
|
};
|
|
7137
7167
|
}
|
|
7138
7168
|
}
|