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 type { PolymorphicComponentProps } from "../../utils/polymorphic.js";
|
|
3
|
+
type ContainerProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
4
|
+
asChild?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare function Root({ asChild, className, ...props }: ContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const Item: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
} & {
|
|
10
|
+
active?: boolean;
|
|
11
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export declare function Icon<T extends React.ElementType = 'div'>({ as, className, ...props }: PolymorphicComponentProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function ArrowIcon<T extends React.ElementType = 'div'>({ as, className, ...props }: PolymorphicComponentProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
export function Root({ asChild, className, ...props }) {
|
|
7
|
+
const Element = asChild ? Slot : 'div';
|
|
8
|
+
return (_jsx(Element, { ...props, className: cn('flex flex-wrap gap-1.5', className) }));
|
|
9
|
+
}
|
|
10
|
+
export const Item = React.forwardRef(function Item({ asChild, active = false, className, ...props }, ref) {
|
|
11
|
+
const Element = asChild ? Slot : 'div';
|
|
12
|
+
return (_jsx(Element, { ...props, ref: ref, "aria-current": active ? 'page' : undefined, className: cn('inline-flex items-center gap-1.5 text-label-sm transition-colors duration-200 ease-out', active
|
|
13
|
+
? 'text-text-strong-950'
|
|
14
|
+
: 'text-text-sub-600 underline decoration-transparent hover:text-text-strong-950 hover:decoration-current', className) }));
|
|
15
|
+
});
|
|
16
|
+
export function Icon({ as, className, ...props }) {
|
|
17
|
+
const Element = as ?? 'div';
|
|
18
|
+
return _jsx(Element, { ...props, className: cn('size-5', className) });
|
|
19
|
+
}
|
|
20
|
+
export function ArrowIcon({ as, className, ...props }) {
|
|
21
|
+
const Element = as ?? 'div';
|
|
22
|
+
return (_jsx(Element, { ...props, className: cn('flex size-5 select-none items-center justify-center text-text-disabled-300', className) }));
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { PolymorphicComponentProps } from "../../utils/polymorphic.js";
|
|
3
|
+
type Appearance = {
|
|
4
|
+
size: 'small' | 'xsmall' | 'xxsmall';
|
|
5
|
+
};
|
|
6
|
+
export declare const buttonGroupVariants: (options?: Partial<Appearance> & {
|
|
7
|
+
class?: import("tailwind-merge").ClassNameValue;
|
|
8
|
+
className?: import("tailwind-merge").ClassNameValue;
|
|
9
|
+
}) => Record<"root" | "icon" | "item", (overrides?: (Partial<Appearance> & {
|
|
10
|
+
class?: import("tailwind-merge").ClassNameValue;
|
|
11
|
+
className?: import("tailwind-merge").ClassNameValue;
|
|
12
|
+
}) | undefined) => string>;
|
|
13
|
+
export declare const Root: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & Partial<Appearance> & {
|
|
14
|
+
asChild?: boolean;
|
|
15
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export declare const Item: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & Partial<Appearance> & {
|
|
17
|
+
asChild?: boolean;
|
|
18
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
export declare function Icon<T extends React.ElementType = 'div'>({ as, className, size, ...props }: PolymorphicComponentProps<T, Partial<Appearance>>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare namespace Icon {
|
|
21
|
+
var displayName: string;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
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 buttonGroupVariants = slotRecipe({ size: 'small' }, ({ size }) => ({
|
|
8
|
+
root: 'flex [&>*+*]:-ml-[1.5px]',
|
|
9
|
+
item: [
|
|
10
|
+
'group relative flex items-center justify-center border border-stroke-soft-200 bg-bg-white-0 text-center text-text-sub-600 whitespace-nowrap outline-none transition duration-200 ease-out first:rounded-l-full last:rounded-r-full hover:bg-bg-weak-50 focus:bg-bg-weak-50 data-[state=on]:bg-bg-weak-50 data-[state=on]:text-text-strong-950 disabled:pointer-events-none disabled:bg-bg-weak-50 disabled:text-text-disabled-300',
|
|
11
|
+
{
|
|
12
|
+
small: 'h-9 px-4 gap-4 text-label-sm',
|
|
13
|
+
xsmall: 'h-8 px-3.5 gap-3.5 text-label-sm',
|
|
14
|
+
xxsmall: 'h-6 px-3 gap-3 text-label-xs',
|
|
15
|
+
}[size],
|
|
16
|
+
],
|
|
17
|
+
icon: ['shrink-0 -mx-2', size === 'xxsmall' ? 'size-4' : 'size-5'],
|
|
18
|
+
}));
|
|
19
|
+
export const Root = React.forwardRef(function ButtonGroup({ size, asChild, children, className, ...props }, ref) {
|
|
20
|
+
const Element = asChild ? Slot : 'div';
|
|
21
|
+
return (_jsx(appearance.Provider, { value: { size }, children: _jsx(Element, { ref: ref, role: 'group', className: buttonGroupVariants({ size }).root({ className }), ...props, children: children }) }));
|
|
22
|
+
});
|
|
23
|
+
Root.displayName = 'ButtonGroupRoot';
|
|
24
|
+
export const Item = React.forwardRef(function ButtonGroupItem({ size, asChild, children, className, ...props }, ref) {
|
|
25
|
+
const options = mergeOptions(React.useContext(appearance), {
|
|
26
|
+
size,
|
|
27
|
+
});
|
|
28
|
+
const Element = asChild ? Slot : 'button';
|
|
29
|
+
return (_jsx(appearance.Provider, { value: options, children: _jsx(Element, { ref: ref, className: buttonGroupVariants(options).item({ className }), ...props, children: children }) }));
|
|
30
|
+
});
|
|
31
|
+
Item.displayName = 'ButtonGroupItem';
|
|
32
|
+
export function Icon({ as, className, size, ...props }) {
|
|
33
|
+
const options = mergeOptions(React.useContext(appearance), {
|
|
34
|
+
size,
|
|
35
|
+
});
|
|
36
|
+
const Element = as || 'div';
|
|
37
|
+
return (_jsx(Element, { className: buttonGroupVariants(options).icon({ className }), ...props }));
|
|
38
|
+
}
|
|
39
|
+
Icon.displayName = 'ButtonGroupIcon';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { PolymorphicComponentProps } from "../../utils/polymorphic.js";
|
|
3
|
+
type Appearance = {
|
|
4
|
+
variant: 'primary' | 'neutral' | 'error';
|
|
5
|
+
mode: 'filled' | 'stroke' | 'lighter' | 'ghost';
|
|
6
|
+
size: 'medium' | 'small' | 'xsmall' | 'xxsmall';
|
|
7
|
+
};
|
|
8
|
+
export declare const buttonVariants: (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, mode, size, ...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,62 @@
|
|
|
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
|
+
const dimensions = {
|
|
8
|
+
medium: 'h-10 px-3.5 gap-3',
|
|
9
|
+
small: 'h-9 px-3 gap-3',
|
|
10
|
+
xsmall: 'h-8 px-2.5 gap-2.5',
|
|
11
|
+
xxsmall: 'h-7 px-2 gap-2.5',
|
|
12
|
+
};
|
|
13
|
+
const colors = {
|
|
14
|
+
primary: {
|
|
15
|
+
filled: 'text-static-white bg-primary-base hover:bg-primary-darker',
|
|
16
|
+
stroke: 'text-primary-base bg-bg-white-0 ring-primary-base hover:ring-transparent hover:bg-primary-alpha-10',
|
|
17
|
+
lighter: 'text-primary-base bg-primary-alpha-10 ring-transparent hover:ring-primary-base hover:bg-bg-white-0 focus-visible:ring-primary-base focus-visible:bg-bg-white-0',
|
|
18
|
+
ghost: 'text-primary-base bg-transparent ring-transparent hover:bg-primary-alpha-10 focus-visible:ring-primary-base focus-visible:bg-bg-white-0',
|
|
19
|
+
focus: 'focus-visible:shadow-button-primary-focus',
|
|
20
|
+
},
|
|
21
|
+
neutral: {
|
|
22
|
+
filled: 'text-text-white-0 bg-bg-strong-950 hover:bg-bg-surface-800',
|
|
23
|
+
stroke: 'text-text-sub-600 bg-bg-white-0 ring-stroke-soft-200 shadow-regular-xs hover:bg-bg-weak-50 hover:ring-transparent hover:shadow-none hover:text-text-strong-950 focus-visible:ring-stroke-strong-950 focus-visible:text-text-strong-950',
|
|
24
|
+
lighter: 'text-text-sub-600 bg-bg-weak-50 ring-transparent hover:bg-bg-white-0 hover:ring-stroke-soft-200 hover:shadow-regular-xs hover:text-text-strong-950 focus-visible:bg-bg-white-0 focus-visible:text-text-strong-950 focus-visible:ring-stroke-strong-950',
|
|
25
|
+
ghost: 'text-text-sub-600 bg-transparent ring-transparent hover:bg-bg-weak-50 hover:text-text-strong-950 focus-visible:bg-bg-white-0 focus-visible:text-text-strong-950 focus-visible:ring-stroke-strong-950',
|
|
26
|
+
focus: 'focus-visible:shadow-button-important-focus',
|
|
27
|
+
},
|
|
28
|
+
error: {
|
|
29
|
+
filled: 'text-static-white bg-error-base hover:bg-red-700',
|
|
30
|
+
stroke: 'text-error-base bg-bg-white-0 ring-error-base hover:ring-transparent hover:bg-red-alpha-10',
|
|
31
|
+
lighter: 'text-error-base bg-red-alpha-10 ring-transparent hover:bg-bg-white-0 hover:ring-error-base focus-visible:bg-bg-white-0 focus-visible:ring-error-base',
|
|
32
|
+
ghost: 'text-error-base bg-transparent ring-transparent hover:bg-red-alpha-10 focus-visible:bg-bg-white-0 focus-visible:ring-error-base',
|
|
33
|
+
focus: 'focus-visible:shadow-button-error-focus',
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
export const buttonVariants = slotRecipe({ variant: 'primary', mode: 'filled', size: 'medium' }, ({ variant, mode, size }) => ({
|
|
37
|
+
root: [
|
|
38
|
+
'group relative inline-flex justify-center items-center rounded-full whitespace-nowrap text-label-sm outline-none transition duration-200 ease-out',
|
|
39
|
+
dimensions[size],
|
|
40
|
+
colors[variant][mode],
|
|
41
|
+
colors[variant].focus,
|
|
42
|
+
mode !== 'filled' && 'ring-inset ring-1',
|
|
43
|
+
'disabled:pointer-events-none disabled:text-text-disabled-300 disabled:bg-bg-weak-50 disabled:ring-transparent',
|
|
44
|
+
],
|
|
45
|
+
icon: 'flex shrink-0 justify-center items-center size-5 -mx-1',
|
|
46
|
+
}));
|
|
47
|
+
export const Root = React.forwardRef(function Button({ variant, mode, size, asChild, className, children, ...props }, ref) {
|
|
48
|
+
const options = { variant, mode, size };
|
|
49
|
+
const Element = asChild ? Slot : 'button';
|
|
50
|
+
return (_jsx(appearance.Provider, { value: options, children: _jsx(Element, { ref: ref, className: buttonVariants(options).root({ className }), ...props, children: children }) }));
|
|
51
|
+
});
|
|
52
|
+
Root.displayName = 'ButtonRoot';
|
|
53
|
+
export function Icon({ as, className, variant, mode, size, ...props }) {
|
|
54
|
+
const options = mergeOptions(React.useContext(appearance), {
|
|
55
|
+
variant,
|
|
56
|
+
mode,
|
|
57
|
+
size,
|
|
58
|
+
});
|
|
59
|
+
const Element = as || 'div';
|
|
60
|
+
return (_jsx(Element, { className: buttonVariants(options).icon({ className }), ...props }));
|
|
61
|
+
}
|
|
62
|
+
Icon.displayName = 'ButtonIcon';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { legendDotAssets } from "./display-assets.js";
|
|
3
|
+
export type LegendColor = keyof typeof legendDotAssets;
|
|
4
|
+
export type LegendDotProps = Omit<React.HTMLAttributes<HTMLSpanElement>, 'color'> & {
|
|
5
|
+
color?: LegendColor;
|
|
6
|
+
size?: 16 | 20;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const Dot: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLSpanElement>, "color"> & {
|
|
10
|
+
color?: LegendColor;
|
|
11
|
+
size?: 16 | 20;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
} & React.RefAttributes<HTMLSpanElement>>;
|
|
14
|
+
export type ChartLegendProps = Omit<React.HTMLAttributes<HTMLSpanElement>, 'color'> & {
|
|
15
|
+
color?: LegendColor;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare const Root: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLSpanElement>, "color"> & {
|
|
19
|
+
color?: LegendColor;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
} & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } 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 { legendDotAssets, displayAssets } from "./display-assets.js";
|
|
7
|
+
export const Dot = React.forwardRef(function LegendDot({ color = 'gray', size = 20, disabled, className, ...props }, ref) {
|
|
8
|
+
return (_jsx("span", { ref: ref, "aria-hidden": 'true', ...props, className: cn('inline-flex shrink-0 items-center justify-center', size === 16 ? 'size-4' : 'size-5', className), children: _jsx(DisplayAsset, { src: disabled && size === 16
|
|
9
|
+
? displayAssets.legendDisabled
|
|
10
|
+
: legendDotAssets[disabled ? 'light-gray' : color][size] }) }));
|
|
11
|
+
});
|
|
12
|
+
export const Root = React.forwardRef(function ChartLegend({ color = 'gray', disabled, children = 'Legends', className, ...props }, ref) {
|
|
13
|
+
return (_jsxs("span", { ref: ref, ...props, "aria-disabled": disabled || undefined, className: cn('inline-flex items-center gap-1 text-label-xs', disabled ? 'text-text-disabled-300' : 'text-text-sub-600', className), children: [_jsx(Dot, { color: color, size: 16, disabled: disabled }), children] }));
|
|
14
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as Primitive from "@radix-ui/react-checkbox";
|
|
3
|
+
export type CheckboxSize = 'medium' | 'small';
|
|
4
|
+
export type CheckboxProps = React.ComponentPropsWithoutRef<typeof Primitive.Root> & {
|
|
5
|
+
size?: CheckboxSize;
|
|
6
|
+
};
|
|
7
|
+
declare const Root: React.ForwardRefExoticComponent<Omit<Primitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
8
|
+
size?: CheckboxSize;
|
|
9
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
type ContentProps = {
|
|
11
|
+
label: React.ReactNode;
|
|
12
|
+
sublabel?: React.ReactNode;
|
|
13
|
+
description?: React.ReactNode;
|
|
14
|
+
badge?: React.ReactNode;
|
|
15
|
+
};
|
|
16
|
+
export type CheckboxLabelProps = Omit<CheckboxProps, 'children' | 'asChild'> & ContentProps & {
|
|
17
|
+
flip?: boolean;
|
|
18
|
+
action?: React.ReactNode;
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
controlClassName?: string;
|
|
21
|
+
};
|
|
22
|
+
/** Figma 231:4897. Actions stay outside the associated label, so they do not toggle it. */
|
|
23
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<CheckboxProps, "children" | "asChild"> & ContentProps & {
|
|
24
|
+
flip?: boolean;
|
|
25
|
+
action?: React.ReactNode;
|
|
26
|
+
children?: React.ReactNode;
|
|
27
|
+
controlClassName?: string;
|
|
28
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
29
|
+
export type CheckboxCardVariant = 'basic' | 'icon' | 'avatar' | 'provider' | 'brand' | 'company';
|
|
30
|
+
export type CheckboxCardProps = Omit<CheckboxProps, 'children' | 'asChild'> & ContentProps & {
|
|
31
|
+
variant?: CheckboxCardVariant;
|
|
32
|
+
leading?: React.ReactNode;
|
|
33
|
+
children?: React.ReactNode;
|
|
34
|
+
};
|
|
35
|
+
/** Figma 261:3896. One Radix checkbox owns the complete selectable card. */
|
|
36
|
+
declare const Card: React.ForwardRefExoticComponent<Omit<CheckboxProps, "children" | "asChild"> & ContentProps & {
|
|
37
|
+
variant?: CheckboxCardVariant;
|
|
38
|
+
leading?: React.ReactNode;
|
|
39
|
+
children?: React.ReactNode;
|
|
40
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
41
|
+
export { Root, Label, Card };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { resolveMagnaAsset as __resolveMagnaAsset_1 } from "../../magna-assets.js";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { Slottable } from "@radix-ui/react-slot";
|
|
6
|
+
import * as Primitive from "@radix-ui/react-checkbox";
|
|
7
|
+
import * as LabelPrimitive from "./label.js";
|
|
8
|
+
import { cn } from "../../utils/cn.js";
|
|
9
|
+
// Figma 227:2002: medium has a 20px root/16px circle; small has 16px/14px.
|
|
10
|
+
function Control({ size = 'medium', card = false, }) {
|
|
11
|
+
return (_jsx("span", { "aria-hidden": 'true', className: cn('relative flex shrink-0 items-center justify-center', size === 'small' ? 'size-4' : 'size-5'), children: _jsxs("span", { className: cn('relative flex items-center justify-center rounded-full bg-bg-soft-200 transition-colors duration-200 group-hover/checkbox:bg-bg-sub-300 group-focus-visible/checkbox:bg-primary-base group-disabled/checkbox:!bg-bg-soft-200 group-data-[state=checked]/checkbox:bg-primary-base group-data-[state=indeterminate]/checkbox:bg-primary-base', !card &&
|
|
12
|
+
'group-hover/checkbox:group-data-[state=checked]/checkbox:bg-primary-darker group-hover/checkbox:group-data-[state=indeterminate]/checkbox:bg-primary-darker group-focus-visible/checkbox:group-data-[state=checked]/checkbox:bg-primary-dark group-focus-visible/checkbox:group-data-[state=indeterminate]/checkbox:bg-primary-dark', size === 'small' ? 'size-3.5' : 'size-4'), children: [_jsx("span", { className: 'absolute inset-[1.5px] rounded-full bg-bg-white-0 shadow-[0_2px_2px_#1b1c1d1f] transition-opacity group-disabled/checkbox:hidden group-data-[state=checked]/checkbox:opacity-0 group-data-[state=indeterminate]/checkbox:opacity-0' }), _jsxs(Primitive.Indicator, { forceMount: true, className: 'relative flex size-full items-center justify-center', children: [_jsx("img", { src: __resolveMagnaAsset_1("/magna/checkbox/check.svg"), alt: '', className: 'hidden max-w-none translate-y-[0.265px] group-data-[state=checked]/checkbox:block' }), _jsx("img", { src: __resolveMagnaAsset_1("/magna/checkbox/indeterminate.svg"), alt: '', className: 'hidden max-w-none group-data-[state=indeterminate]/checkbox:block' })] })] }) }));
|
|
13
|
+
}
|
|
14
|
+
const Root = React.forwardRef(function Root({ className, children, size = 'medium', ...props }, ref) {
|
|
15
|
+
return (_jsxs(Primitive.Root, { ...props, ref: ref, "data-size": size, className: cn('group/checkbox relative flex shrink-0 cursor-pointer items-center justify-center outline-none disabled:cursor-not-allowed', size === 'small' ? 'size-4' : 'size-5', className), children: [_jsx(Control, { size: size }), _jsx(Slottable, { children: children })] }));
|
|
16
|
+
});
|
|
17
|
+
Root.displayName = 'Checkbox';
|
|
18
|
+
/** Figma 231:4897. Actions stay outside the associated label, so they do not toggle it. */
|
|
19
|
+
const Label = React.forwardRef(function Label({ label, sublabel, description, badge, action, children, flip = false, size = 'medium', disabled, id, className, controlClassName, 'aria-labelledby': labelledBy, 'aria-describedby': describedBy, ...props }, ref) {
|
|
20
|
+
const generatedId = React.useId();
|
|
21
|
+
const controlId = id ?? generatedId;
|
|
22
|
+
const labelId = `${controlId}-label`;
|
|
23
|
+
const descriptionId = `${controlId}-description`;
|
|
24
|
+
return (_jsxs("div", { className: cn('flex w-full max-w-[300px] items-start gap-2', className), "data-disabled": disabled || undefined, dir: props.dir, children: [_jsx(Root, { ...props, ref: ref, id: controlId, size: size, disabled: disabled, "aria-labelledby": labelledBy ?? labelId, "aria-describedby": [describedBy, description ? descriptionId : undefined]
|
|
25
|
+
.filter(Boolean)
|
|
26
|
+
.join(' ') || undefined, className: cn(flip && 'order-2', size === 'small' && 'mt-0.5', controlClassName) }), _jsxs("div", { className: 'min-w-0 flex-1 space-y-2.5', children: [_jsxs(LabelPrimitive.Root, { htmlFor: controlId, disabled: disabled, className: 'block min-w-0', children: [_jsxs("span", { className: 'flex flex-wrap items-center gap-1', children: [_jsx("span", { id: labelId, className: cn(description ? 'text-label-sm' : 'text-paragraph-sm', disabled ? 'text-text-sub-600' : 'text-text-strong-950'), children: label }), sublabel && (_jsx("span", { className: cn('text-paragraph-xs', disabled ? 'text-text-soft-400' : 'text-text-sub-600'), children: sublabel })), badge] }), description && (_jsx("span", { id: descriptionId, className: cn('mt-1 block text-paragraph-xs', disabled ? 'text-text-soft-400' : 'text-text-sub-600'), children: description }))] }), action, children] })] }));
|
|
27
|
+
});
|
|
28
|
+
Label.displayName = 'CheckboxLabel';
|
|
29
|
+
/** Figma 261:3896. One Radix checkbox owns the complete selectable card. */
|
|
30
|
+
const Card = React.forwardRef(function Card({ label, sublabel, description, badge, leading, children, variant = 'basic', size = 'medium', disabled, className, id, 'aria-labelledby': labelledBy, 'aria-describedby': describedBy, ...props }, ref) {
|
|
31
|
+
const generatedId = React.useId();
|
|
32
|
+
const controlId = id ?? generatedId;
|
|
33
|
+
const labelId = `${controlId}-label`;
|
|
34
|
+
const descriptionId = `${controlId}-description`;
|
|
35
|
+
return (_jsxs(Primitive.Root, { ...props, ref: ref, id: controlId, disabled: disabled, "data-variant": variant, "data-size": size, "aria-labelledby": labelledBy ?? labelId, "aria-describedby": [describedBy, description ? descriptionId : undefined]
|
|
36
|
+
.filter(Boolean)
|
|
37
|
+
.join(' ') || undefined, className: cn('group/checkbox flex min-h-[72px] w-full max-w-[360px] cursor-pointer items-start gap-3.5 rounded-xl border border-stroke-soft-200 bg-bg-white-0 p-[15px] text-start shadow-regular-xs outline-none transition-colors hover:border-transparent hover:bg-bg-weak-50 hover:shadow-none focus-visible:ring-2 focus-visible:ring-primary-alpha-24 disabled:cursor-not-allowed disabled:!border-stroke-soft-200 disabled:!bg-bg-white-0 disabled:!shadow-none data-[state=checked]:border-primary-base data-[state=indeterminate]:border-primary-base data-[state=checked]:bg-bg-white-0 data-[state=indeterminate]:bg-bg-white-0 data-[state=checked]:shadow-none data-[state=indeterminate]:shadow-none', className), children: [leading && (_jsx("span", { "aria-hidden": 'true', className: cn('flex shrink-0 items-center justify-center', variant === 'provider' ? 'h-6 w-8' : 'size-10', variant === 'icon' &&
|
|
38
|
+
'rounded-full border border-stroke-soft-200 bg-bg-white-0 shadow-regular-xs', variant === 'company' &&
|
|
39
|
+
'overflow-hidden rounded-full bg-static-white'), children: leading })), _jsxs("span", { className: 'flex min-w-0 flex-1 flex-col gap-1', children: [_jsxs("span", { className: 'flex flex-wrap items-center gap-1', children: [_jsx("span", { id: labelId, className: cn('text-label-sm', disabled ? 'text-text-sub-600' : 'text-text-strong-950'), children: label }), sublabel && (_jsx("span", { className: cn('text-paragraph-xs', disabled ? 'text-text-soft-400' : 'text-text-sub-600'), children: sublabel })), badge] }), description && (_jsx("span", { id: descriptionId, className: cn('text-paragraph-xs', disabled ? 'text-text-soft-400' : 'text-text-sub-600'), children: description })), children] }), _jsx(Control, { size: size, card: true })] }));
|
|
40
|
+
});
|
|
41
|
+
Card.displayName = 'CheckboxCard';
|
|
42
|
+
export { Root, Label, Card };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as Aria from "react-aria-components";
|
|
3
|
+
declare function Slider({ className, ...props }: Aria.ColorSliderProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function Area({ className, ...props }: Aria.ColorAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function SliderTrack({ className, style, ...props }: Aria.SliderTrackProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function Thumb({ className, ...props }: Aria.ColorThumbProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function SwatchPicker({ className, ...props }: Aria.ColorSwatchPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function SwatchPickerItem({ className, ...props }: Aria.ColorSwatchPickerItemProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function Swatch({ className, style, ...props }: Aria.ColorSwatchProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const EyeDropperButton: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
declare const Root: typeof Aria.ColorPicker;
|
|
12
|
+
declare const Field: React.ForwardRefExoticComponent<Aria.ColorFieldProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export { Root, Field, Area, Slider, SliderTrack, Thumb, SwatchPicker, SwatchPickerItem, Swatch, EyeDropperButton, };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as Aria from "react-aria-components";
|
|
5
|
+
import { cn } from "../../utils/cn.js";
|
|
6
|
+
// Appearance is layered onto React Aria's render-prop state, leaving its color
|
|
7
|
+
// conversion, keyboard handling and generated gradients intact.
|
|
8
|
+
function classes(base, extra) {
|
|
9
|
+
return (state) => cn(base, typeof extra === 'function' ? extra(state) : extra);
|
|
10
|
+
}
|
|
11
|
+
const checkerboard = 'repeating-conic-gradient(#fff 0 90deg,rgba(0,0,0,.3) 0 180deg) 0% -25%/6px 6px';
|
|
12
|
+
function paint(style) {
|
|
13
|
+
return (state) => {
|
|
14
|
+
const user = typeof style === 'function' ? style(state) : style;
|
|
15
|
+
return {
|
|
16
|
+
...state.defaultStyle,
|
|
17
|
+
background: `${state.defaultStyle.background}, ${checkerboard}`,
|
|
18
|
+
...user,
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function Slider({ className, ...props }) {
|
|
23
|
+
return _jsx(Aria.ColorSlider, { ...props, className: classes('py-1', className) });
|
|
24
|
+
}
|
|
25
|
+
function Area({ className, ...props }) {
|
|
26
|
+
return (_jsx(Aria.ColorArea, { ...props, className: classes('h-[232px] w-full rounded-lg', className) }));
|
|
27
|
+
}
|
|
28
|
+
function SliderTrack({ className, style, ...props }) {
|
|
29
|
+
return (_jsx(Aria.SliderTrack, { ...props, className: classes('h-2 w-full rounded-full', className), style: paint(style) }));
|
|
30
|
+
}
|
|
31
|
+
function Thumb({ className, ...props }) {
|
|
32
|
+
return (_jsx(Aria.ColorThumb, { ...props, className: classes('z-50 size-3 rounded-full ring-2 ring-stroke-white-0', className) }));
|
|
33
|
+
}
|
|
34
|
+
function SwatchPicker({ className, ...props }) {
|
|
35
|
+
return (_jsx(Aria.ColorSwatchPicker, { ...props, className: classes('flex w-full flex-wrap gap-1', className) }));
|
|
36
|
+
}
|
|
37
|
+
function SwatchPickerItem({ className, ...props }) {
|
|
38
|
+
return (_jsx(Aria.ColorSwatchPickerItem, { ...props, className: classes('group/swatch-item cursor-pointer p-1 focus:outline-none', className) }));
|
|
39
|
+
}
|
|
40
|
+
function Swatch({ className, style, ...props }) {
|
|
41
|
+
return (_jsx(Aria.ColorSwatch, { ...props, className: classes('size-4 rounded-full border-stroke-white-0 group-data-[selected=true]/swatch-item:border-2 group-data-[selected=true]/swatch-item:ring-[1.5px]', className), style: paint(style) }));
|
|
42
|
+
}
|
|
43
|
+
const EyeDropperButton = React.forwardRef(function EyeDropperButton({ onClick, ...props }, ref) {
|
|
44
|
+
const state = React.useContext(Aria.ColorPickerStateContext);
|
|
45
|
+
const [available, setAvailable] = React.useState(false);
|
|
46
|
+
React.useEffect(() => setAvailable('EyeDropper' in window), []);
|
|
47
|
+
if (!available)
|
|
48
|
+
return null;
|
|
49
|
+
return (_jsx("button", { type: 'button', "aria-label": 'Eye dropper', ...props, ref: ref, onClick: async (event) => {
|
|
50
|
+
onClick?.(event);
|
|
51
|
+
if (event.defaultPrevented || !state)
|
|
52
|
+
return;
|
|
53
|
+
const Constructor = window.EyeDropper;
|
|
54
|
+
try {
|
|
55
|
+
const result = await new Constructor().open();
|
|
56
|
+
state.setColor(Aria.parseColor(result.sRGBHex));
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
/* Dismissing the system picker leaves the current color unchanged. */
|
|
60
|
+
}
|
|
61
|
+
} }));
|
|
62
|
+
});
|
|
63
|
+
const Root = Aria.ColorPicker;
|
|
64
|
+
const Field = Aria.ColorField;
|
|
65
|
+
export { Root, Field, Area, Slider, SliderTrack, Thumb, SwatchPicker, SwatchPickerItem, Swatch, EyeDropperButton, };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { DialogProps } from "@radix-ui/react-dialog";
|
|
3
|
+
import type { PolymorphicComponentProps } from "../../utils/polymorphic.js";
|
|
4
|
+
export declare const DialogTitle: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
5
|
+
export declare const DialogDescription: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
6
|
+
export declare function Dialog({ className, overlayClassName, children, ...props }: DialogProps & {
|
|
7
|
+
className?: string;
|
|
8
|
+
overlayClassName?: string;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const Input: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
|
|
11
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
12
|
+
} & {
|
|
13
|
+
asChild?: boolean;
|
|
14
|
+
}, "key" | keyof React.InputHTMLAttributes<HTMLInputElement> | "asChild">, "type" | "onChange" | "value"> & {
|
|
15
|
+
value?: string;
|
|
16
|
+
onValueChange?: (search: string) => void;
|
|
17
|
+
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
18
|
+
export declare const List: React.ForwardRefExoticComponent<Omit<{
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
21
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
22
|
+
} & {
|
|
23
|
+
asChild?: boolean;
|
|
24
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
25
|
+
label?: string;
|
|
26
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
export declare const Group: React.ForwardRefExoticComponent<Omit<{
|
|
28
|
+
children?: React.ReactNode;
|
|
29
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
30
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
31
|
+
} & {
|
|
32
|
+
asChild?: boolean;
|
|
33
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "heading"> & {
|
|
34
|
+
heading?: React.ReactNode;
|
|
35
|
+
value?: string;
|
|
36
|
+
forceMount?: boolean;
|
|
37
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
38
|
+
export declare const Item: React.ForwardRefExoticComponent<Omit<{
|
|
39
|
+
children?: React.ReactNode;
|
|
40
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
41
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
42
|
+
} & {
|
|
43
|
+
asChild?: boolean;
|
|
44
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "disabled" | "value"> & {
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
onSelect?: (value: string) => void;
|
|
47
|
+
value?: string;
|
|
48
|
+
keywords?: string[];
|
|
49
|
+
forceMount?: boolean;
|
|
50
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
51
|
+
size?: "small" | "medium";
|
|
52
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
53
|
+
export declare function ItemIcon<T extends React.ElementType = 'div'>({ as, className, ...props }: PolymorphicComponentProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
export declare function Footer({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
export declare function FooterKeyBox({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Command } from "cmdk";
|
|
5
|
+
import * as Modal from "./modal.js";
|
|
6
|
+
import { cn } from "../../utils/cn.js";
|
|
7
|
+
export const DialogTitle = Modal.Title;
|
|
8
|
+
export const DialogDescription = Modal.Description;
|
|
9
|
+
export function Dialog({ className, overlayClassName, children, ...props }) {
|
|
10
|
+
return (_jsx(Modal.Root, { ...props, children: _jsx(Modal.Content, { showClose: false, overlayClassName: cn('justify-start pt-20', overlayClassName), className: cn('flex max-h-full max-w-[600px] flex-col overflow-hidden rounded-2xl', className), children: _jsx(Command, { className: 'grid min-h-0 auto-cols-auto grid-flow-row divide-y divide-stroke-soft-200 [&>[cmdk-label]+*]:!border-t-0', children: children }) }) }));
|
|
11
|
+
}
|
|
12
|
+
export const Input = React.forwardRef(function Input({ className, ...props }, ref) {
|
|
13
|
+
return (_jsx(Command.Input, { ...props, ref: ref, className: cn('w-full bg-transparent text-paragraph-sm text-text-strong-950 outline-none transition-colors duration-200 ease-out placeholder:text-text-soft-400 placeholder:[transition:inherit] group-hover/cmd-input:placeholder:text-text-sub-600', className) }));
|
|
14
|
+
});
|
|
15
|
+
export const List = React.forwardRef(function List({ className, ...props }, ref) {
|
|
16
|
+
return (_jsx(Command.List, { ...props, ref: ref, className: cn('flex max-h-min min-h-0 flex-1 flex-col [&>[cmdk-list-sizer]]:divide-y [&>[cmdk-list-sizer]]:divide-stroke-soft-200 [&>[cmdk-list-sizer]]:overflow-auto', className) }));
|
|
17
|
+
});
|
|
18
|
+
export const Group = React.forwardRef(function Group({ className, ...props }, ref) {
|
|
19
|
+
return (_jsx(Command.Group, { ...props, ref: ref, className: cn('relative px-2 py-3 [&>[cmdk-group-heading]]:mb-2 [&>[cmdk-group-heading]]:px-3 [&>[cmdk-group-heading]]:pt-1 [&>[cmdk-group-heading]]:text-label-xs [&>[cmdk-group-heading]]:text-text-sub-600', className) }));
|
|
20
|
+
});
|
|
21
|
+
export const Item = React.forwardRef(function Item({ size = 'small', className, ...props }, ref) {
|
|
22
|
+
return (_jsx(Command.Item, { ...props, ref: ref, className: cn('flex cursor-pointer items-center gap-3 rounded-10 bg-bg-white-0 px-3 text-paragraph-sm text-text-strong-950 transition-colors duration-200 ease-out data-[selected=true]:bg-bg-weak-50', size === 'medium' ? 'py-3' : 'py-2.5', className) }));
|
|
23
|
+
});
|
|
24
|
+
export function ItemIcon({ as, className, ...props }) {
|
|
25
|
+
const Element = as ?? 'div';
|
|
26
|
+
return (_jsx(Element, { ...props, className: cn('size-5 shrink-0 text-text-sub-600', className) }));
|
|
27
|
+
}
|
|
28
|
+
export function Footer({ className, ...props }) {
|
|
29
|
+
return (_jsx("div", { ...props, className: cn('flex h-12 items-center justify-between gap-3 px-5', className) }));
|
|
30
|
+
}
|
|
31
|
+
export function FooterKeyBox({ className, ...props }) {
|
|
32
|
+
return (_jsx("div", { ...props, className: cn('inline-flex size-5 shrink-0 items-center justify-center rounded bg-bg-weak-50 text-text-sub-600 ring-1 ring-inset ring-stroke-soft-200', className) }));
|
|
33
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { PolymorphicComponentProps } from "../../utils/polymorphic.js";
|
|
3
|
+
type Appearance = {
|
|
4
|
+
variant: 'stroke' | 'ghost' | 'white' | 'modifiable';
|
|
5
|
+
size: 'large' | 'medium';
|
|
6
|
+
fullRadius: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const compactButtonVariants: (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, variant, size, className, ...props }: PolymorphicComponentProps<T, Partial<Omit<Appearance, 'fullRadius'>>>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare namespace Icon {
|
|
20
|
+
var displayName: string;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
const surfaces = {
|
|
8
|
+
stroke: 'border border-stroke-soft-200 bg-bg-white-0 shadow-regular-xs hover:border-transparent hover:shadow-none focus-visible:border-transparent focus-visible:shadow-none',
|
|
9
|
+
ghost: 'bg-transparent',
|
|
10
|
+
white: 'bg-bg-white-0 shadow-regular-xs',
|
|
11
|
+
modifiable: '',
|
|
12
|
+
};
|
|
13
|
+
export const compactButtonVariants = slotRecipe({ variant: 'stroke', size: 'large', fullRadius: true }, ({ variant, size, fullRadius }) => ({
|
|
14
|
+
root: [
|
|
15
|
+
'relative flex shrink-0 justify-center items-center outline-none transition duration-200 ease-out',
|
|
16
|
+
surfaces[variant],
|
|
17
|
+
variant !== 'modifiable' &&
|
|
18
|
+
'text-text-sub-600 hover:bg-bg-weak-50 hover:text-text-strong-950 focus-visible:bg-bg-strong-950 focus-visible:text-text-white-0',
|
|
19
|
+
size === 'large' ? 'size-6' : 'size-5',
|
|
20
|
+
fullRadius ? 'rounded-full' : 'rounded-md',
|
|
21
|
+
'disabled:pointer-events-none disabled:border-transparent disabled:bg-transparent disabled:text-text-disabled-300 disabled:shadow-none',
|
|
22
|
+
],
|
|
23
|
+
icon: size === 'large' ? 'size-5' : 'size-[18px]',
|
|
24
|
+
}));
|
|
25
|
+
export const Root = React.forwardRef(function CompactButton({ variant, size, fullRadius, asChild, className, children, ...props }, ref) {
|
|
26
|
+
const options = { variant, size, fullRadius };
|
|
27
|
+
const Element = asChild ? Slot : 'button';
|
|
28
|
+
return (_jsx(appearance.Provider, { value: options, children: _jsx(Element, { ref: ref, className: compactButtonVariants(options).root({ className }), ...props, children: children }) }));
|
|
29
|
+
});
|
|
30
|
+
Root.displayName = 'CompactButtonRoot';
|
|
31
|
+
export function Icon({ as, variant, size, className, ...props }) {
|
|
32
|
+
const options = mergeOptions(React.useContext(appearance), {
|
|
33
|
+
variant,
|
|
34
|
+
size,
|
|
35
|
+
});
|
|
36
|
+
const Element = as || 'div';
|
|
37
|
+
return (_jsx(Element, { className: compactButtonVariants(options).icon({ className }), ...props }));
|
|
38
|
+
}
|
|
39
|
+
Icon.displayName = 'CompactButtonIcon';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type ContentCardVariant = 'basic' | 'icon' | 'avatar' | 'provider' | 'brand' | 'company';
|
|
3
|
+
export type ContentCardProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> & {
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
sublabel?: React.ReactNode;
|
|
6
|
+
description?: React.ReactNode;
|
|
7
|
+
badge?: React.ReactNode;
|
|
8
|
+
leading?: React.ReactNode;
|
|
9
|
+
variant?: ContentCardVariant;
|
|
10
|
+
onDismiss?: () => void;
|
|
11
|
+
dismissLabel?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const Root: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement>, "title"> & {
|
|
14
|
+
title: React.ReactNode;
|
|
15
|
+
sublabel?: React.ReactNode;
|
|
16
|
+
description?: React.ReactNode;
|
|
17
|
+
badge?: React.ReactNode;
|
|
18
|
+
leading?: React.ReactNode;
|
|
19
|
+
variant?: ContentCardVariant;
|
|
20
|
+
onDismiss?: () => void;
|
|
21
|
+
dismissLabel?: string;
|
|
22
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../utils/cn.js";
|
|
5
|
+
import * as CompactButton from "./compact-button.js";
|
|
6
|
+
import * as KeyIcon from "./key-icon.js";
|
|
7
|
+
import { DisplayAsset } from "./display-asset.js";
|
|
8
|
+
import { displayAssets } from "./display-assets.js";
|
|
9
|
+
export const Root = React.forwardRef(function ContentCard({ title, sublabel, description, badge, leading, variant = 'basic', onDismiss, dismissLabel = 'Dismiss card', className, ...props }, ref) {
|
|
10
|
+
return (_jsxs("div", { ref: ref, ...props, className: cn('flex w-[360px] max-w-full items-center gap-3.5 rounded-xl bg-bg-white-0 p-4 shadow-regular-xs ring-1 ring-inset ring-stroke-soft-200', className), children: [variant !== 'basic' && (leading || variant === 'icon') && (_jsx("span", { className: cn('flex shrink-0 items-center justify-center', variant === 'provider' ? 'h-6 w-8' : 'size-10', variant === 'avatar' && 'overflow-hidden rounded-full'), children: leading ?? _jsx(KeyIcon.Root, { size: 40 }) })), _jsxs("div", { className: 'min-w-0 flex-1 space-y-1', children: [_jsxs("div", { className: 'flex flex-wrap items-center gap-1', children: [_jsx("span", { className: 'text-label-sm text-text-strong-950', children: title }), sublabel && (_jsx("span", { className: 'text-paragraph-xs text-text-sub-600', children: sublabel })), badge] }), description && (_jsx("p", { className: 'text-paragraph-xs text-text-sub-600', children: description }))] }), onDismiss && (_jsx(CompactButton.Root, { type: 'button', variant: 'ghost', size: 'medium', "aria-label": dismissLabel, onClick: onDismiss, children: _jsx(DisplayAsset, { src: displayAssets.contentClose }) }))] }));
|
|
11
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type ContentLabelVariant = 'basic' | 'icon' | 'avatar' | 'brand' | 'company';
|
|
3
|
+
export type ContentLabelProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> & {
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
sublabel?: React.ReactNode;
|
|
6
|
+
description?: React.ReactNode;
|
|
7
|
+
leading?: React.ReactNode;
|
|
8
|
+
badge?: React.ReactNode;
|
|
9
|
+
trailing?: React.ReactNode;
|
|
10
|
+
variant?: ContentLabelVariant;
|
|
11
|
+
size?: 'medium' | 'large';
|
|
12
|
+
};
|
|
13
|
+
export declare const Root: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement>, "title"> & {
|
|
14
|
+
title: React.ReactNode;
|
|
15
|
+
sublabel?: React.ReactNode;
|
|
16
|
+
description?: React.ReactNode;
|
|
17
|
+
leading?: React.ReactNode;
|
|
18
|
+
badge?: React.ReactNode;
|
|
19
|
+
trailing?: React.ReactNode;
|
|
20
|
+
variant?: ContentLabelVariant;
|
|
21
|
+
size?: "medium" | "large";
|
|
22
|
+
} & React.RefAttributes<HTMLDivElement>>;
|