magnaui 0.1.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/LICENSE +38 -0
- package/LICENSES/Apache-2.0.txt +202 -0
- package/LICENSES/Libraries.dev-MIT.txt +21 -0
- package/LICENSES/Tiptap-MIT.txt +21 -0
- package/LICENSES/metal-fx-NOTICE.txt +22 -0
- package/LICENSES/three-MIT.txt +21 -0
- package/README.md +73 -0
- package/THIRD_PARTY_NOTICES.md +72 -0
- package/dist/assets/agent-studio.png +0 -0
- package/dist/assets/api-studio.png +0 -0
- package/dist/assets/app-store.png +0 -0
- package/dist/assets/approvals.png +0 -0
- package/dist/assets/assistant.png +0 -0
- package/dist/assets/brain.png +0 -0
- package/dist/assets/browser.png +0 -0
- package/dist/assets/checkbox/check.svg +3 -0
- package/dist/assets/checkbox/indeterminate.svg +3 -0
- package/dist/assets/code.png +0 -0
- package/dist/assets/connect-ai.png +0 -0
- package/dist/assets/connections.png +0 -0
- package/dist/assets/database.png +0 -0
- package/dist/assets/display/06153.svg +5 -0
- package/dist/assets/display/106a6.svg +22 -0
- package/dist/assets/display/16525.svg +5 -0
- package/dist/assets/display/18a45.svg +5 -0
- package/dist/assets/display/1c133.svg +5 -0
- package/dist/assets/display/1c6fa.svg +5 -0
- package/dist/assets/display/1db47.svg +5 -0
- package/dist/assets/display/237a6.svg +5 -0
- package/dist/assets/display/27ca8.svg +5 -0
- package/dist/assets/display/347ef.svg +22 -0
- package/dist/assets/display/35edd.svg +5 -0
- package/dist/assets/display/38def.svg +5 -0
- package/dist/assets/display/3a834.svg +5 -0
- package/dist/assets/display/3e51d.svg +5 -0
- package/dist/assets/display/3f95e.svg +5 -0
- package/dist/assets/display/400d1.svg +5 -0
- package/dist/assets/display/4239a.svg +5 -0
- package/dist/assets/display/4477e.svg +22 -0
- package/dist/assets/display/46574.svg +5 -0
- package/dist/assets/display/469e4.svg +5 -0
- package/dist/assets/display/48559.svg +22 -0
- package/dist/assets/display/4e103.svg +22 -0
- package/dist/assets/display/4ef80.svg +5 -0
- package/dist/assets/display/51b32.svg +22 -0
- package/dist/assets/display/5320a.svg +5 -0
- package/dist/assets/display/56a7a.svg +22 -0
- package/dist/assets/display/56cab.svg +5 -0
- package/dist/assets/display/5fc70.svg +22 -0
- package/dist/assets/display/60ab5.svg +22 -0
- package/dist/assets/display/60c44.svg +5 -0
- package/dist/assets/display/61721.svg +5 -0
- package/dist/assets/display/648b1.svg +5 -0
- package/dist/assets/display/65aad.svg +5 -0
- package/dist/assets/display/665bc.svg +5 -0
- package/dist/assets/display/691ac.svg +22 -0
- package/dist/assets/display/6a48e.svg +5 -0
- package/dist/assets/display/6af80.svg +22 -0
- package/dist/assets/display/6c384.svg +5 -0
- package/dist/assets/display/6c7fb.svg +5 -0
- package/dist/assets/display/6ce08.svg +22 -0
- package/dist/assets/display/76be1.svg +5 -0
- package/dist/assets/display/79287.svg +5 -0
- package/dist/assets/display/7ea85.svg +5 -0
- package/dist/assets/display/7eeaf.svg +5 -0
- package/dist/assets/display/82602.svg +5 -0
- package/dist/assets/display/8a43e.svg +5 -0
- package/dist/assets/display/8bdb8.svg +22 -0
- package/dist/assets/display/8d235.svg +5 -0
- package/dist/assets/display/90498.svg +22 -0
- package/dist/assets/display/908e9.svg +5 -0
- package/dist/assets/display/90942.svg +5 -0
- package/dist/assets/display/943fb.svg +5 -0
- package/dist/assets/display/96ddd.svg +22 -0
- package/dist/assets/display/9e5a0.svg +22 -0
- package/dist/assets/display/9e9ac.svg +5 -0
- package/dist/assets/display/a35a7.svg +22 -0
- package/dist/assets/display/af15f.svg +5 -0
- package/dist/assets/display/b04fe.svg +5 -0
- package/dist/assets/display/b0925.svg +5 -0
- package/dist/assets/display/b464b.svg +5 -0
- package/dist/assets/display/b8efe.svg +5 -0
- package/dist/assets/display/bbddb.svg +5 -0
- package/dist/assets/display/bd61c.svg +5 -0
- package/dist/assets/display/be577.svg +5 -0
- package/dist/assets/display/bf02d.svg +5 -0
- package/dist/assets/display/bf1dc.svg +5 -0
- package/dist/assets/display/c70b6.svg +5 -0
- package/dist/assets/display/c8a01.svg +5 -0
- package/dist/assets/display/cb00b.svg +22 -0
- package/dist/assets/display/cecfd.svg +5 -0
- package/dist/assets/display/d2cc2.svg +5 -0
- package/dist/assets/display/d428d.svg +22 -0
- package/dist/assets/display/d71e2.svg +22 -0
- package/dist/assets/display/d8f1d.svg +22 -0
- package/dist/assets/display/d92e5.svg +5 -0
- package/dist/assets/display/d9698.svg +5 -0
- package/dist/assets/display/e542b.svg +5 -0
- package/dist/assets/display/e59af.svg +5 -0
- package/dist/assets/display/e5a41.svg +5 -0
- package/dist/assets/display/e894a.svg +5 -0
- package/dist/assets/display/ea9e5.svg +5 -0
- package/dist/assets/display/eac01.svg +5 -0
- package/dist/assets/display/ec734.svg +5 -0
- package/dist/assets/display/edb55.svg +5 -0
- package/dist/assets/display/ee164.svg +5 -0
- package/dist/assets/display/f01d5.svg +5 -0
- package/dist/assets/display/f479a.svg +22 -0
- package/dist/assets/display/f8ebb.svg +22 -0
- package/dist/assets/display/fb8ab.svg +5 -0
- package/dist/assets/display/fbdce.svg +5 -0
- package/dist/assets/docs.png +0 -0
- package/dist/assets/editor/align-left.svg +5 -0
- package/dist/assets/editor/arrow-down.svg +5 -0
- package/dist/assets/editor/arrow-up.svg +5 -0
- package/dist/assets/editor/at.svg +5 -0
- package/dist/assets/editor/bold-active.svg +5 -0
- package/dist/assets/editor/bold-strong.svg +5 -0
- package/dist/assets/editor/bold.svg +5 -0
- package/dist/assets/editor/comment.svg +5 -0
- package/dist/assets/editor/divider-more.svg +5 -0
- package/dist/assets/editor/divider.svg +5 -0
- package/dist/assets/editor/duration-check.svg +3 -0
- package/dist/assets/editor/italic.svg +5 -0
- package/dist/assets/editor/link.svg +5 -0
- package/dist/assets/editor/more.svg +5 -0
- package/dist/assets/editor/status-available.svg +5 -0
- package/dist/assets/editor/status-busy.svg +5 -0
- package/dist/assets/editor/status-disabled.svg +5 -0
- package/dist/assets/editor/status-in-meeting.svg +5 -0
- package/dist/assets/editor/status-offline.svg +5 -0
- package/dist/assets/editor/strike.svg +5 -0
- package/dist/assets/editor/time-check.svg +3 -0
- package/dist/assets/editor/underline.svg +5 -0
- package/dist/assets/expenses.png +0 -0
- package/dist/assets/feeds/activity-more.svg +5 -0
- package/dist/assets/feeds/activity-user.svg +5 -0
- package/dist/assets/feeds/attachment.svg +5 -0
- package/dist/assets/feeds/calendar.svg +5 -0
- package/dist/assets/feeds/comment.svg +5 -0
- package/dist/assets/feeds/download-hover.svg +5 -0
- package/dist/assets/feeds/download.svg +5 -0
- package/dist/assets/feeds/filter.svg +5 -0
- package/dist/assets/feeds/header-calendar.svg +5 -0
- package/dist/assets/feeds/notification-attachment.svg +5 -0
- package/dist/assets/feeds/notification-company.svg +17 -0
- package/dist/assets/feeds/notification-filter.svg +5 -0
- package/dist/assets/feeds/notification-more.svg +5 -0
- package/dist/assets/feeds/search.svg +5 -0
- package/dist/assets/feeds/selected-filter-active.svg +5 -0
- package/dist/assets/feeds/selected-filter.svg +5 -0
- package/dist/assets/feeds/settings.svg +5 -0
- package/dist/assets/feeds/sort.svg +5 -0
- package/dist/assets/feeds/status-error.svg +5 -0
- package/dist/assets/feeds/status-pending.svg +5 -0
- package/dist/assets/feeds/status-success.svg +5 -0
- package/dist/assets/feeds/status-warning.svg +5 -0
- package/dist/assets/feeds/upload-avatar-empty56.svg +13 -0
- package/dist/assets/feeds/upload-avatar-empty64.svg +13 -0
- package/dist/assets/feeds/upload-cancel.svg +5 -0
- package/dist/assets/feeds/upload-company-empty.svg +42 -0
- package/dist/assets/feeds/upload-company.svg +17 -0
- package/dist/assets/feeds/upload-delete-error.svg +5 -0
- package/dist/assets/feeds/upload-delete.svg +5 -0
- package/dist/assets/feeds/upload-error.svg +5 -0
- package/dist/assets/feeds/upload-loading.svg +5 -0
- package/dist/assets/feeds/upload-success.svg +5 -0
- package/dist/assets/feeds/vertical-arrow.svg +5 -0
- package/dist/assets/feeds/vertical-calendar-active.svg +5 -0
- package/dist/assets/feeds/vertical-calendar-hover.svg +5 -0
- package/dist/assets/feeds/vertical-calendar.svg +5 -0
- package/dist/assets/file.png +0 -0
- package/dist/assets/folder.png +0 -0
- package/dist/assets/forms/07b3a.png +0 -0
- package/dist/assets/forms/09fe0.svg +5 -0
- package/dist/assets/forms/11a76.svg +5 -0
- package/dist/assets/forms/185ae.svg +5 -0
- package/dist/assets/forms/1f174.svg +5 -0
- package/dist/assets/forms/29541.svg +5 -0
- package/dist/assets/forms/2b6f8.svg +5 -0
- package/dist/assets/forms/36c22.svg +5 -0
- package/dist/assets/forms/4cb9a.svg +5 -0
- package/dist/assets/forms/4ff30.png +0 -0
- package/dist/assets/forms/537d2.svg +5 -0
- package/dist/assets/forms/60456.svg +5 -0
- package/dist/assets/forms/657e1.svg +5 -0
- package/dist/assets/forms/73539.svg +5 -0
- package/dist/assets/forms/76214.svg +5 -0
- package/dist/assets/forms/7bd9a.svg +5 -0
- package/dist/assets/forms/7c034.svg +5 -0
- package/dist/assets/forms/86e36.svg +5 -0
- package/dist/assets/forms/8d97b.svg +5 -0
- package/dist/assets/forms/90a18.svg +5 -0
- package/dist/assets/forms/939c2.png +0 -0
- package/dist/assets/forms/95ae4.svg +5 -0
- package/dist/assets/forms/970af.svg +5 -0
- package/dist/assets/forms/a119e.svg +5 -0
- package/dist/assets/forms/a521c.svg +5 -0
- package/dist/assets/forms/a74b0.svg +5 -0
- package/dist/assets/forms/baff4.svg +5 -0
- package/dist/assets/forms/c64ff.svg +5 -0
- package/dist/assets/forms/ca66f.svg +5 -0
- package/dist/assets/forms/e0344.svg +5 -0
- package/dist/assets/forms/e5b24.png +0 -0
- package/dist/assets/forms/e687f.svg +5 -0
- package/dist/assets/forms/eceaf.svg +5 -0
- package/dist/assets/forms/eed5c.png +0 -0
- package/dist/assets/forms/f26ce.svg +5 -0
- package/dist/assets/forms/f79d5.svg +5 -0
- package/dist/assets/habits.png +0 -0
- package/dist/assets/hackify.png +0 -0
- package/dist/assets/icons/add.svg +5 -0
- package/dist/assets/icons/apps.svg +5 -0
- package/dist/assets/icons/book.svg +5 -0
- package/dist/assets/icons/chat.svg +5 -0
- package/dist/assets/icons/folder.svg +5 -0
- package/dist/assets/icons/mic.svg +5 -0
- package/dist/assets/icons/notifications.svg +5 -0
- package/dist/assets/icons/shield.svg +5 -0
- package/dist/assets/icons/store.svg +5 -0
- package/dist/assets/icons/voice.svg +5 -0
- package/dist/assets/ledger.png +0 -0
- package/dist/assets/logos/glyph-black.svg +3 -0
- package/dist/assets/logos/glyph-color.svg +26 -0
- package/dist/assets/logos/glyph-white.svg +3 -0
- package/dist/assets/logos/horizontal-black.svg +5 -0
- package/dist/assets/logos/horizontal-color-black.svg +28 -0
- package/dist/assets/logos/horizontal-color-white.svg +28 -0
- package/dist/assets/logos/horizontal-white.svg +5 -0
- package/dist/assets/logos/stacked-black.svg +5 -0
- package/dist/assets/logos/stacked-color-black.svg +28 -0
- package/dist/assets/logos/stacked-color-white.svg +28 -0
- package/dist/assets/logos/stacked-white.svg +5 -0
- package/dist/assets/logos/tagline-horizontal-black.svg +6 -0
- package/dist/assets/logos/tagline-horizontal-color-black.svg +29 -0
- package/dist/assets/logos/tagline-horizontal-color-white.svg +29 -0
- package/dist/assets/logos/tagline-horizontal-white.svg +6 -0
- package/dist/assets/logos/tagline-inline-black.svg +7 -0
- package/dist/assets/logos/tagline-inline-color-black.svg +30 -0
- package/dist/assets/logos/tagline-inline-color-white-alt.svg +30 -0
- package/dist/assets/logos/tagline-inline-color-white.svg +30 -0
- package/dist/assets/logos/tagline-inline-white.svg +7 -0
- package/dist/assets/logos/tagline-stacked-black.svg +6 -0
- package/dist/assets/logos/tagline-stacked-color-black.svg +29 -0
- package/dist/assets/logos/tagline-stacked-color-white.svg +29 -0
- package/dist/assets/logos/tagline-stacked-white.svg +6 -0
- package/dist/assets/magna-brief.png +0 -0
- package/dist/assets/magna-ide.png +0 -0
- package/dist/assets/magna-logo-dark.svg +5 -0
- package/dist/assets/magna-logo-stacked.svg +29 -0
- package/dist/assets/magna-logo.svg +3 -0
- package/dist/assets/magna-music.png +0 -0
- package/dist/assets/magna-studio.png +0 -0
- package/dist/assets/magna-voice.png +0 -0
- package/dist/assets/mail.png +0 -0
- package/dist/assets/models.png +0 -0
- package/dist/assets/notes.png +0 -0
- package/dist/assets/notifications.png +0 -0
- package/dist/assets/salis-verify.png +0 -0
- package/dist/assets/salis.png +0 -0
- package/dist/assets/settings.png +0 -0
- package/dist/assets/sheets.png +0 -0
- package/dist/assets/sledes.png +0 -0
- package/dist/assets/spaces.png +0 -0
- package/dist/assets/task-manager.png +0 -0
- package/dist/assets/tasks.png +0 -0
- package/dist/assets/terminal.png +0 -0
- package/dist/assets/today.png +0 -0
- package/dist/assets/trajectory.png +0 -0
- package/dist/assets/vault.png +0 -0
- package/dist/assets/wafir.png +0 -0
- package/dist/assets/what-can-i-do.png +0 -0
- package/dist/assets/workflow.png +0 -0
- package/dist/components/interactions/border-beam.d.ts +5 -0
- package/dist/components/interactions/border-beam.js +15 -0
- package/dist/components/interactions/bot-avatar.d.ts +5 -0
- package/dist/components/interactions/bot-avatar.js +10 -0
- package/dist/components/interactions/image-generation.d.ts +58 -0
- package/dist/components/interactions/image-generation.js +86 -0
- package/dist/components/interactions/index.d.ts +7 -0
- package/dist/components/interactions/index.js +7 -0
- package/dist/components/interactions/liquid.d.ts +8 -0
- package/dist/components/interactions/liquid.js +19 -0
- package/dist/components/interactions/metal-fx.d.ts +6 -0
- package/dist/components/interactions/metal-fx.js +51 -0
- package/dist/components/interactions/preferences.d.ts +5 -0
- package/dist/components/interactions/preferences.js +55 -0
- package/dist/components/interactions/thinking-orb.d.ts +4 -0
- package/dist/components/interactions/thinking-orb.js +9 -0
- package/dist/components/interactions/voice-beam.d.ts +5 -0
- package/dist/components/interactions/voice-beam.js +33 -0
- package/dist/components/magna/app-icon.d.ts +13 -0
- package/dist/components/magna/app-icon.js +15 -0
- package/dist/components/magna/apps.d.ts +202 -0
- package/dist/components/magna/apps.js +243 -0
- package/dist/components/magna/chat-activity.d.ts +12 -0
- package/dist/components/magna/chat-activity.js +29 -0
- package/dist/components/magna/chat-composer.d.ts +31 -0
- package/dist/components/magna/chat-composer.js +122 -0
- package/dist/components/magna/chat-composer.module.css +36 -0
- package/dist/components/magna/desktop-button.d.ts +8 -0
- package/dist/components/magna/desktop-button.js +10 -0
- package/dist/components/magna/desktop-switch.d.ts +4 -0
- package/dist/components/magna/desktop-switch.js +8 -0
- package/dist/components/magna/file-tile.d.ts +9 -0
- package/dist/components/magna/file-tile.js +11 -0
- package/dist/components/magna/index.d.ts +11 -0
- package/dist/components/magna/index.js +11 -0
- package/dist/components/magna/logo-variants.d.ts +243 -0
- package/dist/components/magna/logo-variants.js +268 -0
- package/dist/components/magna/logo.d.ts +11 -0
- package/dist/components/magna/logo.js +42 -0
- package/dist/components/magna/navigation.d.ts +15 -0
- package/dist/components/magna/navigation.js +16 -0
- package/dist/components/magna/project-context.d.ts +11 -0
- package/dist/components/magna/project-context.js +8 -0
- package/dist/components/magna/voice-orb.d.ts +7 -0
- package/dist/components/magna/voice-orb.js +49 -0
- package/dist/components/magna/voice-orb.module.css +146 -0
- package/dist/components/theme-switch.d.ts +1 -0
- package/dist/components/theme-switch.js +14 -0
- package/dist/components/ui/accordion.d.ts +13 -0
- package/dist/components/ui/accordion.js +24 -0
- package/dist/components/ui/activity-feed.d.ts +64 -0
- package/dist/components/ui/activity-feed.js +40 -0
- package/dist/components/ui/alert.d.ts +31 -0
- package/dist/components/ui/alert.js +73 -0
- package/dist/components/ui/avatar-empty-icons.d.ts +3 -0
- package/dist/components/ui/avatar-empty-icons.js +14 -0
- package/dist/components/ui/avatar-group-compact.d.ts +140 -0
- package/dist/components/ui/avatar-group-compact.js +41 -0
- package/dist/components/ui/avatar-group.d.ts +237 -0
- package/dist/components/ui/avatar-group.js +37 -0
- package/dist/components/ui/avatar.d.ts +420 -0
- package/dist/components/ui/avatar.js +107 -0
- package/dist/components/ui/badge.d.ts +29 -0
- package/dist/components/ui/badge.js +67 -0
- package/dist/components/ui/banner.d.ts +26 -0
- package/dist/components/ui/banner.js +41 -0
- package/dist/components/ui/breadcrumb.d.ts +14 -0
- package/dist/components/ui/breadcrumb.js +23 -0
- package/dist/components/ui/button-group.d.ts +23 -0
- package/dist/components/ui/button-group.js +39 -0
- package/dist/components/ui/button.d.ts +22 -0
- package/dist/components/ui/button.js +62 -0
- package/dist/components/ui/chart-legend.d.ts +21 -0
- package/dist/components/ui/chart-legend.js +14 -0
- package/dist/components/ui/checkbox.d.ts +41 -0
- package/dist/components/ui/checkbox.js +42 -0
- package/dist/components/ui/color-picker.d.ts +13 -0
- package/dist/components/ui/color-picker.js +65 -0
- package/dist/components/ui/command-menu.d.ts +55 -0
- package/dist/components/ui/command-menu.js +33 -0
- package/dist/components/ui/compact-button.d.ts +22 -0
- package/dist/components/ui/compact-button.js +39 -0
- package/dist/components/ui/content-card.d.ts +22 -0
- package/dist/components/ui/content-card.js +11 -0
- package/dist/components/ui/content-label.d.ts +22 -0
- package/dist/components/ui/content-label.js +9 -0
- package/dist/components/ui/counter-input.d.ts +26 -0
- package/dist/components/ui/counter-input.js +47 -0
- package/dist/components/ui/datepicker.d.ts +9 -0
- package/dist/components/ui/datepicker.js +48 -0
- package/dist/components/ui/digit-input.d.ts +11 -0
- package/dist/components/ui/digit-input.js +98 -0
- package/dist/components/ui/display-asset.d.ts +3 -0
- package/dist/components/ui/display-asset.js +9 -0
- package/dist/components/ui/display-assets.d.ts +193 -0
- package/dist/components/ui/display-assets.js +195 -0
- package/dist/components/ui/divider.d.ts +13 -0
- package/dist/components/ui/divider.js +22 -0
- package/dist/components/ui/dot-stepper.d.ts +96 -0
- package/dist/components/ui/dot-stepper.js +29 -0
- package/dist/components/ui/drawer.d.ts +12 -0
- package/dist/components/ui/drawer.js +25 -0
- package/dist/components/ui/dropdown.d.ts +29 -0
- package/dist/components/ui/dropdown.js +74 -0
- package/dist/components/ui/fancy-button.d.ts +21 -0
- package/dist/components/ui/fancy-button.js +43 -0
- package/dist/components/ui/file-format-icon.d.ts +19 -0
- package/dist/components/ui/file-format-icon.js +48 -0
- package/dist/components/ui/file-upload-compositions.d.ts +32 -0
- package/dist/components/ui/file-upload-compositions.js +88 -0
- package/dist/components/ui/file-upload.d.ts +11 -0
- package/dist/components/ui/file-upload.js +20 -0
- package/dist/components/ui/filter.d.ts +53 -0
- package/dist/components/ui/filter.js +90 -0
- package/dist/components/ui/form-asset.d.ts +5 -0
- package/dist/components/ui/form-asset.js +10 -0
- package/dist/components/ui/hint.d.ts +22 -0
- package/dist/components/ui/hint.js +33 -0
- package/dist/components/ui/horizontal-stepper.d.ts +16 -0
- package/dist/components/ui/horizontal-stepper.js +28 -0
- package/dist/components/ui/inline-input.d.ts +24 -0
- package/dist/components/ui/inline-input.js +60 -0
- package/dist/components/ui/input.d.ts +205 -0
- package/dist/components/ui/input.js +69 -0
- package/dist/components/ui/kbd.d.ts +5 -0
- package/dist/components/ui/kbd.js +6 -0
- package/dist/components/ui/key-icon.d.ts +14 -0
- package/dist/components/ui/key-icon.js +35 -0
- package/dist/components/ui/label.d.ts +7 -0
- package/dist/components/ui/label.js +15 -0
- package/dist/components/ui/link-button.d.ts +22 -0
- package/dist/components/ui/link-button.js +38 -0
- package/dist/components/ui/magna-recipe.d.ts +83 -0
- package/dist/components/ui/magna-recipe.js +99 -0
- package/dist/components/ui/modal.d.ts +21 -0
- package/dist/components/ui/modal.js +35 -0
- package/dist/components/ui/notification-feed.d.ts +63 -0
- package/dist/components/ui/notification-feed.js +31 -0
- package/dist/components/ui/notification-provider.d.ts +1 -0
- package/dist/components/ui/notification-provider.js +13 -0
- package/dist/components/ui/notification.d.ts +24 -0
- package/dist/components/ui/notification.js +23 -0
- package/dist/components/ui/pagination.d.ts +19 -0
- package/dist/components/ui/pagination.js +38 -0
- package/dist/components/ui/password-strength.d.ts +16 -0
- package/dist/components/ui/password-strength.js +27 -0
- package/dist/components/ui/payment-icon.d.ts +11 -0
- package/dist/components/ui/payment-icon.js +19 -0
- package/dist/components/ui/popover.d.ts +36 -0
- package/dist/components/ui/popover.js +27 -0
- package/dist/components/ui/progress-bar.d.ts +35 -0
- package/dist/components/ui/progress-bar.js +32 -0
- package/dist/components/ui/progress-circle.d.ts +16 -0
- package/dist/components/ui/progress-circle.js +29 -0
- package/dist/components/ui/radio.d.ts +37 -0
- package/dist/components/ui/radio.js +39 -0
- package/dist/components/ui/rating.d.ts +62 -0
- package/dist/components/ui/rating.js +65 -0
- package/dist/components/ui/rich-editor.d.ts +77 -0
- package/dist/components/ui/rich-editor.js +248 -0
- package/dist/components/ui/rich-editor.module.css +58 -0
- package/dist/components/ui/scroll-area.d.ts +14 -0
- package/dist/components/ui/scroll-area.js +34 -0
- package/dist/components/ui/segmented-control.d.ts +8 -0
- package/dist/components/ui/segmented-control.js +30 -0
- package/dist/components/ui/select.d.ts +212 -0
- package/dist/components/ui/select.js +129 -0
- package/dist/components/ui/slider.d.ts +5 -0
- package/dist/components/ui/slider.js +16 -0
- package/dist/components/ui/social-button.d.ts +22 -0
- package/dist/components/ui/social-button.js +47 -0
- package/dist/components/ui/status-badge.d.ts +25 -0
- package/dist/components/ui/status-badge.js +51 -0
- package/dist/components/ui/status-modal.d.ts +26 -0
- package/dist/components/ui/status-modal.js +21 -0
- package/dist/components/ui/svg-rating-icons.d.ts +11 -0
- package/dist/components/ui/svg-rating-icons.js +33 -0
- package/dist/components/ui/switch-compositions.d.ts +46 -0
- package/dist/components/ui/switch-compositions.js +51 -0
- package/dist/components/ui/switch.d.ts +14 -0
- package/dist/components/ui/switch.js +17 -0
- package/dist/components/ui/tab-menu-horizontal.d.ts +11 -0
- package/dist/components/ui/tab-menu-horizontal.js +49 -0
- package/dist/components/ui/tab-menu-vertical.d.ts +9 -0
- package/dist/components/ui/tab-menu-vertical.js +23 -0
- package/dist/components/ui/table.d.ts +23 -0
- package/dist/components/ui/table.js +46 -0
- package/dist/components/ui/tag-input.d.ts +18 -0
- package/dist/components/ui/tag-input.js +57 -0
- package/dist/components/ui/tag.d.ts +28 -0
- package/dist/components/ui/tag.js +67 -0
- package/dist/components/ui/textarea.d.ts +21 -0
- package/dist/components/ui/textarea.js +32 -0
- package/dist/components/ui/time-picker.d.ts +35 -0
- package/dist/components/ui/time-picker.js +46 -0
- package/dist/components/ui/tooltip.d.ts +318 -0
- package/dist/components/ui/tooltip.js +56 -0
- package/dist/components/ui/vertical-stepper.d.ts +16 -0
- package/dist/components/ui/vertical-stepper.js +30 -0
- package/dist/design/figma-styles.d.ts +2 -0
- package/dist/design/figma-styles.js +2106 -0
- package/dist/design/theme.d.ts +18 -0
- package/dist/design/theme.js +185 -0
- package/dist/fonts/DM-Mono-OFL.txt +93 -0
- package/dist/fonts/Inter-OFL.txt +93 -0
- package/dist/fonts/README.md +23 -0
- package/dist/fonts/SHA256SUMS +11 -0
- package/dist/fonts/dm-mono-400-latin-ext.woff2 +0 -0
- package/dist/fonts/dm-mono-400-latin.woff2 +0 -0
- package/dist/fonts/dm-mono-500-latin-ext.woff2 +0 -0
- package/dist/fonts/dm-mono-500-latin.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext.woff2 +0 -0
- package/dist/fonts/inter-cyrillic.woff2 +0 -0
- package/dist/fonts/inter-greek-ext.woff2 +0 -0
- package/dist/fonts/inter-greek.woff2 +0 -0
- package/dist/fonts/inter-latin-ext.woff2 +0 -0
- package/dist/fonts/inter-latin.woff2 +0 -0
- package/dist/fonts/inter-vietnamese.woff2 +0 -0
- package/dist/hooks/use-notification.d.ts +36 -0
- package/dist/hooks/use-notification.js +86 -0
- package/dist/hooks/use-tab-observer.d.ts +8 -0
- package/dist/hooks/use-tab-observer.js +72 -0
- package/dist/magna-assets.d.ts +2 -0
- package/dist/magna-assets.js +273 -0
- package/dist/magnaui.d.ts +77 -0
- package/dist/magnaui.js +77 -0
- package/dist/styles.css +2665 -0
- package/dist/utils/cn.d.ts +18 -0
- package/dist/utils/cn.js +14 -0
- package/dist/utils/polymorphic.d.ts +10 -0
- package/dist/utils/polymorphic.js +1 -0
- package/dist/utils/tv.d.ts +18 -0
- package/dist/utils/tv.js +5 -0
- package/dist/vendor/tailwind-variants/LICENSE +21 -0
- package/dist/vendor/tailwind-variants/config.d.ts +38 -0
- package/dist/vendor/tailwind-variants/generated.d.ts +3 -0
- package/dist/vendor/tailwind-variants/index.d.ts +370 -0
- package/docs/implementation-provenance.md +96 -0
- package/package.json +108 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { keyIconAssets } from "./display-assets.js";
|
|
3
|
+
export type KeyIconColor = keyof typeof keyIconAssets;
|
|
4
|
+
export type KeyIconSize = 32 | 40 | 48 | 56 | 64;
|
|
5
|
+
export type KeyIconProps = Omit<React.HTMLAttributes<HTMLSpanElement>, 'color'> & {
|
|
6
|
+
color?: KeyIconColor;
|
|
7
|
+
size?: KeyIconSize;
|
|
8
|
+
variant?: 'stroke' | 'lighter';
|
|
9
|
+
};
|
|
10
|
+
export declare const Root: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLSpanElement>, "color"> & {
|
|
11
|
+
color?: KeyIconColor;
|
|
12
|
+
size?: KeyIconSize;
|
|
13
|
+
variant?: "stroke" | "lighter";
|
|
14
|
+
} & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../utils/cn.js";
|
|
5
|
+
import { DisplayAsset } from "./display-asset.js";
|
|
6
|
+
import { keyIconAssets } from "./display-assets.js";
|
|
7
|
+
const tones = {
|
|
8
|
+
gray: 'bg-faded-lighter text-text-sub-600',
|
|
9
|
+
blue: 'bg-information-lighter text-information-base',
|
|
10
|
+
orange: 'bg-warning-lighter text-warning-base',
|
|
11
|
+
red: 'bg-error-lighter text-error-base',
|
|
12
|
+
green: 'bg-success-lighter text-success-base',
|
|
13
|
+
yellow: 'bg-away-lighter text-away-base',
|
|
14
|
+
purple: 'bg-feature-lighter text-feature-base',
|
|
15
|
+
pink: 'bg-highlighted-lighter text-highlighted-base',
|
|
16
|
+
teal: 'bg-verified-lighter text-verified-base',
|
|
17
|
+
};
|
|
18
|
+
const sizes = {
|
|
19
|
+
32: 'size-8',
|
|
20
|
+
40: 'size-10',
|
|
21
|
+
48: 'size-12',
|
|
22
|
+
56: 'size-14',
|
|
23
|
+
64: 'size-16',
|
|
24
|
+
};
|
|
25
|
+
const iconSizes = {
|
|
26
|
+
32: 'size-5',
|
|
27
|
+
40: 'size-5',
|
|
28
|
+
48: 'size-6',
|
|
29
|
+
56: 'size-7',
|
|
30
|
+
64: 'size-8',
|
|
31
|
+
};
|
|
32
|
+
export const Root = React.forwardRef(function KeyIcon({ size = 64, color = 'gray', variant = 'stroke', children, className, ...props }, ref) {
|
|
33
|
+
return (_jsx("span", { ref: ref, ...props, className: cn('inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full', sizes[size], tones[color], variant === 'stroke' &&
|
|
34
|
+
'bg-bg-white-0 shadow-regular-xs ring-1 ring-inset ring-stroke-soft-200', className), children: children ? (_jsx("span", { className: cn('flex items-center justify-center [&>svg]:size-full', iconSizes[size]), children: children })) : (_jsx(DisplayAsset, { src: keyIconAssets[color][size] })) }));
|
|
35
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as Primitive from "@radix-ui/react-label";
|
|
3
|
+
export declare const Root: React.ForwardRefExoticComponent<Omit<Primitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
} & React.RefAttributes<HTMLLabelElement>>;
|
|
6
|
+
export declare function Asterisk({ children, className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function Sub({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as Primitive from "@radix-ui/react-label";
|
|
5
|
+
import { cn } from "../../utils/cn.js";
|
|
6
|
+
export const Root = React.forwardRef(function Label({ disabled, className, ...props }, ref) {
|
|
7
|
+
return (_jsx(Primitive.Root, { ...props, ref: ref, "aria-disabled": disabled, className: cn('group flex cursor-pointer items-center gap-px text-label-sm text-text-strong-950 aria-disabled:text-text-disabled-300', className) }));
|
|
8
|
+
});
|
|
9
|
+
Root.displayName = 'LabelRoot';
|
|
10
|
+
export function Asterisk({ children, className, ...props }) {
|
|
11
|
+
return (_jsx("span", { ...props, className: cn('text-primary-base group-aria-disabled:text-text-disabled-300', className), children: children ?? '*' }));
|
|
12
|
+
}
|
|
13
|
+
export function Sub({ className, ...props }) {
|
|
14
|
+
return (_jsx("span", { ...props, className: cn('text-paragraph-sm text-text-sub-600 group-aria-disabled:text-text-disabled-300', className) }));
|
|
15
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { PolymorphicComponentProps } from "../../utils/polymorphic.js";
|
|
3
|
+
type Appearance = {
|
|
4
|
+
variant: 'gray' | 'black' | 'primary' | 'error' | 'modifiable';
|
|
5
|
+
size: 'medium' | 'small';
|
|
6
|
+
underline: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const linkButtonVariants: (options?: Partial<Appearance> & {
|
|
9
|
+
class?: import("tailwind-merge").ClassNameValue;
|
|
10
|
+
className?: import("tailwind-merge").ClassNameValue;
|
|
11
|
+
}) => Record<"root" | "icon", (overrides?: (Partial<Appearance> & {
|
|
12
|
+
class?: import("tailwind-merge").ClassNameValue;
|
|
13
|
+
className?: import("tailwind-merge").ClassNameValue;
|
|
14
|
+
}) | undefined) => string>;
|
|
15
|
+
export declare const Root: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & Partial<Appearance> & {
|
|
16
|
+
asChild?: boolean;
|
|
17
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
18
|
+
export declare function Icon<T extends React.ElementType = 'div'>({ as, className, variant, size, underline, ...props }: PolymorphicComponentProps<T, Partial<Appearance>>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare namespace Icon {
|
|
20
|
+
var displayName: string;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
+
import { mergeOptions, slotRecipe } from "./magna-recipe.js";
|
|
6
|
+
const appearance = React.createContext({});
|
|
7
|
+
export const linkButtonVariants = slotRecipe({ variant: 'gray', size: 'medium', underline: false }, ({ variant, size, underline }) => ({
|
|
8
|
+
root: [
|
|
9
|
+
'group inline-flex items-center justify-center gap-1 whitespace-nowrap outline-none transition duration-200 ease-out underline underline-offset-[3px] hover:decoration-current focus-visible:decoration-current',
|
|
10
|
+
underline ? 'decoration-current' : 'decoration-transparent',
|
|
11
|
+
size === 'small' ? 'h-4 text-label-xs' : 'h-5 text-label-sm',
|
|
12
|
+
{
|
|
13
|
+
gray: 'text-text-sub-600 focus-visible:text-text-strong-950',
|
|
14
|
+
black: 'text-text-strong-950',
|
|
15
|
+
primary: 'text-primary-base hover:text-primary-darker',
|
|
16
|
+
error: 'text-error-base hover:text-red-700',
|
|
17
|
+
modifiable: '',
|
|
18
|
+
}[variant],
|
|
19
|
+
'disabled:pointer-events-none disabled:text-text-disabled-300 disabled:no-underline',
|
|
20
|
+
],
|
|
21
|
+
icon: ['shrink-0', size === 'small' ? 'size-4' : 'size-5'],
|
|
22
|
+
}));
|
|
23
|
+
export const Root = React.forwardRef(function LinkButton({ variant, size, underline, asChild, className, children, ...props }, ref) {
|
|
24
|
+
const options = { variant, size, underline };
|
|
25
|
+
const Element = asChild ? Slot : 'button';
|
|
26
|
+
return (_jsx(appearance.Provider, { value: options, children: _jsx(Element, { ref: ref, className: linkButtonVariants(options).root({ className }), ...props, children: children }) }));
|
|
27
|
+
});
|
|
28
|
+
Root.displayName = 'LinkButtonRoot';
|
|
29
|
+
export function Icon({ as, className, variant, size, underline, ...props }) {
|
|
30
|
+
const options = mergeOptions(React.useContext(appearance), {
|
|
31
|
+
variant,
|
|
32
|
+
size,
|
|
33
|
+
underline,
|
|
34
|
+
});
|
|
35
|
+
const Element = as || 'div';
|
|
36
|
+
return (_jsx(Element, { className: linkButtonVariants(options).icon({ className }), ...props }));
|
|
37
|
+
}
|
|
38
|
+
Icon.displayName = 'LinkButtonIcon';
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { ClassValue } from "../../utils/tv.js";
|
|
2
|
+
type ClassInput = {
|
|
3
|
+
class?: ClassValue;
|
|
4
|
+
className?: ClassValue;
|
|
5
|
+
};
|
|
6
|
+
/** Resolve explicit options without letting an omitted child prop erase its parent. */
|
|
7
|
+
export declare function mergeOptions<T extends object>(...sources: (Partial<T> | undefined)[]): T;
|
|
8
|
+
/** A typed slot recipe. Slot calls may override state as well as append classes. */
|
|
9
|
+
export declare function slotRecipe<P extends object, S extends string>(defaults: P, describe: (options: P) => Record<S, ClassValue>): (options?: Partial<P> & ClassInput) => Record<S, (overrides?: Partial<P> & ClassInput) => string>;
|
|
10
|
+
/** Semantic color recipes shared by small information surfaces. */
|
|
11
|
+
export declare const toneClasses: {
|
|
12
|
+
gray: {
|
|
13
|
+
solid: string;
|
|
14
|
+
light: string;
|
|
15
|
+
pale: string;
|
|
16
|
+
ink: string;
|
|
17
|
+
deep: string;
|
|
18
|
+
};
|
|
19
|
+
blue: {
|
|
20
|
+
solid: string;
|
|
21
|
+
light: string;
|
|
22
|
+
pale: string;
|
|
23
|
+
ink: string;
|
|
24
|
+
deep: string;
|
|
25
|
+
};
|
|
26
|
+
orange: {
|
|
27
|
+
solid: string;
|
|
28
|
+
light: string;
|
|
29
|
+
pale: string;
|
|
30
|
+
ink: string;
|
|
31
|
+
deep: string;
|
|
32
|
+
};
|
|
33
|
+
red: {
|
|
34
|
+
solid: string;
|
|
35
|
+
light: string;
|
|
36
|
+
pale: string;
|
|
37
|
+
ink: string;
|
|
38
|
+
deep: string;
|
|
39
|
+
};
|
|
40
|
+
green: {
|
|
41
|
+
solid: string;
|
|
42
|
+
light: string;
|
|
43
|
+
pale: string;
|
|
44
|
+
ink: string;
|
|
45
|
+
deep: string;
|
|
46
|
+
};
|
|
47
|
+
yellow: {
|
|
48
|
+
solid: string;
|
|
49
|
+
light: string;
|
|
50
|
+
pale: string;
|
|
51
|
+
ink: string;
|
|
52
|
+
deep: string;
|
|
53
|
+
};
|
|
54
|
+
purple: {
|
|
55
|
+
solid: string;
|
|
56
|
+
light: string;
|
|
57
|
+
pale: string;
|
|
58
|
+
ink: string;
|
|
59
|
+
deep: string;
|
|
60
|
+
};
|
|
61
|
+
sky: {
|
|
62
|
+
solid: string;
|
|
63
|
+
light: string;
|
|
64
|
+
pale: string;
|
|
65
|
+
ink: string;
|
|
66
|
+
deep: string;
|
|
67
|
+
};
|
|
68
|
+
pink: {
|
|
69
|
+
solid: string;
|
|
70
|
+
light: string;
|
|
71
|
+
pale: string;
|
|
72
|
+
ink: string;
|
|
73
|
+
deep: string;
|
|
74
|
+
};
|
|
75
|
+
teal: {
|
|
76
|
+
solid: string;
|
|
77
|
+
light: string;
|
|
78
|
+
pale: string;
|
|
79
|
+
ink: string;
|
|
80
|
+
deep: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
export {};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn.js";
|
|
2
|
+
/** Resolve explicit options without letting an omitted child prop erase its parent. */
|
|
3
|
+
export function mergeOptions(...sources) {
|
|
4
|
+
const result = {};
|
|
5
|
+
for (const source of sources) {
|
|
6
|
+
for (const [key, value] of Object.entries(source ?? {})) {
|
|
7
|
+
if (value !== undefined)
|
|
8
|
+
result[key] = value;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return result;
|
|
12
|
+
}
|
|
13
|
+
/** A typed slot recipe. Slot calls may override state as well as append classes. */
|
|
14
|
+
export function slotRecipe(defaults, describe) {
|
|
15
|
+
return (options = {}) => {
|
|
16
|
+
const resolved = mergeOptions(defaults, options);
|
|
17
|
+
const names = Object.keys(describe(resolved));
|
|
18
|
+
return Object.fromEntries(names.map((name) => [
|
|
19
|
+
name,
|
|
20
|
+
(overrides = {}) => {
|
|
21
|
+
const classes = describe(mergeOptions(resolved, overrides))[name];
|
|
22
|
+
return cn(classes, name === 'root' && options.class, name === 'root' && options.className, overrides.class, overrides.className);
|
|
23
|
+
},
|
|
24
|
+
]));
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/** Semantic color recipes shared by small information surfaces. */
|
|
28
|
+
export const toneClasses = {
|
|
29
|
+
gray: {
|
|
30
|
+
solid: 'bg-faded-base',
|
|
31
|
+
light: 'bg-faded-light',
|
|
32
|
+
pale: 'bg-faded-lighter',
|
|
33
|
+
ink: 'text-faded-base',
|
|
34
|
+
deep: 'text-faded-dark',
|
|
35
|
+
},
|
|
36
|
+
blue: {
|
|
37
|
+
solid: 'bg-information-base',
|
|
38
|
+
light: 'bg-information-light',
|
|
39
|
+
pale: 'bg-information-lighter',
|
|
40
|
+
ink: 'text-information-base',
|
|
41
|
+
deep: 'text-information-dark',
|
|
42
|
+
},
|
|
43
|
+
orange: {
|
|
44
|
+
solid: 'bg-warning-base',
|
|
45
|
+
light: 'bg-warning-light',
|
|
46
|
+
pale: 'bg-warning-lighter',
|
|
47
|
+
ink: 'text-warning-base',
|
|
48
|
+
deep: 'text-warning-dark',
|
|
49
|
+
},
|
|
50
|
+
red: {
|
|
51
|
+
solid: 'bg-error-base',
|
|
52
|
+
light: 'bg-error-light',
|
|
53
|
+
pale: 'bg-error-lighter',
|
|
54
|
+
ink: 'text-error-base',
|
|
55
|
+
deep: 'text-error-dark',
|
|
56
|
+
},
|
|
57
|
+
green: {
|
|
58
|
+
solid: 'bg-success-base',
|
|
59
|
+
light: 'bg-success-light',
|
|
60
|
+
pale: 'bg-success-lighter',
|
|
61
|
+
ink: 'text-success-base',
|
|
62
|
+
deep: 'text-success-dark',
|
|
63
|
+
},
|
|
64
|
+
yellow: {
|
|
65
|
+
solid: 'bg-away-base',
|
|
66
|
+
light: 'bg-away-light',
|
|
67
|
+
pale: 'bg-away-lighter',
|
|
68
|
+
ink: 'text-away-base',
|
|
69
|
+
deep: 'text-away-dark',
|
|
70
|
+
},
|
|
71
|
+
purple: {
|
|
72
|
+
solid: 'bg-feature-base',
|
|
73
|
+
light: 'bg-feature-light',
|
|
74
|
+
pale: 'bg-feature-lighter',
|
|
75
|
+
ink: 'text-feature-base',
|
|
76
|
+
deep: 'text-feature-dark',
|
|
77
|
+
},
|
|
78
|
+
sky: {
|
|
79
|
+
solid: 'bg-verified-base',
|
|
80
|
+
light: 'bg-verified-light',
|
|
81
|
+
pale: 'bg-verified-lighter',
|
|
82
|
+
ink: 'text-verified-base',
|
|
83
|
+
deep: 'text-verified-dark',
|
|
84
|
+
},
|
|
85
|
+
pink: {
|
|
86
|
+
solid: 'bg-highlighted-base',
|
|
87
|
+
light: 'bg-highlighted-light',
|
|
88
|
+
pale: 'bg-highlighted-lighter',
|
|
89
|
+
ink: 'text-highlighted-base',
|
|
90
|
+
deep: 'text-highlighted-dark',
|
|
91
|
+
},
|
|
92
|
+
teal: {
|
|
93
|
+
solid: 'bg-stable-base',
|
|
94
|
+
light: 'bg-stable-light',
|
|
95
|
+
pale: 'bg-stable-lighter',
|
|
96
|
+
ink: 'text-stable-base',
|
|
97
|
+
deep: 'text-stable-dark',
|
|
98
|
+
},
|
|
99
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as Dialog from "@radix-ui/react-dialog";
|
|
3
|
+
import { type RemixiconComponentType } from "@remixicon/react";
|
|
4
|
+
export declare const Root: React.FC<Dialog.DialogProps>;
|
|
5
|
+
export declare const Trigger: React.ForwardRefExoticComponent<Dialog.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
export declare const Close: React.ForwardRefExoticComponent<Dialog.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
export declare const Portal: React.FC<Dialog.DialogPortalProps>;
|
|
8
|
+
export declare const Overlay: React.ForwardRefExoticComponent<Omit<Dialog.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export declare const Content: React.ForwardRefExoticComponent<Omit<Dialog.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
10
|
+
overlayClassName?: string;
|
|
11
|
+
showClose?: boolean;
|
|
12
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export declare const Title: React.ForwardRefExoticComponent<Omit<Dialog.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
14
|
+
export declare const Description: React.ForwardRefExoticComponent<Omit<Dialog.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
15
|
+
export declare function Header({ title, description, icon: Icon, children, className, ...props }: React.HTMLAttributes<HTMLDivElement> & {
|
|
16
|
+
icon?: RemixiconComponentType;
|
|
17
|
+
title?: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function Body({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function Footer({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as Dialog from "@radix-ui/react-dialog";
|
|
5
|
+
import { Slottable } from "@radix-ui/react-slot";
|
|
6
|
+
import { RiCloseLine } from "@remixicon/react";
|
|
7
|
+
import * as CompactButton from "./compact-button.js";
|
|
8
|
+
import { cn } from "../../utils/cn.js";
|
|
9
|
+
export const Root = Dialog.Root;
|
|
10
|
+
export const Trigger = Dialog.Trigger;
|
|
11
|
+
export const Close = Dialog.Close;
|
|
12
|
+
export const Portal = Dialog.Portal;
|
|
13
|
+
const fade = 'data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0';
|
|
14
|
+
export const Overlay = React.forwardRef(function Overlay({ className, ...props }, ref) {
|
|
15
|
+
return (_jsx(Dialog.Overlay, { ...props, ref: ref, className: cn('fixed inset-0 z-50 flex flex-col items-center justify-center overflow-y-auto bg-overlay p-4 backdrop-blur-[10px]', fade, className) }));
|
|
16
|
+
});
|
|
17
|
+
export const Content = React.forwardRef(function Content({ children, className, overlayClassName, showClose = true, ...props }, ref) {
|
|
18
|
+
return (_jsx(Portal, { children: _jsx(Overlay, { className: overlayClassName, children: _jsxs(Dialog.Content, { ...props, ref: ref, className: cn('relative w-full max-w-[400px] rounded-20 bg-bg-white-0 shadow-regular-md outline-none', fade, 'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95', className), children: [_jsx(Slottable, { children: children }), showClose && (_jsx(Close, { asChild: true, children: _jsx(CompactButton.Root, { "aria-label": 'Close dialog', size: 'large', variant: 'ghost', className: 'absolute right-4 top-4', children: _jsx(CompactButton.Icon, { as: RiCloseLine }) }) }))] }) }) }));
|
|
19
|
+
});
|
|
20
|
+
export const Title = React.forwardRef(function Title({ className, ...props }, ref) {
|
|
21
|
+
return (_jsx(Dialog.Title, { ...props, ref: ref, className: cn('text-label-sm text-text-strong-950', className) }));
|
|
22
|
+
});
|
|
23
|
+
export const Description = React.forwardRef(function Description({ className, ...props }, ref) {
|
|
24
|
+
return (_jsx(Dialog.Description, { ...props, ref: ref, className: cn('text-paragraph-xs text-text-sub-600', className) }));
|
|
25
|
+
});
|
|
26
|
+
export function Header({ title, description, icon: Icon, children, className, ...props }) {
|
|
27
|
+
const content = children ?? (_jsxs(_Fragment, { children: [Icon && (_jsx("span", { className: 'flex size-10 shrink-0 items-center justify-center rounded-full bg-bg-white-0 ring-1 ring-inset ring-stroke-soft-200', children: _jsx(Icon, { className: 'size-5 text-text-sub-600' }) })), (title || description) && (_jsxs("div", { className: 'flex-1 space-y-1', children: [title && _jsx(Title, { children: title }), description && _jsx(Description, { children: description })] }))] }));
|
|
28
|
+
return (_jsx("div", { ...props, className: cn('relative flex items-start gap-3.5 py-4 pl-5 pr-14 before:absolute before:inset-x-0 before:bottom-0 before:border-b before:border-stroke-soft-200', className), children: content }));
|
|
29
|
+
}
|
|
30
|
+
export function Body({ className, ...props }) {
|
|
31
|
+
return _jsx("div", { ...props, className: cn('p-5', className) });
|
|
32
|
+
}
|
|
33
|
+
export function Footer({ className, ...props }) {
|
|
34
|
+
return (_jsx("div", { ...props, className: cn('flex items-center justify-between gap-3 border-t border-stroke-soft-200 px-5 py-4', className) }));
|
|
35
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TabMenu from "./tab-menu-horizontal.js";
|
|
3
|
+
export declare const Root: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export type ItemProps = Omit<React.HTMLAttributes<HTMLElement>, 'title'> & {
|
|
5
|
+
title: React.ReactNode;
|
|
6
|
+
description?: React.ReactNode;
|
|
7
|
+
timestamp?: React.ReactNode;
|
|
8
|
+
dateTime?: string;
|
|
9
|
+
avatar?: React.ReactNode;
|
|
10
|
+
company?: React.ReactNode;
|
|
11
|
+
variant?: 'basic' | 'file' | 'buttons' | 'message';
|
|
12
|
+
file?: {
|
|
13
|
+
name: string;
|
|
14
|
+
sizeLabel?: string;
|
|
15
|
+
href?: string;
|
|
16
|
+
onOpen?: () => void;
|
|
17
|
+
};
|
|
18
|
+
message?: React.ReactNode;
|
|
19
|
+
onApprove?: () => void;
|
|
20
|
+
onDeny?: () => void;
|
|
21
|
+
onMore?: () => void;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
unread?: boolean;
|
|
24
|
+
approveLabel?: string;
|
|
25
|
+
denyLabel?: string;
|
|
26
|
+
};
|
|
27
|
+
export declare const Item: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
|
|
28
|
+
title: React.ReactNode;
|
|
29
|
+
description?: React.ReactNode;
|
|
30
|
+
timestamp?: React.ReactNode;
|
|
31
|
+
dateTime?: string;
|
|
32
|
+
avatar?: React.ReactNode;
|
|
33
|
+
company?: React.ReactNode;
|
|
34
|
+
variant?: "basic" | "file" | "buttons" | "message";
|
|
35
|
+
file?: {
|
|
36
|
+
name: string;
|
|
37
|
+
sizeLabel?: string;
|
|
38
|
+
href?: string;
|
|
39
|
+
onOpen?: () => void;
|
|
40
|
+
};
|
|
41
|
+
message?: React.ReactNode;
|
|
42
|
+
onApprove?: () => void;
|
|
43
|
+
onDeny?: () => void;
|
|
44
|
+
onMore?: () => void;
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
unread?: boolean;
|
|
47
|
+
approveLabel?: string;
|
|
48
|
+
denyLabel?: string;
|
|
49
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
50
|
+
export type FeedTab = {
|
|
51
|
+
value: string;
|
|
52
|
+
label: string;
|
|
53
|
+
count?: number;
|
|
54
|
+
disabled?: boolean;
|
|
55
|
+
separator?: boolean;
|
|
56
|
+
};
|
|
57
|
+
export type TabsProps = React.ComponentPropsWithoutRef<typeof TabMenu.Root> & {
|
|
58
|
+
tabs?: FeedTab[];
|
|
59
|
+
onFilter?: () => void;
|
|
60
|
+
filterLabel?: string;
|
|
61
|
+
};
|
|
62
|
+
export declare function Tabs({ tabs, onFilter, filterLabel, children, className, defaultValue, ...props }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
export declare const Content: React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { resolveMagnaAsset as __resolveMagnaAsset_1 } from "../../magna-assets.js";
|
|
4
|
+
/* eslint-disable @next/next/no-img-element */
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { cn } from "../../utils/cn.js";
|
|
7
|
+
import * as Button from "./button.js";
|
|
8
|
+
import * as CompactButton from "./compact-button.js";
|
|
9
|
+
import * as TabMenu from "./tab-menu-horizontal.js";
|
|
10
|
+
import * as Badge from "./badge.js";
|
|
11
|
+
const image = (name) => (_jsx("img", { src: __resolveMagnaAsset_1(`/magna/feeds/${name}.svg`), alt: '', "aria-hidden": 'true', className: 'block max-w-none shrink-0' }));
|
|
12
|
+
export const Root = React.forwardRef(function Root({ className, ...props }, ref) {
|
|
13
|
+
return (_jsx("div", { ...props, ref: ref, className: cn('w-full max-w-[540px] bg-bg-white-0', className) }));
|
|
14
|
+
});
|
|
15
|
+
export const Item = React.forwardRef(function Item({ title, description, timestamp, dateTime, avatar, company, variant = 'basic', file, message, onApprove, onDeny, onMore, disabled = false, unread = false, approveLabel = 'Approve', denyLabel = 'Deny', children, className, ...props }, ref) {
|
|
16
|
+
const attachment = file && (_jsxs(_Fragment, { children: [image('notification-attachment'), _jsx("span", { className: 'truncate', children: file.name }), file.sizeLabel && (_jsx("span", { className: '-ms-0.5 shrink-0 text-text-soft-400', children: file.sizeLabel }))] }));
|
|
17
|
+
return (_jsxs("article", { ...props, ref: ref, "data-unread": unread || undefined, className: cn('group/notification relative flex w-full max-w-[524px] items-start gap-[15px] rounded-xl bg-bg-white-0 p-3 transition-colors focus-within:bg-bg-weak-50 hover:bg-bg-weak-50', className), children: [avatar && _jsx("div", { className: 'size-10 shrink-0', children: avatar }), _jsxs("div", { className: cn('flex min-w-0 flex-1 flex-col', variant === 'buttons' ? 'gap-4' : 'gap-3'), children: [_jsxs("div", { className: 'space-y-1', children: [_jsxs("div", { className: 'text-label-sm text-text-strong-950', children: [title, unread && _jsx("span", { className: 'sr-only', children: ", unread" })] }), _jsxs("div", { className: 'flex flex-wrap items-start gap-1 text-paragraph-xs text-text-sub-600', children: [timestamp && _jsx("time", { dateTime: dateTime, children: timestamp }), timestamp && description && (_jsx("span", { "aria-hidden": 'true', className: 'w-2 text-center text-text-soft-400', children: "\u2219" })), company && _jsx("span", { className: 'shrink-0', children: company }), description && _jsx("span", { className: 'min-w-0', children: description })] })] }), variant === 'buttons' && (_jsxs("div", { className: 'flex flex-wrap gap-2.5', children: [_jsx(Button.Root, { type: 'button', size: 'xsmall', variant: 'neutral', mode: 'stroke', disabled: disabled || !onDeny, onClick: onDeny, children: denyLabel }), _jsx(Button.Root, { type: 'button', size: 'xsmall', disabled: disabled || !onApprove, onClick: onApprove, children: approveLabel })] })), variant === 'file' &&
|
|
18
|
+
file &&
|
|
19
|
+
(file.href && !disabled ? (_jsx(Button.Root, { asChild: true, variant: 'neutral', mode: 'stroke', className: 'h-auto max-w-full gap-1 self-start rounded-lg p-2 text-paragraph-sm', children: _jsx("a", { href: file.href, download: true, onClick: file.onOpen, children: attachment }) })) : (_jsx(Button.Root, { type: 'button', variant: 'neutral', mode: 'stroke', disabled: disabled || !file.onOpen, className: 'h-auto max-w-full gap-1 self-start rounded-lg p-2 text-paragraph-sm', onClick: file.onOpen, children: attachment }))), variant === 'message' && message && (_jsx("div", { className: 'max-w-full self-start rounded-lg rounded-ee-[10px] rounded-ss border border-stroke-soft-200 bg-bg-white-0 px-3 py-2 text-paragraph-sm text-text-sub-600 shadow-regular-xs', children: message })), children] }), onMore && (_jsx(CompactButton.Root, { type: 'button', variant: 'ghost', disabled: disabled, "aria-label": 'More notification actions', onClick: onMore, className: 'my-2 opacity-100 focus-visible:opacity-100 sm:opacity-0 sm:group-focus-within/notification:opacity-100 sm:group-hover/notification:opacity-100', children: image('notification-more') }))] }));
|
|
20
|
+
});
|
|
21
|
+
const defaultTabs = [
|
|
22
|
+
{ value: 'all', label: 'All' },
|
|
23
|
+
{ value: 'inbox', label: 'Inbox', count: 2 },
|
|
24
|
+
{ value: 'following', label: 'Following' },
|
|
25
|
+
{ value: 'archived', label: 'Archived', separator: true },
|
|
26
|
+
];
|
|
27
|
+
export function Tabs({ tabs = defaultTabs, onFilter, filterLabel = 'Filter notifications', children, className, defaultValue, ...props }) {
|
|
28
|
+
return (_jsxs(TabMenu.Root, { ...props, defaultValue: defaultValue ?? tabs[0]?.value, className: cn('w-full max-w-[540px]', className), children: [_jsxs("div", { className: 'flex items-center border-b border-stroke-soft-200 bg-bg-white-0 px-5', children: [_jsx(TabMenu.List, { "aria-label": 'Notification views', wrapperClassName: 'min-w-0 flex-1', className: 'h-[47px] gap-5 border-0', children: tabs.map((tab) => (_jsxs(TabMenu.Trigger, { value: tab.value, disabled: tab.disabled, className: cn('h-[47px] gap-1 focus-visible:underline disabled:opacity-50', tab.separator &&
|
|
29
|
+
'before:me-4 before:h-5 before:w-px before:bg-stroke-soft-200'), children: [_jsx("span", { children: tab.label }), tab.count !== undefined && (_jsx(Badge.Root, { size: 'small', color: 'red', variant: 'filled', className: 'min-w-4 px-0.5', children: tab.count }))] }, tab.value))) }), onFilter && (_jsx(CompactButton.Root, { type: 'button', variant: 'ghost', "aria-label": filterLabel, onClick: onFilter, className: 'ms-3', children: image('notification-filter') }))] }), children] }));
|
|
30
|
+
}
|
|
31
|
+
export const Content = TabMenu.Content;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function NotificationProvider(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { createElement as _createElement } from "react";
|
|
4
|
+
import * as Toast from "./notification.js";
|
|
5
|
+
import { useNotification } from "../../hooks/use-notification.js";
|
|
6
|
+
export function NotificationProvider() {
|
|
7
|
+
const store = useNotification();
|
|
8
|
+
const toasts = store.notifications.map((entry) => {
|
|
9
|
+
const { id, ...props } = entry;
|
|
10
|
+
return _createElement(Toast.Root, { ...props, key: id });
|
|
11
|
+
});
|
|
12
|
+
return (_jsxs(Toast.Provider, { children: [toasts, _jsx(Toast.Viewport, {})] }));
|
|
13
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as Toast from "@radix-ui/react-toast";
|
|
3
|
+
import * as Alert from "./alert.js";
|
|
4
|
+
export declare const Provider: React.FC<Toast.ToastProviderProps>;
|
|
5
|
+
export declare const Action: React.ForwardRefExoticComponent<Toast.ToastActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
export type NotificationProps = React.ComponentPropsWithoutRef<typeof Toast.Root> & Pick<React.ComponentPropsWithoutRef<typeof Alert.Root>, 'variant' | 'status'> & {
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: React.ReactNode;
|
|
9
|
+
action?: React.ReactNode;
|
|
10
|
+
disableDismiss?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const Viewport: React.ForwardRefExoticComponent<Omit<Toast.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
13
|
+
export declare const Root: React.ForwardRefExoticComponent<Omit<Toast.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & Pick<Omit<React.HTMLAttributes<HTMLDivElement> & Partial<{
|
|
14
|
+
variant: "filled" | "light" | "lighter" | "stroke";
|
|
15
|
+
status: "error" | "warning" | "success" | "information" | "feature";
|
|
16
|
+
size: "xsmall" | "small" | "large";
|
|
17
|
+
}> & {
|
|
18
|
+
wrapperClassName?: import("tailwind-merge").ClassNameValue;
|
|
19
|
+
} & React.RefAttributes<HTMLDivElement>, "ref">, "status" | "variant"> & {
|
|
20
|
+
title?: string;
|
|
21
|
+
description?: React.ReactNode;
|
|
22
|
+
action?: React.ReactNode;
|
|
23
|
+
disableDismiss?: boolean;
|
|
24
|
+
} & React.RefAttributes<HTMLLIElement>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as Toast from "@radix-ui/react-toast";
|
|
5
|
+
import { RiAlertFill, RiCheckboxCircleFill, RiErrorWarningFill, RiInformationFill, RiMagicFill, } from "@remixicon/react";
|
|
6
|
+
import * as Alert from "./alert.js";
|
|
7
|
+
import { cn } from "../../utils/cn.js";
|
|
8
|
+
export const Provider = Toast.Provider;
|
|
9
|
+
export const Action = Toast.Action;
|
|
10
|
+
const statusIcons = {
|
|
11
|
+
success: RiCheckboxCircleFill,
|
|
12
|
+
warning: RiAlertFill,
|
|
13
|
+
error: RiErrorWarningFill,
|
|
14
|
+
information: RiInformationFill,
|
|
15
|
+
feature: RiMagicFill,
|
|
16
|
+
};
|
|
17
|
+
export const Viewport = React.forwardRef(function Viewport({ className, ...props }, ref) {
|
|
18
|
+
return (_jsx(Toast.Viewport, { ...props, ref: ref, className: cn('fixed left-0 top-0 z-[100] flex max-h-screen w-full flex-col-reverse gap-5 p-4 sm:bottom-0 sm:left-auto sm:right-0 sm:top-auto sm:max-w-[438px] sm:flex-col sm:p-6', className) }));
|
|
19
|
+
});
|
|
20
|
+
export const Root = React.forwardRef(function Root({ status, variant = 'filled', title, description, action, disableDismiss = false, asChild = true, className, ...props }, ref) {
|
|
21
|
+
const Symbol = statusIcons[status] ?? RiErrorWarningFill;
|
|
22
|
+
return (_jsx(Toast.Root, { ...props, ref: ref, asChild: asChild, className: cn('data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:max-[639px]:slide-out-to-top-full data-[state=open]:max-[639px]:slide-in-from-top-full data-[state=closed]:sm:slide-out-to-right-full data-[state=open]:sm:slide-in-from-right-full', className), children: _jsxs(Alert.Root, { variant: variant, status: status, size: 'large', children: [_jsx(Alert.Icon, { as: Symbol, "aria-hidden": 'true' }), _jsxs("div", { className: 'flex w-full flex-col gap-2.5', children: [_jsxs("div", { className: 'flex w-full flex-col gap-1', children: [title && (_jsx(Toast.Title, { className: 'text-label-sm', children: title })), description && (_jsx(Toast.Description, { children: description }))] }), action && _jsx("div", { className: 'flex items-center gap-2', children: action })] }), !disableDismiss && (_jsx(Toast.Close, { "aria-label": 'Close', children: _jsx(Alert.CloseIcon, {}) }))] }) }));
|
|
23
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { PolymorphicComponentProps } from "../../utils/polymorphic.js";
|
|
3
|
+
type Appearance = {
|
|
4
|
+
variant?: 'basic' | 'rounded' | 'group';
|
|
5
|
+
};
|
|
6
|
+
export declare function Root({ asChild, variant, className, ...props }: React.HTMLAttributes<HTMLDivElement> & Appearance & {
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & Appearance & {
|
|
10
|
+
asChild?: boolean;
|
|
11
|
+
current?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const Item: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & Appearance & {
|
|
14
|
+
asChild?: boolean;
|
|
15
|
+
current?: boolean;
|
|
16
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
export declare const NavButton: React.ForwardRefExoticComponent<Omit<ButtonProps, "current"> & React.RefAttributes<HTMLButtonElement>>;
|
|
18
|
+
export declare function NavIcon<T extends React.ElementType = 'div'>({ as, variant: _variant, className, ...props }: PolymorphicComponentProps<T, Appearance>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
+
import { cn } from "../../utils/cn.js";
|
|
6
|
+
const Mode = React.createContext('basic');
|
|
7
|
+
export function Root({ asChild, variant = 'basic', className, ...props }) {
|
|
8
|
+
const Element = asChild ? Slot : 'div';
|
|
9
|
+
return (_jsx(Mode.Provider, { value: variant, children: _jsx(Element, { ...props, className: cn('flex flex-wrap items-center justify-center', variant === 'group'
|
|
10
|
+
? 'divide-x divide-stroke-soft-200 overflow-hidden rounded-full border border-stroke-soft-200'
|
|
11
|
+
: 'gap-2', className) }) }));
|
|
12
|
+
}
|
|
13
|
+
function usePageStyle(variant, navigation) {
|
|
14
|
+
const inherited = React.useContext(Mode);
|
|
15
|
+
const grouped = (variant ?? inherited) === 'group';
|
|
16
|
+
return cn('flex h-8 items-center justify-center text-text-sub-600 transition duration-200 ease-out hover:bg-bg-weak-50', navigation
|
|
17
|
+
? grouped
|
|
18
|
+
? 'w-10 px-1.5'
|
|
19
|
+
: 'w-8 rounded-full'
|
|
20
|
+
: cn('px-1.5 text-center text-label-sm', grouped
|
|
21
|
+
? 'min-w-10'
|
|
22
|
+
: 'min-w-8 rounded-full ring-1 ring-inset ring-stroke-soft-200 hover:ring-transparent'));
|
|
23
|
+
}
|
|
24
|
+
export const Item = React.forwardRef(function Item({ asChild, current, variant, className, ...props }, ref) {
|
|
25
|
+
const classes = usePageStyle(variant, false);
|
|
26
|
+
const Element = asChild ? Slot : 'button';
|
|
27
|
+
return (_jsx(Element, { type: asChild ? undefined : 'button', ...props, ref: ref, "aria-current": current ? 'page' : undefined, className: cn(classes, current && 'text-text-strong-950', className) }));
|
|
28
|
+
});
|
|
29
|
+
export const NavButton = React.forwardRef(function NavButton({ asChild, variant, className, ...props }, ref) {
|
|
30
|
+
const classes = usePageStyle(variant, true);
|
|
31
|
+
const Element = asChild ? Slot : 'button';
|
|
32
|
+
return (_jsx(Element, { type: asChild ? undefined : 'button', ...props, ref: ref, className: cn(classes, className) }));
|
|
33
|
+
});
|
|
34
|
+
export function NavIcon({ as, variant: _variant, className, ...props }) {
|
|
35
|
+
void _variant;
|
|
36
|
+
const Element = as ?? 'div';
|
|
37
|
+
return _jsx(Element, { ...props, className: cn('size-5', className) });
|
|
38
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type PasswordRequirement = {
|
|
3
|
+
label: string;
|
|
4
|
+
test: (value: string) => boolean;
|
|
5
|
+
};
|
|
6
|
+
export type PasswordStrengthProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
7
|
+
value?: string;
|
|
8
|
+
requirements?: readonly PasswordRequirement[];
|
|
9
|
+
heading?: React.ReactNode;
|
|
10
|
+
};
|
|
11
|
+
export declare const defaultRequirements: readonly PasswordRequirement[];
|
|
12
|
+
export declare const Root: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
13
|
+
value?: string;
|
|
14
|
+
requirements?: readonly PasswordRequirement[];
|
|
15
|
+
heading?: React.ReactNode;
|
|
16
|
+
} & React.RefAttributes<HTMLDivElement>>;
|