@celestia-island/hikari 0.43.13 → 0.43.14
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/package.json +1 -1
- package/src/components/HkAlert.scss +21 -21
- package/src/components/HkAltSignIn.scss +3 -3
- package/src/components/HkAuthMethodList.scss +2 -2
- package/src/components/HkAvatar.scss +1 -1
- package/src/components/HkBlockingToast.scss +6 -6
- package/src/components/HkCheckbox.scss +11 -11
- package/src/components/HkDatePicker.scss +12 -12
- package/src/components/HkDateTimePicker.scss +16 -16
- package/src/components/HkDivider.scss +3 -3
- package/src/components/HkDraggableGrid.scss +11 -11
- package/src/components/HkDraggableList.scss +6 -6
- package/src/components/HkDrawer.scss +24 -24
- package/src/components/HkDrawer.sheetfamily.test.ts +1 -1
- package/src/components/HkEmptyState.scss +6 -6
- package/src/components/HkFab.scss +12 -12
- package/src/components/HkFileField.scss +2 -2
- package/src/components/HkFilePickerField.scss +2 -2
- package/src/components/HkImagePreview.scss +8 -8
- package/src/components/HkInput.scss +2 -2
- package/src/components/HkJsonTree.scss +2 -2
- package/src/components/HkKeywordSearchModal.scss +22 -22
- package/src/components/HkLabel.scss +3 -3
- package/src/components/HkListTransition.scss +23 -23
- package/src/components/HkLogo.scss +3 -3
- package/src/components/HkMarkdownRenderer.scss +9 -9
- package/src/components/HkMediaSlider.scss +1 -1
- package/src/components/HkMinimap.scss +2 -2
- package/src/components/HkModal.scss +14 -14
- package/src/components/HkModalBreadcrumb.scss +5 -5
- package/src/components/HkNavItem.scss +2 -2
- package/src/components/HkNumberInput.scss +3 -3
- package/src/components/HkPasswordInput.scss +29 -29
- package/src/components/HkPhaseTransition.scss +5 -5
- package/src/components/HkPickerPane.scss +4 -4
- package/src/components/HkPopover.scss +2 -2
- package/src/components/HkProgressRing.scss +4 -4
- package/src/components/HkRadio.scss +4 -4
- package/src/components/HkRollingNumber.scss +1 -1
- package/src/components/HkScrollContainer.scss +5 -5
- package/src/components/HkSearchInput.scss +3 -3
- package/src/components/HkSelect.scss +2 -2
- package/src/components/HkSelectionGrid.scss +20 -20
- package/src/components/HkSelectionWaterfall.scss +15 -15
- package/src/components/HkSidebar.scss +7 -7
- package/src/components/HkSkeleton.scss +8 -8
- package/src/components/HkSlider.scss +1 -1
- package/src/components/HkSplash.scss +3 -3
- package/src/components/HkStepFlow.scss +1 -1
- package/src/components/HkSwitch.scss +1 -1
- package/src/components/HkTable.scss +21 -21
- package/src/components/HkTag.scss +18 -18
- package/src/components/HkTextarea.scss +1 -1
- package/src/components/HkTimeline.scss +2 -2
- package/src/components/HkTitleBar.scss +2 -2
- package/src/components/HkToast.scss +15 -15
- package/src/components/HkTree.scss +16 -16
- package/src/components/window-close.scss +1 -1
- package/src/scale.scss +76 -0
- package/src/styles/admin-tokens.scss +4 -37
- package/src/styles/index.scss +25 -11
- package/src/styles/theme/_glass.scss +1 -0
- package/src/styles/theme/_layout.scss +1 -0
- package/src/styles/theme/_scrollbar.scss +1 -0
- package/src/styles/theme/_tokens.scss +1 -0
- package/src/styles/theme/base.scss +1 -0
- package/src/styles/theme/channels.scss +23 -41
- package/src/styles/theme/foundation.scss +1 -0
- package/src/styles/theme/mixins.scss +1 -0
- package/src/styles/theme/scale.scss +78 -0
- package/src/styles/theme/themes.scss +1 -0
- package/src/styles/theme/variables.scss +1 -0
- package/src/styles/tokenInventory.test.ts +290 -0
- package/src/styles/vendoredSync.test.ts +91 -0
- package/src/tokens.scss +23 -41
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
top: 0;
|
|
23
23
|
bottom: 6px;
|
|
24
24
|
width: 1px;
|
|
25
|
-
background: color-mix(in srgb, var(--hi-color-border, #
|
|
25
|
+
background: color-mix(in srgb, var(--hi-color-border, #646464) 30%, transparent);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
align-items: center;
|
|
32
32
|
padding: 0 var(--space-8, 0.5rem);
|
|
33
33
|
cursor: pointer;
|
|
34
|
-
transition: background var(--
|
|
35
|
-
color: var(--hi-color-text-primary, #
|
|
34
|
+
transition: background var(--duration-fast, 0.15s) ease;
|
|
35
|
+
color: var(--hi-color-text-primary, #1e1e1e);
|
|
36
36
|
position: relative;
|
|
37
37
|
|
|
38
38
|
&:hover {
|
|
39
|
-
background: color-mix(in srgb, var(--hi-color-primary, #
|
|
39
|
+
background: color-mix(in srgb, var(--hi-color-primary, #7aa2f7) 5%, transparent);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.hk-tree-row[data-status="warning"] .hk-tree-label {
|
|
63
|
-
color: var(--hi-color-warning, #
|
|
63
|
+
color: var(--hi-color-warning, #eed677);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.hk-tree-row[data-status="muted"] {
|
|
@@ -105,22 +105,22 @@
|
|
|
105
105
|
width: 16px;
|
|
106
106
|
height: 16px;
|
|
107
107
|
flex-shrink: 0;
|
|
108
|
-
color: var(--hi-color-muted, #
|
|
109
|
-
border-radius: var(--
|
|
110
|
-
transition: color var(--
|
|
108
|
+
color: var(--hi-color-muted, #6c6c6c);
|
|
109
|
+
border-radius: var(--radius-sm, 4px);
|
|
110
|
+
transition: color var(--duration-fast, 0.15s), background var(--duration-fast, 0.15s);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
.hk-tree-toggle[data-parent] {
|
|
114
114
|
cursor: pointer;
|
|
115
115
|
|
|
116
116
|
&:hover {
|
|
117
|
-
background: color-mix(in srgb, var(--hi-color-surface, #
|
|
118
|
-
color: var(--hi-color-text-primary, #
|
|
117
|
+
background: color-mix(in srgb, var(--hi-color-surface, #f0f4f8) 40%, transparent);
|
|
118
|
+
color: var(--hi-color-text-primary, #1e1e1e);
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
.hk-tree-chevron {
|
|
123
|
-
transition: transform var(--
|
|
123
|
+
transition: transform var(--duration-normal, 0.3s) ease;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
.hk-tree-chevron[data-open] {
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
.hk-tree-leaf {
|
|
137
137
|
display: block;
|
|
138
138
|
border-radius: 50%;
|
|
139
|
-
background: color-mix(in srgb, var(--hi-color-muted, #
|
|
139
|
+
background: color-mix(in srgb, var(--hi-color-muted, #6c6c6c) 25%, transparent);
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
/* ── Icon slot ─────────────────────────────────── */
|
|
@@ -170,10 +170,10 @@
|
|
|
170
170
|
padding: 0 0.375em;
|
|
171
171
|
font-size: 0.85em;
|
|
172
172
|
font-weight: 600;
|
|
173
|
-
color: var(--hi-color-primary, #
|
|
174
|
-
background: color-mix(in srgb, var(--hi-color-primary, #
|
|
175
|
-
border: 1px solid color-mix(in srgb, var(--hi-color-primary, #
|
|
176
|
-
border-radius: var(--
|
|
173
|
+
color: var(--hi-color-primary, #7aa2f7);
|
|
174
|
+
background: color-mix(in srgb, var(--hi-color-primary, #7aa2f7) 8%, transparent);
|
|
175
|
+
border: 1px solid color-mix(in srgb, var(--hi-color-primary, #7aa2f7) 18%, transparent);
|
|
176
|
+
border-radius: var(--radius-sm, 4px);
|
|
177
177
|
line-height: 1.5;
|
|
178
178
|
letter-spacing: 0.02em;
|
|
179
179
|
}
|
package/src/scale.scss
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/* ── Canonical scale tokens (L2) ──────────────────────────────────────
|
|
2
|
+
* Non-color constants: spacing, type, radius, blur, opacity, durations,
|
|
3
|
+
* easings, z-index, fonts. ONE definition per name — components and the
|
|
4
|
+
* other shipped sheets must consume, not redefine, these.
|
|
5
|
+
*
|
|
6
|
+
* Conflicting legacy values (packages/theme/styles _layout/_tokens/
|
|
7
|
+
* foundation) were normalized to the values the production composition
|
|
8
|
+
* resolves to (chest: admin-tokens + foundation last). This file is the
|
|
9
|
+
* upstream of styles/theme/scale.scss — edit here, then re-run
|
|
10
|
+
* scripts/theme/sync-vendored.sh; do not hand-edit the vendored copy.
|
|
11
|
+
*/
|
|
12
|
+
:root {
|
|
13
|
+
/* Spacing (N px at the 16px root). */
|
|
14
|
+
--space-1: 0.0625rem;
|
|
15
|
+
--space-2: 0.125rem;
|
|
16
|
+
--space-4: 0.25rem;
|
|
17
|
+
--space-6: 0.375rem;
|
|
18
|
+
--space-8: 0.5rem;
|
|
19
|
+
--space-10: 0.625rem;
|
|
20
|
+
--space-12: 0.75rem;
|
|
21
|
+
--space-14: 0.875rem;
|
|
22
|
+
--space-16: 1rem;
|
|
23
|
+
--space-20: 1.25rem;
|
|
24
|
+
--space-24: 1.5rem;
|
|
25
|
+
--space-28: 1.75rem;
|
|
26
|
+
--space-32: 2rem;
|
|
27
|
+
--space-40: 2.5rem;
|
|
28
|
+
|
|
29
|
+
/* Type */
|
|
30
|
+
--text-3xs: 0.5rem;
|
|
31
|
+
--text-2xs: 0.625rem;
|
|
32
|
+
--text-xs: 0.75rem;
|
|
33
|
+
--text-sm: 0.8125rem;
|
|
34
|
+
--text-base: 0.875rem;
|
|
35
|
+
--text-md: 1rem;
|
|
36
|
+
--text-lg: 1.125rem;
|
|
37
|
+
--text-xl: 1.25rem;
|
|
38
|
+
--text-2xl: 1.5rem;
|
|
39
|
+
|
|
40
|
+
/* Radius / blur / opacity */
|
|
41
|
+
--radius-sm: 4px;
|
|
42
|
+
--radius-md: 8px;
|
|
43
|
+
--radius-lg: 12px;
|
|
44
|
+
--radius-xl: 16px;
|
|
45
|
+
--radius-full: 9999px;
|
|
46
|
+
--blur-xs: 4px;
|
|
47
|
+
--blur-sm: 8px;
|
|
48
|
+
--blur-md: 16px;
|
|
49
|
+
--blur-lg: 24px;
|
|
50
|
+
--blur-xl: 24px;
|
|
51
|
+
--opacity-half: 0.92;
|
|
52
|
+
|
|
53
|
+
/* Motion */
|
|
54
|
+
--duration-instant: 0.1s;
|
|
55
|
+
--duration-short: 0.15s;
|
|
56
|
+
--duration-fast: 0.15s;
|
|
57
|
+
--duration-normal: 0.3s;
|
|
58
|
+
--ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
|
|
59
|
+
--ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
|
|
60
|
+
--ease-in-expo: cubic-bezier(0.95, 0.05, 0.795, 0.035);
|
|
61
|
+
--ease-in: cubic-bezier(0.4, 0, 1, 1);
|
|
62
|
+
--ease-elastic: cubic-bezier(0.16, 1, 0.3, 1);
|
|
63
|
+
/* Legacy-prefixed aliases consumed by HkIconButtonVars' bridge. */
|
|
64
|
+
--hi-duration-fast: 0.15s;
|
|
65
|
+
--hi-ease-default: cubic-bezier(0.4, 0, 0.2, 1);
|
|
66
|
+
|
|
67
|
+
/* Z-index bands */
|
|
68
|
+
--z-base: 0;
|
|
69
|
+
--z-header: 100;
|
|
70
|
+
--z-sidebar: 900;
|
|
71
|
+
|
|
72
|
+
/* Fonts — keep in sync with packages/vue/src/theme/fontContext.ts */
|
|
73
|
+
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
|
|
74
|
+
--font-reading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
|
|
75
|
+
--font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", "PingFang SC", "Microsoft YaHei", monospace;
|
|
76
|
+
}
|
|
@@ -9,43 +9,10 @@
|
|
|
9
9
|
/* ── Layout tokens ─ */
|
|
10
10
|
--s-footer-height: 3rem;
|
|
11
11
|
--s-header-height: 3rem;
|
|
12
|
-
--z
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
--font-reading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
|
|
17
|
-
--blur-sm: 8px;
|
|
18
|
-
--blur-md: 16px;
|
|
19
|
-
--blur-lg: 24px;
|
|
20
|
-
--z-sidebar: 900; /* app-sheet band — drawer sidebars (see theme/_layout.scss) */
|
|
21
|
-
--z-base: 0; /* z tokens mirror theme/styles/_layout.scss — keep both in sync */
|
|
22
|
-
--space-2: 0.125rem;
|
|
23
|
-
--space-4: 0.25rem;
|
|
24
|
-
--space-6: 0.375rem;
|
|
25
|
-
--space-8: 0.5rem;
|
|
26
|
-
--space-10: 0.625rem;
|
|
27
|
-
--space-12: 0.75rem;
|
|
28
|
-
--space-14: 0.875rem;
|
|
29
|
-
--space-16: 1rem;
|
|
30
|
-
--space-20: 1.25rem;
|
|
31
|
-
--space-24: 1.5rem;
|
|
32
|
-
--space-28: 1.75rem;
|
|
33
|
-
--space-32: 2rem;
|
|
34
|
-
--space-40: 2.5rem;
|
|
35
|
-
--text-2xs: 0.625rem;
|
|
36
|
-
--text-xs: 0.75rem;
|
|
37
|
-
--text-sm: 0.8125rem;
|
|
38
|
-
--text-base: 0.875rem;
|
|
39
|
-
--text-md: 1rem;
|
|
40
|
-
--text-lg: 1.125rem;
|
|
41
|
-
--radius-sm: 4px;
|
|
42
|
-
--radius-md: 8px;
|
|
43
|
-
--opacity-half: 0.92;
|
|
44
|
-
--duration-short: 0.15s;
|
|
45
|
-
--duration-normal: 0.3s;
|
|
46
|
-
--ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
|
|
47
|
-
--ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
|
|
48
|
-
--ease-in-expo: cubic-bezier(0.95, 0.05, 0.795, 0.035);
|
|
12
|
+
/* Layout/type/motion scale tokens (--space-*, --text-*, --blur-*, --z-*,
|
|
13
|
+
* --duration-*, --ease-*) used to be mirrored here ("keep both in sync")
|
|
14
|
+
* — they now live once in styles/theme/scale.scss, which every entry
|
|
15
|
+
* loads before this sheet. Only plana-specific tokens remain below. */
|
|
49
16
|
|
|
50
17
|
/* ── Shared color aliases ─ */
|
|
51
18
|
--c-primary: rgb(var(--color-primary, 255 107 157));
|
package/src/styles/index.scss
CHANGED
|
@@ -1,12 +1,26 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
// Canonical hikari theme + component style entry.
|
|
2
|
+
//
|
|
3
|
+
// Composition (order matters only for the plana-ui sheet at the end —
|
|
4
|
+
// every token is defined exactly once across the first two sheets, so
|
|
5
|
+
// the color/scale base is order-independent):
|
|
6
|
+
// 1. theme/channels.scss — the static seed: --color-* channel palette,
|
|
7
|
+
// --hi-color-* derivations, --c-*/--shadow-*/--border-* aliases and
|
|
8
|
+
// the icon-button bridge (vendored from src/tokens.scss).
|
|
9
|
+
// 2. theme/scale.scss — the L2 scale tokens: spacing, type, radius,
|
|
10
|
+
// blur, opacity, durations, easings, z bands, fonts (vendored from
|
|
11
|
+
// src/scale.scss).
|
|
12
|
+
// 3. admin-tokens.scss — the plana-ui shared surface: layout tokens,
|
|
13
|
+
// brand-color aliases and the shared admin component classes.
|
|
14
|
+
//
|
|
15
|
+
// initTheme() (runtime) writes only deltas against this base into a
|
|
16
|
+
// managed <style data-hikari-theme-vars> block.
|
|
17
|
+
//
|
|
18
|
+
// The legacy Gen-1 sheets (styles/theme/base.scss, foundation.scss,
|
|
19
|
+
// themes.scss, _tokens.scss, _layout.scss, … — vendored from
|
|
20
|
+
// packages/theme/styles for the Rust crate) are NOT part of this entry;
|
|
21
|
+
// import them granularly only for legacy compositions. The previous
|
|
22
|
+
// version of this file re-exported packages/theme + packages/components
|
|
23
|
+
// through paths that escape the npm package and did not compile.
|
|
24
|
+
@use "./theme/channels.scss";
|
|
25
|
+
@use "./theme/scale.scss";
|
|
12
26
|
@use "./admin-tokens.scss";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// Vendored byte-identical from packages/theme/styles/_glass.scss (hikari repo) so npm registry installs can resolve it — edit the upstream file, then re-copy; do not hand-edit here.
|
|
2
|
+
|
|
2
3
|
// _glass.scss — Glass-morphism utility classes adopted from shittim-chest.
|
|
3
4
|
// These provide the frosted-glass aesthetic that makes panels feel layered
|
|
4
5
|
// without heavy borders.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// Vendored byte-identical from packages/theme/styles/_layout.scss (hikari repo) so npm registry installs can resolve it — edit the upstream file, then re-copy; do not hand-edit here.
|
|
2
|
+
|
|
2
3
|
// _layout.scss — Shared unprefixed design tokens for hikari + plana components.
|
|
3
4
|
// Originally sourced from shittim-chest's theme system; extracted here so
|
|
4
5
|
// any project importing @celestia-island/hikari/styles gets them automatically.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// Vendored byte-identical from packages/theme/styles/_scrollbar.scss (hikari repo) so npm registry installs can resolve it — edit the upstream file, then re-copy; do not hand-edit here.
|
|
2
|
+
|
|
2
3
|
// _scrollbar.scss — the shared overlay scrollbar chrome.
|
|
3
4
|
//
|
|
4
5
|
// ONE scrollbar system for the whole library: the `.hk-scrollbar-track` /
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// Vendored byte-identical from packages/theme/styles/_tokens.scss (hikari repo) so npm registry installs can resolve it — edit the upstream file, then re-copy; do not hand-edit here.
|
|
2
|
+
|
|
2
3
|
// _tokens.scss — Design tokens adopted from shittim-chest's theme system.
|
|
3
4
|
// These supplement hikari's existing foundation.scss tokens with the
|
|
4
5
|
// detail-oriented tokens that make shittim-chest's UI feel polished:
|
|
@@ -95,6 +95,12 @@
|
|
|
95
95
|
--color-focused-border: 122 162 247;
|
|
96
96
|
--color-background: 214 236 240;
|
|
97
97
|
--color-surface: 240 244 248;
|
|
98
|
+
/* Derived seed defaults for the runtime-selected channels: a primary
|
|
99
|
+
* wash over the background (selected) and the surface tint (status
|
|
100
|
+
* bar), matching what presets derive at runtime. */
|
|
101
|
+
--color-selected-bg: 191 218 242;
|
|
102
|
+
--color-selected-text: 30 30 30;
|
|
103
|
+
--color-status-bar-bg: 240 244 248;
|
|
98
104
|
--color-success: 14 184 64;
|
|
99
105
|
--color-error: 247 118 142;
|
|
100
106
|
--color-warning: 238 214 119;
|
|
@@ -104,7 +110,7 @@
|
|
|
104
110
|
--hi-color-secondary: rgb(var(--color-secondary));
|
|
105
111
|
--hi-color-surface: rgb(var(--color-surface));
|
|
106
112
|
--hi-color-background: rgb(var(--color-background));
|
|
107
|
-
--hi-color-border: rgb(var(--color-border));
|
|
113
|
+
--hi-color-border: rgb(var(--color-border) / 15%);
|
|
108
114
|
--hi-color-text-primary: rgb(var(--color-text));
|
|
109
115
|
--hi-color-text-secondary: rgb(var(--color-text-secondary));
|
|
110
116
|
--hi-color-muted: rgb(var(--color-muted));
|
|
@@ -118,45 +124,21 @@
|
|
|
118
124
|
--hi-color-error: rgb(var(--color-error));
|
|
119
125
|
--hi-color-warning: rgb(var(--color-warning));
|
|
120
126
|
--hi-color-info: rgb(var(--color-info));
|
|
127
|
+
/* Surface-layer aliases the runtime writes on every apply — seeded so
|
|
128
|
+
* no-JS consumers resolve them instead of invalid var(). */
|
|
129
|
+
--hi-color-bg-subtle: rgb(var(--color-surface) / 0.5);
|
|
130
|
+
--hi-color-bg-elevated: rgb(var(--color-surface));
|
|
131
|
+
--hi-color-bg-canvas: rgb(var(--color-background));
|
|
132
|
+
--hi-secondary-bg: rgb(var(--color-surface) / 0.5);
|
|
133
|
+
--hi-color-accent: rgb(var(--color-accent));
|
|
134
|
+
/* Gen-1 shorthand references that were never defined anywhere — wired to
|
|
135
|
+
the canonical tokens so the consuming rules render as intended. */
|
|
136
|
+
--hi-primary: var(--hi-color-primary);
|
|
137
|
+
--hi-surface: var(--hi-color-surface);
|
|
138
|
+
--hi-card-bg: var(--hi-color-surface);
|
|
121
139
|
|
|
122
|
-
/*
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
--space-4: 0.25rem;
|
|
127
|
-
--space-6: 0.375rem;
|
|
128
|
-
--space-8: 0.5rem;
|
|
129
|
-
--space-10: 0.625rem;
|
|
130
|
-
--space-12: 0.75rem;
|
|
131
|
-
--space-14: 0.875rem;
|
|
132
|
-
--space-16: 1rem;
|
|
133
|
-
--space-20: 1.25rem;
|
|
134
|
-
--space-24: 1.5rem;
|
|
135
|
-
--space-28: 1.75rem;
|
|
136
|
-
--space-32: 2rem;
|
|
137
|
-
--space-40: 2.5rem;
|
|
138
|
-
--text-2xs: 0.625rem;
|
|
139
|
-
--text-xs: 0.75rem;
|
|
140
|
-
--text-sm: 0.8125rem;
|
|
141
|
-
--text-base: 0.875rem;
|
|
142
|
-
--text-md: 1rem;
|
|
143
|
-
--text-lg: 1.125rem;
|
|
144
|
-
--radius-sm: 4px;
|
|
145
|
-
--radius-md: 8px;
|
|
146
|
-
--opacity-half: 0.92;
|
|
147
|
-
--blur-sm: 8px;
|
|
148
|
-
--blur-md: 16px;
|
|
149
|
-
--blur-lg: 24px;
|
|
150
|
-
--duration-fast: 0.15s;
|
|
151
|
-
--duration-short: 0.15s;
|
|
152
|
-
--duration-normal: 0.3s;
|
|
153
|
-
--ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
|
|
154
|
-
--ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
|
|
155
|
-
--ease-in-expo: cubic-bezier(0.95, 0.05, 0.795, 0.035);
|
|
156
|
-
--s-footer-height: 3rem;
|
|
157
|
-
--z-header: 30;
|
|
158
|
-
--z-sidebar: 40;
|
|
159
|
-
/* Apple-style stack + CJK UI tail — keep in sync with packages/vue/src/theme/fontContext.ts */
|
|
160
|
-
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
|
|
161
|
-
--font-reading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
|
|
140
|
+
/* Scale tokens (spacing/type/radius/blur/opacity/durations/easings/
|
|
141
|
+
z-index/fonts) moved to src/scale.scss — the canonical L2 sheet,
|
|
142
|
+
vendored as styles/theme/scale.scss. This file keeps only the
|
|
143
|
+
channel palette (above) and the --hi-* / --c-* bridges. */
|
|
162
144
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// Vendored byte-identical from packages/theme/styles/foundation.scss (hikari repo) so npm registry installs can resolve it — edit the upstream file, then re-copy; do not hand-edit here.
|
|
2
|
+
|
|
2
3
|
// hikari-theme/styles/foundation.scss
|
|
3
4
|
// Layer1 - Foundation Layer: Global CSS Variables
|
|
4
5
|
//
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// Vendored byte-identical from packages/vue/src/scale.scss (hikari repo) so npm registry installs can resolve it — edit the upstream file, then re-copy; do not hand-edit here.
|
|
2
|
+
|
|
3
|
+
/* ── Canonical scale tokens (L2) ──────────────────────────────────────
|
|
4
|
+
* Non-color constants: spacing, type, radius, blur, opacity, durations,
|
|
5
|
+
* easings, z-index, fonts. ONE definition per name — components and the
|
|
6
|
+
* other shipped sheets must consume, not redefine, these.
|
|
7
|
+
*
|
|
8
|
+
* Conflicting legacy values (packages/theme/styles _layout/_tokens/
|
|
9
|
+
* foundation) were normalized to the values the production composition
|
|
10
|
+
* resolves to (chest: admin-tokens + foundation last). This file is the
|
|
11
|
+
* upstream of styles/theme/scale.scss — edit here, then re-run
|
|
12
|
+
* scripts/theme/sync-vendored.sh; do not hand-edit the vendored copy.
|
|
13
|
+
*/
|
|
14
|
+
:root {
|
|
15
|
+
/* Spacing (N px at the 16px root). */
|
|
16
|
+
--space-1: 0.0625rem;
|
|
17
|
+
--space-2: 0.125rem;
|
|
18
|
+
--space-4: 0.25rem;
|
|
19
|
+
--space-6: 0.375rem;
|
|
20
|
+
--space-8: 0.5rem;
|
|
21
|
+
--space-10: 0.625rem;
|
|
22
|
+
--space-12: 0.75rem;
|
|
23
|
+
--space-14: 0.875rem;
|
|
24
|
+
--space-16: 1rem;
|
|
25
|
+
--space-20: 1.25rem;
|
|
26
|
+
--space-24: 1.5rem;
|
|
27
|
+
--space-28: 1.75rem;
|
|
28
|
+
--space-32: 2rem;
|
|
29
|
+
--space-40: 2.5rem;
|
|
30
|
+
|
|
31
|
+
/* Type */
|
|
32
|
+
--text-3xs: 0.5rem;
|
|
33
|
+
--text-2xs: 0.625rem;
|
|
34
|
+
--text-xs: 0.75rem;
|
|
35
|
+
--text-sm: 0.8125rem;
|
|
36
|
+
--text-base: 0.875rem;
|
|
37
|
+
--text-md: 1rem;
|
|
38
|
+
--text-lg: 1.125rem;
|
|
39
|
+
--text-xl: 1.25rem;
|
|
40
|
+
--text-2xl: 1.5rem;
|
|
41
|
+
|
|
42
|
+
/* Radius / blur / opacity */
|
|
43
|
+
--radius-sm: 4px;
|
|
44
|
+
--radius-md: 8px;
|
|
45
|
+
--radius-lg: 12px;
|
|
46
|
+
--radius-xl: 16px;
|
|
47
|
+
--radius-full: 9999px;
|
|
48
|
+
--blur-xs: 4px;
|
|
49
|
+
--blur-sm: 8px;
|
|
50
|
+
--blur-md: 16px;
|
|
51
|
+
--blur-lg: 24px;
|
|
52
|
+
--blur-xl: 24px;
|
|
53
|
+
--opacity-half: 0.92;
|
|
54
|
+
|
|
55
|
+
/* Motion */
|
|
56
|
+
--duration-instant: 0.1s;
|
|
57
|
+
--duration-short: 0.15s;
|
|
58
|
+
--duration-fast: 0.15s;
|
|
59
|
+
--duration-normal: 0.3s;
|
|
60
|
+
--ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
|
|
61
|
+
--ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
|
|
62
|
+
--ease-in-expo: cubic-bezier(0.95, 0.05, 0.795, 0.035);
|
|
63
|
+
--ease-in: cubic-bezier(0.4, 0, 1, 1);
|
|
64
|
+
--ease-elastic: cubic-bezier(0.16, 1, 0.3, 1);
|
|
65
|
+
/* Legacy-prefixed aliases consumed by HkIconButtonVars' bridge. */
|
|
66
|
+
--hi-duration-fast: 0.15s;
|
|
67
|
+
--hi-ease-default: cubic-bezier(0.4, 0, 0.2, 1);
|
|
68
|
+
|
|
69
|
+
/* Z-index bands */
|
|
70
|
+
--z-base: 0;
|
|
71
|
+
--z-header: 100;
|
|
72
|
+
--z-sidebar: 900;
|
|
73
|
+
|
|
74
|
+
/* Fonts — keep in sync with packages/vue/src/theme/fontContext.ts */
|
|
75
|
+
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
|
|
76
|
+
--font-reading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
|
|
77
|
+
--font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", "PingFang SC", "Microsoft YaHei", monospace;
|
|
78
|
+
}
|