@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
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { Box } from '@hanzo/ui'
|
|
5
|
+
|
|
6
|
+
import { cn } from "./utils"
|
|
7
|
+
|
|
8
|
+
export interface SimpleNavigationBarProps
|
|
9
|
+
extends React.HTMLAttributes<HTMLElement> {
|
|
10
|
+
logo?: React.ReactNode
|
|
11
|
+
items?: Array<{ label: string; href: string }>
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const SimpleNavigationBar = React.forwardRef<
|
|
15
|
+
HTMLElement,
|
|
16
|
+
SimpleNavigationBarProps
|
|
17
|
+
>(({ className, logo, items = [], ...props }, ref) => {
|
|
18
|
+
return (
|
|
19
|
+
<Box tag="nav" ref={ref} className={cn("border-b", className)} {...props}>
|
|
20
|
+
<Box className="container flex h-16 items-center justify-between">
|
|
21
|
+
{logo && <Box className="font-semibold">{logo}</Box>}
|
|
22
|
+
<Box className="flex gap-6">
|
|
23
|
+
{items.map((item) => (
|
|
24
|
+
<Box tag="a"
|
|
25
|
+
key={item.href}
|
|
26
|
+
href={item.href}
|
|
27
|
+
className="text-sm font-medium transition-colors hover:text-primary"
|
|
28
|
+
>
|
|
29
|
+
{item.label}
|
|
30
|
+
</Box>
|
|
31
|
+
))}
|
|
32
|
+
</Box>
|
|
33
|
+
</Box>
|
|
34
|
+
</Box>
|
|
35
|
+
)
|
|
36
|
+
})
|
|
37
|
+
SimpleNavigationBar.displayName = "SimpleNavigationBar"
|
|
38
|
+
|
|
39
|
+
export { SimpleNavigationBar }
|
package/src/skeleton.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
import { Box, sx } from '@hanzo/ui'
|
|
3
3
|
import { cn } from './utils';
|
|
4
4
|
|
|
5
5
|
// ---------------------------------------------------------------------------
|
|
@@ -7,139 +7,11 @@ import { cn } from './utils';
|
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
8
|
|
|
9
9
|
export interface SkeletonProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color'> {
|
|
10
|
-
|
|
10
|
+
/** A skeleton with nothing said about it is loading; that is what one is for. */
|
|
11
|
+
readonly loading?: boolean;
|
|
11
12
|
|
|
12
13
|
/** When true, the Skeleton wraps its single child element instead of adding a wrapper div. */
|
|
13
14
|
readonly asChild?: boolean;
|
|
14
|
-
|
|
15
|
-
// Legacy Chakra style-prop shims — converted to inline style.
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
|
-
readonly w?: any;
|
|
18
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19
|
-
readonly h?: any;
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
|
-
readonly minW?: any;
|
|
22
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
23
|
-
readonly maxW?: any;
|
|
24
|
-
readonly display?: string;
|
|
25
|
-
readonly flexGrow?: number;
|
|
26
|
-
readonly flexShrink?: number;
|
|
27
|
-
readonly flexBasis?: string;
|
|
28
|
-
readonly fontWeight?: number | string;
|
|
29
|
-
readonly textStyle?: string;
|
|
30
|
-
readonly borderRadius?: string;
|
|
31
|
-
readonly alignSelf?: string;
|
|
32
|
-
readonly alignItems?: string;
|
|
33
|
-
readonly justifyContent?: string;
|
|
34
|
-
readonly color?: string;
|
|
35
|
-
readonly mt?: number | string;
|
|
36
|
-
readonly mb?: number | string;
|
|
37
|
-
readonly ml?: number | string;
|
|
38
|
-
readonly mr?: number | string;
|
|
39
|
-
readonly height?: string;
|
|
40
|
-
readonly overflow?: string;
|
|
41
|
-
readonly whiteSpace?: string;
|
|
42
|
-
readonly textOverflow?: string;
|
|
43
|
-
readonly textTransform?: string;
|
|
44
|
-
readonly gap?: number | string;
|
|
45
|
-
readonly gridTemplateColumns?: string;
|
|
46
|
-
readonly minWidth?: string;
|
|
47
|
-
readonly boxSize?: number | string;
|
|
48
|
-
readonly py?: number | string;
|
|
49
|
-
readonly px?: number | string;
|
|
50
|
-
readonly p?: number | string;
|
|
51
|
-
readonly hideBelow?: string;
|
|
52
|
-
readonly as?: React.ElementType;
|
|
53
|
-
readonly fontSize?: string;
|
|
54
|
-
readonly flexWrap?: React.CSSProperties['flexWrap'];
|
|
55
|
-
readonly wordBreak?: React.CSSProperties['wordBreak'];
|
|
56
|
-
readonly lineHeight?: string;
|
|
57
|
-
readonly marginRight?: string;
|
|
58
|
-
readonly position?: React.CSSProperties['position'];
|
|
59
|
-
readonly background?: string;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// Style-prop shim names that must NOT leak into the DOM.
|
|
63
|
-
const SHIM_PROPS = [
|
|
64
|
-
'w', 'h', 'minW', 'maxW', 'display', 'flexGrow', 'flexShrink', 'flexBasis',
|
|
65
|
-
'fontWeight', 'textStyle', 'borderRadius', 'alignSelf', 'alignItems',
|
|
66
|
-
'justifyContent', 'color', 'mt', 'mb', 'ml', 'mr', 'height', 'overflow',
|
|
67
|
-
'whiteSpace', 'textOverflow', 'textTransform', 'gap', 'gridTemplateColumns',
|
|
68
|
-
'minWidth', 'boxSize', 'py', 'px', 'p', 'hideBelow', 'fontSize', 'flexWrap',
|
|
69
|
-
'wordBreak', 'lineHeight', 'marginRight', 'position', 'background',
|
|
70
|
-
] as const;
|
|
71
|
-
|
|
72
|
-
const S = 4; // Chakra spacing scale
|
|
73
|
-
|
|
74
|
-
/** Resolve a dimension value (number → px via spacing scale, responsive object → first value). */
|
|
75
|
-
function dim(v: unknown): string | undefined {
|
|
76
|
-
if (v == null) return undefined;
|
|
77
|
-
if (typeof v === 'number') return `${ v * S }px`;
|
|
78
|
-
if (typeof v === 'string') return v;
|
|
79
|
-
if (typeof v === 'object') {
|
|
80
|
-
const o = v as Record<string, string>;
|
|
81
|
-
return o.base ?? o.lg ?? o.xl ?? Object.values(o)[0];
|
|
82
|
-
}
|
|
83
|
-
return undefined;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/** Convert a spacing number|string via the 4px scale. */
|
|
87
|
-
function sp(v: number | string | undefined): string | undefined {
|
|
88
|
-
if (v === undefined) return undefined;
|
|
89
|
-
return typeof v === 'number' ? `${ v * S }px` : v;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/** Build a CSSProperties object from legacy Chakra style-prop shims. */
|
|
93
|
-
function shimToStyle(props: SkeletonProps): React.CSSProperties {
|
|
94
|
-
const s: React.CSSProperties = {};
|
|
95
|
-
if (props.w !== undefined) s.width = dim(props.w);
|
|
96
|
-
if (props.h !== undefined) s.height = dim(props.h);
|
|
97
|
-
if (props.minW !== undefined) s.minWidth = dim(props.minW);
|
|
98
|
-
if (props.maxW !== undefined) s.maxWidth = dim(props.maxW);
|
|
99
|
-
if (props.display !== undefined) s.display = props.display;
|
|
100
|
-
if (props.flexGrow !== undefined) s.flexGrow = props.flexGrow;
|
|
101
|
-
if (props.flexShrink !== undefined) s.flexShrink = props.flexShrink;
|
|
102
|
-
if (props.flexBasis !== undefined) s.flexBasis = props.flexBasis;
|
|
103
|
-
if (props.fontWeight !== undefined) s.fontWeight = props.fontWeight;
|
|
104
|
-
if (props.borderRadius !== undefined) s.borderRadius = props.borderRadius;
|
|
105
|
-
if (props.alignSelf !== undefined) s.alignSelf = props.alignSelf;
|
|
106
|
-
if (props.alignItems !== undefined) s.alignItems = props.alignItems;
|
|
107
|
-
if (props.justifyContent !== undefined) s.justifyContent = props.justifyContent;
|
|
108
|
-
if (props.color !== undefined) s.color = props.color;
|
|
109
|
-
if (props.mt !== undefined) s.marginTop = sp(props.mt);
|
|
110
|
-
if (props.mb !== undefined) s.marginBottom = sp(props.mb);
|
|
111
|
-
if (props.ml !== undefined) s.marginLeft = sp(props.ml);
|
|
112
|
-
if (props.mr !== undefined) s.marginRight = sp(props.mr);
|
|
113
|
-
if (props.height !== undefined) s.height = props.height;
|
|
114
|
-
if (props.overflow !== undefined) s.overflow = props.overflow;
|
|
115
|
-
if (props.whiteSpace !== undefined) s.whiteSpace = props.whiteSpace;
|
|
116
|
-
if (props.textOverflow !== undefined) s.textOverflow = props.textOverflow;
|
|
117
|
-
if (props.textTransform !== undefined) s.textTransform = props.textTransform;
|
|
118
|
-
if (props.gap !== undefined) s.gap = sp(props.gap);
|
|
119
|
-
if (props.gridTemplateColumns !== undefined) s.gridTemplateColumns = props.gridTemplateColumns;
|
|
120
|
-
if (props.minWidth !== undefined) s.minWidth = props.minWidth;
|
|
121
|
-
if (props.boxSize !== undefined) {
|
|
122
|
-
const v = typeof props.boxSize === 'number' ? `${ props.boxSize * S }px` : props.boxSize;
|
|
123
|
-
s.width = v; s.height = v;
|
|
124
|
-
}
|
|
125
|
-
if (props.py !== undefined) { const v = sp(props.py); s.paddingTop = v; s.paddingBottom = v; }
|
|
126
|
-
if (props.px !== undefined) { const v = sp(props.px); s.paddingLeft = v; s.paddingRight = v; }
|
|
127
|
-
if (props.p !== undefined) s.padding = sp(props.p);
|
|
128
|
-
if (props.fontSize !== undefined) s.fontSize = props.fontSize;
|
|
129
|
-
if (props.flexWrap !== undefined) s.flexWrap = props.flexWrap;
|
|
130
|
-
if (props.wordBreak !== undefined) s.wordBreak = props.wordBreak;
|
|
131
|
-
if (props.lineHeight !== undefined) s.lineHeight = props.lineHeight;
|
|
132
|
-
if (props.marginRight !== undefined) s.marginRight = props.marginRight;
|
|
133
|
-
if (props.position !== undefined) s.position = props.position;
|
|
134
|
-
if (props.background !== undefined) s.background = props.background;
|
|
135
|
-
return s;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/** Strip shim keys from props so they don't leak into the DOM. */
|
|
139
|
-
function stripShims<T extends Record<string, unknown>>(props: T): Omit<T, (typeof SHIM_PROPS)[number]> {
|
|
140
|
-
const out = { ...props };
|
|
141
|
-
for (const k of SHIM_PROPS) delete out[k];
|
|
142
|
-
return out as Omit<T, (typeof SHIM_PROPS)[number]>;
|
|
143
15
|
}
|
|
144
16
|
|
|
145
17
|
// A skeleton reserves space. It does not move.
|
|
@@ -156,53 +28,33 @@ function stripShims<T extends Record<string, unknown>>(props: T): Omit<T, (typeo
|
|
|
156
28
|
// live next to the CSS, in section 6c of @luxfi/ui/tokens.css.
|
|
157
29
|
const SKELETON_CLASSES = 'lux-skeleton rounded-sm';
|
|
158
30
|
|
|
159
|
-
const HIDE_BELOW_MAP: Record<string, string> = { lg: 'lg:hidden', md: 'md:hidden', sm: 'sm:hidden' };
|
|
160
|
-
|
|
161
31
|
export const Skeleton = React.forwardRef<HTMLDivElement, SkeletonProps>(
|
|
162
32
|
function Skeleton(props, ref) {
|
|
163
|
-
const { loading =
|
|
164
|
-
|
|
165
|
-
const shimStyle = shimToStyle(props);
|
|
166
|
-
const mergedStyle = Object.keys(shimStyle).length > 0 || styleProp ? { ...shimStyle, ...styleProp } : undefined;
|
|
167
|
-
const hideBelowClass = props.hideBelow ? HIDE_BELOW_MAP[props.hideBelow] : undefined;
|
|
168
|
-
const cls = hideBelowClass ? cn(className, hideBelowClass) : className;
|
|
169
|
-
|
|
170
|
-
// Strip shim props from what reaches the DOM.
|
|
171
|
-
const htmlRest = stripShims(allRest);
|
|
33
|
+
const { loading = true, asChild, className, children, style, ...rest } = props;
|
|
172
34
|
|
|
173
35
|
if (!loading) {
|
|
174
36
|
if (asChild && React.isValidElement(children)) return children;
|
|
175
37
|
return (
|
|
176
|
-
<
|
|
177
|
-
{ children }
|
|
178
|
-
</Component>
|
|
179
|
-
);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
if (asChild && React.isValidElement(children)) {
|
|
183
|
-
return (
|
|
184
|
-
<Component
|
|
185
|
-
ref={ ref }
|
|
186
|
-
data-loading
|
|
187
|
-
className={ cn(SKELETON_CLASSES, '[&_*]:invisible', cls) }
|
|
188
|
-
style={ mergedStyle }
|
|
189
|
-
{ ...htmlRest }
|
|
190
|
-
>
|
|
38
|
+
<Box ref={ ref } className={ className } style={ style } { ...rest }>
|
|
191
39
|
{ children }
|
|
192
|
-
</
|
|
40
|
+
</Box>
|
|
193
41
|
);
|
|
194
42
|
}
|
|
195
43
|
|
|
196
44
|
return (
|
|
197
|
-
<
|
|
45
|
+
<div
|
|
198
46
|
ref={ ref }
|
|
199
47
|
data-loading
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
48
|
+
{...sx(
|
|
49
|
+
SKELETON_CLASSES,
|
|
50
|
+
asChild || children ? '[&_*]:invisible' : 'min-h-5',
|
|
51
|
+
className,
|
|
52
|
+
)}
|
|
53
|
+
style={ style }
|
|
54
|
+
{ ...rest }
|
|
203
55
|
>
|
|
204
56
|
{ children }
|
|
205
|
-
</
|
|
57
|
+
</div>
|
|
206
58
|
);
|
|
207
59
|
},
|
|
208
60
|
);
|
|
@@ -226,7 +78,7 @@ export const SkeletonCircle = React.forwardRef<HTMLDivElement, SkeletonCirclePro
|
|
|
226
78
|
<Skeleton
|
|
227
79
|
ref={ ref }
|
|
228
80
|
loading={ loading }
|
|
229
|
-
|
|
81
|
+
{...sx('rounded-full shrink-0', className)}
|
|
230
82
|
style={{ width: dimension, height: dimension, ...rest.style }}
|
|
231
83
|
{ ...rest }
|
|
232
84
|
/>
|
|
@@ -248,15 +100,15 @@ export const SkeletonText = React.forwardRef<HTMLDivElement, SkeletonTextProps>(
|
|
|
248
100
|
const { noOfLines = 3, loading = true, className, ...rest } = props;
|
|
249
101
|
|
|
250
102
|
return (
|
|
251
|
-
<
|
|
103
|
+
<Box ref={ ref } className={ cn('flex w-full flex-col gap-2', className) } { ...rest }>
|
|
252
104
|
{ Array.from({ length: noOfLines }).map((_, index) => (
|
|
253
105
|
<Skeleton
|
|
254
106
|
key={ index }
|
|
255
107
|
loading={ loading }
|
|
256
|
-
|
|
108
|
+
{...sx( cn('h-4', index === noOfLines - 1 && 'max-w-[80%]') )}
|
|
257
109
|
/>
|
|
258
110
|
)) }
|
|
259
|
-
</
|
|
111
|
+
</Box>
|
|
260
112
|
);
|
|
261
113
|
},
|
|
262
114
|
);
|
|
@@ -279,5 +131,5 @@ export const SkeletonText = React.forwardRef<HTMLDivElement, SkeletonTextProps>(
|
|
|
279
131
|
*/
|
|
280
132
|
export function LoadingBar({ loading = true }: { readonly loading?: boolean }) {
|
|
281
133
|
if (!loading) return null;
|
|
282
|
-
return <
|
|
134
|
+
return <Box className="lux-loading" role="progressbar" aria-busy="true" aria-label="Loading"/>;
|
|
283
135
|
}
|
package/src/slider.tsx
CHANGED
|
@@ -12,6 +12,7 @@ export interface SliderProps {
|
|
|
12
12
|
readonly step?: number;
|
|
13
13
|
readonly disabled?: boolean;
|
|
14
14
|
readonly orientation?: 'horizontal' | 'vertical';
|
|
15
|
+
readonly id?: string;
|
|
15
16
|
readonly name?: string;
|
|
16
17
|
readonly onValueChange?: (value: Array<number>) => void;
|
|
17
18
|
readonly onValueCommit?: (value: Array<number>) => void;
|
|
@@ -119,7 +120,7 @@ export const Slider = React.forwardRef<HTMLSpanElement, SliderProps>(
|
|
|
119
120
|
borderWidth={ 2 }
|
|
120
121
|
borderColor={ ACTIVE }
|
|
121
122
|
backgroundColor={ WHITE }
|
|
122
|
-
boxShadow="
|
|
123
|
+
boxShadow="var(--shadow-sm)"
|
|
123
124
|
transition="quick"
|
|
124
125
|
hoverStyle={{ borderColor: ACTIVE_HOVER }}
|
|
125
126
|
focusStyle={{ outlineWidth: 2, outlineStyle: 'solid', outlineColor: ACTIVE, outlineOffset: 2 }}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { Box } from '@hanzo/ui'
|
|
5
|
+
|
|
6
|
+
import { cn } from "./utils"
|
|
7
|
+
|
|
8
|
+
export interface StatusDashboardNavigationBarProps
|
|
9
|
+
extends React.HTMLAttributes<HTMLElement> {
|
|
10
|
+
items?: Array<{ label: string; href: string }>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const StatusDashboardNavigationBar = React.forwardRef<
|
|
14
|
+
HTMLElement,
|
|
15
|
+
StatusDashboardNavigationBarProps
|
|
16
|
+
>(({ className, items = [], ...props }, ref) => {
|
|
17
|
+
return (
|
|
18
|
+
<Box tag="nav"
|
|
19
|
+
ref={ref}
|
|
20
|
+
className={cn("border-b bg-background", className)}
|
|
21
|
+
{...props}
|
|
22
|
+
>
|
|
23
|
+
<Box className="container flex h-16 items-center gap-6">
|
|
24
|
+
{items.map((item) => (
|
|
25
|
+
<Box tag="a"
|
|
26
|
+
key={item.href}
|
|
27
|
+
href={item.href}
|
|
28
|
+
className="text-sm font-medium transition-colors hover:text-primary"
|
|
29
|
+
>
|
|
30
|
+
{item.label}
|
|
31
|
+
</Box>
|
|
32
|
+
))}
|
|
33
|
+
</Box>
|
|
34
|
+
</Box>
|
|
35
|
+
)
|
|
36
|
+
})
|
|
37
|
+
StatusDashboardNavigationBar.displayName = "StatusDashboardNavigationBar"
|
|
38
|
+
|
|
39
|
+
export { StatusDashboardNavigationBar }
|
package/src/status.tsx
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { Box, VariantProps, variants } from '@hanzo/ui'
|
|
3
|
+
|
|
4
|
+
import { cn } from "./utils"
|
|
5
|
+
|
|
6
|
+
const statusVariants = variants(
|
|
7
|
+
"inline-flex items-center gap-2 rounded-full px-2.5 py-0.5 text-xs font-medium",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-primary/10 text-primary",
|
|
12
|
+
success:
|
|
13
|
+
"bg-[var(--lux-state-success)] text-[var(--lux-state-success)] dark:bg-[var(--lux-state-success)]/30 dark:text-[var(--lux-state-success)]",
|
|
14
|
+
warning:
|
|
15
|
+
"bg-[var(--lux-state-notice)] text-[var(--lux-state-notice)] dark:bg-[var(--lux-state-notice)]/30 dark:text-[var(--lux-state-notice)]",
|
|
16
|
+
error: "bg-[var(--lux-state-error)] text-[var(--lux-state-error)] dark:bg-[var(--lux-state-error)]/30 dark:text-[var(--lux-state-error)]",
|
|
17
|
+
info: "bg-[var(--color-link-primary)] text-[var(--color-link-primary)] dark:bg-[var(--color-link-primary)]/30 dark:text-[var(--color-link-primary)]",
|
|
18
|
+
gray: "bg-[var(--color-bg-body)] text-[var(--color-text-primary)] dark:bg-[var(--color-bg-primary)]/30 dark:text-[var(--color-text-secondary)]",
|
|
19
|
+
},
|
|
20
|
+
dot: {
|
|
21
|
+
true: "pl-1.5",
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
variant: "default",
|
|
26
|
+
dot: "true",
|
|
27
|
+
},
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
export interface StatusProps
|
|
32
|
+
extends React.HTMLAttributes<HTMLSpanElement>,
|
|
33
|
+
VariantProps<typeof statusVariants> {}
|
|
34
|
+
|
|
35
|
+
const Status = React.forwardRef<HTMLSpanElement, StatusProps>(
|
|
36
|
+
({ className, variant, dot, children, ...props }, ref) => {
|
|
37
|
+
return (
|
|
38
|
+
<Box tag="span"
|
|
39
|
+
ref={ref}
|
|
40
|
+
className={cn(statusVariants({ variant, dot }), className)}
|
|
41
|
+
{...props}
|
|
42
|
+
>
|
|
43
|
+
{dot && (
|
|
44
|
+
<Box tag="span"
|
|
45
|
+
className={cn(
|
|
46
|
+
"h-1.5 w-1.5 rounded-full",
|
|
47
|
+
variant === "success" && "bg-[var(--lux-state-success)]",
|
|
48
|
+
variant === "warning" && "bg-[var(--lux-state-notice)]",
|
|
49
|
+
variant === "error" && "bg-[var(--lux-state-error)]",
|
|
50
|
+
variant === "info" && "bg-[var(--color-link-primary)]",
|
|
51
|
+
variant === "gray" && "bg-[var(--color-bg-body)]",
|
|
52
|
+
variant === "default" && "bg-primary"
|
|
53
|
+
)}
|
|
54
|
+
/>
|
|
55
|
+
)}
|
|
56
|
+
{children}
|
|
57
|
+
</Box>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
Status.displayName = "Status"
|
|
62
|
+
|
|
63
|
+
export { Status, statusVariants }
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { memo, useEffect, useRef } from "react"
|
|
4
|
+
import { Box } from '@hanzo/ui'
|
|
5
|
+
|
|
6
|
+
function StockScreener() {
|
|
7
|
+
const container = useRef<HTMLDivElement>(null)
|
|
8
|
+
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (!container.current) return
|
|
11
|
+
|
|
12
|
+
// Check if widget is already initialized using data attribute
|
|
13
|
+
if (container.current.dataset.initialized === "true") {
|
|
14
|
+
return // Widget already initialized, skip
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Mark as initialized before adding script
|
|
18
|
+
container.current.dataset.initialized = "true"
|
|
19
|
+
|
|
20
|
+
const script = document.createElement("script")
|
|
21
|
+
script.src =
|
|
22
|
+
"https://s3.tradingview.com/external-embedding/embed-widget-screener.js"
|
|
23
|
+
script.type = "text/javascript"
|
|
24
|
+
script.async = true
|
|
25
|
+
script.innerHTML = JSON.stringify({
|
|
26
|
+
market: "america",
|
|
27
|
+
showToolbar: true,
|
|
28
|
+
defaultColumn: "overview",
|
|
29
|
+
defaultScreen: "most_capitalized",
|
|
30
|
+
isTransparent: false,
|
|
31
|
+
locale: "en",
|
|
32
|
+
colorTheme: "dark",
|
|
33
|
+
width: "100%",
|
|
34
|
+
height: 550,
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
container.current.appendChild(script)
|
|
38
|
+
|
|
39
|
+
// Cleanup function
|
|
40
|
+
return () => {
|
|
41
|
+
if (container.current) {
|
|
42
|
+
// Remove initialization flag on unmount
|
|
43
|
+
delete container.current.dataset.initialized
|
|
44
|
+
// Remove all scripts
|
|
45
|
+
const scripts = container.current.querySelectorAll("script")
|
|
46
|
+
scripts.forEach((s) => s.remove())
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}, [])
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<Box className="tradingview-widget-container w-full" ref={container}>
|
|
53
|
+
<Box className="tradingview-widget-container__widget"></Box>
|
|
54
|
+
</Box>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export default memo(StockScreener)
|
package/src/switch.tsx
CHANGED
|
@@ -27,7 +27,7 @@ export interface SwitchProps extends Omit<React.ComponentPropsWithoutRef<'label'
|
|
|
27
27
|
thumbLabel?: { on: React.ReactNode; off: React.ReactNode };
|
|
28
28
|
checked?: boolean;
|
|
29
29
|
defaultChecked?: boolean;
|
|
30
|
-
onCheckedChange?: (
|
|
30
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
31
31
|
onChange?: React.FormEventHandler<HTMLLabelElement>;
|
|
32
32
|
disabled?: boolean;
|
|
33
33
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -65,7 +65,7 @@ const SwitchBase = React.forwardRef<HTMLInputElement, SwitchProps>(
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
// Chakra-shaped callback ({ checked }) — the contract consumers already use.
|
|
68
|
-
onCheckedChange?.(
|
|
68
|
+
onCheckedChange?.(nextChecked);
|
|
69
69
|
},
|
|
70
70
|
[ isControlled, onCheckedChange ],
|
|
71
71
|
);
|
|
@@ -123,7 +123,7 @@ const SwitchBase = React.forwardRef<HTMLInputElement, SwitchProps>(
|
|
|
123
123
|
height={ s.thumb }
|
|
124
124
|
borderRadius={ 9999 }
|
|
125
125
|
backgroundColor={ WHITE }
|
|
126
|
-
boxShadow="
|
|
126
|
+
boxShadow="var(--shadow-sm)"
|
|
127
127
|
>
|
|
128
128
|
{ thumbLabel && (
|
|
129
129
|
<Text width="100%" height="100%" textAlign="center" fontSize={ 8 }>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { useEffect, useRef } from "react"
|
|
4
|
+
import { Box } from '@hanzo/ui'
|
|
5
|
+
|
|
6
|
+
export interface SymbolInfoProps {
|
|
7
|
+
symbol?: string
|
|
8
|
+
width?: string | number
|
|
9
|
+
locale?: string
|
|
10
|
+
colorTheme?: "light" | "dark"
|
|
11
|
+
isTransparent?: boolean
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default function SymbolInfo({
|
|
15
|
+
symbol = "NASDAQ:AAPL",
|
|
16
|
+
width = "100%",
|
|
17
|
+
locale = "en",
|
|
18
|
+
colorTheme = "dark",
|
|
19
|
+
isTransparent = false,
|
|
20
|
+
}: SymbolInfoProps) {
|
|
21
|
+
const containerRef = useRef<HTMLDivElement>(null)
|
|
22
|
+
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
if (!containerRef.current) return
|
|
25
|
+
|
|
26
|
+
// Check if widget is already initialized using data attribute
|
|
27
|
+
if (containerRef.current.dataset.initialized === "true") {
|
|
28
|
+
return // Widget already initialized, skip
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Mark as initialized before adding script
|
|
32
|
+
containerRef.current.dataset.initialized = "true"
|
|
33
|
+
|
|
34
|
+
const script = document.createElement("script")
|
|
35
|
+
script.src =
|
|
36
|
+
"https://s3.tradingview.com/external-embedding/embed-widget-symbol-info.js"
|
|
37
|
+
script.async = true
|
|
38
|
+
script.innerHTML = JSON.stringify({
|
|
39
|
+
symbol,
|
|
40
|
+
width,
|
|
41
|
+
locale,
|
|
42
|
+
colorTheme,
|
|
43
|
+
isTransparent,
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
containerRef.current.appendChild(script)
|
|
47
|
+
|
|
48
|
+
return () => {
|
|
49
|
+
if (containerRef.current) {
|
|
50
|
+
// Remove initialization flag on unmount
|
|
51
|
+
delete containerRef.current.dataset.initialized
|
|
52
|
+
// Remove all scripts
|
|
53
|
+
const scripts = containerRef.current.querySelectorAll("script")
|
|
54
|
+
scripts.forEach((s) => s.remove())
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}, [symbol, width, locale, colorTheme, isTransparent])
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<Box className="tradingview-widget-container" ref={containerRef}>
|
|
61
|
+
<Box className="tradingview-widget-container__widget"></Box>
|
|
62
|
+
</Box>
|
|
63
|
+
)
|
|
64
|
+
}
|