@luxfi/ui 7.4.15 → 8.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.md +21 -0
- package/dist/3d-button.cjs +298 -0
- package/dist/3d-button.d.ts +52 -0
- package/dist/3d-button.d.ts.map +1 -0
- package/dist/3d-button.js +273 -0
- package/dist/3d-card.cjs +236 -0
- package/dist/3d-card.d.ts +29 -0
- package/dist/3d-card.d.ts.map +1 -0
- package/dist/3d-card.js +209 -0
- package/dist/3d-carousel.cjs +375 -0
- package/dist/3d-carousel.d.ts +26 -0
- package/dist/3d-carousel.d.ts.map +1 -0
- package/dist/3d-carousel.js +348 -0
- package/dist/3d-grid.cjs +360 -0
- package/dist/3d-grid.d.ts +49 -0
- package/dist/3d-grid.d.ts.map +1 -0
- package/dist/3d-grid.js +335 -0
- package/dist/3d-marquee.cjs +8669 -0
- package/dist/3d-marquee.d.ts +65 -0
- package/dist/3d-marquee.d.ts.map +1 -0
- package/dist/3d-marquee.js +8645 -0
- package/dist/3d-model-viewer.cjs +909 -0
- package/dist/3d-model-viewer.d.ts +45 -0
- package/dist/3d-model-viewer.d.ts.map +1 -0
- package/dist/3d-model-viewer.js +886 -0
- package/dist/3d-pin.cjs +46 -0
- package/dist/3d-pin.d.ts +8 -0
- package/dist/3d-pin.d.ts.map +1 -0
- package/dist/3d-pin.js +24 -0
- package/dist/3d-scene.cjs +439 -0
- package/dist/3d-scene.d.ts +76 -0
- package/dist/3d-scene.d.ts.map +1 -0
- package/dist/3d-scene.js +407 -0
- package/dist/3d-text.cjs +367 -0
- package/dist/3d-text.d.ts +62 -0
- package/dist/3d-text.d.ts.map +1 -0
- package/dist/3d-text.js +341 -0
- package/dist/accordion.d.ts +10 -12
- package/dist/accordion.d.ts.map +1 -0
- package/dist/advanced-chart.cjs +53 -0
- package/dist/advanced-chart.d.ts +6 -0
- package/dist/advanced-chart.d.ts.map +1 -0
- package/dist/advanced-chart.js +51 -0
- package/dist/advanced-navigation-bar.cjs +459 -0
- package/dist/advanced-navigation-bar.d.ts +14 -0
- package/dist/advanced-navigation-bar.d.ts.map +1 -0
- package/dist/advanced-navigation-bar.js +437 -0
- package/dist/ai-actions.cjs +57 -0
- package/dist/ai-actions.d.ts +14 -0
- package/dist/ai-actions.d.ts.map +1 -0
- package/dist/ai-actions.js +35 -0
- package/dist/ai-agents.cjs +1764 -0
- package/dist/ai-agents.d.ts +56 -0
- package/dist/ai-agents.d.ts.map +1 -0
- package/dist/ai-agents.js +1740 -0
- package/dist/ai-assistant.cjs +907 -0
- package/dist/ai-assistant.d.ts +28 -0
- package/dist/ai-assistant.d.ts.map +1 -0
- package/dist/ai-assistant.js +886 -0
- package/dist/ai-chat.cjs +1165 -0
- package/dist/ai-chat.d.ts +56 -0
- package/dist/ai-chat.d.ts.map +1 -0
- package/dist/ai-chat.js +1141 -0
- package/dist/ai-code.cjs +1866 -0
- package/dist/ai-code.d.ts +58 -0
- package/dist/ai-code.d.ts.map +1 -0
- package/dist/ai-code.js +1841 -0
- package/dist/ai-model-selector-navigation-bar.cjs +59 -0
- package/dist/ai-model-selector-navigation-bar.d.ts +15 -0
- package/dist/ai-model-selector-navigation-bar.d.ts.map +1 -0
- package/dist/ai-model-selector-navigation-bar.js +37 -0
- package/dist/ai-models.cjs +41 -0
- package/dist/ai-models.d.ts +15 -0
- package/dist/ai-models.d.ts.map +1 -0
- package/dist/ai-models.js +19 -0
- package/dist/ai-playground.cjs +1110 -0
- package/dist/ai-playground.d.ts +66 -0
- package/dist/ai-playground.d.ts.map +1 -0
- package/dist/ai-playground.js +1088 -0
- package/dist/ai-tools.cjs +1043 -0
- package/dist/ai-tools.d.ts +23 -0
- package/dist/ai-tools.d.ts.map +1 -0
- package/dist/ai-tools.js +1022 -0
- package/dist/ai-vision.cjs +1831 -0
- package/dist/ai-vision.d.ts +74 -0
- package/dist/ai-vision.d.ts.map +1 -0
- package/dist/ai-vision.js +1810 -0
- package/dist/ai-voice-settings.cjs +1511 -0
- package/dist/ai-voice-settings.d.ts +100 -0
- package/dist/ai-voice-settings.d.ts.map +1 -0
- package/dist/ai-voice-settings.js +1478 -0
- package/dist/ai-voice.cjs +1522 -0
- package/dist/ai-voice.d.ts +72 -0
- package/dist/ai-voice.d.ts.map +1 -0
- package/dist/ai-voice.js +1501 -0
- package/dist/alert.cjs +14 -147
- package/dist/alert.d.ts +4 -5
- package/dist/alert.d.ts.map +1 -0
- package/dist/alert.js +14 -147
- package/dist/android.cjs +127 -0
- package/dist/android.d.ts +19 -0
- package/dist/android.d.ts.map +1 -0
- package/dist/android.js +104 -0
- package/dist/animated-background.cjs +8830 -0
- package/dist/animated-background.d.ts +103 -0
- package/dist/animated-background.d.ts.map +1 -0
- package/dist/animated-background.js +8824 -0
- package/dist/animated-beam.cjs +8438 -0
- package/dist/animated-beam.d.ts +15 -0
- package/dist/animated-beam.d.ts.map +1 -0
- package/dist/animated-beam.js +8417 -0
- package/dist/animated-cursor.cjs +269 -0
- package/dist/animated-cursor.d.ts +70 -0
- package/dist/animated-cursor.d.ts.map +1 -0
- package/dist/animated-cursor.js +264 -0
- package/dist/animated-icon.cjs +8927 -0
- package/dist/animated-icon.d.ts +119 -0
- package/dist/animated-icon.d.ts.map +1 -0
- package/dist/animated-icon.js +8902 -0
- package/dist/animated-list.cjs +9226 -0
- package/dist/animated-list.d.ts +126 -0
- package/dist/animated-list.d.ts.map +1 -0
- package/dist/animated-list.js +9201 -0
- package/dist/animated-number.cjs +8773 -0
- package/dist/animated-number.d.ts +127 -0
- package/dist/animated-number.d.ts.map +1 -0
- package/dist/animated-number.js +8767 -0
- package/dist/animated-testimonials.cjs +8653 -0
- package/dist/animated-testimonials.d.ts +17 -0
- package/dist/animated-testimonials.d.ts.map +1 -0
- package/dist/animated-testimonials.js +8632 -0
- package/dist/animated-text.cjs +8914 -0
- package/dist/animated-text.d.ts +65 -0
- package/dist/animated-text.d.ts.map +1 -0
- package/dist/animated-text.js +8890 -0
- package/dist/animated-tooltip.cjs +8624 -0
- package/dist/animated-tooltip.d.ts +9 -0
- package/dist/animated-tooltip.d.ts.map +1 -0
- package/dist/animated-tooltip.js +8603 -0
- package/dist/announcement.cjs +465 -0
- package/dist/announcement.d.ts +9 -0
- package/dist/announcement.d.ts.map +1 -0
- package/dist/announcement.js +443 -0
- package/dist/app-switcher-navigation-bar.cjs +470 -0
- package/dist/app-switcher-navigation-bar.d.ts +15 -0
- package/dist/app-switcher-navigation-bar.d.ts.map +1 -0
- package/dist/app-switcher-navigation-bar.js +448 -0
- package/dist/apple-cards-carousel.cjs +9356 -0
- package/dist/apple-cards-carousel.d.ts +36 -0
- package/dist/apple-cards-carousel.d.ts.map +1 -0
- package/dist/apple-cards-carousel.js +9334 -0
- package/dist/apple-hello-effect.cjs +8380 -0
- package/dist/apple-hello-effect.d.ts +8 -0
- package/dist/apple-hello-effect.d.ts.map +1 -0
- package/dist/apple-hello-effect.js +8359 -0
- package/dist/auth.cjs +6 -5
- package/dist/auth.d.ts +11 -13
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +6 -5
- package/dist/avatar.d.ts +5 -6
- package/dist/avatar.d.ts.map +1 -0
- package/dist/badge.cjs +29 -169
- package/dist/badge.d.ts +9 -13
- package/dist/badge.d.ts.map +1 -0
- package/dist/badge.js +29 -169
- package/dist/bank.d.ts +42 -47
- package/dist/bank.d.ts.map +1 -0
- package/dist/banner.cjs +78 -0
- package/dist/banner.d.ts +20 -0
- package/dist/banner.d.ts.map +1 -0
- package/dist/banner.js +55 -0
- package/dist/breadcrumb-and-filters-navigation-bar.cjs +51 -0
- package/dist/breadcrumb-and-filters-navigation-bar.d.ts +10 -0
- package/dist/breadcrumb-and-filters-navigation-bar.d.ts.map +1 -0
- package/dist/breadcrumb-and-filters-navigation-bar.js +29 -0
- package/dist/breadcrumb-navigation-bar.cjs +37 -0
- package/dist/breadcrumb-navigation-bar.d.ts +10 -0
- package/dist/breadcrumb-navigation-bar.d.ts.map +1 -0
- package/dist/breadcrumb-navigation-bar.js +15 -0
- package/dist/button.cjs +21 -154
- package/dist/button.d.ts +9 -10
- package/dist/button.d.ts.map +1 -0
- package/dist/button.js +21 -154
- package/dist/calendar.cjs +55 -0
- package/dist/calendar.d.ts +9 -0
- package/dist/calendar.d.ts.map +1 -0
- package/dist/calendar.js +53 -0
- package/dist/centered-logo-navigation-bar.cjs +37 -0
- package/dist/centered-logo-navigation-bar.d.ts +15 -0
- package/dist/centered-logo-navigation-bar.d.ts.map +1 -0
- package/dist/centered-logo-navigation-bar.js +15 -0
- package/dist/chart.cjs +266 -0
- package/dist/chart.d.ts +52 -0
- package/dist/chart.d.ts.map +1 -0
- package/dist/chart.js +238 -0
- package/dist/checkbox.d.ts +6 -7
- package/dist/checkbox.d.ts.map +1 -0
- package/dist/choicebox.cjs +77 -0
- package/dist/choicebox.d.ts +15 -0
- package/dist/choicebox.d.ts.map +1 -0
- package/dist/choicebox.js +55 -0
- package/dist/chrome.cjs +39 -37
- package/dist/chrome.d.ts +15 -19
- package/dist/chrome.d.ts.map +1 -0
- package/dist/chrome.js +37 -35
- package/dist/close-button.d.ts +3 -5
- package/dist/close-button.d.ts.map +1 -0
- package/dist/code-block.cjs +871 -0
- package/dist/code-block.d.ts +38 -0
- package/dist/code-block.d.ts.map +1 -0
- package/dist/code-block.js +849 -0
- package/dist/code-compare.cjs +1714 -0
- package/dist/code-compare.d.ts +46 -0
- package/dist/code-compare.d.ts.map +1 -0
- package/dist/code-compare.js +1692 -0
- package/dist/code-diff.cjs +1073 -0
- package/dist/code-diff.d.ts +42 -0
- package/dist/code-diff.d.ts.map +1 -0
- package/dist/code-diff.js +1051 -0
- package/dist/code-editor.cjs +641 -0
- package/dist/code-editor.d.ts +23 -0
- package/dist/code-editor.d.ts.map +1 -0
- package/dist/code-editor.js +616 -0
- package/dist/code-explorer.cjs +729 -0
- package/dist/code-explorer.d.ts +41 -0
- package/dist/code-explorer.d.ts.map +1 -0
- package/dist/code-explorer.js +707 -0
- package/dist/code-preview.cjs +1349 -0
- package/dist/code-preview.d.ts +38 -0
- package/dist/code-preview.d.ts.map +1 -0
- package/dist/code-preview.js +1327 -0
- package/dist/code-snippet.cjs +920 -0
- package/dist/code-snippet.d.ts +48 -0
- package/dist/code-snippet.d.ts.map +1 -0
- package/dist/code-snippet.js +897 -0
- package/dist/code-tabs.cjs +76 -0
- package/dist/code-tabs.d.ts +12 -0
- package/dist/code-tabs.d.ts.map +1 -0
- package/dist/code-tabs.js +54 -0
- package/dist/code-terminal.cjs +894 -0
- package/dist/code-terminal.d.ts +48 -0
- package/dist/code-terminal.d.ts.map +1 -0
- package/dist/code-terminal.js +872 -0
- package/dist/collaboration-navigation-bar.cjs +49 -0
- package/dist/collaboration-navigation-bar.d.ts +11 -0
- package/dist/collaboration-navigation-bar.d.ts.map +1 -0
- package/dist/collaboration-navigation-bar.js +27 -0
- package/dist/collapsible.cjs +45 -170
- package/dist/collapsible.d.ts +11 -13
- package/dist/collapsible.d.ts.map +1 -0
- package/dist/collapsible.js +34 -159
- package/dist/color-mode.d.ts +7 -9
- package/dist/color-mode.d.ts.map +1 -0
- package/dist/color-picker.cjs +516 -0
- package/dist/color-picker.d.ts +10 -0
- package/dist/color-picker.d.ts.map +1 -0
- package/dist/color-picker.js +495 -0
- package/dist/combobox.cjs +488 -0
- package/dist/combobox.d.ts +13 -0
- package/dist/combobox.d.ts.map +1 -0
- package/dist/combobox.js +466 -0
- package/dist/communication-navigation-bar.cjs +438 -0
- package/dist/communication-navigation-bar.d.ts +7 -0
- package/dist/communication-navigation-bar.d.ts.map +1 -0
- package/dist/communication-navigation-bar.js +416 -0
- package/dist/company-profile.cjs +46 -0
- package/dist/company-profile.d.ts +10 -0
- package/dist/company-profile.d.ts.map +1 -0
- package/dist/company-profile.js +44 -0
- package/dist/comparison.cjs +60 -0
- package/dist/comparison.d.ts +16 -0
- package/dist/comparison.d.ts.map +1 -0
- package/dist/comparison.js +38 -0
- package/dist/context-switcher-navigation-bar.cjs +51 -0
- package/dist/context-switcher-navigation-bar.d.ts +10 -0
- package/dist/context-switcher-navigation-bar.d.ts.map +1 -0
- package/dist/context-switcher-navigation-bar.js +29 -0
- package/dist/credit-card.cjs +77 -0
- package/dist/credit-card.d.ts +11 -0
- package/dist/credit-card.d.ts.map +1 -0
- package/dist/credit-card.js +55 -0
- package/dist/crypto-screener.cjs +43 -0
- package/dist/crypto-screener.d.ts +4 -0
- package/dist/crypto-screener.d.ts.map +1 -0
- package/dist/crypto-screener.js +41 -0
- package/dist/cursor.cjs +71 -0
- package/dist/cursor.d.ts +9 -0
- package/dist/cursor.d.ts.map +1 -0
- package/dist/cursor.js +49 -0
- package/dist/dashboard-navigation-bar.cjs +441 -0
- package/dist/dashboard-navigation-bar.d.ts +11 -0
- package/dist/dashboard-navigation-bar.d.ts.map +1 -0
- package/dist/dashboard-navigation-bar.js +419 -0
- package/dist/dialog-stack.cjs +460 -0
- package/dist/dialog-stack.d.ts +13 -0
- package/dist/dialog-stack.d.ts.map +1 -0
- package/dist/dialog-stack.js +438 -0
- package/dist/dialog.cjs +16 -19
- package/dist/dialog.d.ts +49 -53
- package/dist/dialog.d.ts.map +1 -0
- package/dist/dialog.js +12 -15
- package/dist/direction.cjs +26 -0
- package/dist/direction.d.ts +20 -0
- package/dist/direction.d.ts.map +1 -0
- package/dist/direction.js +23 -0
- package/dist/dock.cjs +8675 -0
- package/dist/dock.d.ts +20 -0
- package/dist/dock.d.ts.map +1 -0
- package/dist/dock.js +8653 -0
- package/dist/drawer.d.ts +33 -38
- package/dist/drawer.d.ts.map +1 -0
- package/dist/dropzone.cjs +116 -0
- package/dist/dropzone.d.ts +11 -0
- package/dist/dropzone.d.ts.map +1 -0
- package/dist/dropzone.js +94 -0
- package/dist/e-commerce-navigation-bar.cjs +442 -0
- package/dist/e-commerce-navigation-bar.d.ts +12 -0
- package/dist/e-commerce-navigation-bar.d.ts.map +1 -0
- package/dist/e-commerce-navigation-bar.js +420 -0
- package/dist/editor.cjs +497 -0
- package/dist/editor.d.ts +9 -0
- package/dist/editor.d.ts.map +1 -0
- package/dist/editor.js +475 -0
- package/dist/empty-state.d.ts +4 -6
- package/dist/empty-state.d.ts.map +1 -0
- package/dist/empty.cjs +117 -0
- package/dist/empty.d.ts +18 -0
- package/dist/empty.d.ts.map +1 -0
- package/dist/empty.js +110 -0
- package/dist/engine.cjs +91 -0
- package/dist/engine.d.ts +35 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +86 -0
- package/dist/expiration-selector.d.ts +4 -6
- package/dist/expiration-selector.d.ts.map +1 -0
- package/dist/field.cjs +2 -1
- package/dist/field.d.ts +5 -7
- package/dist/field.d.ts.map +1 -0
- package/dist/field.js +3 -2
- package/dist/financials.cjs +66 -0
- package/dist/financials.d.ts +12 -0
- package/dist/financials.d.ts.map +1 -0
- package/dist/financials.js +64 -0
- package/dist/forex-screener.cjs +44 -0
- package/dist/forex-screener.d.ts +4 -0
- package/dist/forex-screener.d.ts.map +1 -0
- package/dist/forex-screener.js +42 -0
- package/dist/gantt.cjs +65 -0
- package/dist/gantt.d.ts +13 -0
- package/dist/gantt.d.ts.map +1 -0
- package/dist/gantt.js +43 -0
- package/dist/greeks-display.d.ts +3 -5
- package/dist/greeks-display.d.ts.map +1 -0
- package/dist/grid-pattern.cjs +327 -0
- package/dist/grid-pattern.d.ts +111 -0
- package/dist/grid-pattern.d.ts.map +1 -0
- package/dist/grid-pattern.js +304 -0
- package/dist/gui.d.ts +1 -1
- package/dist/gui.d.ts.map +1 -0
- package/dist/heading.d.ts +4 -6
- package/dist/heading.d.ts.map +1 -0
- package/dist/hooks/use-mobile.d.ts +3 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/iam.d.ts +10 -12
- package/dist/iam.d.ts.map +1 -0
- package/dist/icon-button.cjs +14 -147
- package/dist/icon-button.d.ts +4 -5
- package/dist/icon-button.d.ts.map +1 -0
- package/dist/icon-button.js +14 -147
- package/dist/icon-navigation-bar.cjs +48 -0
- package/dist/icon-navigation-bar.d.ts +11 -0
- package/dist/icon-navigation-bar.d.ts.map +1 -0
- package/dist/icon-navigation-bar.js +26 -0
- package/dist/icons.d.ts +1 -0
- package/dist/icons.d.ts.map +1 -0
- package/dist/identity.d.ts +9 -11
- package/dist/identity.d.ts.map +1 -0
- package/dist/image-crop.cjs +482 -0
- package/dist/image-crop.d.ts +9 -0
- package/dist/image-crop.d.ts.map +1 -0
- package/dist/image-crop.js +460 -0
- package/dist/image-zoom.cjs +77 -0
- package/dist/image-zoom.d.ts +7 -0
- package/dist/image-zoom.d.ts.map +1 -0
- package/dist/image-zoom.js +55 -0
- package/dist/image.cjs +17 -149
- package/dist/image.d.ts +10 -11
- package/dist/image.d.ts.map +1 -0
- package/dist/image.js +16 -148
- package/dist/index.cjs +30299 -1227
- package/dist/index.d.ts +207 -60
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +30009 -1226
- package/dist/ink.cjs +17 -0
- package/dist/ink.d.ts +14 -0
- package/dist/ink.d.ts.map +1 -0
- package/dist/ink.js +15 -0
- package/dist/input-group.d.ts +4 -6
- package/dist/input-group.d.ts.map +1 -0
- package/dist/input-otp.cjs +72 -0
- package/dist/input-otp.d.ts +35 -0
- package/dist/input-otp.d.ts.map +1 -0
- package/dist/input-otp.js +47 -0
- package/dist/input.d.ts +8 -9
- package/dist/input.d.ts.map +1 -0
- package/dist/iphone-15-pro.cjs +61 -0
- package/dist/iphone-15-pro.d.ts +9 -0
- package/dist/iphone-15-pro.d.ts.map +1 -0
- package/dist/iphone-15-pro.js +39 -0
- package/dist/item.cjs +215 -0
- package/dist/item.d.ts +41 -0
- package/dist/item.d.ts.map +1 -0
- package/dist/item.js +200 -0
- package/dist/kanban.cjs +1354 -0
- package/dist/kanban.d.ts +36 -0
- package/dist/kanban.d.ts.map +1 -0
- package/dist/kanban.js +1330 -0
- package/dist/kbd.cjs +40 -0
- package/dist/kbd.d.ts +4 -0
- package/dist/kbd.d.ts.map +1 -0
- package/dist/kbd.js +37 -0
- package/dist/limelight-nav-navigation-bar.cjs +51 -0
- package/dist/limelight-nav-navigation-bar.d.ts +10 -0
- package/dist/limelight-nav-navigation-bar.d.ts.map +1 -0
- package/dist/limelight-nav-navigation-bar.js +29 -0
- package/dist/limelight-nav.cjs +570 -0
- package/dist/limelight-nav.d.ts +10 -0
- package/dist/limelight-nav.d.ts.map +1 -0
- package/dist/limelight-nav.js +549 -0
- package/dist/link.cjs +41 -168
- package/dist/link.d.ts +9 -11
- package/dist/link.d.ts.map +1 -0
- package/dist/link.js +30 -157
- package/dist/list.cjs +35 -0
- package/dist/list.d.ts +5 -0
- package/dist/list.d.ts.map +1 -0
- package/dist/list.js +12 -0
- package/dist/lux.config.d.ts +521 -524
- package/dist/lux.config.d.ts.map +1 -0
- package/dist/magnetic.cjs +63 -0
- package/dist/magnetic.d.ts +8 -0
- package/dist/magnetic.d.ts.map +1 -0
- package/dist/magnetic.js +41 -0
- package/dist/market-overview.cjs +102 -0
- package/dist/market-overview.d.ts +4 -0
- package/dist/market-overview.d.ts.map +1 -0
- package/dist/market-overview.js +100 -0
- package/dist/marquee.cjs +67 -0
- package/dist/marquee.d.ts +10 -0
- package/dist/marquee.d.ts.map +1 -0
- package/dist/marquee.js +45 -0
- package/dist/menu-dock.cjs +64 -0
- package/dist/menu-dock.d.ts +14 -0
- package/dist/menu-dock.d.ts.map +1 -0
- package/dist/menu-dock.js +42 -0
- package/dist/menu.d.ts +30 -31
- package/dist/menu.d.ts.map +1 -0
- package/dist/menubar.cjs +116 -0
- package/dist/menubar.d.ts +30 -0
- package/dist/menubar.d.ts.map +1 -0
- package/dist/menubar.js +61 -0
- package/dist/message-dock.cjs +480 -0
- package/dist/message-dock.d.ts +15 -0
- package/dist/message-dock.d.ts.map +1 -0
- package/dist/message-dock.js +458 -0
- package/dist/mini-calendar.cjs +505 -0
- package/dist/mini-calendar.d.ts +10 -0
- package/dist/mini-calendar.d.ts.map +1 -0
- package/dist/mini-calendar.js +483 -0
- package/dist/minimal-tiptap.cjs +48 -0
- package/dist/minimal-tiptap.d.ts +8 -0
- package/dist/minimal-tiptap.d.ts.map +1 -0
- package/dist/minimal-tiptap.js +26 -0
- package/dist/motion-highlight.cjs +71 -0
- package/dist/motion-highlight.d.ts +7 -0
- package/dist/motion-highlight.d.ts.map +1 -0
- package/dist/motion-highlight.js +49 -0
- package/dist/music-player.cjs +810 -0
- package/dist/music-player.d.ts +18 -0
- package/dist/music-player.d.ts.map +1 -0
- package/dist/music-player.js +788 -0
- package/dist/native-select.cjs +82 -0
- package/dist/native-select.d.ts +9 -0
- package/dist/native-select.d.ts.map +1 -0
- package/dist/native-select.js +58 -0
- package/dist/news-timeline.cjs +42 -0
- package/dist/news-timeline.d.ts +4 -0
- package/dist/news-timeline.d.ts.map +1 -0
- package/dist/news-timeline.js +40 -0
- package/dist/next.d.ts +5 -7
- package/dist/next.d.ts.map +1 -0
- package/dist/option-chain.d.ts +6 -8
- package/dist/option-chain.d.ts.map +1 -0
- package/dist/option-position.d.ts +4 -6
- package/dist/option-position.d.ts.map +1 -0
- package/dist/order-entry.cjs +141 -0
- package/dist/order-entry.d.ts +15 -0
- package/dist/order-entry.d.ts.map +1 -0
- package/dist/order-entry.js +136 -0
- package/dist/orders-history.cjs +83 -0
- package/dist/orders-history.d.ts +18 -0
- package/dist/orders-history.d.ts.map +1 -0
- package/dist/orders-history.js +78 -0
- package/dist/pagination.cjs +132 -0
- package/dist/pagination.d.ts +29 -0
- package/dist/pagination.d.ts.map +1 -0
- package/dist/pagination.js +104 -0
- package/dist/particles-background.cjs +159 -0
- package/dist/particles-background.d.ts +18 -0
- package/dist/particles-background.d.ts.map +1 -0
- package/dist/particles-background.js +157 -0
- package/dist/pill.cjs +80 -0
- package/dist/pill.d.ts +21 -0
- package/dist/pill.d.ts.map +1 -0
- package/dist/pill.js +57 -0
- package/dist/pin-input.cjs +1 -1
- package/dist/pin-input.d.ts +3 -5
- package/dist/pin-input.d.ts.map +1 -0
- package/dist/pin-input.js +1 -1
- package/dist/pixel-image.cjs +71 -0
- package/dist/pixel-image.d.ts +8 -0
- package/dist/pixel-image.d.ts.map +1 -0
- package/dist/pixel-image.js +49 -0
- package/dist/pnl-diagram.d.ts +5 -6
- package/dist/pnl-diagram.d.ts.map +1 -0
- package/dist/popover.cjs +16 -18
- package/dist/popover.d.ts +24 -25
- package/dist/popover.d.ts.map +1 -0
- package/dist/popover.js +11 -13
- package/dist/positions-list.cjs +98 -0
- package/dist/positions-list.d.ts +13 -0
- package/dist/positions-list.d.ts.map +1 -0
- package/dist/positions-list.js +93 -0
- package/dist/progress-circle.cjs +3 -6
- package/dist/progress-circle.d.ts +8 -9
- package/dist/progress-circle.d.ts.map +1 -0
- package/dist/progress-circle.js +2 -5
- package/dist/progress.d.ts +3 -4
- package/dist/progress.d.ts.map +1 -0
- package/dist/provider.d.ts +8 -10
- package/dist/provider.d.ts.map +1 -0
- package/dist/pulse-animation.cjs +8741 -0
- package/dist/pulse-animation.d.ts +155 -0
- package/dist/pulse-animation.d.ts.map +1 -0
- package/dist/pulse-animation.js +8732 -0
- package/dist/qr-code.cjs +65 -0
- package/dist/qr-code.d.ts +21 -0
- package/dist/qr-code.d.ts.map +1 -0
- package/dist/qr-code.js +43 -0
- package/dist/radio.d.ts +6 -7
- package/dist/radio.d.ts.map +1 -0
- package/dist/rating.d.ts +3 -5
- package/dist/rating.d.ts.map +1 -0
- package/dist/relative-time.cjs +88 -0
- package/dist/relative-time.d.ts +9 -0
- package/dist/relative-time.d.ts.map +1 -0
- package/dist/relative-time.js +66 -0
- package/dist/resizable.cjs +61 -0
- package/dist/resizable.d.ts +24 -0
- package/dist/resizable.d.ts.map +1 -0
- package/dist/resizable.js +37 -0
- package/dist/reveal-animation.cjs +8791 -0
- package/dist/reveal-animation.d.ts +134 -0
- package/dist/reveal-animation.d.ts.map +1 -0
- package/dist/reveal-animation.js +8779 -0
- package/dist/safari.cjs +90 -0
- package/dist/safari.d.ts +9 -0
- package/dist/safari.d.ts.map +1 -0
- package/dist/safari.js +68 -0
- package/dist/sandbox.cjs +94 -0
- package/dist/sandbox.d.ts +9 -0
- package/dist/sandbox.d.ts.map +1 -0
- package/dist/sandbox.js +72 -0
- package/dist/search-and-toggle-navigation-bar.cjs +51 -0
- package/dist/search-and-toggle-navigation-bar.d.ts +10 -0
- package/dist/search-and-toggle-navigation-bar.d.ts.map +1 -0
- package/dist/search-and-toggle-navigation-bar.js +29 -0
- package/dist/select.cjs +38 -168
- package/dist/select.d.ts +38 -41
- package/dist/select.d.ts.map +1 -0
- package/dist/select.js +34 -164
- package/dist/separator.d.ts +5 -6
- package/dist/separator.d.ts.map +1 -0
- package/dist/sidebar.cjs +1134 -0
- package/dist/sidebar.d.ts +80 -0
- package/dist/sidebar.d.ts.map +1 -0
- package/dist/sidebar.js +1090 -0
- package/dist/simple-navigation-bar.cjs +45 -0
- package/dist/simple-navigation-bar.d.ts +11 -0
- package/dist/simple-navigation-bar.d.ts.map +1 -0
- package/dist/simple-navigation-bar.js +23 -0
- package/dist/skeleton.cjs +15 -148
- package/dist/skeleton.d.ts +11 -53
- package/dist/skeleton.d.ts.map +1 -0
- package/dist/skeleton.js +15 -148
- package/dist/slider.cjs +1 -1
- package/dist/slider.d.ts +4 -5
- package/dist/slider.d.ts.map +1 -0
- package/dist/slider.js +1 -1
- package/dist/status-dashboard-navigation-bar.cjs +51 -0
- package/dist/status-dashboard-navigation-bar.d.ts +10 -0
- package/dist/status-dashboard-navigation-bar.d.ts.map +1 -0
- package/dist/status-dashboard-navigation-bar.js +29 -0
- package/dist/status.cjs +85 -0
- package/dist/status.d.ts +23 -0
- package/dist/status.d.ts.map +1 -0
- package/dist/status.js +62 -0
- package/dist/stock-screener.cjs +44 -0
- package/dist/stock-screener.d.ts +4 -0
- package/dist/stock-screener.d.ts.map +1 -0
- package/dist/stock-screener.js +42 -0
- package/dist/strategy-builder.d.ts +6 -8
- package/dist/strategy-builder.d.ts.map +1 -0
- package/dist/switch.cjs +2 -2
- package/dist/switch.d.ts +4 -8
- package/dist/switch.d.ts.map +1 -0
- package/dist/switch.js +2 -2
- package/dist/symbol-info.cjs +44 -0
- package/dist/symbol-info.d.ts +9 -0
- package/dist/symbol-info.d.ts.map +1 -0
- package/dist/symbol-info.js +42 -0
- package/dist/table.cjs +74 -192
- package/dist/table.d.ts +23 -25
- package/dist/table.d.ts.map +1 -0
- package/dist/table.js +53 -171
- package/dist/tabs.d.ts +12 -13
- package/dist/tabs.d.ts.map +1 -0
- package/dist/tag.cjs +14 -147
- package/dist/tag.d.ts +4 -5
- package/dist/tag.d.ts.map +1 -0
- package/dist/tag.js +14 -147
- package/dist/tags.cjs +385 -0
- package/dist/tags.d.ts +13 -0
- package/dist/tags.d.ts.map +1 -0
- package/dist/tags.js +364 -0
- package/dist/team-switcher-navigation-bar.cjs +51 -0
- package/dist/team-switcher-navigation-bar.d.ts +10 -0
- package/dist/team-switcher-navigation-bar.d.ts.map +1 -0
- package/dist/team-switcher-navigation-bar.js +29 -0
- package/dist/technical-analysis.cjs +69 -0
- package/dist/technical-analysis.d.ts +13 -0
- package/dist/technical-analysis.d.ts.map +1 -0
- package/dist/technical-analysis.js +67 -0
- package/dist/terminal.cjs +372 -0
- package/dist/terminal.d.ts +21 -0
- package/dist/terminal.d.ts.map +1 -0
- package/dist/terminal.js +350 -0
- package/dist/textarea.d.ts +5 -6
- package/dist/textarea.d.ts.map +1 -0
- package/dist/ticker-tape.cjs +54 -0
- package/dist/ticker-tape.d.ts +4 -0
- package/dist/ticker-tape.d.ts.map +1 -0
- package/dist/ticker-tape.js +52 -0
- package/dist/ticker.cjs +66 -0
- package/dist/ticker.d.ts +10 -0
- package/dist/ticker.d.ts.map +1 -0
- package/dist/ticker.js +44 -0
- package/dist/timeline.cjs +317 -0
- package/dist/timeline.d.ts +20 -0
- package/dist/timeline.d.ts.map +1 -0
- package/dist/timeline.js +295 -0
- package/dist/toaster.d.ts +4 -5
- package/dist/toaster.d.ts.map +1 -0
- package/dist/toggle.cjs +62 -0
- package/dist/toggle.d.ts +26 -0
- package/dist/toggle.d.ts.map +1 -0
- package/dist/toggle.js +57 -0
- package/dist/tooltip.d.ts +3 -5
- package/dist/tooltip.d.ts.map +1 -0
- package/dist/trading-panel.cjs +212 -0
- package/dist/trading-panel.d.ts +7 -0
- package/dist/trading-panel.d.ts.map +1 -0
- package/dist/trading-panel.js +207 -0
- package/dist/two-tier-navigation-bar.cjs +51 -0
- package/dist/two-tier-navigation-bar.d.ts +10 -0
- package/dist/two-tier-navigation-bar.d.ts.map +1 -0
- package/dist/two-tier-navigation-bar.js +29 -0
- package/dist/underline-navigation-bar.cjs +51 -0
- package/dist/underline-navigation-bar.d.ts +10 -0
- package/dist/underline-navigation-bar.d.ts.map +1 -0
- package/dist/underline-navigation-bar.js +29 -0
- package/dist/use-narrow.d.ts +6 -7
- package/dist/use-narrow.d.ts.map +1 -0
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils.cjs +6 -7
- package/dist/utils.d.ts +13 -5
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +1 -9
- package/dist/vite.d.ts +3 -3
- package/dist/vite.d.ts.map +1 -0
- package/dist/white-label.d.ts +12 -12
- package/dist/white-label.d.ts.map +1 -0
- package/dist/youtube-pip-player.cjs +489 -0
- package/dist/youtube-pip-player.d.ts +41 -0
- package/dist/youtube-pip-player.d.ts.map +1 -0
- package/dist/youtube-pip-player.js +466 -0
- package/package.json +769 -66
- package/src/3d-button.tsx +346 -0
- package/src/3d-card.tsx +271 -0
- package/src/3d-carousel.tsx +444 -0
- package/src/3d-grid.tsx +448 -0
- package/src/3d-marquee.tsx +422 -0
- package/src/3d-model-viewer.tsx +659 -0
- package/src/3d-pin.tsx +37 -0
- package/src/3d-scene.tsx +629 -0
- package/src/3d-text.tsx +442 -0
- package/src/advanced-chart.tsx +63 -0
- package/src/advanced-navigation-bar.tsx +83 -0
- package/src/ai-actions.tsx +60 -0
- package/src/ai-agents.tsx +1174 -0
- package/src/ai-assistant.tsx +227 -0
- package/src/ai-chat.tsx +554 -0
- package/src/ai-code.tsx +1331 -0
- package/src/ai-model-selector-navigation-bar.tsx +78 -0
- package/src/ai-models.tsx +58 -0
- package/src/ai-playground.tsx +429 -0
- package/src/ai-tools.tsx +383 -0
- package/src/ai-vision.tsx +1220 -0
- package/src/ai-voice-settings.tsx +726 -0
- package/src/ai-voice.tsx +735 -0
- package/src/android.tsx +92 -0
- package/src/animated-background.tsx +625 -0
- package/src/animated-beam.tsx +110 -0
- package/src/animated-cursor.tsx +406 -0
- package/src/animated-icon.tsx +520 -0
- package/src/animated-list.tsx +508 -0
- package/src/animated-number.tsx +485 -0
- package/src/animated-testimonials.tsx +119 -0
- package/src/animated-text.tsx +481 -0
- package/src/animated-tooltip.tsx +54 -0
- package/src/announcement.tsx +55 -0
- package/src/app-switcher-navigation-bar.tsx +76 -0
- package/src/apple-cards-carousel.tsx +349 -0
- package/src/apple-hello-effect.tsx +50 -0
- package/src/auth.tsx +9 -8
- package/src/avatar.tsx +1 -1
- package/src/badge.tsx +27 -30
- package/src/banner.tsx +62 -0
- package/src/breadcrumb-and-filters-navigation-bar.tsx +40 -0
- package/src/breadcrumb-navigation-bar.tsx +43 -0
- package/src/button.tsx +10 -9
- package/src/calendar.tsx +62 -0
- package/src/centered-logo-navigation-bar.tsx +43 -0
- package/src/chart.tsx +372 -0
- package/src/choicebox.tsx +89 -0
- package/src/chrome.tsx +41 -40
- package/src/code-block.tsx +278 -0
- package/src/code-compare.tsx +551 -0
- package/src/code-diff.tsx +573 -0
- package/src/code-editor.tsx +250 -0
- package/src/code-explorer.tsx +403 -0
- package/src/code-preview.tsx +488 -0
- package/src/code-snippet.tsx +336 -0
- package/src/code-tabs.tsx +78 -0
- package/src/code-terminal.tsx +530 -0
- package/src/collaboration-navigation-bar.tsx +50 -0
- package/src/collapsible.tsx +3 -2
- package/src/color-picker.tsx +68 -0
- package/src/combobox.tsx +87 -0
- package/src/communication-navigation-bar.tsx +42 -0
- package/src/company-profile.tsx +67 -0
- package/src/comparison.tsx +68 -0
- package/src/context-switcher-navigation-bar.tsx +39 -0
- package/src/credit-card.tsx +72 -0
- package/src/crypto-screener.tsx +57 -0
- package/src/cursor.tsx +61 -0
- package/src/dashboard-navigation-bar.tsx +49 -0
- package/src/dialog-stack.tsx +55 -0
- package/src/dialog.tsx +16 -15
- package/src/direction.tsx +40 -0
- package/src/dock.tsx +172 -0
- package/src/dropzone.tsx +106 -0
- package/src/e-commerce-navigation-bar.tsx +54 -0
- package/src/editor.tsx +85 -0
- package/src/empty.tsx +117 -0
- package/src/field.tsx +2 -1
- package/src/financials.tsx +85 -0
- package/src/forex-screener.tsx +58 -0
- package/src/gantt.tsx +68 -0
- package/src/grid-pattern.tsx +353 -0
- package/src/hooks/use-mobile.ts +29 -0
- package/src/icon-navigation-bar.tsx +36 -0
- package/src/image-crop.tsx +67 -0
- package/src/image-zoom.tsx +64 -0
- package/src/image.tsx +2 -1
- package/src/index.ts +123 -0
- package/src/input-otp.tsx +72 -0
- package/src/iphone-15-pro.tsx +69 -0
- package/src/item.tsx +193 -0
- package/src/kanban.tsx +772 -0
- package/src/kbd.tsx +32 -0
- package/src/limelight-nav-navigation-bar.tsx +39 -0
- package/src/limelight-nav.tsx +101 -0
- package/src/link.tsx +18 -18
- package/src/list.tsx +22 -0
- package/src/magnetic.tsx +54 -0
- package/src/market-overview.tsx +116 -0
- package/src/marquee.tsx +62 -0
- package/src/menu-dock.tsx +56 -0
- package/src/menubar.tsx +149 -0
- package/src/message-dock.tsx +89 -0
- package/src/mini-calendar.tsx +121 -0
- package/src/minimal-tiptap.tsx +32 -0
- package/src/motion-highlight.tsx +55 -0
- package/src/music-player.tsx +413 -0
- package/src/native-select.tsx +63 -0
- package/src/news-timeline.tsx +56 -0
- package/src/order-entry.tsx +162 -0
- package/src/orders-history.tsx +115 -0
- package/src/pagination.tsx +118 -0
- package/src/particles-background.tsx +225 -0
- package/src/pill.tsx +61 -0
- package/src/pin-input.tsx +1 -1
- package/src/pixel-image.tsx +64 -0
- package/src/popover.tsx +10 -9
- package/src/positions-list.tsx +108 -0
- package/src/progress-circle.tsx +2 -1
- package/src/pulse-animation.tsx +606 -0
- package/src/qr-code.tsx +64 -0
- package/src/relative-time.tsx +84 -0
- package/src/resizable.tsx +46 -0
- package/src/reveal-animation.tsx +532 -0
- package/src/safari.tsx +115 -0
- package/src/sandbox.tsx +83 -0
- package/src/search-and-toggle-navigation-bar.tsx +39 -0
- package/src/select.tsx +31 -30
- package/src/sidebar.tsx +723 -0
- package/src/simple-navigation-bar.tsx +39 -0
- package/src/skeleton.tsx +20 -168
- package/src/slider.tsx +2 -1
- package/src/status-dashboard-navigation-bar.tsx +39 -0
- package/src/status.tsx +63 -0
- package/src/stock-screener.tsx +58 -0
- package/src/switch.tsx +3 -3
- package/src/symbol-info.tsx +64 -0
- package/src/table.tsx +26 -25
- package/src/tags.tsx +62 -0
- package/src/team-switcher-navigation-bar.tsx +39 -0
- package/src/technical-analysis.tsx +99 -0
- package/src/terminal.tsx +399 -0
- package/src/ticker-tape.tsx +68 -0
- package/src/ticker.tsx +52 -0
- package/src/timeline.tsx +412 -0
- package/src/toggle.tsx +84 -0
- package/src/trading-panel.tsx +262 -0
- package/src/two-tier-navigation-bar.tsx +39 -0
- package/src/underline-navigation-bar.tsx +39 -0
- package/src/utils/cn.ts +3 -7
- package/src/utils.ts +12 -6
- package/src/youtube-pip-player.tsx +606 -0
- package/tokens.css +22 -0
- package/dist/accordion.d.cts +0 -41
- package/dist/alert.d.cts +0 -30
- package/dist/auth.d.cts +0 -80
- package/dist/avatar.d.cts +0 -25
- package/dist/badge.d.cts +0 -19
- package/dist/bank.d.cts +0 -83
- package/dist/button.d.cts +0 -51
- package/dist/checkbox.d.cts +0 -32
- package/dist/chrome.d.cts +0 -93
- package/dist/close-button.d.cts +0 -9
- package/dist/collapsible.d.cts +0 -24
- package/dist/color-mode.d.cts +0 -25
- package/dist/dialog.d.cts +0 -118
- package/dist/drawer.d.cts +0 -69
- package/dist/empty-state.d.cts +0 -13
- package/dist/expiration-selector.d.cts +0 -16
- package/dist/field.d.cts +0 -23
- package/dist/greeks-display.d.cts +0 -14
- package/dist/gui.d.cts +0 -2
- package/dist/heading.d.cts +0 -8
- package/dist/iam.d.cts +0 -65
- package/dist/icon-button.d.cts +0 -37
- package/dist/icons.d.cts +0 -1
- package/dist/identity.d.cts +0 -64
- package/dist/image.d.cts +0 -57
- package/dist/index.d.cts +0 -60
- package/dist/input-group.d.cts +0 -17
- package/dist/input.d.cts +0 -37
- package/dist/link.d.cts +0 -37
- package/dist/lux.config.d.cts +0 -981
- package/dist/menu.d.cts +0 -68
- package/dist/next.d.cts +0 -32
- package/dist/option-chain.d.cts +0 -37
- package/dist/option-position.d.cts +0 -29
- package/dist/pin-input.d.cts +0 -25
- package/dist/pnl-diagram.d.cts +0 -11
- package/dist/popover.d.cts +0 -73
- package/dist/progress-circle.d.cts +0 -47
- package/dist/progress.d.cts +0 -28
- package/dist/provider.d.cts +0 -25
- package/dist/radio.d.cts +0 -53
- package/dist/rating.d.cts +0 -14
- package/dist/select.d.cts +0 -161
- package/dist/separator.d.cts +0 -13
- package/dist/skeleton.d.cts +0 -76
- package/dist/slider.d.cts +0 -24
- package/dist/strategy-builder.d.cts +0 -26
- package/dist/switch.d.cts +0 -27
- package/dist/table.d.cts +0 -107
- package/dist/tabs.d.cts +0 -34
- package/dist/tag.d.cts +0 -21
- package/dist/textarea.d.cts +0 -13
- package/dist/toaster.d.cts +0 -28
- package/dist/tooltip.d.cts +0 -38
- package/dist/use-narrow.d.cts +0 -12
- package/dist/utils.d.cts +0 -5
- package/dist/vite.d.cts +0 -29
- package/dist/white-label.d.cts +0 -59
package/dist/chart.js
ADDED
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Box, cn } from '@hanzo/ui';
|
|
4
|
+
import * as RechartsPrimitive from 'recharts';
|
|
5
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var THEMES = { light: "", dark: ".dark" };
|
|
8
|
+
var ChartContext = React.createContext(null);
|
|
9
|
+
function useChart() {
|
|
10
|
+
const context = React.useContext(ChartContext);
|
|
11
|
+
if (!context) {
|
|
12
|
+
throw new Error("useChart must be used within a <ChartContainer />");
|
|
13
|
+
}
|
|
14
|
+
return context;
|
|
15
|
+
}
|
|
16
|
+
function ChartContainer({
|
|
17
|
+
id,
|
|
18
|
+
className,
|
|
19
|
+
children,
|
|
20
|
+
config,
|
|
21
|
+
...props
|
|
22
|
+
}) {
|
|
23
|
+
const uniqueId = React.useId();
|
|
24
|
+
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
25
|
+
return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
|
|
26
|
+
Box,
|
|
27
|
+
{
|
|
28
|
+
"data-slot": "chart",
|
|
29
|
+
"data-chart": chartId,
|
|
30
|
+
className: cn(
|
|
31
|
+
"[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
|
|
32
|
+
className
|
|
33
|
+
),
|
|
34
|
+
...props,
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ jsx(ChartStyle, { id: chartId, config }),
|
|
37
|
+
/* @__PURE__ */ jsx(RechartsPrimitive.ResponsiveContainer, { children })
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
) });
|
|
41
|
+
}
|
|
42
|
+
var ChartStyle = ({ id, config }) => {
|
|
43
|
+
const colorConfig = Object.entries(config).filter(
|
|
44
|
+
([, config2]) => config2.theme || config2.color
|
|
45
|
+
);
|
|
46
|
+
if (!colorConfig.length) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
return /* @__PURE__ */ jsx(
|
|
50
|
+
"style",
|
|
51
|
+
{
|
|
52
|
+
dangerouslySetInnerHTML: {
|
|
53
|
+
__html: Object.entries(THEMES).map(
|
|
54
|
+
([theme, prefix]) => `
|
|
55
|
+
${prefix} [data-chart=${id}] {
|
|
56
|
+
${colorConfig.map(([key, itemConfig]) => {
|
|
57
|
+
const color = itemConfig.theme?.[theme] || itemConfig.color;
|
|
58
|
+
return color ? ` --color-${key}: ${color};` : null;
|
|
59
|
+
}).join("\n")}
|
|
60
|
+
}
|
|
61
|
+
`
|
|
62
|
+
).join("\n")
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
var ChartTooltip = RechartsPrimitive.Tooltip;
|
|
68
|
+
function ChartTooltipContent({
|
|
69
|
+
active,
|
|
70
|
+
payload,
|
|
71
|
+
className,
|
|
72
|
+
indicator = "dot",
|
|
73
|
+
hideLabel = false,
|
|
74
|
+
hideIndicator = false,
|
|
75
|
+
label,
|
|
76
|
+
labelFormatter,
|
|
77
|
+
labelClassName,
|
|
78
|
+
formatter,
|
|
79
|
+
color,
|
|
80
|
+
nameKey,
|
|
81
|
+
labelKey
|
|
82
|
+
}) {
|
|
83
|
+
const { config } = useChart();
|
|
84
|
+
const tooltipLabel = React.useMemo(() => {
|
|
85
|
+
if (hideLabel || !payload?.length) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
const [item] = payload;
|
|
89
|
+
const key = `${labelKey || item?.dataKey || item?.name || "value"}`;
|
|
90
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
91
|
+
const value = !labelKey && typeof label === "string" ? config[label]?.label || label : itemConfig?.label;
|
|
92
|
+
if (labelFormatter) {
|
|
93
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) });
|
|
94
|
+
}
|
|
95
|
+
if (!value) {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("font-medium", labelClassName), children: value });
|
|
99
|
+
}, [
|
|
100
|
+
label,
|
|
101
|
+
labelFormatter,
|
|
102
|
+
payload,
|
|
103
|
+
hideLabel,
|
|
104
|
+
labelClassName,
|
|
105
|
+
config,
|
|
106
|
+
labelKey
|
|
107
|
+
]);
|
|
108
|
+
if (!active || !payload?.length) {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
112
|
+
return /* @__PURE__ */ jsxs(
|
|
113
|
+
Box,
|
|
114
|
+
{
|
|
115
|
+
className: cn(
|
|
116
|
+
"border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",
|
|
117
|
+
className
|
|
118
|
+
),
|
|
119
|
+
children: [
|
|
120
|
+
!nestLabel ? tooltipLabel : null,
|
|
121
|
+
/* @__PURE__ */ jsx(Box, { className: "grid gap-1.5", children: payload.map((item, index) => {
|
|
122
|
+
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
123
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
124
|
+
const indicatorColor = color || item.payload.fill || item.color;
|
|
125
|
+
return /* @__PURE__ */ jsx(
|
|
126
|
+
Box,
|
|
127
|
+
{
|
|
128
|
+
className: cn(
|
|
129
|
+
"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
|
|
130
|
+
indicator === "dot" && "items-center"
|
|
131
|
+
),
|
|
132
|
+
children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
133
|
+
itemConfig?.icon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx(
|
|
134
|
+
Box,
|
|
135
|
+
{
|
|
136
|
+
className: cn(
|
|
137
|
+
"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
|
|
138
|
+
{
|
|
139
|
+
"h-2.5 w-2.5": indicator === "dot",
|
|
140
|
+
"w-1": indicator === "line",
|
|
141
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
|
|
142
|
+
"my-0.5": nestLabel && indicator === "dashed"
|
|
143
|
+
}
|
|
144
|
+
),
|
|
145
|
+
style: {
|
|
146
|
+
"--color-bg": indicatorColor,
|
|
147
|
+
"--color-border": indicatorColor
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
),
|
|
151
|
+
/* @__PURE__ */ jsxs(
|
|
152
|
+
Box,
|
|
153
|
+
{
|
|
154
|
+
className: cn(
|
|
155
|
+
"flex flex-1 justify-between leading-none",
|
|
156
|
+
nestLabel ? "items-end" : "items-center"
|
|
157
|
+
),
|
|
158
|
+
children: [
|
|
159
|
+
/* @__PURE__ */ jsxs(Box, { className: "grid gap-1.5", children: [
|
|
160
|
+
nestLabel ? tooltipLabel : null,
|
|
161
|
+
/* @__PURE__ */ jsx(Box, { tag: "span", className: "text-muted-foreground", children: itemConfig?.label || item.name })
|
|
162
|
+
] }),
|
|
163
|
+
item.value && /* @__PURE__ */ jsx(Box, { tag: "span", className: "text-foreground font-mono font-medium tabular-nums", children: item.value.toLocaleString() })
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
] })
|
|
168
|
+
},
|
|
169
|
+
item.dataKey
|
|
170
|
+
);
|
|
171
|
+
}) })
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
var ChartLegend = RechartsPrimitive.Legend;
|
|
177
|
+
function ChartLegendContent({
|
|
178
|
+
className,
|
|
179
|
+
hideIcon = false,
|
|
180
|
+
payload,
|
|
181
|
+
verticalAlign = "bottom",
|
|
182
|
+
nameKey
|
|
183
|
+
}) {
|
|
184
|
+
const { config } = useChart();
|
|
185
|
+
if (!payload?.length) {
|
|
186
|
+
return null;
|
|
187
|
+
}
|
|
188
|
+
return /* @__PURE__ */ jsx(
|
|
189
|
+
Box,
|
|
190
|
+
{
|
|
191
|
+
className: cn(
|
|
192
|
+
"flex items-center justify-center gap-4",
|
|
193
|
+
verticalAlign === "top" ? "pb-3" : "pt-3",
|
|
194
|
+
className
|
|
195
|
+
),
|
|
196
|
+
children: payload.map((item) => {
|
|
197
|
+
const key = `${nameKey || item.dataKey || "value"}`;
|
|
198
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
199
|
+
return /* @__PURE__ */ jsxs(
|
|
200
|
+
Box,
|
|
201
|
+
{
|
|
202
|
+
className: cn(
|
|
203
|
+
"[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"
|
|
204
|
+
),
|
|
205
|
+
children: [
|
|
206
|
+
itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsx(
|
|
207
|
+
Box,
|
|
208
|
+
{
|
|
209
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
210
|
+
style: {
|
|
211
|
+
backgroundColor: item.color
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
),
|
|
215
|
+
itemConfig?.label
|
|
216
|
+
]
|
|
217
|
+
},
|
|
218
|
+
item.value
|
|
219
|
+
);
|
|
220
|
+
})
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
function getPayloadConfigFromPayload(config, payload, key) {
|
|
225
|
+
if (typeof payload !== "object" || payload === null) {
|
|
226
|
+
return void 0;
|
|
227
|
+
}
|
|
228
|
+
const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
|
|
229
|
+
let configLabelKey = key;
|
|
230
|
+
if (key in payload && typeof payload[key] === "string") {
|
|
231
|
+
configLabelKey = payload[key];
|
|
232
|
+
} else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
|
|
233
|
+
configLabelKey = payloadPayload[key];
|
|
234
|
+
}
|
|
235
|
+
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };
|
package/dist/checkbox.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
2
|
/** Tri-state, as the Chakra/Radix contract consumers already code against. */
|
|
4
3
|
type CheckedState = boolean | 'indeterminate';
|
|
5
|
-
interface CheckboxGroupProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
4
|
+
export interface CheckboxGroupProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
6
5
|
value?: Array<string>;
|
|
7
6
|
defaultValue?: Array<string>;
|
|
8
7
|
onValueChange?: (value: Array<string>) => void;
|
|
@@ -11,8 +10,8 @@ interface CheckboxGroupProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
|
11
10
|
disabled?: boolean;
|
|
12
11
|
readOnly?: boolean;
|
|
13
12
|
}
|
|
14
|
-
declare const CheckboxGroup: React.ForwardRefExoticComponent<CheckboxGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
-
interface CheckboxProps extends Omit<React.ComponentPropsWithoutRef<'label'>, 'onChange'> {
|
|
13
|
+
export declare const CheckboxGroup: React.ForwardRefExoticComponent<CheckboxGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export interface CheckboxProps extends Omit<React.ComponentPropsWithoutRef<'label'>, 'onChange'> {
|
|
16
15
|
icon?: React.ReactNode;
|
|
17
16
|
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
18
17
|
rootRef?: React.Ref<HTMLLabelElement>;
|
|
@@ -27,6 +26,6 @@ interface CheckboxProps extends Omit<React.ComponentPropsWithoutRef<'label'>, 'o
|
|
|
27
26
|
name?: string;
|
|
28
27
|
required?: boolean;
|
|
29
28
|
}
|
|
30
|
-
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../src/checkbox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,8EAA8E;AAC9E,KAAK,YAAY,GAAG,OAAO,GAAG,eAAe,CAAC;AAiB9C,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IAC/E,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IAC/C,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA2DD,eAAO,MAAM,aAAa,2FAAoB,CAAC;AAG/C,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC;IAC9F,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,UAAU,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IACzD,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC;IACpC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA2LD,eAAO,MAAM,QAAQ,wFAAe,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var ui = require('@hanzo/ui');
|
|
6
|
+
var lucideReact = require('lucide-react');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
|
|
9
|
+
function _interopNamespace(e) {
|
|
10
|
+
if (e && e.__esModule) return e;
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n.default = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
28
|
+
|
|
29
|
+
var Choicebox = React__namespace.forwardRef(
|
|
30
|
+
({ className, options, value, onChange, multiple = false, ...props }, ref) => {
|
|
31
|
+
const [selected, setSelected] = React__namespace.useState(
|
|
32
|
+
value ? [value] : []
|
|
33
|
+
);
|
|
34
|
+
const handleSelect = (optionValue) => {
|
|
35
|
+
if (multiple) {
|
|
36
|
+
const newSelected = selected.includes(optionValue) ? selected.filter((v) => v !== optionValue) : [...selected, optionValue];
|
|
37
|
+
setSelected(newSelected);
|
|
38
|
+
onChange?.(newSelected.join(","));
|
|
39
|
+
} else {
|
|
40
|
+
setSelected([optionValue]);
|
|
41
|
+
onChange?.(optionValue);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { ref, className: ui.cn("space-y-2", className), ...props, children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
45
|
+
ui.Box,
|
|
46
|
+
{
|
|
47
|
+
tag: "button",
|
|
48
|
+
type: "button",
|
|
49
|
+
onClick: () => handleSelect(option.value),
|
|
50
|
+
className: ui.cn(
|
|
51
|
+
"relative w-full rounded-lg border-2 p-4 text-left transition-colors hover:bg-accent",
|
|
52
|
+
selected.includes(option.value) ? "border-primary bg-primary/5" : "border-input"
|
|
53
|
+
),
|
|
54
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Box, { className: "flex items-start gap-3", children: [
|
|
55
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
56
|
+
ui.Box,
|
|
57
|
+
{
|
|
58
|
+
className: ui.cn(
|
|
59
|
+
"mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full border-2",
|
|
60
|
+
selected.includes(option.value) ? "border-primary bg-primary" : "border-input"
|
|
61
|
+
),
|
|
62
|
+
children: selected.includes(option.value) && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { style: ui.css("h-3 w-3 text-primary-foreground") })
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ui.Box, { className: "flex-1", children: [
|
|
66
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Box, { className: "font-medium", children: option.label }),
|
|
67
|
+
option.description && /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { className: "text-sm text-muted-foreground", children: option.description })
|
|
68
|
+
] })
|
|
69
|
+
] })
|
|
70
|
+
},
|
|
71
|
+
option.value
|
|
72
|
+
)) });
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
Choicebox.displayName = "Choicebox";
|
|
76
|
+
|
|
77
|
+
exports.Choicebox = Choicebox;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface ChoiceboxOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ChoiceboxProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
8
|
+
options: ChoiceboxOption[];
|
|
9
|
+
value?: string;
|
|
10
|
+
onChange?: (value: string) => void;
|
|
11
|
+
multiple?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const Choicebox: React.ForwardRefExoticComponent<ChoiceboxProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export { Choicebox };
|
|
15
|
+
//# sourceMappingURL=choicebox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"choicebox.d.ts","sourceRoot":"","sources":["../src/choicebox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,cACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC9D,OAAO,EAAE,eAAe,EAAE,CAAA;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,QAAA,MAAM,SAAS,uFA+Dd,CAAA;AAGD,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Box, cn, css } from '@hanzo/ui';
|
|
4
|
+
import { Check } from 'lucide-react';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var Choicebox = React.forwardRef(
|
|
8
|
+
({ className, options, value, onChange, multiple = false, ...props }, ref) => {
|
|
9
|
+
const [selected, setSelected] = React.useState(
|
|
10
|
+
value ? [value] : []
|
|
11
|
+
);
|
|
12
|
+
const handleSelect = (optionValue) => {
|
|
13
|
+
if (multiple) {
|
|
14
|
+
const newSelected = selected.includes(optionValue) ? selected.filter((v) => v !== optionValue) : [...selected, optionValue];
|
|
15
|
+
setSelected(newSelected);
|
|
16
|
+
onChange?.(newSelected.join(","));
|
|
17
|
+
} else {
|
|
18
|
+
setSelected([optionValue]);
|
|
19
|
+
onChange?.(optionValue);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
return /* @__PURE__ */ jsx(Box, { ref, className: cn("space-y-2", className), ...props, children: options.map((option) => /* @__PURE__ */ jsx(
|
|
23
|
+
Box,
|
|
24
|
+
{
|
|
25
|
+
tag: "button",
|
|
26
|
+
type: "button",
|
|
27
|
+
onClick: () => handleSelect(option.value),
|
|
28
|
+
className: cn(
|
|
29
|
+
"relative w-full rounded-lg border-2 p-4 text-left transition-colors hover:bg-accent",
|
|
30
|
+
selected.includes(option.value) ? "border-primary bg-primary/5" : "border-input"
|
|
31
|
+
),
|
|
32
|
+
children: /* @__PURE__ */ jsxs(Box, { className: "flex items-start gap-3", children: [
|
|
33
|
+
/* @__PURE__ */ jsx(
|
|
34
|
+
Box,
|
|
35
|
+
{
|
|
36
|
+
className: cn(
|
|
37
|
+
"mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full border-2",
|
|
38
|
+
selected.includes(option.value) ? "border-primary bg-primary" : "border-input"
|
|
39
|
+
),
|
|
40
|
+
children: selected.includes(option.value) && /* @__PURE__ */ jsx(Check, { style: css("h-3 w-3 text-primary-foreground") })
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex-1", children: [
|
|
44
|
+
/* @__PURE__ */ jsx(Box, { className: "font-medium", children: option.label }),
|
|
45
|
+
option.description && /* @__PURE__ */ jsx(Box, { className: "text-sm text-muted-foreground", children: option.description })
|
|
46
|
+
] })
|
|
47
|
+
] })
|
|
48
|
+
},
|
|
49
|
+
option.value
|
|
50
|
+
)) });
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
Choicebox.displayName = "Choicebox";
|
|
54
|
+
|
|
55
|
+
export { Choicebox };
|
package/dist/chrome.cjs
CHANGED
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var React3 = require('react');
|
|
5
|
+
var ui = require('@hanzo/ui');
|
|
5
6
|
var lucideReact = require('lucide-react');
|
|
6
7
|
var gui = require('@hanzo/gui');
|
|
7
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
9
|
var reactQuery = require('@tanstack/react-query');
|
|
9
|
-
var clsx = require('clsx');
|
|
10
|
-
var tailwindMerge = require('tailwind-merge');
|
|
11
10
|
|
|
12
11
|
function _interopNamespace(e) {
|
|
13
12
|
if (e && e.__esModule) return e;
|
|
@@ -495,15 +494,13 @@ var MenuSeparator = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
495
494
|
...props
|
|
496
495
|
}
|
|
497
496
|
);
|
|
498
|
-
function cn(...inputs) {
|
|
499
|
-
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
500
|
-
}
|
|
501
497
|
function initials(label) {
|
|
502
498
|
return label.split(/[\s._-]+/).filter(Boolean).map((w) => w[0]).join("").slice(0, 2).toUpperCase();
|
|
503
499
|
}
|
|
504
|
-
var Monogram = ({ label, logo }) => logo ? /* @__PURE__ */ jsxRuntime.jsx("img",
|
|
505
|
-
|
|
500
|
+
var Monogram = ({ label, logo }) => logo ? /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { tag: "img", src: logo, alt: "", className: "h-5 w-5 shrink-0 rounded object-contain" }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
501
|
+
ui.Box,
|
|
506
502
|
{
|
|
503
|
+
tag: "span",
|
|
507
504
|
"aria-hidden": "true",
|
|
508
505
|
className: "flex h-5 w-5 shrink-0 items-center justify-center rounded bg-[rgba(127,127,127,0.22)] text-[10px] font-bold",
|
|
509
506
|
children: initials(label)
|
|
@@ -512,11 +509,11 @@ var Monogram = ({ label, logo }) => logo ? /* @__PURE__ */ jsxRuntime.jsx("img",
|
|
|
512
509
|
var Row = ({ item, onDone, menu }) => {
|
|
513
510
|
const body = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
514
511
|
item.icon,
|
|
515
|
-
/* @__PURE__ */ jsxRuntime.jsx("span",
|
|
516
|
-
item.hint ? /* @__PURE__ */ jsxRuntime.jsx("span",
|
|
517
|
-
item.selected ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { "aria-hidden": "true",
|
|
512
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Box, { tag: "span", className: "flex-1 truncate", children: item.label }),
|
|
513
|
+
item.hint ? /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { tag: "span", className: "text-xs opacity-60", children: item.hint }) : null,
|
|
514
|
+
item.selected ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { "aria-hidden": "true", style: ui.css("h-4 w-4 shrink-0") }) : null
|
|
518
515
|
] });
|
|
519
|
-
const className = cn(
|
|
516
|
+
const className = ui.cn(
|
|
520
517
|
"flex w-full cursor-pointer select-none items-center gap-2.5 rounded-md px-2 py-2 text-left text-sm",
|
|
521
518
|
"hover:bg-[rgba(127,127,127,0.14)]",
|
|
522
519
|
item.danger && "text-[var(--color-text-error,#e5484d)]"
|
|
@@ -551,32 +548,33 @@ var Switcher = ({
|
|
|
551
548
|
const narrow = useIsNarrow();
|
|
552
549
|
const close = React3__namespace.useCallback(() => setOpen(false), []);
|
|
553
550
|
const message = status === "loading" ? "Loading\u2026" : status === "error" ? error ?? "Could not reach IAM." : status === "anonymous" ? null : items.length === 0 ? empty : null;
|
|
554
|
-
const rows = status === "anonymous" && onSignIn ? [{ id: "sign-in", label: signInLabel, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { "aria-hidden": "true",
|
|
551
|
+
const rows = status === "anonymous" && onSignIn ? [{ id: "sign-in", label: signInLabel, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { "aria-hidden": "true", style: ui.css("h-4 w-4") }), onSelect: onSignIn }] : status === "ready" ? items : [];
|
|
555
552
|
const panel = (menu) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
556
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
557
|
-
message ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
553
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Box, { className: "px-2 pb-1 pt-1 text-[11px] font-semibold uppercase tracking-wide opacity-55", children: title }),
|
|
554
|
+
message ? /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { "data-testid": "chrome-message", className: "px-2 py-2 text-sm opacity-70", children: message }) : null,
|
|
558
555
|
rows.map((item) => /* @__PURE__ */ jsxRuntime.jsx(Row, { item, onDone: close, menu }, item.id)),
|
|
559
556
|
footer.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
560
|
-
menu ? /* @__PURE__ */ jsxRuntime.jsx(MenuSeparator, {
|
|
557
|
+
menu ? /* @__PURE__ */ jsxRuntime.jsx(MenuSeparator, { ...ui.sx("my-1 h-px bg-[var(--color-border-divider,rgba(127,127,127,0.25))]") }) : /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { className: "my-1 h-px bg-[var(--color-border-divider,rgba(127,127,127,0.25))]" }),
|
|
561
558
|
footer.map((item) => /* @__PURE__ */ jsxRuntime.jsx(Row, { item, onDone: close, menu }, item.id))
|
|
562
559
|
] }) : null
|
|
563
560
|
] });
|
|
564
561
|
const trigger = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
565
|
-
|
|
562
|
+
ui.Box,
|
|
566
563
|
{
|
|
564
|
+
tag: "button",
|
|
567
565
|
type: "button",
|
|
568
566
|
"data-testid": testId,
|
|
569
567
|
"aria-label": title,
|
|
570
568
|
"aria-haspopup": "menu",
|
|
571
569
|
"aria-expanded": open,
|
|
572
|
-
className: cn(
|
|
570
|
+
className: ui.cn(
|
|
573
571
|
"flex max-w-[14rem] items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium",
|
|
574
572
|
"hover:bg-[rgba(127,127,127,0.14)]"
|
|
575
573
|
),
|
|
576
574
|
children: [
|
|
577
575
|
icon,
|
|
578
|
-
/* @__PURE__ */ jsxRuntime.jsx("span",
|
|
579
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsUpDown, { "aria-hidden": "true",
|
|
576
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Box, { tag: "span", className: "truncate", children: label }),
|
|
577
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsUpDown, { "aria-hidden": "true", style: ui.css("h-3.5 w-3.5 shrink-0 opacity-60") })
|
|
580
578
|
]
|
|
581
579
|
}
|
|
582
580
|
);
|
|
@@ -635,7 +633,7 @@ var ProjectSwitcher = () => {
|
|
|
635
633
|
testId: "project-switcher",
|
|
636
634
|
title: "Project",
|
|
637
635
|
label: id.project?.displayName || id.project?.name || "Project",
|
|
638
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Folder, { "aria-hidden": "true",
|
|
636
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Folder, { "aria-hidden": "true", style: ui.css("h-4 w-4 opacity-70") }),
|
|
639
637
|
status: id.status,
|
|
640
638
|
error: id.error,
|
|
641
639
|
empty: "No projects in this organization.",
|
|
@@ -643,7 +641,7 @@ var ProjectSwitcher = () => {
|
|
|
643
641
|
items: id.projects.map((p) => ({
|
|
644
642
|
id: p.name,
|
|
645
643
|
label: p.displayName || p.name,
|
|
646
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Folder, { "aria-hidden": "true",
|
|
644
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Folder, { "aria-hidden": "true", style: ui.css("h-4 w-4 opacity-70") }),
|
|
647
645
|
selected: p.name === id.project?.name,
|
|
648
646
|
onSelect: () => id.setProject(p.name)
|
|
649
647
|
}))
|
|
@@ -660,16 +658,16 @@ var UserMenu = ({ items = [] }) => {
|
|
|
660
658
|
align: "end",
|
|
661
659
|
title: id.status === "ready" ? who : "Account",
|
|
662
660
|
label: id.status === "ready" ? who : "Sign in",
|
|
663
|
-
icon: id.status === "ready" ? /* @__PURE__ */ jsxRuntime.jsx(Monogram, { label: who, logo: id.account?.avatar }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { "aria-hidden": "true",
|
|
661
|
+
icon: id.status === "ready" ? /* @__PURE__ */ jsxRuntime.jsx(Monogram, { label: who, logo: id.account?.avatar }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { "aria-hidden": "true", style: ui.css("h-4 w-4 opacity-70") }),
|
|
664
662
|
status: id.status,
|
|
665
663
|
error: id.error,
|
|
666
664
|
onSignIn: id.signIn,
|
|
667
665
|
signInLabel: `Sign in with ${id.whiteLabel.iamDomain}`,
|
|
668
666
|
items: [
|
|
669
|
-
{ id: "account", label: id.account?.email || who, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { "aria-hidden": "true",
|
|
667
|
+
{ id: "account", label: id.account?.email || who, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { "aria-hidden": "true", style: ui.css("h-4 w-4 opacity-70") }) },
|
|
670
668
|
...items
|
|
671
669
|
],
|
|
672
|
-
footer: id.status === "ready" ? [{ id: "sign-out", label: "Sign out", danger: true, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LogOut, { "aria-hidden": "true",
|
|
670
|
+
footer: id.status === "ready" ? [{ id: "sign-out", label: "Sign out", danger: true, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LogOut, { "aria-hidden": "true", style: ui.css("h-4 w-4") }), onSelect: id.signOut }] : []
|
|
673
671
|
}
|
|
674
672
|
);
|
|
675
673
|
};
|
|
@@ -680,10 +678,10 @@ var SettingsMenu = ({ items = [], href = "/settings" }) => /* @__PURE__ */ jsxRu
|
|
|
680
678
|
align: "end",
|
|
681
679
|
title: "Settings",
|
|
682
680
|
label: "Settings",
|
|
683
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { "aria-hidden": "true",
|
|
681
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { "aria-hidden": "true", style: ui.css("h-4 w-4 opacity-70") }),
|
|
684
682
|
items,
|
|
685
683
|
empty: "No settings on this surface.",
|
|
686
|
-
footer: [{ id: "all-settings", label: "All settings", href, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { "aria-hidden": "true",
|
|
684
|
+
footer: [{ id: "all-settings", label: "All settings", href, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { "aria-hidden": "true", style: ui.css("h-4 w-4 opacity-70") }) }]
|
|
687
685
|
}
|
|
688
686
|
);
|
|
689
687
|
var AppNav = ({
|
|
@@ -700,28 +698,31 @@ var AppNav = ({
|
|
|
700
698
|
const narrow = useIsNarrow();
|
|
701
699
|
const [menu, setMenu] = React3__namespace.useState(false);
|
|
702
700
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
703
|
-
|
|
701
|
+
ui.Box,
|
|
704
702
|
{
|
|
703
|
+
tag: "header",
|
|
705
704
|
"data-testid": "app-nav",
|
|
706
705
|
className: "sticky top-0 z-50 border-b border-[var(--color-border-divider,rgba(127,127,127,0.25))] bg-[var(--color-bg-body,inherit)]",
|
|
707
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
706
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Box, { className: "mx-auto flex h-14 max-w-7xl items-center gap-2 px-4", children: [
|
|
708
707
|
narrow && links.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(DrawerRoot, { open: menu, onOpenChange: (d) => setMenu(d.open), placement: "bottom", size: "md", children: [
|
|
709
708
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
710
|
-
|
|
709
|
+
ui.Box,
|
|
711
710
|
{
|
|
711
|
+
tag: "button",
|
|
712
712
|
type: "button",
|
|
713
713
|
"aria-label": "Menu",
|
|
714
714
|
"data-testid": "nav-menu",
|
|
715
715
|
className: "rounded-md p-2 hover:bg-[rgba(127,127,127,0.14)]",
|
|
716
716
|
onClick: () => setMenu(true),
|
|
717
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Menu, { "aria-hidden": "true",
|
|
717
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Menu, { "aria-hidden": "true", style: ui.css("h-5 w-5") })
|
|
718
718
|
}
|
|
719
719
|
),
|
|
720
720
|
/* @__PURE__ */ jsxRuntime.jsxs(DrawerContent, { "data-testid": "nav-menu-panel", children: [
|
|
721
721
|
/* @__PURE__ */ jsxRuntime.jsx(DrawerHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(DrawerTitle, { children: "Menu" }) }),
|
|
722
722
|
/* @__PURE__ */ jsxRuntime.jsx(DrawerBody, { children: links.map((l) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
723
|
-
|
|
723
|
+
ui.Box,
|
|
724
724
|
{
|
|
725
|
+
tag: "a",
|
|
725
726
|
href: l.href,
|
|
726
727
|
onClick: () => setMenu(false),
|
|
727
728
|
"aria-current": l.active ? "page" : void 0,
|
|
@@ -732,18 +733,19 @@ var AppNav = ({
|
|
|
732
733
|
)) })
|
|
733
734
|
] })
|
|
734
735
|
] }) : null,
|
|
735
|
-
/* @__PURE__ */ jsxRuntime.jsx("a",
|
|
736
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Building2, { "aria-hidden": "true",
|
|
736
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Box, { tag: "a", href: home, className: "flex items-center gap-2 font-semibold tracking-tight", children: brand ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
737
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Building2, { "aria-hidden": "true", style: ui.css("h-4 w-4 opacity-70") }),
|
|
737
738
|
id.whiteLabel.name
|
|
738
739
|
] }) }),
|
|
739
740
|
org ? /* @__PURE__ */ jsxRuntime.jsx(OrgSwitcher, {}) : null,
|
|
740
741
|
project ? /* @__PURE__ */ jsxRuntime.jsx(ProjectSwitcher, {}) : null,
|
|
741
|
-
!narrow && links.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("nav",
|
|
742
|
-
|
|
742
|
+
!narrow && links.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { tag: "nav", className: "flex items-center gap-1", children: links.map((l) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
743
|
+
ui.Box,
|
|
743
744
|
{
|
|
745
|
+
tag: "a",
|
|
744
746
|
href: l.href,
|
|
745
747
|
"aria-current": l.active ? "page" : void 0,
|
|
746
|
-
className: cn(
|
|
748
|
+
className: ui.cn(
|
|
747
749
|
"rounded-md px-3 py-1.5 text-sm font-medium",
|
|
748
750
|
l.active ? "bg-[rgba(127,127,127,0.14)]" : "opacity-75 hover:opacity-100"
|
|
749
751
|
),
|
|
@@ -751,7 +753,7 @@ var AppNav = ({
|
|
|
751
753
|
},
|
|
752
754
|
l.href
|
|
753
755
|
)) }) : null,
|
|
754
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
756
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ui.Box, { className: "flex flex-1 items-center justify-end gap-1", children: [
|
|
755
757
|
children,
|
|
756
758
|
settings ? /* @__PURE__ */ jsxRuntime.jsx(SettingsMenu, { items: settings }) : null,
|
|
757
759
|
/* @__PURE__ */ jsxRuntime.jsx(UserMenu, { items: userItems })
|