@sofya-ds/tokens 1.7.0 → 1.8.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 +3 -0
- package/dist/index.cjs +521 -59
- package/dist/index.d.cts +37 -3
- package/dist/index.d.ts +37 -3
- package/dist/index.js +517 -59
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -50,7 +50,7 @@ interface SofyaTypographyScale {
|
|
|
50
50
|
display: string;
|
|
51
51
|
mono: string;
|
|
52
52
|
}
|
|
53
|
-
declare const sofyaTextStyleNames: readonly ["h1", "h2", "h3", "h4", "h5", "body", "tiny", "extra-tiny"];
|
|
53
|
+
declare const sofyaTextStyleNames: readonly ["display-xl", "display-lg", "heading-xl", "heading-lg", "heading-md", "h1", "h2", "h3", "h4", "h5", "encounter-title", "title-md", "title-sm", "body-lg", "body-md", "body-sm", "body", "label-md", "section-label", "eyebrow-md", "overline-md", "sidebar-title", "sidebar-title-regular", "sidebar-title-strong", "sidebar-label", "sidebar-label-strong", "sidebar-body", "sidebar-tag", "encounter-chip", "encounter-history", "caption", "eyebrow", "tiny", "extra-tiny", "code-sm"];
|
|
54
54
|
type SofyaTextStyleName = (typeof sofyaTextStyleNames)[number];
|
|
55
55
|
interface SofyaTextStyle {
|
|
56
56
|
fontFamily: string;
|
|
@@ -61,7 +61,7 @@ interface SofyaTextStyle {
|
|
|
61
61
|
}
|
|
62
62
|
type SofyaResolvedTextStyle = SofyaTextStyle;
|
|
63
63
|
type SofyaTextStyleScale = Record<SofyaTextStyleName, SofyaTextStyle>;
|
|
64
|
-
declare const sofyaSurfaceNames: readonly ["card", "
|
|
64
|
+
declare const sofyaSurfaceNames: readonly ["appBackground", "auth", "card", "dataTable", "dialog", "documentCard", "documentCardSelected", "focus", "mainContent", "panel", "proseDialog", "rightPanel", "sidebar"];
|
|
65
65
|
type SofyaSurfaceName = (typeof sofyaSurfaceNames)[number];
|
|
66
66
|
interface SofyaSurfaceToken {
|
|
67
67
|
background: string;
|
|
@@ -72,6 +72,39 @@ interface SofyaSurfaceToken {
|
|
|
72
72
|
}
|
|
73
73
|
type SofyaResolvedSurfaceToken = SofyaSurfaceToken;
|
|
74
74
|
type SofyaSurfaceScale = Record<SofyaSurfaceName, SofyaSurfaceToken>;
|
|
75
|
+
declare const sofyaSpaceNames: readonly ["0", "0-5", "1", "1-5", "2", "2-5", "3", "4", "5", "6", "8", "10", "12", "16"];
|
|
76
|
+
type SofyaSpaceName = (typeof sofyaSpaceNames)[number];
|
|
77
|
+
declare const sofyaGapNames: readonly ["tight", "compact", "default", "comfortable", "section", "page"];
|
|
78
|
+
type SofyaGapName = (typeof sofyaGapNames)[number];
|
|
79
|
+
declare const sofyaRhythmNames: readonly ["labelToControl", "controlToHelp", "titleToDescription", "titleToBody", "fieldset", "fieldsetCompact", "group", "groupCompact", "paragraphFlow", "sectionContent"];
|
|
80
|
+
type SofyaRhythmName = (typeof sofyaRhythmNames)[number];
|
|
81
|
+
declare const sofyaMeasureNames: readonly ["reading", "compact", "wide"];
|
|
82
|
+
type SofyaMeasureName = (typeof sofyaMeasureNames)[number];
|
|
83
|
+
interface SofyaControlSizeScale {
|
|
84
|
+
xs: string;
|
|
85
|
+
sm: string;
|
|
86
|
+
md: string;
|
|
87
|
+
lg: string;
|
|
88
|
+
}
|
|
89
|
+
interface SofyaIconButtonSizeScale {
|
|
90
|
+
sm: string;
|
|
91
|
+
md: string;
|
|
92
|
+
lg: string;
|
|
93
|
+
}
|
|
94
|
+
interface SofyaLayoutSizeScale {
|
|
95
|
+
sidebarWidth: string;
|
|
96
|
+
rightRailWidth: string;
|
|
97
|
+
proseDialogWidth: string;
|
|
98
|
+
}
|
|
99
|
+
interface SofyaSpacingScale {
|
|
100
|
+
space: Record<SofyaSpaceName, string>;
|
|
101
|
+
gap: Record<SofyaGapName, string>;
|
|
102
|
+
rhythm: Record<SofyaRhythmName, string>;
|
|
103
|
+
measure: Record<SofyaMeasureName, string>;
|
|
104
|
+
control: SofyaControlSizeScale;
|
|
105
|
+
iconButton: SofyaIconButtonSizeScale;
|
|
106
|
+
layout: SofyaLayoutSizeScale;
|
|
107
|
+
}
|
|
75
108
|
interface SofyaTheme {
|
|
76
109
|
name: string;
|
|
77
110
|
colors: SofyaColorScale;
|
|
@@ -80,6 +113,7 @@ interface SofyaTheme {
|
|
|
80
113
|
typography: SofyaTypographyScale;
|
|
81
114
|
textStyles: SofyaTextStyleScale;
|
|
82
115
|
surfaces: SofyaSurfaceScale;
|
|
116
|
+
spacing: SofyaSpacingScale;
|
|
83
117
|
}
|
|
84
118
|
interface SofyaGradientToken {
|
|
85
119
|
angle: string;
|
|
@@ -146,4 +180,4 @@ declare function resolveTheme(preset?: ThemePresetName | SofyaTheme, overrides?:
|
|
|
146
180
|
declare function themeToCssVariables(theme: SofyaTheme): Record<string, string>;
|
|
147
181
|
declare function createWhitelabelTheme(overrides: DeepPartial<SofyaTheme>, preset?: ThemePresetName | SofyaTheme): SofyaTheme;
|
|
148
182
|
|
|
149
|
-
export { type DeepPartial, type HexColor, type SofyaBrandPalette, type SofyaColorPalette, type SofyaColorScale, type SofyaGradientToken, type SofyaRadiusScale, type SofyaResolvedSurfaceToken, type SofyaResolvedTextStyle, type SofyaShadowScale, type SofyaSurfaceName, type SofyaSurfaceScale, type SofyaSurfaceToken, type SofyaTextStyle, type SofyaTextStyleName, type SofyaTextStyleScale, type SofyaTheme, type SofyaTypographyScale, type ThemePresetName, brandPaletteToCssVariables, createWhitelabelTheme, defaultTheme, gradientToCss, hexToHslChannels, mergeTheme, resolveSurfaceToken, resolveTextStyle, resolveTheme, sofyaBrandPalette, sofyaColorPalette, sofyaSemanticColorHex, sofyaSurfaceNames, sofyaTextStyleNames, themePresetNames, themePresets, themeToCssVariables };
|
|
183
|
+
export { type DeepPartial, type HexColor, type SofyaBrandPalette, type SofyaColorPalette, type SofyaColorScale, type SofyaControlSizeScale, type SofyaGapName, type SofyaGradientToken, type SofyaIconButtonSizeScale, type SofyaLayoutSizeScale, type SofyaMeasureName, type SofyaRadiusScale, type SofyaResolvedSurfaceToken, type SofyaResolvedTextStyle, type SofyaRhythmName, type SofyaShadowScale, type SofyaSpaceName, type SofyaSpacingScale, type SofyaSurfaceName, type SofyaSurfaceScale, type SofyaSurfaceToken, type SofyaTextStyle, type SofyaTextStyleName, type SofyaTextStyleScale, type SofyaTheme, type SofyaTypographyScale, type ThemePresetName, brandPaletteToCssVariables, createWhitelabelTheme, defaultTheme, gradientToCss, hexToHslChannels, mergeTheme, resolveSurfaceToken, resolveTextStyle, resolveTheme, sofyaBrandPalette, sofyaColorPalette, sofyaGapNames, sofyaMeasureNames, sofyaRhythmNames, sofyaSemanticColorHex, sofyaSpaceNames, sofyaSurfaceNames, sofyaTextStyleNames, themePresetNames, themePresets, themeToCssVariables };
|
package/dist/index.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ interface SofyaTypographyScale {
|
|
|
50
50
|
display: string;
|
|
51
51
|
mono: string;
|
|
52
52
|
}
|
|
53
|
-
declare const sofyaTextStyleNames: readonly ["h1", "h2", "h3", "h4", "h5", "body", "tiny", "extra-tiny"];
|
|
53
|
+
declare const sofyaTextStyleNames: readonly ["display-xl", "display-lg", "heading-xl", "heading-lg", "heading-md", "h1", "h2", "h3", "h4", "h5", "encounter-title", "title-md", "title-sm", "body-lg", "body-md", "body-sm", "body", "label-md", "section-label", "eyebrow-md", "overline-md", "sidebar-title", "sidebar-title-regular", "sidebar-title-strong", "sidebar-label", "sidebar-label-strong", "sidebar-body", "sidebar-tag", "encounter-chip", "encounter-history", "caption", "eyebrow", "tiny", "extra-tiny", "code-sm"];
|
|
54
54
|
type SofyaTextStyleName = (typeof sofyaTextStyleNames)[number];
|
|
55
55
|
interface SofyaTextStyle {
|
|
56
56
|
fontFamily: string;
|
|
@@ -61,7 +61,7 @@ interface SofyaTextStyle {
|
|
|
61
61
|
}
|
|
62
62
|
type SofyaResolvedTextStyle = SofyaTextStyle;
|
|
63
63
|
type SofyaTextStyleScale = Record<SofyaTextStyleName, SofyaTextStyle>;
|
|
64
|
-
declare const sofyaSurfaceNames: readonly ["card", "
|
|
64
|
+
declare const sofyaSurfaceNames: readonly ["appBackground", "auth", "card", "dataTable", "dialog", "documentCard", "documentCardSelected", "focus", "mainContent", "panel", "proseDialog", "rightPanel", "sidebar"];
|
|
65
65
|
type SofyaSurfaceName = (typeof sofyaSurfaceNames)[number];
|
|
66
66
|
interface SofyaSurfaceToken {
|
|
67
67
|
background: string;
|
|
@@ -72,6 +72,39 @@ interface SofyaSurfaceToken {
|
|
|
72
72
|
}
|
|
73
73
|
type SofyaResolvedSurfaceToken = SofyaSurfaceToken;
|
|
74
74
|
type SofyaSurfaceScale = Record<SofyaSurfaceName, SofyaSurfaceToken>;
|
|
75
|
+
declare const sofyaSpaceNames: readonly ["0", "0-5", "1", "1-5", "2", "2-5", "3", "4", "5", "6", "8", "10", "12", "16"];
|
|
76
|
+
type SofyaSpaceName = (typeof sofyaSpaceNames)[number];
|
|
77
|
+
declare const sofyaGapNames: readonly ["tight", "compact", "default", "comfortable", "section", "page"];
|
|
78
|
+
type SofyaGapName = (typeof sofyaGapNames)[number];
|
|
79
|
+
declare const sofyaRhythmNames: readonly ["labelToControl", "controlToHelp", "titleToDescription", "titleToBody", "fieldset", "fieldsetCompact", "group", "groupCompact", "paragraphFlow", "sectionContent"];
|
|
80
|
+
type SofyaRhythmName = (typeof sofyaRhythmNames)[number];
|
|
81
|
+
declare const sofyaMeasureNames: readonly ["reading", "compact", "wide"];
|
|
82
|
+
type SofyaMeasureName = (typeof sofyaMeasureNames)[number];
|
|
83
|
+
interface SofyaControlSizeScale {
|
|
84
|
+
xs: string;
|
|
85
|
+
sm: string;
|
|
86
|
+
md: string;
|
|
87
|
+
lg: string;
|
|
88
|
+
}
|
|
89
|
+
interface SofyaIconButtonSizeScale {
|
|
90
|
+
sm: string;
|
|
91
|
+
md: string;
|
|
92
|
+
lg: string;
|
|
93
|
+
}
|
|
94
|
+
interface SofyaLayoutSizeScale {
|
|
95
|
+
sidebarWidth: string;
|
|
96
|
+
rightRailWidth: string;
|
|
97
|
+
proseDialogWidth: string;
|
|
98
|
+
}
|
|
99
|
+
interface SofyaSpacingScale {
|
|
100
|
+
space: Record<SofyaSpaceName, string>;
|
|
101
|
+
gap: Record<SofyaGapName, string>;
|
|
102
|
+
rhythm: Record<SofyaRhythmName, string>;
|
|
103
|
+
measure: Record<SofyaMeasureName, string>;
|
|
104
|
+
control: SofyaControlSizeScale;
|
|
105
|
+
iconButton: SofyaIconButtonSizeScale;
|
|
106
|
+
layout: SofyaLayoutSizeScale;
|
|
107
|
+
}
|
|
75
108
|
interface SofyaTheme {
|
|
76
109
|
name: string;
|
|
77
110
|
colors: SofyaColorScale;
|
|
@@ -80,6 +113,7 @@ interface SofyaTheme {
|
|
|
80
113
|
typography: SofyaTypographyScale;
|
|
81
114
|
textStyles: SofyaTextStyleScale;
|
|
82
115
|
surfaces: SofyaSurfaceScale;
|
|
116
|
+
spacing: SofyaSpacingScale;
|
|
83
117
|
}
|
|
84
118
|
interface SofyaGradientToken {
|
|
85
119
|
angle: string;
|
|
@@ -146,4 +180,4 @@ declare function resolveTheme(preset?: ThemePresetName | SofyaTheme, overrides?:
|
|
|
146
180
|
declare function themeToCssVariables(theme: SofyaTheme): Record<string, string>;
|
|
147
181
|
declare function createWhitelabelTheme(overrides: DeepPartial<SofyaTheme>, preset?: ThemePresetName | SofyaTheme): SofyaTheme;
|
|
148
182
|
|
|
149
|
-
export { type DeepPartial, type HexColor, type SofyaBrandPalette, type SofyaColorPalette, type SofyaColorScale, type SofyaGradientToken, type SofyaRadiusScale, type SofyaResolvedSurfaceToken, type SofyaResolvedTextStyle, type SofyaShadowScale, type SofyaSurfaceName, type SofyaSurfaceScale, type SofyaSurfaceToken, type SofyaTextStyle, type SofyaTextStyleName, type SofyaTextStyleScale, type SofyaTheme, type SofyaTypographyScale, type ThemePresetName, brandPaletteToCssVariables, createWhitelabelTheme, defaultTheme, gradientToCss, hexToHslChannels, mergeTheme, resolveSurfaceToken, resolveTextStyle, resolveTheme, sofyaBrandPalette, sofyaColorPalette, sofyaSemanticColorHex, sofyaSurfaceNames, sofyaTextStyleNames, themePresetNames, themePresets, themeToCssVariables };
|
|
183
|
+
export { type DeepPartial, type HexColor, type SofyaBrandPalette, type SofyaColorPalette, type SofyaColorScale, type SofyaControlSizeScale, type SofyaGapName, type SofyaGradientToken, type SofyaIconButtonSizeScale, type SofyaLayoutSizeScale, type SofyaMeasureName, type SofyaRadiusScale, type SofyaResolvedSurfaceToken, type SofyaResolvedTextStyle, type SofyaRhythmName, type SofyaShadowScale, type SofyaSpaceName, type SofyaSpacingScale, type SofyaSurfaceName, type SofyaSurfaceScale, type SofyaSurfaceToken, type SofyaTextStyle, type SofyaTextStyleName, type SofyaTextStyleScale, type SofyaTheme, type SofyaTypographyScale, type ThemePresetName, brandPaletteToCssVariables, createWhitelabelTheme, defaultTheme, gradientToCss, hexToHslChannels, mergeTheme, resolveSurfaceToken, resolveTextStyle, resolveTheme, sofyaBrandPalette, sofyaColorPalette, sofyaGapNames, sofyaMeasureNames, sofyaRhythmNames, sofyaSemanticColorHex, sofyaSpaceNames, sofyaSurfaceNames, sofyaTextStyleNames, themePresetNames, themePresets, themeToCssVariables };
|