courthive-components 6.13.0 → 6.14.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/dist/components/schedule-page/domain/activeStrip.d.ts +5 -0
- package/dist/courthive-components.css +1 -1
- package/dist/courthive-components.es.js +1043 -949
- package/dist/courthive-components.umd.js +44 -44
- package/dist/index.d.ts +2 -0
- package/dist/theme/palettes.d.ts +30 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -127,3 +127,5 @@ export { buildInteractiveScoringShell } from './components/interactive-scoring';
|
|
|
127
127
|
export type { InteractiveScoringShell, InteractiveScoringShellConfig, StateChangedDetail } from './components/interactive-scoring';
|
|
128
128
|
export { PolicyCatalogControl, PolicyCatalogStore, createPolicyCatalog, filterPolicyCatalog, groupPolicyCatalog, POLICY_TYPE_METADATA, POLICY_TYPE_GROUPS, getPolicyTypeMeta, buildPolicyCatalogPanel, buildEditorShell, buildPolicyCatalogLayout, buildJsonEditor, SchedulingEditorControl, createSchedulingEditor, SchedulingEditorStore, validateSchedulingPolicy, formatCodeLabel, emptySchedulingPolicy, buildSchedulingEditorPanel } from './components/policy-catalog';
|
|
129
129
|
export type { PolicyCatalogItem, PolicyCatalogState, PolicyCatalogChangeListener, PolicyCatalogConfig, PolicyEditorInstance, PolicyEditorPlugin, PolicySource, PolicyTypeGroup, PolicyTypeMeta, CatalogGroupBy as PolicyCatalogGroupBy, SchedulingPolicyData, SchedulingEditorState, SchedulingEditorSection, SchedulingEditorChangeListener, SchedulingEditorConfig, SchedulingValidationResult, ValidationSeverity as SchedulingValidationSeverity, MinutesEntry, AverageTimeEntry, RecoveryTimeEntry, MatchUpAverageTime, MatchUpRecoveryTime } from './components/policy-catalog';
|
|
130
|
+
export { THEME_PALETTES, DEFAULT_DARK_PALETTE, DEFAULT_LIGHT_PALETTE, applyThemePalette, getThemePalettes, defaultThemePalette, resolveThemePalette } from './theme/palettes';
|
|
131
|
+
export type { ThemeMode, ThemePalette } from './theme/palettes';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Color palette catalog.
|
|
3
|
+
*
|
|
4
|
+
* A palette is chosen per mode: a user picks one light palette and one dark palette, and `data-theme`
|
|
5
|
+
* (owned by the host app: light | dark, resolved from light/dark/system) decides which of the two shows.
|
|
6
|
+
* The host sets `data-palette` on <html> with `applyThemePalette`; the token values live in
|
|
7
|
+
* styles/theme.css (the defaults) and styles/palettes.css (the alternatives).
|
|
8
|
+
*
|
|
9
|
+
* Names are proper names, like font names, so they are not translated.
|
|
10
|
+
*/
|
|
11
|
+
export type ThemeMode = 'light' | 'dark';
|
|
12
|
+
export type ThemePalette = {
|
|
13
|
+
id: string;
|
|
14
|
+
mode: ThemeMode;
|
|
15
|
+
name: string;
|
|
16
|
+
/** Representative colors for a picker: canvas, surface, chrome, text, accent, success. */
|
|
17
|
+
swatches: string[];
|
|
18
|
+
};
|
|
19
|
+
export declare const DEFAULT_LIGHT_PALETTE = "courtside";
|
|
20
|
+
export declare const DEFAULT_DARK_PALETTE = "midnight";
|
|
21
|
+
export declare const THEME_PALETTES: readonly ThemePalette[];
|
|
22
|
+
export declare function getThemePalettes(mode: ThemeMode): ThemePalette[];
|
|
23
|
+
export declare function defaultThemePalette(mode: ThemeMode): string;
|
|
24
|
+
/**
|
|
25
|
+
* The palette id to use for `mode`. A missing, unknown or wrong-mode id (a retired palette, a stored
|
|
26
|
+
* light id offered for dark) resolves to the mode's default rather than to no palette at all.
|
|
27
|
+
*/
|
|
28
|
+
export declare function resolveThemePalette(mode: ThemeMode, paletteId?: string | null): string;
|
|
29
|
+
/** Sets `data-palette` on the root element and returns the id it applied. */
|
|
30
|
+
export declare function applyThemePalette(mode: ThemeMode, paletteId?: string | null, root?: HTMLElement): string;
|