@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,161 @@
|
|
|
1
|
+
import { computed, defineComponent, onUnmounted, ref, type PropType } from "vue";
|
|
2
|
+
import "./HkNumberInput.scss";
|
|
3
|
+
|
|
4
|
+
export default defineComponent({
|
|
5
|
+
name: "HkNumberInput",
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: { type: Number, default: 0 },
|
|
8
|
+
min: { type: Number, default: undefined },
|
|
9
|
+
max: { type: Number, default: undefined },
|
|
10
|
+
step: { type: Number, default: 1 },
|
|
11
|
+
disabled: { type: Boolean, default: false },
|
|
12
|
+
placeholder: { type: String, default: undefined },
|
|
13
|
+
size: {
|
|
14
|
+
type: String as PropType<"sm" | "md" | "lg">,
|
|
15
|
+
default: "md",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
emits: {
|
|
19
|
+
"update:modelValue": (_value: number) => true,
|
|
20
|
+
},
|
|
21
|
+
setup(props, { emit, slots }) {
|
|
22
|
+
let holdInterval: ReturnType<typeof setInterval> | null = null;
|
|
23
|
+
let holdTimeout: ReturnType<typeof setTimeout> | null = null;
|
|
24
|
+
const inputRef = ref<HTMLInputElement | null>(null);
|
|
25
|
+
|
|
26
|
+
const canIncrement = computed(() =>
|
|
27
|
+
props.max != null ? props.modelValue < props.max : true,
|
|
28
|
+
);
|
|
29
|
+
const canDecrement = computed(() =>
|
|
30
|
+
props.min != null ? props.modelValue > props.min : true,
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
function emitValue(val: number) {
|
|
34
|
+
if (props.min != null && val < props.min) {
|
|
35
|
+
emit("update:modelValue", props.min);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (props.max != null && val > props.max) {
|
|
39
|
+
emit("update:modelValue", props.max);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
emit("update:modelValue", val);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function increment() {
|
|
46
|
+
if (!canIncrement.value) return;
|
|
47
|
+
emitValue(props.modelValue + props.step);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function decrement() {
|
|
51
|
+
if (!canDecrement.value) return;
|
|
52
|
+
emitValue(props.modelValue - props.step);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function startHold(dir: "up" | "down") {
|
|
56
|
+
stopHold();
|
|
57
|
+
holdTimeout = setTimeout(() => {
|
|
58
|
+
holdInterval = setInterval(() => {
|
|
59
|
+
if (dir === "up") increment();
|
|
60
|
+
else decrement();
|
|
61
|
+
}, 50);
|
|
62
|
+
}, 300);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function stopHold() {
|
|
66
|
+
if (holdTimeout) clearTimeout(holdTimeout);
|
|
67
|
+
if (holdInterval) clearInterval(holdInterval);
|
|
68
|
+
holdTimeout = null;
|
|
69
|
+
holdInterval = null;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
onUnmounted(stopHold);
|
|
73
|
+
|
|
74
|
+
const wrapperClass = computed(() => [
|
|
75
|
+
"hk-number-input",
|
|
76
|
+
`hk-number-input-${props.size}`,
|
|
77
|
+
props.disabled ? "hk-number-input-disabled" : "",
|
|
78
|
+
]);
|
|
79
|
+
|
|
80
|
+
return () => (
|
|
81
|
+
<div class={wrapperClass.value}>
|
|
82
|
+
<div class="hk-number-input-inner">
|
|
83
|
+
{slots.prefix ? (
|
|
84
|
+
<span class="hk-number-input-prefix">{slots.prefix()}</span>
|
|
85
|
+
) : null}
|
|
86
|
+
<input
|
|
87
|
+
ref={inputRef}
|
|
88
|
+
type="number"
|
|
89
|
+
class="hk-number-input-field"
|
|
90
|
+
value={props.modelValue}
|
|
91
|
+
min={props.min}
|
|
92
|
+
max={props.max}
|
|
93
|
+
step={props.step}
|
|
94
|
+
disabled={props.disabled}
|
|
95
|
+
placeholder={props.placeholder}
|
|
96
|
+
onInput={(e: Event) =>
|
|
97
|
+
emitValue(Number((e.target as HTMLInputElement).value))
|
|
98
|
+
}
|
|
99
|
+
/>
|
|
100
|
+
{slots.suffix ? (
|
|
101
|
+
<span class="hk-number-input-suffix">{slots.suffix()}</span>
|
|
102
|
+
) : null}
|
|
103
|
+
<div class="hk-number-input-steppers">
|
|
104
|
+
<button
|
|
105
|
+
type="button"
|
|
106
|
+
class="hk-number-input-step hk-number-input-step-up"
|
|
107
|
+
disabled={!canIncrement.value || props.disabled}
|
|
108
|
+
onMousedown={(e: MouseEvent) => {
|
|
109
|
+
e.preventDefault();
|
|
110
|
+
startHold("up");
|
|
111
|
+
}}
|
|
112
|
+
onMouseup={(e: MouseEvent) => {
|
|
113
|
+
e.preventDefault();
|
|
114
|
+
stopHold();
|
|
115
|
+
}}
|
|
116
|
+
onMouseleave={(e: MouseEvent) => {
|
|
117
|
+
e.preventDefault();
|
|
118
|
+
stopHold();
|
|
119
|
+
}}
|
|
120
|
+
onClick={(e: MouseEvent) => {
|
|
121
|
+
e.preventDefault();
|
|
122
|
+
increment();
|
|
123
|
+
}}
|
|
124
|
+
tabindex={-1}
|
|
125
|
+
>
|
|
126
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="14" height="14">
|
|
127
|
+
<polyline points="18 15 12 9 6 15" />
|
|
128
|
+
</svg>
|
|
129
|
+
</button>
|
|
130
|
+
<button
|
|
131
|
+
type="button"
|
|
132
|
+
class="hk-number-input-step hk-number-input-step-down"
|
|
133
|
+
disabled={!canDecrement.value || props.disabled}
|
|
134
|
+
onMousedown={(e: MouseEvent) => {
|
|
135
|
+
e.preventDefault();
|
|
136
|
+
startHold("down");
|
|
137
|
+
}}
|
|
138
|
+
onMouseup={(e: MouseEvent) => {
|
|
139
|
+
e.preventDefault();
|
|
140
|
+
stopHold();
|
|
141
|
+
}}
|
|
142
|
+
onMouseleave={(e: MouseEvent) => {
|
|
143
|
+
e.preventDefault();
|
|
144
|
+
stopHold();
|
|
145
|
+
}}
|
|
146
|
+
onClick={(e: MouseEvent) => {
|
|
147
|
+
e.preventDefault();
|
|
148
|
+
decrement();
|
|
149
|
+
}}
|
|
150
|
+
tabindex={-1}
|
|
151
|
+
>
|
|
152
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="14" height="14">
|
|
153
|
+
<polyline points="6 9 12 15 18 9" />
|
|
154
|
+
</svg>
|
|
155
|
+
</button>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
);
|
|
160
|
+
},
|
|
161
|
+
});
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
.hk-pwd-wrapper {
|
|
2
|
+
display: block;
|
|
3
|
+
width: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.hk-pwd-label {
|
|
7
|
+
display: block;
|
|
8
|
+
font-size: 0.875rem;
|
|
9
|
+
font-weight: 500;
|
|
10
|
+
margin-bottom: 0.375rem;
|
|
11
|
+
color: var(--hi-color-text-primary, #333);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.hk-pwd-required {
|
|
15
|
+
margin-left: 0.125rem;
|
|
16
|
+
color: var(--hi-color-danger, #f85149);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.hk-pwd-box {
|
|
20
|
+
position: relative;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
min-height: 2.5rem;
|
|
24
|
+
padding: 0.5rem 0.75rem;
|
|
25
|
+
background: var(--hi-color-surface, rgba(255, 255, 255, 0.95));
|
|
26
|
+
backdrop-filter: blur(8px);
|
|
27
|
+
border: 1px solid var(--hi-color-border, rgba(0, 0, 0, 0.08));
|
|
28
|
+
border-radius: 6px;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
transition:
|
|
31
|
+
border-color 0.2s ease,
|
|
32
|
+
box-shadow 0.2s ease;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.hk-pwd-box:hover:not([data-disabled]) {
|
|
36
|
+
border-color: var(--hi-color-primary, #58a6ff);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.hk-pwd-box:focus-within,
|
|
40
|
+
.hk-pwd-box[data-focused] {
|
|
41
|
+
border-color: var(--hi-color-primary, #58a6ff);
|
|
42
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--hi-color-primary, #58a6ff) 15%, transparent);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.hk-pwd-box[data-error] {
|
|
46
|
+
border-color: var(--hi-color-danger, #f85149);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.hk-pwd-box[data-error][data-focused] {
|
|
50
|
+
border-color: var(--hi-color-danger, #f85149);
|
|
51
|
+
box-shadow: 0 0 0 3px rgba(248, 81, 73, 0.15);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.hk-pwd-box[data-disabled] {
|
|
55
|
+
opacity: 0.5;
|
|
56
|
+
cursor: not-allowed;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.hk-pwd-box[data-fw] {
|
|
60
|
+
border-color: var(--hi-color-warning, #d29922);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.hk-pwd-box[data-flash] {
|
|
64
|
+
animation: hk-pwd-flash 0.3s ease-out;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@keyframes hk-pwd-flash {
|
|
68
|
+
0% {
|
|
69
|
+
border-color: var(--hi-color-primary, #58a6ff);
|
|
70
|
+
box-shadow:
|
|
71
|
+
0 0 22px color-mix(in srgb, var(--hi-color-primary, #58a6ff) 38%, transparent),
|
|
72
|
+
inset 0 0 10px color-mix(in srgb, var(--hi-color-primary, #58a6ff) 7%, transparent);
|
|
73
|
+
}
|
|
74
|
+
100% {
|
|
75
|
+
border-color: var(--hi-color-primary, #58a6ff);
|
|
76
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--hi-color-primary, #58a6ff) 15%, transparent);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.hk-pwd-lock {
|
|
81
|
+
position: relative;
|
|
82
|
+
z-index: 1;
|
|
83
|
+
flex-shrink: 0;
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
justify-content: center;
|
|
87
|
+
transition:
|
|
88
|
+
color 0.3s ease,
|
|
89
|
+
filter 0.3s ease;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.hk-pwd-lock-empty {
|
|
93
|
+
color: var(--hi-color-text-secondary, #666);
|
|
94
|
+
opacity: 0.4;
|
|
95
|
+
pointer-events: none;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.hk-pwd-lock-filled {
|
|
99
|
+
color: var(--hi-color-primary, #58a6ff);
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.hk-pwd-box:focus-within .hk-pwd-lock,
|
|
104
|
+
.hk-pwd-box[data-focused] .hk-pwd-lock {
|
|
105
|
+
color: var(--hi-color-primary, #58a6ff);
|
|
106
|
+
filter: drop-shadow(0 0 5px currentColor);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.hk-pwd-lock[data-revealing] {
|
|
110
|
+
color: var(--hi-color-primary, #58a6ff);
|
|
111
|
+
filter: drop-shadow(0 0 6px currentColor);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.hk-pwd-dots {
|
|
115
|
+
position: absolute;
|
|
116
|
+
inset: 0;
|
|
117
|
+
width: 100%;
|
|
118
|
+
height: 100%;
|
|
119
|
+
z-index: 0;
|
|
120
|
+
pointer-events: none;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.hk-pwd-placeholder {
|
|
124
|
+
position: absolute;
|
|
125
|
+
inset: 0;
|
|
126
|
+
display: flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
justify-content: center;
|
|
129
|
+
z-index: 1;
|
|
130
|
+
pointer-events: none;
|
|
131
|
+
user-select: none;
|
|
132
|
+
font-size: 0.875rem;
|
|
133
|
+
color: var(--hi-color-primary, rgba(88, 166, 255, 0.7));
|
|
134
|
+
animation: hk-pwd-breathe 3s ease-in-out infinite;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.hk-pwd-box[data-focused] .hk-pwd-placeholder {
|
|
138
|
+
color: var(--hi-color-primary, rgba(88, 166, 255, 0.85));
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
@keyframes hk-pwd-breathe {
|
|
142
|
+
0%, 100% { opacity: 1; }
|
|
143
|
+
50% { opacity: 0.7; }
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.hk-pwd-blur-hint {
|
|
147
|
+
position: absolute;
|
|
148
|
+
inset: 0;
|
|
149
|
+
display: flex;
|
|
150
|
+
align-items: center;
|
|
151
|
+
justify-content: center;
|
|
152
|
+
z-index: 1;
|
|
153
|
+
user-select: none;
|
|
154
|
+
font-size: 0.8125rem;
|
|
155
|
+
font-style: italic;
|
|
156
|
+
color: var(--hi-color-text-secondary, #666);
|
|
157
|
+
cursor: pointer;
|
|
158
|
+
transition: color 0.3s ease;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.hk-pwd-blur-hint:hover {
|
|
162
|
+
color: var(--hi-color-text-primary, #333);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.hk-pwd-blur-hint:active {
|
|
166
|
+
color: var(--hi-color-primary, #58a6ff);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.hk-pwd-select-hint {
|
|
170
|
+
position: absolute;
|
|
171
|
+
inset: 0;
|
|
172
|
+
display: flex;
|
|
173
|
+
align-items: center;
|
|
174
|
+
justify-content: center;
|
|
175
|
+
z-index: 1;
|
|
176
|
+
user-select: none;
|
|
177
|
+
font-size: 0.8125rem;
|
|
178
|
+
font-style: italic;
|
|
179
|
+
color: var(--hi-color-text-secondary, #666);
|
|
180
|
+
pointer-events: none;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.hk-pwd-reveal-text {
|
|
184
|
+
position: absolute;
|
|
185
|
+
inset: 0;
|
|
186
|
+
display: flex;
|
|
187
|
+
align-items: center;
|
|
188
|
+
justify-content: center;
|
|
189
|
+
z-index: 2;
|
|
190
|
+
pointer-events: none;
|
|
191
|
+
user-select: none;
|
|
192
|
+
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
|
|
193
|
+
font-size: 0.8125rem;
|
|
194
|
+
letter-spacing: 0.04em;
|
|
195
|
+
color: var(--hi-color-text-primary, #333);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.hk-pwd-input {
|
|
199
|
+
position: absolute;
|
|
200
|
+
inset: 0;
|
|
201
|
+
width: 100%;
|
|
202
|
+
height: 100%;
|
|
203
|
+
opacity: 0;
|
|
204
|
+
cursor: text;
|
|
205
|
+
font-size: 1rem;
|
|
206
|
+
z-index: 2;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.hk-pwd-strength {
|
|
210
|
+
position: absolute;
|
|
211
|
+
right: 0.75rem;
|
|
212
|
+
top: 50%;
|
|
213
|
+
transform: translateY(-50%);
|
|
214
|
+
width: 0.55rem;
|
|
215
|
+
height: 0.55rem;
|
|
216
|
+
border-radius: 50%;
|
|
217
|
+
z-index: 1;
|
|
218
|
+
pointer-events: none;
|
|
219
|
+
transition:
|
|
220
|
+
background 0.3s ease,
|
|
221
|
+
box-shadow 0.3s ease;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.hk-pwd-strength[data-level="weak"] {
|
|
225
|
+
background: var(--hi-color-danger, #f85149);
|
|
226
|
+
box-shadow: 0 0 6px rgba(248, 81, 73, 0.6);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.hk-pwd-strength[data-level="fair"] {
|
|
230
|
+
background: var(--hi-color-warning, #d29922);
|
|
231
|
+
box-shadow: 0 0 6px rgba(210, 153, 34, 0.6);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.hk-pwd-strength[data-level="strong"] {
|
|
235
|
+
background: var(--hi-color-success, #3fb950);
|
|
236
|
+
box-shadow: 0 0 6px rgba(63, 185, 80, 0.6);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.hk-pwd-hints {
|
|
240
|
+
min-height: 0;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.hk-pwd-hint {
|
|
244
|
+
display: inline-flex;
|
|
245
|
+
align-items: center;
|
|
246
|
+
gap: 0.25rem;
|
|
247
|
+
margin-top: 0.25rem;
|
|
248
|
+
font-size: 0.75rem;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.hk-pwd-hint[data-variant="caps"] {
|
|
252
|
+
color: var(--hi-color-warning, #d29922);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.hk-pwd-hint[data-variant="fw"] {
|
|
256
|
+
color: var(--hi-color-danger, #f85149);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.hk-pwd-hint-enter-active,
|
|
260
|
+
.hk-pwd-hint-leave-active {
|
|
261
|
+
transition: opacity 0.3s ease;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.hk-pwd-hint-enter-from,
|
|
265
|
+
.hk-pwd-hint-leave-to {
|
|
266
|
+
opacity: 0;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.hk-pwd-error {
|
|
270
|
+
margin-top: 0.25rem;
|
|
271
|
+
font-size: 0.75rem;
|
|
272
|
+
color: var(--hi-color-danger, #f85149);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.hk-pwd-hint-text {
|
|
276
|
+
margin-top: 0.25rem;
|
|
277
|
+
font-size: 0.75rem;
|
|
278
|
+
color: var(--hi-color-text-secondary, #666);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.hk-pwd-box input:-webkit-autofill,
|
|
282
|
+
.hk-pwd-box input:-webkit-autofill:hover,
|
|
283
|
+
.hk-pwd-box input:-webkit-autofill:focus,
|
|
284
|
+
.hk-pwd-box input:-webkit-autofill:active {
|
|
285
|
+
-webkit-text-fill-color: var(--hi-color-text-primary, #333) !important;
|
|
286
|
+
caret-color: var(--hi-color-text-primary, #333);
|
|
287
|
+
box-shadow: 0 0 0 1000px var(--hi-color-surface, #fff) inset !important;
|
|
288
|
+
transition: background-color calc(infinity * 1s) step-end, color calc(infinity * 1s) step-end;
|
|
289
|
+
}
|