@celestia-island/hikari 0.4.4
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 +54 -0
- package/package.json +63 -0
- package/src/DemoApp.vue +400 -0
- package/src/components/HkActionBar.tsx +15 -0
- package/src/components/HkAlert.scss +121 -0
- package/src/components/HkAlert.tsx +85 -0
- package/src/components/HkAvatar.tsx +29 -0
- package/src/components/HkBadge.scss +117 -0
- package/src/components/HkBadge.tsx +50 -0
- package/src/components/HkBreadcrumb.tsx +39 -0
- package/src/components/HkButton.scss +128 -0
- package/src/components/HkButton.tsx +74 -0
- package/src/components/HkCard.scss +49 -0
- package/src/components/HkCard.tsx +38 -0
- package/src/components/HkCheckbox.scss +102 -0
- package/src/components/HkCheckbox.tsx +85 -0
- package/src/components/HkCollapse.tsx +48 -0
- package/src/components/HkColorPicker.scss +148 -0
- package/src/components/HkColorPicker.tsx +204 -0
- package/src/components/HkConfirmDialog.scss +12 -0
- package/src/components/HkConfirmDialog.tsx +75 -0
- package/src/components/HkDateTimePicker.scss +361 -0
- package/src/components/HkDateTimePicker.tsx +424 -0
- package/src/components/HkDivider.scss +85 -0
- package/src/components/HkDivider.tsx +51 -0
- package/src/components/HkDraggableGrid.scss +132 -0
- package/src/components/HkDraggableGrid.tsx +291 -0
- package/src/components/HkDraggableList.scss +110 -0
- package/src/components/HkDraggableList.tsx +238 -0
- package/src/components/HkDrawer.scss +175 -0
- package/src/components/HkDrawer.tsx +171 -0
- package/src/components/HkEmptyState.scss +42 -0
- package/src/components/HkEmptyState.tsx +41 -0
- package/src/components/HkErrorBoundary.scss +64 -0
- package/src/components/HkErrorBoundary.tsx +82 -0
- package/src/components/HkGaugeRing.scss +4 -0
- package/src/components/HkGaugeRing.tsx +130 -0
- package/src/components/HkHoverRevealAction.scss +66 -0
- package/src/components/HkHoverRevealAction.tsx +77 -0
- package/src/components/HkIcon.tsx +43 -0
- package/src/components/HkIconButton.tsx +42 -0
- package/src/components/HkImageViewer.scss +33 -0
- package/src/components/HkImageViewer.tsx +250 -0
- package/src/components/HkInput.scss +172 -0
- package/src/components/HkInput.tsx +175 -0
- package/src/components/HkKbd.tsx +26 -0
- package/src/components/HkKeywordSearchModal.scss +148 -0
- package/src/components/HkKeywordSearchModal.tsx +308 -0
- package/src/components/HkListTransition.scss +131 -0
- package/src/components/HkListTransition.tsx +29 -0
- package/src/components/HkLocalePickerPopup.tsx +42 -0
- package/src/components/HkLogo.scss +36 -0
- package/src/components/HkLogo.tsx +93 -0
- package/src/components/HkMarkdownRenderer.scss +141 -0
- package/src/components/HkMarkdownRenderer.tsx +123 -0
- package/src/components/HkMediaControlBar.scss +65 -0
- package/src/components/HkMediaControlBar.tsx +115 -0
- package/src/components/HkMediaPlayer.scss +29 -0
- package/src/components/HkMediaPlayer.tsx +210 -0
- package/src/components/HkMediaSlider.scss +54 -0
- package/src/components/HkMediaSlider.tsx +81 -0
- package/src/components/HkMediaVisualizer.scss +7 -0
- package/src/components/HkMediaVisualizer.tsx +119 -0
- package/src/components/HkMinimap.scss +76 -0
- package/src/components/HkMinimap.tsx +255 -0
- package/src/components/HkModal.scss +318 -0
- package/src/components/HkModal.tsx +481 -0
- package/src/components/HkModalBreadcrumb.scss +55 -0
- package/src/components/HkModalBreadcrumb.tsx +113 -0
- package/src/components/HkMorphingTabs.scss +141 -0
- package/src/components/HkMorphingTabs.tsx +113 -0
- package/src/components/HkNavItem.scss +81 -0
- package/src/components/HkNavItem.tsx +157 -0
- package/src/components/HkNumberInput.scss +154 -0
- package/src/components/HkNumberInput.tsx +161 -0
- package/src/components/HkPasswordInput.scss +289 -0
- package/src/components/HkPasswordInput.tsx +533 -0
- package/src/components/HkPhaseTransition.scss +25 -0
- package/src/components/HkPhaseTransition.tsx +40 -0
- package/src/components/HkPopover.scss +82 -0
- package/src/components/HkPopover.tsx +410 -0
- package/src/components/HkPopupSelect.scss +136 -0
- package/src/components/HkPopupSelect.tsx +199 -0
- package/src/components/HkProgressBar.scss +106 -0
- package/src/components/HkProgressBar.tsx +61 -0
- package/src/components/HkProgressDialog.tsx +67 -0
- package/src/components/HkProgressRing.scss +56 -0
- package/src/components/HkProgressRing.tsx +82 -0
- package/src/components/HkRadio.scss +119 -0
- package/src/components/HkRadio.tsx +75 -0
- package/src/components/HkRollingNumber.scss +37 -0
- package/src/components/HkRollingNumber.tsx +97 -0
- package/src/components/HkScrollContainer.scss +101 -0
- package/src/components/HkScrollContainer.tsx +362 -0
- package/src/components/HkSearchInput.scss +132 -0
- package/src/components/HkSearchInput.tsx +117 -0
- package/src/components/HkSelect.scss +143 -0
- package/src/components/HkSelect.tsx +230 -0
- package/src/components/HkSelectionGrid.scss +177 -0
- package/src/components/HkSelectionGrid.tsx +99 -0
- package/src/components/HkSelectionWaterfall.scss +93 -0
- package/src/components/HkSelectionWaterfall.tsx +90 -0
- package/src/components/HkSidebar.scss +81 -0
- package/src/components/HkSidebar.tsx +45 -0
- package/src/components/HkSkeleton.scss +44 -0
- package/src/components/HkSkeleton.tsx +30 -0
- package/src/components/HkSkeletonList.tsx +35 -0
- package/src/components/HkSpinner.scss +67 -0
- package/src/components/HkSpinner.tsx +41 -0
- package/src/components/HkSplash.scss +60 -0
- package/src/components/HkSplash.tsx +40 -0
- package/src/components/HkSwitch.scss +157 -0
- package/src/components/HkSwitch.tsx +72 -0
- package/src/components/HkTable.scss +198 -0
- package/src/components/HkTable.tsx +246 -0
- package/src/components/HkTabs.scss +109 -0
- package/src/components/HkTabs.tsx +111 -0
- package/src/components/HkTag.scss +88 -0
- package/src/components/HkTag.tsx +44 -0
- package/src/components/HkTextarea.scss +72 -0
- package/src/components/HkTextarea.tsx +104 -0
- package/src/components/HkTimeline.scss +139 -0
- package/src/components/HkTimeline.tsx +95 -0
- package/src/components/HkToast.scss +168 -0
- package/src/components/HkToast.tsx +175 -0
- package/src/components/HkTooltip.scss +47 -0
- package/src/components/HkTooltip.tsx +108 -0
- package/src/components/HkTree.scss +188 -0
- package/src/components/HkTree.tsx +217 -0
- package/src/components/HkTrendChart.tsx +180 -0
- package/src/components/HkWindowedItem.scss +17 -0
- package/src/components/HkWindowedItem.tsx +107 -0
- package/src/components/HkZoomToolbar.scss +35 -0
- package/src/components/HkZoomToolbar.tsx +69 -0
- package/src/composables/useBreakpoint.ts +41 -0
- package/src/composables/useClipboard.ts +37 -0
- package/src/composables/useConfirm.ts +35 -0
- package/src/composables/useProgressDialog.ts +52 -0
- package/src/composables/useReportedTransition.ts +69 -0
- package/src/composables/useScrollWindow.ts +21 -0
- package/src/composables/useToast.ts +2 -0
- package/src/demo.scss +24 -0
- package/src/demo.ts +22 -0
- package/src/env.d.ts +6 -0
- package/src/i18n/context.ts +89 -0
- package/src/i18n/locales/ar/components.json +43 -0
- package/src/i18n/locales/ar/components.toml +40 -0
- package/src/i18n/locales/de/components.json +43 -0
- package/src/i18n/locales/de/components.toml +40 -0
- package/src/i18n/locales/en/components.json +43 -0
- package/src/i18n/locales/en/components.toml +40 -0
- package/src/i18n/locales/es/components.json +43 -0
- package/src/i18n/locales/es/components.toml +40 -0
- package/src/i18n/locales/fr/components.json +43 -0
- package/src/i18n/locales/fr/components.toml +40 -0
- package/src/i18n/locales/ja/components.json +43 -0
- package/src/i18n/locales/ja/components.toml +40 -0
- package/src/i18n/locales/ko/components.json +43 -0
- package/src/i18n/locales/ko/components.toml +40 -0
- package/src/i18n/locales/pt/components.json +43 -0
- package/src/i18n/locales/pt/components.toml +40 -0
- package/src/i18n/locales/ru/components.json +43 -0
- package/src/i18n/locales/ru/components.toml +40 -0
- package/src/i18n/locales/zh-Hans/components.json +43 -0
- package/src/i18n/locales/zh-Hans/components.toml +40 -0
- package/src/i18n/locales/zh-Hant/components.json +43 -0
- package/src/i18n/locales/zh-Hant/components.toml +40 -0
- package/src/index.ts +137 -0
- package/src/render.ts +18 -0
- package/src/runtime/animationBus.ts +278 -0
- package/src/runtime/cronBus.ts +25 -0
- package/src/runtime/index.ts +12 -0
- package/src/runtime/useAsyncData.ts +30 -0
- package/src/runtime/useBreakpoint.ts +62 -0
- package/src/runtime/useClipboard.ts +37 -0
- package/src/runtime/useConfirm.ts +35 -0
- package/src/runtime/useOverlay.ts +82 -0
- package/src/runtime/usePopupManager.ts +89 -0
- package/src/runtime/useToast.ts +140 -0
- package/src/styles/index.scss +10 -0
- package/src/theme/index.ts +5 -0
- package/src/theme/presets.ts +307 -0
- package/src/theme/theme.scss +17 -0
- package/src/theme/useBackgroundLuminance.ts +145 -0
- package/src/theme/useSolarTime.ts +101 -0
- package/src/theme/useTheme.ts +141 -0
- package/src/tokens.scss +26 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { scheduleCronAfter } from "../runtime/cronBus";
|
|
2
|
+
|
|
3
|
+
export type TimePeriod = "day" | "dusk" | "night";
|
|
4
|
+
|
|
5
|
+
const DEG = Math.PI / 180;
|
|
6
|
+
const RAD = 180 / Math.PI;
|
|
7
|
+
|
|
8
|
+
function toJulianDate(date: Date): number {
|
|
9
|
+
return date.getTime() / 86400000 + 2440587.5;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function greenwichSiderealTime(jd: number): number {
|
|
13
|
+
const T = (jd - 2451545.0) / 36525;
|
|
14
|
+
let theta = (280.46061837 + 360.98564736629 * (jd - 2451545.0) + 0.000387933 * T * T - T * T * T / 38710000) % 360;
|
|
15
|
+
if (theta < 0) theta += 360;
|
|
16
|
+
return theta;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface SunEquatorial {
|
|
20
|
+
decl: number;
|
|
21
|
+
ra: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function sunEquatorialCoordinates(jd: number): SunEquatorial {
|
|
25
|
+
const T = (jd - 2451545.0) / 36525;
|
|
26
|
+
const L0 = (280.46646 + 36000.76983 * T) % 360;
|
|
27
|
+
const M = ((357.52911 + 35999.05029 * T) % 360) * DEG;
|
|
28
|
+
const C = (1.9146 - 0.004817 * T) * Math.sin(M) + (0.019993 - 0.000101 * T) * Math.sin(2 * M);
|
|
29
|
+
let sunLon = (L0 + C) % 360;
|
|
30
|
+
if (sunLon < 0) sunLon += 360;
|
|
31
|
+
const omega = (125.04 - 1934.136 * T) * DEG;
|
|
32
|
+
const lambda = sunLon * DEG - 0.00569 * DEG - 0.00478 * DEG * Math.sin(omega);
|
|
33
|
+
const epsilon = (23.439291 - 0.013004 * T) * DEG;
|
|
34
|
+
const decl = Math.asin(Math.sin(epsilon) * Math.sin(lambda));
|
|
35
|
+
const ra = Math.atan2(Math.cos(epsilon) * Math.sin(lambda), Math.cos(lambda));
|
|
36
|
+
return { decl, ra };
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function solarAltitude(
|
|
40
|
+
latDeg: number,
|
|
41
|
+
lngDeg: number,
|
|
42
|
+
date: Date,
|
|
43
|
+
): number {
|
|
44
|
+
const jd = toJulianDate(date);
|
|
45
|
+
const { decl, ra } = sunEquatorialCoordinates(jd);
|
|
46
|
+
let haDeg = greenwichSiderealTime(jd) + lngDeg - ra * RAD;
|
|
47
|
+
haDeg = (((haDeg + 180) % 360) + 360) % 360 - 180;
|
|
48
|
+
const ha = haDeg * DEG;
|
|
49
|
+
const lat = latDeg * DEG;
|
|
50
|
+
const alt = Math.asin(
|
|
51
|
+
Math.sin(lat) * Math.sin(decl) + Math.cos(lat) * Math.cos(decl) * Math.cos(ha),
|
|
52
|
+
);
|
|
53
|
+
return alt * RAD;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function getTimePeriod(
|
|
57
|
+
latDeg: number,
|
|
58
|
+
lngDeg: number,
|
|
59
|
+
date: Date = new Date(),
|
|
60
|
+
): TimePeriod {
|
|
61
|
+
const alt = solarAltitude(latDeg, lngDeg, date);
|
|
62
|
+
if (alt > 6) return "day";
|
|
63
|
+
if (alt > -6) return "dusk";
|
|
64
|
+
return "night";
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export const DEFAULT_GEO_LOCATION = { lat: 31.23, lng: 121.47 };
|
|
68
|
+
|
|
69
|
+
const GEO_API_URL = "https://ipapi.co/json/";
|
|
70
|
+
const GEO_API_TIMEOUT_MS = 4000;
|
|
71
|
+
|
|
72
|
+
function timezoneFallback(): { lat: number; lng: number } {
|
|
73
|
+
const offsetMin = -new Date().getTimezoneOffset();
|
|
74
|
+
const lng = offsetMin / 4;
|
|
75
|
+
return { lat: DEFAULT_GEO_LOCATION.lat, lng };
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function getGeolocation(): Promise<{ lat: number; lng: number }> {
|
|
79
|
+
const controller = new AbortController();
|
|
80
|
+
const timer = scheduleCronAfter(() => controller.abort(), GEO_API_TIMEOUT_MS);
|
|
81
|
+
return fetch(GEO_API_URL, { signal: controller.signal, cache: "no-store" })
|
|
82
|
+
.then((r) => (r.ok ? r.json() : null))
|
|
83
|
+
.then(
|
|
84
|
+
(d: { latitude?: number; longitude?: number } | null) => {
|
|
85
|
+
timer.disconnect();
|
|
86
|
+
if (
|
|
87
|
+
d &&
|
|
88
|
+
typeof d.latitude === "number" &&
|
|
89
|
+
typeof d.longitude === "number" &&
|
|
90
|
+
(Math.abs(d.latitude) > 0.01 || Math.abs(d.longitude) > 0.01)
|
|
91
|
+
) {
|
|
92
|
+
return { lat: d.latitude, lng: d.longitude };
|
|
93
|
+
}
|
|
94
|
+
return timezoneFallback();
|
|
95
|
+
},
|
|
96
|
+
() => {
|
|
97
|
+
timer.disconnect();
|
|
98
|
+
return timezoneFallback();
|
|
99
|
+
},
|
|
100
|
+
);
|
|
101
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { computed, ref, watch } from "vue";
|
|
2
|
+
|
|
3
|
+
import { scheduleCronAfter, type CronHandle } from "../runtime/cronBus";
|
|
4
|
+
import { addCustomTheme as addCustomThemeToStorage, loadCustomThemes, removeCustomTheme as removeCustomThemeFromStorage, themePresets, tokensToCSSVars, type CustomThemePreset, type ThemeId, type ThemeMode, type ThemePreset } from "./presets";
|
|
5
|
+
import { invalidateLuminanceCache } from "./useBackgroundLuminance";
|
|
6
|
+
import { getTimePeriod, DEFAULT_GEO_LOCATION, type TimePeriod } from "./useSolarTime";
|
|
7
|
+
|
|
8
|
+
const DEFAULT_THEME = "synthwave84";
|
|
9
|
+
const STORAGE_THEME_KEY = "hikari-theme";
|
|
10
|
+
const STORAGE_MODE_KEY = "hikari-theme-mode";
|
|
11
|
+
|
|
12
|
+
const currentTheme = ref<ThemeId>(
|
|
13
|
+
localStorage.getItem(STORAGE_THEME_KEY) || DEFAULT_THEME,
|
|
14
|
+
);
|
|
15
|
+
const currentMode = ref<ThemeMode>(
|
|
16
|
+
(localStorage.getItem(STORAGE_MODE_KEY) as ThemeMode) || "system",
|
|
17
|
+
);
|
|
18
|
+
const customThemes = ref<CustomThemePreset[]>(loadCustomThemes());
|
|
19
|
+
|
|
20
|
+
const currentPeriod = ref<TimePeriod>(
|
|
21
|
+
getTimePeriod(DEFAULT_GEO_LOCATION.lat, DEFAULT_GEO_LOCATION.lng),
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
let initialized = false;
|
|
25
|
+
|
|
26
|
+
function resolveEffectiveMode(mode: ThemeMode): "dark" | "light" {
|
|
27
|
+
if (mode === "system") {
|
|
28
|
+
return currentPeriod.value === "day" ? "light" : "dark";
|
|
29
|
+
}
|
|
30
|
+
return mode;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const THEME_TRANSITION_DURATION = 300;
|
|
34
|
+
let transitionTimer: CronHandle | null = null;
|
|
35
|
+
|
|
36
|
+
function applyTheme() {
|
|
37
|
+
const el = document.documentElement;
|
|
38
|
+
const all = getAllThemePresets();
|
|
39
|
+
const preset = all[currentTheme.value];
|
|
40
|
+
if (!preset) return;
|
|
41
|
+
|
|
42
|
+
el.classList.add("s-theme-transitioning");
|
|
43
|
+
|
|
44
|
+
const effectiveMode = resolveEffectiveMode(currentMode.value);
|
|
45
|
+
const tokens = effectiveMode === "dark" ? preset.dark : preset.light;
|
|
46
|
+
const vars = tokensToCSSVars(tokens);
|
|
47
|
+
|
|
48
|
+
invalidateLuminanceCache();
|
|
49
|
+
|
|
50
|
+
for (const [key, value] of Object.entries(vars)) {
|
|
51
|
+
el.style.setProperty(key, value);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
el.setAttribute("data-theme", currentTheme.value);
|
|
55
|
+
el.setAttribute("data-mode", effectiveMode);
|
|
56
|
+
|
|
57
|
+
transitionTimer?.disconnect();
|
|
58
|
+
transitionTimer = scheduleCronAfter(() => {
|
|
59
|
+
el.classList.remove("s-theme-transitioning");
|
|
60
|
+
transitionTimer = null;
|
|
61
|
+
}, THEME_TRANSITION_DURATION);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function getAllThemePresets(): Record<string, ThemePreset> {
|
|
65
|
+
const result: Record<string, ThemePreset> = { ...themePresets };
|
|
66
|
+
for (const ct of customThemes.value) {
|
|
67
|
+
result[ct.id] = ct;
|
|
68
|
+
}
|
|
69
|
+
return result;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function initTheme() {
|
|
73
|
+
if (initialized) return;
|
|
74
|
+
initialized = true;
|
|
75
|
+
const storedMode = localStorage.getItem(STORAGE_MODE_KEY) as ThemeMode | null;
|
|
76
|
+
if (storedMode === "dark" || storedMode === "light") {
|
|
77
|
+
currentMode.value = storedMode;
|
|
78
|
+
}
|
|
79
|
+
applyTheme();
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function useTheme() {
|
|
83
|
+
const effectiveMode = computed(() => resolveEffectiveMode(currentMode.value));
|
|
84
|
+
|
|
85
|
+
const allThemeList = computed(() => {
|
|
86
|
+
const builtIn = (Object.keys(themePresets) as string[]).map((id) => ({
|
|
87
|
+
id,
|
|
88
|
+
name: themePresets[id as keyof typeof themePresets].name,
|
|
89
|
+
isCustom: false,
|
|
90
|
+
}));
|
|
91
|
+
const custom = customThemes.value.map((ct) => ({
|
|
92
|
+
id: ct.id,
|
|
93
|
+
name: ct.name,
|
|
94
|
+
isCustom: true,
|
|
95
|
+
}));
|
|
96
|
+
return [...builtIn, ...custom];
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
function setTheme(id: ThemeId) {
|
|
100
|
+
currentTheme.value = id;
|
|
101
|
+
localStorage.setItem(STORAGE_THEME_KEY, id);
|
|
102
|
+
applyTheme();
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function setMode(mode: ThemeMode) {
|
|
106
|
+
currentMode.value = mode;
|
|
107
|
+
localStorage.setItem(STORAGE_MODE_KEY, mode);
|
|
108
|
+
applyTheme();
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function toggleMode() {
|
|
112
|
+
setMode(effectiveMode.value === "dark" ? "light" : "dark");
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function addCustomTheme(theme: CustomThemePreset) {
|
|
116
|
+
addCustomThemeToStorage(theme);
|
|
117
|
+
customThemes.value = loadCustomThemes();
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function removeCustomTheme(id: string) {
|
|
121
|
+
removeCustomThemeFromStorage(id);
|
|
122
|
+
customThemes.value = loadCustomThemes();
|
|
123
|
+
if (currentTheme.value === id) {
|
|
124
|
+
setTheme(DEFAULT_THEME);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return {
|
|
129
|
+
currentTheme,
|
|
130
|
+
currentMode,
|
|
131
|
+
effectiveMode,
|
|
132
|
+
setTheme,
|
|
133
|
+
setMode,
|
|
134
|
+
toggleMode,
|
|
135
|
+
presets: themePresets,
|
|
136
|
+
allThemeList,
|
|
137
|
+
customThemes,
|
|
138
|
+
addCustomTheme,
|
|
139
|
+
removeCustomTheme,
|
|
140
|
+
};
|
|
141
|
+
}
|
package/src/tokens.scss
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* hikari color aliases — fallback values for theme tokens.
|
|
2
|
+
These CSS variables are used by hikari components (HkButton, HkCard,
|
|
3
|
+
HkInput, HkSelect, etc.) and are expected to be overridden by
|
|
4
|
+
consuming apps via initTheme() or custom theme CSS. */
|
|
5
|
+
:root {
|
|
6
|
+
--c-primary-faint: rgb(var(--color-primary, 122 162 247) / 5%);
|
|
7
|
+
--c-primary-subtle: rgb(var(--color-primary, 122 162 247) / 8%);
|
|
8
|
+
--c-primary-dim: rgb(var(--color-primary, 122 162 247) / 10%);
|
|
9
|
+
--c-primary-light: rgb(var(--color-primary, 122 162 247) / 15%);
|
|
10
|
+
--c-primary-overlay: rgb(var(--color-primary, 122 162 247) / 15%);
|
|
11
|
+
--c-primary-medium: rgb(var(--color-primary, 122 162 247) / 25%);
|
|
12
|
+
--c-primary-strong: rgb(var(--color-primary, 122 162 247) / 40%);
|
|
13
|
+
--c-primary-intense: rgb(var(--color-primary, 122 162 247) / 40%);
|
|
14
|
+
--c-error-dim: rgb(var(--color-error, 247 118 142) / 10%);
|
|
15
|
+
--c-error-overlay: rgb(var(--color-error, 247 118 142) / 20%);
|
|
16
|
+
--c-error-strong: rgb(var(--color-error, 247 118 142) / 50%);
|
|
17
|
+
--shadow-elevated: 0 8px 32px rgb(0 0 0 / 15%);
|
|
18
|
+
--shadow-dropdown: 0 4px 24px rgb(0 0 0 / 12%), 0 0 0 1px rgb(255 255 255 / 4%);
|
|
19
|
+
--shadow-button: 0 4px 14px rgb(var(--color-primary, 122 162 247) / 35%);
|
|
20
|
+
--shadow-button-danger: 0 4px 14px rgb(var(--color-error, 247 118 142) / 35%);
|
|
21
|
+
--shadow-focus: 0 0 0 3px rgb(var(--color-primary, 122 162 247) / 12%);
|
|
22
|
+
--shadow-focus-error: 0 0 0 3px rgb(var(--color-error, 247 118 142) / 12%);
|
|
23
|
+
--border-input: rgb(var(--color-border, 100 100 100) / 15%);
|
|
24
|
+
--border-faint: rgb(var(--color-border, 100 100 100) / 10%);
|
|
25
|
+
--border-subtle: rgb(var(--color-border, 100 100 100) / 12%);
|
|
26
|
+
}
|