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,27 @@
|
|
|
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 { passwordAssets } from "./display-assets.js";
|
|
7
|
+
export const defaultRequirements = [
|
|
8
|
+
{
|
|
9
|
+
label: 'At least 1 uppercase letter',
|
|
10
|
+
test: (value) => /[A-Z]/.test(value),
|
|
11
|
+
},
|
|
12
|
+
{ label: 'At least 1 number', test: (value) => /[0-9]/.test(value) },
|
|
13
|
+
{ label: 'At least 8 characters', test: (value) => value.length >= 8 },
|
|
14
|
+
];
|
|
15
|
+
export const Root = React.forwardRef(function PasswordStrength({ value = '', requirements = defaultRequirements, heading = 'Must contain at least:', className, ...props }, ref) {
|
|
16
|
+
const results = requirements.map((requirement) => requirement.test(value));
|
|
17
|
+
const fulfilled = results.filter(Boolean).length;
|
|
18
|
+
const level = !value || !requirements.length
|
|
19
|
+
? 0
|
|
20
|
+
: Math.max(1, Math.ceil((fulfilled / requirements.length) * 3));
|
|
21
|
+
const levels = ['Empty', 'Weak', 'Moderate', 'Strong'];
|
|
22
|
+
return (_jsxs("div", { ref: ref, ...props, className: cn('w-[300px] max-w-full space-y-2 pt-1.5 text-paragraph-xs text-text-sub-600', className), children: [_jsx("div", { className: 'flex gap-2', "aria-hidden": 'true', children: ['bg-error-base', 'bg-warning-base', 'bg-success-base'].map((color, index) => (_jsx("span", { className: cn('h-1 flex-1 rounded-[1.2px]', index < level ? color : 'bg-bg-soft-200') }, color))) }), _jsxs("p", { className: 'sr-only', role: 'status', children: [levels[level], ": ", fulfilled, " of ", requirements.length, " requirements met."] }), heading && _jsx("p", { children: heading }), _jsx("ul", { className: 'space-y-2', children: requirements.map((requirement, index) => (_jsxs("li", { className: 'flex items-center gap-1', children: [_jsx("span", { className: 'flex size-4 shrink-0 items-center justify-center', children: _jsx(DisplayAsset, { src: !value
|
|
23
|
+
? passwordAssets.empty
|
|
24
|
+
: results[index]
|
|
25
|
+
? passwordAssets.met
|
|
26
|
+
: passwordAssets.unmet }) }), _jsxs("span", { children: [_jsx("span", { className: 'sr-only', children: results[index] ? 'Met: ' : 'Not met: ' }), requirement.label] })] }, `${index}-${requirement.label}`))) })] }));
|
|
27
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { paymentIconAssets } from "./display-assets.js";
|
|
3
|
+
export type PaymentIconType = keyof typeof paymentIconAssets;
|
|
4
|
+
export type PaymentIconProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
5
|
+
type?: PaymentIconType;
|
|
6
|
+
label?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const Root: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & {
|
|
9
|
+
type?: PaymentIconType;
|
|
10
|
+
label?: string;
|
|
11
|
+
} & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
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 { paymentIconAssets } from "./display-assets.js";
|
|
7
|
+
const backgrounds = {
|
|
8
|
+
water: 'bg-verified-lighter',
|
|
9
|
+
gas: 'bg-error-lighter',
|
|
10
|
+
electricity: 'bg-away-lighter',
|
|
11
|
+
donate: 'bg-highlighted-lighter',
|
|
12
|
+
internet: 'bg-information-lighter',
|
|
13
|
+
phone: 'bg-warning-lighter',
|
|
14
|
+
rent: 'bg-success-lighter',
|
|
15
|
+
tax: 'bg-feature-lighter',
|
|
16
|
+
};
|
|
17
|
+
export const Root = React.forwardRef(function PaymentIcon({ type = 'water', label, className, ...props }, ref) {
|
|
18
|
+
return (_jsx("span", { ref: ref, role: label ? 'img' : undefined, "aria-label": label, "aria-hidden": label ? undefined : true, ...props, className: cn('inline-flex size-10 shrink-0 items-center justify-center rounded-full', backgrounds[type], className), children: _jsx(DisplayAsset, { src: paymentIconAssets[type] }) }));
|
|
19
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as Popover from "@radix-ui/react-popover";
|
|
3
|
+
export declare const Root: React.FC<Popover.PopoverProps>;
|
|
4
|
+
export declare const Anchor: React.ForwardRefExoticComponent<Popover.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export declare const Trigger: React.ForwardRefExoticComponent<Popover.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
export declare const Content: React.ForwardRefExoticComponent<Omit<Popover.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
7
|
+
showArrow?: boolean;
|
|
8
|
+
unstyled?: boolean;
|
|
9
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export declare const Close: React.ForwardRefExoticComponent<Omit<Popover.PopoverCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
11
|
+
unstyled?: boolean;
|
|
12
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
export type FooterProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
14
|
+
variant?: 'stretch' | 'text' | 'dots';
|
|
15
|
+
step?: number;
|
|
16
|
+
totalSteps?: number;
|
|
17
|
+
showBack?: boolean;
|
|
18
|
+
backLabel?: string;
|
|
19
|
+
nextLabel?: string;
|
|
20
|
+
onBack?: () => void;
|
|
21
|
+
onNext?: () => void;
|
|
22
|
+
backDisabled?: boolean;
|
|
23
|
+
nextDisabled?: boolean;
|
|
24
|
+
};
|
|
25
|
+
export declare const Footer: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
26
|
+
variant?: "stretch" | "text" | "dots";
|
|
27
|
+
step?: number;
|
|
28
|
+
totalSteps?: number;
|
|
29
|
+
showBack?: boolean;
|
|
30
|
+
backLabel?: string;
|
|
31
|
+
nextLabel?: string;
|
|
32
|
+
onBack?: () => void;
|
|
33
|
+
onNext?: () => void;
|
|
34
|
+
backDisabled?: boolean;
|
|
35
|
+
nextDisabled?: boolean;
|
|
36
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as Popover from "@radix-ui/react-popover";
|
|
5
|
+
import { Slottable } from "@radix-ui/react-slot";
|
|
6
|
+
import { cn } from "../../utils/cn.js";
|
|
7
|
+
import * as Button from "./button.js";
|
|
8
|
+
export const Root = Popover.Root;
|
|
9
|
+
export const Anchor = Popover.Anchor;
|
|
10
|
+
export const Trigger = Popover.Trigger;
|
|
11
|
+
const motion = 'data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=top]:slide-in-from-bottom-2 data-[side=right]:slide-in-from-left-2 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2';
|
|
12
|
+
export const Content = React.forwardRef(function Content({ children, unstyled = false, showArrow = true, className, align = 'center', sideOffset = 12, collisionPadding = 12, arrowPadding = 12, ...props }, ref) {
|
|
13
|
+
return (_jsx(Popover.Portal, { children: _jsxs(Popover.Content, { ...props, ref: ref, align: align, sideOffset: sideOffset, collisionPadding: collisionPadding, arrowPadding: arrowPadding, className: cn('z-50', motion, !unstyled &&
|
|
14
|
+
'w-max rounded-2xl bg-bg-white-0 p-5 shadow-regular-md ring-1 ring-inset ring-stroke-soft-200', className), children: [_jsx(Slottable, { children: children }), showArrow && (_jsx(Popover.Arrow, { asChild: true, children: _jsx("div", { className: 'size-[11px] -translate-y-[calc(50%+1px)] -rotate-45 rounded-bl-[3px] border border-stroke-soft-200 bg-bg-white-0', style: { clipPath: 'polygon(0% 0%, 100% 100%, 0% 100%)' } }) }))] }) }));
|
|
15
|
+
});
|
|
16
|
+
export const Close = React.forwardRef(function Close({ unstyled, className, ...props }, ref) {
|
|
17
|
+
return (_jsx(Popover.Close, { ...props, ref: ref, className: cn(!unstyled && 'absolute right-4 top-4', className) }));
|
|
18
|
+
});
|
|
19
|
+
export const Footer = React.forwardRef(function PopoverFooter({ variant = 'stretch', step = 1, totalSteps = 3, showBack = true, backLabel = 'Back', nextLabel = 'Next', onBack, onNext, backDisabled, nextDisabled, className, children, ...props }, ref) {
|
|
20
|
+
const total = Number.isFinite(totalSteps)
|
|
21
|
+
? Math.max(1, Math.floor(totalSteps))
|
|
22
|
+
: 3;
|
|
23
|
+
const current = Number.isFinite(step)
|
|
24
|
+
? Math.max(1, Math.min(total, Math.floor(step)))
|
|
25
|
+
: 1;
|
|
26
|
+
return (_jsxs("div", { ref: ref, ...props, className: cn('flex min-w-0 flex-wrap items-center gap-3 bg-bg-white-0 px-5 py-4', className), children: [variant === 'text' && (_jsxs("span", { role: 'status', className: 'me-auto text-paragraph-sm text-text-sub-600', children: ["Step ", current, " of ", total] })), variant === 'dots' && (_jsx("span", { role: 'status', "aria-label": `Step ${current} of ${total}`, className: 'me-auto flex gap-2.5', children: Array.from({ length: total }, (_, index) => (_jsx("span", { "aria-hidden": 'true', className: cn('size-2 rounded-full', index + 1 === current ? 'bg-primary-base' : 'bg-bg-soft-200') }, index))) })), children ?? (_jsxs("div", { className: cn('flex min-w-0 gap-3', variant === 'stretch' ? 'w-full' : 'ms-auto'), children: [showBack && (_jsx(Button.Root, { type: 'button', variant: 'neutral', mode: 'stroke', size: 'small', disabled: backDisabled || !onBack, onClick: onBack, className: variant === 'stretch' ? 'flex-1' : 'min-w-20', children: backLabel })), _jsx(Button.Root, { type: 'button', variant: 'primary', size: 'small', disabled: nextDisabled || !onNext, onClick: onNext, className: variant === 'stretch' ? 'flex-1' : 'min-w-20', children: nextLabel })] }))] }));
|
|
27
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type Appearance = {
|
|
3
|
+
color: 'blue' | 'red' | 'orange' | 'green';
|
|
4
|
+
};
|
|
5
|
+
export declare const progressBarVariants: (options?: Partial<Appearance> & {
|
|
6
|
+
class?: import("tailwind-merge").ClassNameValue;
|
|
7
|
+
className?: import("tailwind-merge").ClassNameValue;
|
|
8
|
+
}) => Record<"progress" | "root", (overrides?: (Partial<Appearance> & {
|
|
9
|
+
class?: import("tailwind-merge").ClassNameValue;
|
|
10
|
+
className?: import("tailwind-merge").ClassNameValue;
|
|
11
|
+
}) | undefined) => string>;
|
|
12
|
+
export declare const Root: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & Partial<Appearance> & {
|
|
13
|
+
value?: number;
|
|
14
|
+
max?: number;
|
|
15
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export type LabelProps = React.ComponentPropsWithoutRef<typeof Root> & {
|
|
17
|
+
label: React.ReactNode;
|
|
18
|
+
placement?: 'top' | 'right';
|
|
19
|
+
description?: React.ReactNode;
|
|
20
|
+
action?: React.ReactNode;
|
|
21
|
+
percentageLabel?: React.ReactNode;
|
|
22
|
+
showPercentage?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export declare const Label: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement> & Partial<Appearance> & {
|
|
25
|
+
value?: number;
|
|
26
|
+
max?: number;
|
|
27
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
28
|
+
label: React.ReactNode;
|
|
29
|
+
placement?: "top" | "right";
|
|
30
|
+
description?: React.ReactNode;
|
|
31
|
+
action?: React.ReactNode;
|
|
32
|
+
percentageLabel?: React.ReactNode;
|
|
33
|
+
showPercentage?: boolean;
|
|
34
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { slotRecipe, toneClasses } from "./magna-recipe.js";
|
|
5
|
+
import { cn } from "../../utils/cn.js";
|
|
6
|
+
export const progressBarVariants = slotRecipe({ color: 'blue' }, ({ color }) => ({
|
|
7
|
+
root: 'w-full h-1.5 rounded-full bg-bg-soft-200',
|
|
8
|
+
progress: [
|
|
9
|
+
'rounded-[inherit] h-full transition-[width] duration-300 ease-out',
|
|
10
|
+
toneClasses[color].solid,
|
|
11
|
+
],
|
|
12
|
+
}));
|
|
13
|
+
export const Root = React.forwardRef(function ProgressBar({ value = 0, max = 100, color, className, ...props }, ref) {
|
|
14
|
+
const limit = Number.isFinite(max) && max > 0 ? max : 100;
|
|
15
|
+
const current = Number.isFinite(value)
|
|
16
|
+
? Math.max(0, Math.min(limit, value))
|
|
17
|
+
: 0;
|
|
18
|
+
const styles = progressBarVariants({ color });
|
|
19
|
+
return (_jsx("div", { ref: ref, role: 'progressbar', "aria-valuemin": 0, "aria-valuemax": limit, "aria-valuenow": current, ...props, className: styles.root({ className }), children: _jsx("div", { "aria-hidden": 'true', className: styles.progress(), style: { width: `${(100 * current) / limit}%` } }) }));
|
|
20
|
+
});
|
|
21
|
+
Root.displayName = 'ProgressBarRoot';
|
|
22
|
+
export const Label = React.forwardRef(function ProgressBarLabel({ label, placement = 'top', description, action, percentageLabel, showPercentage = true, value = 0, max = 100, className, ...props }, ref) {
|
|
23
|
+
const labelId = React.useId();
|
|
24
|
+
const limit = Number.isFinite(max) && max > 0 ? max : 100;
|
|
25
|
+
const current = Number.isFinite(value)
|
|
26
|
+
? Math.max(0, Math.min(limit, value))
|
|
27
|
+
: 0;
|
|
28
|
+
const percentage = percentageLabel ?? `${Math.round((current / limit) * 100)}%`;
|
|
29
|
+
return (_jsxs("div", { className: cn('w-[320px] max-w-full', placement === 'right' ? 'flex items-center gap-2' : 'space-y-1.5', className), children: [placement === 'top' ? (_jsxs("div", { className: 'flex items-start justify-between gap-1.5', children: [_jsx("span", { id: labelId, className: 'text-label-sm text-text-strong-950', children: label }), showPercentage && (_jsx("span", { "aria-hidden": 'true', className: 'text-paragraph-xs text-text-sub-600', children: percentage }))] })) : (_jsx("span", { id: labelId, className: 'sr-only', children: label })), _jsx(Root, { ref: ref, value: current, max: limit, "aria-labelledby": labelId, ...props }), placement === 'right'
|
|
30
|
+
? showPercentage && (_jsx("span", { "aria-hidden": 'true', className: 'shrink-0 text-paragraph-xs text-text-sub-600', children: percentage }))
|
|
31
|
+
: (action || description) && (_jsxs("div", { className: 'flex flex-wrap items-center gap-1 text-paragraph-xs text-text-sub-600', children: [action, description && _jsx("span", { children: description })] }))] }));
|
|
32
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type Appearance = {
|
|
3
|
+
size: '80' | '72' | '64' | '56' | '48';
|
|
4
|
+
};
|
|
5
|
+
export declare const progressCircleVariants: (options?: Partial<Appearance> & {
|
|
6
|
+
class?: import("tailwind-merge").ClassNameValue;
|
|
7
|
+
className?: import("tailwind-merge").ClassNameValue;
|
|
8
|
+
}) => Record<"text", (overrides?: (Partial<Appearance> & {
|
|
9
|
+
class?: import("tailwind-merge").ClassNameValue;
|
|
10
|
+
className?: import("tailwind-merge").ClassNameValue;
|
|
11
|
+
}) | undefined) => string>;
|
|
12
|
+
export declare const Root: React.ForwardRefExoticComponent<Omit<Omit<React.SVGProps<SVGSVGElement>, "value"> & Partial<Appearance> & {
|
|
13
|
+
value?: number;
|
|
14
|
+
max?: number;
|
|
15
|
+
}, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { slotRecipe } from "./magna-recipe.js";
|
|
6
|
+
const strokeWidths = { '80': 6.4, '72': 5.75, '64': 5.1, '56': 4.5, '48': 6.7 };
|
|
7
|
+
export const progressCircleVariants = slotRecipe({ size: '80' }, ({ size }) => ({
|
|
8
|
+
text: Number(size) < 64 ? 'text-label-xs' : 'text-label-sm',
|
|
9
|
+
}));
|
|
10
|
+
export const Root = React.forwardRef(function ProgressCircle({ size = '80', value = 0, max = 100, children, className, ...props }, ref) {
|
|
11
|
+
const limit = Number.isFinite(max) && max > 0 ? max : 100;
|
|
12
|
+
const current = Number.isFinite(value)
|
|
13
|
+
? Math.max(0, Math.min(limit, value))
|
|
14
|
+
: 0;
|
|
15
|
+
const width = Number(size);
|
|
16
|
+
const stroke = strokeWidths[size];
|
|
17
|
+
const center = width / 2;
|
|
18
|
+
const shape = {
|
|
19
|
+
cx: center,
|
|
20
|
+
cy: center,
|
|
21
|
+
r: center - stroke / 2,
|
|
22
|
+
strokeWidth: stroke,
|
|
23
|
+
fill: 'none',
|
|
24
|
+
};
|
|
25
|
+
return (_jsxs("div", { className: cn('relative', className), children: [_jsxs("svg", { ref: ref, width: width, height: width, viewBox: `0 0 ${width} ${width}`, role: 'progressbar', "aria-valuemin": 0, "aria-valuemax": limit, "aria-valuenow": current, ...props, children: [_jsx("circle", { ...shape, className: 'stroke-bg-soft-200' }), _jsx("circle", { ...shape, pathLength: 100, strokeDasharray: '100', strokeDashoffset: 100 - (current / limit) * 100, transform: `rotate(-90 ${center} ${center})`, className: 'stroke-primary-base transition-[stroke-dashoffset] duration-300 ease-out' })] }), children != null && (_jsx("div", { className: progressCircleVariants({ size }).text({
|
|
26
|
+
className: 'absolute inset-0 grid place-items-center text-center',
|
|
27
|
+
}), children: children }))] }));
|
|
28
|
+
});
|
|
29
|
+
Root.displayName = 'ProgressCircleRoot';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as Primitive from "@radix-ui/react-radio-group";
|
|
3
|
+
declare const Group: React.ForwardRefExoticComponent<Primitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export type RadioProps = React.ComponentPropsWithoutRef<typeof Primitive.Item>;
|
|
5
|
+
declare const Item: React.ForwardRefExoticComponent<Omit<Primitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
type ContentProps = {
|
|
7
|
+
label: React.ReactNode;
|
|
8
|
+
sublabel?: React.ReactNode;
|
|
9
|
+
description?: React.ReactNode;
|
|
10
|
+
badge?: React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
export type RadioLabelProps = Omit<RadioProps, 'children' | 'asChild'> & ContentProps & {
|
|
13
|
+
flip?: boolean;
|
|
14
|
+
action?: React.ReactNode;
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
controlClassName?: string;
|
|
17
|
+
};
|
|
18
|
+
/** Figma 515:4282. Actions stay outside the associated label, so they do not toggle it. */
|
|
19
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<Omit<Primitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref">, "children" | "asChild"> & ContentProps & {
|
|
20
|
+
flip?: boolean;
|
|
21
|
+
action?: React.ReactNode;
|
|
22
|
+
children?: React.ReactNode;
|
|
23
|
+
controlClassName?: string;
|
|
24
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
25
|
+
export type RadioCardVariant = 'basic' | 'icon' | 'avatar' | 'provider' | 'brand' | 'company';
|
|
26
|
+
export type RadioCardProps = Omit<RadioProps, 'children' | 'asChild'> & ContentProps & {
|
|
27
|
+
variant?: RadioCardVariant;
|
|
28
|
+
leading?: React.ReactNode;
|
|
29
|
+
children?: React.ReactNode;
|
|
30
|
+
};
|
|
31
|
+
/** Figma 515:4347. One Radix radio owns the complete selectable card. */
|
|
32
|
+
declare const Card: React.ForwardRefExoticComponent<Omit<Omit<Primitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref">, "children" | "asChild"> & ContentProps & {
|
|
33
|
+
variant?: RadioCardVariant;
|
|
34
|
+
leading?: React.ReactNode;
|
|
35
|
+
children?: React.ReactNode;
|
|
36
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
37
|
+
export { Group, Item, Label, Card };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Slottable } from "@radix-ui/react-slot";
|
|
5
|
+
import * as Primitive from "@radix-ui/react-radio-group";
|
|
6
|
+
import * as LabelPrimitive from "./label.js";
|
|
7
|
+
import { cn } from "../../utils/cn.js";
|
|
8
|
+
const Group = Primitive.Root;
|
|
9
|
+
function Control() {
|
|
10
|
+
return (_jsxs("span", { "aria-hidden": 'true', className: 'relative flex size-4 items-center justify-center rounded-full bg-bg-soft-200 transition-colors group-hover/radio:bg-bg-sub-300 group-focus/radio:bg-primary-base group-disabled/radio:bg-bg-soft-200 group-data-[state=checked]/radio:bg-bg-white-0', children: [_jsx("span", { className: 'absolute inset-[1.5px] rounded-full bg-bg-white-0 shadow-[0_2px_2px_#1b1c1d1f] group-disabled/radio:hidden' }), _jsx(Primitive.Indicator, { className: 'absolute inset-0 rounded-full border-4 border-primary-base transition-colors group-hover/radio:border-primary-darker group-focus/radio:border-primary-dark group-disabled/radio:border-bg-soft-200' })] }));
|
|
11
|
+
}
|
|
12
|
+
const Item = React.forwardRef(function Item({ className, children, ...props }, ref) {
|
|
13
|
+
return (_jsxs(Primitive.Item, { ...props, ref: ref, className: cn('group/radio relative flex size-5 shrink-0 items-center justify-center outline-none disabled:cursor-not-allowed', className), children: [_jsx(Control, {}), _jsx(Slottable, { children: children })] }));
|
|
14
|
+
});
|
|
15
|
+
/** Figma 515:4282. Actions stay outside the associated label, so they do not toggle it. */
|
|
16
|
+
const Label = React.forwardRef(function Label({ label, sublabel, description, badge, action, children, flip = false, disabled, id, className, controlClassName, 'aria-labelledby': labelledBy, 'aria-describedby': describedBy, ...props }, ref) {
|
|
17
|
+
const generatedId = React.useId();
|
|
18
|
+
const controlId = id ?? generatedId;
|
|
19
|
+
const labelId = `${controlId}-label`;
|
|
20
|
+
const descriptionId = `${controlId}-description`;
|
|
21
|
+
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(Item, { ...props, ref: ref, id: controlId, disabled: disabled, "aria-labelledby": labelledBy ?? labelId, "aria-describedby": [describedBy, description ? descriptionId : undefined]
|
|
22
|
+
.filter(Boolean)
|
|
23
|
+
.join(' ') || undefined, className: cn(flip && 'order-2', 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] })] }));
|
|
24
|
+
});
|
|
25
|
+
Label.displayName = 'RadioLabel';
|
|
26
|
+
/** Figma 515:4347. One Radix radio owns the complete selectable card. */
|
|
27
|
+
const Card = React.forwardRef(function Card({ label, sublabel, description, badge, leading, children, variant = 'basic', disabled, className, id, 'aria-labelledby': labelledBy, 'aria-describedby': describedBy, ...props }, ref) {
|
|
28
|
+
const generatedId = React.useId();
|
|
29
|
+
const controlId = id ?? generatedId;
|
|
30
|
+
const labelId = `${controlId}-label`;
|
|
31
|
+
const descriptionId = `${controlId}-description`;
|
|
32
|
+
return (_jsxs(Primitive.Item, { ...props, ref: ref, id: controlId, disabled: disabled, "data-variant": variant, "aria-labelledby": labelledBy ?? labelId, "aria-describedby": [describedBy, description ? descriptionId : undefined]
|
|
33
|
+
.filter(Boolean)
|
|
34
|
+
.join(' ') || undefined, className: cn('group/radio 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' &&
|
|
35
|
+
'rounded-full border border-stroke-soft-200 bg-bg-white-0 shadow-regular-xs', variant === 'company' &&
|
|
36
|
+
'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, {})] }));
|
|
37
|
+
});
|
|
38
|
+
Card.displayName = 'RadioCard';
|
|
39
|
+
export { Group, Item, Label, Card };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as RadioPrimitive from "@radix-ui/react-radio-group";
|
|
3
|
+
export type RatingType = 'star' | 'heart' | 'number' | 'emoji';
|
|
4
|
+
declare const artwork: {
|
|
5
|
+
star: {
|
|
6
|
+
empty: string;
|
|
7
|
+
muted: string;
|
|
8
|
+
half: string;
|
|
9
|
+
full: string;
|
|
10
|
+
};
|
|
11
|
+
heart: {
|
|
12
|
+
empty: string;
|
|
13
|
+
muted: string;
|
|
14
|
+
half: string;
|
|
15
|
+
full: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
declare function Icon({ type, state, className, }: {
|
|
19
|
+
type?: 'star' | 'heart';
|
|
20
|
+
state?: keyof typeof artwork.star;
|
|
21
|
+
className?: string;
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export type ReviewProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
24
|
+
value: number;
|
|
25
|
+
type?: 'star' | 'heart';
|
|
26
|
+
alignment?: 'ratings' | 'vertical' | 'horizontal';
|
|
27
|
+
description?: React.ReactNode;
|
|
28
|
+
reviewLink?: React.ReactNode;
|
|
29
|
+
};
|
|
30
|
+
declare function Review({ value, type, alignment, description, reviewLink, className, ...props }: ReviewProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
declare const Cell: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type"> & {
|
|
32
|
+
type?: "star" | "heart";
|
|
33
|
+
selected?: boolean;
|
|
34
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
35
|
+
export type BarProps = Omit<React.ComponentPropsWithoutRef<typeof RadioPrimitive.Root>, 'value' | 'defaultValue' | 'onValueChange'> & {
|
|
36
|
+
type?: RatingType;
|
|
37
|
+
value?: number;
|
|
38
|
+
defaultValue?: number;
|
|
39
|
+
onValueChange?: (value: number) => void;
|
|
40
|
+
};
|
|
41
|
+
declare const Bar: React.ForwardRefExoticComponent<Omit<Omit<RadioPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref">, "defaultValue" | "value" | "onValueChange"> & {
|
|
42
|
+
type?: RatingType;
|
|
43
|
+
value?: number;
|
|
44
|
+
defaultValue?: number;
|
|
45
|
+
onValueChange?: (value: number) => void;
|
|
46
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
47
|
+
export type BarItemProps = Omit<React.ComponentPropsWithoutRef<typeof RadioPrimitive.Item>, 'value' | 'type'> & {
|
|
48
|
+
value: number;
|
|
49
|
+
type?: RatingType;
|
|
50
|
+
emojiSrc?: string;
|
|
51
|
+
};
|
|
52
|
+
declare const BarItem: React.ForwardRefExoticComponent<Omit<Omit<RadioPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref">, "type" | "value"> & {
|
|
53
|
+
value: number;
|
|
54
|
+
type?: RatingType;
|
|
55
|
+
emojiSrc?: string;
|
|
56
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
57
|
+
export type BarAreaProps = BarProps & {
|
|
58
|
+
textareaProps?: React.TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
59
|
+
feedbackLabel?: string;
|
|
60
|
+
};
|
|
61
|
+
declare function BarArea({ className, textareaProps, feedbackLabel, ...props }: BarAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
export { Review, Cell, Bar, BarItem, BarArea, Icon };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { resolveMagnaAsset as __resolveMagnaAsset_1 } from "../../magna-assets.js";
|
|
4
|
+
/* eslint-disable @next/next/no-img-element -- Preserve original Figma SVG artwork. */
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import * as RadioPrimitive from "@radix-ui/react-radio-group";
|
|
7
|
+
import { cn } from "../../utils/cn.js";
|
|
8
|
+
const artwork = {
|
|
9
|
+
star: {
|
|
10
|
+
empty: '970af.svg',
|
|
11
|
+
muted: '8d97b.svg',
|
|
12
|
+
half: 'a74b0.svg',
|
|
13
|
+
full: '29541.svg',
|
|
14
|
+
},
|
|
15
|
+
heart: {
|
|
16
|
+
empty: '185ae.svg',
|
|
17
|
+
muted: 'c64ff.svg',
|
|
18
|
+
half: '73539.svg',
|
|
19
|
+
full: 'a119e.svg',
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
const emoji = ['4ff30.png', 'eed5c.png', '939c2.png', '07b3a.png', 'e5b24.png'];
|
|
23
|
+
function Icon({ type = 'star', state = 'empty', className, }) {
|
|
24
|
+
// Full exported 20px artwork, scaled only for the 32px Rating Cell variant.
|
|
25
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
26
|
+
return (_jsx("img", { src: __resolveMagnaAsset_1(`/magna/forms/${artwork[type][state]}`), alt: '', "aria-hidden": 'true', className: cn('block size-5 shrink-0', className) }));
|
|
27
|
+
}
|
|
28
|
+
function Review({ value, type = 'star', alignment = 'ratings', description, reviewLink, className, ...props }) {
|
|
29
|
+
const rating = Math.max(0, Math.min(5, Number.isFinite(value) ? value : 0));
|
|
30
|
+
return (_jsxs("div", { ...props, className: cn('flex gap-2', alignment === 'vertical'
|
|
31
|
+
? 'flex-col items-start'
|
|
32
|
+
: 'flex-wrap items-center', className), children: [_jsx("span", { role: 'img', "aria-label": `${rating} out of 5`, className: 'flex gap-0.5', children: Array.from({ length: 5 }, (_, i) => (_jsx(Icon, { type: type, state: rating >= i + 1 ? 'full' : rating >= i + 0.5 ? 'half' : 'empty' }, i))) }), alignment !== 'ratings' && (_jsxs("span", { className: 'flex flex-wrap items-center gap-1 text-paragraph-sm text-text-strong-950', children: [description ?? `${rating} out of 5`, reviewLink && (_jsx("span", { className: 'text-label-sm text-text-sub-600 underline underline-offset-2', children: reviewLink }))] }))] }));
|
|
33
|
+
}
|
|
34
|
+
const Cell = React.forwardRef(function Cell({ type = 'star', selected = false, className, children, ...props }, ref) {
|
|
35
|
+
return (_jsxs("button", { ...props, ref: ref, type: 'button', "aria-pressed": selected, className: cn('group/rating flex size-14 shrink-0 items-center justify-center rounded-[10px] border border-stroke-soft-200 bg-bg-white-0 p-3 shadow-regular-xs outline-none hover:border-transparent hover:bg-bg-weak-50 hover:shadow-none focus-visible:ring-2 focus-visible:ring-primary-base disabled:pointer-events-none disabled:opacity-50', className), children: [_jsx(Icon, { type: type, state: selected ? 'full' : 'muted', className: cn('size-8', !selected && 'group-hover/rating:hidden') }), !selected && (_jsx(Icon, { type: type, state: 'full', className: 'hidden size-8 group-hover/rating:block' })), children] }));
|
|
36
|
+
});
|
|
37
|
+
const RatingContext = React.createContext({
|
|
38
|
+
type: 'star',
|
|
39
|
+
value: 0,
|
|
40
|
+
});
|
|
41
|
+
const Bar = React.forwardRef(function Bar({ type = 'star', value, defaultValue = 0, onValueChange, className, children, ...props }, ref) {
|
|
42
|
+
const [internal, setInternal] = React.useState(defaultValue);
|
|
43
|
+
const current = value ?? internal;
|
|
44
|
+
return (_jsx(RatingContext.Provider, { value: { type, value: current }, children: _jsx(RadioPrimitive.Root, { ...props, ref: ref, value: String(current), onValueChange: (next) => {
|
|
45
|
+
if (value === undefined)
|
|
46
|
+
setInternal(Number(next));
|
|
47
|
+
onValueChange?.(Number(next));
|
|
48
|
+
}, orientation: 'horizontal', className: cn('flex w-[320px] max-w-full overflow-hidden border border-stroke-soft-200 bg-bg-white-0', className), children: children ??
|
|
49
|
+
[1, 2, 3, 4, 5].map((n) => (_jsx(BarItem, { value: n, "aria-label": `${n} out of 5` }, n))) }) }));
|
|
50
|
+
});
|
|
51
|
+
const BarItem = React.forwardRef(function BarItem({ value, type, emojiSrc, className, children, ...props }, ref) {
|
|
52
|
+
const context = React.useContext(RatingContext);
|
|
53
|
+
const kind = type ?? context.type;
|
|
54
|
+
const filled = value <= context.value;
|
|
55
|
+
const isIcon = kind === 'star' || kind === 'heart';
|
|
56
|
+
return (_jsx(RadioPrimitive.Item, { ...props, ref: ref, value: String(value), className: cn('group/rating flex h-9 min-w-0 flex-1 items-center justify-center border-e border-stroke-soft-200 px-1 py-2 text-label-sm text-text-sub-600 outline-none last:border-e-0 focus-visible:relative focus-visible:z-10 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary-base disabled:pointer-events-none disabled:opacity-50', !isIcon &&
|
|
57
|
+
'hover:text-text-strong-950 data-[state=checked]:bg-bg-weak-50 data-[state=checked]:text-text-strong-950', className), children: children ??
|
|
58
|
+
(isIcon ? (_jsxs(_Fragment, { children: [_jsx(Icon, { type: kind, state: filled ? 'full' : 'empty', className: cn(!filled && 'group-hover/rating:hidden') }), !filled && (_jsx(Icon, { type: kind, state: 'muted', className: 'hidden group-hover/rating:block' }))] })) : kind === 'number' ? (value) : (
|
|
59
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
60
|
+
_jsx("img", { src: emojiSrc ?? __resolveMagnaAsset_1(`/magna/forms/${emoji[Math.max(0, Math.min(4, value - 1))]}`), alt: '', "aria-hidden": 'true', className: 'size-5' }))) }));
|
|
61
|
+
});
|
|
62
|
+
function BarArea({ className, textareaProps, feedbackLabel = 'Tell us why', ...props }) {
|
|
63
|
+
return (_jsxs("div", { className: cn('w-[320px] max-w-full overflow-hidden rounded-xl border border-stroke-soft-200 bg-bg-white-0 focus-within:ring-2 focus-within:ring-primary-alpha-24', className), children: [_jsx(Bar, { ...props, className: 'w-full border-0 border-b' }), _jsx("textarea", { ...textareaProps, "aria-label": textareaProps?.['aria-label'] ?? feedbackLabel, disabled: props.disabled || textareaProps?.disabled, placeholder: textareaProps?.placeholder ?? 'Tell us why!', className: cn('block min-h-24 w-full resize-y bg-transparent p-3 text-paragraph-sm text-text-strong-950 outline-none placeholder:text-text-soft-400 disabled:opacity-50', textareaProps?.className) })] }));
|
|
64
|
+
}
|
|
65
|
+
export { Review, Cell, Bar, BarItem, BarArea, Icon };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type Editor } from "@tiptap/react";
|
|
3
|
+
export declare const colors: {
|
|
4
|
+
readonly gray: "#7b7b7b";
|
|
5
|
+
readonly blue: "#335cff";
|
|
6
|
+
readonly orange: "#fa7319";
|
|
7
|
+
readonly red: "#fb3748";
|
|
8
|
+
readonly green: "#1fc16b";
|
|
9
|
+
readonly yellow: "#f6b51e";
|
|
10
|
+
readonly purple: "#7d52f4";
|
|
11
|
+
readonly sky: "#47c2ff";
|
|
12
|
+
readonly pink: "#fb4ba3";
|
|
13
|
+
readonly teal: "#22d3bb";
|
|
14
|
+
};
|
|
15
|
+
export type EditorColor = keyof typeof colors;
|
|
16
|
+
export type ToolbarVariant = '01' | '02' | '03' | '04';
|
|
17
|
+
export type EditorIcon = 'bold' | 'italic' | 'underline' | 'strike' | 'align-left' | 'comment' | 'link' | 'at' | 'more';
|
|
18
|
+
type CommentSelection = {
|
|
19
|
+
text: string;
|
|
20
|
+
from: number;
|
|
21
|
+
to: number;
|
|
22
|
+
};
|
|
23
|
+
type ContextValue = {
|
|
24
|
+
editor: Editor | null;
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
onComment?: (selection: CommentSelection) => void;
|
|
27
|
+
};
|
|
28
|
+
export declare function useRichEditor(): ContextValue;
|
|
29
|
+
export type RootProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange'> & {
|
|
30
|
+
value?: string;
|
|
31
|
+
defaultValue?: string;
|
|
32
|
+
onValueChange?: (html: string) => void;
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
label?: string;
|
|
35
|
+
placeholder?: string;
|
|
36
|
+
onComment?: (selection: CommentSelection) => void;
|
|
37
|
+
};
|
|
38
|
+
export declare const Root: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> & {
|
|
39
|
+
value?: string;
|
|
40
|
+
defaultValue?: string;
|
|
41
|
+
onValueChange?: (html: string) => void;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
label?: string;
|
|
44
|
+
placeholder?: string;
|
|
45
|
+
onComment?: (selection: CommentSelection) => void;
|
|
46
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
47
|
+
export declare const Content: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement>, "children"> & React.RefAttributes<HTMLDivElement>>;
|
|
48
|
+
export type ItemProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
49
|
+
variant?: 'text' | 'dropdown' | 'icon' | 'color';
|
|
50
|
+
active?: boolean;
|
|
51
|
+
icon?: EditorIcon;
|
|
52
|
+
color?: EditorColor;
|
|
53
|
+
};
|
|
54
|
+
export declare const Item: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
55
|
+
variant?: "text" | "dropdown" | "icon" | "color";
|
|
56
|
+
active?: boolean;
|
|
57
|
+
icon?: EditorIcon;
|
|
58
|
+
color?: EditorColor;
|
|
59
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
60
|
+
export type ColorSwatchProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color'> & {
|
|
61
|
+
color?: EditorColor;
|
|
62
|
+
selected?: boolean;
|
|
63
|
+
};
|
|
64
|
+
export declare const ColorSwatch: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color"> & {
|
|
65
|
+
color?: EditorColor;
|
|
66
|
+
selected?: boolean;
|
|
67
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
68
|
+
export declare function Divider(): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
export type ToolbarProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
70
|
+
variant?: ToolbarVariant;
|
|
71
|
+
showMore?: boolean;
|
|
72
|
+
};
|
|
73
|
+
export declare const Toolbar: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
74
|
+
variant?: ToolbarVariant;
|
|
75
|
+
showMore?: boolean;
|
|
76
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
77
|
+
export {};
|