@jcsoftdev/ui 0.3.0 → 0.5.0
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/CHANGELOG.md +200 -1
- package/README.md +56 -3
- package/bin/ui-theme.mjs +13 -2
- package/dist/atoms/button/button.d.ts +8 -1
- package/dist/atoms/button/button.js +10 -3
- package/dist/atoms/checkbox/checkbox.js +3 -1
- package/dist/atoms/chip/chip.d.ts +11 -3
- package/dist/atoms/chip/chip.js +8 -1
- package/dist/atoms/chip/index.d.ts +1 -1
- package/dist/atoms/chip/index.js +2 -0
- package/dist/atoms/divider/divider.d.ts +15 -0
- package/dist/atoms/divider/divider.js +27 -0
- package/dist/atoms/divider/index.d.ts +1 -0
- package/dist/atoms/divider/index.js +1 -0
- package/dist/atoms/due-chip/due-chip.d.ts +31 -0
- package/dist/atoms/due-chip/due-chip.js +41 -0
- package/dist/atoms/due-chip/index.d.ts +2 -0
- package/dist/atoms/due-chip/index.js +6 -0
- package/dist/atoms/due-chip/model.d.ts +25 -0
- package/dist/atoms/due-chip/model.js +44 -0
- package/dist/atoms/icon-button/icon-button.d.ts +22 -0
- package/dist/atoms/icon-button/icon-button.js +38 -0
- package/dist/atoms/icon-button/index.d.ts +1 -0
- package/dist/atoms/icon-button/index.js +8 -0
- package/dist/atoms/index.d.ts +6 -0
- package/dist/atoms/index.js +6 -0
- package/dist/atoms/internal/hit-area.d.ts +6 -0
- package/dist/atoms/internal/hit-area.js +4 -0
- package/dist/atoms/kbd/index.d.ts +1 -0
- package/dist/atoms/kbd/index.js +4 -0
- package/dist/atoms/kbd/kbd.d.ts +7 -0
- package/dist/atoms/kbd/kbd.js +17 -0
- package/dist/atoms/radio-group/radio-group.js +6 -2
- package/dist/atoms/seal/index.d.ts +1 -0
- package/dist/atoms/seal/index.js +4 -0
- package/dist/atoms/seal/seal.d.ts +30 -0
- package/dist/atoms/seal/seal.js +71 -0
- package/dist/atoms/spinner/index.d.ts +1 -0
- package/dist/atoms/spinner/index.js +5 -0
- package/dist/atoms/spinner/spinner.d.ts +19 -0
- package/dist/atoms/spinner/spinner.js +31 -0
- package/dist/atoms/switch/switch.js +3 -1
- package/dist/auth/auth-illustration/auth-illustration.d.ts +35 -0
- package/dist/auth/auth-illustration/auth-illustration.js +72 -0
- package/dist/auth/auth-illustration/index.d.ts +3 -0
- package/dist/auth/auth-illustration/index.js +11 -0
- package/dist/auth/auth-illustration/look.d.ts +30 -0
- package/dist/auth/auth-illustration/look.js +0 -0
- package/dist/auth/auth-illustration/model.d.ts +133 -0
- package/dist/auth/auth-illustration/model.js +202 -0
- package/dist/auth/auth-illustration/use-art-pointer.d.ts +9 -0
- package/dist/auth/auth-illustration/use-art-pointer.js +69 -0
- package/dist/auth/auth-layout/auth-layout.d.ts +80 -0
- package/dist/auth/auth-layout/auth-layout.js +190 -0
- package/dist/auth/auth-layout/index.d.ts +1 -0
- package/dist/auth/auth-layout/index.js +1 -0
- package/dist/auth/character/character.d.ts +12 -0
- package/dist/auth/character/character.js +333 -0
- package/dist/auth/character/index.d.ts +1 -0
- package/dist/auth/character/index.js +1 -0
- package/dist/auth/index.d.ts +4 -0
- package/dist/auth/index.js +4 -0
- package/dist/auth/internal/auth-context.d.ts +17 -0
- package/dist/auth/internal/auth-context.js +10 -0
- package/dist/auth/internal/auth-styles.d.ts +1 -0
- package/dist/auth/internal/auth-styles.js +29 -0
- package/dist/auth/internal/portal-glyphs.d.ts +6 -0
- package/dist/auth/internal/portal-glyphs.js +39 -0
- package/dist/auth/login-form/context.d.ts +51 -0
- package/dist/auth/login-form/context.js +12 -0
- package/dist/auth/login-form/index.d.ts +2 -0
- package/dist/auth/login-form/index.js +23 -0
- package/dist/auth/login-form/login-form.d.ts +66 -0
- package/dist/auth/login-form/login-form.js +233 -0
- package/dist/auth/login-form/parts.d.ts +71 -0
- package/dist/auth/login-form/parts.js +371 -0
- package/dist/auth/looks/auth-illustration-any.d.ts +16 -0
- package/dist/auth/looks/auth-illustration-any.js +24 -0
- package/dist/auth/looks/index.d.ts +1 -0
- package/dist/auth/looks/index.js +1 -0
- package/dist/auth/mosaic/index.d.ts +1 -0
- package/dist/auth/mosaic/index.js +1 -0
- package/dist/auth/mosaic/mosaic.d.ts +11 -0
- package/dist/auth/mosaic/mosaic.js +195 -0
- package/dist/auth/slabs/index.d.ts +1 -0
- package/dist/auth/slabs/index.js +1 -0
- package/dist/auth/slabs/slabs.d.ts +13 -0
- package/dist/auth/slabs/slabs.js +136 -0
- package/dist/auth/stack/index.d.ts +1 -0
- package/dist/auth/stack/index.js +1 -0
- package/dist/auth/stack/stack.d.ts +6 -0
- package/dist/auth/stack/stack.js +222 -0
- package/dist/auth/statement/index.d.ts +1 -0
- package/dist/auth/statement/index.js +1 -0
- package/dist/auth/statement/statement.d.ts +13 -0
- package/dist/auth/statement/statement.js +99 -0
- package/dist/calendar/date-calendar/date-calendar.d.ts +32 -0
- package/dist/calendar/date-calendar/date-calendar.js +189 -0
- package/dist/calendar/date-calendar/index.d.ts +1 -0
- package/dist/calendar/date-calendar/index.js +6 -0
- package/dist/calendar/index.d.ts +1 -0
- package/dist/calendar/index.js +1 -0
- package/dist/calendar/internal/date-utils.d.ts +26 -0
- package/dist/calendar/internal/date-utils.js +95 -1
- package/dist/containers/aside/aside.d.ts +14 -0
- package/dist/containers/aside/aside.js +25 -0
- package/dist/containers/aside/index.d.ts +1 -0
- package/dist/containers/aside/index.js +5 -0
- package/dist/containers/banner/banner.d.ts +4 -1
- package/dist/containers/banner/banner.js +9 -1
- package/dist/containers/description-list/description-list.d.ts +29 -6
- package/dist/containers/description-list/description-list.js +47 -6
- package/dist/containers/feed/feed.d.ts +23 -0
- package/dist/containers/feed/feed.js +77 -0
- package/dist/containers/feed/index.d.ts +2 -0
- package/dist/containers/feed/index.js +10 -0
- package/dist/containers/feed/model.d.ts +19 -0
- package/dist/containers/feed/model.js +38 -0
- package/dist/containers/index.d.ts +6 -0
- package/dist/containers/index.js +6 -0
- package/dist/containers/kpi/kpi.d.ts +50 -8
- package/dist/containers/kpi/kpi.js +91 -39
- package/dist/containers/list-detail/index.d.ts +1 -0
- package/dist/containers/list-detail/index.js +20 -0
- package/dist/containers/list-detail/list-detail.d.ts +55 -0
- package/dist/containers/list-detail/list-detail.js +221 -0
- package/dist/containers/note/index.d.ts +1 -0
- package/dist/containers/note/index.js +4 -0
- package/dist/containers/note/note.d.ts +13 -0
- package/dist/containers/note/note.js +27 -0
- package/dist/containers/section/index.d.ts +1 -0
- package/dist/containers/section/index.js +6 -0
- package/dist/containers/section/section.d.ts +68 -0
- package/dist/containers/section/section.js +198 -0
- package/dist/containers/shortcuts/index.d.ts +1 -0
- package/dist/containers/shortcuts/index.js +8 -0
- package/dist/containers/shortcuts/shortcuts.d.ts +18 -0
- package/dist/containers/shortcuts/shortcuts.js +50 -0
- package/dist/containers/table/selection.d.ts +9 -0
- package/dist/containers/table/selection.js +20 -0
- package/dist/containers/table/table.d.ts +66 -4
- package/dist/containers/table/table.js +128 -7
- package/dist/containers/timeline/index.d.ts +1 -1
- package/dist/containers/timeline/index.js +4 -2
- package/dist/containers/timeline/timeline.d.ts +32 -5
- package/dist/containers/timeline/timeline.js +154 -90
- package/dist/forms/chip-group/chip-group.d.ts +54 -0
- package/dist/forms/chip-group/chip-group.js +114 -0
- package/dist/forms/chip-group/index.d.ts +1 -0
- package/dist/forms/chip-group/index.js +6 -0
- package/dist/forms/combobox/combobox.d.ts +60 -0
- package/dist/forms/combobox/combobox.js +281 -0
- package/dist/forms/combobox/index.d.ts +1 -0
- package/dist/forms/combobox/index.js +6 -0
- package/dist/forms/date-picker/date-picker.d.ts +40 -0
- package/dist/forms/date-picker/date-picker.js +183 -0
- package/dist/forms/date-picker/date-time-picker.d.ts +43 -0
- package/dist/forms/date-picker/date-time-picker.js +121 -0
- package/dist/forms/date-picker/index.d.ts +2 -0
- package/dist/forms/date-picker/index.js +10 -0
- package/dist/forms/date-picker/model.d.ts +35 -0
- package/dist/forms/date-picker/model.js +83 -0
- package/dist/forms/dropzone/dropzone.d.ts +30 -2
- package/dist/forms/dropzone/dropzone.js +153 -23
- package/dist/forms/field/field.d.ts +16 -10
- package/dist/forms/field/field.js +41 -5
- package/dist/forms/index.d.ts +5 -0
- package/dist/forms/index.js +5 -0
- package/dist/forms/input/index.d.ts +1 -1
- package/dist/forms/input/index.js +4 -1
- package/dist/forms/input/input.d.ts +21 -5
- package/dist/forms/input/input.js +75 -9
- package/dist/forms/input-icon/input-icon.d.ts +1 -1
- package/dist/forms/internal/listbox-items.d.ts +18 -0
- package/dist/forms/internal/listbox-items.js +88 -0
- package/dist/forms/internal/listbox.d.ts +44 -0
- package/dist/forms/internal/listbox.js +74 -0
- package/dist/forms/number-stepper/model.d.ts +16 -0
- package/dist/forms/number-stepper/model.js +23 -0
- package/dist/forms/number-stepper/number-stepper.d.ts +36 -6
- package/dist/forms/number-stepper/number-stepper.js +86 -37
- package/dist/forms/password-input/index.d.ts +1 -0
- package/dist/forms/password-input/index.js +1 -0
- package/dist/forms/password-input/password-input.d.ts +16 -0
- package/dist/forms/password-input/password-input.js +45 -0
- package/dist/forms/select-menu/index.d.ts +1 -0
- package/dist/forms/select-menu/index.js +6 -0
- package/dist/forms/select-menu/select-menu.d.ts +35 -0
- package/dist/forms/select-menu/select-menu.js +230 -0
- package/dist/i18n/strings.d.ts +153 -0
- package/dist/i18n/strings.js +86 -2
- package/dist/i18n/ui-strings-provider.d.ts +1 -1
- package/dist/i18n/ui-strings-provider.js +6 -2
- package/dist/icons/eye.d.ts +2 -0
- package/dist/icons/eye.js +11 -0
- package/dist/icons/graduation-cap.d.ts +2 -0
- package/dist/icons/graduation-cap.js +12 -0
- package/dist/icons/house.d.ts +2 -0
- package/dist/icons/house.js +11 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.js +8 -0
- package/dist/icons/mail.d.ts +2 -0
- package/dist/icons/mail.js +11 -0
- package/dist/navigation/index.d.ts +1 -0
- package/dist/navigation/index.js +1 -0
- package/dist/navigation/stepper/index.d.ts +1 -1
- package/dist/navigation/stepper/index.js +3 -1
- package/dist/navigation/stepper/stepper.d.ts +8 -0
- package/dist/navigation/stepper/stepper.js +68 -45
- package/dist/navigation/tabs/index.d.ts +1 -0
- package/dist/navigation/tabs/index.js +6 -0
- package/dist/navigation/tabs/tabs-nav.d.ts +37 -0
- package/dist/navigation/tabs/tabs-nav.js +57 -0
- package/dist/navigation/wizard/index.d.ts +1 -0
- package/dist/navigation/wizard/index.js +6 -0
- package/dist/navigation/wizard/model.d.ts +33 -0
- package/dist/navigation/wizard/model.js +34 -0
- package/dist/navigation/wizard/wizard.d.ts +45 -0
- package/dist/navigation/wizard/wizard.js +169 -0
- package/dist/overlays/alert-dialog/alert-dialog.d.ts +103 -0
- package/dist/overlays/alert-dialog/alert-dialog.js +342 -0
- package/dist/overlays/alert-dialog/index.d.ts +1 -0
- package/dist/overlays/alert-dialog/index.js +26 -0
- package/dist/overlays/dropdown-menu/dropdown-menu.d.ts +17 -1
- package/dist/overlays/dropdown-menu/dropdown-menu.js +12 -4
- package/dist/overlays/dropdown-menu/index.d.ts +1 -1
- package/dist/overlays/dropdown-menu/index.js +8 -2
- package/dist/overlays/index.d.ts +2 -0
- package/dist/overlays/index.js +2 -0
- package/dist/overlays/testing/index.d.ts +5 -0
- package/dist/overlays/testing/index.js +4 -0
- package/dist/overlays/toaster/index.d.ts +2 -1
- package/dist/overlays/toaster/index.js +4 -2
- package/dist/overlays/toaster/toast-store.d.ts +6 -2
- package/dist/overlays/toaster/toast.d.ts +3 -0
- package/dist/overlays/toaster/toast.js +3 -0
- package/dist/overlays/toaster/toaster.d.ts +3 -0
- package/dist/overlays/toaster/toaster.js +36 -3
- package/dist/overlays/tooltip/index.d.ts +1 -0
- package/dist/overlays/tooltip/index.js +4 -0
- package/dist/overlays/tooltip/model.d.ts +10 -0
- package/dist/overlays/tooltip/model.js +13 -0
- package/dist/overlays/tooltip/tooltip.d.ts +41 -0
- package/dist/overlays/tooltip/tooltip.js +116 -0
- package/dist/primitives/use-dismissable-layer.js +1 -1
- package/dist/states/error-state/error-state.d.ts +6 -1
- package/dist/states/error-state/error-state.js +13 -9
- package/dist/states/skeleton/skeleton.d.ts +8 -2
- package/dist/states/skeleton/skeleton.js +44 -2
- package/icons/svg/eye.svg +4 -0
- package/icons/svg/graduation-cap.svg +5 -0
- package/icons/svg/house.svg +4 -0
- package/icons/svg/mail.svg +4 -0
- package/package.json +2 -2
- package/scripts/build-theme.mjs +12 -1
- package/src/atoms/button/button.tsx +25 -3
- package/src/atoms/checkbox/checkbox.tsx +3 -1
- package/src/atoms/chip/chip.tsx +18 -3
- package/src/atoms/chip/index.ts +2 -0
- package/src/atoms/divider/divider.tsx +40 -0
- package/src/atoms/divider/index.ts +1 -0
- package/src/atoms/due-chip/due-chip.tsx +75 -0
- package/src/atoms/due-chip/index.ts +2 -0
- package/src/atoms/due-chip/model.ts +67 -0
- package/src/atoms/icon-button/icon-button.tsx +58 -0
- package/src/atoms/icon-button/index.ts +6 -0
- package/src/atoms/index.ts +6 -0
- package/src/atoms/internal/hit-area.ts +7 -0
- package/src/atoms/kbd/index.ts +1 -0
- package/src/atoms/kbd/kbd.tsx +20 -0
- package/src/atoms/radio-group/radio-group.tsx +8 -2
- package/src/atoms/seal/index.ts +1 -0
- package/src/atoms/seal/seal.tsx +107 -0
- package/src/atoms/spinner/index.ts +1 -0
- package/src/atoms/spinner/spinner.tsx +49 -0
- package/src/atoms/switch/switch.tsx +3 -1
- package/src/auth/auth-illustration/auth-illustration.tsx +100 -0
- package/src/auth/auth-illustration/index.ts +8 -0
- package/src/auth/auth-illustration/look.ts +32 -0
- package/src/auth/auth-illustration/model.ts +330 -0
- package/src/auth/auth-illustration/use-art-pointer.ts +78 -0
- package/src/auth/auth-layout/auth-layout.tsx +282 -0
- package/src/auth/auth-layout/index.ts +1 -0
- package/src/auth/character/character.tsx +346 -0
- package/src/auth/character/index.ts +1 -0
- package/src/auth/index.ts +4 -0
- package/src/auth/internal/auth-context.ts +26 -0
- package/src/auth/internal/auth-styles.tsx +39 -0
- package/src/auth/internal/portal-glyphs.tsx +32 -0
- package/src/auth/login-form/context.ts +78 -0
- package/src/auth/login-form/index.ts +21 -0
- package/src/auth/login-form/login-form.tsx +330 -0
- package/src/auth/login-form/parts.tsx +457 -0
- package/src/auth/looks/auth-illustration-any.tsx +38 -0
- package/src/auth/looks/index.ts +1 -0
- package/src/auth/mosaic/index.ts +1 -0
- package/src/auth/mosaic/mosaic.tsx +255 -0
- package/src/auth/slabs/index.ts +1 -0
- package/src/auth/slabs/slabs.tsx +181 -0
- package/src/auth/stack/index.ts +1 -0
- package/src/auth/stack/stack.tsx +267 -0
- package/src/auth/statement/index.ts +1 -0
- package/src/auth/statement/statement.tsx +122 -0
- package/src/calendar/date-calendar/date-calendar.tsx +230 -0
- package/src/calendar/date-calendar/index.ts +5 -0
- package/src/calendar/index.ts +1 -0
- package/src/calendar/internal/date-utils.ts +115 -0
- package/src/containers/aside/aside.tsx +40 -0
- package/src/containers/aside/index.ts +1 -0
- package/src/containers/banner/banner.tsx +18 -1
- package/src/containers/description-list/description-list.tsx +85 -9
- package/src/containers/feed/feed.tsx +99 -0
- package/src/containers/feed/index.ts +8 -0
- package/src/containers/feed/model.ts +54 -0
- package/src/containers/index.ts +6 -0
- package/src/containers/kpi/kpi.tsx +161 -62
- package/src/containers/list-detail/index.ts +15 -0
- package/src/containers/list-detail/list-detail.tsx +293 -0
- package/src/containers/note/index.ts +1 -0
- package/src/containers/note/note.tsx +38 -0
- package/src/containers/section/index.ts +11 -0
- package/src/containers/section/section.tsx +281 -0
- package/src/containers/shortcuts/index.ts +6 -0
- package/src/containers/shortcuts/shortcuts.tsx +92 -0
- package/src/containers/table/selection.ts +26 -0
- package/src/containers/table/table.tsx +215 -13
- package/src/containers/timeline/index.ts +3 -0
- package/src/containers/timeline/timeline.tsx +204 -93
- package/src/forms/chip-group/chip-group.tsx +184 -0
- package/src/forms/chip-group/index.ts +8 -0
- package/src/forms/combobox/combobox.tsx +359 -0
- package/src/forms/combobox/index.ts +7 -0
- package/src/forms/date-picker/date-picker.tsx +239 -0
- package/src/forms/date-picker/date-time-picker.tsx +178 -0
- package/src/forms/date-picker/index.ts +10 -0
- package/src/forms/date-picker/model.ts +108 -0
- package/src/forms/dropzone/dropzone.tsx +217 -35
- package/src/forms/field/field.tsx +72 -7
- package/src/forms/index.ts +5 -0
- package/src/forms/input/index.ts +8 -1
- package/src/forms/input/input.tsx +99 -12
- package/src/forms/input-icon/input-icon.tsx +1 -1
- package/src/forms/internal/listbox-items.tsx +103 -0
- package/src/forms/internal/listbox.ts +124 -0
- package/src/forms/number-stepper/model.ts +35 -0
- package/src/forms/number-stepper/number-stepper.tsx +132 -42
- package/src/forms/password-input/index.ts +1 -0
- package/src/forms/password-input/password-input.tsx +57 -0
- package/src/forms/select-menu/index.ts +7 -0
- package/src/forms/select-menu/select-menu.tsx +280 -0
- package/src/i18n/strings.ts +153 -0
- package/src/i18n/ui-strings-provider.tsx +15 -4
- package/src/icons/eye.tsx +12 -0
- package/src/icons/graduation-cap.tsx +13 -0
- package/src/icons/house.tsx +12 -0
- package/src/icons/index.ts +4 -0
- package/src/icons/mail.tsx +12 -0
- package/src/navigation/index.ts +1 -0
- package/src/navigation/stepper/index.ts +7 -1
- package/src/navigation/stepper/stepper.tsx +41 -5
- package/src/navigation/tabs/index.ts +7 -0
- package/src/navigation/tabs/tabs-nav.tsx +131 -0
- package/src/navigation/wizard/index.ts +7 -0
- package/src/navigation/wizard/model.ts +61 -0
- package/src/navigation/wizard/wizard.tsx +222 -0
- package/src/overlays/alert-dialog/alert-dialog.tsx +486 -0
- package/src/overlays/alert-dialog/index.ts +19 -0
- package/src/overlays/dropdown-menu/dropdown-menu.tsx +29 -4
- package/src/overlays/dropdown-menu/index.ts +3 -0
- package/src/overlays/index.ts +2 -0
- package/src/overlays/testing/index.ts +5 -0
- package/src/overlays/toaster/index.ts +2 -0
- package/src/overlays/toaster/toast-store.ts +6 -2
- package/src/overlays/toaster/toast.ts +6 -0
- package/src/overlays/toaster/toaster.tsx +44 -2
- package/src/overlays/tooltip/index.ts +1 -0
- package/src/overlays/tooltip/model.ts +18 -0
- package/src/overlays/tooltip/tooltip.tsx +166 -0
- package/src/primitives/use-dismissable-layer.ts +7 -2
- package/src/states/error-state/error-state.tsx +19 -8
- package/src/states/skeleton/skeleton.tsx +68 -2
- package/styles/tailwind.css +33 -30
- package/styles/theme.css +33 -30
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import {
|
|
4
|
+
AuthIllustration
|
|
5
|
+
} from "../auth-illustration/auth-illustration.js";
|
|
6
|
+
import { Character } from "../character/character.js";
|
|
7
|
+
import { Mosaic } from "../mosaic/mosaic.js";
|
|
8
|
+
import { Slabs } from "../slabs/slabs.js";
|
|
9
|
+
import { Stack } from "../stack/stack.js";
|
|
10
|
+
import { Statement } from "../statement/statement.js";
|
|
11
|
+
const AUTH_LOOKS = {
|
|
12
|
+
slabs: Slabs,
|
|
13
|
+
stack: Stack,
|
|
14
|
+
mosaic: Mosaic,
|
|
15
|
+
character: Character,
|
|
16
|
+
statement: Statement
|
|
17
|
+
};
|
|
18
|
+
function AuthIllustrationAny({ variant = "slabs", ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx(AuthIllustration, { ...props, look: AUTH_LOOKS[variant] });
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
AUTH_LOOKS,
|
|
23
|
+
AuthIllustrationAny
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./auth-illustration-any.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./auth-illustration-any.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./mosaic.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./mosaic.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AuthVariantProps } from "../auth-illustration/look.js";
|
|
2
|
+
/**
|
|
3
|
+
* A living floor of isometric tiles on a platform. The tiles light diagonally as the form fills,
|
|
4
|
+
* glint on each keystroke and glow under the pointer, and a soft sheen crosses the floor now and
|
|
5
|
+
* then; an error sweeps a red band across it and success ripples out from the centre. Three tiles carry the portal glyphs and the active one
|
|
6
|
+
* stands raised. Its container picks a 4, 5 or 6 tile wide floor.
|
|
7
|
+
*/
|
|
8
|
+
export declare function Mosaic({ state, progress, activeIndex, uid }: AuthVariantProps): import("react").JSX.Element;
|
|
9
|
+
export declare namespace Mosaic {
|
|
10
|
+
var variant: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import {
|
|
4
|
+
isoBox,
|
|
5
|
+
isoPoint,
|
|
6
|
+
keystroke,
|
|
7
|
+
MOSAIC_GLYPH_TILES,
|
|
8
|
+
MOSAIC_SIZES,
|
|
9
|
+
mosaicFilled,
|
|
10
|
+
mosaicGlint,
|
|
11
|
+
mosaicTiles
|
|
12
|
+
} from "../auth-illustration/model.js";
|
|
13
|
+
import { PORTAL_GLYPHS } from "../internal/portal-glyphs.js";
|
|
14
|
+
const FLOOR = 260;
|
|
15
|
+
const MARGIN = 12;
|
|
16
|
+
const BASE_H = 26;
|
|
17
|
+
const TILE_H = 14;
|
|
18
|
+
const GAP = 3;
|
|
19
|
+
const VIEW = { x: -270, y: -215, w: 540, h: 400 };
|
|
20
|
+
const CENTER_Y = VIEW.y + VIEW.h / 2;
|
|
21
|
+
const PLATFORM = isoBox(FLOOR + MARGIN * 2, FLOOR + MARGIN * 2, BASE_H);
|
|
22
|
+
const SHADOW = isoBox(FLOOR + MARGIN * 2 + 30, FLOOR + MARGIN * 2 + 30, 0).top;
|
|
23
|
+
const CLIP = (() => {
|
|
24
|
+
const half = FLOOR / 2 + MARGIN;
|
|
25
|
+
const left = isoPoint(-half, half, BASE_H);
|
|
26
|
+
const front = isoPoint(half, half, BASE_H);
|
|
27
|
+
const right = isoPoint(half, -half, BASE_H);
|
|
28
|
+
return `M${left.x} ${left.y}L${front.x} ${front.y}L${right.x} ${right.y}L${right.x} ${VIEW.y}L${left.x} ${VIEW.y}Z`;
|
|
29
|
+
})();
|
|
30
|
+
const FLOOR_TOP = isoBox(FLOOR + MARGIN * 2, FLOOR + MARGIN * 2, BASE_H + 10).top;
|
|
31
|
+
const BAND = { x: -280, y: -251, w: 560, h: 72 };
|
|
32
|
+
const BANDS = ["sheen", "alarm"];
|
|
33
|
+
const GRIDS = MOSAIC_SIZES.map((n) => {
|
|
34
|
+
const size = FLOOR / n;
|
|
35
|
+
const face = size - GAP;
|
|
36
|
+
const shape = isoBox(face, face, TILE_H);
|
|
37
|
+
const inset = face * 0.07;
|
|
38
|
+
const corner = isoPoint(-face / 2 + inset, -face / 2 + inset, TILE_H);
|
|
39
|
+
const k = (face - inset * 2) / 100;
|
|
40
|
+
const glyphTransform = `translate(${corner.x} ${corner.y}) matrix(${0.866 * k} ${0.5 * k} ${-0.866 * k} ${0.5 * k} 0 0)`;
|
|
41
|
+
const glyphs = MOSAIC_GLYPH_TILES[n];
|
|
42
|
+
const tiles = mosaicTiles(n).map((tile) => {
|
|
43
|
+
const at = isoPoint(
|
|
44
|
+
-FLOOR / 2 + (tile.col + 0.5) * size,
|
|
45
|
+
-FLOOR / 2 + (tile.row + 0.5) * size,
|
|
46
|
+
BASE_H - TILE_H
|
|
47
|
+
);
|
|
48
|
+
const glyph = glyphs.findIndex(([row, col]) => row === tile.row && col === tile.col);
|
|
49
|
+
const top = isoPoint(0, 0, TILE_H);
|
|
50
|
+
return {
|
|
51
|
+
...tile,
|
|
52
|
+
at,
|
|
53
|
+
glyph,
|
|
54
|
+
tx: Math.round((at.x + top.x) / (VIEW.w / 2) * 1e3) / 1e3,
|
|
55
|
+
ty: Math.round((at.y + top.y - CENTER_Y) / (VIEW.h / 2) * 1e3) / 1e3
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
return { n, shape, glyphTransform, tiles };
|
|
59
|
+
});
|
|
60
|
+
const ON = '.ui-msc-grid[data-n="';
|
|
61
|
+
const SHOW = "display:inline;--b:ui-msc-bob;--r:ui-msc-ripple;--g0:ui-msc-glint-0;--g1:ui-msc-glint-1";
|
|
62
|
+
const CSS = `
|
|
63
|
+
@keyframes ui-msc-glint-0{35%{transform:translateY(-9px)}}
|
|
64
|
+
@keyframes ui-msc-glint-1{35%{transform:translateY(-9px)}}
|
|
65
|
+
@keyframes ui-msc-sheen{58%{transform:none}86%,to{transform:translateY(375px)}}
|
|
66
|
+
@keyframes ui-msc-sweep{to{transform:translateY(375px)}}
|
|
67
|
+
@keyframes ui-msc-ripple{40%{transform:translateY(-12px)}75%{transform:translateY(2px)}}
|
|
68
|
+
@keyframes ui-msc-bob{50%{transform:translateY(-5px)}}
|
|
69
|
+
@keyframes ui-msc-rise{from{opacity:0;transform:translateY(40px)}}
|
|
70
|
+
.ui-msc{scale:1.12;transform-origin:50% 60%;--msc-base:color-mix(in srgb,var(--ink) 12%,var(--surface));--msc-tile:var(--surface);--msc-lit:var(--accent);--msc-active:color-mix(in srgb,var(--ink) 86%,var(--surface));--msc-glow:color-mix(in srgb,var(--accent-2) 70%,white);--msc-grout:color-mix(in srgb,var(--ink) 22%,transparent);--glyph-line:var(--accent)}
|
|
71
|
+
.ui-auth-art[data-panel=solid] .ui-msc{--msc-base:var(--ua-tint);--msc-tile:color-mix(in srgb,white 55%,var(--auth-art-bg));--msc-lit:var(--ua-mid);--msc-active:var(--auth-art-ink);--msc-glow:white;--msc-grout:color-mix(in srgb,var(--auth-art-ink) 28%,transparent);--glyph-line:var(--auth-art-ink)}
|
|
72
|
+
.ui-msc-grid{display:none}
|
|
73
|
+
@container art (width<24rem){${ON}4"]{${SHOW}}}
|
|
74
|
+
@container art (24rem<=width<34rem){.ui-msc{scale:.88}${ON}5"]{${SHOW}}}
|
|
75
|
+
@container art (width>=34rem){.ui-msc{scale:.9}${ON}6"]{${SHOW}}}
|
|
76
|
+
.ui-msc-stage{animation:ui-msc-rise .9s var(--ua-land) backwards .1s}
|
|
77
|
+
.ui-msc-shadow{fill:var(--ua-shadow)}
|
|
78
|
+
.ui-msc-base-top{fill:var(--msc-base)}
|
|
79
|
+
.ui-msc-base-left{fill:color-mix(in srgb,var(--msc-base) 82%,black)}
|
|
80
|
+
.ui-msc-base-right{fill:color-mix(in srgb,var(--msc-base) 66%,black)}
|
|
81
|
+
.ui-msc-dots{fill:color-mix(in srgb,black 28%,transparent)}
|
|
82
|
+
.ui-msc-edge{stroke:var(--msc-edge,var(--ua-edge));stroke-width:2.2;stroke-linejoin:round}
|
|
83
|
+
.ui-auth-art[data-state=error] .ui-msc{--msc-edge:color-mix(in srgb,var(--danger) 70%,var(--ua-edge))}
|
|
84
|
+
.ui-msc-tile{--top:var(--msc-tile);--glow:max(0,1 - (max(var(--px,9) - var(--tx),var(--tx) - var(--px,9)) + max(var(--py,9) - var(--ty),var(--ty) - var(--py,9))) * 2.6)}
|
|
85
|
+
.ui-msc-tile[data-lit]{--top:var(--msc-lit)}
|
|
86
|
+
.ui-msc-tile[data-active]{--top:var(--msc-active)}
|
|
87
|
+
.ui-msc-lift{transform:translateY(calc((var(--lit) * -8 - var(--glow) * 5 - var(--act) * 14) * 1px));transition:transform .55s var(--ua-bounce);transition-delay:calc(var(--d) * 28ms)}
|
|
88
|
+
.ui-msc-tile-top{fill:var(--msc-tile);stroke:var(--msc-grout);stroke-width:1.2;stroke-linejoin:round}
|
|
89
|
+
.ui-msc-tile[data-active] .ui-msc-tile-top{fill:var(--msc-active)}
|
|
90
|
+
.ui-msc-litface{fill:var(--msc-lit);opacity:var(--lit);transition:opacity .35s linear;transition-delay:calc(var(--d) * 28ms)}
|
|
91
|
+
.ui-msc-tile[data-active] .ui-msc-litface{opacity:0}
|
|
92
|
+
.ui-msc-tile-left{fill:color-mix(in srgb,var(--top) 78%,black)}
|
|
93
|
+
.ui-msc-side{opacity:max(var(--lit),var(--act));transition:opacity .2s linear;transition-delay:calc(var(--d) * 28ms)}
|
|
94
|
+
.ui-msc-tile-right{fill:color-mix(in srgb,var(--top) 62%,black)}
|
|
95
|
+
.ui-msc-tile[data-lit] .ui-msc-litface,.ui-msc-tile[data-active] .ui-msc-tile-top,.ui-msc-tile:is([data-lit],[data-active]) .ui-msc-side{stroke:var(--ua-edge);stroke-width:1.6;stroke-linejoin:round}
|
|
96
|
+
.ui-msc-glow{fill:var(--msc-glow);opacity:calc(var(--glow) * .7);transition:opacity .25s linear}
|
|
97
|
+
.ui-msc-sheen-stop{stop-color:white}
|
|
98
|
+
.ui-msc-alarm-stop{stop-color:var(--danger)}
|
|
99
|
+
.ui-msc-sheen{opacity:.5;animation:ui-msc-sheen 5s ease-in-out infinite}
|
|
100
|
+
.ui-auth-art[data-state=success] .ui-msc-sheen{opacity:.9;animation:ui-msc-sweep 1.1s .25s var(--ua-glide) backwards}
|
|
101
|
+
.ui-msc-alarm{opacity:.85}
|
|
102
|
+
.ui-auth-art[data-state=error] .ui-msc-alarm{animation:ui-msc-sweep .8s var(--ua-glide) both}
|
|
103
|
+
.ui-msc-bob{animation:var(--b) 3.2s ease-in-out infinite}
|
|
104
|
+
.ui-msc-glint-0{animation:var(--g0) .4s var(--ua-glide)}
|
|
105
|
+
.ui-msc-glint-1{animation:var(--g1) .4s var(--ua-glide)}
|
|
106
|
+
.ui-auth-art[data-state=success] .ui-msc-pop{animation:var(--r) .6s var(--ua-glide) backwards;animation-delay:calc(.25s + var(--ring) * 75ms)}
|
|
107
|
+
.ui-msc-glyph{--glyph-a:color-mix(in srgb,var(--ua-edge) 30%,var(--msc-tile));--glyph-b:color-mix(in srgb,var(--ua-edge) 30%,var(--msc-tile));--glyph-c:var(--msc-tile);--glyph-line:var(--msc-tile)}
|
|
108
|
+
.ui-msc-tile[data-lit] .ui-msc-glyph{--glyph-a:color-mix(in srgb,var(--msc-lit) 55%,black);--glyph-b:color-mix(in srgb,var(--msc-lit) 55%,black);--glyph-c:var(--msc-lit);--glyph-line:var(--msc-lit)}
|
|
109
|
+
.ui-msc-tile[data-active] .ui-msc-glyph{--glyph-a:var(--msc-lit);--glyph-b:var(--msc-tile);--glyph-c:var(--msc-active);--glyph-line:var(--msc-tile)}
|
|
110
|
+
.ui-auth-art[data-panel=solid] .ui-msc-tile[data-active] .ui-msc-glyph{--glyph-a:var(--ua-tint);--glyph-b:var(--ua-tint);--glyph-c:var(--auth-art-ink)}
|
|
111
|
+
@media (prefers-reduced-motion:reduce){
|
|
112
|
+
.ui-msc *{animation:none!important}
|
|
113
|
+
.ui-auth-art[data-state=error] .ui-msc-alarm{opacity:.5;transform:translateY(916px) scaleY(4.4)}
|
|
114
|
+
.ui-msc-lift,.ui-msc-litface,.ui-msc-side{transition:none}
|
|
115
|
+
}
|
|
116
|
+
`;
|
|
117
|
+
function Mosaic({ state, progress, activeIndex, uid }) {
|
|
118
|
+
const dots = `url(#${uid}-mosaic-dots)`;
|
|
119
|
+
const tick = keystroke(progress);
|
|
120
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
121
|
+
/* @__PURE__ */ jsx("style", { href: "jcsoftdev-ui-auth-mosaic", precedence: "default", children: CSS }),
|
|
122
|
+
/* @__PURE__ */ jsxs("svg", { viewBox: `${VIEW.x} ${VIEW.y} ${VIEW.w} ${VIEW.h}`, focusable: "false", className: "ui-msc", children: [
|
|
123
|
+
/* @__PURE__ */ jsxs("defs", { children: [
|
|
124
|
+
/* @__PURE__ */ jsx("pattern", { id: `${uid}-mosaic-dots`, width: "5", height: "5", patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ jsx("circle", { className: "ui-msc-dots", cx: "2.5", cy: "2.5", r: "1" }) }),
|
|
125
|
+
/* @__PURE__ */ jsx("clipPath", { id: `${uid}-mosaic-clip`, children: /* @__PURE__ */ jsx("path", { d: CLIP }) }),
|
|
126
|
+
/* @__PURE__ */ jsx("clipPath", { id: `${uid}-mosaic-floor`, children: /* @__PURE__ */ jsx("path", { d: FLOOR_TOP }) }),
|
|
127
|
+
BANDS.map((band) => /* @__PURE__ */ jsxs("linearGradient", { id: `${uid}-mosaic-${band}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
128
|
+
/* @__PURE__ */ jsx("stop", { className: `ui-msc-${band}-stop`, offset: "0", stopOpacity: "0" }),
|
|
129
|
+
/* @__PURE__ */ jsx("stop", { className: `ui-msc-${band}-stop`, offset: ".5", stopOpacity: "1" }),
|
|
130
|
+
/* @__PURE__ */ jsx("stop", { className: `ui-msc-${band}-stop`, offset: "1", stopOpacity: "0" })
|
|
131
|
+
] }, band))
|
|
132
|
+
] }),
|
|
133
|
+
/* @__PURE__ */ jsxs("g", { className: "ui-msc-stage", children: [
|
|
134
|
+
/* @__PURE__ */ jsx("path", { className: "ui-msc-shadow", d: SHADOW, transform: "translate(16 18)" }),
|
|
135
|
+
/* @__PURE__ */ jsx("path", { className: "ui-msc-base-left ui-msc-edge", d: PLATFORM.left }),
|
|
136
|
+
/* @__PURE__ */ jsx("path", { className: "ui-msc-base-right ui-msc-edge", d: PLATFORM.right }),
|
|
137
|
+
/* @__PURE__ */ jsx("path", { d: PLATFORM.left, fill: dots }),
|
|
138
|
+
/* @__PURE__ */ jsx("path", { d: PLATFORM.right, fill: dots }),
|
|
139
|
+
/* @__PURE__ */ jsx("path", { className: "ui-msc-base-top ui-msc-edge", d: PLATFORM.top }),
|
|
140
|
+
/* @__PURE__ */ jsx("g", { clipPath: `url(#${uid}-mosaic-clip)`, children: GRIDS.map(({ n, shape, glyphTransform, tiles }) => {
|
|
141
|
+
const lit = mosaicFilled(state, progress, n);
|
|
142
|
+
const glint = mosaicGlint(tick.count, n);
|
|
143
|
+
return /* @__PURE__ */ jsx("g", { className: "ui-msc-grid", "data-n": n, children: tiles.map((tile, k) => {
|
|
144
|
+
const on = tile.diagonal < lit;
|
|
145
|
+
const active = tile.glyph >= 0 && tile.glyph === activeIndex;
|
|
146
|
+
const vars = {
|
|
147
|
+
"--d": tile.diagonal,
|
|
148
|
+
"--ring": tile.ring,
|
|
149
|
+
"--lit": on ? 1 : 0,
|
|
150
|
+
"--act": active ? 1 : 0,
|
|
151
|
+
"--tx": tile.tx,
|
|
152
|
+
"--ty": tile.ty
|
|
153
|
+
};
|
|
154
|
+
const pop = k === glint ? `ui-msc-pop ui-msc-glint-${tick.phase}` : "ui-msc-pop";
|
|
155
|
+
return /* @__PURE__ */ jsx(
|
|
156
|
+
"g",
|
|
157
|
+
{
|
|
158
|
+
className: "ui-msc-tile",
|
|
159
|
+
"data-lit": on || void 0,
|
|
160
|
+
"data-active": active || void 0,
|
|
161
|
+
style: vars,
|
|
162
|
+
transform: `translate(${tile.at.x} ${tile.at.y})`,
|
|
163
|
+
children: /* @__PURE__ */ jsx("g", { className: "ui-msc-lift", children: /* @__PURE__ */ jsx("g", { className: pop, children: /* @__PURE__ */ jsxs("g", { className: active ? "ui-msc-bob" : void 0, children: [
|
|
164
|
+
/* @__PURE__ */ jsx("path", { className: "ui-msc-side ui-msc-tile-left", d: shape.left }),
|
|
165
|
+
/* @__PURE__ */ jsx("path", { className: "ui-msc-side ui-msc-tile-right", d: shape.right }),
|
|
166
|
+
/* @__PURE__ */ jsx("path", { className: "ui-msc-tile-top", d: shape.top }),
|
|
167
|
+
/* @__PURE__ */ jsx("path", { className: "ui-msc-litface", d: shape.top }),
|
|
168
|
+
/* @__PURE__ */ jsx("path", { className: "ui-msc-glow", d: shape.top }),
|
|
169
|
+
tile.glyph >= 0 ? /* @__PURE__ */ jsx("g", { className: "ui-msc-glyph", transform: glyphTransform, children: PORTAL_GLYPHS[tile.glyph] }) : null
|
|
170
|
+
] }) }) })
|
|
171
|
+
},
|
|
172
|
+
`${tile.row}:${tile.col}`
|
|
173
|
+
);
|
|
174
|
+
}) }, n);
|
|
175
|
+
}) }),
|
|
176
|
+
/* @__PURE__ */ jsx("g", { clipPath: `url(#${uid}-mosaic-floor)`, children: BANDS.map((band) => /* @__PURE__ */ jsx(
|
|
177
|
+
"rect",
|
|
178
|
+
{
|
|
179
|
+
className: `ui-msc-band ui-msc-${band}`,
|
|
180
|
+
fill: `url(#${uid}-mosaic-${band})`,
|
|
181
|
+
x: BAND.x,
|
|
182
|
+
y: BAND.y,
|
|
183
|
+
width: BAND.w,
|
|
184
|
+
height: BAND.h
|
|
185
|
+
},
|
|
186
|
+
band
|
|
187
|
+
)) })
|
|
188
|
+
] })
|
|
189
|
+
] })
|
|
190
|
+
] });
|
|
191
|
+
}
|
|
192
|
+
Mosaic.variant = "mosaic";
|
|
193
|
+
export {
|
|
194
|
+
Mosaic
|
|
195
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./slabs.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./slabs.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type AuthState } from "../auth-illustration/model.js";
|
|
2
|
+
export interface SlabsProps {
|
|
3
|
+
state: AuthState;
|
|
4
|
+
progress: number;
|
|
5
|
+
activeIndex: number;
|
|
6
|
+
/** Unique within the page; names the halftone pattern. */
|
|
7
|
+
uid: string;
|
|
8
|
+
}
|
|
9
|
+
/** Three isometric portal slabs that float apart at rest and assemble as the form fills. */
|
|
10
|
+
export declare function Slabs({ state, progress, activeIndex, uid }: SlabsProps): import("react").JSX.Element;
|
|
11
|
+
export declare namespace Slabs {
|
|
12
|
+
var variant: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import {
|
|
4
|
+
keystroke,
|
|
5
|
+
SLAB_COUNT,
|
|
6
|
+
slabPlacement,
|
|
7
|
+
slabSpread,
|
|
8
|
+
sparkVectors
|
|
9
|
+
} from "../auth-illustration/model.js";
|
|
10
|
+
import { PORTAL_GLYPHS } from "../internal/portal-glyphs.js";
|
|
11
|
+
const CSS = `
|
|
12
|
+
@keyframes ui-auth-drop{0%{opacity:0;transform:translateY(-180px)}45%{opacity:1}}
|
|
13
|
+
@keyframes ui-auth-shadow-in{from{opacity:0;transform:scale(.35)}}
|
|
14
|
+
@keyframes ui-auth-bob{50%{transform:translateY(-7px)}}
|
|
15
|
+
@keyframes ui-auth-hop-0{40%{transform:translateY(-11px)}}
|
|
16
|
+
@keyframes ui-auth-hop-1{40%{transform:translateY(-11px)}}
|
|
17
|
+
@keyframes ui-auth-cheer{35%{transform:translateY(-18px)}70%{transform:translateY(3px)}}
|
|
18
|
+
.ui-auth-slab-tone-0{--top:var(--accent);--glyph-a:var(--surface);--glyph-b:var(--ink);--glyph-c:var(--accent);--dots:color-mix(in srgb,black 30%,transparent)}
|
|
19
|
+
.ui-auth-slab-tone-1{--top:var(--surface);--glyph-a:var(--accent);--glyph-b:var(--ink);--glyph-c:var(--surface);--dots:color-mix(in srgb,black 30%,transparent)}
|
|
20
|
+
.ui-auth-slab-tone-2{--top:color-mix(in srgb,var(--ink) 86%,var(--surface));--glyph-a:var(--accent);--glyph-b:var(--surface);--glyph-c:var(--surface);--dots:color-mix(in srgb,white 20%,transparent)}
|
|
21
|
+
.ui-auth-art[data-panel=solid] .ui-auth-slab-tone-0{--top:var(--auth-art-ink);--glyph-a:var(--auth-art-bg);--glyph-b:var(--auth-art-ink);--glyph-c:var(--ua-tint);--dots:color-mix(in srgb,var(--auth-art-bg) 30%,transparent)}
|
|
22
|
+
.ui-auth-art[data-panel=solid] .ui-auth-slab-tone-1{--top:var(--ua-tint);--glyph-a:var(--auth-art-ink);--glyph-b:var(--auth-art-ink);--glyph-c:var(--ua-tint);--dots:color-mix(in srgb,var(--auth-art-ink) 35%,transparent)}
|
|
23
|
+
.ui-auth-art[data-panel=solid] .ui-auth-slab-tone-2{--top:var(--ua-mid);--glyph-a:var(--ua-tint);--glyph-b:var(--auth-art-ink);--glyph-c:var(--ua-mid);--dots:color-mix(in srgb,var(--auth-art-ink) 35%,transparent)}
|
|
24
|
+
.ui-auth-art[data-panel=solid] .ui-auth-inlay{stroke:color-mix(in srgb,var(--auth-art-ink) 22%,transparent)}
|
|
25
|
+
.ui-auth-slab{--glyph-line:var(--accent);--left:color-mix(in srgb,var(--top) 82%,black);--right:color-mix(in srgb,var(--top) 66%,black)}
|
|
26
|
+
.ui-auth-art[data-panel=solid] .ui-auth-slab-tone-0{--glyph-line:var(--auth-art-ink)}
|
|
27
|
+
.ui-auth-art[data-panel=solid] .ui-auth-slab-tone-2{--glyph-line:var(--ua-tint)}
|
|
28
|
+
.ui-auth-art[data-state=error] .ui-auth-slab{--edge:color-mix(in srgb,var(--danger) 70%,var(--ua-edge))}
|
|
29
|
+
.ui-auth-pos{transform:translate(calc(var(--x) * 1px),calc(var(--y) * 1px));transition:transform .85s var(--ua-bounce)}
|
|
30
|
+
.ui-auth-par{transform:translate(calc(var(--px,0) * (5px + var(--i) * 3px)),calc(var(--py,0) * (4px + var(--i) * 2px)));transition:transform .6s var(--ua-glide)}
|
|
31
|
+
.ui-auth-lift{transform:translateY(calc(var(--lift) * -1px));transition:transform .85s var(--ua-bounce)}
|
|
32
|
+
.ui-auth-enter{animation:ui-auth-drop .9s var(--ua-land) backwards;animation-delay:calc(.15s + var(--i) * .14s)}
|
|
33
|
+
.ui-auth-hop-0{animation:ui-auth-hop-0 .32s var(--ua-glide)}
|
|
34
|
+
.ui-auth-hop-1{animation:ui-auth-hop-1 .32s var(--ua-glide)}
|
|
35
|
+
.ui-auth-art[data-state=success] .ui-auth-hop{animation:ui-auth-cheer .5s var(--ua-glide) backwards;animation-delay:calc(.75s + var(--i) * .07s)}
|
|
36
|
+
.ui-auth-bob{animation:ui-auth-bob 4.6s ease-in-out infinite;animation-delay:calc(var(--i) * -1.4s)}
|
|
37
|
+
.ui-auth-face-top{fill:var(--top)}
|
|
38
|
+
.ui-auth-face-left{fill:var(--left)}
|
|
39
|
+
.ui-auth-face-right{fill:var(--right)}
|
|
40
|
+
.ui-auth-edge{stroke:var(--edge,var(--ua-edge));stroke-width:2.2;stroke-linejoin:round}
|
|
41
|
+
.ui-auth-dots{fill:var(--dots)}
|
|
42
|
+
.ui-auth-shadow{fill:var(--ua-shadow);transform-box:fill-box;transform-origin:center;opacity:calc(1 - var(--lift) / 150);transition:opacity .85s var(--ua-glide);animation:ui-auth-shadow-in .9s var(--ua-land) backwards;animation-delay:calc(.15s + var(--i) * .14s)}
|
|
43
|
+
.ui-auth-inlay{fill:none;stroke:color-mix(in srgb,var(--ink) 14%,transparent);stroke-width:2}
|
|
44
|
+
@media (prefers-reduced-motion:reduce){
|
|
45
|
+
.ui-auth-enter,.ui-auth-bob,.ui-auth-art[data-state] .ui-auth-hop,.ui-auth-hop-0,.ui-auth-hop-1,.ui-auth-shadow{animation:none}
|
|
46
|
+
.ui-auth-pos,.ui-auth-lift,.ui-auth-shadow{transition:none}
|
|
47
|
+
.ui-auth-par{transform:none;transition:none}
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
const THICKNESS = 22;
|
|
51
|
+
const TOP = "M0 0 L86.6 50 L0 100 L-86.6 50Z";
|
|
52
|
+
const LEFT = `M-86.6 50 L0 100 L0 ${100 + THICKNESS} L-86.6 ${50 + THICKNESS}Z`;
|
|
53
|
+
const RIGHT = `M0 100 L86.6 50 L86.6 ${50 + THICKNESS} L0 ${100 + THICKNESS}Z`;
|
|
54
|
+
const SPARK = "M0-11 L3-3 L11 0 L3 3 L0 11 L-3 3 L-11 0 L-3-3Z";
|
|
55
|
+
const SPARKS = sparkVectors();
|
|
56
|
+
function Slab({
|
|
57
|
+
index,
|
|
58
|
+
spread,
|
|
59
|
+
activeIndex,
|
|
60
|
+
dotsId,
|
|
61
|
+
hop
|
|
62
|
+
}) {
|
|
63
|
+
const live = slabPlacement(index, spread, activeIndex);
|
|
64
|
+
const vars = {
|
|
65
|
+
"--i": index,
|
|
66
|
+
"--x": live.x,
|
|
67
|
+
"--y": live.y,
|
|
68
|
+
"--lift": live.lift
|
|
69
|
+
};
|
|
70
|
+
const dots = `url(#${dotsId})`;
|
|
71
|
+
return /* @__PURE__ */ jsxs("g", { className: `ui-auth-pos ui-auth-slab ui-auth-slab-tone-${index}`, style: vars, children: [
|
|
72
|
+
/* @__PURE__ */ jsx("g", { transform: `translate(24 ${THICKNESS + 22})`, children: /* @__PURE__ */ jsx("path", { className: "ui-auth-shadow", d: TOP }) }),
|
|
73
|
+
/* @__PURE__ */ jsx("g", { className: "ui-auth-par", children: /* @__PURE__ */ jsx("g", { className: "ui-auth-lift", children: /* @__PURE__ */ jsx("g", { className: "ui-auth-enter", children: /* @__PURE__ */ jsx("g", { className: hop === null ? "ui-auth-hop" : `ui-auth-hop ui-auth-hop-${hop}`, children: /* @__PURE__ */ jsxs("g", { className: "ui-auth-bob", children: [
|
|
74
|
+
/* @__PURE__ */ jsx("path", { className: "ui-auth-face-left ui-auth-edge", d: LEFT }),
|
|
75
|
+
/* @__PURE__ */ jsx("path", { className: "ui-auth-face-right ui-auth-edge", d: RIGHT }),
|
|
76
|
+
/* @__PURE__ */ jsx("path", { d: LEFT, fill: dots }),
|
|
77
|
+
/* @__PURE__ */ jsx("path", { d: RIGHT, fill: dots }),
|
|
78
|
+
/* @__PURE__ */ jsx("path", { className: "ui-auth-face-top ui-auth-edge", d: TOP }),
|
|
79
|
+
/* @__PURE__ */ jsxs("g", { transform: "matrix(0.866 0.5 -0.866 0.5 0 0)", children: [
|
|
80
|
+
/* @__PURE__ */ jsx("rect", { className: "ui-auth-inlay", x: "9", y: "9", width: "82", height: "82", rx: "8" }),
|
|
81
|
+
PORTAL_GLYPHS[index]
|
|
82
|
+
] })
|
|
83
|
+
] }) }) }) }) })
|
|
84
|
+
] });
|
|
85
|
+
}
|
|
86
|
+
function Slabs({ state, progress, activeIndex, uid }) {
|
|
87
|
+
const spread = slabSpread(state, progress);
|
|
88
|
+
const dotsId = `${uid}-dots`;
|
|
89
|
+
const tick = keystroke(progress, SLAB_COUNT);
|
|
90
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
91
|
+
/* @__PURE__ */ jsx("style", { href: "jcsoftdev-ui-auth-slabs", precedence: "default", children: CSS }),
|
|
92
|
+
/* @__PURE__ */ jsxs(
|
|
93
|
+
"svg",
|
|
94
|
+
{
|
|
95
|
+
viewBox: "40 60 560 440",
|
|
96
|
+
focusable: "false",
|
|
97
|
+
style: { "--spread": spread },
|
|
98
|
+
children: [
|
|
99
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("pattern", { id: dotsId, width: "5", height: "5", patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ jsx("circle", { className: "ui-auth-dots", cx: "2.5", cy: "2.5", r: "1" }) }) }),
|
|
100
|
+
Array.from({ length: SLAB_COUNT }, (_, index) => /* @__PURE__ */ jsx(
|
|
101
|
+
Slab,
|
|
102
|
+
{
|
|
103
|
+
index,
|
|
104
|
+
spread,
|
|
105
|
+
activeIndex,
|
|
106
|
+
dotsId,
|
|
107
|
+
hop: tick.count > 0 && tick.target === index ? tick.phase : null
|
|
108
|
+
},
|
|
109
|
+
index
|
|
110
|
+
)),
|
|
111
|
+
state === "success" ? /* @__PURE__ */ jsx("g", { children: SPARKS.map((spark, n) => /* @__PURE__ */ jsx("g", { transform: "translate(320 250)", children: n % 2 ? /* @__PURE__ */ jsx(
|
|
112
|
+
"circle",
|
|
113
|
+
{
|
|
114
|
+
className: "ui-auth-spark",
|
|
115
|
+
"data-tone": n % 4,
|
|
116
|
+
r: "5",
|
|
117
|
+
style: { "--dx": `${spark.dx}px`, "--dy": `${spark.dy}px` }
|
|
118
|
+
}
|
|
119
|
+
) : /* @__PURE__ */ jsx(
|
|
120
|
+
"path",
|
|
121
|
+
{
|
|
122
|
+
className: "ui-auth-spark",
|
|
123
|
+
"data-tone": n % 4,
|
|
124
|
+
d: SPARK,
|
|
125
|
+
style: { "--dx": `${spark.dx}px`, "--dy": `${spark.dy}px` }
|
|
126
|
+
}
|
|
127
|
+
) }, `${spark.dx}:${spark.dy}`)) }) : null
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
] });
|
|
132
|
+
}
|
|
133
|
+
Slabs.variant = "slabs";
|
|
134
|
+
export {
|
|
135
|
+
Slabs
|
|
136
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./stack.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./stack.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AuthVariantProps } from "../auth-illustration/look.js";
|
|
2
|
+
/** An isometric tower of books that gains a book as the form fills and plants a flag on success. */
|
|
3
|
+
export declare function Stack({ state, progress, activeIndex, uid }: AuthVariantProps): import("react").JSX.Element;
|
|
4
|
+
export declare namespace Stack {
|
|
5
|
+
var variant: string;
|
|
6
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import {
|
|
4
|
+
isoBox,
|
|
5
|
+
isoPoint,
|
|
6
|
+
keystroke,
|
|
7
|
+
STACK_BOOKS,
|
|
8
|
+
STACK_COUNTS,
|
|
9
|
+
sparkVectors,
|
|
10
|
+
stackPlaced,
|
|
11
|
+
stackSlots,
|
|
12
|
+
stackTop
|
|
13
|
+
} from "../auth-illustration/model.js";
|
|
14
|
+
import { PORTAL_GLYPHS } from "../internal/portal-glyphs.js";
|
|
15
|
+
const BASE = { x: 210, y: 350 };
|
|
16
|
+
const SLOTS = stackSlots();
|
|
17
|
+
const SPARKS = sparkVectors(10).map((spark) => ({ dx: spark.dx * 0.7, dy: spark.dy * 0.7 - 20 }));
|
|
18
|
+
const STAR = "M0-9 L2.5-2.5 L9 0 L2.5 2.5 L0 9 L-2.5 2.5 L-9 0 L-2.5-2.5Z";
|
|
19
|
+
const CSS = `
|
|
20
|
+
@keyframes ui-stk-drop{0%{opacity:0;transform:translateY(-140px)}10%{opacity:1}}
|
|
21
|
+
@keyframes ui-stk-pulse{50%{opacity:.3}}
|
|
22
|
+
@keyframes ui-stk-squash-0{40%{transform:scale(1.012,.975)}}
|
|
23
|
+
@keyframes ui-stk-squash-1{40%{transform:scale(1.012,.975)}}
|
|
24
|
+
@keyframes ui-stk-wobble{18%{transform:translateX(calc(var(--i) * -5px))}42%{transform:translateX(calc(var(--i) * 4px))}66%{transform:translateX(calc(var(--i) * -2px))}84%{transform:translateX(calc(var(--i) * 1px))}}
|
|
25
|
+
@keyframes ui-stk-rise{from{opacity:0;transform:scaleY(0)}}
|
|
26
|
+
@keyframes ui-stk-unfurl{from{transform:scaleX(0)}}
|
|
27
|
+
@keyframes ui-stk-wave{50%{transform:skewY(-5deg) scaleX(.94)}}
|
|
28
|
+
.ui-stk{--n:4;--shift:22px;scale:1.28;transform-origin:50% 88%;--stk-paper:color-mix(in srgb,white 90%,var(--accent));--stk-line:color-mix(in srgb,black 22%,transparent)}
|
|
29
|
+
.ui-auth-art[data-panel=solid] .ui-stk{--stk-paper:color-mix(in srgb,white 84%,var(--auth-art-bg))}
|
|
30
|
+
.ui-stk-book{--on:var(--on4);--next:var(--next4)}
|
|
31
|
+
.ui-stk-flag{--fx:var(--fx4);--fy:var(--fy4);transform:translate(calc(var(--fx) * 1px),calc(var(--fy) * 1px))}
|
|
32
|
+
.ui-stk-book[data-i="4"],.ui-stk-book[data-i="5"]{display:none}
|
|
33
|
+
@container art (min-width:24rem){.ui-stk{--n:5;--shift:10px;scale:1.12}.ui-stk-book{--on:var(--on5);--next:var(--next5)}.ui-stk-flag{--fx:var(--fx5);--fy:var(--fy5)}.ui-stk-book[data-i="4"]{display:inline}}
|
|
34
|
+
@container art (min-width:34rem){.ui-stk{--n:6;--shift:0px;scale:1}.ui-stk-book{--on:var(--on6);--next:var(--next6)}.ui-stk-flag{--fx:var(--fx6);--fy:var(--fy6)}.ui-stk-book[data-i="5"]{display:inline}}
|
|
35
|
+
.ui-stk-tower{transform:translateY(var(--shift))}
|
|
36
|
+
.ui-stk-par{transform:translate(calc(var(--px,0) * var(--i) * 2.5px),calc(var(--py,0) * var(--i) * 1px));transition:transform .6s var(--ua-glide)}
|
|
37
|
+
.ui-stk-flag-par{transform:translate(calc(var(--px,0) * (var(--n) - 1) * 2.5px),calc(var(--py,0) * (var(--n) - 1) * 1px));transition:transform .6s var(--ua-glide)}
|
|
38
|
+
.ui-stk-drop{transform:translateY(calc((1 - var(--on)) * -130px));opacity:var(--on);transition:transform .75s var(--ua-bounce),opacity .08s linear;transition-delay:calc(var(--i) * 40ms)}
|
|
39
|
+
.ui-stk-enter{animation:ui-stk-drop .8s var(--ua-land) backwards;animation-delay:calc(.1s + var(--i) * .09s)}
|
|
40
|
+
.ui-stk-ghost-wrap{opacity:var(--next);transition:opacity .3s linear}
|
|
41
|
+
.ui-stk-ghost{fill:none;stroke:var(--ua-edge);stroke-opacity:.5;stroke-width:1.6;stroke-dasharray:5 6;animation:ui-stk-pulse 2.4s ease-in-out infinite;animation-delay:calc(var(--i) * -.3s)}
|
|
42
|
+
.ui-stk-squash{transform-box:fill-box;transform-origin:50% 100%}
|
|
43
|
+
.ui-stk-squash-0{animation:ui-stk-squash-0 .28s var(--ua-glide)}
|
|
44
|
+
.ui-stk-squash-1{animation:ui-stk-squash-1 .28s var(--ua-glide)}
|
|
45
|
+
.ui-auth-art[data-state=error] .ui-stk-wob{animation:ui-stk-wobble .75s var(--ua-glide)}
|
|
46
|
+
.ui-stk-tone-0{--cover:var(--accent);--ribbon:var(--ink)}
|
|
47
|
+
.ui-stk-tone-1{--cover:color-mix(in srgb,var(--ink) 86%,var(--surface));--ribbon:var(--accent)}
|
|
48
|
+
.ui-stk-tone-2{--cover:var(--surface)}
|
|
49
|
+
.ui-stk-tone-3{--cover:var(--accent-2);--ribbon:var(--accent)}
|
|
50
|
+
.ui-auth-art[data-panel=solid] .ui-stk-tone-0{--cover:var(--auth-art-ink);--ribbon:var(--ua-tint)}
|
|
51
|
+
.ui-auth-art[data-panel=solid] .ui-stk-tone-1{--cover:var(--ua-tint)}
|
|
52
|
+
.ui-auth-art[data-panel=solid] .ui-stk-tone-2{--cover:var(--ua-mid)}
|
|
53
|
+
.ui-auth-art[data-panel=solid] .ui-stk-tone-3{--cover:color-mix(in srgb,var(--auth-art-ink) 55%,var(--auth-art-bg));--ribbon:var(--ua-tint)}
|
|
54
|
+
.ui-stk-book{--spine:color-mix(in srgb,var(--cover) 80%,black);--side:color-mix(in srgb,var(--cover) 64%,black)}
|
|
55
|
+
.ui-stk-cover{fill:var(--cover)}
|
|
56
|
+
.ui-stk-spine{fill:var(--spine)}
|
|
57
|
+
.ui-stk-cover-side{fill:var(--side)}
|
|
58
|
+
.ui-stk-pages{fill:var(--stk-paper)}
|
|
59
|
+
.ui-stk-line{fill:none;stroke:var(--stk-line);stroke-width:1}
|
|
60
|
+
.ui-stk-band{fill:none;stroke:color-mix(in srgb,var(--cover) 45%,white);stroke-width:2.2}
|
|
61
|
+
.ui-stk-label{fill:color-mix(in srgb,var(--stk-paper) 88%,var(--cover));stroke:var(--stk-edge,var(--ua-edge));stroke-width:1.2}
|
|
62
|
+
.ui-stk-inset{fill:none;stroke:color-mix(in srgb,var(--ua-edge) 20%,transparent);stroke-width:1.5}
|
|
63
|
+
.ui-stk-ribbon{fill:var(--ribbon,var(--accent))}
|
|
64
|
+
.ui-stk-edge{stroke:var(--stk-edge,var(--ua-edge));stroke-width:2;stroke-linejoin:round}
|
|
65
|
+
.ui-auth-art[data-state=error] .ui-stk-book{--stk-edge:color-mix(in srgb,var(--danger) 70%,var(--ua-edge))}
|
|
66
|
+
.ui-stk-dot{fill:color-mix(in srgb,black 28%,transparent)}
|
|
67
|
+
.ui-stk-shadow{fill:var(--ua-shadow)}
|
|
68
|
+
.ui-stk-flag{--glyph-a:var(--surface);--glyph-b:var(--ink);--glyph-c:var(--accent);--glyph-line:var(--accent);--cloth:var(--accent)}
|
|
69
|
+
.ui-auth-art[data-panel=solid] .ui-stk-flag{--glyph-a:var(--auth-art-bg);--glyph-b:var(--auth-art-bg);--glyph-c:var(--auth-art-ink);--glyph-line:var(--auth-art-ink);--cloth:var(--auth-art-ink)}
|
|
70
|
+
.ui-stk-pole{fill:none;stroke:var(--ua-edge);stroke-width:3;stroke-linecap:round;transform-box:fill-box;transform-origin:50% 100%;animation:ui-stk-rise .45s .4s var(--ua-bounce) backwards}
|
|
71
|
+
.ui-stk-knob{fill:var(--cloth);transform-box:fill-box;transform-origin:center;animation:ui-stk-rise .3s .8s var(--ua-bounce) backwards}
|
|
72
|
+
.ui-stk-cloth{fill:var(--cloth)}
|
|
73
|
+
.ui-stk-banner{transform-box:fill-box;transform-origin:0 50%;animation:ui-stk-unfurl .5s .7s var(--ua-bounce) backwards,ui-stk-wave 1.8s 1.3s ease-in-out infinite}
|
|
74
|
+
@media (prefers-reduced-motion:reduce){
|
|
75
|
+
.ui-stk-enter,.ui-stk-ghost,.ui-stk-pole,.ui-stk-knob,.ui-stk-banner,.ui-auth-art[data-state] .ui-stk-wob,.ui-stk-squash-0,.ui-stk-squash-1{animation:none}
|
|
76
|
+
.ui-stk-drop,.ui-stk-ghost-wrap{transition:none}
|
|
77
|
+
.ui-stk-par,.ui-stk-flag-par{transform:none;transition:none}
|
|
78
|
+
}
|
|
79
|
+
`;
|
|
80
|
+
const polygon = (points) => `M${points.map((p) => `${p.x} ${p.y}`).join("L")}Z`;
|
|
81
|
+
function bookDetails({ w, d, h }) {
|
|
82
|
+
const [u0, u1, v0, v1] = [-w / 2, w / 2, -d / 2, d / 2];
|
|
83
|
+
const board = Math.min(4, h / 5);
|
|
84
|
+
const count = Math.max(2, Math.round(h / 7));
|
|
85
|
+
const lines = Array.from({ length: count }, (_, k) => {
|
|
86
|
+
const z = board + (k + 1) * (h - board * 2) / (count + 1);
|
|
87
|
+
const a = isoPoint(u1, v0 + 4, z);
|
|
88
|
+
const b = isoPoint(u1, v1 - 4, z);
|
|
89
|
+
return `M${a.x} ${a.y}L${b.x} ${b.y}`;
|
|
90
|
+
}).join("");
|
|
91
|
+
const pages = polygon([
|
|
92
|
+
isoPoint(u1, v0 + 3, h - board),
|
|
93
|
+
isoPoint(u1, v1 - 3, h - board),
|
|
94
|
+
isoPoint(u1, v1 - 3, board),
|
|
95
|
+
isoPoint(u1, v0 + 3, board)
|
|
96
|
+
]);
|
|
97
|
+
const bands = [u0 + 16, u1 - 16].map((u) => {
|
|
98
|
+
const a = isoPoint(u, v1, h - 3);
|
|
99
|
+
const b = isoPoint(u, v1, 3);
|
|
100
|
+
return `M${a.x} ${a.y}L${b.x} ${b.y}`;
|
|
101
|
+
}).join("");
|
|
102
|
+
const label = polygon([
|
|
103
|
+
isoPoint(-w / 5, v1, h * 0.7),
|
|
104
|
+
isoPoint(w / 5, v1, h * 0.7),
|
|
105
|
+
isoPoint(w / 5, v1, h * 0.3),
|
|
106
|
+
isoPoint(-w / 5, v1, h * 0.3)
|
|
107
|
+
]);
|
|
108
|
+
const inset = polygon([
|
|
109
|
+
isoPoint(u0 + 9, v0 + 9, h),
|
|
110
|
+
isoPoint(u1 - 9, v0 + 9, h),
|
|
111
|
+
isoPoint(u1 - 9, v1 - 9, h),
|
|
112
|
+
isoPoint(u0 + 9, v1 - 9, h)
|
|
113
|
+
]);
|
|
114
|
+
const ribbon = polygon([
|
|
115
|
+
isoPoint(u1, v0 + 18, h),
|
|
116
|
+
isoPoint(u1, v0 + 28, h),
|
|
117
|
+
isoPoint(u1, v0 + 28, -14),
|
|
118
|
+
isoPoint(u1, v0 + 23, -9),
|
|
119
|
+
isoPoint(u1, v0 + 18, -14)
|
|
120
|
+
]);
|
|
121
|
+
return { pages, lines, bands, label, inset, ribbon };
|
|
122
|
+
}
|
|
123
|
+
const SHAPES = STACK_BOOKS.map((book) => ({
|
|
124
|
+
...isoBox(book.w, book.d, book.h),
|
|
125
|
+
...bookDetails(book)
|
|
126
|
+
}));
|
|
127
|
+
function Stack({ state, progress, activeIndex, uid }) {
|
|
128
|
+
const dots = `url(#${uid}-stack-dots)`;
|
|
129
|
+
const tick = keystroke(progress);
|
|
130
|
+
const placed = Object.fromEntries(
|
|
131
|
+
STACK_COUNTS.map((count) => [count, stackPlaced(state, progress, count)])
|
|
132
|
+
);
|
|
133
|
+
const flag = Object.fromEntries(
|
|
134
|
+
STACK_COUNTS.flatMap((count) => {
|
|
135
|
+
const top = stackTop(count);
|
|
136
|
+
return [
|
|
137
|
+
[`--fx${count}`, top.x],
|
|
138
|
+
[`--fy${count}`, top.y]
|
|
139
|
+
];
|
|
140
|
+
})
|
|
141
|
+
);
|
|
142
|
+
const foundation = STACK_BOOKS[0];
|
|
143
|
+
const shadow = isoBox(foundation.w + 34, foundation.d + 34, 0).top;
|
|
144
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
145
|
+
/* @__PURE__ */ jsx("style", { href: "jcsoftdev-ui-auth-stack", precedence: "default", children: CSS }),
|
|
146
|
+
/* @__PURE__ */ jsxs("svg", { viewBox: "0 30 420 450", focusable: "false", className: "ui-stk", children: [
|
|
147
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("pattern", { id: `${uid}-stack-dots`, width: "4.5", height: "4.5", patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ jsx("circle", { className: "ui-stk-dot", cx: "2.25", cy: "2.25", r: "0.9" }) }) }),
|
|
148
|
+
/* @__PURE__ */ jsx("g", { transform: `translate(${BASE.x} ${BASE.y})`, children: /* @__PURE__ */ jsxs("g", { className: "ui-stk-tower", children: [
|
|
149
|
+
/* @__PURE__ */ jsx("path", { className: "ui-stk-shadow", d: shadow, transform: "translate(14 16)" }),
|
|
150
|
+
/* @__PURE__ */ jsx(
|
|
151
|
+
"g",
|
|
152
|
+
{
|
|
153
|
+
className: tick.count > 0 ? `ui-stk-squash ui-stk-squash-${tick.phase}` : "ui-stk-squash",
|
|
154
|
+
children: STACK_BOOKS.map((book, i) => {
|
|
155
|
+
const shape = SHAPES[i];
|
|
156
|
+
const slot = SLOTS[i];
|
|
157
|
+
if (!shape || !slot) return null;
|
|
158
|
+
const vars = {
|
|
159
|
+
"--i": i,
|
|
160
|
+
...Object.fromEntries(
|
|
161
|
+
STACK_COUNTS.flatMap((count) => [
|
|
162
|
+
[`--on${count}`, i < (placed[count] ?? 0) ? 1 : 0],
|
|
163
|
+
[`--next${count}`, i === placed[count] ? 1 : 0]
|
|
164
|
+
])
|
|
165
|
+
)
|
|
166
|
+
};
|
|
167
|
+
return /* @__PURE__ */ jsxs(
|
|
168
|
+
"g",
|
|
169
|
+
{
|
|
170
|
+
className: `ui-stk-book ui-stk-tone-${book.tone}`,
|
|
171
|
+
"data-i": i,
|
|
172
|
+
style: vars,
|
|
173
|
+
transform: `translate(${slot.x} ${slot.y})`,
|
|
174
|
+
children: [
|
|
175
|
+
/* @__PURE__ */ jsx("g", { className: "ui-stk-ghost-wrap", children: /* @__PURE__ */ jsx("path", { className: "ui-stk-ghost", d: shape.top }) }),
|
|
176
|
+
/* @__PURE__ */ jsx("g", { className: "ui-stk-par", children: /* @__PURE__ */ jsx("g", { className: "ui-stk-drop", children: /* @__PURE__ */ jsx("g", { className: "ui-stk-enter", children: /* @__PURE__ */ jsxs("g", { className: "ui-stk-wob", children: [
|
|
177
|
+
/* @__PURE__ */ jsx("path", { className: "ui-stk-spine ui-stk-edge", d: shape.left }),
|
|
178
|
+
/* @__PURE__ */ jsx("path", { d: shape.left, fill: dots }),
|
|
179
|
+
/* @__PURE__ */ jsx("path", { className: "ui-stk-band", d: shape.bands }),
|
|
180
|
+
/* @__PURE__ */ jsx("path", { className: "ui-stk-label", d: shape.label }),
|
|
181
|
+
/* @__PURE__ */ jsx("path", { className: "ui-stk-cover-side ui-stk-edge", d: shape.right }),
|
|
182
|
+
/* @__PURE__ */ jsx("path", { className: "ui-stk-pages", d: shape.pages }),
|
|
183
|
+
/* @__PURE__ */ jsx("path", { className: "ui-stk-line", d: shape.lines }),
|
|
184
|
+
book.tone === 0 || book.tone === 3 ? /* @__PURE__ */ jsx("path", { className: "ui-stk-ribbon ui-stk-edge", d: shape.ribbon }) : null,
|
|
185
|
+
/* @__PURE__ */ jsx("path", { className: "ui-stk-cover ui-stk-edge", d: shape.top }),
|
|
186
|
+
/* @__PURE__ */ jsx("path", { className: "ui-stk-inset", d: shape.inset })
|
|
187
|
+
] }) }) }) })
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
i
|
|
191
|
+
);
|
|
192
|
+
})
|
|
193
|
+
}
|
|
194
|
+
),
|
|
195
|
+
/* @__PURE__ */ jsx("g", { className: "ui-stk-flag", style: flag, children: state === "success" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
196
|
+
/* @__PURE__ */ jsxs("g", { className: "ui-stk-flag-par", children: [
|
|
197
|
+
/* @__PURE__ */ jsx("path", { className: "ui-stk-pole", d: "M0 0V-78" }),
|
|
198
|
+
/* @__PURE__ */ jsx("g", { className: "ui-stk-banner-wrap", transform: "translate(0 -76)", children: /* @__PURE__ */ jsxs("g", { className: "ui-stk-banner", children: [
|
|
199
|
+
/* @__PURE__ */ jsx("path", { className: "ui-stk-cloth ui-stk-edge", d: "M0 0H62L50 17L62 34H0Z" }),
|
|
200
|
+
/* @__PURE__ */ jsx("g", { transform: "translate(9 4) scale(.27)", children: PORTAL_GLYPHS[activeIndex] ?? null })
|
|
201
|
+
] }) }),
|
|
202
|
+
/* @__PURE__ */ jsx("circle", { className: "ui-stk-knob ui-stk-edge", cy: "-80", r: "4" })
|
|
203
|
+
] }),
|
|
204
|
+
/* @__PURE__ */ jsx("g", { transform: "translate(0 -60)", children: SPARKS.map((spark, n) => /* @__PURE__ */ jsx(
|
|
205
|
+
"path",
|
|
206
|
+
{
|
|
207
|
+
className: "ui-auth-spark",
|
|
208
|
+
"data-tone": n % 4,
|
|
209
|
+
d: n % 2 ? STAR : "M-4 0a4 4 0 1 0 8 0a4 4 0 1 0-8 0",
|
|
210
|
+
style: { "--dx": `${spark.dx}px`, "--dy": `${spark.dy}px` }
|
|
211
|
+
},
|
|
212
|
+
`${spark.dx}:${spark.dy}`
|
|
213
|
+
)) })
|
|
214
|
+
] }) : null })
|
|
215
|
+
] }) })
|
|
216
|
+
] })
|
|
217
|
+
] });
|
|
218
|
+
}
|
|
219
|
+
Stack.variant = "stack";
|
|
220
|
+
export {
|
|
221
|
+
Stack
|
|
222
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./statement.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./statement.js";
|