@handijitcom/ui 2.0.1 → 3.1.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 +202 -71
- package/build/calendar.cjs +1 -1
- package/build/calendar.cjs.map +1 -1
- package/build/calendar.css +1 -1
- package/build/calendar.js +109 -111
- package/build/calendar.js.map +1 -1
- package/build/chat.cjs +1 -1
- package/build/chat.cjs.map +1 -1
- package/build/chat.css +1 -1
- package/build/chat.js +2 -2
- package/build/chat.js.map +1 -1
- package/build/components/Alert/style.css +1 -1
- package/build/components/Avatar/index.cjs.map +1 -1
- package/build/components/Avatar/index.d.cts +1 -1
- package/build/components/Avatar/index.d.ts +1 -1
- package/build/components/Avatar/index.js.map +1 -1
- package/build/components/Avatar/style.css +1 -1
- package/build/components/Badge/index.cjs +1 -1
- package/build/components/Badge/index.cjs.map +1 -1
- package/build/components/Badge/index.d.cts +4 -2
- package/build/components/Badge/index.d.ts +4 -2
- package/build/components/Badge/index.js +1 -1
- package/build/components/Badge/index.js.map +1 -1
- package/build/components/Badge/style.css +1 -1
- package/build/components/BrandSurface/index.cjs +2 -0
- package/build/components/BrandSurface/index.cjs.map +1 -0
- package/build/components/BrandSurface/index.d.cts +46 -0
- package/build/components/BrandSurface/index.d.ts +46 -0
- package/build/components/BrandSurface/index.js +128 -0
- package/build/components/BrandSurface/index.js.map +1 -0
- package/build/components/BrandSurface/style.css +1 -0
- package/build/components/BulkPasteInput/index.cjs +2 -0
- package/build/components/BulkPasteInput/index.cjs.map +1 -0
- package/build/components/BulkPasteInput/index.d.cts +26 -0
- package/build/components/BulkPasteInput/index.d.ts +26 -0
- package/build/components/BulkPasteInput/index.js +80 -0
- package/build/components/BulkPasteInput/index.js.map +1 -0
- package/build/components/BulkPasteInput/style.css +1 -0
- package/build/components/Button/index.cjs +1 -1
- package/build/components/Button/index.js +1 -1
- package/build/components/Button/style.css +1 -1
- package/build/components/Checkbox/index.cjs +1 -1
- package/build/components/Checkbox/index.cjs.map +1 -1
- package/build/components/Checkbox/index.js +6 -6
- package/build/components/Checkbox/index.js.map +1 -1
- package/build/components/CodeBadge/style.css +1 -1
- package/build/components/CopyField/style.css +1 -1
- package/build/components/DataTable/context.cjs +2 -0
- package/build/components/DataTable/context.cjs.map +1 -0
- package/build/components/DataTable/context.d.cts +17 -0
- package/build/components/DataTable/context.d.ts +17 -0
- package/build/components/DataTable/context.js +7 -0
- package/build/components/DataTable/context.js.map +1 -0
- package/build/components/DataTable/index.cjs +1 -1
- package/build/components/DataTable/index.cjs.map +1 -1
- package/build/components/DataTable/index.d.cts +46 -5
- package/build/components/DataTable/index.d.ts +46 -5
- package/build/components/DataTable/index.js +236 -93
- package/build/components/DataTable/index.js.map +1 -1
- package/build/components/DataTable/style.css +1 -1
- package/build/components/DataTableColumnMenu/index.cjs +2 -0
- package/build/components/DataTableColumnMenu/index.cjs.map +1 -0
- package/build/components/DataTableColumnMenu/index.d.cts +13 -0
- package/build/components/DataTableColumnMenu/index.d.ts +13 -0
- package/build/components/DataTableColumnMenu/index.js +69 -0
- package/build/components/DataTableColumnMenu/index.js.map +1 -0
- package/build/components/DataTableColumnMenu/style.css +1 -0
- package/build/components/Eyebrow/index.cjs.map +1 -1
- package/build/components/Eyebrow/index.d.cts +1 -1
- package/build/components/Eyebrow/index.d.ts +1 -1
- package/build/components/Eyebrow/index.js.map +1 -1
- package/build/components/Eyebrow/style.css +1 -1
- package/build/components/Gallery/index.cjs +2 -0
- package/build/components/Gallery/index.cjs.map +1 -0
- package/build/components/Gallery/index.d.cts +56 -0
- package/build/components/Gallery/index.d.ts +56 -0
- package/build/components/Gallery/index.js +253 -0
- package/build/components/Gallery/index.js.map +1 -0
- package/build/components/Gallery/style.css +1 -0
- package/build/components/Modal/style.css +1 -1
- package/build/components/NotificationCenter/index.cjs +2 -0
- package/build/components/NotificationCenter/index.cjs.map +1 -0
- package/build/components/NotificationCenter/index.d.cts +45 -0
- package/build/components/NotificationCenter/index.d.ts +45 -0
- package/build/components/NotificationCenter/index.js +124 -0
- package/build/components/NotificationCenter/index.js.map +1 -0
- package/build/components/NotificationCenter/style.css +1 -0
- package/build/components/Popover/index.cjs +1 -1
- package/build/components/Popover/index.cjs.map +1 -1
- package/build/components/Popover/index.js +16 -16
- package/build/components/Popover/index.js.map +1 -1
- package/build/components/Progress/index.cjs +1 -1
- package/build/components/Progress/index.cjs.map +1 -1
- package/build/components/Progress/index.d.cts +2 -2
- package/build/components/Progress/index.d.ts +2 -2
- package/build/components/Progress/index.js +1 -1
- package/build/components/Progress/index.js.map +1 -1
- package/build/components/Progress/style.css +1 -1
- package/build/components/Rating/style.css +1 -1
- package/build/components/RatingInput/style.css +1 -1
- package/build/components/Stat/style.css +1 -1
- package/build/components/StatStrip/index.cjs +1 -1
- package/build/components/StatStrip/index.cjs.map +1 -1
- package/build/components/StatStrip/index.d.cts +3 -3
- package/build/components/StatStrip/index.d.ts +3 -3
- package/build/components/StatStrip/index.js +1 -1
- package/build/components/StatStrip/index.js.map +1 -1
- package/build/components/StatStrip/style.css +1 -1
- package/build/components/StatusDot/index.cjs +1 -1
- package/build/components/StatusDot/index.cjs.map +1 -1
- package/build/components/StatusDot/index.d.cts +5 -3
- package/build/components/StatusDot/index.d.ts +5 -3
- package/build/components/StatusDot/index.js +1 -1
- package/build/components/StatusDot/index.js.map +1 -1
- package/build/components/StatusDot/style.css +1 -1
- package/build/components/TagInput/style.css +1 -1
- package/build/components/Textarea/style.css +1 -1
- package/build/components/Timeline/style.css +1 -1
- package/build/components/Toast/style.css +1 -1
- package/build/components/TreeSelect/index.cjs +2 -0
- package/build/components/TreeSelect/index.cjs.map +1 -0
- package/build/components/TreeSelect/index.d.cts +40 -0
- package/build/components/TreeSelect/index.d.ts +40 -0
- package/build/components/TreeSelect/index.js +175 -0
- package/build/components/TreeSelect/index.js.map +1 -0
- package/build/components/TreeSelect/style.css +1 -0
- package/build/design/index.cjs +84 -178
- package/build/design/index.cjs.map +1 -1
- package/build/design/index.d.cts +72 -63
- package/build/design/index.d.mts +72 -63
- package/build/design/index.mjs +84 -178
- package/build/design/index.mjs.map +1 -1
- package/build/design/index.umd.cjs +1 -1
- package/build/design/index.umd.cjs.map +1 -1
- package/build/design/tokens.css +62 -177
- package/build/design/tokens.json +66 -168
- package/build/design/tokens.scss +48 -178
- package/build/enums/ui-variant.enum.cjs +1 -1
- package/build/enums/ui-variant.enum.cjs.map +1 -1
- package/build/enums/ui-variant.enum.d.cts +2 -2
- package/build/enums/ui-variant.enum.d.ts +2 -2
- package/build/enums/ui-variant.enum.js +1 -1
- package/build/enums/ui-variant.enum.js.map +1 -1
- package/build/helpers/bulk-paste.helper.cjs +2 -0
- package/build/helpers/bulk-paste.helper.cjs.map +1 -0
- package/build/helpers/bulk-paste.helper.d.cts +38 -0
- package/build/helpers/bulk-paste.helper.d.ts +38 -0
- package/build/helpers/bulk-paste.helper.js +37 -0
- package/build/helpers/bulk-paste.helper.js.map +1 -0
- package/build/index.cjs +1 -1
- package/build/index.d.cts +8 -2
- package/build/index.d.ts +8 -2
- package/build/index.js +122 -110
- package/build/index.js.map +1 -1
- package/build/scss/_mixins.scss +8 -10
- package/build/scss/_variables.scss +19 -39
- package/build/styles.css +31 -21
- package/build/types/calendar/Calendar/index.d.cts +1 -1
- package/build/types/calendar/Calendar/index.d.ts +1 -1
- package/build/types/calendar/core/types.d.cts +3 -2
- package/build/types/calendar/core/types.d.ts +3 -2
- package/build/types/theme.type.d.cts +54 -0
- package/build/types/theme.type.d.ts +54 -0
- package/build/types/types/theme.type.d.cts +54 -0
- package/build/types/types/theme.type.d.ts +54 -0
- package/package.json +61 -11
- package/build/components/Band/index.cjs +0 -2
- package/build/components/Band/index.cjs.map +0 -1
- package/build/components/Band/index.d.cts +0 -45
- package/build/components/Band/index.d.ts +0 -45
- package/build/components/Band/index.js +0 -126
- package/build/components/Band/index.js.map +0 -1
- package/build/components/Band/style.css +0 -1
package/build/design/index.d.cts
CHANGED
|
@@ -13,20 +13,21 @@ type Oklch = {
|
|
|
13
13
|
type ThemeName = 'light' | 'dark';
|
|
14
14
|
/** What the user picked; `system` follows the operating system. */
|
|
15
15
|
type ThemePreference = ThemeName | 'system';
|
|
16
|
-
|
|
17
|
-
type
|
|
16
|
+
/** The brand's cobalt and coral, and red, the one status colour (danger). */
|
|
17
|
+
type ChromaticScaleName = 'cobalt' | 'coral' | 'danger';
|
|
18
|
+
type ScaleName = ChromaticScaleName | 'ink';
|
|
18
19
|
type ChromaticStep = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 950;
|
|
19
20
|
type NeutralStep = 0 | 25 | ChromaticStep;
|
|
20
21
|
type ChromaticScale = Readonly<Record<ChromaticStep, string>>;
|
|
21
22
|
type NeutralScale = Readonly<Record<NeutralStep, string>>;
|
|
22
23
|
type Scales = Readonly<Record<ChromaticScaleName, ChromaticScale>> & {
|
|
23
|
-
readonly
|
|
24
|
+
readonly ink: NeutralScale;
|
|
24
25
|
};
|
|
25
26
|
type HueName = ChromaticScaleName;
|
|
26
|
-
type StatusName = '
|
|
27
|
+
type StatusName = 'danger' | 'info';
|
|
27
28
|
type ChartIndex = 1 | 2 | 3 | 4 | 5 | 6;
|
|
28
29
|
/** Every theme-dependent colour. Values are always opaque `#rrggbb`. */
|
|
29
|
-
type ColorToken = 'bg-page' | 'bg-surface' | 'bg-raised' | 'bg-inset' | 'bg-overlay' | 'bg-disabled' | 'border' | 'border-strong' | 'border-control' | 'text' | 'text-2' | 'text-3' | 'text-disabled' | 'primary' | 'primary-hover' | 'primary-active' | 'on-primary' | 'primary-soft' | 'primary-soft-hover' | 'primary-line' | 'primary-text' | 'accent' | 'accent-hover' | 'accent-active' | 'on-accent' | 'accent-soft' | 'accent-text' | 'focus' | 'selection-bg' | `${StatusName}-${'bg' | 'fg' | 'line' | 'solid' | 'on-solid'}` | `chart-${ChartIndex}` | '
|
|
30
|
+
type ColorToken = 'bg-page' | 'bg-surface' | 'bg-raised' | 'bg-inset' | 'bg-overlay' | 'bg-disabled' | 'border' | 'border-strong' | 'border-control' | 'text' | 'text-2' | 'text-3' | 'text-disabled' | 'primary' | 'primary-hover' | 'primary-active' | 'on-primary' | 'primary-soft' | 'primary-soft-hover' | 'primary-line' | 'primary-text' | 'accent' | 'accent-hover' | 'accent-active' | 'on-accent' | 'accent-soft' | 'accent-text' | 'focus' | 'selection-bg' | `${StatusName}-${'bg' | 'fg' | 'line' | 'solid' | 'on-solid'}` | `chart-${ChartIndex}` | 'brand-surface-deep';
|
|
30
31
|
type Theme = Readonly<Record<ColorToken, string>>;
|
|
31
32
|
type Themes = Readonly<Record<ThemeName, Theme>>;
|
|
32
33
|
type FontRole = 'display' | 'body' | 'mono';
|
|
@@ -67,34 +68,26 @@ type ThemeEffects = {
|
|
|
67
68
|
readonly 'shadow-3': string;
|
|
68
69
|
/** Translucent backdrop behind dialogs. */
|
|
69
70
|
readonly scrim: string;
|
|
70
|
-
/**
|
|
71
|
-
readonly '
|
|
72
|
-
/**
|
|
73
|
-
readonly '
|
|
74
|
-
/**
|
|
75
|
-
readonly '
|
|
76
|
-
/**
|
|
77
|
-
readonly '
|
|
78
|
-
/** Opacity of a glow at its centre; it fades to 0 at its edge. */
|
|
79
|
-
readonly 'band-glow-alpha': string;
|
|
80
|
-
/** Colour of the dots of the band's dot grid (`band-line-strong`). */
|
|
81
|
-
readonly 'band-dot': string;
|
|
82
|
-
/** Opacity of the dot grid at the band's edge; it fades to 0 towards the content. */
|
|
83
|
-
readonly 'band-dot-alpha': string;
|
|
71
|
+
/** How far down the brand surface holds `primary` before it deepens, as a percentage. */
|
|
72
|
+
readonly 'brand-surface-hold': string;
|
|
73
|
+
/** Hairline on the brand surface: white at low opacity, as a CSS colour. */
|
|
74
|
+
readonly 'brand-surface-line': string;
|
|
75
|
+
/** Opacity of the white glow at its centre; it fades to 0 at its edge. */
|
|
76
|
+
readonly 'brand-surface-glow-alpha': string;
|
|
77
|
+
/** Opacity of the white dot grid at the surface's edge; it fades to 0 towards the content. */
|
|
78
|
+
readonly 'brand-surface-dot-alpha': string;
|
|
84
79
|
/** Side of one cell of the dot grid. */
|
|
85
|
-
readonly '
|
|
80
|
+
readonly 'brand-surface-dot-cell': string;
|
|
86
81
|
/** Radius of one dot. */
|
|
87
|
-
readonly '
|
|
88
|
-
/**
|
|
89
|
-
readonly '
|
|
90
|
-
/**
|
|
91
|
-
readonly '
|
|
92
|
-
/**
|
|
93
|
-
readonly '
|
|
94
|
-
/**
|
|
95
|
-
readonly '
|
|
96
|
-
/** The soft coral glow of the conversion button on the band, as a `box-shadow`. */
|
|
97
|
-
readonly 'band-accent-glow': string;
|
|
82
|
+
readonly 'brand-surface-dot-radius': string;
|
|
83
|
+
/** Where a blueprint supergraphic's white fill has faded out, as a percentage. */
|
|
84
|
+
readonly 'brand-surface-blueprint-hold': string;
|
|
85
|
+
/** Opacity of a blueprint's white fill at its top. */
|
|
86
|
+
readonly 'brand-surface-blueprint-fill-alpha': string;
|
|
87
|
+
/** Opacity of a blueprint's white outline. */
|
|
88
|
+
readonly 'brand-surface-blueprint-stroke-alpha': string;
|
|
89
|
+
/** The soft coral glow of the conversion button on the brand surface, as a `box-shadow`. */
|
|
90
|
+
readonly 'brand-surface-accent-glow': string;
|
|
98
91
|
};
|
|
99
92
|
type EffectToken = keyof ThemeEffects;
|
|
100
93
|
type Effects = Readonly<Record<ThemeName, ThemeEffects>>;
|
|
@@ -133,49 +126,61 @@ type ThemeEffectValues = {
|
|
|
133
126
|
readonly shadows: Readonly<Record<ShadowLevel, readonly ShadowLayer[]>>;
|
|
134
127
|
/** Translucent backdrop behind dialogs. */
|
|
135
128
|
readonly scrim: EffectTone;
|
|
136
|
-
/** The decorative layers of the brand
|
|
137
|
-
readonly
|
|
129
|
+
/** The decorative layers of the brand surface; the same in both themes. */
|
|
130
|
+
readonly brandSurface: BrandSurfaceEffectValues;
|
|
138
131
|
};
|
|
139
|
-
/** The brand
|
|
140
|
-
type
|
|
141
|
-
/** The
|
|
132
|
+
/** The brand surface's imagery as hex and numbers: gradient, line, glow, dot grid, blueprint. */
|
|
133
|
+
type BrandSurfaceEffectValues = {
|
|
134
|
+
/** The surface's vertical background, top to bottom (`primary` into `brand-surface-deep`). */
|
|
142
135
|
readonly gradient: readonly GradientStop[];
|
|
143
|
-
/** The
|
|
136
|
+
/** The hairline: white and its opacity. */
|
|
137
|
+
readonly line: EffectTone;
|
|
138
|
+
/** The soft glow: its centre colour (white) and opacity; it fades to transparent. */
|
|
144
139
|
readonly glow: EffectTone;
|
|
145
|
-
/** The dot grid: dot colour, opacity at the
|
|
140
|
+
/** The dot grid: dot colour (white), opacity at the edge, cell side and dot radius in pixels. */
|
|
146
141
|
readonly dots: EffectTone & {
|
|
147
142
|
readonly cell: number;
|
|
148
143
|
readonly radius: number;
|
|
149
144
|
};
|
|
150
|
-
/** A blueprint supergraphic:
|
|
145
|
+
/** A blueprint supergraphic: white fill fading out by `hold`, white outline, coral dot. */
|
|
151
146
|
readonly blueprint: {
|
|
152
|
-
readonly
|
|
153
|
-
readonly
|
|
147
|
+
readonly color: string;
|
|
148
|
+
readonly fillAlpha: number;
|
|
149
|
+
readonly hold: number;
|
|
150
|
+
readonly strokeAlpha: number;
|
|
151
|
+
readonly dot: string;
|
|
154
152
|
};
|
|
155
|
-
/** The glow of the conversion button on the
|
|
153
|
+
/** The glow of the conversion button on the surface, painted in `color`. */
|
|
156
154
|
readonly accentGlow: {
|
|
157
155
|
readonly color: string;
|
|
158
156
|
readonly layer: ShadowLayer;
|
|
159
157
|
};
|
|
160
158
|
};
|
|
161
159
|
/**
|
|
162
|
-
* The brand
|
|
163
|
-
*
|
|
160
|
+
* The brand surface's recipe as plain numbers: what every theme's imagery is built from. The
|
|
161
|
+
* colours are not here; they are the theme's `primary`, `brand-surface-deep`, `on-primary` and
|
|
162
|
+
* `accent` roles.
|
|
164
163
|
*/
|
|
165
|
-
type
|
|
166
|
-
/** Offset (0–1) down to which the
|
|
164
|
+
type BrandSurfaceRecipe = {
|
|
165
|
+
/** Offset (0–1) down to which the surface holds `primary` before it deepens. */
|
|
167
166
|
readonly gradientHold: number;
|
|
168
|
-
/** Opacity of
|
|
167
|
+
/** Opacity of the white hairline. */
|
|
168
|
+
readonly lineAlpha: number;
|
|
169
|
+
/** Opacity of the white glow at its centre. */
|
|
169
170
|
readonly glowAlpha: number;
|
|
170
171
|
/** Side of one dot-grid cell, in CSS pixels. */
|
|
171
172
|
readonly dotCell: number;
|
|
172
173
|
/** Radius of one dot, in CSS pixels. */
|
|
173
174
|
readonly dotRadius: number;
|
|
174
|
-
/** Opacity of the dot grid at the
|
|
175
|
+
/** Opacity of the dot grid at the surface's edge. */
|
|
175
176
|
readonly dotAlpha: number;
|
|
176
|
-
/** Offset (0–1)
|
|
177
|
+
/** Offset (0–1) by which a blueprint's white fill has faded out. */
|
|
177
178
|
readonly blueprintHold: number;
|
|
178
|
-
/**
|
|
179
|
+
/** Opacity of a blueprint's white fill at its top. */
|
|
180
|
+
readonly blueprintFillAlpha: number;
|
|
181
|
+
/** Opacity of a blueprint's white outline. */
|
|
182
|
+
readonly blueprintStrokeAlpha: number;
|
|
183
|
+
/** The conversion button's glow; its opacity applies to the accent colour. */
|
|
179
184
|
readonly accentGlow: ShadowLayer;
|
|
180
185
|
};
|
|
181
186
|
type EffectValues = Readonly<Record<ThemeName, ThemeEffectValues>>;
|
|
@@ -191,7 +196,7 @@ type LayerName = 'base' | 'raised' | 'sticky' | 'dropdown' | 'overlay' | 'modal'
|
|
|
191
196
|
type Layers = Readonly<Record<LayerName, number>>;
|
|
192
197
|
type BreakpointName = 'sm' | 'md' | 'lg' | 'xl';
|
|
193
198
|
type Breakpoints = Readonly<Record<BreakpointName, number>>;
|
|
194
|
-
type ScaleToken = `${ChromaticScaleName}-${ChromaticStep}` | `
|
|
199
|
+
type ScaleToken = `${ChromaticScaleName}-${ChromaticStep}` | `ink-${NeutralStep}`;
|
|
195
200
|
type TypeProperty = 'size' | 'line-height' | 'weight' | 'letter-spacing' | 'stretch';
|
|
196
201
|
/** Tokens that keep one value in every theme. */
|
|
197
202
|
type StaticToken = ScaleToken | `font-${FontRole}` | `font-weight-${FontWeightName}` | `type-${TypeRole}-${TypeProperty}` | `space-${SpaceStep}` | `radius-${RadiusName}` | `duration-${DurationName}` | `ease-${EasingName}` | `z-${LayerName}`;
|
|
@@ -245,18 +250,19 @@ declare const maxChroma: (l: number, h: number) => number;
|
|
|
245
250
|
declare const oklchToHex: (color: Oklch) => string;
|
|
246
251
|
|
|
247
252
|
/**
|
|
248
|
-
* The brand
|
|
249
|
-
* The colours are the theme's roles (`
|
|
250
|
-
* `effects` pair the two. A component that draws the
|
|
251
|
-
* an SVG attribute (a pattern's cell, a gradient stop's offset) cannot
|
|
253
|
+
* The brand surface's recipe: the numbers its imagery is drawn with, the same in every theme.
|
|
254
|
+
* The colours are the theme's roles (`primary`, `brand-surface-deep`, `on-primary`, `accent`);
|
|
255
|
+
* `effectValues` and `effects` pair the two. A component that draws the surface reads its
|
|
256
|
+
* geometry here, because an SVG attribute (a pattern's cell, a gradient stop's offset) cannot
|
|
257
|
+
* read a custom property.
|
|
252
258
|
*/
|
|
253
|
-
declare const
|
|
259
|
+
declare const brandSurface: BrandSurfaceRecipe;
|
|
254
260
|
|
|
255
261
|
/** Viewport breakpoints in CSS pixels; each is the lower bound of its range. */
|
|
256
262
|
declare const breakpoints: Breakpoints;
|
|
257
263
|
|
|
258
264
|
/**
|
|
259
|
-
* The shadows, the scrim and the
|
|
265
|
+
* The shadows, the scrim and the brand surface's imagery as hex and numbers, for anything that cannot read a custom
|
|
260
266
|
* property: an Electron main process, an Open Graph image, a PDF. This is the single source;
|
|
261
267
|
* the CSS strings in `effects` are rendered from it.
|
|
262
268
|
*/
|
|
@@ -264,9 +270,9 @@ declare const effectValues: EffectValues;
|
|
|
264
270
|
|
|
265
271
|
/**
|
|
266
272
|
* Theme-dependent values that are not plain colours: the three elevation shadows, the raw
|
|
267
|
-
* shadow colour and opacity for custom shadows, the dialog scrim, and the brand
|
|
268
|
-
* imagery (gradient
|
|
269
|
-
* in both themes, like the
|
|
273
|
+
* shadow colour and opacity for custom shadows, the dialog scrim, and the brand surface's
|
|
274
|
+
* imagery (gradient hold, white hairline, glow, dot grid, blueprint, the conversion button's
|
|
275
|
+
* glow; the same in both themes, like the cobalt surface). These are the CSS strings of `effectValues`, which holds
|
|
270
276
|
* the same data as hex and numbers.
|
|
271
277
|
*/
|
|
272
278
|
declare const effects: Effects;
|
|
@@ -280,7 +286,10 @@ declare const fontWeights: FontWeights;
|
|
|
280
286
|
*/
|
|
281
287
|
declare const fonts: Fonts;
|
|
282
288
|
|
|
283
|
-
/**
|
|
289
|
+
/**
|
|
290
|
+
* OKLCH hue angle of every chromatic family: the brand's cobalt and coral, and red for danger,
|
|
291
|
+
* the one status colour. The neutrals (`ink`) lean to the cobalt angle, which is ink's own.
|
|
292
|
+
*/
|
|
284
293
|
declare const hues: Readonly<Record<HueName, number>>;
|
|
285
294
|
|
|
286
295
|
/** `z-index` layers, lowest to highest. The gaps leave room for local stacking. */
|
|
@@ -348,5 +357,5 @@ declare const themes: Themes;
|
|
|
348
357
|
*/
|
|
349
358
|
declare const typography: Typography;
|
|
350
359
|
|
|
351
|
-
export { CSS_VARIABLE_PREFIX, THEME_ATTRIBUTE, THEME_BOOT_SCRIPT, THEME_BOOT_SCRIPT_HASH, THEME_STORAGE_KEY,
|
|
352
|
-
export type {
|
|
360
|
+
export { CSS_VARIABLE_PREFIX, THEME_ATTRIBUTE, THEME_BOOT_SCRIPT, THEME_BOOT_SCRIPT_HASH, THEME_STORAGE_KEY, brandSurface, breakpoints, contrast, cssVar, cssVarName, deltaE, effectValues, effects, fontWeights, fonts, hexToOklch, hues, layers, logos, maxChroma, motion, oklchToHex, radii, scales, spacing, themes, typography };
|
|
361
|
+
export type { BrandSurfaceEffectValues, BrandSurfaceRecipe, BreakpointName, Breakpoints, ChartIndex, ChromaticScale, ChromaticScaleName, ChromaticStep, ColorToken, DurationName, EasingName, EffectToken, EffectTone, EffectValues, Effects, FontRole, FontWeightName, FontWeights, Fonts, GradientStop, HueName, LayerName, Layers, Logo, LogoName, Logos, Motion, NeutralScale, NeutralStep, Oklch, Radii, RadiusName, ScaleName, ScaleToken, Scales, ShadowLayer, ShadowLevel, SpaceStep, Spacing, StaticToken, StatusName, Theme, ThemeEffectValues, ThemeEffects, ThemeName, ThemePreference, ThemedToken, Themes, TokenName, TypeProperty, TypeRole, TypeStyle, Typography };
|
package/build/design/index.d.mts
CHANGED
|
@@ -13,20 +13,21 @@ type Oklch = {
|
|
|
13
13
|
type ThemeName = 'light' | 'dark';
|
|
14
14
|
/** What the user picked; `system` follows the operating system. */
|
|
15
15
|
type ThemePreference = ThemeName | 'system';
|
|
16
|
-
|
|
17
|
-
type
|
|
16
|
+
/** The brand's cobalt and coral, and red, the one status colour (danger). */
|
|
17
|
+
type ChromaticScaleName = 'cobalt' | 'coral' | 'danger';
|
|
18
|
+
type ScaleName = ChromaticScaleName | 'ink';
|
|
18
19
|
type ChromaticStep = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 950;
|
|
19
20
|
type NeutralStep = 0 | 25 | ChromaticStep;
|
|
20
21
|
type ChromaticScale = Readonly<Record<ChromaticStep, string>>;
|
|
21
22
|
type NeutralScale = Readonly<Record<NeutralStep, string>>;
|
|
22
23
|
type Scales = Readonly<Record<ChromaticScaleName, ChromaticScale>> & {
|
|
23
|
-
readonly
|
|
24
|
+
readonly ink: NeutralScale;
|
|
24
25
|
};
|
|
25
26
|
type HueName = ChromaticScaleName;
|
|
26
|
-
type StatusName = '
|
|
27
|
+
type StatusName = 'danger' | 'info';
|
|
27
28
|
type ChartIndex = 1 | 2 | 3 | 4 | 5 | 6;
|
|
28
29
|
/** Every theme-dependent colour. Values are always opaque `#rrggbb`. */
|
|
29
|
-
type ColorToken = 'bg-page' | 'bg-surface' | 'bg-raised' | 'bg-inset' | 'bg-overlay' | 'bg-disabled' | 'border' | 'border-strong' | 'border-control' | 'text' | 'text-2' | 'text-3' | 'text-disabled' | 'primary' | 'primary-hover' | 'primary-active' | 'on-primary' | 'primary-soft' | 'primary-soft-hover' | 'primary-line' | 'primary-text' | 'accent' | 'accent-hover' | 'accent-active' | 'on-accent' | 'accent-soft' | 'accent-text' | 'focus' | 'selection-bg' | `${StatusName}-${'bg' | 'fg' | 'line' | 'solid' | 'on-solid'}` | `chart-${ChartIndex}` | '
|
|
30
|
+
type ColorToken = 'bg-page' | 'bg-surface' | 'bg-raised' | 'bg-inset' | 'bg-overlay' | 'bg-disabled' | 'border' | 'border-strong' | 'border-control' | 'text' | 'text-2' | 'text-3' | 'text-disabled' | 'primary' | 'primary-hover' | 'primary-active' | 'on-primary' | 'primary-soft' | 'primary-soft-hover' | 'primary-line' | 'primary-text' | 'accent' | 'accent-hover' | 'accent-active' | 'on-accent' | 'accent-soft' | 'accent-text' | 'focus' | 'selection-bg' | `${StatusName}-${'bg' | 'fg' | 'line' | 'solid' | 'on-solid'}` | `chart-${ChartIndex}` | 'brand-surface-deep';
|
|
30
31
|
type Theme = Readonly<Record<ColorToken, string>>;
|
|
31
32
|
type Themes = Readonly<Record<ThemeName, Theme>>;
|
|
32
33
|
type FontRole = 'display' | 'body' | 'mono';
|
|
@@ -67,34 +68,26 @@ type ThemeEffects = {
|
|
|
67
68
|
readonly 'shadow-3': string;
|
|
68
69
|
/** Translucent backdrop behind dialogs. */
|
|
69
70
|
readonly scrim: string;
|
|
70
|
-
/**
|
|
71
|
-
readonly '
|
|
72
|
-
/**
|
|
73
|
-
readonly '
|
|
74
|
-
/**
|
|
75
|
-
readonly '
|
|
76
|
-
/**
|
|
77
|
-
readonly '
|
|
78
|
-
/** Opacity of a glow at its centre; it fades to 0 at its edge. */
|
|
79
|
-
readonly 'band-glow-alpha': string;
|
|
80
|
-
/** Colour of the dots of the band's dot grid (`band-line-strong`). */
|
|
81
|
-
readonly 'band-dot': string;
|
|
82
|
-
/** Opacity of the dot grid at the band's edge; it fades to 0 towards the content. */
|
|
83
|
-
readonly 'band-dot-alpha': string;
|
|
71
|
+
/** How far down the brand surface holds `primary` before it deepens, as a percentage. */
|
|
72
|
+
readonly 'brand-surface-hold': string;
|
|
73
|
+
/** Hairline on the brand surface: white at low opacity, as a CSS colour. */
|
|
74
|
+
readonly 'brand-surface-line': string;
|
|
75
|
+
/** Opacity of the white glow at its centre; it fades to 0 at its edge. */
|
|
76
|
+
readonly 'brand-surface-glow-alpha': string;
|
|
77
|
+
/** Opacity of the white dot grid at the surface's edge; it fades to 0 towards the content. */
|
|
78
|
+
readonly 'brand-surface-dot-alpha': string;
|
|
84
79
|
/** Side of one cell of the dot grid. */
|
|
85
|
-
readonly '
|
|
80
|
+
readonly 'brand-surface-dot-cell': string;
|
|
86
81
|
/** Radius of one dot. */
|
|
87
|
-
readonly '
|
|
88
|
-
/**
|
|
89
|
-
readonly '
|
|
90
|
-
/**
|
|
91
|
-
readonly '
|
|
92
|
-
/**
|
|
93
|
-
readonly '
|
|
94
|
-
/**
|
|
95
|
-
readonly '
|
|
96
|
-
/** The soft coral glow of the conversion button on the band, as a `box-shadow`. */
|
|
97
|
-
readonly 'band-accent-glow': string;
|
|
82
|
+
readonly 'brand-surface-dot-radius': string;
|
|
83
|
+
/** Where a blueprint supergraphic's white fill has faded out, as a percentage. */
|
|
84
|
+
readonly 'brand-surface-blueprint-hold': string;
|
|
85
|
+
/** Opacity of a blueprint's white fill at its top. */
|
|
86
|
+
readonly 'brand-surface-blueprint-fill-alpha': string;
|
|
87
|
+
/** Opacity of a blueprint's white outline. */
|
|
88
|
+
readonly 'brand-surface-blueprint-stroke-alpha': string;
|
|
89
|
+
/** The soft coral glow of the conversion button on the brand surface, as a `box-shadow`. */
|
|
90
|
+
readonly 'brand-surface-accent-glow': string;
|
|
98
91
|
};
|
|
99
92
|
type EffectToken = keyof ThemeEffects;
|
|
100
93
|
type Effects = Readonly<Record<ThemeName, ThemeEffects>>;
|
|
@@ -133,49 +126,61 @@ type ThemeEffectValues = {
|
|
|
133
126
|
readonly shadows: Readonly<Record<ShadowLevel, readonly ShadowLayer[]>>;
|
|
134
127
|
/** Translucent backdrop behind dialogs. */
|
|
135
128
|
readonly scrim: EffectTone;
|
|
136
|
-
/** The decorative layers of the brand
|
|
137
|
-
readonly
|
|
129
|
+
/** The decorative layers of the brand surface; the same in both themes. */
|
|
130
|
+
readonly brandSurface: BrandSurfaceEffectValues;
|
|
138
131
|
};
|
|
139
|
-
/** The brand
|
|
140
|
-
type
|
|
141
|
-
/** The
|
|
132
|
+
/** The brand surface's imagery as hex and numbers: gradient, line, glow, dot grid, blueprint. */
|
|
133
|
+
type BrandSurfaceEffectValues = {
|
|
134
|
+
/** The surface's vertical background, top to bottom (`primary` into `brand-surface-deep`). */
|
|
142
135
|
readonly gradient: readonly GradientStop[];
|
|
143
|
-
/** The
|
|
136
|
+
/** The hairline: white and its opacity. */
|
|
137
|
+
readonly line: EffectTone;
|
|
138
|
+
/** The soft glow: its centre colour (white) and opacity; it fades to transparent. */
|
|
144
139
|
readonly glow: EffectTone;
|
|
145
|
-
/** The dot grid: dot colour, opacity at the
|
|
140
|
+
/** The dot grid: dot colour (white), opacity at the edge, cell side and dot radius in pixels. */
|
|
146
141
|
readonly dots: EffectTone & {
|
|
147
142
|
readonly cell: number;
|
|
148
143
|
readonly radius: number;
|
|
149
144
|
};
|
|
150
|
-
/** A blueprint supergraphic:
|
|
145
|
+
/** A blueprint supergraphic: white fill fading out by `hold`, white outline, coral dot. */
|
|
151
146
|
readonly blueprint: {
|
|
152
|
-
readonly
|
|
153
|
-
readonly
|
|
147
|
+
readonly color: string;
|
|
148
|
+
readonly fillAlpha: number;
|
|
149
|
+
readonly hold: number;
|
|
150
|
+
readonly strokeAlpha: number;
|
|
151
|
+
readonly dot: string;
|
|
154
152
|
};
|
|
155
|
-
/** The glow of the conversion button on the
|
|
153
|
+
/** The glow of the conversion button on the surface, painted in `color`. */
|
|
156
154
|
readonly accentGlow: {
|
|
157
155
|
readonly color: string;
|
|
158
156
|
readonly layer: ShadowLayer;
|
|
159
157
|
};
|
|
160
158
|
};
|
|
161
159
|
/**
|
|
162
|
-
* The brand
|
|
163
|
-
*
|
|
160
|
+
* The brand surface's recipe as plain numbers: what every theme's imagery is built from. The
|
|
161
|
+
* colours are not here; they are the theme's `primary`, `brand-surface-deep`, `on-primary` and
|
|
162
|
+
* `accent` roles.
|
|
164
163
|
*/
|
|
165
|
-
type
|
|
166
|
-
/** Offset (0–1) down to which the
|
|
164
|
+
type BrandSurfaceRecipe = {
|
|
165
|
+
/** Offset (0–1) down to which the surface holds `primary` before it deepens. */
|
|
167
166
|
readonly gradientHold: number;
|
|
168
|
-
/** Opacity of
|
|
167
|
+
/** Opacity of the white hairline. */
|
|
168
|
+
readonly lineAlpha: number;
|
|
169
|
+
/** Opacity of the white glow at its centre. */
|
|
169
170
|
readonly glowAlpha: number;
|
|
170
171
|
/** Side of one dot-grid cell, in CSS pixels. */
|
|
171
172
|
readonly dotCell: number;
|
|
172
173
|
/** Radius of one dot, in CSS pixels. */
|
|
173
174
|
readonly dotRadius: number;
|
|
174
|
-
/** Opacity of the dot grid at the
|
|
175
|
+
/** Opacity of the dot grid at the surface's edge. */
|
|
175
176
|
readonly dotAlpha: number;
|
|
176
|
-
/** Offset (0–1)
|
|
177
|
+
/** Offset (0–1) by which a blueprint's white fill has faded out. */
|
|
177
178
|
readonly blueprintHold: number;
|
|
178
|
-
/**
|
|
179
|
+
/** Opacity of a blueprint's white fill at its top. */
|
|
180
|
+
readonly blueprintFillAlpha: number;
|
|
181
|
+
/** Opacity of a blueprint's white outline. */
|
|
182
|
+
readonly blueprintStrokeAlpha: number;
|
|
183
|
+
/** The conversion button's glow; its opacity applies to the accent colour. */
|
|
179
184
|
readonly accentGlow: ShadowLayer;
|
|
180
185
|
};
|
|
181
186
|
type EffectValues = Readonly<Record<ThemeName, ThemeEffectValues>>;
|
|
@@ -191,7 +196,7 @@ type LayerName = 'base' | 'raised' | 'sticky' | 'dropdown' | 'overlay' | 'modal'
|
|
|
191
196
|
type Layers = Readonly<Record<LayerName, number>>;
|
|
192
197
|
type BreakpointName = 'sm' | 'md' | 'lg' | 'xl';
|
|
193
198
|
type Breakpoints = Readonly<Record<BreakpointName, number>>;
|
|
194
|
-
type ScaleToken = `${ChromaticScaleName}-${ChromaticStep}` | `
|
|
199
|
+
type ScaleToken = `${ChromaticScaleName}-${ChromaticStep}` | `ink-${NeutralStep}`;
|
|
195
200
|
type TypeProperty = 'size' | 'line-height' | 'weight' | 'letter-spacing' | 'stretch';
|
|
196
201
|
/** Tokens that keep one value in every theme. */
|
|
197
202
|
type StaticToken = ScaleToken | `font-${FontRole}` | `font-weight-${FontWeightName}` | `type-${TypeRole}-${TypeProperty}` | `space-${SpaceStep}` | `radius-${RadiusName}` | `duration-${DurationName}` | `ease-${EasingName}` | `z-${LayerName}`;
|
|
@@ -245,18 +250,19 @@ declare const maxChroma: (l: number, h: number) => number;
|
|
|
245
250
|
declare const oklchToHex: (color: Oklch) => string;
|
|
246
251
|
|
|
247
252
|
/**
|
|
248
|
-
* The brand
|
|
249
|
-
* The colours are the theme's roles (`
|
|
250
|
-
* `effects` pair the two. A component that draws the
|
|
251
|
-
* an SVG attribute (a pattern's cell, a gradient stop's offset) cannot
|
|
253
|
+
* The brand surface's recipe: the numbers its imagery is drawn with, the same in every theme.
|
|
254
|
+
* The colours are the theme's roles (`primary`, `brand-surface-deep`, `on-primary`, `accent`);
|
|
255
|
+
* `effectValues` and `effects` pair the two. A component that draws the surface reads its
|
|
256
|
+
* geometry here, because an SVG attribute (a pattern's cell, a gradient stop's offset) cannot
|
|
257
|
+
* read a custom property.
|
|
252
258
|
*/
|
|
253
|
-
declare const
|
|
259
|
+
declare const brandSurface: BrandSurfaceRecipe;
|
|
254
260
|
|
|
255
261
|
/** Viewport breakpoints in CSS pixels; each is the lower bound of its range. */
|
|
256
262
|
declare const breakpoints: Breakpoints;
|
|
257
263
|
|
|
258
264
|
/**
|
|
259
|
-
* The shadows, the scrim and the
|
|
265
|
+
* The shadows, the scrim and the brand surface's imagery as hex and numbers, for anything that cannot read a custom
|
|
260
266
|
* property: an Electron main process, an Open Graph image, a PDF. This is the single source;
|
|
261
267
|
* the CSS strings in `effects` are rendered from it.
|
|
262
268
|
*/
|
|
@@ -264,9 +270,9 @@ declare const effectValues: EffectValues;
|
|
|
264
270
|
|
|
265
271
|
/**
|
|
266
272
|
* Theme-dependent values that are not plain colours: the three elevation shadows, the raw
|
|
267
|
-
* shadow colour and opacity for custom shadows, the dialog scrim, and the brand
|
|
268
|
-
* imagery (gradient
|
|
269
|
-
* in both themes, like the
|
|
273
|
+
* shadow colour and opacity for custom shadows, the dialog scrim, and the brand surface's
|
|
274
|
+
* imagery (gradient hold, white hairline, glow, dot grid, blueprint, the conversion button's
|
|
275
|
+
* glow; the same in both themes, like the cobalt surface). These are the CSS strings of `effectValues`, which holds
|
|
270
276
|
* the same data as hex and numbers.
|
|
271
277
|
*/
|
|
272
278
|
declare const effects: Effects;
|
|
@@ -280,7 +286,10 @@ declare const fontWeights: FontWeights;
|
|
|
280
286
|
*/
|
|
281
287
|
declare const fonts: Fonts;
|
|
282
288
|
|
|
283
|
-
/**
|
|
289
|
+
/**
|
|
290
|
+
* OKLCH hue angle of every chromatic family: the brand's cobalt and coral, and red for danger,
|
|
291
|
+
* the one status colour. The neutrals (`ink`) lean to the cobalt angle, which is ink's own.
|
|
292
|
+
*/
|
|
284
293
|
declare const hues: Readonly<Record<HueName, number>>;
|
|
285
294
|
|
|
286
295
|
/** `z-index` layers, lowest to highest. The gaps leave room for local stacking. */
|
|
@@ -348,5 +357,5 @@ declare const themes: Themes;
|
|
|
348
357
|
*/
|
|
349
358
|
declare const typography: Typography;
|
|
350
359
|
|
|
351
|
-
export { CSS_VARIABLE_PREFIX, THEME_ATTRIBUTE, THEME_BOOT_SCRIPT, THEME_BOOT_SCRIPT_HASH, THEME_STORAGE_KEY,
|
|
352
|
-
export type {
|
|
360
|
+
export { CSS_VARIABLE_PREFIX, THEME_ATTRIBUTE, THEME_BOOT_SCRIPT, THEME_BOOT_SCRIPT_HASH, THEME_STORAGE_KEY, brandSurface, breakpoints, contrast, cssVar, cssVarName, deltaE, effectValues, effects, fontWeights, fonts, hexToOklch, hues, layers, logos, maxChroma, motion, oklchToHex, radii, scales, spacing, themes, typography };
|
|
361
|
+
export type { BrandSurfaceEffectValues, BrandSurfaceRecipe, BreakpointName, Breakpoints, ChartIndex, ChromaticScale, ChromaticScaleName, ChromaticStep, ColorToken, DurationName, EasingName, EffectToken, EffectTone, EffectValues, Effects, FontRole, FontWeightName, FontWeights, Fonts, GradientStop, HueName, LayerName, Layers, Logo, LogoName, Logos, Motion, NeutralScale, NeutralStep, Oklch, Radii, RadiusName, ScaleName, ScaleToken, Scales, ShadowLayer, ShadowLevel, SpaceStep, Spacing, StaticToken, StatusName, Theme, ThemeEffectValues, ThemeEffects, ThemeName, ThemePreference, ThemedToken, Themes, TokenName, TypeProperty, TypeRole, TypeStyle, Typography };
|