@celestia-island/hikari 0.54.10 → 0.55.1
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/DemoApp.tsx +5 -3
- package/src/animation/registerAnimations.ts +2 -2
- package/src/components/HkDrawer.tsx +13 -5
- package/src/components/HkInput.password.test.tsx +821 -0
- package/src/components/HkInput.scss +4 -33
- package/src/components/HkInput.tsx +91 -31
- package/src/components/HkModal.contenthold.test.tsx +156 -0
- package/src/components/HkModal.leavepin.test.tsx +169 -0
- package/src/components/HkModal.tsx +61 -11
- package/src/components/{HkPasswordInput.scss → HkPasswordSurface.scss} +93 -57
- package/src/components/HkPasswordSurface.styles.test.ts +68 -0
- package/src/components/HkPasswordSurface.tsx +1006 -0
- package/src/components/HkSignInCard.tsx +6 -6
- package/src/components/HkTooltip.test.tsx +67 -0
- package/src/components/HkTooltip.tsx +54 -1
- package/src/composables/useSizeMorph.test.ts +75 -3
- package/src/composables/useSizeMorph.ts +51 -4
- package/src/composables/useSurfaceContentHold.ts +58 -0
- package/src/composables/useSurfaceMachine.test.ts +50 -0
- package/src/composables/useSurfaceMachine.ts +35 -1
- package/src/i18n/flatKeyParity.test.ts +97 -0
- package/src/i18n/locales/ar/components.json +7 -1
- package/src/i18n/locales/de/components.json +7 -1
- package/src/i18n/locales/en/components.json +2 -1
- package/src/i18n/locales/es/components.json +7 -1
- package/src/i18n/locales/fr/components.json +7 -1
- package/src/i18n/locales/ja/components.json +7 -1
- package/src/i18n/locales/ko/components.json +7 -1
- package/src/i18n/locales/pt/components.json +7 -1
- package/src/i18n/locales/ru/components.json +7 -1
- package/src/i18n/locales/zh-Hans/components.json +7 -6
- package/src/i18n/locales/zh-Hant/components.json +7 -6
- package/src/index.ts +1 -3
- package/src/runtime/credentialAutofill.test.ts +4 -4
- package/src/utils/password.ts +9 -0
- package/src/components/HkPasswordInput.test.ts +0 -329
- package/src/components/HkPasswordInput.tsx +0 -820
package/package.json
CHANGED
package/src/DemoApp.tsx
CHANGED
|
@@ -8,7 +8,7 @@ import { utf8ToBase64 } from "./utils/base64";
|
|
|
8
8
|
import {
|
|
9
9
|
HButton, HIconButton, HIconButtonGroup, HTooltip, HBadge, HTag, HIcon, HSpinner,
|
|
10
10
|
HProgressBar, HProgressRing, HGaugeRing,
|
|
11
|
-
HInput, HSearchInput, HNumberInput,
|
|
11
|
+
HInput, HSearchInput, HNumberInput, HTextarea,
|
|
12
12
|
HFileField,
|
|
13
13
|
HFilePickerField,
|
|
14
14
|
type PickedFile, type RemoteFsAdapter,
|
|
@@ -360,13 +360,15 @@ export default defineComponent({
|
|
|
360
360
|
</section>
|
|
361
361
|
|
|
362
362
|
<section>
|
|
363
|
-
<h2>HInput /
|
|
363
|
+
<h2>HInput (text / password) / HSearchInput / HNumberInput / HTextarea</h2>
|
|
364
364
|
<div class="form-grid">
|
|
365
365
|
<HInput modelValue={form.value.text} onUpdate:modelValue={(v: string) => (form.value.text = v)} placeholder="Text input" />
|
|
366
366
|
<HInput modelValue={form.value.text} onUpdate:modelValue={(v: string) => (form.value.text = v)} placeholder="Disabled" disabled />
|
|
367
367
|
<HSearchInput modelValue={form.value.search} onUpdate:modelValue={(v: string | number) => (form.value.search = String(v))} placeholder="Search..." />
|
|
368
368
|
<HNumberInput modelValue={form.value.number} onUpdate:modelValue={(v: number) => (form.value.number = v)} placeholder="Number" />
|
|
369
|
-
<
|
|
369
|
+
<HInput variant="password" modelValue={form.value.password} onUpdate:modelValue={(v: string) => (form.value.password = v)} placeholder="Password (hold the eye)" />
|
|
370
|
+
<HInput variant="password" passwordTrailing="strength" modelValue={form.value.password} onUpdate:modelValue={(v: string) => (form.value.password = v)} placeholder="Password (strength light)" />
|
|
371
|
+
<HInput variant="password" passwordTrailing="none" modelValue={form.value.password} onUpdate:modelValue={(v: string) => (form.value.password = v)} placeholder="Password (no affordance)" />
|
|
370
372
|
<HTextarea modelValue={form.value.textarea} onUpdate:modelValue={(v: string) => (form.value.textarea = v)} placeholder="Textarea" rows={3} />
|
|
371
373
|
</div>
|
|
372
374
|
{anyForm.value ? <p class="result">Form: {anyForm.value}</p> : null}
|
|
@@ -82,9 +82,9 @@ registerCssAnimation("hk-skeleton-shimmer", { infinite: true });
|
|
|
82
82
|
registerCssAnimation("hk-image-preview-shimmer", { infinite: true });
|
|
83
83
|
// components/HkProgressBar.scss — indeterminate bar sweep (loops forever).
|
|
84
84
|
registerCssAnimation("hk-progress-indeterminate", { infinite: true });
|
|
85
|
-
// components/
|
|
85
|
+
// components/HkPasswordSurface.scss — caps-lock warning flash (plays once).
|
|
86
86
|
registerCssAnimation("hk-pwd-flash");
|
|
87
|
-
// components/
|
|
87
|
+
// components/HkPasswordSurface.scss — breathing hint glow (loops forever).
|
|
88
88
|
registerCssAnimation("hk-pwd-breathe", { infinite: true });
|
|
89
89
|
// components/HkPickerPane.scss — date/time picker view drill forward
|
|
90
90
|
// (plays once, shared by HkDatePicker and HkDateTimePicker).
|
|
@@ -19,6 +19,7 @@ import { createBackGuard } from "../runtime/backStack";
|
|
|
19
19
|
import { attachOverlayScrollbars, type OverlayScrollbarHandle } from "../composables/useOverlayScrollbar";
|
|
20
20
|
import { useSurfaceTransition } from "../composables/useSurfaceTransition";
|
|
21
21
|
import { useSurfaceMachine } from "../composables/useSurfaceMachine";
|
|
22
|
+
import { useSurfaceContentHold } from "../composables/useSurfaceContentHold";
|
|
22
23
|
import HIconButton from "./HkIconButton";
|
|
23
24
|
import HIcon from "./HkIcon";
|
|
24
25
|
import "./window-close.scss";
|
|
@@ -269,6 +270,8 @@ export default defineComponent({
|
|
|
269
270
|
cleanup();
|
|
270
271
|
});
|
|
271
272
|
|
|
273
|
+
const contentHold = useSurfaceContentHold(machine.phase);
|
|
274
|
+
|
|
272
275
|
return () => {
|
|
273
276
|
if (!machine.mounted.value) return null;
|
|
274
277
|
const panelPrefix = `hk-drawer-${props.side}`;
|
|
@@ -295,7 +298,11 @@ export default defineComponent({
|
|
|
295
298
|
else if (e.key === "Tab" && panelRef.value) trapFocus(panelRef.value, e);
|
|
296
299
|
}}
|
|
297
300
|
>
|
|
298
|
-
{
|
|
301
|
+
{/* Same close-fold content hold as HkModal: the sheet's
|
|
302
|
+
slide-away plays over the last live content even when
|
|
303
|
+
the consumer tears its state down on close. */}
|
|
304
|
+
{contentHold.hold(() => [
|
|
305
|
+
props.title || slots.header ? (
|
|
299
306
|
<div class="hk-drawer-header">
|
|
300
307
|
{slots.header ? (
|
|
301
308
|
slots.header()
|
|
@@ -314,13 +321,14 @@ export default defineComponent({
|
|
|
314
321
|
</HIconButton>
|
|
315
322
|
) : null}
|
|
316
323
|
</div>
|
|
317
|
-
) : null
|
|
324
|
+
) : null,
|
|
318
325
|
<div ref={bodyWrapRef} class="hk-drawer-body-wrap">
|
|
319
326
|
<div ref={bodyRef} class="hk-drawer-body">{slots.default?.()}</div>
|
|
320
|
-
</div
|
|
321
|
-
|
|
327
|
+
</div>,
|
|
328
|
+
slots.footer ? (
|
|
322
329
|
<div class="hk-drawer-footer">{slots.footer()}</div>
|
|
323
|
-
) : null
|
|
330
|
+
) : null,
|
|
331
|
+
])}
|
|
324
332
|
</div>
|
|
325
333
|
</Teleport>
|
|
326
334
|
);
|