matrix-design-system 1.0.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 +21 -0
- package/README.md +95 -0
- package/dist/atoms/animation/motion-div/index.d.mts +2 -0
- package/dist/atoms/animation/motion-div/motion-div.d.mts +7 -0
- package/dist/atoms/animation/motion-div/motion-div.mjs +37 -0
- package/dist/atoms/animation/motion-div/use-motion-div-store.mjs +17 -0
- package/dist/atoms/buttons/button/button.d.mts +8 -0
- package/dist/atoms/buttons/button/button.mjs +12 -0
- package/dist/atoms/buttons/button/index.d.mts +2 -0
- package/dist/atoms/buttons/switch/index.d.mts +2 -0
- package/dist/atoms/buttons/switch/switch.d.mts +10 -0
- package/dist/atoms/buttons/switch/switch.mjs +40 -0
- package/dist/atoms/buttons/switch/use-switch-store.mjs +7 -0
- package/dist/atoms/call-to-actions/call-to-action-external-with-tracking/call-to-action-external-with-tracking.d.mts +13 -0
- package/dist/atoms/call-to-actions/call-to-action-external-with-tracking/call-to-action-external-with-tracking.mjs +30 -0
- package/dist/atoms/call-to-actions/call-to-action-external-with-tracking/index.d.mts +2 -0
- package/dist/atoms/call-to-actions/call-to-action-internal-with-tracking/call-to-action-internal-with-tracking.d.mts +14 -0
- package/dist/atoms/call-to-actions/call-to-action-internal-with-tracking/call-to-action-internal-with-tracking.mjs +29 -0
- package/dist/atoms/call-to-actions/call-to-action-internal-with-tracking/index.d.mts +2 -0
- package/dist/atoms/chip/chip.d.mts +10 -0
- package/dist/atoms/chip/chip.mjs +10 -0
- package/dist/atoms/chip/index.d.mts +2 -0
- package/dist/atoms/effects/glassmorphism-background/glassmorphism-background.d.mts +8 -0
- package/dist/atoms/effects/glassmorphism-background/glassmorphism-background.mjs +33 -0
- package/dist/atoms/effects/glassmorphism-background/index.d.mts +2 -0
- package/dist/atoms/effects/glassmorphism-background/use-glassmorphism-background-store.mjs +17 -0
- package/dist/atoms/effects/image-glow/image-glow.d.mts +12 -0
- package/dist/atoms/effects/image-glow/image-glow.mjs +20 -0
- package/dist/atoms/effects/image-glow/index.d.mts +2 -0
- package/dist/atoms/effects/image-shimmer-placeholder/image-shimmer-placeholder.d.mts +6 -0
- package/dist/atoms/effects/image-shimmer-placeholder/image-shimmer-placeholder.mjs +22 -0
- package/dist/atoms/effects/image-shimmer-placeholder/index.d.mts +2 -0
- package/dist/atoms/effects/matrix-rain/matrix-rain/index.d.mts +2 -0
- package/dist/atoms/effects/matrix-rain/matrix-rain/matrix-2d-canvas/debounce.mjs +12 -0
- package/dist/atoms/effects/matrix-rain/matrix-rain/matrix-2d-canvas/matrix-2d-canvas.mjs +25 -0
- package/dist/atoms/effects/matrix-rain/matrix-rain/matrix-2d-canvas/use-matrix-2d-canvas-store.mjs +186 -0
- package/dist/atoms/effects/matrix-rain/matrix-rain/matrix-rain.d.mts +5 -0
- package/dist/atoms/effects/matrix-rain/matrix-rain/matrix-rain.mjs +68 -0
- package/dist/atoms/effects/matrix-rain/matrix-rain/use-matrix-rain-activity.mjs +40 -0
- package/dist/atoms/effects/matrix-rain/matrix-rain/use-matrix-rain-store.mjs +69 -0
- package/dist/atoms/effects/overlay/index.d.mts +2 -0
- package/dist/atoms/effects/overlay/overlay.d.mts +11 -0
- package/dist/atoms/effects/overlay/overlay.mjs +61 -0
- package/dist/atoms/effects/overlay/use-overlay-store.mjs +8 -0
- package/dist/atoms/effects/pills/index.d.mts +2 -0
- package/dist/atoms/effects/pills/pills.d.mts +10 -0
- package/dist/atoms/effects/pills/pills.mjs +121 -0
- package/dist/atoms/effects/pills/use-pills-store.mjs +17 -0
- package/dist/atoms/effects/plain-image/index.d.mts +2 -0
- package/dist/atoms/effects/plain-image/plain-image.d.mts +45 -0
- package/dist/atoms/effects/plain-image/plain-image.mjs +140 -0
- package/dist/atoms/effects/plain-image/use-plain-image-store.mjs +62 -0
- package/dist/atoms/icons/chat-icon/chat-icon.d.mts +4 -0
- package/dist/atoms/icons/chat-icon/chat-icon.mjs +13 -0
- package/dist/atoms/icons/copy-icon/copy-icon.d.mts +6 -0
- package/dist/atoms/icons/copy-icon/copy-icon.mjs +17 -0
- package/dist/atoms/icons/rounded-icon/index.d.mts +2 -0
- package/dist/atoms/icons/rounded-icon/rounded-icon.d.mts +8 -0
- package/dist/atoms/icons/rounded-icon/rounded-icon.mjs +8 -0
- package/dist/atoms/links/anchor-link/anchor-link.d.mts +31 -0
- package/dist/atoms/links/anchor-link/anchor-link.mjs +14 -0
- package/dist/atoms/links/anchor-link/index.d.mts +2 -0
- package/dist/atoms/links/external-link/external-link.d.mts +13 -0
- package/dist/atoms/links/external-link/external-link.mjs +29 -0
- package/dist/atoms/links/external-link/index.d.mts +2 -0
- package/dist/atoms/links/internal-link/index.d.mts +2 -0
- package/dist/atoms/links/internal-link/internal-link.d.mts +15 -0
- package/dist/atoms/links/internal-link/internal-link.mjs +12 -0
- package/dist/atoms/loader/loader/index.d.mts +2 -0
- package/dist/atoms/loader/loader/loader.d.mts +10 -0
- package/dist/atoms/loader/loader/loader.mjs +62 -0
- package/dist/atoms/typography/input-field/index.d.mts +2 -0
- package/dist/atoms/typography/input-field/input-field.d.mts +9 -0
- package/dist/atoms/typography/input-field/input-field.mjs +8 -0
- package/dist/atoms/typography/label/index.d.mts +2 -0
- package/dist/atoms/typography/label/label.d.mts +9 -0
- package/dist/atoms/typography/label/label.mjs +11 -0
- package/dist/atoms/typography/markdown/markdown-plugins.mjs +16 -0
- package/dist/atoms/typography/markdown/markdown.d.mts +7 -0
- package/dist/atoms/typography/markdown/markdown.mjs +23 -0
- package/dist/atoms/typography/markdown/use-markdown-store.mjs +24 -0
- package/dist/atoms/typography/terminal-blocks/index.d.mts +2 -0
- package/dist/atoms/typography/terminal-blocks/terminal-blocks.d.mts +13 -0
- package/dist/atoms/typography/terminal-blocks/terminal-blocks.mjs +42 -0
- package/dist/atoms/typography/textarea/index.d.mts +2 -0
- package/dist/atoms/typography/textarea/textarea.d.mts +9 -0
- package/dist/atoms/typography/textarea/textarea.mjs +8 -0
- package/dist/chart.d.mts +7 -0
- package/dist/chart.mjs +4 -0
- package/dist/command-palette.d.mts +6 -0
- package/dist/command-palette.mjs +5 -0
- package/dist/hooks/use-clipboard-available.d.mts +4 -0
- package/dist/hooks/use-clipboard-available.mjs +10 -0
- package/dist/hooks/use-device-capabilities.d.mts +10 -0
- package/dist/hooks/use-device-capabilities.mjs +30 -0
- package/dist/hooks/use-glassmorphism.d.mts +10 -0
- package/dist/hooks/use-glassmorphism.mjs +9 -0
- package/dist/hooks/use-in-view-list.d.mts +7 -0
- package/dist/hooks/use-in-view-list.mjs +63 -0
- package/dist/hooks/use-in-view.d.mts +9 -0
- package/dist/hooks/use-in-view.mjs +68 -0
- package/dist/hooks/use-is-ios.d.mts +4 -0
- package/dist/hooks/use-is-ios.mjs +7 -0
- package/dist/hooks/use-lock-body-scroll.d.mts +4 -0
- package/dist/hooks/use-lock-body-scroll.mjs +40 -0
- package/dist/hooks/use-matrix-settings-store.d.mts +5 -0
- package/dist/hooks/use-matrix-settings-store.mjs +15 -0
- package/dist/hooks/use-motion-store.d.mts +13 -0
- package/dist/hooks/use-motion-store.mjs +29 -0
- package/dist/hooks/use-os-modifier-key.d.mts +5 -0
- package/dist/hooks/use-os-modifier-key.mjs +15 -0
- package/dist/hooks/use-reading-progress.d.mts +8 -0
- package/dist/hooks/use-reading-progress.mjs +49 -0
- package/dist/hooks/use-reduced-motions.d.mts +4 -0
- package/dist/hooks/use-reduced-motions.mjs +10 -0
- package/dist/hooks/use-scroll-direction.d.mts +8 -0
- package/dist/hooks/use-scroll-direction.mjs +43 -0
- package/dist/hooks/use-typewriter.d.mts +15 -0
- package/dist/hooks/use-typewriter.mjs +89 -0
- package/dist/hooks/use-webgpu-supported.d.mts +4 -0
- package/dist/hooks/use-webgpu-supported.mjs +16 -0
- package/dist/index.d.mts +153 -0
- package/dist/index.mjs +88 -0
- package/dist/markdown.d.mts +2 -0
- package/dist/markdown.mjs +2 -0
- package/dist/molecules/accordion/accordion/accordion.d.mts +12 -0
- package/dist/molecules/accordion/accordion/accordion.mjs +130 -0
- package/dist/molecules/accordion/accordion/index.d.mts +2 -0
- package/dist/molecules/accordion/accordion/use-accordion-store.mjs +55 -0
- package/dist/molecules/breadcrumbs/breadcrumb/breadcrumb.d.mts +21 -0
- package/dist/molecules/breadcrumbs/breadcrumb/breadcrumb.mjs +186 -0
- package/dist/molecules/breadcrumbs/breadcrumb/index.d.mts +2 -0
- package/dist/molecules/breadcrumbs/breadcrumb/use-breadcrumb-store.mjs +29 -0
- package/dist/molecules/buttons/pagination-navigation/index.d.mts +2 -0
- package/dist/molecules/buttons/pagination-navigation/pagination-navigation.d.mts +11 -0
- package/dist/molecules/buttons/pagination-navigation/pagination-navigation.mjs +17 -0
- package/dist/molecules/buttons/pills-buttons/index.d.mts +2 -0
- package/dist/molecules/buttons/pills-buttons/pills-buttons.d.mts +10 -0
- package/dist/molecules/buttons/pills-buttons/pills-buttons.mjs +55 -0
- package/dist/molecules/buttons/segmented-control/segmented-control.d.mts +13 -0
- package/dist/molecules/buttons/segmented-control/segmented-control.mjs +46 -0
- package/dist/molecules/buttons/segmented-control/use-segmented-control-store.mjs +8 -0
- package/dist/molecules/buttons/social-contact/index.d.mts +2 -0
- package/dist/molecules/buttons/social-contact/social-contact.d.mts +10 -0
- package/dist/molecules/buttons/social-contact/social-contact.mjs +13 -0
- package/dist/molecules/buttons/tag/index.d.mts +2 -0
- package/dist/molecules/buttons/tag/tag.d.mts +17 -0
- package/dist/molecules/buttons/tag/tag.mjs +20 -0
- package/dist/molecules/buttons/terminal-button/index.d.mts +2 -0
- package/dist/molecules/buttons/terminal-button/terminal-button.d.mts +15 -0
- package/dist/molecules/buttons/terminal-button/terminal-button.mjs +38 -0
- package/dist/molecules/chart/chart-panel/chart-panel.d.mts +9 -0
- package/dist/molecules/chart/chart-panel/chart-panel.mjs +12 -0
- package/dist/molecules/chart/chart-panel/index.d.mts +2 -0
- package/dist/molecules/chart/chart-tooltip/chart-tooltip.d.mts +8 -0
- package/dist/molecules/chart/chart-tooltip/chart-tooltip.mjs +18 -0
- package/dist/molecules/chart/chart-tooltip/index.d.mts +2 -0
- package/dist/molecules/chart/donut-chart/donut-chart.d.mts +15 -0
- package/dist/molecules/chart/donut-chart/donut-chart.mjs +142 -0
- package/dist/molecules/chart/donut-chart/index.d.mts +2 -0
- package/dist/molecules/containers/content-container/content-container.d.mts +5 -0
- package/dist/molecules/containers/content-container/content-container.mjs +8 -0
- package/dist/molecules/containers/content-container/index.d.mts +2 -0
- package/dist/molecules/controls/control-slider/control-slider.d.mts +14 -0
- package/dist/molecules/controls/control-slider/control-slider.mjs +76 -0
- package/dist/molecules/controls/control-slider/index.d.mts +2 -0
- package/dist/molecules/controls/control-slider/use-control-slider-store.mjs +10 -0
- package/dist/molecules/effects/matrix-background/index.d.mts +2 -0
- package/dist/molecules/effects/matrix-background/matrix-background.d.mts +8 -0
- package/dist/molecules/effects/matrix-background/matrix-background.mjs +15 -0
- package/dist/molecules/effects/matrix-header-background/index.d.mts +2 -0
- package/dist/molecules/effects/matrix-header-background/matrix-header-background.d.mts +8 -0
- package/dist/molecules/effects/matrix-header-background/matrix-header-background.mjs +14 -0
- package/dist/molecules/effects/matrix-terminal/index.d.mts +2 -0
- package/dist/molecules/effects/matrix-terminal/matrix-terminal.d.mts +15 -0
- package/dist/molecules/effects/matrix-terminal/matrix-terminal.mjs +101 -0
- package/dist/molecules/effects/matrix-terminal/use-matrix-terminal-store.mjs +59 -0
- package/dist/molecules/form/filter-input/filter-input.d.mts +10 -0
- package/dist/molecules/form/filter-input/filter-input.mjs +35 -0
- package/dist/molecules/form/filter-input/index.d.mts +2 -0
- package/dist/molecules/form/form-error-summary/form-error-summary.d.mts +10 -0
- package/dist/molecules/form/form-error-summary/form-error-summary.mjs +71 -0
- package/dist/molecules/form/form-error-summary/index.d.mts +2 -0
- package/dist/molecules/form/form-field/form-field.d.mts +10 -0
- package/dist/molecules/form/form-field/form-field.mjs +60 -0
- package/dist/molecules/form/form-field/index.d.mts +2 -0
- package/dist/molecules/form/form-success-message/form-success-message.d.mts +8 -0
- package/dist/molecules/form/form-success-message/form-success-message.mjs +21 -0
- package/dist/molecules/form/form-success-message/index.d.mts +2 -0
- package/dist/molecules/form/form-textarea/form-textarea.d.mts +10 -0
- package/dist/molecules/form/form-textarea/form-textarea.mjs +60 -0
- package/dist/molecules/form/form-textarea/index.d.mts +2 -0
- package/dist/molecules/lightbox-image/index.d.mts +2 -0
- package/dist/molecules/lightbox-image/lightbox-image.d.mts +6 -0
- package/dist/molecules/lightbox-image/lightbox-image.mjs +49 -0
- package/dist/molecules/lightbox-image/use-lightbox-image-store.mjs +29 -0
- package/dist/molecules/links/pills-links/index.d.mts +2 -0
- package/dist/molecules/links/pills-links/pills-links.d.mts +13 -0
- package/dist/molecules/links/pills-links/pills-links.mjs +60 -0
- package/dist/molecules/menu/close/close.d.mts +8 -0
- package/dist/molecules/menu/close/close.mjs +9 -0
- package/dist/molecules/menu/close/index.d.mts +2 -0
- package/dist/molecules/menu/dropdown-menu/dropdown-menu.d.mts +25 -0
- package/dist/molecules/menu/dropdown-menu/dropdown-menu.mjs +143 -0
- package/dist/molecules/menu/dropdown-menu/index.d.mts +2 -0
- package/dist/molecules/menu/dropdown-menu/use-dropdown-menu-store.mjs +108 -0
- package/dist/molecules/menu/hamburger-menu/hamburger-menu.d.mts +8 -0
- package/dist/molecules/menu/hamburger-menu/hamburger-menu.mjs +9 -0
- package/dist/molecules/menu/hamburger-menu/index.d.mts +2 -0
- package/dist/molecules/menu/menu-item/index.d.mts +2 -0
- package/dist/molecules/menu/menu-item/menu-item.d.mts +16 -0
- package/dist/molecules/menu/menu-item/menu-item.mjs +65 -0
- package/dist/molecules/menu/menu-item/use-menu-item-store.mjs +10 -0
- package/dist/molecules/stat-card/index.d.mts +2 -0
- package/dist/molecules/stat-card/stat-card.d.mts +10 -0
- package/dist/molecules/stat-card/stat-card.mjs +21 -0
- package/dist/molecules/terminal-list-item/index.d.mts +2 -0
- package/dist/molecules/terminal-list-item/terminal-list-item.d.mts +9 -0
- package/dist/molecules/terminal-list-item/terminal-list-item.mjs +13 -0
- package/dist/molecules/terminal-progress-bar/index.d.mts +2 -0
- package/dist/molecules/terminal-progress-bar/terminal-progress-bar.d.mts +11 -0
- package/dist/molecules/terminal-progress-bar/terminal-progress-bar.mjs +20 -0
- package/dist/molecules/typography/page-title/index.d.mts +2 -0
- package/dist/molecules/typography/page-title/page-title.d.mts +5 -0
- package/dist/molecules/typography/page-title/page-title.mjs +8 -0
- package/dist/molecules/typography/paragraph-title-with-icon/index.d.mts +2 -0
- package/dist/molecules/typography/paragraph-title-with-icon/paragraph-title-with-icon.d.mts +8 -0
- package/dist/molecules/typography/paragraph-title-with-icon/paragraph-title-with-icon.mjs +13 -0
- package/dist/molecules/typography/section-heading/index.d.mts +2 -0
- package/dist/molecules/typography/section-heading/section-heading.d.mts +9 -0
- package/dist/molecules/typography/section-heading/section-heading.mjs +17 -0
- package/dist/molecules/video/self-hosted-video/index.d.mts +2 -0
- package/dist/molecules/video/self-hosted-video/self-hosted-video.d.mts +17 -0
- package/dist/molecules/video/self-hosted-video/self-hosted-video.mjs +39 -0
- package/dist/molecules/video/youtube/index.d.mts +2 -0
- package/dist/molecules/video/youtube/youtube.d.mts +9 -0
- package/dist/molecules/video/youtube/youtube.mjs +12 -0
- package/dist/organism/command-palette/command-palette/command-palette.d.mts +12 -0
- package/dist/organism/command-palette/command-palette/command-palette.mjs +148 -0
- package/dist/organism/command-palette/command-palette/index.d.mts +2 -0
- package/dist/organism/command-palette/command-palette/use-command-palette-store.mjs +121 -0
- package/dist/organism/command-palette/command-palette-group/command-palette-group.d.mts +9 -0
- package/dist/organism/command-palette/command-palette-group/command-palette-group.mjs +24 -0
- package/dist/organism/command-palette/command-palette-group/index.d.mts +2 -0
- package/dist/organism/command-palette/command-palette-item/command-palette-item.d.mts +11 -0
- package/dist/organism/command-palette/command-palette-item/command-palette-item.mjs +29 -0
- package/dist/organism/command-palette/command-palette-item/index.d.mts +2 -0
- package/dist/organism/command-palette/command-palette-item/use-command-palette-item-store.mjs +30 -0
- package/dist/organism/command-palette/index.d.mts +9 -0
- package/dist/organism/command-palette/toggle-motion-item/index.d.mts +2 -0
- package/dist/organism/command-palette/toggle-motion-item/toggle-motion-item.d.mts +8 -0
- package/dist/organism/command-palette/toggle-motion-item/toggle-motion-item.mjs +63 -0
- package/dist/organism/command-palette/toggle-motion-item/use-toggle-motion-item-store.mjs +45 -0
- package/dist/organism/cookie-consent-banner/cookie-consent-banner.d.mts +9 -0
- package/dist/organism/cookie-consent-banner/cookie-consent-banner.mjs +71 -0
- package/dist/organism/cookie-consent-banner/use-cookie-consent-banner-store.mjs +10 -0
- package/dist/organism/footer/footer.d.mts +26 -0
- package/dist/organism/footer/footer.mjs +193 -0
- package/dist/organism/footer/index.d.mts +3 -0
- package/dist/organism/footer/use-footer-store.d.mts +22 -0
- package/dist/organism/footer/use-footer-store.mjs +57 -0
- package/dist/organism/header/brand-header/brand-header.d.mts +14 -0
- package/dist/organism/header/brand-header/brand-header.mjs +132 -0
- package/dist/organism/header/brand-header/index.d.mts +2 -0
- package/dist/organism/image-carousel/fullscreen-modal/fullscreen-modal.mjs +148 -0
- package/dist/organism/image-carousel/fullscreen-modal/use-fullscreen-modal-store.mjs +129 -0
- package/dist/organism/image-carousel/image-carousel.d.mts +14 -0
- package/dist/organism/image-carousel/image-carousel.mjs +225 -0
- package/dist/organism/image-carousel/index.d.mts +2 -0
- package/dist/organism/image-carousel/navigation-buttons/navigation-buttons.mjs +22 -0
- package/dist/organism/image-carousel/navigation-buttons/use-navigation-buttons-store.mjs +18 -0
- package/dist/organism/image-carousel/page-indicators/page-indicator-button/page-indicator-button.mjs +14 -0
- package/dist/organism/image-carousel/page-indicators/page-indicator-button/use-page-indicator-button-store.mjs +11 -0
- package/dist/organism/image-carousel/page-indicators/page-indicators.mjs +20 -0
- package/dist/organism/image-carousel/use-image-carousel-store.mjs +88 -0
- package/dist/organism/lightbox/index.d.mts +2 -0
- package/dist/organism/lightbox/lightbox.d.mts +5 -0
- package/dist/organism/lightbox/lightbox.mjs +100 -0
- package/dist/organism/lightbox/use-lightbox-store.mjs +120 -0
- package/dist/organism/loading-bar/loading-bar.d.mts +7 -0
- package/dist/organism/loading-bar/loading-bar.mjs +48 -0
- package/dist/organism/loading-bar/use-loading-bar-store.mjs +52 -0
- package/dist/organism/menu/index.d.mts +3 -0
- package/dist/organism/menu/menu.d.mts +33 -0
- package/dist/organism/menu/menu.mjs +396 -0
- package/dist/organism/menu/use-menu-store.d.mts +22 -0
- package/dist/organism/menu/use-menu-store.mjs +265 -0
- package/dist/organism/profile-hero/index.d.mts +2 -0
- package/dist/organism/profile-hero/profile-hero.d.mts +15 -0
- package/dist/organism/profile-hero/profile-hero.mjs +72 -0
- package/dist/organism/profile-photo/index.d.mts +2 -0
- package/dist/organism/profile-photo/profile-photo.d.mts +12 -0
- package/dist/organism/profile-photo/profile-photo.mjs +17 -0
- package/dist/organism/reading-content-progress-bar/index.d.mts +2 -0
- package/dist/organism/reading-content-progress-bar/reading-content-progress-bar.d.mts +8 -0
- package/dist/organism/reading-content-progress-bar/reading-content-progress-bar.mjs +76 -0
- package/dist/organism/reading-content-progress-bar/use-reading-content-progress-bar-store.mjs +29 -0
- package/dist/organism/social-contacts/index.d.mts +2 -0
- package/dist/organism/social-contacts/social-contacts.d.mts +29 -0
- package/dist/organism/social-contacts/social-contacts.mjs +78 -0
- package/dist/state/command-palette/command-palette-context.d.mts +9 -0
- package/dist/state/command-palette/command-palette-context.mjs +10 -0
- package/dist/state/command-palette/command-palette-events.d.mts +11 -0
- package/dist/state/command-palette/command-palette-events.mjs +15 -0
- package/dist/state/command-palette/command-palette-trigger.d.mts +8 -0
- package/dist/state/lightbox/lightbox-events.d.mts +9 -0
- package/dist/state/lightbox/lightbox-events.mjs +7 -0
- package/dist/state/matrix-rain/matrix-settings.d.mts +37 -0
- package/dist/state/matrix-rain/matrix-settings.mjs +122 -0
- package/dist/state/motion/motion.d.mts +6 -0
- package/dist/state/motion/motion.mjs +17 -0
- package/package.json +160 -0
- package/src/styles/base.css +130 -0
- package/src/styles/components.css +57 -0
- package/src/styles/index.css +23 -0
- package/src/styles/pills.css +85 -0
- package/src/styles/theme.css +254 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { InputField } from "../../../atoms/typography/input-field/input-field.mjs";
|
|
3
|
+
import { Label } from "../../../atoms/typography/label/label.mjs";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/molecules/form/form-field/form-field.tsx
|
|
7
|
+
const FormField = (t0) => {
|
|
8
|
+
const $ = c(15);
|
|
9
|
+
let icon;
|
|
10
|
+
let inputProps;
|
|
11
|
+
let label;
|
|
12
|
+
let t1;
|
|
13
|
+
if ($[0] !== t0) {
|
|
14
|
+
({label, icon, hasError: t1, ...inputProps} = t0);
|
|
15
|
+
$[0] = t0;
|
|
16
|
+
$[1] = icon;
|
|
17
|
+
$[2] = inputProps;
|
|
18
|
+
$[3] = label;
|
|
19
|
+
$[4] = t1;
|
|
20
|
+
} else {
|
|
21
|
+
icon = $[1];
|
|
22
|
+
inputProps = $[2];
|
|
23
|
+
label = $[3];
|
|
24
|
+
t1 = $[4];
|
|
25
|
+
}
|
|
26
|
+
const hasError = t1 === void 0 ? false : t1;
|
|
27
|
+
let t2;
|
|
28
|
+
if ($[5] !== icon || $[6] !== inputProps.id || $[7] !== label) {
|
|
29
|
+
t2 = /* @__PURE__ */ jsx(Label, {
|
|
30
|
+
id: inputProps.id,
|
|
31
|
+
value: label,
|
|
32
|
+
icon
|
|
33
|
+
});
|
|
34
|
+
$[5] = icon;
|
|
35
|
+
$[6] = inputProps.id;
|
|
36
|
+
$[7] = label;
|
|
37
|
+
$[8] = t2;
|
|
38
|
+
} else t2 = $[8];
|
|
39
|
+
const t3 = `w-full px-4 py-3 ${hasError ? "border-red-500 focus:border-red-500" : ""}`;
|
|
40
|
+
let t4;
|
|
41
|
+
if ($[9] !== inputProps || $[10] !== t3) {
|
|
42
|
+
t4 = /* @__PURE__ */ jsx(InputField, {
|
|
43
|
+
...inputProps,
|
|
44
|
+
className: t3
|
|
45
|
+
});
|
|
46
|
+
$[9] = inputProps;
|
|
47
|
+
$[10] = t3;
|
|
48
|
+
$[11] = t4;
|
|
49
|
+
} else t4 = $[11];
|
|
50
|
+
let t5;
|
|
51
|
+
if ($[12] !== t2 || $[13] !== t4) {
|
|
52
|
+
t5 = /* @__PURE__ */ jsxs("div", { children: [t2, t4] });
|
|
53
|
+
$[12] = t2;
|
|
54
|
+
$[13] = t4;
|
|
55
|
+
$[14] = t5;
|
|
56
|
+
} else t5 = $[14];
|
|
57
|
+
return t5;
|
|
58
|
+
};
|
|
59
|
+
//#endregion
|
|
60
|
+
export { FormField };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
//#region src/molecules/form/form-success-message/form-success-message.d.ts
|
|
3
|
+
interface FormSuccessMessageProps {
|
|
4
|
+
message: string;
|
|
5
|
+
}
|
|
6
|
+
declare const FormSuccessMessage: FC<FormSuccessMessageProps>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { FormSuccessMessage, FormSuccessMessageProps };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { BiCheckCircle } from "react-icons/bi";
|
|
3
|
+
//#region src/molecules/form/form-success-message/form-success-message.tsx
|
|
4
|
+
const FormSuccessMessage = ({ message }) => /* @__PURE__ */ jsx("div", {
|
|
5
|
+
className: "glow-container rounded-lg border border-accent-color bg-accent-color/10 p-6",
|
|
6
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
7
|
+
className: "flex items-center gap-4",
|
|
8
|
+
children: [/* @__PURE__ */ jsx(BiCheckCircle, {
|
|
9
|
+
size: 38,
|
|
10
|
+
className: "text-accent mt-1 shrink-0"
|
|
11
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
12
|
+
className: "flex flex-col gap-2",
|
|
13
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
14
|
+
className: "text-accent text-lg font-bold leading-relaxed",
|
|
15
|
+
children: message
|
|
16
|
+
})
|
|
17
|
+
})]
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
export { FormSuccessMessage };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC, ReactElement, TextareaHTMLAttributes } from "react";
|
|
2
|
+
//#region src/molecules/form/form-textarea/form-textarea.d.ts
|
|
3
|
+
interface FormTextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "className"> {
|
|
4
|
+
label: string;
|
|
5
|
+
icon: ReactElement;
|
|
6
|
+
hasError?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const FormTextarea: FC<FormTextareaProps>;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { FormTextarea, FormTextareaProps };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Label } from "../../../atoms/typography/label/label.mjs";
|
|
3
|
+
import { Textarea } from "../../../atoms/typography/textarea/textarea.mjs";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/molecules/form/form-textarea/form-textarea.tsx
|
|
7
|
+
const FormTextarea = (t0) => {
|
|
8
|
+
const $ = c(15);
|
|
9
|
+
let icon;
|
|
10
|
+
let label;
|
|
11
|
+
let t1;
|
|
12
|
+
let textareaProps;
|
|
13
|
+
if ($[0] !== t0) {
|
|
14
|
+
({label, icon, hasError: t1, ...textareaProps} = t0);
|
|
15
|
+
$[0] = t0;
|
|
16
|
+
$[1] = icon;
|
|
17
|
+
$[2] = label;
|
|
18
|
+
$[3] = t1;
|
|
19
|
+
$[4] = textareaProps;
|
|
20
|
+
} else {
|
|
21
|
+
icon = $[1];
|
|
22
|
+
label = $[2];
|
|
23
|
+
t1 = $[3];
|
|
24
|
+
textareaProps = $[4];
|
|
25
|
+
}
|
|
26
|
+
const hasError = t1 === void 0 ? false : t1;
|
|
27
|
+
let t2;
|
|
28
|
+
if ($[5] !== icon || $[6] !== label || $[7] !== textareaProps.id) {
|
|
29
|
+
t2 = /* @__PURE__ */ jsx(Label, {
|
|
30
|
+
id: textareaProps.id,
|
|
31
|
+
value: label,
|
|
32
|
+
icon
|
|
33
|
+
});
|
|
34
|
+
$[5] = icon;
|
|
35
|
+
$[6] = label;
|
|
36
|
+
$[7] = textareaProps.id;
|
|
37
|
+
$[8] = t2;
|
|
38
|
+
} else t2 = $[8];
|
|
39
|
+
const t3 = `w-full px-4 py-3 ${hasError ? "border-red-500 focus:border-red-500" : ""}`;
|
|
40
|
+
let t4;
|
|
41
|
+
if ($[9] !== t3 || $[10] !== textareaProps) {
|
|
42
|
+
t4 = /* @__PURE__ */ jsx(Textarea, {
|
|
43
|
+
...textareaProps,
|
|
44
|
+
className: t3
|
|
45
|
+
});
|
|
46
|
+
$[9] = t3;
|
|
47
|
+
$[10] = textareaProps;
|
|
48
|
+
$[11] = t4;
|
|
49
|
+
} else t4 = $[11];
|
|
50
|
+
let t5;
|
|
51
|
+
if ($[12] !== t2 || $[13] !== t4) {
|
|
52
|
+
t5 = /* @__PURE__ */ jsxs("div", { children: [t2, t4] });
|
|
53
|
+
$[12] = t2;
|
|
54
|
+
$[13] = t4;
|
|
55
|
+
$[14] = t5;
|
|
56
|
+
} else t5 = $[14];
|
|
57
|
+
return t5;
|
|
58
|
+
};
|
|
59
|
+
//#endregion
|
|
60
|
+
export { FormTextarea };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, FC } from "react";
|
|
2
|
+
//#region src/molecules/lightbox-image/lightbox-image.d.ts
|
|
3
|
+
type LightboxImageProps = ComponentPropsWithoutRef<"img">;
|
|
4
|
+
declare const LightboxImage: FC<LightboxImageProps>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { LightboxImage };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useLightboxImageStore } from "./use-lightbox-image-store.mjs";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/molecules/lightbox-image/lightbox-image.tsx
|
|
6
|
+
const LightboxImage = (t0) => {
|
|
7
|
+
const $ = c(9);
|
|
8
|
+
let alt;
|
|
9
|
+
let props;
|
|
10
|
+
if ($[0] !== t0) {
|
|
11
|
+
({alt, ...props} = t0);
|
|
12
|
+
$[0] = t0;
|
|
13
|
+
$[1] = alt;
|
|
14
|
+
$[2] = props;
|
|
15
|
+
} else {
|
|
16
|
+
alt = $[1];
|
|
17
|
+
props = $[2];
|
|
18
|
+
}
|
|
19
|
+
const { effects } = useLightboxImageStore(typeof props.src === "string" ? props.src : "", alt ?? "");
|
|
20
|
+
const { handleOpen } = effects;
|
|
21
|
+
const t1 = alt ?? "";
|
|
22
|
+
let t2;
|
|
23
|
+
if ($[3] !== props || $[4] !== t1) {
|
|
24
|
+
t2 = /* @__PURE__ */ jsx("img", {
|
|
25
|
+
loading: "lazy",
|
|
26
|
+
decoding: "async",
|
|
27
|
+
alt: t1,
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
30
|
+
$[3] = props;
|
|
31
|
+
$[4] = t1;
|
|
32
|
+
$[5] = t2;
|
|
33
|
+
} else t2 = $[5];
|
|
34
|
+
let t3;
|
|
35
|
+
if ($[6] !== handleOpen || $[7] !== t2) {
|
|
36
|
+
t3 = /* @__PURE__ */ jsx("button", {
|
|
37
|
+
type: "button",
|
|
38
|
+
onClick: handleOpen,
|
|
39
|
+
className: "block w-full cursor-zoom-in border-0 bg-transparent p-0",
|
|
40
|
+
children: t2
|
|
41
|
+
});
|
|
42
|
+
$[6] = handleOpen;
|
|
43
|
+
$[7] = t2;
|
|
44
|
+
$[8] = t3;
|
|
45
|
+
} else t3 = $[8];
|
|
46
|
+
return t3;
|
|
47
|
+
};
|
|
48
|
+
//#endregion
|
|
49
|
+
export { LightboxImage };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { openLightbox } from "../../state/lightbox/lightbox-events.mjs";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
//#region src/molecules/lightbox-image/use-lightbox-image-store.ts
|
|
5
|
+
const useLightboxImageStore = (src, alt) => {
|
|
6
|
+
const $ = c(5);
|
|
7
|
+
let t0;
|
|
8
|
+
if ($[0] !== alt || $[1] !== src) {
|
|
9
|
+
t0 = () => {
|
|
10
|
+
openLightbox({
|
|
11
|
+
src,
|
|
12
|
+
alt
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
$[0] = alt;
|
|
16
|
+
$[1] = src;
|
|
17
|
+
$[2] = t0;
|
|
18
|
+
} else t0 = $[2];
|
|
19
|
+
const handleOpen = t0;
|
|
20
|
+
let t1;
|
|
21
|
+
if ($[3] !== handleOpen) {
|
|
22
|
+
t1 = { effects: { handleOpen } };
|
|
23
|
+
$[3] = handleOpen;
|
|
24
|
+
$[4] = t1;
|
|
25
|
+
} else t1 = $[4];
|
|
26
|
+
return t1;
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { useLightboxImageStore };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LinkComponent } from "../../../atoms/links/anchor-link/anchor-link.mjs";
|
|
2
|
+
import "../../../atoms/links/anchor-link/index.mjs";
|
|
3
|
+
import { FC, PropsWithChildren } from "react";
|
|
4
|
+
//#region src/molecules/links/pills-links/pills-links.d.ts
|
|
5
|
+
type PillProps = PropsWithChildren<{
|
|
6
|
+
to: string;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
linkComponent?: LinkComponent;
|
|
9
|
+
}>;
|
|
10
|
+
declare const RedPillLink: FC<PillProps>;
|
|
11
|
+
declare const BluePillLink: FC<PillProps>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { BluePillLink, PillProps, RedPillLink };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { BluePill, RedPill } from "../../../atoms/effects/pills/pills.mjs";
|
|
3
|
+
import { InternalLink } from "../../../atoms/links/internal-link/internal-link.mjs";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/molecules/links/pills-links/pills-links.tsx
|
|
7
|
+
const RedPillLink = (t0) => {
|
|
8
|
+
const $ = c(7);
|
|
9
|
+
const { children, to, onClick, linkComponent } = t0;
|
|
10
|
+
let t1;
|
|
11
|
+
if ($[0] !== children) {
|
|
12
|
+
t1 = /* @__PURE__ */ jsx(RedPill, { children });
|
|
13
|
+
$[0] = children;
|
|
14
|
+
$[1] = t1;
|
|
15
|
+
} else t1 = $[1];
|
|
16
|
+
let t2;
|
|
17
|
+
if ($[2] !== linkComponent || $[3] !== onClick || $[4] !== t1 || $[5] !== to) {
|
|
18
|
+
t2 = /* @__PURE__ */ jsx(InternalLink, {
|
|
19
|
+
linkComponent,
|
|
20
|
+
className: "no-underline",
|
|
21
|
+
to,
|
|
22
|
+
onClick,
|
|
23
|
+
children: t1
|
|
24
|
+
});
|
|
25
|
+
$[2] = linkComponent;
|
|
26
|
+
$[3] = onClick;
|
|
27
|
+
$[4] = t1;
|
|
28
|
+
$[5] = to;
|
|
29
|
+
$[6] = t2;
|
|
30
|
+
} else t2 = $[6];
|
|
31
|
+
return t2;
|
|
32
|
+
};
|
|
33
|
+
const BluePillLink = (t0) => {
|
|
34
|
+
const $ = c(7);
|
|
35
|
+
const { children, to, onClick, linkComponent } = t0;
|
|
36
|
+
let t1;
|
|
37
|
+
if ($[0] !== children) {
|
|
38
|
+
t1 = /* @__PURE__ */ jsx(BluePill, { children });
|
|
39
|
+
$[0] = children;
|
|
40
|
+
$[1] = t1;
|
|
41
|
+
} else t1 = $[1];
|
|
42
|
+
let t2;
|
|
43
|
+
if ($[2] !== linkComponent || $[3] !== onClick || $[4] !== t1 || $[5] !== to) {
|
|
44
|
+
t2 = /* @__PURE__ */ jsx(InternalLink, {
|
|
45
|
+
linkComponent,
|
|
46
|
+
className: "no-underline",
|
|
47
|
+
to,
|
|
48
|
+
onClick,
|
|
49
|
+
children: t1
|
|
50
|
+
});
|
|
51
|
+
$[2] = linkComponent;
|
|
52
|
+
$[3] = onClick;
|
|
53
|
+
$[4] = t1;
|
|
54
|
+
$[5] = to;
|
|
55
|
+
$[6] = t2;
|
|
56
|
+
} else t2 = $[6];
|
|
57
|
+
return t2;
|
|
58
|
+
};
|
|
59
|
+
//#endregion
|
|
60
|
+
export { BluePillLink, RedPillLink };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { BiX } from "react-icons/bi";
|
|
3
|
+
//#region src/molecules/menu/close/close.tsx
|
|
4
|
+
const Close = ({ onClick }) => /* @__PURE__ */ jsx(BiX, {
|
|
5
|
+
className: "size-9 text-primary-text",
|
|
6
|
+
onClick
|
|
7
|
+
});
|
|
8
|
+
//#endregion
|
|
9
|
+
export { Close };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { LinkComponent } from "../../../atoms/links/anchor-link/anchor-link.mjs";
|
|
2
|
+
import "../../../atoms/links/anchor-link/index.mjs";
|
|
3
|
+
import { FC } from "react";
|
|
4
|
+
//#region src/molecules/menu/dropdown-menu/dropdown-menu.d.ts
|
|
5
|
+
interface DropdownMenuItem {
|
|
6
|
+
label: string;
|
|
7
|
+
to: string;
|
|
8
|
+
selected?: boolean;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
external?: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface DropdownMenuGroup {
|
|
13
|
+
label: string;
|
|
14
|
+
items: DropdownMenuItem[];
|
|
15
|
+
}
|
|
16
|
+
interface DropdownMenuProps {
|
|
17
|
+
linkComponent?: LinkComponent;
|
|
18
|
+
label: string;
|
|
19
|
+
items: DropdownMenuGroup[];
|
|
20
|
+
className?: string;
|
|
21
|
+
chevronClassName?: string;
|
|
22
|
+
}
|
|
23
|
+
declare const DropdownMenu: FC<DropdownMenuProps>;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { DropdownMenu, DropdownMenuProps };
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { MenuItem } from "../menu-item/menu-item.mjs";
|
|
3
|
+
import { useDropdownMenuStore } from "./use-dropdown-menu-store.mjs";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { AnimatePresence } from "framer-motion";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { BiChevronDown } from "react-icons/bi";
|
|
8
|
+
//#region src/molecules/menu/dropdown-menu/dropdown-menu.tsx
|
|
9
|
+
const DropdownMenu = (t0) => {
|
|
10
|
+
const $ = c(29);
|
|
11
|
+
const { label, items, className: t1, chevronClassName: t2, linkComponent } = t0;
|
|
12
|
+
const className = t1 === void 0 ? "" : t1;
|
|
13
|
+
const chevronClassName = t2 === void 0 ? "" : t2;
|
|
14
|
+
let t3;
|
|
15
|
+
if ($[0] !== items) {
|
|
16
|
+
t3 = items.flatMap(_temp).some(_temp2);
|
|
17
|
+
$[0] = items;
|
|
18
|
+
$[1] = t3;
|
|
19
|
+
} else t3 = $[1];
|
|
20
|
+
const { state, effects } = useDropdownMenuStore(t3);
|
|
21
|
+
const { open, selected, shouldReduceMotions, buttonRef, panelId } = state;
|
|
22
|
+
const { toggleOpen, handleBlur, handleKeyDown, getGroupId } = effects;
|
|
23
|
+
const t4 = `${className} xs:pl-4 xs:pr-1 xs:py-1 hover:bg-accent-alpha-10 hover:text-accent hover:border-accent relative flex flex-nowrap items-center justify-center gap-2 rounded-xl border border-solid px-1 py-2 text-center text-sm leading-normal text-shadow-md md:text-base ${open || selected ? "border-accent bg-accent-alpha-15 text-accent" : "border-transparent"}`;
|
|
24
|
+
const t5 = open ? panelId : void 0;
|
|
25
|
+
let t6;
|
|
26
|
+
if ($[2] !== label) {
|
|
27
|
+
t6 = /* @__PURE__ */ jsx("span", { children: label });
|
|
28
|
+
$[2] = label;
|
|
29
|
+
$[3] = t6;
|
|
30
|
+
} else t6 = $[3];
|
|
31
|
+
const t7 = `text-matrix-green transition-transform duration-200 ${chevronClassName} ${open ? "rotate-180" : "rotate-0"}`;
|
|
32
|
+
let t8;
|
|
33
|
+
if ($[4] !== t7) {
|
|
34
|
+
t8 = /* @__PURE__ */ jsx(BiChevronDown, {
|
|
35
|
+
className: t7,
|
|
36
|
+
size: 20
|
|
37
|
+
});
|
|
38
|
+
$[4] = t7;
|
|
39
|
+
$[5] = t8;
|
|
40
|
+
} else t8 = $[5];
|
|
41
|
+
let t9;
|
|
42
|
+
if ($[6] !== buttonRef || $[7] !== open || $[8] !== t4 || $[9] !== t5 || $[10] !== t6 || $[11] !== t8 || $[12] !== toggleOpen) {
|
|
43
|
+
t9 = /* @__PURE__ */ jsxs("button", {
|
|
44
|
+
ref: buttonRef,
|
|
45
|
+
className: t4,
|
|
46
|
+
"aria-expanded": open,
|
|
47
|
+
"aria-controls": t5,
|
|
48
|
+
onClick: toggleOpen,
|
|
49
|
+
type: "button",
|
|
50
|
+
children: [t6, t8]
|
|
51
|
+
});
|
|
52
|
+
$[6] = buttonRef;
|
|
53
|
+
$[7] = open;
|
|
54
|
+
$[8] = t4;
|
|
55
|
+
$[9] = t5;
|
|
56
|
+
$[10] = t6;
|
|
57
|
+
$[11] = t8;
|
|
58
|
+
$[12] = toggleOpen;
|
|
59
|
+
$[13] = t9;
|
|
60
|
+
} else t9 = $[13];
|
|
61
|
+
let t10;
|
|
62
|
+
if ($[14] !== getGroupId || $[15] !== items || $[16] !== label || $[17] !== linkComponent || $[18] !== open || $[19] !== panelId || $[20] !== shouldReduceMotions) {
|
|
63
|
+
t10 = open && /* @__PURE__ */ jsx("ul", {
|
|
64
|
+
id: panelId,
|
|
65
|
+
"aria-label": label,
|
|
66
|
+
role: "list",
|
|
67
|
+
className: `glow-container ${shouldReduceMotions ? "xs:bg-general-background" : "xs:bg-general-background/90"} relative mt-2 min-w-max list-none m-0 p-0 rounded-xl py-2 xs:absolute xs:right-0 xs:left-0 xs:w-60`,
|
|
68
|
+
tabIndex: -1,
|
|
69
|
+
children: items.map((group_0, idx) => {
|
|
70
|
+
const groupId = getGroupId(idx);
|
|
71
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
72
|
+
className: "mb-0 pl-0 before:content-none",
|
|
73
|
+
children: [
|
|
74
|
+
idx > 0 && /* @__PURE__ */ jsx("div", {
|
|
75
|
+
"aria-hidden": "true",
|
|
76
|
+
className: "border-secondary-text/30 mx-3 border-t"
|
|
77
|
+
}),
|
|
78
|
+
/* @__PURE__ */ jsx("span", {
|
|
79
|
+
id: groupId,
|
|
80
|
+
className: "text-secondary-text block px-4 pt-3 pb-1 text-sm font-bold uppercase tracking-wider cursor-default select-none",
|
|
81
|
+
children: group_0.label
|
|
82
|
+
}),
|
|
83
|
+
/* @__PURE__ */ jsx("ul", {
|
|
84
|
+
"aria-labelledby": groupId,
|
|
85
|
+
role: "list",
|
|
86
|
+
className: "list-none m-0 p-0",
|
|
87
|
+
children: group_0.items.map((item_0, itemIdx) => /* @__PURE__ */ jsx("li", {
|
|
88
|
+
className: "mb-0 pl-0 before:content-none",
|
|
89
|
+
children: /* @__PURE__ */ jsx(MenuItem, {
|
|
90
|
+
linkComponent,
|
|
91
|
+
to: item_0.to,
|
|
92
|
+
selected: item_0.selected ?? false,
|
|
93
|
+
className: "xs:whitespace-nowrap m-2 text-center",
|
|
94
|
+
onClick: item_0.onClick,
|
|
95
|
+
external: item_0.external,
|
|
96
|
+
children: item_0.label
|
|
97
|
+
})
|
|
98
|
+
}, item_0.label + itemIdx))
|
|
99
|
+
})
|
|
100
|
+
]
|
|
101
|
+
}, group_0.label + idx);
|
|
102
|
+
})
|
|
103
|
+
}, "dropdown-menu");
|
|
104
|
+
$[14] = getGroupId;
|
|
105
|
+
$[15] = items;
|
|
106
|
+
$[16] = label;
|
|
107
|
+
$[17] = linkComponent;
|
|
108
|
+
$[18] = open;
|
|
109
|
+
$[19] = panelId;
|
|
110
|
+
$[20] = shouldReduceMotions;
|
|
111
|
+
$[21] = t10;
|
|
112
|
+
} else t10 = $[21];
|
|
113
|
+
let t11;
|
|
114
|
+
if ($[22] !== t10) {
|
|
115
|
+
t11 = /* @__PURE__ */ jsx(AnimatePresence, { children: t10 });
|
|
116
|
+
$[22] = t10;
|
|
117
|
+
$[23] = t11;
|
|
118
|
+
} else t11 = $[23];
|
|
119
|
+
let t12;
|
|
120
|
+
if ($[24] !== handleBlur || $[25] !== handleKeyDown || $[26] !== t11 || $[27] !== t9) {
|
|
121
|
+
t12 = /* @__PURE__ */ jsxs("div", {
|
|
122
|
+
className: "relative z-50 mb-0",
|
|
123
|
+
tabIndex: -1,
|
|
124
|
+
onBlur: handleBlur,
|
|
125
|
+
onKeyDown: handleKeyDown,
|
|
126
|
+
children: [t9, t11]
|
|
127
|
+
});
|
|
128
|
+
$[24] = handleBlur;
|
|
129
|
+
$[25] = handleKeyDown;
|
|
130
|
+
$[26] = t11;
|
|
131
|
+
$[27] = t9;
|
|
132
|
+
$[28] = t12;
|
|
133
|
+
} else t12 = $[28];
|
|
134
|
+
return t12;
|
|
135
|
+
};
|
|
136
|
+
function _temp(group) {
|
|
137
|
+
return group.items;
|
|
138
|
+
}
|
|
139
|
+
function _temp2(item) {
|
|
140
|
+
return item.selected;
|
|
141
|
+
}
|
|
142
|
+
//#endregion
|
|
143
|
+
export { DropdownMenu };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useReducedMotions } from "../../../hooks/use-reduced-motions.mjs";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { useEffect, useId, useRef, useState } from "react";
|
|
5
|
+
//#region src/molecules/menu/dropdown-menu/use-dropdown-menu-store.ts
|
|
6
|
+
const useDropdownMenuStore = (hasSelected) => {
|
|
7
|
+
const $ = c(20);
|
|
8
|
+
const shouldReduceMotions = useReducedMotions();
|
|
9
|
+
const [open, setOpen] = useState(false);
|
|
10
|
+
const buttonRef = useRef(null);
|
|
11
|
+
const id = useId();
|
|
12
|
+
const panelId = `${id}-panel`;
|
|
13
|
+
let t0;
|
|
14
|
+
let t1;
|
|
15
|
+
if ($[0] !== open) {
|
|
16
|
+
t0 = () => {
|
|
17
|
+
if (!open) return;
|
|
18
|
+
const handleScroll = () => setOpen(false);
|
|
19
|
+
window.addEventListener("scroll", handleScroll, { passive: true });
|
|
20
|
+
return () => window.removeEventListener("scroll", handleScroll);
|
|
21
|
+
};
|
|
22
|
+
t1 = [open];
|
|
23
|
+
$[0] = open;
|
|
24
|
+
$[1] = t0;
|
|
25
|
+
$[2] = t1;
|
|
26
|
+
} else {
|
|
27
|
+
t0 = $[1];
|
|
28
|
+
t1 = $[2];
|
|
29
|
+
}
|
|
30
|
+
useEffect(t0, t1);
|
|
31
|
+
let t2;
|
|
32
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
33
|
+
t2 = () => setOpen(_temp);
|
|
34
|
+
$[3] = t2;
|
|
35
|
+
} else t2 = $[3];
|
|
36
|
+
const toggleOpen = t2;
|
|
37
|
+
let t3;
|
|
38
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
39
|
+
t3 = (e) => {
|
|
40
|
+
if (!e.currentTarget.contains(e.relatedTarget)) setOpen(false);
|
|
41
|
+
};
|
|
42
|
+
$[4] = t3;
|
|
43
|
+
} else t3 = $[4];
|
|
44
|
+
const handleBlur = t3;
|
|
45
|
+
let t4;
|
|
46
|
+
if ($[5] !== open) {
|
|
47
|
+
t4 = (e_0) => {
|
|
48
|
+
if (!open) return;
|
|
49
|
+
if (e_0.key === "Escape") {
|
|
50
|
+
setOpen(false);
|
|
51
|
+
buttonRef.current?.focus();
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
$[5] = open;
|
|
55
|
+
$[6] = t4;
|
|
56
|
+
} else t4 = $[6];
|
|
57
|
+
const handleKeyDown = t4;
|
|
58
|
+
let t5;
|
|
59
|
+
if ($[7] !== id) {
|
|
60
|
+
t5 = (index) => `${id}-group-${index}`;
|
|
61
|
+
$[7] = id;
|
|
62
|
+
$[8] = t5;
|
|
63
|
+
} else t5 = $[8];
|
|
64
|
+
const getGroupId = t5;
|
|
65
|
+
let t6;
|
|
66
|
+
if ($[9] !== hasSelected || $[10] !== open || $[11] !== panelId || $[12] !== shouldReduceMotions) {
|
|
67
|
+
t6 = {
|
|
68
|
+
open,
|
|
69
|
+
selected: hasSelected,
|
|
70
|
+
shouldReduceMotions,
|
|
71
|
+
buttonRef,
|
|
72
|
+
panelId
|
|
73
|
+
};
|
|
74
|
+
$[9] = hasSelected;
|
|
75
|
+
$[10] = open;
|
|
76
|
+
$[11] = panelId;
|
|
77
|
+
$[12] = shouldReduceMotions;
|
|
78
|
+
$[13] = t6;
|
|
79
|
+
} else t6 = $[13];
|
|
80
|
+
let t7;
|
|
81
|
+
if ($[14] !== getGroupId || $[15] !== handleKeyDown) {
|
|
82
|
+
t7 = {
|
|
83
|
+
toggleOpen,
|
|
84
|
+
handleBlur,
|
|
85
|
+
handleKeyDown,
|
|
86
|
+
getGroupId
|
|
87
|
+
};
|
|
88
|
+
$[14] = getGroupId;
|
|
89
|
+
$[15] = handleKeyDown;
|
|
90
|
+
$[16] = t7;
|
|
91
|
+
} else t7 = $[16];
|
|
92
|
+
let t8;
|
|
93
|
+
if ($[17] !== t6 || $[18] !== t7) {
|
|
94
|
+
t8 = {
|
|
95
|
+
state: t6,
|
|
96
|
+
effects: t7
|
|
97
|
+
};
|
|
98
|
+
$[17] = t6;
|
|
99
|
+
$[18] = t7;
|
|
100
|
+
$[19] = t8;
|
|
101
|
+
} else t8 = $[19];
|
|
102
|
+
return t8;
|
|
103
|
+
};
|
|
104
|
+
function _temp(v) {
|
|
105
|
+
return !v;
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
export { useDropdownMenuStore };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { BiMenu } from "react-icons/bi";
|
|
3
|
+
//#region src/molecules/menu/hamburger-menu/hamburger-menu.tsx
|
|
4
|
+
const HamburgerMenu = ({ onClick }) => /* @__PURE__ */ jsx(BiMenu, {
|
|
5
|
+
className: "size-9",
|
|
6
|
+
onClick
|
|
7
|
+
});
|
|
8
|
+
//#endregion
|
|
9
|
+
export { HamburgerMenu };
|