@celestia-island/hikari 0.55.355 → 0.55.357
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/HkBlockingToast.scss +5 -8
- package/src/components/HkColorSchemeEditor.tsx +22 -3
- package/src/components/HkFab.test.tsx +4 -0
- package/src/components/HkFab.tsx +3 -1
- package/src/components/HkTagDotRow.test.tsx +3 -0
- package/src/components/HkTagDotRow.tsx +4 -1
- package/src/components/HkTimePicker.scss +439 -0
- package/src/components/HkTimePicker.test.ts +486 -0
- package/src/components/HkTimePicker.tsx +595 -0
- package/src/components/HkTimeZonePicker.scss +269 -0
- package/src/components/HkTimeZonePicker.test.tsx +444 -0
- package/src/components/HkTimeZonePicker.tsx +337 -0
- package/src/components/HkToast.scss +43 -34
- package/src/components/HkToast.test.tsx +3 -0
- package/src/components/HkToast.tsx +3 -1
- package/src/components/HkWeekdayPicker.scss +350 -0
- package/src/components/HkWeekdayPicker.test.tsx +398 -0
- package/src/components/HkWeekdayPicker.tsx +303 -0
- package/src/components/calendarGrid.test.ts +186 -0
- package/src/components/calendarGrid.ts +132 -0
- package/src/components/pickerFamily.barrel.test.ts +35 -0
- package/src/i18n/locales/ar/components.json +18 -1
- package/src/i18n/locales/de/components.json +18 -1
- package/src/i18n/locales/en/components.json +18 -1
- package/src/i18n/locales/es/components.json +18 -1
- package/src/i18n/locales/fr/components.json +18 -1
- package/src/i18n/locales/ja/components.json +18 -1
- package/src/i18n/locales/ko/components.json +18 -1
- package/src/i18n/locales/pt/components.json +18 -1
- package/src/i18n/locales/ru/components.json +18 -1
- package/src/i18n/locales/zh-Hans/components.json +18 -1
- package/src/i18n/locales/zh-Hant/components.json +18 -1
- package/src/index.ts +3 -0
- package/src/plugins/bootLandingCss.mjs +1 -1
- package/src/styles/theme/channels.scss +16 -0
- package/src/theme/presets.ts +62 -0
- package/src/theme/solidInk.contract.test.ts +194 -0
- package/src/tokens.scss +16 -0
- package/src/components/HkToast.onSolidInk.contract.test.ts +0 -95
package/package.json
CHANGED
|
@@ -83,20 +83,17 @@
|
|
|
83
83
|
gap: var(--space-8, 8px);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
// Variant backgrounds follow the HkToast conventions
|
|
87
|
-
//
|
|
86
|
+
// Variant backgrounds follow the HkToast conventions: each tinted band inks
|
|
87
|
+
// itself from its OWN fill via --hi-color-text-on-<tone> (the theme derives
|
|
88
|
+
// it per tone: white on saturated fills, black on the light ones).
|
|
88
89
|
.hk-blocking-toast-info {
|
|
89
90
|
background: var(--hi-color-info, #6abed6);
|
|
90
|
-
|
|
91
|
-
* #fff fallback so themeless hosts render as before. */
|
|
92
|
-
color: var(--hi-color-text-on-solid, #fff);
|
|
91
|
+
color: var(--hi-color-text-on-info, #fff);
|
|
93
92
|
}
|
|
94
93
|
|
|
95
94
|
.hk-blocking-toast-warning {
|
|
96
95
|
background: var(--hi-color-warning, #eed677);
|
|
97
|
-
|
|
98
|
-
* the on-solid slot is white — a white glyph here would be unreadable. */
|
|
99
|
-
color: #1c1c1e;
|
|
96
|
+
color: var(--hi-color-text-on-warning, #1c1c1e);
|
|
100
97
|
}
|
|
101
98
|
|
|
102
99
|
.hk-blocking-toast-danger {
|
|
@@ -60,13 +60,25 @@ function seedScheme(mode: "dark" | "light"): ThemeSchemeTokens {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
type ColorTokenKey = keyof ThemeSchemeTokens;
|
|
63
|
-
/**
|
|
64
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Required (always-present) token slots — excludes the optional content
|
|
65
|
+
* colors: the on-solid brand pair and the per-tone on-fill inks
|
|
66
|
+
* (danger/success/warning/info), which a theme may leave to solidInk.
|
|
67
|
+
*/
|
|
68
|
+
type OptionalTokenKey = "onSolidText" | "onSolidIcon" | "onDanger" | "onSuccess" | "onWarning" | "onInfo";
|
|
69
|
+
type RequiredTokenKey = Exclude<ColorTokenKey, OptionalTokenKey>;
|
|
65
70
|
|
|
66
71
|
const editableTokens: RequiredTokenKey[] = ["primary", "secondary", "accent", "success", "error", "warning", "info"];
|
|
67
72
|
const derivedTokens: RequiredTokenKey[] = ["background", "surface", "text", "muted", "border", "focusedBorder", "selectedBackground", "selectedText", "statusBarBackground"];
|
|
68
73
|
/** Content colors ON solid brand fills: user-choosable, never derived. */
|
|
69
|
-
const contentTokens:
|
|
74
|
+
const contentTokens: OptionalTokenKey[] = ["onSolidText", "onSolidIcon"];
|
|
75
|
+
/** Per-tone on-fill inks: optional too, so legacy prefills may omit them. */
|
|
76
|
+
const toneInkTokens: Array<"onDanger" | "onSuccess" | "onWarning" | "onInfo"> = [
|
|
77
|
+
"onDanger",
|
|
78
|
+
"onSuccess",
|
|
79
|
+
"onWarning",
|
|
80
|
+
"onInfo",
|
|
81
|
+
];
|
|
70
82
|
const WHITE: ThemeTokenRGB = { r: 255, g: 255, b: 255 };
|
|
71
83
|
|
|
72
84
|
function clamp(v: number): number {
|
|
@@ -209,6 +221,13 @@ export const HkColorSchemeEditor = defineComponent({
|
|
|
209
221
|
dark[k] = props.initialDark?.[k] ?? WHITE;
|
|
210
222
|
light[k] = props.initialLight?.[k] ?? WHITE;
|
|
211
223
|
}
|
|
224
|
+
// Per-tone on-fill inks: same optional-slot treatment. Omitted ones
|
|
225
|
+
// fall back to the tone fill's own judgement (see solidInk), so a
|
|
226
|
+
// legacy prefill keeps deriving instead of freezing a stale value.
|
|
227
|
+
for (const k of toneInkTokens) {
|
|
228
|
+
dark[k] = props.initialDark?.[k];
|
|
229
|
+
light[k] = props.initialLight?.[k];
|
|
230
|
+
}
|
|
212
231
|
seedGroups(groupDark, "dark", props.initialGroups?.dark);
|
|
213
232
|
seedGroups(groupLight, "light", props.initialGroups?.light);
|
|
214
233
|
rederiveSurface();
|
|
@@ -138,6 +138,10 @@ describe("HkFab speed dial", () => {
|
|
|
138
138
|
let minis = d.root.querySelectorAll<HTMLButtonElement>(".hk-fab-mini");
|
|
139
139
|
expect(minis.length).toBe(2);
|
|
140
140
|
expect(minis[0].getAttribute("aria-hidden")).toBe("true");
|
|
141
|
+
// The mini action's label is its own visible caption; a native title
|
|
142
|
+
// would only repeat it on hover (duplicated-tooltip sweep).
|
|
143
|
+
expect(minis[0].hasAttribute("title")).toBe(false);
|
|
144
|
+
expect(minis[0].querySelector(".hk-fab-mini-label")?.textContent).toBe("Alpha");
|
|
141
145
|
|
|
142
146
|
d.button.click();
|
|
143
147
|
await nextTick();
|
package/src/components/HkFab.tsx
CHANGED
|
@@ -178,7 +178,9 @@ export default defineComponent({
|
|
|
178
178
|
tabindex={isOpen.value ? 0 : -1}
|
|
179
179
|
aria-hidden={isOpen.value ? "false" : "true"}
|
|
180
180
|
disabled={props.disabled}
|
|
181
|
-
title
|
|
181
|
+
// No native `title`: the mini action renders its label as
|
|
182
|
+
// visible text and aria-label already names the button, so
|
|
183
|
+
// a title would only repeat the text on screen.
|
|
182
184
|
aria-label={action.label ?? action.key}
|
|
183
185
|
onClick={() => onActionClick(action)}
|
|
184
186
|
>
|
|
@@ -50,6 +50,9 @@ describe("HkTagDotRow", () => {
|
|
|
50
50
|
const redDot = red.querySelector(".hk-tag-dot__dot") as HTMLElement;
|
|
51
51
|
expect(redDot.style.getPropertyValue("--hk-tag-color")).toBe("#e5484d");
|
|
52
52
|
expect(red.querySelector(".hk-tag-dot__label")?.textContent).toBe("Red");
|
|
53
|
+
// No native tooltip repeating the caption: the label is already
|
|
54
|
+
// visible, and the accessible name rides aria-label.
|
|
55
|
+
expect(red.hasAttribute("title")).toBe(false);
|
|
53
56
|
expect(red.getAttribute("aria-pressed")).toBe("false");
|
|
54
57
|
expect(red.hasAttribute("data-active")).toBe(false);
|
|
55
58
|
|
|
@@ -52,7 +52,10 @@ export default defineComponent({
|
|
|
52
52
|
disabled={tag.disabled}
|
|
53
53
|
aria-pressed={tag.active ? "true" : "false"}
|
|
54
54
|
aria-label={tag.label ?? tag.key}
|
|
55
|
-
title
|
|
55
|
+
// No native `title`: the caption span already shows the label, so
|
|
56
|
+
// a title would only repeat the text the user is reading (the
|
|
57
|
+
// duplicated-tooltip defect). The accessible name rides
|
|
58
|
+
// aria-label, which also covers the labelless (dot-only) case.
|
|
56
59
|
onClick={() => emit("toggle", tag.key)}
|
|
57
60
|
>
|
|
58
61
|
<span class="hk-tag-dot__dot" style={{ "--hk-tag-color": tag.color }} />
|
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
/* ── HkTimePicker ───────────────────────────────────────────────
|
|
2
|
+
* Input-like trigger (mirrors HkInput / HkDatePicker chrome) + an
|
|
3
|
+
* adaptive popover holding a Material-style analog clock: a day-period
|
|
4
|
+
* segmented control on top, a big HH:MM readout, the dial, then the
|
|
5
|
+
* action row. Uses the shared --hi-* design tokens. */
|
|
6
|
+
|
|
7
|
+
@use "../styles/polyfill" as *;
|
|
8
|
+
|
|
9
|
+
.hk-tp {
|
|
10
|
+
display: block;
|
|
11
|
+
width: 100%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.hk-tp.is-disabled {
|
|
15
|
+
opacity: 0.5;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.hk-tp-label {
|
|
19
|
+
display: block;
|
|
20
|
+
font-size: var(--text-xs, 0.75rem);
|
|
21
|
+
font-weight: 600;
|
|
22
|
+
letter-spacing: 0.02em;
|
|
23
|
+
margin-bottom: var(--space-4, 4px);
|
|
24
|
+
color: rgb(var(--color-text) / var(--hk-field-label-alpha, 72%));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* ── Trigger ──────────────────────────────────────────────────── */
|
|
28
|
+
|
|
29
|
+
.hk-tp-trigger {
|
|
30
|
+
width: 100%;
|
|
31
|
+
min-height: 2.5rem;
|
|
32
|
+
padding: var(--space-8, 8px) var(--space-12, 12px);
|
|
33
|
+
background: color-mix(in srgb, rgb(var(--color-surface)) 55%, transparent);
|
|
34
|
+
border: 1px solid color-mix(in srgb, rgb(var(--color-text)) 14%, transparent);
|
|
35
|
+
border-radius: var(--radius-md, 8px);
|
|
36
|
+
color: rgb(var(--color-text));
|
|
37
|
+
font-family: inherit;
|
|
38
|
+
font-size: var(--text-sm, 0.875rem);
|
|
39
|
+
line-height: 1.5;
|
|
40
|
+
position: relative;
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: var(--space-6, 6px);
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
transition:
|
|
46
|
+
background-color var(--duration-fast, 0.15s) ease,
|
|
47
|
+
border-color var(--duration-fast, 0.15s) ease,
|
|
48
|
+
box-shadow var(--duration-fast, 0.15s) ease;
|
|
49
|
+
@include user-select(none);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.hk-tp-trigger-sm {
|
|
53
|
+
min-height: 2rem;
|
|
54
|
+
padding: var(--space-4, 4px) var(--space-10, 10px);
|
|
55
|
+
font-size: var(--text-xs, 0.75rem);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.hk-tp-trigger-lg {
|
|
59
|
+
min-height: 2.75rem;
|
|
60
|
+
padding: var(--space-10, 10px) var(--space-14, 14px);
|
|
61
|
+
font-size: var(--text-md, 1rem);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.hk-tp:not(.is-disabled) .hk-tp-trigger:hover,
|
|
65
|
+
.hk-tp-trigger:focus-visible {
|
|
66
|
+
border-color: rgb(var(--color-focused-border));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.hk-tp.is-disabled .hk-tp-trigger {
|
|
70
|
+
cursor: not-allowed;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.hk-tp-trigger:focus-visible,
|
|
74
|
+
.hk-tp-trigger.is-open {
|
|
75
|
+
outline: none;
|
|
76
|
+
border-color: rgb(var(--color-focused-border));
|
|
77
|
+
box-shadow: var(--shadow-focus);
|
|
78
|
+
background: rgb(var(--color-surface));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.hk-tp-value {
|
|
82
|
+
flex: 1;
|
|
83
|
+
min-width: 0;
|
|
84
|
+
text-align: start;
|
|
85
|
+
white-space: nowrap;
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
text-overflow: ellipsis;
|
|
88
|
+
font-variant-numeric: tabular-nums;
|
|
89
|
+
letter-spacing: 0.01em;
|
|
90
|
+
|
|
91
|
+
&[data-empty] {
|
|
92
|
+
color: var(--hi-color-muted);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.hk-tp-clear {
|
|
97
|
+
appearance: none;
|
|
98
|
+
display: inline-flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
justify-content: center;
|
|
101
|
+
flex-shrink: 0;
|
|
102
|
+
padding: 0;
|
|
103
|
+
border: 0;
|
|
104
|
+
background: transparent;
|
|
105
|
+
border-radius: var(--radius-md, 8px);
|
|
106
|
+
color: var(--hi-icon-button-icon-color, var(--hi-color-muted));
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
opacity: 0;
|
|
109
|
+
transition: opacity var(--duration-fast, 0.15s) ease, color var(--duration-fast, 0.15s) ease;
|
|
110
|
+
|
|
111
|
+
.hk-tp-trigger:hover &,
|
|
112
|
+
.hk-tp-trigger:focus &,
|
|
113
|
+
.hk-tp-clear:focus-visible {
|
|
114
|
+
opacity: 1;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&:hover {
|
|
118
|
+
color: var(--hi-icon-button-icon-color-active, var(--hi-color-text-primary));
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.hk-tp-icon {
|
|
123
|
+
display: inline-flex;
|
|
124
|
+
align-items: center;
|
|
125
|
+
justify-content: center;
|
|
126
|
+
flex-shrink: 0;
|
|
127
|
+
color: var(--hi-color-muted);
|
|
128
|
+
pointer-events: none;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* ── Panel ────────────────────────────────────────────────────── */
|
|
132
|
+
|
|
133
|
+
.hk-tp-popover.hk-popover-panel {
|
|
134
|
+
padding: var(--space-10, 10px) var(--space-12, 12px) var(--space-8, 8px);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.hk-tp-panel {
|
|
138
|
+
display: flex;
|
|
139
|
+
flex-direction: column;
|
|
140
|
+
gap: var(--space-8, 8px);
|
|
141
|
+
min-width: 18rem;
|
|
142
|
+
@include user-select(none);
|
|
143
|
+
color: var(--hi-color-text-primary);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* Mobile sheet context: keep the designed measure inside the
|
|
147
|
+
* viewport-wide sheet instead of left-gluing at the popover min-width. */
|
|
148
|
+
.hk-popover-panel.hk-is-sheet .hk-tp-panel {
|
|
149
|
+
min-width: 0;
|
|
150
|
+
max-width: min(22rem, 100%);
|
|
151
|
+
margin-inline: auto;
|
|
152
|
+
width: 100%;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* ── Day period (AM / PM) ─────────────────────────────────────── */
|
|
156
|
+
|
|
157
|
+
.hk-tp-period {
|
|
158
|
+
display: grid;
|
|
159
|
+
grid-template-columns: 1fr 1fr;
|
|
160
|
+
gap: 2px;
|
|
161
|
+
padding: 2px;
|
|
162
|
+
background: color-mix(in srgb, rgb(var(--color-surface)) 70%, transparent);
|
|
163
|
+
border: 1px solid color-mix(in srgb, rgb(var(--color-text)) 12%, transparent);
|
|
164
|
+
border-radius: var(--radius-md, 8px);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.hk-tp-period-btn {
|
|
168
|
+
appearance: none;
|
|
169
|
+
border: 0;
|
|
170
|
+
background: transparent;
|
|
171
|
+
height: 2rem;
|
|
172
|
+
display: inline-flex;
|
|
173
|
+
align-items: center;
|
|
174
|
+
justify-content: center;
|
|
175
|
+
gap: var(--space-6, 6px);
|
|
176
|
+
font-family: inherit;
|
|
177
|
+
font-size: var(--text-xs, 0.75rem);
|
|
178
|
+
font-weight: 600;
|
|
179
|
+
letter-spacing: 0.02em;
|
|
180
|
+
color: var(--hi-color-muted);
|
|
181
|
+
border-radius: var(--radius-sm, 4px);
|
|
182
|
+
cursor: pointer;
|
|
183
|
+
transition:
|
|
184
|
+
background-color var(--duration-fast, 0.15s) ease,
|
|
185
|
+
color var(--duration-fast, 0.15s) ease;
|
|
186
|
+
|
|
187
|
+
&:hover:not(.is-active) {
|
|
188
|
+
background: color-mix(in srgb, rgb(var(--color-text)) 6%, transparent);
|
|
189
|
+
color: var(--hi-color-text-primary);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
&.is-active {
|
|
193
|
+
background: rgb(var(--color-primary));
|
|
194
|
+
color: rgb(var(--color-on-solid));
|
|
195
|
+
|
|
196
|
+
svg {
|
|
197
|
+
color: rgb(var(--color-on-solid-icon, 255 255 255));
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
&:focus-visible {
|
|
202
|
+
outline: 2px solid color-mix(in srgb, var(--hi-color-primary) 55%, transparent);
|
|
203
|
+
outline-offset: 1px;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* ── Readout ──────────────────────────────────────────────────── */
|
|
208
|
+
|
|
209
|
+
.hk-tp-readout {
|
|
210
|
+
display: flex;
|
|
211
|
+
align-items: baseline;
|
|
212
|
+
justify-content: center;
|
|
213
|
+
gap: var(--space-2, 2px);
|
|
214
|
+
font-variant-numeric: tabular-nums;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.hk-tp-readout-btn {
|
|
218
|
+
appearance: none;
|
|
219
|
+
border: 0;
|
|
220
|
+
background: transparent;
|
|
221
|
+
padding: 0 var(--space-2, 2px);
|
|
222
|
+
font-family: inherit;
|
|
223
|
+
font-size: 2rem;
|
|
224
|
+
font-weight: 600;
|
|
225
|
+
line-height: 1.1;
|
|
226
|
+
color: var(--hi-color-muted);
|
|
227
|
+
border-radius: var(--radius-md, 8px);
|
|
228
|
+
cursor: pointer;
|
|
229
|
+
transition:
|
|
230
|
+
background-color var(--duration-fast, 0.15s) ease,
|
|
231
|
+
color var(--duration-fast, 0.15s) ease;
|
|
232
|
+
|
|
233
|
+
&:hover {
|
|
234
|
+
background: color-mix(in srgb, rgb(var(--color-text)) 6%, transparent);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
&.is-active {
|
|
238
|
+
color: var(--hi-color-primary);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
&:focus-visible {
|
|
242
|
+
outline: 2px solid color-mix(in srgb, var(--hi-color-primary) 55%, transparent);
|
|
243
|
+
outline-offset: 1px;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.hk-tp-readout-sep {
|
|
248
|
+
font-size: 2rem;
|
|
249
|
+
font-weight: 600;
|
|
250
|
+
line-height: 1.1;
|
|
251
|
+
color: var(--hi-color-muted);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/* ── Dial ─────────────────────────────────────────────────────── */
|
|
255
|
+
|
|
256
|
+
.hk-tp-dial {
|
|
257
|
+
display: flex;
|
|
258
|
+
justify-content: center;
|
|
259
|
+
padding-block: var(--space-2, 2px);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/* The stage owns the square footprint; the face is the slider leaf and
|
|
263
|
+
* the number buttons ride above it in a sibling layer (a slider's
|
|
264
|
+
* children are presentational, so focusable numbers must not live
|
|
265
|
+
* inside). */
|
|
266
|
+
.hk-tp-dial-stage {
|
|
267
|
+
position: relative;
|
|
268
|
+
width: 15rem;
|
|
269
|
+
max-width: 100%;
|
|
270
|
+
aspect-ratio: 1;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.hk-tp-face {
|
|
274
|
+
position: relative;
|
|
275
|
+
width: 100%;
|
|
276
|
+
height: 100%;
|
|
277
|
+
aspect-ratio: 1;
|
|
278
|
+
border-radius: 50%;
|
|
279
|
+
background:
|
|
280
|
+
radial-gradient(
|
|
281
|
+
circle at 50% 40%,
|
|
282
|
+
color-mix(in srgb, rgb(var(--color-surface)) 70%, transparent),
|
|
283
|
+
color-mix(in srgb, rgb(var(--color-surface)) 35%, transparent)
|
|
284
|
+
);
|
|
285
|
+
box-shadow: inset 0 0 0 1px color-mix(in srgb, rgb(var(--color-text)) 10%, transparent);
|
|
286
|
+
touch-action: none;
|
|
287
|
+
cursor: pointer;
|
|
288
|
+
outline: none;
|
|
289
|
+
|
|
290
|
+
&:focus-visible {
|
|
291
|
+
box-shadow:
|
|
292
|
+
inset 0 0 0 1px color-mix(in srgb, rgb(var(--color-text)) 10%, transparent),
|
|
293
|
+
0 0 0 2px rgb(var(--color-background)),
|
|
294
|
+
0 0 0 4px color-mix(in srgb, var(--hi-color-primary) 55%, transparent);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.hk-tp-ticks,
|
|
299
|
+
.hk-tp-hand {
|
|
300
|
+
position: absolute;
|
|
301
|
+
inset: 0;
|
|
302
|
+
width: 100%;
|
|
303
|
+
height: 100%;
|
|
304
|
+
pointer-events: none;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.hk-tp-ticks line {
|
|
308
|
+
stroke: color-mix(in srgb, var(--hi-color-text-secondary) 45%, transparent);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.hk-tp-ticks .is-major {
|
|
312
|
+
stroke-width: 0.9;
|
|
313
|
+
opacity: 0.9;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.hk-tp-ticks .is-minor {
|
|
317
|
+
stroke-width: 0.5;
|
|
318
|
+
opacity: 0.45;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.hk-tp-hand line {
|
|
322
|
+
stroke: var(--hi-color-primary);
|
|
323
|
+
stroke-width: 1.6;
|
|
324
|
+
stroke-linecap: round;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.hk-tp-hand-tip {
|
|
328
|
+
fill: var(--hi-color-primary);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.hk-tp-hand-hub {
|
|
332
|
+
fill: var(--hi-color-primary);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.hk-tp-numbers {
|
|
336
|
+
position: absolute;
|
|
337
|
+
inset: 0;
|
|
338
|
+
pointer-events: none;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.hk-tp-number {
|
|
342
|
+
position: absolute;
|
|
343
|
+
pointer-events: auto;
|
|
344
|
+
transform: translate(-50%, -50%);
|
|
345
|
+
width: 2.1rem;
|
|
346
|
+
height: 2.1rem;
|
|
347
|
+
padding: 0;
|
|
348
|
+
border: 0;
|
|
349
|
+
border-radius: 50%;
|
|
350
|
+
background: transparent;
|
|
351
|
+
color: var(--hi-color-text-secondary);
|
|
352
|
+
font-family: inherit;
|
|
353
|
+
font-size: var(--text-sm, 0.875rem);
|
|
354
|
+
font-weight: 600;
|
|
355
|
+
font-variant-numeric: tabular-nums;
|
|
356
|
+
display: inline-flex;
|
|
357
|
+
align-items: center;
|
|
358
|
+
justify-content: center;
|
|
359
|
+
cursor: pointer;
|
|
360
|
+
z-index: 1;
|
|
361
|
+
transition:
|
|
362
|
+
background-color var(--duration-fast, 0.15s) ease,
|
|
363
|
+
color var(--duration-fast, 0.15s) ease;
|
|
364
|
+
|
|
365
|
+
&:hover:not(.is-selected) {
|
|
366
|
+
background: color-mix(in srgb, rgb(var(--color-text)) 7%, transparent);
|
|
367
|
+
color: var(--hi-color-text-primary);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
&.is-selected {
|
|
371
|
+
background: rgb(var(--color-primary));
|
|
372
|
+
color: rgb(var(--color-on-solid));
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
&:focus-visible {
|
|
376
|
+
outline: 2px solid color-mix(in srgb, var(--hi-color-primary) 55%, transparent);
|
|
377
|
+
outline-offset: 1px;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.hk-tp-numbers.is-minute .hk-tp-number {
|
|
382
|
+
width: 1.9rem;
|
|
383
|
+
height: 1.9rem;
|
|
384
|
+
font-size: var(--text-xs, 0.75rem);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/* ── Footer ───────────────────────────────────────────────────── */
|
|
388
|
+
|
|
389
|
+
.hk-tp-footer {
|
|
390
|
+
display: flex;
|
|
391
|
+
align-items: center;
|
|
392
|
+
justify-content: space-between;
|
|
393
|
+
gap: var(--space-6, 6px);
|
|
394
|
+
padding-top: var(--space-8, 8px);
|
|
395
|
+
border-top: 1px solid color-mix(in srgb, rgb(var(--color-text)) 10%, transparent);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.hk-tp-actions {
|
|
399
|
+
display: flex;
|
|
400
|
+
align-items: center;
|
|
401
|
+
gap: var(--space-6, 6px);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.hk-tp-confirm-icon {
|
|
405
|
+
margin-inline-end: var(--space-2, 2px);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/* ── Touch geometry ───────────────────────────────────────────── */
|
|
409
|
+
|
|
410
|
+
.hk-tp-panel.is-touch .hk-tp-dial-stage {
|
|
411
|
+
width: min(17rem, 74vw);
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.hk-tp-panel.is-touch .hk-tp-number {
|
|
415
|
+
width: 2.35rem;
|
|
416
|
+
height: 2.35rem;
|
|
417
|
+
font-size: var(--text-md, 1rem);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.hk-tp-panel.is-touch .hk-tp-numbers.is-minute .hk-tp-number {
|
|
421
|
+
width: 2.1rem;
|
|
422
|
+
height: 2.1rem;
|
|
423
|
+
font-size: var(--text-sm, 0.875rem);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.hk-tp-panel.is-touch .hk-tp-period-btn {
|
|
427
|
+
height: 2.35rem;
|
|
428
|
+
font-size: var(--text-sm, 0.875rem);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
@media (prefers-reduced-motion: reduce) {
|
|
432
|
+
.hk-tp-trigger,
|
|
433
|
+
.hk-tp-clear,
|
|
434
|
+
.hk-tp-period-btn,
|
|
435
|
+
.hk-tp-readout-btn,
|
|
436
|
+
.hk-tp-number {
|
|
437
|
+
transition: none;
|
|
438
|
+
}
|
|
439
|
+
}
|