@jcsoftdev/ui 0.4.0 → 0.6.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 +434 -0
- package/README.md +26 -4
- package/bin/ui-theme.mjs +40 -6
- package/dist/ai/code-block/code-block.js +1 -1
- package/dist/atoms/big-date/big-date.js +2 -2
- package/dist/atoms/button/button.d.ts +14 -2
- package/dist/atoms/button/button.js +12 -5
- package/dist/atoms/chip/chip.d.ts +5 -0
- package/dist/atoms/chip/chip.js +3 -3
- 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/icon-button/icon-button.d.ts +1 -1
- package/dist/atoms/icon-button/icon-button.js +1 -1
- package/dist/atoms/index.d.ts +1 -0
- package/dist/atoms/index.js +1 -0
- package/dist/atoms/internal/hit-area.d.ts +5 -4
- package/dist/atoms/internal/hit-area.js +1 -1
- package/dist/atoms/progress/index.d.ts +1 -1
- package/dist/atoms/progress/index.js +4 -1
- package/dist/atoms/progress/progress.d.ts +6 -1
- package/dist/atoms/progress/progress.js +19 -1
- package/dist/atoms/radio-group/radio-group.js +1 -1
- package/dist/atoms/status-pill/status-pill.d.ts +16 -5
- package/dist/atoms/status-pill/status-pill.js +43 -18
- 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/brand/logo-forge.js +1 -1
- package/dist/charts/candlestick-chart/candlestick-chart.js +2 -2
- package/dist/charts/chart-grid/chart-grid.js +2 -2
- package/dist/charts/chord-chart/chord-chart.js +1 -1
- package/dist/charts/core/axes.js +2 -2
- package/dist/charts/core/cartesian/annotations.js +2 -2
- package/dist/charts/core/cartesian/marks.js +1 -1
- package/dist/charts/core/distribution/marks.js +1 -1
- package/dist/charts/core/distribution/xy-points.js +1 -1
- package/dist/charts/core/export-menu.js +1 -1
- package/dist/charts/funnel-chart/funnel-chart.js +1 -1
- package/dist/charts/gantt-chart/gantt-chart.js +4 -4
- package/dist/charts/gantt-chart/gantt-marks.js +3 -3
- package/dist/charts/index.d.ts +2 -0
- package/dist/charts/index.js +2 -0
- package/dist/charts/maps/geo/map-data-table.js +1 -1
- package/dist/charts/polar-area-chart/polar-area-chart.js +1 -1
- package/dist/charts/radar-chart/radar-chart.js +1 -1
- package/dist/charts/stock-chart/stock-chart.js +1 -1
- package/dist/charts/stock-chart/stock-drawing-layer.js +3 -3
- package/dist/charts/stock-chart/stock-plot.js +2 -2
- package/dist/containers/chat-thread/chat-thread.d.ts +98 -0
- package/dist/containers/chat-thread/chat-thread.js +219 -0
- package/dist/containers/chat-thread/format.d.ts +20 -0
- package/dist/containers/chat-thread/format.js +50 -0
- package/dist/containers/chat-thread/index.d.ts +1 -0
- package/dist/containers/chat-thread/index.js +8 -0
- package/dist/containers/cols/cols.d.ts +1 -1
- package/dist/containers/cols/cols.js +7 -0
- package/dist/containers/comment/comment.js +1 -1
- package/dist/containers/context-rail/context-rail.d.ts +62 -0
- package/dist/containers/context-rail/context-rail.js +175 -0
- package/dist/containers/context-rail/index.d.ts +1 -0
- package/dist/containers/context-rail/index.js +6 -0
- package/dist/containers/dashboard/dashboard.d.ts +40 -0
- package/dist/containers/dashboard/dashboard.js +84 -0
- package/dist/containers/dashboard/index.d.ts +1 -0
- package/dist/containers/dashboard/index.js +14 -0
- package/dist/containers/data-grid/data-grid.demos.js +4 -4
- package/dist/containers/data-grid/data-grid.js +6 -6
- package/dist/containers/data-grid/filter-builder-editor.js +2 -2
- package/dist/containers/data-grid/grid-toolbar.js +1 -1
- package/dist/containers/data-grid/spreadsheet.demos.d.ts +1 -1
- package/dist/containers/data-grid/spreadsheet.demos.js +1 -1
- package/dist/containers/detail-header/detail-header.d.ts +24 -0
- package/dist/containers/detail-header/detail-header.js +32 -0
- package/dist/containers/detail-header/index.d.ts +1 -0
- package/dist/containers/detail-header/index.js +6 -0
- package/dist/containers/facts/facts.js +1 -1
- package/dist/containers/filter-bar/filter-bar.d.ts +58 -0
- package/dist/containers/filter-bar/filter-bar.js +123 -0
- package/dist/containers/filter-bar/index.d.ts +1 -0
- package/dist/containers/filter-bar/index.js +6 -0
- package/dist/containers/hbars/hbars.js +2 -2
- package/dist/containers/index.d.ts +9 -0
- package/dist/containers/index.js +9 -0
- package/dist/containers/kanban/kanban.d.ts +23 -2
- package/dist/containers/kanban/kanban.js +101 -21
- package/dist/containers/kanban/model.d.ts +12 -0
- package/dist/containers/kanban/model.js +8 -0
- package/dist/containers/kpi/kpi.js +1 -1
- package/dist/containers/kpi-group/kpi-group.d.ts +6 -1
- package/dist/containers/kpi-group/kpi-group.js +6 -2
- package/dist/containers/list-detail/index.d.ts +1 -1
- package/dist/containers/list-detail/index.js +4 -0
- package/dist/containers/list-detail/list-detail.d.ts +51 -3
- package/dist/containers/list-detail/list-detail.js +109 -15
- package/dist/containers/page/page.d.ts +17 -4
- package/dist/containers/page/page.js +33 -4
- package/dist/containers/page-header/back.d.ts +10 -0
- package/dist/containers/page-header/back.js +28 -0
- package/dist/containers/page-header/index.d.ts +1 -0
- package/dist/containers/page-header/index.js +1 -0
- package/dist/containers/page-header/page-header.d.ts +19 -2
- package/dist/containers/page-header/page-header.js +26 -2
- package/dist/containers/pagination/cursor-pagination.d.ts +28 -0
- package/dist/containers/pagination/cursor-pagination.js +48 -0
- package/dist/containers/pagination/index.d.ts +3 -0
- package/dist/containers/pagination/index.js +10 -0
- package/dist/containers/pagination/pagination.d.ts +52 -0
- package/dist/containers/pagination/pagination.js +216 -0
- package/dist/containers/pagination/range.d.ts +29 -0
- package/dist/containers/pagination/range.js +42 -0
- package/dist/containers/pagination/use-pagination.d.ts +18 -0
- package/dist/containers/pagination/use-pagination.js +22 -0
- package/dist/containers/responsive-list/responsive-list.d.ts +28 -2
- package/dist/containers/responsive-list/responsive-list.js +134 -25
- package/dist/containers/row-actions/index.d.ts +1 -0
- package/dist/containers/row-actions/index.js +4 -0
- package/dist/containers/row-actions/row-actions.d.ts +26 -0
- package/dist/containers/row-actions/row-actions.js +78 -0
- package/dist/containers/selectable-card/index.d.ts +1 -0
- package/dist/containers/selectable-card/index.js +6 -0
- package/dist/containers/selectable-card/selectable-card.d.ts +26 -0
- package/dist/containers/selectable-card/selectable-card.js +57 -0
- package/dist/containers/settings-layout/settings-layout.d.ts +24 -7
- package/dist/containers/settings-layout/settings-layout.js +63 -8
- package/dist/containers/shortcuts/shortcuts.js +1 -1
- package/dist/containers/table/cell-padding.d.ts +2 -0
- package/dist/containers/table/cell-padding.js +4 -0
- package/dist/containers/table/index.d.ts +1 -0
- package/dist/containers/table/index.js +8 -0
- package/dist/containers/table/sort.d.ts +14 -0
- package/dist/containers/table/sort.js +11 -0
- package/dist/containers/table/table-parts.d.ts +24 -0
- package/dist/containers/table/table-parts.js +52 -0
- package/dist/containers/table/table.d.ts +37 -3
- package/dist/containers/table/table.js +120 -19
- package/dist/containers/table-columns-menu/index.d.ts +1 -0
- package/dist/containers/table-columns-menu/index.js +6 -0
- package/dist/containers/table-columns-menu/table-columns-menu.d.ts +14 -0
- package/dist/containers/table-columns-menu/table-columns-menu.js +46 -0
- package/dist/dashboards/layout.d.ts +1 -27
- package/dist/dashboards/layout.js +8 -40
- package/dist/forms/chip-group/chip-group.d.ts +5 -0
- package/dist/forms/chip-group/chip-group.js +3 -1
- package/dist/forms/combobox/combobox.js +1 -1
- package/dist/forms/copy-field/copy-field.js +1 -1
- package/dist/forms/date-picker/date-picker.d.ts +3 -1
- package/dist/forms/date-picker/date-picker.js +4 -2
- package/dist/forms/date-picker/date-time-picker.d.ts +8 -2
- package/dist/forms/date-picker/date-time-picker.js +13 -2
- package/dist/forms/field/field.d.ts +9 -2
- package/dist/forms/field/field.js +18 -4
- package/dist/forms/fieldset/fieldset.d.ts +11 -0
- package/dist/forms/fieldset/fieldset.js +12 -0
- package/dist/forms/fieldset/index.d.ts +1 -0
- package/dist/forms/fieldset/index.js +4 -0
- package/dist/forms/form-footer/form-footer.d.ts +26 -0
- package/dist/forms/form-footer/form-footer.js +44 -0
- package/dist/forms/form-footer/index.d.ts +1 -0
- package/dist/forms/form-footer/index.js +4 -0
- package/dist/forms/form-grid/form-grid.d.ts +21 -4
- package/dist/forms/form-grid/form-grid.js +20 -3
- package/dist/forms/form-grid/index.d.ts +1 -1
- package/dist/forms/form-grid/index.js +6 -2
- package/dist/forms/form-section/form-section.d.ts +12 -0
- package/dist/forms/form-section/form-section.js +30 -0
- package/dist/forms/form-section/index.d.ts +1 -0
- package/dist/forms/form-section/index.js +4 -0
- package/dist/forms/index.d.ts +4 -0
- package/dist/forms/index.js +4 -0
- package/dist/forms/input/input.d.ts +6 -2
- package/dist/forms/input/input.js +6 -2
- package/dist/forms/internal/listbox-items.d.ts +1 -1
- package/dist/forms/internal/listbox-items.js +3 -2
- package/dist/forms/native-select/native-select.js +1 -1
- 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/index.d.ts +1 -1
- package/dist/forms/select/select.d.ts +5 -2
- package/dist/forms/select/select.js +7 -2
- package/dist/forms/select-menu/select-menu.js +1 -1
- package/dist/forms/time-input/time-input.d.ts +4 -2
- package/dist/forms/time-input/time-input.js +3 -1
- package/dist/i18n/strings.d.ts +150 -0
- package/dist/i18n/strings.js +80 -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/motion/count-up.d.ts +20 -0
- package/dist/motion/count-up.js +59 -0
- package/dist/motion/cross-fade.d.ts +21 -0
- package/dist/motion/cross-fade.js +86 -0
- package/dist/motion/index.d.ts +5 -0
- package/dist/motion/index.js +14 -0
- package/dist/motion/model.d.ts +15 -0
- package/dist/motion/model.js +68 -0
- package/dist/motion/motion-styles.d.ts +1 -0
- package/dist/motion/motion-styles.js +35 -0
- package/dist/motion/reveal.d.ts +37 -0
- package/dist/motion/reveal.js +69 -0
- package/dist/motion/use-enter-phase.d.ts +11 -0
- package/dist/motion/use-enter-phase.js +40 -0
- package/dist/motion/use-highlight-row.d.ts +22 -0
- package/dist/motion/use-highlight-row.js +38 -0
- package/dist/navigation/tabs/tabs.js +1 -1
- package/dist/navigation/wizard/wizard.d.ts +4 -1
- package/dist/navigation/wizard/wizard.js +3 -0
- package/dist/overlays/alert-dialog/alert-dialog.js +8 -1
- package/dist/overlays/context-menu/context-menu.js +3 -1
- package/dist/overlays/dialog/dialog.js +10 -2
- package/dist/overlays/drawer/drawer.d.ts +18 -4
- package/dist/overlays/drawer/drawer.js +53 -4
- package/dist/overlays/drawer/index.d.ts +1 -1
- package/dist/overlays/dropdown-menu/dropdown-menu.d.ts +1 -1
- package/dist/overlays/dropdown-menu/dropdown-menu.js +5 -4
- package/dist/overlays/hover-card/hover-card.js +2 -0
- package/dist/overlays/popover/popover.js +2 -0
- package/dist/overlays/toaster/index.d.ts +1 -1
- package/dist/overlays/toaster/toaster.d.ts +28 -2
- package/dist/overlays/toaster/toaster.js +73 -29
- package/dist/overlays/tooltip/tooltip.js +2 -0
- package/dist/primitives/use-presence.js +9 -0
- package/dist/shell/app-shell/app-shell.d.ts +8 -1
- package/dist/shell/app-shell/app-shell.js +50 -3
- package/dist/shell/index.d.ts +1 -0
- package/dist/shell/index.js +1 -0
- package/dist/shell/sidebar/sidebar.d.ts +17 -1
- package/dist/shell/sidebar/sidebar.js +126 -76
- package/dist/shell/topbar/topbar.d.ts +4 -2
- package/dist/shell/topbar/topbar.js +2 -0
- package/dist/showcase/operations-bento.js +2 -2
- package/dist/states/empty-state/empty-state.d.ts +10 -3
- package/dist/states/empty-state/empty-state.js +46 -5
- package/dist/states/error-state/error-state.js +1 -1
- package/dist/states/skeleton/skeleton.js +1 -1
- package/dist/utils/class-tokens.generated.js +4 -6
- package/dist/utils/list-navigation.d.ts +14 -0
- package/dist/utils/list-navigation.js +44 -0
- package/dist/utils/overlay-motion.d.ts +12 -0
- package/dist/utils/overlay-motion.js +14 -0
- package/dist/utils/use-container-width.d.ts +6 -0
- package/dist/utils/use-container-width.js +19 -0
- 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 +46 -5
- package/src/ai/code-block/code-block.tsx +1 -1
- package/src/atoms/big-date/big-date.tsx +2 -2
- package/src/atoms/button/button.tsx +33 -6
- package/src/atoms/chip/chip.tsx +8 -3
- package/src/atoms/divider/divider.tsx +40 -0
- package/src/atoms/divider/index.ts +1 -0
- package/src/atoms/icon-button/icon-button.tsx +2 -2
- package/src/atoms/index.ts +1 -0
- package/src/atoms/internal/hit-area.ts +5 -4
- package/src/atoms/progress/index.ts +8 -1
- package/src/atoms/progress/progress.tsx +30 -1
- package/src/atoms/radio-group/radio-group.tsx +1 -1
- package/src/atoms/status-pill/status-pill.tsx +59 -18
- 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/brand/logo-forge.tsx +1 -1
- package/src/charts/candlestick-chart/candlestick-chart.tsx +2 -2
- package/src/charts/chart-grid/chart-grid.tsx +2 -2
- package/src/charts/chord-chart/chord-chart.tsx +1 -1
- package/src/charts/core/axes.tsx +2 -2
- package/src/charts/core/cartesian/annotations.tsx +2 -2
- package/src/charts/core/cartesian/marks.tsx +1 -1
- package/src/charts/core/distribution/marks.tsx +1 -1
- package/src/charts/core/distribution/xy-points.tsx +1 -1
- package/src/charts/core/export-menu.tsx +1 -1
- package/src/charts/funnel-chart/funnel-chart.tsx +1 -1
- package/src/charts/gantt-chart/gantt-chart.tsx +4 -4
- package/src/charts/gantt-chart/gantt-marks.tsx +3 -3
- package/src/charts/index.ts +2 -0
- package/src/charts/maps/geo/map-data-table.tsx +1 -1
- package/src/charts/polar-area-chart/polar-area-chart.tsx +1 -1
- package/src/charts/radar-chart/radar-chart.tsx +1 -1
- package/src/charts/stock-chart/stock-chart.tsx +1 -1
- package/src/charts/stock-chart/stock-drawing-layer.tsx +3 -3
- package/src/charts/stock-chart/stock-plot.tsx +2 -2
- package/src/containers/chat-thread/chat-thread.tsx +331 -0
- package/src/containers/chat-thread/format.ts +67 -0
- package/src/containers/chat-thread/index.ts +12 -0
- package/src/containers/cols/cols.tsx +13 -1
- package/src/containers/comment/comment.tsx +1 -1
- package/src/containers/context-rail/context-rail.tsx +229 -0
- package/src/containers/context-rail/index.ts +7 -0
- package/src/containers/dashboard/dashboard.tsx +142 -0
- package/src/containers/dashboard/index.ts +12 -0
- package/src/containers/data-grid/data-grid.demos.tsx +4 -4
- package/src/containers/data-grid/data-grid.tsx +6 -6
- package/src/containers/data-grid/filter-builder-editor.tsx +2 -2
- package/src/containers/data-grid/grid-toolbar.tsx +1 -1
- package/src/containers/data-grid/spreadsheet.demos.tsx +1 -1
- package/src/containers/detail-header/detail-header.tsx +64 -0
- package/src/containers/detail-header/index.ts +5 -0
- package/src/containers/facts/facts.tsx +1 -1
- package/src/containers/filter-bar/filter-bar.tsx +201 -0
- package/src/containers/filter-bar/index.ts +7 -0
- package/src/containers/hbars/hbars.tsx +2 -2
- package/src/containers/index.ts +9 -0
- package/src/containers/kanban/kanban.tsx +146 -39
- package/src/containers/kanban/model.ts +20 -0
- package/src/containers/kpi/kpi.tsx +1 -1
- package/src/containers/kpi-group/kpi-group.tsx +17 -2
- package/src/containers/list-detail/index.ts +5 -0
- package/src/containers/list-detail/list-detail.tsx +157 -9
- package/src/containers/page/page.tsx +61 -7
- package/src/containers/page-header/back.tsx +42 -0
- package/src/containers/page-header/index.ts +1 -0
- package/src/containers/page-header/page-header.tsx +49 -3
- package/src/containers/pagination/cursor-pagination.tsx +79 -0
- package/src/containers/pagination/index.ts +7 -0
- package/src/containers/pagination/pagination.tsx +266 -0
- package/src/containers/pagination/range.ts +68 -0
- package/src/containers/pagination/use-pagination.ts +44 -0
- package/src/containers/responsive-list/responsive-list.tsx +183 -46
- package/src/containers/row-actions/index.ts +1 -0
- package/src/containers/row-actions/row-actions.tsx +114 -0
- package/src/containers/selectable-card/index.ts +5 -0
- package/src/containers/selectable-card/selectable-card.tsx +84 -0
- package/src/containers/settings-layout/settings-layout.tsx +104 -13
- package/src/containers/shortcuts/shortcuts.tsx +1 -1
- package/src/containers/table/cell-padding.ts +2 -0
- package/src/containers/table/index.ts +6 -0
- package/src/containers/table/sort.ts +23 -0
- package/src/containers/table/table-parts.tsx +81 -0
- package/src/containers/table/table.tsx +212 -45
- package/src/containers/table-columns-menu/index.ts +5 -0
- package/src/containers/table-columns-menu/table-columns-menu.tsx +68 -0
- package/src/dashboards/layout.tsx +8 -75
- package/src/forms/chip-group/chip-group.tsx +8 -1
- package/src/forms/combobox/combobox.tsx +1 -1
- package/src/forms/copy-field/copy-field.tsx +1 -1
- package/src/forms/date-picker/date-picker.tsx +7 -2
- package/src/forms/date-picker/date-time-picker.tsx +28 -2
- package/src/forms/field/field.tsx +30 -3
- package/src/forms/fieldset/fieldset.tsx +22 -0
- package/src/forms/fieldset/index.ts +1 -0
- package/src/forms/form-footer/form-footer.tsx +74 -0
- package/src/forms/form-footer/index.ts +1 -0
- package/src/forms/form-grid/form-grid.tsx +42 -5
- package/src/forms/form-grid/index.ts +8 -1
- package/src/forms/form-section/form-section.tsx +41 -0
- package/src/forms/form-section/index.ts +1 -0
- package/src/forms/index.ts +4 -0
- package/src/forms/input/input.tsx +12 -3
- package/src/forms/internal/listbox-items.tsx +3 -4
- package/src/forms/native-select/native-select.tsx +1 -1
- package/src/forms/password-input/index.ts +1 -0
- package/src/forms/password-input/password-input.tsx +57 -0
- package/src/forms/select/index.ts +1 -1
- package/src/forms/select/select.tsx +14 -3
- package/src/forms/select-menu/select-menu.tsx +1 -1
- package/src/forms/time-input/time-input.tsx +6 -2
- package/src/i18n/strings.ts +150 -0
- 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/motion/count-up.tsx +83 -0
- package/src/motion/cross-fade.tsx +139 -0
- package/src/motion/index.ts +5 -0
- package/src/motion/model.ts +86 -0
- package/src/motion/motion-styles.tsx +47 -0
- package/src/motion/reveal.tsx +115 -0
- package/src/motion/use-enter-phase.ts +50 -0
- package/src/motion/use-highlight-row.ts +63 -0
- package/src/navigation/tabs/tabs.tsx +1 -1
- package/src/navigation/wizard/wizard.tsx +6 -1
- package/src/overlays/alert-dialog/alert-dialog.tsx +5 -1
- package/src/overlays/context-menu/context-menu.tsx +3 -2
- package/src/overlays/dialog/dialog.tsx +7 -2
- package/src/overlays/drawer/drawer.tsx +68 -6
- package/src/overlays/drawer/index.ts +1 -0
- package/src/overlays/dropdown-menu/dropdown-menu.tsx +5 -4
- package/src/overlays/hover-card/hover-card.tsx +2 -0
- package/src/overlays/popover/popover.tsx +2 -0
- package/src/overlays/toaster/index.ts +2 -0
- package/src/overlays/toaster/toaster.tsx +113 -17
- package/src/overlays/tooltip/tooltip.tsx +2 -0
- package/src/primitives/use-presence.ts +13 -0
- package/src/shell/app-shell/app-shell.tsx +54 -2
- package/src/shell/index.ts +1 -0
- package/src/shell/sidebar/sidebar.tsx +154 -75
- package/src/shell/topbar/topbar.tsx +8 -0
- package/src/showcase/operations-bento.tsx +2 -2
- package/src/states/empty-state/empty-state.tsx +52 -9
- package/src/states/error-state/error-state.tsx +1 -1
- package/src/states/skeleton/skeleton.tsx +1 -1
- package/src/utils/class-tokens.generated.ts +4 -6
- package/src/utils/list-navigation.ts +63 -0
- package/src/utils/overlay-motion.ts +33 -0
- package/src/utils/use-container-width.ts +24 -0
- package/styles/Theme.kt +15 -18
- package/styles/tailwind.css +29 -28
- package/styles/theme.css +29 -28
- package/styles/tokens.css +46 -0
- package/tokens/default.json +51 -29
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import type { CSSProperties } from "react";
|
|
4
|
+
import type { AuthVariantProps } from "../auth-illustration/look.js";
|
|
5
|
+
import {
|
|
6
|
+
isoBox,
|
|
7
|
+
isoPoint,
|
|
8
|
+
keystroke,
|
|
9
|
+
MOSAIC_GLYPH_TILES,
|
|
10
|
+
MOSAIC_SIZES,
|
|
11
|
+
mosaicFilled,
|
|
12
|
+
mosaicGlint,
|
|
13
|
+
mosaicTiles,
|
|
14
|
+
} from "../auth-illustration/model.js";
|
|
15
|
+
import { PORTAL_GLYPHS } from "../internal/portal-glyphs.js";
|
|
16
|
+
|
|
17
|
+
/** Side of the tiled floor, the platform's margin and thickness, and the tiles' depth, in iso units. */
|
|
18
|
+
const FLOOR = 260;
|
|
19
|
+
const MARGIN = 12;
|
|
20
|
+
const BASE_H = 26;
|
|
21
|
+
const TILE_H = 14;
|
|
22
|
+
const GAP = 3;
|
|
23
|
+
const VIEW = { x: -270, y: -215, w: 540, h: 400 } as const;
|
|
24
|
+
const CENTER_Y = VIEW.y + VIEW.h / 2;
|
|
25
|
+
|
|
26
|
+
const PLATFORM = isoBox(FLOOR + MARGIN * 2, FLOOR + MARGIN * 2, BASE_H);
|
|
27
|
+
const SHADOW = isoBox(FLOOR + MARGIN * 2 + 30, FLOOR + MARGIN * 2 + 30, 0).top;
|
|
28
|
+
|
|
29
|
+
/** Everything above the platform's two front edges: tile sides below the floor stay hidden. */
|
|
30
|
+
const CLIP = (() => {
|
|
31
|
+
const half = FLOOR / 2 + MARGIN;
|
|
32
|
+
const left = isoPoint(-half, half, BASE_H);
|
|
33
|
+
const front = isoPoint(half, half, BASE_H);
|
|
34
|
+
const right = isoPoint(half, -half, BASE_H);
|
|
35
|
+
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`;
|
|
36
|
+
})();
|
|
37
|
+
|
|
38
|
+
/** The tiled floor seen from above, raised a little so lifted tiles stay inside it. */
|
|
39
|
+
const FLOOR_TOP = isoBox(FLOOR + MARGIN * 2, FLOOR + MARGIN * 2, BASE_H + 10).top;
|
|
40
|
+
/**
|
|
41
|
+
* A soft horizontal band, parked just above the floor: on this floor a diagonal of tiles is a
|
|
42
|
+
* screen row, so moving it 375px down sweeps the tiles in order.
|
|
43
|
+
*/
|
|
44
|
+
const BAND = { x: -280, y: -251, w: 560, h: 72 } as const;
|
|
45
|
+
/** The idle sheen and the error sweep. */
|
|
46
|
+
const BANDS = ["sheen", "alarm"] as const;
|
|
47
|
+
|
|
48
|
+
const GRIDS = MOSAIC_SIZES.map((n) => {
|
|
49
|
+
const size = FLOOR / n;
|
|
50
|
+
const face = size - GAP;
|
|
51
|
+
const shape = isoBox(face, face, TILE_H);
|
|
52
|
+
const inset = face * 0.07;
|
|
53
|
+
const corner = isoPoint(-face / 2 + inset, -face / 2 + inset, TILE_H);
|
|
54
|
+
const k = (face - inset * 2) / 100;
|
|
55
|
+
const glyphTransform = `translate(${corner.x} ${corner.y}) matrix(${0.866 * k} ${0.5 * k} ${-0.866 * k} ${0.5 * k} 0 0)`;
|
|
56
|
+
const glyphs = MOSAIC_GLYPH_TILES[n];
|
|
57
|
+
const tiles = mosaicTiles(n).map((tile) => {
|
|
58
|
+
const at = isoPoint(
|
|
59
|
+
-FLOOR / 2 + (tile.col + 0.5) * size,
|
|
60
|
+
-FLOOR / 2 + (tile.row + 0.5) * size,
|
|
61
|
+
BASE_H - TILE_H,
|
|
62
|
+
);
|
|
63
|
+
const glyph = glyphs.findIndex(([row, col]) => row === tile.row && col === tile.col);
|
|
64
|
+
const top = isoPoint(0, 0, TILE_H);
|
|
65
|
+
return {
|
|
66
|
+
...tile,
|
|
67
|
+
at,
|
|
68
|
+
glyph,
|
|
69
|
+
tx: Math.round(((at.x + top.x) / (VIEW.w / 2)) * 1000) / 1000,
|
|
70
|
+
ty: Math.round(((at.y + top.y - CENTER_Y) / (VIEW.h / 2)) * 1000) / 1000,
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
return { n, shape, glyphTransform, tiles };
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Only the floor on screen animates. The other two sizes stay in the markup for the container
|
|
78
|
+
* queries, and Chrome still runs animations inside a hidden SVG group, so a hidden grid names no
|
|
79
|
+
* animation: the visible one sets the names through custom properties (an unset one leaves the
|
|
80
|
+
* `animation` declaration invalid, which means none).
|
|
81
|
+
*/
|
|
82
|
+
const ON = '.ui-msc-grid[data-n="';
|
|
83
|
+
const SHOW =
|
|
84
|
+
"display:inline;--b:ui-msc-bob;--r:ui-msc-ripple;--g0:ui-msc-glint-0;--g1:ui-msc-glint-1";
|
|
85
|
+
|
|
86
|
+
const CSS = `
|
|
87
|
+
@keyframes ui-msc-glint-0{35%{transform:translateY(-9px)}}
|
|
88
|
+
@keyframes ui-msc-glint-1{35%{transform:translateY(-9px)}}
|
|
89
|
+
@keyframes ui-msc-sheen{58%{transform:none}86%,to{transform:translateY(375px)}}
|
|
90
|
+
@keyframes ui-msc-sweep{to{transform:translateY(375px)}}
|
|
91
|
+
@keyframes ui-msc-ripple{40%{transform:translateY(-12px)}75%{transform:translateY(2px)}}
|
|
92
|
+
@keyframes ui-msc-bob{50%{transform:translateY(-5px)}}
|
|
93
|
+
@keyframes ui-msc-rise{from{opacity:0;transform:translateY(40px)}}
|
|
94
|
+
.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)}
|
|
95
|
+
.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)}
|
|
96
|
+
.ui-msc-grid{display:none}
|
|
97
|
+
@container art (width<24rem){${ON}4"]{${SHOW}}}
|
|
98
|
+
@container art (24rem<=width<34rem){.ui-msc{scale:.88}${ON}5"]{${SHOW}}}
|
|
99
|
+
@container art (width>=34rem){.ui-msc{scale:.9}${ON}6"]{${SHOW}}}
|
|
100
|
+
.ui-msc-stage{animation:ui-msc-rise .9s var(--ua-land) backwards .1s}
|
|
101
|
+
.ui-msc-shadow{fill:var(--ua-shadow)}
|
|
102
|
+
.ui-msc-base-top{fill:var(--msc-base)}
|
|
103
|
+
.ui-msc-base-left{fill:color-mix(in srgb,var(--msc-base) 82%,black)}
|
|
104
|
+
.ui-msc-base-right{fill:color-mix(in srgb,var(--msc-base) 66%,black)}
|
|
105
|
+
.ui-msc-dots{fill:color-mix(in srgb,black 28%,transparent)}
|
|
106
|
+
.ui-msc-edge{stroke:var(--msc-edge,var(--ua-edge));stroke-width:2.2;stroke-linejoin:round}
|
|
107
|
+
.ui-auth-art[data-state=error] .ui-msc{--msc-edge:color-mix(in srgb,var(--danger) 70%,var(--ua-edge))}
|
|
108
|
+
.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)}
|
|
109
|
+
.ui-msc-tile[data-lit]{--top:var(--msc-lit)}
|
|
110
|
+
.ui-msc-tile[data-active]{--top:var(--msc-active)}
|
|
111
|
+
.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)}
|
|
112
|
+
.ui-msc-tile-top{fill:var(--msc-tile);stroke:var(--msc-grout);stroke-width:1.2;stroke-linejoin:round}
|
|
113
|
+
.ui-msc-tile[data-active] .ui-msc-tile-top{fill:var(--msc-active)}
|
|
114
|
+
.ui-msc-litface{fill:var(--msc-lit);opacity:var(--lit);transition:opacity .35s linear;transition-delay:calc(var(--d) * 28ms)}
|
|
115
|
+
.ui-msc-tile[data-active] .ui-msc-litface{opacity:0}
|
|
116
|
+
.ui-msc-tile-left{fill:color-mix(in srgb,var(--top) 78%,black)}
|
|
117
|
+
.ui-msc-side{opacity:max(var(--lit),var(--act));transition:opacity .2s linear;transition-delay:calc(var(--d) * 28ms)}
|
|
118
|
+
.ui-msc-tile-right{fill:color-mix(in srgb,var(--top) 62%,black)}
|
|
119
|
+
.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}
|
|
120
|
+
.ui-msc-glow{fill:var(--msc-glow);opacity:calc(var(--glow) * .7);transition:opacity .25s linear}
|
|
121
|
+
.ui-msc-sheen-stop{stop-color:white}
|
|
122
|
+
.ui-msc-alarm-stop{stop-color:var(--danger)}
|
|
123
|
+
.ui-msc-sheen{opacity:.5;animation:ui-msc-sheen 5s ease-in-out infinite}
|
|
124
|
+
.ui-auth-art[data-state=success] .ui-msc-sheen{opacity:.9;animation:ui-msc-sweep 1.1s .25s var(--ua-glide) backwards}
|
|
125
|
+
.ui-msc-alarm{opacity:.85}
|
|
126
|
+
.ui-auth-art[data-state=error] .ui-msc-alarm{animation:ui-msc-sweep .8s var(--ua-glide) both}
|
|
127
|
+
.ui-msc-bob{animation:var(--b) 3.2s ease-in-out infinite}
|
|
128
|
+
.ui-msc-glint-0{animation:var(--g0) .4s var(--ua-glide)}
|
|
129
|
+
.ui-msc-glint-1{animation:var(--g1) .4s var(--ua-glide)}
|
|
130
|
+
.ui-auth-art[data-state=success] .ui-msc-pop{animation:var(--r) .6s var(--ua-glide) backwards;animation-delay:calc(.25s + var(--ring) * 75ms)}
|
|
131
|
+
.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)}
|
|
132
|
+
.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)}
|
|
133
|
+
.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)}
|
|
134
|
+
.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)}
|
|
135
|
+
@media (prefers-reduced-motion:reduce){
|
|
136
|
+
.ui-msc *{animation:none!important}
|
|
137
|
+
.ui-auth-art[data-state=error] .ui-msc-alarm{opacity:.5;transform:translateY(916px) scaleY(4.4)}
|
|
138
|
+
.ui-msc-lift,.ui-msc-litface,.ui-msc-side{transition:none}
|
|
139
|
+
}
|
|
140
|
+
`;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* A living floor of isometric tiles on a platform. The tiles light diagonally as the form fills,
|
|
144
|
+
* glint on each keystroke and glow under the pointer, and a soft sheen crosses the floor now and
|
|
145
|
+
* 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
|
|
146
|
+
* stands raised. Its container picks a 4, 5 or 6 tile wide floor.
|
|
147
|
+
*/
|
|
148
|
+
export function Mosaic({ state, progress, activeIndex, uid }: AuthVariantProps) {
|
|
149
|
+
const dots = `url(#${uid}-mosaic-dots)`;
|
|
150
|
+
// The glint class of the last keystroke stays on through every state, so leaving an error does
|
|
151
|
+
// not replay it (a CSS animation restarts only when its class changes).
|
|
152
|
+
const tick = keystroke(progress);
|
|
153
|
+
return (
|
|
154
|
+
<>
|
|
155
|
+
<style href="jcsoftdev-ui-auth-mosaic" precedence="default">
|
|
156
|
+
{CSS}
|
|
157
|
+
</style>
|
|
158
|
+
{/* biome-ignore lint/a11y/noSvgWithoutTitle: the wrapper names the illustration or hides it */}
|
|
159
|
+
<svg viewBox={`${VIEW.x} ${VIEW.y} ${VIEW.w} ${VIEW.h}`} focusable="false" className="ui-msc">
|
|
160
|
+
<defs>
|
|
161
|
+
<pattern id={`${uid}-mosaic-dots`} width="5" height="5" patternUnits="userSpaceOnUse">
|
|
162
|
+
<circle className="ui-msc-dots" cx="2.5" cy="2.5" r="1" />
|
|
163
|
+
</pattern>
|
|
164
|
+
<clipPath id={`${uid}-mosaic-clip`}>
|
|
165
|
+
<path d={CLIP} />
|
|
166
|
+
</clipPath>
|
|
167
|
+
<clipPath id={`${uid}-mosaic-floor`}>
|
|
168
|
+
<path d={FLOOR_TOP} />
|
|
169
|
+
</clipPath>
|
|
170
|
+
{BANDS.map((band) => (
|
|
171
|
+
<linearGradient key={band} id={`${uid}-mosaic-${band}`} x1="0" y1="0" x2="0" y2="1">
|
|
172
|
+
<stop className={`ui-msc-${band}-stop`} offset="0" stopOpacity="0" />
|
|
173
|
+
<stop className={`ui-msc-${band}-stop`} offset=".5" stopOpacity="1" />
|
|
174
|
+
<stop className={`ui-msc-${band}-stop`} offset="1" stopOpacity="0" />
|
|
175
|
+
</linearGradient>
|
|
176
|
+
))}
|
|
177
|
+
</defs>
|
|
178
|
+
<g className="ui-msc-stage">
|
|
179
|
+
<path className="ui-msc-shadow" d={SHADOW} transform="translate(16 18)" />
|
|
180
|
+
<path className="ui-msc-base-left ui-msc-edge" d={PLATFORM.left} />
|
|
181
|
+
<path className="ui-msc-base-right ui-msc-edge" d={PLATFORM.right} />
|
|
182
|
+
<path d={PLATFORM.left} fill={dots} />
|
|
183
|
+
<path d={PLATFORM.right} fill={dots} />
|
|
184
|
+
<path className="ui-msc-base-top ui-msc-edge" d={PLATFORM.top} />
|
|
185
|
+
<g clipPath={`url(#${uid}-mosaic-clip)`}>
|
|
186
|
+
{GRIDS.map(({ n, shape, glyphTransform, tiles }) => {
|
|
187
|
+
const lit = mosaicFilled(state, progress, n);
|
|
188
|
+
const glint = mosaicGlint(tick.count, n);
|
|
189
|
+
return (
|
|
190
|
+
<g key={n} className="ui-msc-grid" data-n={n}>
|
|
191
|
+
{tiles.map((tile, k) => {
|
|
192
|
+
const on = tile.diagonal < lit;
|
|
193
|
+
const active = tile.glyph >= 0 && tile.glyph === activeIndex;
|
|
194
|
+
const vars = {
|
|
195
|
+
"--d": tile.diagonal,
|
|
196
|
+
"--ring": tile.ring,
|
|
197
|
+
"--lit": on ? 1 : 0,
|
|
198
|
+
"--act": active ? 1 : 0,
|
|
199
|
+
"--tx": tile.tx,
|
|
200
|
+
"--ty": tile.ty,
|
|
201
|
+
} as CSSProperties;
|
|
202
|
+
const pop =
|
|
203
|
+
k === glint ? `ui-msc-pop ui-msc-glint-${tick.phase}` : "ui-msc-pop";
|
|
204
|
+
return (
|
|
205
|
+
<g
|
|
206
|
+
key={`${tile.row}:${tile.col}`}
|
|
207
|
+
className="ui-msc-tile"
|
|
208
|
+
data-lit={on || undefined}
|
|
209
|
+
data-active={active || undefined}
|
|
210
|
+
style={vars}
|
|
211
|
+
transform={`translate(${tile.at.x} ${tile.at.y})`}
|
|
212
|
+
>
|
|
213
|
+
<g className="ui-msc-lift">
|
|
214
|
+
<g className={pop}>
|
|
215
|
+
<g className={active ? "ui-msc-bob" : undefined}>
|
|
216
|
+
<path className="ui-msc-side ui-msc-tile-left" d={shape.left} />
|
|
217
|
+
<path className="ui-msc-side ui-msc-tile-right" d={shape.right} />
|
|
218
|
+
<path className="ui-msc-tile-top" d={shape.top} />
|
|
219
|
+
<path className="ui-msc-litface" d={shape.top} />
|
|
220
|
+
<path className="ui-msc-glow" d={shape.top} />
|
|
221
|
+
{tile.glyph >= 0 ? (
|
|
222
|
+
<g className="ui-msc-glyph" transform={glyphTransform}>
|
|
223
|
+
{PORTAL_GLYPHS[tile.glyph]}
|
|
224
|
+
</g>
|
|
225
|
+
) : null}
|
|
226
|
+
</g>
|
|
227
|
+
</g>
|
|
228
|
+
</g>
|
|
229
|
+
</g>
|
|
230
|
+
);
|
|
231
|
+
})}
|
|
232
|
+
</g>
|
|
233
|
+
);
|
|
234
|
+
})}
|
|
235
|
+
</g>
|
|
236
|
+
<g clipPath={`url(#${uid}-mosaic-floor)`}>
|
|
237
|
+
{BANDS.map((band) => (
|
|
238
|
+
<rect
|
|
239
|
+
key={band}
|
|
240
|
+
className={`ui-msc-band ui-msc-${band}`}
|
|
241
|
+
fill={`url(#${uid}-mosaic-${band})`}
|
|
242
|
+
x={BAND.x}
|
|
243
|
+
y={BAND.y}
|
|
244
|
+
width={BAND.w}
|
|
245
|
+
height={BAND.h}
|
|
246
|
+
/>
|
|
247
|
+
))}
|
|
248
|
+
</g>
|
|
249
|
+
</g>
|
|
250
|
+
</svg>
|
|
251
|
+
</>
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
Mosaic.variant = "mosaic";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./slabs.js";
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import type { CSSProperties } from "react";
|
|
4
|
+
import {
|
|
5
|
+
type AuthState,
|
|
6
|
+
keystroke,
|
|
7
|
+
SLAB_COUNT,
|
|
8
|
+
slabPlacement,
|
|
9
|
+
slabSpread,
|
|
10
|
+
sparkVectors,
|
|
11
|
+
} from "../auth-illustration/model.js";
|
|
12
|
+
import { PORTAL_GLYPHS } from "../internal/portal-glyphs.js";
|
|
13
|
+
|
|
14
|
+
/** Rules of the slabs look: colours per slab, depth faces, entrance, parallax, hop and cheer. */
|
|
15
|
+
const CSS = `
|
|
16
|
+
@keyframes ui-auth-drop{0%{opacity:0;transform:translateY(-180px)}45%{opacity:1}}
|
|
17
|
+
@keyframes ui-auth-shadow-in{from{opacity:0;transform:scale(.35)}}
|
|
18
|
+
@keyframes ui-auth-bob{50%{transform:translateY(-7px)}}
|
|
19
|
+
@keyframes ui-auth-hop-0{40%{transform:translateY(-11px)}}
|
|
20
|
+
@keyframes ui-auth-hop-1{40%{transform:translateY(-11px)}}
|
|
21
|
+
@keyframes ui-auth-cheer{35%{transform:translateY(-18px)}70%{transform:translateY(3px)}}
|
|
22
|
+
.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)}
|
|
23
|
+
.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)}
|
|
24
|
+
.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)}
|
|
25
|
+
.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)}
|
|
26
|
+
.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)}
|
|
27
|
+
.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)}
|
|
28
|
+
.ui-auth-art[data-panel=solid] .ui-auth-inlay{stroke:color-mix(in srgb,var(--auth-art-ink) 22%,transparent)}
|
|
29
|
+
.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)}
|
|
30
|
+
.ui-auth-art[data-panel=solid] .ui-auth-slab-tone-0{--glyph-line:var(--auth-art-ink)}
|
|
31
|
+
.ui-auth-art[data-panel=solid] .ui-auth-slab-tone-2{--glyph-line:var(--ua-tint)}
|
|
32
|
+
.ui-auth-art[data-state=error] .ui-auth-slab{--edge:color-mix(in srgb,var(--danger) 70%,var(--ua-edge))}
|
|
33
|
+
.ui-auth-pos{transform:translate(calc(var(--x) * 1px),calc(var(--y) * 1px));transition:transform .85s var(--ua-bounce)}
|
|
34
|
+
.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)}
|
|
35
|
+
.ui-auth-lift{transform:translateY(calc(var(--lift) * -1px));transition:transform .85s var(--ua-bounce)}
|
|
36
|
+
.ui-auth-enter{animation:ui-auth-drop .9s var(--ua-land) backwards;animation-delay:calc(.15s + var(--i) * .14s)}
|
|
37
|
+
.ui-auth-hop-0{animation:ui-auth-hop-0 .32s var(--ua-glide)}
|
|
38
|
+
.ui-auth-hop-1{animation:ui-auth-hop-1 .32s var(--ua-glide)}
|
|
39
|
+
.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)}
|
|
40
|
+
.ui-auth-bob{animation:ui-auth-bob 4.6s ease-in-out infinite;animation-delay:calc(var(--i) * -1.4s)}
|
|
41
|
+
.ui-auth-face-top{fill:var(--top)}
|
|
42
|
+
.ui-auth-face-left{fill:var(--left)}
|
|
43
|
+
.ui-auth-face-right{fill:var(--right)}
|
|
44
|
+
.ui-auth-edge{stroke:var(--edge,var(--ua-edge));stroke-width:2.2;stroke-linejoin:round}
|
|
45
|
+
.ui-auth-dots{fill:var(--dots)}
|
|
46
|
+
.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)}
|
|
47
|
+
.ui-auth-inlay{fill:none;stroke:color-mix(in srgb,var(--ink) 14%,transparent);stroke-width:2}
|
|
48
|
+
@media (prefers-reduced-motion:reduce){
|
|
49
|
+
.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}
|
|
50
|
+
.ui-auth-pos,.ui-auth-lift,.ui-auth-shadow{transition:none}
|
|
51
|
+
.ui-auth-par{transform:none;transition:none}
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
54
|
+
|
|
55
|
+
const THICKNESS = 22;
|
|
56
|
+
const TOP = "M0 0 L86.6 50 L0 100 L-86.6 50Z";
|
|
57
|
+
const LEFT = `M-86.6 50 L0 100 L0 ${100 + THICKNESS} L-86.6 ${50 + THICKNESS}Z`;
|
|
58
|
+
const RIGHT = `M0 100 L86.6 50 L86.6 ${50 + THICKNESS} L0 ${100 + THICKNESS}Z`;
|
|
59
|
+
const SPARK = "M0-11 L3-3 L11 0 L3 3 L0 11 L-3 3 L-11 0 L-3-3Z";
|
|
60
|
+
const SPARKS = sparkVectors();
|
|
61
|
+
|
|
62
|
+
function Slab({
|
|
63
|
+
index,
|
|
64
|
+
spread,
|
|
65
|
+
activeIndex,
|
|
66
|
+
dotsId,
|
|
67
|
+
hop,
|
|
68
|
+
}: {
|
|
69
|
+
index: number;
|
|
70
|
+
spread: number;
|
|
71
|
+
activeIndex: number;
|
|
72
|
+
dotsId: string;
|
|
73
|
+
hop: 0 | 1 | null;
|
|
74
|
+
}) {
|
|
75
|
+
const live = slabPlacement(index, spread, activeIndex);
|
|
76
|
+
const vars = {
|
|
77
|
+
"--i": index,
|
|
78
|
+
"--x": live.x,
|
|
79
|
+
"--y": live.y,
|
|
80
|
+
"--lift": live.lift,
|
|
81
|
+
} as CSSProperties;
|
|
82
|
+
const dots = `url(#${dotsId})`;
|
|
83
|
+
return (
|
|
84
|
+
<g className={`ui-auth-pos ui-auth-slab ui-auth-slab-tone-${index}`} style={vars}>
|
|
85
|
+
<g transform={`translate(24 ${THICKNESS + 22})`}>
|
|
86
|
+
<path className="ui-auth-shadow" d={TOP} />
|
|
87
|
+
</g>
|
|
88
|
+
<g className="ui-auth-par">
|
|
89
|
+
<g className="ui-auth-lift">
|
|
90
|
+
<g className="ui-auth-enter">
|
|
91
|
+
<g className={hop === null ? "ui-auth-hop" : `ui-auth-hop ui-auth-hop-${hop}`}>
|
|
92
|
+
<g className="ui-auth-bob">
|
|
93
|
+
<path className="ui-auth-face-left ui-auth-edge" d={LEFT} />
|
|
94
|
+
<path className="ui-auth-face-right ui-auth-edge" d={RIGHT} />
|
|
95
|
+
<path d={LEFT} fill={dots} />
|
|
96
|
+
<path d={RIGHT} fill={dots} />
|
|
97
|
+
<path className="ui-auth-face-top ui-auth-edge" d={TOP} />
|
|
98
|
+
<g transform="matrix(0.866 0.5 -0.866 0.5 0 0)">
|
|
99
|
+
<rect className="ui-auth-inlay" x="9" y="9" width="82" height="82" rx="8" />
|
|
100
|
+
{PORTAL_GLYPHS[index]}
|
|
101
|
+
</g>
|
|
102
|
+
</g>
|
|
103
|
+
</g>
|
|
104
|
+
</g>
|
|
105
|
+
</g>
|
|
106
|
+
</g>
|
|
107
|
+
</g>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface SlabsProps {
|
|
112
|
+
state: AuthState;
|
|
113
|
+
progress: number;
|
|
114
|
+
activeIndex: number;
|
|
115
|
+
/** Unique within the page; names the halftone pattern. */
|
|
116
|
+
uid: string;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/** Three isometric portal slabs that float apart at rest and assemble as the form fills. */
|
|
120
|
+
export function Slabs({ state, progress, activeIndex, uid }: SlabsProps) {
|
|
121
|
+
const spread = slabSpread(state, progress);
|
|
122
|
+
const dotsId = `${uid}-dots`;
|
|
123
|
+
// The last keystroke's hop class stays on through every state: a CSS animation restarts only
|
|
124
|
+
// when its class changes, so an error settling back to password, or a refocus, never hops.
|
|
125
|
+
const tick = keystroke(progress, SLAB_COUNT);
|
|
126
|
+
return (
|
|
127
|
+
<>
|
|
128
|
+
<style href="jcsoftdev-ui-auth-slabs" precedence="default">
|
|
129
|
+
{CSS}
|
|
130
|
+
</style>
|
|
131
|
+
{/* biome-ignore lint/a11y/noSvgWithoutTitle: the wrapper names the illustration or hides it */}
|
|
132
|
+
<svg
|
|
133
|
+
viewBox="40 60 560 440"
|
|
134
|
+
focusable="false"
|
|
135
|
+
style={{ "--spread": spread } as CSSProperties}
|
|
136
|
+
>
|
|
137
|
+
<defs>
|
|
138
|
+
<pattern id={dotsId} width="5" height="5" patternUnits="userSpaceOnUse">
|
|
139
|
+
<circle className="ui-auth-dots" cx="2.5" cy="2.5" r="1" />
|
|
140
|
+
</pattern>
|
|
141
|
+
</defs>
|
|
142
|
+
{Array.from({ length: SLAB_COUNT }, (_, index) => (
|
|
143
|
+
<Slab
|
|
144
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: the three slabs are fixed
|
|
145
|
+
key={index}
|
|
146
|
+
index={index}
|
|
147
|
+
spread={spread}
|
|
148
|
+
activeIndex={activeIndex}
|
|
149
|
+
dotsId={dotsId}
|
|
150
|
+
hop={tick.count > 0 && tick.target === index ? tick.phase : null}
|
|
151
|
+
/>
|
|
152
|
+
))}
|
|
153
|
+
{state === "success" ? (
|
|
154
|
+
<g>
|
|
155
|
+
{SPARKS.map((spark, n) => (
|
|
156
|
+
<g key={`${spark.dx}:${spark.dy}`} transform="translate(320 250)">
|
|
157
|
+
{n % 2 ? (
|
|
158
|
+
<circle
|
|
159
|
+
className="ui-auth-spark"
|
|
160
|
+
data-tone={n % 4}
|
|
161
|
+
r="5"
|
|
162
|
+
style={{ "--dx": `${spark.dx}px`, "--dy": `${spark.dy}px` } as CSSProperties}
|
|
163
|
+
/>
|
|
164
|
+
) : (
|
|
165
|
+
<path
|
|
166
|
+
className="ui-auth-spark"
|
|
167
|
+
data-tone={n % 4}
|
|
168
|
+
d={SPARK}
|
|
169
|
+
style={{ "--dx": `${spark.dx}px`, "--dy": `${spark.dy}px` } as CSSProperties}
|
|
170
|
+
/>
|
|
171
|
+
)}
|
|
172
|
+
</g>
|
|
173
|
+
))}
|
|
174
|
+
</g>
|
|
175
|
+
) : null}
|
|
176
|
+
</svg>
|
|
177
|
+
</>
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
Slabs.variant = "slabs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./stack.js";
|