@pathscale/ui 0.1.0 → 1.2.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 +1 -0
- package/README.md +49 -2
- package/dist/components/accordion/Accordion.d.ts +26 -0
- package/dist/components/accordion/Accordion.js +180 -0
- package/dist/components/accordion/collapse.css +248 -0
- package/dist/components/accordion/index.d.ts +1 -0
- package/dist/components/accordion/index.js +3 -0
- package/dist/components/alert/Alert.css +116 -0
- package/dist/components/alert/Alert.d.ts +34 -0
- package/dist/components/alert/Alert.js +195 -0
- package/dist/components/alert/index.d.ts +1 -0
- package/dist/components/alert/index.js +8 -0
- package/dist/components/artboard/Artboard.d.ts +9 -0
- package/dist/components/artboard/Artboard.js +42 -0
- package/dist/components/artboard/index.d.ts +1 -0
- package/dist/components/artboard/index.js +3 -0
- package/dist/components/avatar/Avatar.css +124 -0
- package/dist/components/avatar/Avatar.d.ts +27 -0
- package/dist/components/avatar/Avatar.js +159 -0
- package/dist/components/avatar/AvatarGroup.d.ts +15 -0
- package/dist/components/avatar/AvatarGroup.js +52 -0
- package/dist/components/avatar/index.d.ts +1 -8
- package/dist/components/avatar/index.js +6 -1
- package/dist/components/background/Background.d.ts +5 -0
- package/dist/components/background/Background.js +22 -0
- package/dist/components/background/index.d.ts +1 -0
- package/dist/components/background/index.js +3 -0
- package/dist/components/badge/Badge.css +164 -0
- package/dist/components/badge/Badge.d.ts +26 -0
- package/dist/components/badge/Badge.js +98 -0
- package/dist/components/badge/index.d.ts +9 -0
- package/dist/components/badge/index.js +11 -0
- package/dist/components/bottom-sheet/BottomSheet.d.ts +11 -0
- package/dist/components/bottom-sheet/BottomSheet.js +109 -0
- package/dist/components/bottom-sheet/index.d.ts +2 -0
- package/dist/components/bottom-sheet/index.js +3 -0
- package/dist/components/breadcrumbs/Breadcrumbs.css +63 -0
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +20 -0
- package/dist/components/breadcrumbs/Breadcrumbs.js +117 -0
- package/dist/components/breadcrumbs/index.d.ts +1 -0
- package/dist/components/breadcrumbs/index.js +5 -0
- package/dist/components/browsermockup/BrowserMockup.d.ts +10 -0
- package/dist/components/browsermockup/BrowserMockup.js +55 -0
- package/dist/components/browsermockup/index.d.ts +2 -0
- package/dist/components/browsermockup/index.js +3 -0
- package/dist/components/button/Button.css +184 -0
- package/dist/components/button/Button.d.ts +16 -0
- package/dist/components/button/Button.js +70 -0
- package/dist/components/button/index.d.ts +2 -9
- package/dist/components/button/index.js +3 -1
- package/dist/components/calendar/Calendar.d.ts +28 -0
- package/dist/components/calendar/Calendar.js +194 -0
- package/dist/components/calendar/index.d.ts +1 -0
- package/dist/components/calendar/index.js +3 -0
- package/dist/components/calendar/input.css +277 -0
- package/dist/components/card/Card.d.ts +29 -0
- package/dist/components/card/Card.js +98 -0
- package/dist/components/card/CardActions.d.ts +4 -0
- package/dist/components/card/CardActions.js +15 -0
- package/dist/components/card/CardBody.d.ts +4 -0
- package/dist/components/card/CardBody.js +15 -0
- package/dist/components/card/CardImage.d.ts +3 -0
- package/dist/components/card/CardImage.js +10 -0
- package/dist/components/card/CardTitle.d.ts +6 -0
- package/dist/components/card/CardTitle.js +13 -0
- package/dist/components/card/card.css +171 -0
- package/dist/components/card/index.d.ts +1 -0
- package/dist/components/card/index.js +3 -0
- package/dist/components/carousel/Carousel.d.ts +16 -0
- package/dist/components/carousel/Carousel.js +70 -0
- package/dist/components/carousel/CarouselItem.d.ts +6 -0
- package/dist/components/carousel/CarouselItem.js +27 -0
- package/dist/components/carousel/carousel.css +39 -0
- package/dist/components/carousel/index.d.ts +3 -0
- package/dist/components/carousel/index.js +3 -0
- package/dist/components/chatbubble/ChatBubble.d.ts +14 -0
- package/dist/components/chatbubble/ChatBubble.js +48 -0
- package/dist/components/chatbubble/ChatBubbleAvatar.d.ts +10 -0
- package/dist/components/chatbubble/ChatBubbleAvatar.js +42 -0
- package/dist/components/chatbubble/ChatBubbleFooter.d.ts +5 -0
- package/dist/components/chatbubble/ChatBubbleFooter.js +14 -0
- package/dist/components/chatbubble/ChatBubbleHeader.d.ts +5 -0
- package/dist/components/chatbubble/ChatBubbleHeader.js +14 -0
- package/dist/components/chatbubble/ChatBubbleMessage.d.ts +7 -0
- package/dist/components/chatbubble/ChatBubbleMessage.js +28 -0
- package/dist/components/chatbubble/ChatBubbleTime.d.ts +5 -0
- package/dist/components/chatbubble/ChatBubbleTime.js +14 -0
- package/dist/components/chatbubble/chat.css +153 -0
- package/dist/components/chatbubble/index.d.ts +1 -0
- package/dist/components/chatbubble/index.js +3 -0
- package/dist/components/checkbox/Checkbox.css +183 -0
- package/dist/components/checkbox/Checkbox.d.ts +16 -0
- package/dist/components/checkbox/Checkbox.js +139 -0
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/checkbox/index.js +3 -0
- package/dist/components/codemockup/CodeMockup.d.ts +5 -0
- package/dist/components/codemockup/CodeMockup.js +33 -0
- package/dist/components/codemockup/CodeMockupLine.d.ts +12 -0
- package/dist/components/codemockup/CodeMockupLine.js +53 -0
- package/dist/components/codemockup/index.d.ts +2 -0
- package/dist/components/codemockup/index.js +5 -0
- package/dist/components/collapse/Collapse.d.ts +21 -0
- package/dist/components/collapse/Collapse.js +104 -0
- package/dist/components/collapse/CollapseContent.d.ts +4 -0
- package/dist/components/collapse/CollapseContent.js +15 -0
- package/dist/components/collapse/CollapseDetails.d.ts +17 -0
- package/dist/components/collapse/CollapseDetails.js +33 -0
- package/dist/components/collapse/CollapseTitle.d.ts +9 -0
- package/dist/components/collapse/CollapseTitle.js +47 -0
- package/dist/components/collapse/collapse.css +248 -0
- package/dist/components/collapse/index.d.ts +4 -0
- package/dist/components/collapse/index.js +10 -0
- package/dist/components/colorpicker/AlphaSlider.d.ts +7 -0
- package/dist/components/colorpicker/AlphaSlider.js +107 -0
- package/dist/components/colorpicker/ColorInput.d.ts +7 -0
- package/dist/components/colorpicker/ColorInput.js +88 -0
- package/dist/components/colorpicker/ColorPicker.d.ts +18 -0
- package/dist/components/colorpicker/ColorPicker.js +264 -0
- package/dist/components/colorpicker/ColorPickerFlowerSelector.d.ts +3 -0
- package/dist/components/colorpicker/ColorPickerFlowerSelector.js +9 -0
- package/dist/components/colorpicker/ColorPickerGradientSelector.d.ts +3 -0
- package/dist/components/colorpicker/ColorPickerGradientSelector.js +9 -0
- package/dist/components/colorpicker/ColorPickerWheelSelector.d.ts +3 -0
- package/dist/components/colorpicker/ColorPickerWheelSelector.js +9 -0
- package/dist/components/colorpicker/ColorPreview.d.ts +11 -0
- package/dist/components/colorpicker/ColorPreview.js +47 -0
- package/dist/components/colorpicker/ColorSwatches.d.ts +8 -0
- package/dist/components/colorpicker/ColorSwatches.js +67 -0
- package/dist/components/colorpicker/ColorUtils.d.ts +58 -0
- package/dist/components/colorpicker/ColorUtils.js +216 -0
- package/dist/components/colorpicker/ColorWheel.d.ts +7 -0
- package/dist/components/colorpicker/ColorWheel.js +106 -0
- package/dist/components/colorpicker/ColorWheelFlower.d.ts +7 -0
- package/dist/components/colorpicker/ColorWheelFlower.js +462 -0
- package/dist/components/colorpicker/HueSlider.d.ts +7 -0
- package/dist/components/colorpicker/HueSlider.js +105 -0
- package/dist/components/colorpicker/LightnessSlider.d.ts +7 -0
- package/dist/components/colorpicker/LightnessSlider.js +111 -0
- package/dist/components/colorpicker/SaturationBrightness.d.ts +7 -0
- package/dist/components/colorpicker/SaturationBrightness.js +120 -0
- package/dist/components/colorpicker/colorpickerContext.d.ts +11 -0
- package/dist/components/colorpicker/colorpickerContext.js +8 -0
- package/dist/components/colorpicker/index.d.ts +26 -0
- package/dist/components/colorpicker/index.js +31 -0
- package/dist/components/confirm-dialog/ConfirmDialog.d.ts +15 -0
- package/dist/components/confirm-dialog/ConfirmDialog.js +102 -0
- package/dist/components/confirm-dialog/index.d.ts +2 -0
- package/dist/components/confirm-dialog/index.js +3 -0
- package/dist/components/connectionstatus/ConnectionStatus.d.ts +59 -0
- package/dist/components/connectionstatus/ConnectionStatus.js +197 -0
- package/dist/components/connectionstatus/index.d.ts +2 -0
- package/dist/components/connectionstatus/index.js +3 -0
- package/dist/components/copy-button/CopyButton.d.ts +11 -0
- package/dist/components/copy-button/CopyButton.js +70 -0
- package/dist/components/copy-button/index.d.ts +2 -0
- package/dist/components/copy-button/index.js +3 -0
- package/dist/components/countdown/Countdown.d.ts +8 -0
- package/dist/components/countdown/Countdown.js +37 -0
- package/dist/components/countdown/countdown.css +58 -0
- package/dist/components/countdown/index.d.ts +1 -0
- package/dist/components/countdown/index.js +3 -0
- package/dist/components/diff/Diff.d.ts +8 -0
- package/dist/components/diff/Diff.js +29 -0
- package/dist/components/diff/diff.css +162 -0
- package/dist/components/diff/index.d.ts +1 -0
- package/dist/components/diff/index.js +3 -0
- package/dist/components/divider/Divider.d.ts +21 -0
- package/dist/components/divider/Divider.js +41 -0
- package/dist/components/divider/Divider.styles.d.ts +25 -0
- package/dist/components/divider/Divider.styles.js +71 -0
- package/dist/components/divider/index.d.ts +3 -0
- package/dist/components/divider/index.js +3 -0
- package/dist/components/dock/Dock.d.ts +15 -0
- package/dist/components/dock/Dock.js +40 -0
- package/dist/components/dock/DockItem.d.ts +9 -0
- package/dist/components/dock/DockItem.js +45 -0
- package/dist/components/dock/DockLabel.d.ts +6 -0
- package/dist/components/dock/DockLabel.js +22 -0
- package/dist/components/dock/dock.css +147 -0
- package/dist/components/dock/index.d.ts +3 -0
- package/dist/components/dock/index.js +3 -0
- package/dist/components/drawer/Drawer.css +305 -0
- package/dist/components/drawer/Drawer.d.ts +73 -0
- package/dist/components/drawer/Drawer.js +470 -0
- package/dist/components/drawer/index.d.ts +1 -0
- package/dist/components/drawer/index.js +15 -0
- package/dist/components/dropdown/Dropdown.css +184 -0
- package/dist/components/dropdown/Dropdown.d.ts +38 -0
- package/dist/components/dropdown/Dropdown.js +488 -0
- package/dist/components/dropdown/index.d.ts +2 -0
- package/dist/components/dropdown/index.js +4 -0
- package/dist/components/dropdown-select/DropdownSelect.d.ts +22 -0
- package/dist/components/dropdown-select/DropdownSelect.js +296 -0
- package/dist/components/dropdown-select/index.d.ts +2 -0
- package/dist/components/dropdown-select/index.js +3 -0
- package/dist/components/empty-state/EmptyState.css +39 -0
- package/dist/components/empty-state/EmptyState.d.ts +32 -0
- package/dist/components/empty-state/EmptyState.js +146 -0
- package/dist/components/empty-state/index.d.ts +3 -0
- package/dist/components/empty-state/index.js +8 -0
- package/dist/components/fieldset/Fieldset.d.ts +11 -0
- package/dist/components/fieldset/Fieldset.js +73 -0
- package/dist/components/fieldset/index.d.ts +2 -0
- package/dist/components/fieldset/index.js +3 -0
- package/dist/components/fileinput/FileInput.d.ts +15 -0
- package/dist/components/fileinput/FileInput.js +51 -0
- package/dist/components/fileinput/index.d.ts +1 -0
- package/dist/components/fileinput/index.js +3 -0
- package/dist/components/fileinput/input.css +277 -0
- package/dist/components/flex/Flex.d.ts +18 -0
- package/dist/components/flex/Flex.js +101 -0
- package/dist/components/flex/index.d.ts +1 -0
- package/dist/components/flex/index.js +3 -0
- package/dist/components/floating-dock/FloatingDock.css +179 -0
- package/dist/components/floating-dock/FloatingDock.d.ts +39 -0
- package/dist/components/floating-dock/FloatingDock.js +615 -0
- package/dist/components/floating-dock/index.d.ts +2 -0
- package/dist/components/floating-dock/index.js +3 -0
- package/dist/components/footer/Footer.d.ts +12 -0
- package/dist/components/footer/Footer.js +41 -0
- package/dist/components/footer/FooterTitle.d.ts +4 -0
- package/dist/components/footer/FooterTitle.js +27 -0
- package/dist/components/footer/footer.css +51 -0
- package/dist/components/footer/index.d.ts +3 -0
- package/dist/components/footer/index.js +3 -0
- package/dist/components/form/Form.d.ts +17 -0
- package/dist/components/form/Form.js +17 -0
- package/dist/components/form/FormBase.d.ts +8 -0
- package/dist/components/form/FormBase.js +74 -0
- package/dist/components/form/FormDropdown.d.ts +25 -0
- package/dist/components/form/FormDropdown.js +139 -0
- package/dist/components/form/FormField.d.ts +14 -0
- package/dist/components/form/FormField.js +78 -0
- package/dist/components/form/Label.d.ts +7 -0
- package/dist/components/form/Label.js +31 -0
- package/dist/components/form/NumberField.d.ts +20 -0
- package/dist/components/form/NumberField.js +109 -0
- package/dist/components/form/PasswordField.d.ts +16 -0
- package/dist/components/form/PasswordField.js +113 -0
- package/dist/components/form/ValidatedForm.d.ts +26 -0
- package/dist/components/form/ValidatedForm.js +55 -0
- package/dist/components/form/index.d.ts +4 -0
- package/dist/components/form/index.js +6 -0
- package/dist/components/form-actions/FormActions.d.ts +14 -0
- package/dist/components/form-actions/FormActions.js +142 -0
- package/dist/components/form-actions/index.d.ts +2 -0
- package/dist/components/form-actions/index.js +3 -0
- package/dist/components/glass-panel/GlassPanel.d.ts +20 -0
- package/dist/components/glass-panel/GlassPanel.js +146 -0
- package/dist/components/glass-panel/index.d.ts +1 -0
- package/dist/components/glass-panel/index.js +3 -0
- package/dist/components/glow-card/GlowCard.css +65 -0
- package/dist/components/glow-card/GlowCard.d.ts +5 -0
- package/dist/components/glow-card/GlowCard.js +47 -0
- package/dist/components/glow-card/index.d.ts +2 -0
- package/dist/components/glow-card/index.js +3 -0
- package/dist/components/grid/Grid.d.ts +18 -0
- package/dist/components/grid/Grid.js +89 -0
- package/dist/components/grid/index.d.ts +1 -0
- package/dist/components/grid/index.js +3 -0
- package/dist/components/hero/Hero.d.ts +11 -0
- package/dist/components/hero/Hero.js +47 -0
- package/dist/components/hero/HeroContent.d.ts +6 -0
- package/dist/components/hero/HeroContent.js +31 -0
- package/dist/components/hero/HeroOverlay.d.ts +6 -0
- package/dist/components/hero/HeroOverlay.js +39 -0
- package/dist/components/hero/hero.css +38 -0
- package/dist/components/hero/index.d.ts +4 -0
- package/dist/components/hero/index.js +3 -0
- package/dist/components/icon/Icon.d.ts +11 -0
- package/dist/components/icon/Icon.js +38 -0
- package/dist/components/icon/index.d.ts +1 -0
- package/dist/components/icon/index.js +3 -0
- package/dist/components/immersive-landing/ImmersiveLanding.d.ts +8 -0
- package/dist/components/immersive-landing/ImmersiveLanding.js +218 -0
- package/dist/components/immersive-landing/ImmersiveLandingArrows.d.ts +4 -0
- package/dist/components/immersive-landing/ImmersiveLandingArrows.js +60 -0
- package/dist/components/immersive-landing/ImmersiveLandingContext.d.ts +3 -0
- package/dist/components/immersive-landing/ImmersiveLandingContext.js +8 -0
- package/dist/components/immersive-landing/ImmersiveLandingNavigation.d.ts +4 -0
- package/dist/components/immersive-landing/ImmersiveLandingNavigation.js +91 -0
- package/dist/components/immersive-landing/ImmersiveLandingPage.d.ts +4 -0
- package/dist/components/immersive-landing/ImmersiveLandingPage.js +46 -0
- package/dist/components/immersive-landing/components/CookieConsent.d.ts +3 -0
- package/dist/components/immersive-landing/components/CookieConsent.js +256 -0
- package/dist/components/immersive-landing/components/FirefoxPWABanner.d.ts +9 -0
- package/dist/components/immersive-landing/components/FirefoxPWABanner.js +173 -0
- package/dist/components/immersive-landing/components/PWAInstallPrompt.d.ts +3 -0
- package/dist/components/immersive-landing/components/PWAInstallPrompt.js +178 -0
- package/dist/components/immersive-landing/index.d.ts +7 -0
- package/dist/components/immersive-landing/index.js +14 -0
- package/dist/components/immersive-landing/types.d.ts +134 -0
- package/dist/components/immersive-landing/types.js +0 -0
- package/dist/components/immersive-landing/useImmersiveLanding.d.ts +2 -0
- package/dist/components/immersive-landing/useImmersiveLanding.js +151 -0
- package/dist/components/indicator/Indicator.d.ts +31 -0
- package/dist/components/indicator/Indicator.js +76 -0
- package/dist/components/indicator/index.d.ts +2 -0
- package/dist/components/indicator/index.js +3 -0
- package/dist/components/indicator/indicator.css +70 -0
- package/dist/components/input/Input.css +138 -0
- package/dist/components/input/Input.d.ts +45 -0
- package/dist/components/input/Input.js +286 -0
- package/dist/components/input/index.d.ts +3 -8
- package/dist/components/input/index.js +3 -1
- package/dist/components/join/Join.d.ts +9 -0
- package/dist/components/join/Join.js +41 -0
- package/dist/components/join/index.d.ts +2 -0
- package/dist/components/join/index.js +3 -0
- package/dist/components/kbd/Kbd.d.ts +5 -0
- package/dist/components/kbd/Kbd.js +22 -0
- package/dist/components/kbd/index.d.ts +1 -0
- package/dist/components/kbd/index.js +3 -0
- package/dist/components/kbd/kbd.css +55 -0
- package/dist/components/language-switcher/LanguageSwitcher.d.ts +31 -0
- package/dist/components/language-switcher/LanguageSwitcher.js +99 -0
- package/dist/components/language-switcher/createI18n.d.ts +102 -0
- package/dist/components/language-switcher/createI18n.js +85 -0
- package/dist/components/language-switcher/index.d.ts +3 -0
- package/dist/components/language-switcher/index.js +8 -0
- package/dist/components/link/Link.d.ts +13 -0
- package/dist/components/link/Link.js +70 -0
- package/dist/components/link/index.d.ts +1 -0
- package/dist/components/link/index.js +3 -0
- package/dist/components/link/link.css +153 -0
- package/dist/components/live-chat/LiveChatBubble.d.ts +53 -0
- package/dist/components/live-chat/LiveChatBubble.js +106 -0
- package/dist/components/live-chat/LiveChatPanel.d.ts +69 -0
- package/dist/components/live-chat/LiveChatPanel.js +359 -0
- package/dist/components/live-chat/index.d.ts +5 -0
- package/dist/components/live-chat/index.js +5 -0
- package/dist/components/live-chat/types.d.ts +13 -0
- package/dist/components/live-chat/types.js +0 -0
- package/dist/components/loading/Loading.css +131 -0
- package/dist/components/loading/Loading.d.ts +14 -0
- package/dist/components/loading/Loading.js +81 -0
- package/dist/components/loading/index.d.ts +1 -0
- package/dist/components/loading/index.js +3 -0
- package/dist/components/mask/Mask.d.ts +15 -0
- package/dist/components/mask/Mask.js +62 -0
- package/dist/components/mask/index.d.ts +3 -0
- package/dist/components/mask/index.js +3 -0
- package/dist/components/mask/mask.css +89 -0
- package/dist/components/menu/Menu.d.ts +22 -0
- package/dist/components/menu/Menu.js +51 -0
- package/dist/components/menu/MenuDetails.d.ts +8 -0
- package/dist/components/menu/MenuDetails.js +37 -0
- package/dist/components/menu/MenuDropdown.d.ts +12 -0
- package/dist/components/menu/MenuDropdown.js +48 -0
- package/dist/components/menu/MenuItem.d.ts +9 -0
- package/dist/components/menu/MenuItem.js +40 -0
- package/dist/components/menu/MenuTitle.d.ts +8 -0
- package/dist/components/menu/MenuTitle.js +22 -0
- package/dist/components/menu/index.d.ts +3 -0
- package/dist/components/menu/index.js +3 -0
- package/dist/components/menu/menu.css +364 -0
- package/dist/components/modal/Modal.d.ts +27 -0
- package/dist/components/modal/Modal.js +125 -0
- package/dist/components/modal/ModalActions.d.ts +3 -0
- package/dist/components/modal/ModalActions.js +14 -0
- package/dist/components/modal/ModalBody.d.ts +3 -0
- package/dist/components/modal/ModalBody.js +14 -0
- package/dist/components/modal/ModalHeader.d.ts +3 -0
- package/dist/components/modal/ModalHeader.js +15 -0
- package/dist/components/modal/ModalLegacy.d.ts +8 -0
- package/dist/components/modal/ModalLegacy.js +36 -0
- package/dist/components/modal/index.d.ts +6 -0
- package/dist/components/modal/index.js +3 -0
- package/dist/components/modal/modal.css +170 -0
- package/dist/components/navbar/Navbar.d.ts +16 -0
- package/dist/components/navbar/Navbar.js +54 -0
- package/dist/components/navbar/NavbarRow.d.ts +9 -0
- package/dist/components/navbar/NavbarRow.js +49 -0
- package/dist/components/navbar/NavbarSection.d.ts +8 -0
- package/dist/components/navbar/NavbarSection.js +38 -0
- package/dist/components/navbar/NavbarStack.d.ts +10 -0
- package/dist/components/navbar/NavbarStack.js +39 -0
- package/dist/components/navbar/index.d.ts +4 -0
- package/dist/components/navbar/index.js +3 -0
- package/dist/components/navbar/navbar.css +33 -0
- package/dist/components/noise-background/NoiseBackground.d.ts +25 -0
- package/dist/components/noise-background/NoiseBackground.js +200 -0
- package/dist/components/noise-background/index.d.ts +2 -0
- package/dist/components/noise-background/index.js +3 -0
- package/dist/components/pagination/Pagination.d.ts +5 -0
- package/dist/components/pagination/Pagination.js +17 -0
- package/dist/components/pagination/index.d.ts +2 -0
- package/dist/components/pagination/index.js +3 -0
- package/dist/components/phonemockup/PhoneMockup.d.ts +8 -0
- package/dist/components/phonemockup/PhoneMockup.js +44 -0
- package/dist/components/phonemockup/index.d.ts +1 -0
- package/dist/components/phonemockup/index.js +3 -0
- package/dist/components/progress/Progress.css +135 -0
- package/dist/components/progress/Progress.d.ts +36 -0
- package/dist/components/progress/Progress.js +197 -0
- package/dist/components/progress/index.d.ts +1 -0
- package/dist/components/progress/index.js +7 -0
- package/dist/components/props-table/PropsTable.d.ts +14 -0
- package/dist/components/props-table/PropsTable.js +56 -0
- package/dist/components/props-table/index.d.ts +2 -0
- package/dist/components/props-table/index.js +3 -0
- package/dist/components/radialprogress/RadialProgress.d.ts +10 -0
- package/dist/components/radialprogress/RadialProgress.js +47 -0
- package/dist/components/radialprogress/index.d.ts +1 -0
- package/dist/components/radialprogress/index.js +3 -0
- package/dist/components/radio/Radio.css +129 -0
- package/dist/components/radio/Radio.d.ts +12 -0
- package/dist/components/radio/Radio.js +116 -0
- package/dist/components/radio/index.d.ts +1 -0
- package/dist/components/radio/index.js +3 -0
- package/dist/components/radio-group/RadioGroup.css +58 -0
- package/dist/components/radio-group/RadioGroup.d.ts +22 -0
- package/dist/components/radio-group/RadioGroup.js +147 -0
- package/dist/components/radio-group/context.d.ts +9 -0
- package/dist/components/radio-group/context.js +3 -0
- package/dist/components/radio-group/index.d.ts +4 -0
- package/dist/components/radio-group/index.js +4 -0
- package/dist/components/range/Range.d.ts +13 -0
- package/dist/components/range/Range.js +85 -0
- package/dist/components/range/index.d.ts +1 -0
- package/dist/components/range/index.js +3 -0
- package/dist/components/range/range.css +174 -0
- package/dist/components/range-slider/RangeSlider.d.ts +22 -0
- package/dist/components/range-slider/RangeSlider.js +191 -0
- package/dist/components/range-slider/index.d.ts +2 -0
- package/dist/components/range-slider/index.js +3 -0
- package/dist/components/range-slider/range.css +136 -0
- package/dist/components/rating/Rating.d.ts +24 -0
- package/dist/components/rating/Rating.js +54 -0
- package/dist/components/rating/RatingHidden.d.ts +4 -0
- package/dist/components/rating/RatingHidden.js +29 -0
- package/dist/components/rating/RatingItem.d.ts +9 -0
- package/dist/components/rating/RatingItem.js +62 -0
- package/dist/components/rating/index.d.ts +4 -0
- package/dist/components/rating/index.js +3 -0
- package/dist/components/rating/rating.css +106 -0
- package/dist/components/select/Select.d.ts +16 -0
- package/dist/components/select/Select.js +62 -0
- package/dist/components/select/index.d.ts +1 -0
- package/dist/components/select/index.js +3 -0
- package/dist/components/select/select.css +351 -0
- package/dist/components/showcase/ShowcaseBlock.d.ts +10 -0
- package/dist/components/showcase/ShowcaseBlock.js +48 -0
- package/dist/components/showcase/index.d.ts +2 -0
- package/dist/components/showcase/index.js +3 -0
- package/dist/components/showcase-section/ShowcaseSection.d.ts +8 -0
- package/dist/components/showcase-section/ShowcaseSection.js +73 -0
- package/dist/components/showcase-section/index.d.ts +2 -0
- package/dist/components/showcase-section/index.js +3 -0
- package/dist/components/sidenav/Sidenav.css +176 -0
- package/dist/components/sidenav/Sidenav.d.ts +14 -0
- package/dist/components/sidenav/Sidenav.js +66 -0
- package/dist/components/sidenav/SidenavButton.d.ts +9 -0
- package/dist/components/sidenav/SidenavButton.js +41 -0
- package/dist/components/sidenav/SidenavGroup.d.ts +10 -0
- package/dist/components/sidenav/SidenavGroup.js +45 -0
- package/dist/components/sidenav/SidenavItem.d.ts +8 -0
- package/dist/components/sidenav/SidenavItem.js +37 -0
- package/dist/components/sidenav/SidenavLink.d.ts +9 -0
- package/dist/components/sidenav/SidenavLink.js +36 -0
- package/dist/components/sidenav/SidenavMenu.d.ts +5 -0
- package/dist/components/sidenav/SidenavMenu.js +31 -0
- package/dist/components/sidenav/index.d.ts +12 -0
- package/dist/components/sidenav/index.js +13 -0
- package/dist/components/size-picker/SizePicker.d.ts +10 -0
- package/dist/components/size-picker/SizePicker.js +63 -0
- package/dist/components/size-picker/index.d.ts +3 -0
- package/dist/components/size-picker/index.js +6 -0
- package/dist/components/size-picker/sizeStore.d.ts +8 -0
- package/dist/components/size-picker/sizeStore.js +36 -0
- package/dist/components/skeleton/Skeleton.css +95 -0
- package/dist/components/skeleton/Skeleton.d.ts +9 -0
- package/dist/components/skeleton/Skeleton.js +38 -0
- package/dist/components/skeleton/index.d.ts +1 -0
- package/dist/components/skeleton/index.js +3 -0
- package/dist/components/skip-link/SkipLink.d.ts +7 -0
- package/dist/components/skip-link/SkipLink.js +34 -0
- package/dist/components/skip-link/index.d.ts +2 -0
- package/dist/components/skip-link/index.js +3 -0
- package/dist/components/stack/Stack.d.ts +18 -0
- package/dist/components/stack/Stack.js +53 -0
- package/dist/components/stack/index.d.ts +2 -0
- package/dist/components/stack/index.js +3 -0
- package/dist/components/stack/stack.css +90 -0
- package/dist/components/stat-card/StatCard.d.ts +22 -0
- package/dist/components/stat-card/StatCard.js +46 -0
- package/dist/components/stat-card/StatCardSection.d.ts +5 -0
- package/dist/components/stat-card/StatCardSection.js +39 -0
- package/dist/components/stat-card/index.d.ts +1 -0
- package/dist/components/stat-card/index.js +3 -0
- package/dist/components/stats/Stat.d.ts +13 -0
- package/dist/components/stats/Stat.js +51 -0
- package/dist/components/stats/StatSection.d.ts +6 -0
- package/dist/components/stats/StatSection.js +29 -0
- package/dist/components/stats/Stats.d.ts +15 -0
- package/dist/components/stats/Stats.js +29 -0
- package/dist/components/stats/index.d.ts +1 -0
- package/dist/components/stats/index.js +3 -0
- package/dist/components/stats/stat.css +67 -0
- package/dist/components/status/Status.d.ts +8 -0
- package/dist/components/status/Status.js +30 -0
- package/dist/components/status/index.d.ts +2 -0
- package/dist/components/status/index.js +3 -0
- package/dist/components/steps/Step.d.ts +20 -0
- package/dist/components/steps/Step.js +88 -0
- package/dist/components/steps/Steps.d.ts +18 -0
- package/dist/components/steps/Steps.js +80 -0
- package/dist/components/steps/index.d.ts +3 -0
- package/dist/components/steps/index.js +3 -0
- package/dist/components/steps/step.css +179 -0
- package/dist/components/streaming-table/StreamingTable.d.ts +28 -0
- package/dist/components/streaming-table/StreamingTable.js +345 -0
- package/dist/components/streaming-table/createRowStore.d.ts +7 -0
- package/dist/components/streaming-table/createRowStore.js +18 -0
- package/dist/components/streaming-table/createStreamingTableStore.d.ts +13 -0
- package/dist/components/streaming-table/createStreamingTableStore.js +68 -0
- package/dist/components/streaming-table/index.d.ts +5 -0
- package/dist/components/streaming-table/index.js +5 -0
- package/dist/components/streaming-table/types.d.ts +46 -0
- package/dist/components/streaming-table/types.js +0 -0
- package/dist/components/svgbackground/SvgBackground.d.ts +21 -0
- package/dist/components/svgbackground/SvgBackground.js +413 -0
- package/dist/components/svgbackground/index.d.ts +2 -0
- package/dist/components/svgbackground/index.js +3 -0
- package/dist/components/swap/Swap.d.ts +13 -0
- package/dist/components/swap/Swap.js +57 -0
- package/dist/components/swap/index.d.ts +1 -0
- package/dist/components/swap/index.js +3 -0
- package/dist/components/swap/swap.css +92 -0
- package/dist/components/switch-field/SwitchField.d.ts +19 -0
- package/dist/components/switch-field/SwitchField.js +71 -0
- package/dist/components/switch-field/index.d.ts +2 -0
- package/dist/components/switch-field/index.js +3 -0
- package/dist/components/table/EnhancedTable.d.ts +46 -0
- package/dist/components/table/EnhancedTable.js +727 -0
- package/dist/components/table/Table.d.ts +19 -0
- package/dist/components/table/Table.js +57 -0
- package/dist/components/table/TableBody.d.ts +5 -0
- package/dist/components/table/TableBody.js +30 -0
- package/dist/components/table/TableCell.d.ts +7 -0
- package/dist/components/table/TableCell.js +34 -0
- package/dist/components/table/TableFooter.d.ts +7 -0
- package/dist/components/table/TableFooter.js +45 -0
- package/dist/components/table/TableHead.d.ts +7 -0
- package/dist/components/table/TableHead.js +45 -0
- package/dist/components/table/TableHeadCell.d.ts +7 -0
- package/dist/components/table/TableHeadCell.js +34 -0
- package/dist/components/table/TableRow.d.ts +8 -0
- package/dist/components/table/TableRow.js +34 -0
- package/dist/components/table/index.d.ts +4 -0
- package/dist/components/table/index.js +5 -0
- package/dist/components/table/table.css +148 -0
- package/dist/components/tabs/Tabs.css +202 -0
- package/dist/components/tabs/Tabs.d.ts +44 -0
- package/dist/components/tabs/Tabs.js +387 -0
- package/dist/components/tabs/index.d.ts +2 -0
- package/dist/components/tabs/index.js +4 -0
- package/dist/components/textarea/Textarea.d.ts +15 -0
- package/dist/components/textarea/Textarea.js +53 -0
- package/dist/components/textarea/index.d.ts +1 -8
- package/dist/components/textarea/index.js +3 -1
- package/dist/components/textarea/textarea.css +191 -0
- package/dist/components/theme-color-picker/ThemeColorPicker.d.ts +23 -0
- package/dist/components/theme-color-picker/ThemeColorPicker.js +151 -0
- package/dist/components/theme-color-picker/hueShift.d.ts +14 -0
- package/dist/components/theme-color-picker/hueShift.js +492 -0
- package/dist/components/theme-color-picker/index.d.ts +3 -0
- package/dist/components/theme-color-picker/index.js +7 -0
- package/dist/components/timeline/Timeline.d.ts +12 -0
- package/dist/components/timeline/Timeline.js +42 -0
- package/dist/components/timeline/TimelineEnd.d.ts +6 -0
- package/dist/components/timeline/TimelineEnd.js +28 -0
- package/dist/components/timeline/TimelineItem.d.ts +8 -0
- package/dist/components/timeline/TimelineItem.js +47 -0
- package/dist/components/timeline/TimelineMiddle.d.ts +4 -0
- package/dist/components/timeline/TimelineMiddle.js +25 -0
- package/dist/components/timeline/TimelineStart.d.ts +6 -0
- package/dist/components/timeline/TimelineStart.js +28 -0
- package/dist/components/timeline/index.d.ts +5 -0
- package/dist/components/timeline/index.js +11 -0
- package/dist/components/timeline/timeline.css +286 -0
- package/dist/components/toast/Toast.d.ts +22 -0
- package/dist/components/toast/Toast.js +54 -0
- package/dist/components/toast/index.d.ts +1 -0
- package/dist/components/toast/index.js +3 -0
- package/dist/components/toast/toast.css +58 -0
- package/dist/components/toastcontainer/ToastContainer.d.ts +3 -0
- package/dist/components/toastcontainer/ToastContainer.js +15 -0
- package/dist/components/toastcontainer/ToastStack.d.ts +17 -0
- package/dist/components/toastcontainer/ToastStack.js +181 -0
- package/dist/components/toastcontainer/index.d.ts +3 -0
- package/dist/components/toastcontainer/index.js +5 -0
- package/dist/components/toggle/Toggle.d.ts +16 -0
- package/dist/components/toggle/Toggle.js +124 -0
- package/dist/components/toggle/index.d.ts +1 -0
- package/dist/components/toggle/index.js +3 -0
- package/dist/components/toggle/toggle.css +228 -0
- package/dist/components/tooltip/Tooltip.css +161 -0
- package/dist/components/tooltip/Tooltip.d.ts +35 -0
- package/dist/components/tooltip/Tooltip.js +204 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip/index.js +7 -0
- package/dist/components/types.d.ts +15 -0
- package/dist/components/types.js +8 -0
- package/dist/components/utils.d.ts +9 -0
- package/dist/components/utils.js +46 -0
- package/dist/components/video-preview/VideoPreview.d.ts +21 -0
- package/dist/components/video-preview/VideoPreview.js +55 -0
- package/dist/components/video-preview/index.d.ts +2 -0
- package/dist/components/video-preview/index.js +3 -0
- package/dist/components/windowmockup/WindowMockup.d.ts +11 -0
- package/dist/components/windowmockup/WindowMockup.js +85 -0
- package/dist/components/windowmockup/index.d.ts +1 -0
- package/dist/components/windowmockup/index.js +3 -0
- package/dist/index.css +72 -70
- package/dist/index.d.ts +131 -7
- package/dist/index.js +268 -4
- package/dist/lib/iterable.d.ts +9 -0
- package/dist/lib/iterable.js +6 -0
- package/dist/lib/props/index.d.ts +1 -0
- package/dist/lib/props/index.js +0 -0
- package/dist/lib/props/types.d.ts +1 -0
- package/dist/lib/props/types.js +0 -0
- package/dist/lib/refs/index.d.ts +2 -0
- package/dist/lib/refs/index.js +3 -0
- package/dist/lib/refs/mergeRefs.d.ts +7 -0
- package/dist/lib/refs/mergeRefs.js +5 -0
- package/dist/lib/refs/types.d.ts +1 -0
- package/dist/lib/refs/types.js +0 -0
- package/dist/lib/style/classes.d.ts +33 -0
- package/dist/lib/style/classes.js +40 -0
- package/dist/lib/style/index.d.ts +1 -0
- package/dist/lib/style/index.js +4 -0
- package/dist/lib/tag/createIsButton.d.ts +21 -0
- package/dist/lib/tag/createIsButton.js +23 -0
- package/dist/lib/tag/createTagName.d.ts +12 -0
- package/dist/lib/tag/createTagName.js +5 -0
- package/dist/lib/tag/index.d.ts +2 -0
- package/dist/lib/tag/index.js +7 -0
- package/dist/motion/driver.d.ts +5 -0
- package/dist/motion/driver.js +13 -0
- package/dist/motion/easing.d.ts +2 -0
- package/dist/motion/easing.js +18 -0
- package/dist/motion/engine.d.ts +4 -0
- package/dist/motion/engine.js +85 -0
- package/dist/motion/index.d.ts +11 -0
- package/dist/motion/index.js +34 -0
- package/dist/motion/popmotion.d.ts +6 -0
- package/dist/motion/popmotion.js +6 -0
- package/dist/motion/presets.d.ts +10 -0
- package/dist/motion/presets.js +203 -0
- package/dist/motion/reduced-motion.d.ts +1 -0
- package/dist/motion/reduced-motion.js +2 -0
- package/dist/motion/route.d.ts +11 -0
- package/dist/motion/route.js +24 -0
- package/dist/motion/solid/MotionDiv.d.ts +13 -0
- package/dist/motion/solid/MotionDiv.js +76 -0
- package/dist/motion/solid/index.d.ts +2 -0
- package/dist/motion/solid/index.js +3 -0
- package/dist/motion/system.d.ts +20 -0
- package/dist/motion/system.js +59 -0
- package/dist/motion/tokens.d.ts +6 -0
- package/dist/motion/tokens.js +42 -0
- package/dist/motion/types.d.ts +39 -0
- package/dist/motion/types.js +0 -0
- package/dist/stores/index.d.ts +1 -0
- package/dist/stores/index.js +1 -0
- package/dist/stores/toastStore.d.ts +24 -0
- package/dist/stores/toastStore.js +64 -0
- package/dist/styles/base/index.css +43 -0
- package/dist/styles/icons/generated-icons.css +1 -0
- package/dist/styles/themes/dark.css +88 -0
- package/dist/styles/themes/light.css +90 -0
- package/package.json +104 -40
- package/dist/Avatar-CzIirpVq.d.ts +0 -33
- package/dist/Button-BOYHKShy.d.ts +0 -63
- package/dist/Input-CvNxe1rq.d.ts +0 -34
- package/dist/Textarea-5_oQknZn.d.ts +0 -37
- package/dist/chunk/3MUBOGZG.js +0 -213
- package/dist/chunk/EB7KXR65.js +0 -102
- package/dist/chunk/G6RG4LR7.js +0 -87
- package/dist/chunk/HEJAQSH5.jsx +0 -100
- package/dist/chunk/HKS7ET6T.js +0 -56
- package/dist/chunk/KACNXPUM.jsx +0 -103
- package/dist/chunk/NLD5D3P7.jsx +0 -94
- package/dist/chunk/P7WPLZNA.jsx +0 -59
- package/dist/chunk/UTRNHAP4.js +0 -95
- package/dist/chunk/VMEDFWWG.js +0 -102
- package/dist/chunk/WB6NEEQV.jsx +0 -107
- package/dist/chunk/YZ3ID3UY.jsx +0 -226
- package/dist/classes-B_S9K-9I.d.ts +0 -13
- package/dist/components/avatar/index.jsx +0 -7
- package/dist/components/button/index.jsx +0 -8
- package/dist/components/input/index.jsx +0 -7
- package/dist/components/polymorphic/index.d.ts +0 -35
- package/dist/components/polymorphic/index.js +0 -1
- package/dist/components/polymorphic/index.jsx +0 -8
- package/dist/components/textarea/index.jsx +0 -7
- package/dist/index.jsx +0 -20
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__ from "solid-js/web";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__ from "solid-js";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE_tailwind_merge_e05e3e95__ from "tailwind-merge";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE_clsx__ from "clsx";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__button_index_js_557db1f7__ from "../button/index.js";
|
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE__flex_index_js_d26fd801__ from "../flex/index.js";
|
|
7
|
+
import * as __WEBPACK_EXTERNAL_MODULE__input_index_js_00da0e74__ from "../input/index.js";
|
|
8
|
+
var _tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<svg xmlns=http://www.w3.org/2000/svg class="w-5 h-5"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z">'), _tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<h3 class="font-semibold text-lg">'), _tmpl$3 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div><div class="flex-shrink-0 bg-primary text-primary-content px-4 py-4 flex items-center justify-between"><button class="hover:bg-primary/90 rounded-lg p-1 transition-colors"><svg xmlns=http://www.w3.org/2000/svg class="w-5 h-5"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M6 18L18 6M6 6l12 12"></path></svg></button></div><div class="flex-1 overflow-y-auto px-4 py-4 space-y-4"></div><div class="flex-shrink-0 border-t border-base-300 bg-base-100 p-3">'), _tmpl$4 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div>"), _tmpl$5 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div><p class="text-sm leading-relaxed whitespace-pre-wrap break-words">'), _tmpl$6 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<span class="text-xs text-base-content/50 mt-1 px-1">'), _tmpl$7 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<span class="w-4 h-4 border-2 border-primary-content/30 border-t-primary-content rounded-full animate-spin inline-block">');
|
|
9
|
+
const getMockMessages = ()=>{
|
|
10
|
+
const salesMessages = [
|
|
11
|
+
{
|
|
12
|
+
messageId: "sales-1",
|
|
13
|
+
content: "Hi! I'm interested in your product. Can you tell me more?",
|
|
14
|
+
sender: "user",
|
|
15
|
+
timestamp: Date.now() - 3600000
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
messageId: "sales-2",
|
|
19
|
+
content: "Hello! Thanks for your interest. We offer flexible pricing plans starting at $49/month. Would you like to schedule a demo?",
|
|
20
|
+
sender: "agent",
|
|
21
|
+
timestamp: Date.now() - 3500000
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
messageId: "sales-3",
|
|
25
|
+
content: "That sounds great! What features are included in the basic plan?",
|
|
26
|
+
sender: "user",
|
|
27
|
+
timestamp: Date.now() - 3400000
|
|
28
|
+
}
|
|
29
|
+
];
|
|
30
|
+
const supportMessages = [
|
|
31
|
+
{
|
|
32
|
+
messageId: "support-1",
|
|
33
|
+
content: "I'm having trouble connecting. It keeps showing 'Connection Failed'.",
|
|
34
|
+
sender: "user",
|
|
35
|
+
timestamp: Date.now() - 7200000
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
messageId: "support-2",
|
|
39
|
+
content: "I'm sorry to hear that. Let me help you troubleshoot. Can you tell me which browser you're using?",
|
|
40
|
+
sender: "agent",
|
|
41
|
+
timestamp: Date.now() - 7100000
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
messageId: "support-3",
|
|
45
|
+
content: "I'm using Chrome version 121 on Windows 11",
|
|
46
|
+
sender: "user",
|
|
47
|
+
timestamp: Date.now() - 7000000
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
messageId: "support-4",
|
|
51
|
+
content: "Thanks for that info. Let's try clearing your browser cache first. Can you go to Settings > Privacy and security > Clear browsing data?",
|
|
52
|
+
sender: "agent",
|
|
53
|
+
timestamp: Date.now() - 6900000
|
|
54
|
+
}
|
|
55
|
+
];
|
|
56
|
+
return [
|
|
57
|
+
...salesMessages,
|
|
58
|
+
...supportMessages
|
|
59
|
+
].sort((a, b)=>a.timestamp - b.timestamp);
|
|
60
|
+
};
|
|
61
|
+
const formatTime = (timestamp)=>new Intl.DateTimeFormat("en-US", {
|
|
62
|
+
hour: "numeric",
|
|
63
|
+
minute: "2-digit",
|
|
64
|
+
hour12: true
|
|
65
|
+
}).format(new Date(timestamp));
|
|
66
|
+
const LiveChatPanel_LiveChatPanel = (props)=>{
|
|
67
|
+
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
68
|
+
"onClose",
|
|
69
|
+
"title",
|
|
70
|
+
"placeholder",
|
|
71
|
+
"closeLabel",
|
|
72
|
+
"sendLabel",
|
|
73
|
+
"emptyMessage",
|
|
74
|
+
"mockMode",
|
|
75
|
+
"messages",
|
|
76
|
+
"onSendMessage",
|
|
77
|
+
"isSending",
|
|
78
|
+
"autoScrollOnNewMessage",
|
|
79
|
+
"autoScrollBehavior",
|
|
80
|
+
"stickToBottomThreshold",
|
|
81
|
+
"class",
|
|
82
|
+
"className",
|
|
83
|
+
"style"
|
|
84
|
+
]);
|
|
85
|
+
const [internalMessages, setInternalMessages] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)([]);
|
|
86
|
+
const [inputValue, setInputValue] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)("");
|
|
87
|
+
const [sending, setSending] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(false);
|
|
88
|
+
let scrollContainer;
|
|
89
|
+
let previousMessageCount = 0;
|
|
90
|
+
let previousLastMessageId;
|
|
91
|
+
let hasObservedMessages = false;
|
|
92
|
+
let scrollRafId;
|
|
93
|
+
let scrollRafNestedId;
|
|
94
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createEffect)(()=>{
|
|
95
|
+
if (local.mockMode) setInternalMessages(getMockMessages());
|
|
96
|
+
else if (local.messages) setInternalMessages(local.messages);
|
|
97
|
+
});
|
|
98
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createEffect)(()=>{
|
|
99
|
+
if (!local.mockMode && local.messages) setInternalMessages(local.messages);
|
|
100
|
+
});
|
|
101
|
+
const isSending = ()=>local.isSending ?? sending();
|
|
102
|
+
const autoScrollOnNewMessage = ()=>local.autoScrollOnNewMessage ?? true;
|
|
103
|
+
const autoScrollBehavior = ()=>local.autoScrollBehavior ?? "instant";
|
|
104
|
+
const scrollToBottom = ()=>{
|
|
105
|
+
if (!scrollContainer) return;
|
|
106
|
+
if ("smooth" === autoScrollBehavior()) return void scrollContainer.scrollTo({
|
|
107
|
+
top: scrollContainer.scrollHeight,
|
|
108
|
+
behavior: "smooth"
|
|
109
|
+
});
|
|
110
|
+
scrollContainer.scrollTop = scrollContainer.scrollHeight;
|
|
111
|
+
};
|
|
112
|
+
const clearScheduledScroll = ()=>{
|
|
113
|
+
if ("undefined" == typeof window) return;
|
|
114
|
+
if (null != scrollRafId) {
|
|
115
|
+
window.cancelAnimationFrame(scrollRafId);
|
|
116
|
+
scrollRafId = void 0;
|
|
117
|
+
}
|
|
118
|
+
if (null != scrollRafNestedId) {
|
|
119
|
+
window.cancelAnimationFrame(scrollRafNestedId);
|
|
120
|
+
scrollRafNestedId = void 0;
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
const scheduleScrollToBottom = ()=>{
|
|
124
|
+
if ("undefined" == typeof window) return void scrollToBottom();
|
|
125
|
+
clearScheduledScroll();
|
|
126
|
+
scrollRafId = window.requestAnimationFrame(()=>{
|
|
127
|
+
scrollRafNestedId = window.requestAnimationFrame(()=>{
|
|
128
|
+
scrollToBottom();
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createEffect)(()=>{
|
|
133
|
+
const messages = internalMessages();
|
|
134
|
+
const nextMessageCount = messages.length;
|
|
135
|
+
const nextLastMessageId = messages[messages.length - 1]?.messageId;
|
|
136
|
+
const isInitialHydration = !hasObservedMessages && nextMessageCount > 0;
|
|
137
|
+
const hasAppendedMessage = hasObservedMessages ? nextMessageCount > previousMessageCount || nextMessageCount > 0 && nextLastMessageId !== previousLastMessageId : false;
|
|
138
|
+
previousMessageCount = nextMessageCount;
|
|
139
|
+
previousLastMessageId = nextLastMessageId;
|
|
140
|
+
hasObservedMessages = true;
|
|
141
|
+
if (!autoScrollOnNewMessage()) return;
|
|
142
|
+
if (!isInitialHydration && !hasAppendedMessage) return;
|
|
143
|
+
scheduleScrollToBottom();
|
|
144
|
+
});
|
|
145
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onCleanup)(()=>{
|
|
146
|
+
clearScheduledScroll();
|
|
147
|
+
});
|
|
148
|
+
const handleSend = async ()=>{
|
|
149
|
+
const content = inputValue().trim();
|
|
150
|
+
if (!content || isSending()) return;
|
|
151
|
+
if (local.mockMode) {
|
|
152
|
+
const userMessage = {
|
|
153
|
+
messageId: `user-${Date.now()}`,
|
|
154
|
+
content,
|
|
155
|
+
sender: "user",
|
|
156
|
+
timestamp: Date.now()
|
|
157
|
+
};
|
|
158
|
+
setInternalMessages((prev)=>[
|
|
159
|
+
...prev,
|
|
160
|
+
userMessage
|
|
161
|
+
]);
|
|
162
|
+
setInputValue("");
|
|
163
|
+
setTimeout(()=>{
|
|
164
|
+
const agentMessage = {
|
|
165
|
+
messageId: `agent-${Date.now()}`,
|
|
166
|
+
content: "Thanks for your message! This is a demo response.",
|
|
167
|
+
sender: "agent",
|
|
168
|
+
timestamp: Date.now()
|
|
169
|
+
};
|
|
170
|
+
setInternalMessages((prev)=>[
|
|
171
|
+
...prev,
|
|
172
|
+
agentMessage
|
|
173
|
+
]);
|
|
174
|
+
}, 1000);
|
|
175
|
+
} else if (local.onSendMessage) {
|
|
176
|
+
setSending(true);
|
|
177
|
+
try {
|
|
178
|
+
const response = await local.onSendMessage({
|
|
179
|
+
message: content
|
|
180
|
+
});
|
|
181
|
+
const userMessage = {
|
|
182
|
+
messageId: response.messageId,
|
|
183
|
+
content,
|
|
184
|
+
sender: "user",
|
|
185
|
+
timestamp: response.timestamp
|
|
186
|
+
};
|
|
187
|
+
setInternalMessages((prev)=>[
|
|
188
|
+
...prev,
|
|
189
|
+
userMessage
|
|
190
|
+
]);
|
|
191
|
+
setInputValue("");
|
|
192
|
+
} catch (error) {
|
|
193
|
+
console.error("[LiveChatPanel] Failed to send message:", error);
|
|
194
|
+
} finally{
|
|
195
|
+
setSending(false);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
const handleKeyPress = (e)=>{
|
|
200
|
+
if ("Enter" === e.key && !e.shiftKey) {
|
|
201
|
+
e.preventDefault();
|
|
202
|
+
handleSend();
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
const classes = ()=>(0, __WEBPACK_EXTERNAL_MODULE_tailwind_merge_e05e3e95__.twMerge)(`fixed inset-0
|
|
206
|
+
sm:inset-auto
|
|
207
|
+
sm:bottom-20 sm:right-4
|
|
208
|
+
md:bottom-24 md:right-6
|
|
209
|
+
z-51
|
|
210
|
+
w-full h-full
|
|
211
|
+
sm:w-96 md:w-[400px]
|
|
212
|
+
sm:h-[70vh]
|
|
213
|
+
md:h-[75vh]
|
|
214
|
+
lg:h-[80vh]
|
|
215
|
+
sm:max-h-[800px]
|
|
216
|
+
sm:min-h-[420px]
|
|
217
|
+
bg-base-100
|
|
218
|
+
sm:rounded-2xl
|
|
219
|
+
shadow-2xl
|
|
220
|
+
flex flex-col
|
|
221
|
+
overflow-hidden`, (0, __WEBPACK_EXTERNAL_MODULE_clsx__.clsx)(local.class, local.className));
|
|
222
|
+
return (()=>{
|
|
223
|
+
var _el$ = _tmpl$3(), _el$2 = _el$.firstChild, _el$5 = _el$2.firstChild, _el$6 = _el$2.nextSibling, _el$7 = _el$6.nextSibling;
|
|
224
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
225
|
+
get ["class"] () {
|
|
226
|
+
return classes();
|
|
227
|
+
},
|
|
228
|
+
get style () {
|
|
229
|
+
return local.style;
|
|
230
|
+
}
|
|
231
|
+
}), false, true);
|
|
232
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$2, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE__flex_index_js_d26fd801__["default"], {
|
|
233
|
+
align: "center",
|
|
234
|
+
gap: "sm",
|
|
235
|
+
get children () {
|
|
236
|
+
return [
|
|
237
|
+
_tmpl$(),
|
|
238
|
+
(()=>{
|
|
239
|
+
var _el$4 = _tmpl$2();
|
|
240
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$4, ()=>local.title ?? "Chat with us");
|
|
241
|
+
return _el$4;
|
|
242
|
+
})()
|
|
243
|
+
];
|
|
244
|
+
}
|
|
245
|
+
}), _el$5);
|
|
246
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.addEventListener)(_el$5, "click", local.onClose, true);
|
|
247
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)((element)=>{
|
|
248
|
+
scrollContainer = element;
|
|
249
|
+
}, _el$6);
|
|
250
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$6, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.For, {
|
|
251
|
+
get each () {
|
|
252
|
+
return internalMessages();
|
|
253
|
+
},
|
|
254
|
+
children: (message)=>{
|
|
255
|
+
const isUser = "user" === message.sender;
|
|
256
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE__flex_index_js_d26fd801__["default"], {
|
|
257
|
+
direction: isUser ? "row-reverse" : "row",
|
|
258
|
+
gap: "sm",
|
|
259
|
+
class: "w-full",
|
|
260
|
+
get children () {
|
|
261
|
+
return [
|
|
262
|
+
(()=>{
|
|
263
|
+
var _el$8 = _tmpl$4();
|
|
264
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$8, `flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center text-xs font-semibold ${isUser ? "bg-primary text-primary-content" : "bg-base-300 text-base-content"}`);
|
|
265
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$8, isUser ? "U" : "A");
|
|
266
|
+
return _el$8;
|
|
267
|
+
})(),
|
|
268
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE__flex_index_js_d26fd801__["default"], {
|
|
269
|
+
direction: "col",
|
|
270
|
+
align: isUser ? "end" : "start",
|
|
271
|
+
class: "max-w-[75%]",
|
|
272
|
+
get children () {
|
|
273
|
+
return [
|
|
274
|
+
(()=>{
|
|
275
|
+
var _el$9 = _tmpl$5(), _el$0 = _el$9.firstChild;
|
|
276
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$9, `px-3 py-2 rounded-2xl ${isUser ? "bg-primary text-primary-content rounded-tr-sm" : "bg-base-200 text-base-content rounded-tl-sm"}`);
|
|
277
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$0, ()=>message.content);
|
|
278
|
+
return _el$9;
|
|
279
|
+
})(),
|
|
280
|
+
(()=>{
|
|
281
|
+
var _el$1 = _tmpl$6();
|
|
282
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$1, ()=>formatTime(message.timestamp));
|
|
283
|
+
return _el$1;
|
|
284
|
+
})()
|
|
285
|
+
];
|
|
286
|
+
}
|
|
287
|
+
})
|
|
288
|
+
];
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
}), null);
|
|
293
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$6, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
294
|
+
get when () {
|
|
295
|
+
return 0 === internalMessages().length;
|
|
296
|
+
},
|
|
297
|
+
get children () {
|
|
298
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE__flex_index_js_d26fd801__["default"], {
|
|
299
|
+
justify: "center",
|
|
300
|
+
align: "center",
|
|
301
|
+
class: "h-full text-base-content/50 text-sm",
|
|
302
|
+
get children () {
|
|
303
|
+
return local.emptyMessage ?? "No messages yet. Start a conversation!";
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
}), null);
|
|
308
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$7, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE__flex_index_js_d26fd801__["default"], {
|
|
309
|
+
gap: "sm",
|
|
310
|
+
get children () {
|
|
311
|
+
return [
|
|
312
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE__input_index_js_00da0e74__["default"], {
|
|
313
|
+
type: "text",
|
|
314
|
+
get value () {
|
|
315
|
+
return inputValue();
|
|
316
|
+
},
|
|
317
|
+
onInput: (e)=>setInputValue(e.currentTarget.value),
|
|
318
|
+
onKeyPress: handleKeyPress,
|
|
319
|
+
get placeholder () {
|
|
320
|
+
return local.placeholder ?? "Message support...";
|
|
321
|
+
},
|
|
322
|
+
get disabled () {
|
|
323
|
+
return isSending();
|
|
324
|
+
},
|
|
325
|
+
class: "flex-1"
|
|
326
|
+
}),
|
|
327
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE__button_index_js_557db1f7__["default"], {
|
|
328
|
+
onClick: handleSend,
|
|
329
|
+
get isDisabled () {
|
|
330
|
+
return !inputValue().trim() || isSending();
|
|
331
|
+
},
|
|
332
|
+
class: "px-4 py-2",
|
|
333
|
+
variant: "primary",
|
|
334
|
+
get children () {
|
|
335
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
336
|
+
get when () {
|
|
337
|
+
return !isSending();
|
|
338
|
+
},
|
|
339
|
+
get fallback () {
|
|
340
|
+
return _tmpl$7();
|
|
341
|
+
},
|
|
342
|
+
get children () {
|
|
343
|
+
return local.sendLabel ?? "Send";
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
})
|
|
348
|
+
];
|
|
349
|
+
}
|
|
350
|
+
}));
|
|
351
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$5, "aria-label", local.closeLabel ?? "Close chat"));
|
|
352
|
+
return _el$;
|
|
353
|
+
})();
|
|
354
|
+
};
|
|
355
|
+
const LiveChatPanel = LiveChatPanel_LiveChatPanel;
|
|
356
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.delegateEvents)([
|
|
357
|
+
"click"
|
|
358
|
+
]);
|
|
359
|
+
export { LiveChatPanel as default };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as LiveChatBubble } from "./LiveChatBubble";
|
|
2
|
+
export type { LiveChatBubbleProps } from "./LiveChatBubble";
|
|
3
|
+
export { default as LiveChatPanel } from "./LiveChatPanel";
|
|
4
|
+
export type { LiveChatPanelProps } from "./LiveChatPanel";
|
|
5
|
+
export type { ChatMessage, SendMessagePayload, SendMessageResponse } from "./types";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE__LiveChatBubble_js_61e05a4d__ from "./LiveChatBubble.js";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__LiveChatPanel_js_aa84e738__ from "./LiveChatPanel.js";
|
|
3
|
+
var __webpack_exports__LiveChatBubble = __WEBPACK_EXTERNAL_MODULE__LiveChatBubble_js_61e05a4d__["default"];
|
|
4
|
+
var __webpack_exports__LiveChatPanel = __WEBPACK_EXTERNAL_MODULE__LiveChatPanel_js_aa84e738__["default"];
|
|
5
|
+
export { __webpack_exports__LiveChatBubble as LiveChatBubble, __webpack_exports__LiveChatPanel as LiveChatPanel };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ChatMessage {
|
|
2
|
+
messageId: string;
|
|
3
|
+
content: string;
|
|
4
|
+
sender: "user" | "agent";
|
|
5
|
+
timestamp: number;
|
|
6
|
+
}
|
|
7
|
+
export interface SendMessagePayload {
|
|
8
|
+
message: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SendMessageResponse {
|
|
11
|
+
messageId: string;
|
|
12
|
+
timestamp: number;
|
|
13
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
/* -------------------------------------------------------------------------------------------------
|
|
3
|
+
* Base
|
|
4
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
5
|
+
.spinner {
|
|
6
|
+
pointer-events: none;
|
|
7
|
+
position: relative;
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
width: 1.5rem;
|
|
12
|
+
height: 1.5rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.spinner [data-slot="spinner-icon"] {
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
animation: spinner-rotate 0.8s linear infinite;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@keyframes spinner-rotate {
|
|
22
|
+
100% {
|
|
23
|
+
transform: rotate(360deg);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* -------------------------------------------------------------------------------------------------
|
|
28
|
+
* Size variants
|
|
29
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
30
|
+
.spinner--xs {
|
|
31
|
+
width: 1rem;
|
|
32
|
+
height: 1rem;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.spinner--sm {
|
|
36
|
+
width: 1.25rem;
|
|
37
|
+
height: 1.25rem;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* md is default */
|
|
41
|
+
|
|
42
|
+
.spinner--lg {
|
|
43
|
+
width: 2rem;
|
|
44
|
+
height: 2rem;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.spinner--xl {
|
|
48
|
+
width: 2.5rem;
|
|
49
|
+
height: 2.5rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* -------------------------------------------------------------------------------------------------
|
|
53
|
+
* Color variants
|
|
54
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
55
|
+
.spinner--current {
|
|
56
|
+
color: currentColor;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.spinner--accent {
|
|
60
|
+
color: var(--color-accent);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.spinner--success {
|
|
64
|
+
color: var(--color-success);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.spinner--warning {
|
|
68
|
+
color: var(--color-warning);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.spinner--danger {
|
|
72
|
+
color: var(--color-error);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* -------------------------------------------------------------------------------------------------
|
|
76
|
+
* CSS mask-image variants (legacy, non-spinner)
|
|
77
|
+
* These use background-color + mask-image for animated SVG patterns
|
|
78
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
79
|
+
.spinner--dots,
|
|
80
|
+
.spinner--ring,
|
|
81
|
+
.spinner--ball,
|
|
82
|
+
.spinner--bars,
|
|
83
|
+
.spinner--infinity {
|
|
84
|
+
background-color: currentColor;
|
|
85
|
+
mask-size: 100%;
|
|
86
|
+
mask-repeat: no-repeat;
|
|
87
|
+
mask-position: center;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.spinner--dots [data-slot="spinner-icon"],
|
|
91
|
+
.spinner--ring [data-slot="spinner-icon"],
|
|
92
|
+
.spinner--ball [data-slot="spinner-icon"],
|
|
93
|
+
.spinner--bars [data-slot="spinner-icon"],
|
|
94
|
+
.spinner--infinity [data-slot="spinner-icon"] {
|
|
95
|
+
display: none;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.spinner--dots {
|
|
99
|
+
mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='4' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' begin='0.1s'/%3E%3C/circle%3E%3Ccircle cx='20' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' begin='0.2s'/%3E%3C/circle%3E%3C/svg%3E");
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.spinner--ring {
|
|
103
|
+
mask-image: url("data:image/svg+xml,%3Csvg width='44' height='44' viewBox='0 0 44 44' xmlns='http://www.w3.org/2000/svg' stroke='white'%3E%3Cg fill='none' fill-rule='evenodd' stroke-width='2'%3E%3Ccircle cx='22' cy='22' r='1'%3E%3Canimate attributeName='r' begin='0s' dur='1.8s' values='1;20' calcMode='spline' keyTimes='0;1' keySplines='0.165,0.84,0.44,1' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-opacity' begin='0s' dur='1.8s' values='1;0' calcMode='spline' keyTimes='0;1' keySplines='0.3,0.61,0.355,1' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='22' cy='22' r='1'%3E%3Canimate attributeName='r' begin='-0.9s' dur='1.8s' values='1;20' calcMode='spline' keyTimes='0;1' keySplines='0.165,0.84,0.44,1' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-opacity' begin='-0.9s' dur='1.8s' values='1;0' calcMode='spline' keyTimes='0;1' keySplines='0.3,0.61,0.355,1' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.spinner--ball {
|
|
107
|
+
mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cellipse cx='12' cy='5' rx='4' ry='4'%3E%3Canimate attributeName='cy' values='5;20;20.5;20;5' keyTimes='0;0.469;0.5;0.531;1' dur='.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='rx' values='4;4;4.8;4;4' keyTimes='0;0.469;0.5;0.531;1' dur='.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='ry' values='4;4;3;4;4' keyTimes='0;0.469;0.5;0.531;1' dur='.8s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3C/svg%3E");
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.spinner--bars {
|
|
111
|
+
mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='1' y='1' width='6' height='22'%3E%3Canimate attributeName='y' values='1;5;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='height' values='22;14;22' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='1;0.2;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='9' y='1' width='6' height='22'%3E%3Canimate attributeName='y' values='1;5;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.65s'/%3E%3Canimate attributeName='height' values='22;14;22' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.65s'/%3E%3Canimate attributeName='opacity' values='1;0.2;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.65s'/%3E%3C/rect%3E%3Crect x='17' y='1' width='6' height='22'%3E%3Canimate attributeName='y' values='1;5;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.5s'/%3E%3Canimate attributeName='height' values='22;14;22' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.5s'/%3E%3Canimate attributeName='opacity' values='1;0.2;1' keyTimes='0;0.938;1' dur='.8s' repeatCount='indefinite' begin='-0.5s'/%3E%3C/rect%3E%3C/svg%3E");
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.spinner--infinity {
|
|
115
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200px' height='200px' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid'%3E%3Cpath fill='none' stroke='black' stroke-width='10' stroke-dasharray='205.271 51.318' d='M24.3 30C11.4 30 5 43.3 5 50s6.4 20 19.3 20c19.3 0 32.1-40 51.4-40C88.6 30 95 43.3 95 50s-6.4 20-19.3 20C56.4 70 43.6 30 24.3 30z' stroke-linecap='round' style='transform:scale(0.8);transform-origin:50px 50px'%3E%3Canimate attributeName='stroke-dashoffset' repeatCount='indefinite' dur='2s' keyTimes='0;1' values='0;256.589'/%3E%3C/path%3E%3C/svg%3E");
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* -------------------------------------------------------------------------------------------------
|
|
119
|
+
* Reduced motion
|
|
120
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
121
|
+
@media (prefers-reduced-motion: reduce) {
|
|
122
|
+
.spinner [data-slot="spinner-icon"],
|
|
123
|
+
.spinner--dots,
|
|
124
|
+
.spinner--ring,
|
|
125
|
+
.spinner--ball,
|
|
126
|
+
.spinner--bars,
|
|
127
|
+
.spinner--infinity {
|
|
128
|
+
animation: none;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "./Loading.css";
|
|
2
|
+
import { type Component, type JSX } from "solid-js";
|
|
3
|
+
import type { IComponentBaseProps } from "../types";
|
|
4
|
+
export type SpinnerSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
5
|
+
export type SpinnerColor = "current" | "accent" | "success" | "warning" | "danger";
|
|
6
|
+
export type SpinnerVariant = "spinner" | "dots" | "ring" | "ball" | "bars" | "infinity";
|
|
7
|
+
export type LoadingProps = Omit<JSX.HTMLAttributes<HTMLSpanElement>, "children"> & IComponentBaseProps & {
|
|
8
|
+
size?: SpinnerSize;
|
|
9
|
+
color?: SpinnerColor;
|
|
10
|
+
variant?: SpinnerVariant;
|
|
11
|
+
label?: string;
|
|
12
|
+
};
|
|
13
|
+
declare const Loading: Component<LoadingProps>;
|
|
14
|
+
export default Loading;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__ from "solid-js/web";
|
|
2
|
+
import "./Loading.css";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__ from "solid-js";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE_tailwind_merge_e05e3e95__ from "tailwind-merge";
|
|
5
|
+
var _tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<svg aria-hidden=true data-slot=spinner-icon fill=none viewBox="0 0 24 24"><defs><linearGradient x1=50% x2=50% y1=5.271% y2=91.793%><stop offset=0% stop-color=currentColor></stop><stop offset=100% stop-color=currentColor stop-opacity=0.55></stop></linearGradient><linearGradient x1=50% x2=50% y1=15.24% y2=87.15%><stop offset=0% stop-color=currentColor stop-opacity=0></stop><stop offset=100% stop-color=currentColor stop-opacity=0.55></stop></linearGradient></defs><g fill=none><path d="M8.749.021a1.5 1.5 0 0 1 .497 2.958A7.5 7.5 0 0 0 3 10.375a7.5 7.5 0 0 0 7.5 7.5v3c-5.799 0-10.5-4.7-10.5-10.5C0 5.23 3.726.865 8.749.021"transform="translate(1.5 1.625)"></path><path d="M15.392 2.673a1.5 1.5 0 0 1 2.119-.115A10.48 10.48 0 0 1 21 10.375c0 5.8-4.701 10.5-10.5 10.5v-3a7.5 7.5 0 0 0 5.007-13.084a1.5 1.5 0 0 1-.115-2.118"transform="translate(1.5 1.625)">'), _tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<span>");
|
|
6
|
+
const SIZE_CLASS_MAP = {
|
|
7
|
+
xs: "spinner--xs",
|
|
8
|
+
sm: "spinner--sm",
|
|
9
|
+
md: "",
|
|
10
|
+
lg: "spinner--lg",
|
|
11
|
+
xl: "spinner--xl"
|
|
12
|
+
};
|
|
13
|
+
const COLOR_CLASS_MAP = {
|
|
14
|
+
current: "spinner--current",
|
|
15
|
+
accent: "spinner--accent",
|
|
16
|
+
success: "spinner--success",
|
|
17
|
+
warning: "spinner--warning",
|
|
18
|
+
danger: "spinner--danger"
|
|
19
|
+
};
|
|
20
|
+
const VARIANT_CLASS_MAP = {
|
|
21
|
+
spinner: "spinner--spinner",
|
|
22
|
+
dots: "spinner--dots",
|
|
23
|
+
ring: "spinner--ring",
|
|
24
|
+
ball: "spinner--ball",
|
|
25
|
+
bars: "spinner--bars",
|
|
26
|
+
infinity: "spinner--infinity"
|
|
27
|
+
};
|
|
28
|
+
const SpinnerSVG = ()=>{
|
|
29
|
+
const id = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createUniqueId)();
|
|
30
|
+
return (()=>{
|
|
31
|
+
var _el$ = _tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
|
|
32
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$3, "id", `spinner-grad1-${id}`);
|
|
33
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$4, "id", `spinner-grad2-${id}`);
|
|
34
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$6, "fill", `url(#spinner-grad1-${id})`);
|
|
35
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$7, "fill", `url(#spinner-grad2-${id})`);
|
|
36
|
+
return _el$;
|
|
37
|
+
})();
|
|
38
|
+
};
|
|
39
|
+
const Loading_Loading = (props)=>{
|
|
40
|
+
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
41
|
+
"size",
|
|
42
|
+
"color",
|
|
43
|
+
"variant",
|
|
44
|
+
"label",
|
|
45
|
+
"class",
|
|
46
|
+
"className",
|
|
47
|
+
"dataTheme",
|
|
48
|
+
"style"
|
|
49
|
+
]);
|
|
50
|
+
const size = ()=>local.size ?? "md";
|
|
51
|
+
const color = ()=>local.color ?? "current";
|
|
52
|
+
const variant = ()=>local.variant ?? "spinner";
|
|
53
|
+
return (()=>{
|
|
54
|
+
var _el$8 = _tmpl$2();
|
|
55
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$8, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
56
|
+
role: "status",
|
|
57
|
+
get ["aria-label"] () {
|
|
58
|
+
return local.label ?? "Loading";
|
|
59
|
+
},
|
|
60
|
+
"aria-busy": "true",
|
|
61
|
+
"aria-live": "polite",
|
|
62
|
+
get ["class"] () {
|
|
63
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_tailwind_merge_e05e3e95__.twMerge)("spinner", SIZE_CLASS_MAP[size()], COLOR_CLASS_MAP[color()], VARIANT_CLASS_MAP[variant()], local.class, local.className);
|
|
64
|
+
},
|
|
65
|
+
"data-slot": "spinner",
|
|
66
|
+
get ["data-theme"] () {
|
|
67
|
+
return local.dataTheme;
|
|
68
|
+
},
|
|
69
|
+
get style () {
|
|
70
|
+
return local.style;
|
|
71
|
+
}
|
|
72
|
+
}), false, true);
|
|
73
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$8, (()=>{
|
|
74
|
+
var _c$ = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>"spinner" === variant());
|
|
75
|
+
return ()=>_c$() ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(SpinnerSVG, {}) : void 0;
|
|
76
|
+
})());
|
|
77
|
+
return _el$8;
|
|
78
|
+
})();
|
|
79
|
+
};
|
|
80
|
+
const Loading = Loading_Loading;
|
|
81
|
+
export { Loading as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, type LoadingProps, type SpinnerSize, type SpinnerColor, type SpinnerVariant, } from "./Loading";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "./mask.css";
|
|
2
|
+
import { type JSX, type Component } from "solid-js";
|
|
3
|
+
import type { IComponentBaseProps } from "../types";
|
|
4
|
+
export type MaskProps = JSX.ImgHTMLAttributes<HTMLImageElement> & IComponentBaseProps & {
|
|
5
|
+
variant?: "squircle" | "heart" | "hexagon" | "hexagon-2" | "decagon" | "pentagon" | "diamond" | "square" | "circle" | "star" | "star-2" | "triangle" | "triangle-2" | "triangle-3" | "triangle-4" | "half-1" | "half-2";
|
|
6
|
+
class?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: JSX.CSSProperties;
|
|
9
|
+
};
|
|
10
|
+
export declare function maskClassName({ className, variant, }?: Pick<MaskProps, "className" | "variant">): string;
|
|
11
|
+
type MaskComponent = Component<MaskProps> & {
|
|
12
|
+
className: typeof maskClassName;
|
|
13
|
+
};
|
|
14
|
+
declare const Mask: MaskComponent;
|
|
15
|
+
export default Mask;
|