@finsweet/webflow-apps-utils 1.0.1
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/README.md +45 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/router/Link.svelte +166 -0
- package/dist/router/Link.svelte.d.ts +26 -0
- package/dist/router/README.md +397 -0
- package/dist/router/Route.svelte +82 -0
- package/dist/router/Route.svelte.d.ts +24 -0
- package/dist/router/Router.svelte +71 -0
- package/dist/router/Router.svelte.d.ts +20 -0
- package/dist/router/hooks.svelte.d.ts +77 -0
- package/dist/router/hooks.svelte.js +148 -0
- package/dist/router/index.svelte.d.ts +107 -0
- package/dist/router/index.svelte.js +400 -0
- package/dist/stores/breakpoints.d.ts +10 -0
- package/dist/stores/breakpoints.js +2 -0
- package/dist/stores/componentInjectErrors.d.ts +1 -0
- package/dist/stores/componentInjectErrors.js +2 -0
- package/dist/stores/forms.d.ts +110 -0
- package/dist/stores/forms.js +307 -0
- package/dist/stores/globalStore.d.ts +10 -0
- package/dist/stores/globalStore.js +10 -0
- package/dist/stores/index.d.ts +7 -0
- package/dist/stores/index.js +7 -0
- package/dist/stores/router.d.ts +4 -0
- package/dist/stores/router.js +5 -0
- package/dist/stores/showConfirmActionModal.d.ts +1 -0
- package/dist/stores/showConfirmActionModal.js +2 -0
- package/dist/stores/siteInfo.d.ts +13 -0
- package/dist/stores/siteInfo.js +2 -0
- package/dist/types/auth.d.ts +40 -0
- package/dist/types/auth.js +1 -0
- package/dist/types/customCode.d.ts +16 -0
- package/dist/types/customCode.js +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.js +5 -0
- package/dist/types/license.d.ts +5 -0
- package/dist/types/license.js +1 -0
- package/dist/types/webflow.d.ts +125 -0
- package/dist/types/webflow.js +1 -0
- package/dist/types/window.d.ts +14 -0
- package/dist/types/window.js +1 -0
- package/dist/ui/components/ButtonGroup.svelte +106 -0
- package/dist/ui/components/ButtonGroup.svelte.d.ts +28 -0
- package/dist/ui/components/Checkbox.svelte +94 -0
- package/dist/ui/components/Checkbox.svelte.d.ts +36 -0
- package/dist/ui/components/Copy.svelte +329 -0
- package/dist/ui/components/Copy.svelte.d.ts +35 -0
- package/dist/ui/components/CustomModal.svelte +192 -0
- package/dist/ui/components/CustomModal.svelte.d.ts +45 -0
- package/dist/ui/components/DisableInEditMode.svelte +66 -0
- package/dist/ui/components/DisableInEditMode.svelte.d.ts +33 -0
- package/dist/ui/components/Divider.svelte +31 -0
- package/dist/ui/components/Divider.svelte.d.ts +31 -0
- package/dist/ui/components/Header.svelte +30 -0
- package/dist/ui/components/Header.svelte.d.ts +20 -0
- package/dist/ui/components/Iframe.svelte +89 -0
- package/dist/ui/components/Iframe.svelte.d.ts +40 -0
- package/dist/ui/components/ImageUpload.svelte +213 -0
- package/dist/ui/components/ImageUpload.svelte.d.ts +42 -0
- package/dist/ui/components/InjectComponent.svelte +297 -0
- package/dist/ui/components/InjectComponent.svelte.d.ts +27 -0
- package/dist/ui/components/Loader.svelte +68 -0
- package/dist/ui/components/Loader.svelte.d.ts +24 -0
- package/dist/ui/components/LoadingScreen.svelte +71 -0
- package/dist/ui/components/LoadingScreen.svelte.d.ts +26 -0
- package/dist/ui/components/Modal.svelte +139 -0
- package/dist/ui/components/Modal.svelte.d.ts +42 -0
- package/dist/ui/components/Navbar.svelte +132 -0
- package/dist/ui/components/Navbar.svelte.d.ts +29 -0
- package/dist/ui/components/NoSettingsNeeded.svelte +31 -0
- package/dist/ui/components/NoSettingsNeeded.svelte.d.ts +18 -0
- package/dist/ui/components/Notification.svelte +193 -0
- package/dist/ui/components/Notification.svelte.d.ts +64 -0
- package/dist/ui/components/PlusMinusButton.svelte +91 -0
- package/dist/ui/components/PlusMinusButton.svelte.d.ts +22 -0
- package/dist/ui/components/PreviewBar.svelte +40 -0
- package/dist/ui/components/PreviewBar.svelte.d.ts +20 -0
- package/dist/ui/components/ScrollableContent.svelte +18 -0
- package/dist/ui/components/ScrollableContent.svelte.d.ts +31 -0
- package/dist/ui/components/Section.svelte +97 -0
- package/dist/ui/components/Section.svelte.d.ts +50 -0
- package/dist/ui/components/SelectBodyOrDivBlock.svelte +26 -0
- package/dist/ui/components/SelectBodyOrDivBlock.svelte.d.ts +26 -0
- package/dist/ui/components/Spacer.svelte +9 -0
- package/dist/ui/components/Spacer.svelte.d.ts +22 -0
- package/dist/ui/components/SpinnerPlusMinus.svelte +75 -0
- package/dist/ui/components/SpinnerPlusMinus.svelte.d.ts +23 -0
- package/dist/ui/components/SpinnerUpDown.svelte +194 -0
- package/dist/ui/components/SpinnerUpDown.svelte.d.ts +31 -0
- package/dist/ui/components/Tabs.svelte +71 -0
- package/dist/ui/components/Tabs.svelte.d.ts +26 -0
- package/dist/ui/components/ToggleItem.svelte +29 -0
- package/dist/ui/components/ToggleItem.svelte.d.ts +28 -0
- package/dist/ui/components/ToggleList.svelte +57 -0
- package/dist/ui/components/ToggleList.svelte.d.ts +39 -0
- package/dist/ui/components/breakpoints/BreakpointItem.svelte +84 -0
- package/dist/ui/components/breakpoints/BreakpointItem.svelte.d.ts +37 -0
- package/dist/ui/components/breakpoints/breakpointOptions.d.ts +12 -0
- package/dist/ui/components/breakpoints/breakpointOptions.js +38 -0
- package/dist/ui/components/breakpoints/index.d.ts +3 -0
- package/dist/ui/components/breakpoints/index.js +3 -0
- package/dist/ui/components/button/Button.stories.svelte +275 -0
- package/dist/ui/components/button/Button.stories.svelte.d.ts +27 -0
- package/dist/ui/components/button/Button.svelte +389 -0
- package/dist/ui/components/button/Button.svelte.d.ts +84 -0
- package/dist/ui/components/button/index.d.ts +2 -0
- package/dist/ui/components/button/index.js +1 -0
- package/dist/ui/components/button/types.d.ts +23 -0
- package/dist/ui/components/button/types.js +1 -0
- package/dist/ui/components/buttons/FooterButton.svelte +277 -0
- package/dist/ui/components/buttons/FooterButton.svelte.d.ts +10 -0
- package/dist/ui/components/buttons/index.d.ts +5 -0
- package/dist/ui/components/buttons/index.js +5 -0
- package/dist/ui/components/buttons/types.d.ts +28 -0
- package/dist/ui/components/buttons/types.js +1 -0
- package/dist/ui/components/clickable/Clickable.stories.svelte +213 -0
- package/dist/ui/components/clickable/Clickable.stories.svelte.d.ts +27 -0
- package/dist/ui/components/clickable/Clickable.svelte +93 -0
- package/dist/ui/components/clickable/Clickable.svelte.d.ts +4 -0
- package/dist/ui/components/clickable/index.d.ts +2 -0
- package/dist/ui/components/clickable/index.js +1 -0
- package/dist/ui/components/clickable/types.d.ts +17 -0
- package/dist/ui/components/clickable/types.js +1 -0
- package/dist/ui/components/index.d.ts +46 -0
- package/dist/ui/components/index.js +46 -0
- package/dist/ui/components/input/Input.stories.d.ts +109 -0
- package/dist/ui/components/input/Input.stories.js +337 -0
- package/dist/ui/components/input/Input.svelte +422 -0
- package/dist/ui/components/input/Input.svelte.d.ts +4 -0
- package/dist/ui/components/input/index.d.ts +2 -0
- package/dist/ui/components/input/index.js +1 -0
- package/dist/ui/components/input/types.d.ts +109 -0
- package/dist/ui/components/input/types.js +1 -0
- package/dist/ui/components/layout/ExampleLayout.svelte +538 -0
- package/dist/ui/components/layout/ExampleLayout.svelte.d.ts +3 -0
- package/dist/ui/components/layout/Layout.stories.svelte +24 -0
- package/dist/ui/components/layout/Layout.stories.svelte.d.ts +18 -0
- package/dist/ui/components/layout/Layout.svelte +551 -0
- package/dist/ui/components/layout/Layout.svelte.d.ts +30 -0
- package/dist/ui/components/layout/common/EditModeMessage.svelte +59 -0
- package/dist/ui/components/layout/common/EditModeMessage.svelte.d.ts +3 -0
- package/dist/ui/components/layout/common/index.d.ts +1 -0
- package/dist/ui/components/layout/common/index.js +1 -0
- package/dist/ui/components/layout/index.d.ts +3 -0
- package/dist/ui/components/layout/index.js +2 -0
- package/dist/ui/components/layout/types.d.ts +59 -0
- package/dist/ui/components/layout/types.js +1 -0
- package/dist/ui/components/select/Select.stories.d.ts +94 -0
- package/dist/ui/components/select/Select.stories.js +396 -0
- package/dist/ui/components/select/Select.svelte +705 -0
- package/dist/ui/components/select/Select.svelte.d.ts +11 -0
- package/dist/ui/components/select/index.d.ts +2 -0
- package/dist/ui/components/select/index.js +1 -0
- package/dist/ui/components/select/types.d.ts +94 -0
- package/dist/ui/components/select/types.js +1 -0
- package/dist/ui/components/switch/Switch.stories.d.ts +58 -0
- package/dist/ui/components/switch/Switch.stories.js +198 -0
- package/dist/ui/components/switch/Switch.svelte +220 -0
- package/dist/ui/components/switch/Switch.svelte.d.ts +4 -0
- package/dist/ui/components/switch/index.d.ts +2 -0
- package/dist/ui/components/switch/index.js +1 -0
- package/dist/ui/components/switch/types.d.ts +47 -0
- package/dist/ui/components/switch/types.js +1 -0
- package/dist/ui/components/text/README.md +73 -0
- package/dist/ui/components/text/Text.stories.svelte +203 -0
- package/dist/ui/components/text/Text.stories.svelte.d.ts +27 -0
- package/dist/ui/components/text/Text.svelte +778 -0
- package/dist/ui/components/text/Text.svelte.d.ts +8 -0
- package/dist/ui/components/text/index.d.ts +3 -0
- package/dist/ui/components/text/index.js +2 -0
- package/dist/ui/components/text/types.d.ts +46 -0
- package/dist/ui/components/text/types.js +1 -0
- package/dist/ui/components/tooltip/Tooltip.stories.svelte +128 -0
- package/dist/ui/components/tooltip/Tooltip.stories.svelte.d.ts +27 -0
- package/dist/ui/components/tooltip/Tooltip.svelte +463 -0
- package/dist/ui/components/tooltip/Tooltip.svelte.d.ts +7 -0
- package/dist/ui/components/tooltip/index.d.ts +2 -0
- package/dist/ui/components/tooltip/index.js +1 -0
- package/dist/ui/components/tooltip/types.d.ts +114 -0
- package/dist/ui/components/tooltip/types.js +1 -0
- package/dist/ui/icons/AccordionDownArrow.svelte +8 -0
- package/dist/ui/icons/AccordionDownArrow.svelte.d.ts +26 -0
- package/dist/ui/icons/AccordionUpArrow.svelte +8 -0
- package/dist/ui/icons/AccordionUpArrow.svelte.d.ts +26 -0
- package/dist/ui/icons/AccountIcon.svelte +14 -0
- package/dist/ui/icons/AccountIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/ArrowIcon.svelte +6 -0
- package/dist/ui/icons/ArrowIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/BackIcon.svelte +8 -0
- package/dist/ui/icons/BackIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/BodyIcon.svelte +8 -0
- package/dist/ui/icons/BodyIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/BookmarkIcon.svelte +13 -0
- package/dist/ui/icons/BookmarkIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/BoxAddIcon.svelte +8 -0
- package/dist/ui/icons/BoxAddIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/BrushIcon.svelte +10 -0
- package/dist/ui/icons/BrushIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/BuilderEditIcon.svelte +12 -0
- package/dist/ui/icons/BuilderEditIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/BuilderIcon.svelte +14 -0
- package/dist/ui/icons/BuilderIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/CMSIcon.svelte +8 -0
- package/dist/ui/icons/CMSIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/CheckCircleIcon.svelte +8 -0
- package/dist/ui/icons/CheckCircleIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/CheckCircleOutlinedIcon.svelte +15 -0
- package/dist/ui/icons/CheckCircleOutlinedIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/CheckIcon.svelte +9 -0
- package/dist/ui/icons/CheckIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/CheckboxCheckedIcon.svelte +15 -0
- package/dist/ui/icons/CheckboxCheckedIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/ChevronIcon.svelte +8 -0
- package/dist/ui/icons/ChevronIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/ChevronRightIcon.svelte +8 -0
- package/dist/ui/icons/ChevronRightIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/CircleIcon.svelte +3 -0
- package/dist/ui/icons/CircleIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/CloseCircleIcon.svelte +6 -0
- package/dist/ui/icons/CloseCircleIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/CloseIcon.svelte +8 -0
- package/dist/ui/icons/CloseIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/CodeIcon.svelte +8 -0
- package/dist/ui/icons/CodeIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/ComponentsIcon.svelte +7 -0
- package/dist/ui/icons/ComponentsIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/CookieIcon.svelte +15 -0
- package/dist/ui/icons/CookieIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/CopyIcon.svelte +19 -0
- package/dist/ui/icons/CopyIcon.svelte.d.ts +20 -0
- package/dist/ui/icons/CrossIcon.svelte +4 -0
- package/dist/ui/icons/CrossIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/DOMElement.svelte +19 -0
- package/dist/ui/icons/DOMElement.svelte.d.ts +28 -0
- package/dist/ui/icons/DeleteIcon.svelte +8 -0
- package/dist/ui/icons/DeleteIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/DeleteOutlinedIcon.svelte +8 -0
- package/dist/ui/icons/DeleteOutlinedIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/Desktop.svelte +19 -0
- package/dist/ui/icons/Desktop.svelte.d.ts +21 -0
- package/dist/ui/icons/DesktopWithStar.svelte +21 -0
- package/dist/ui/icons/DesktopWithStar.svelte.d.ts +21 -0
- package/dist/ui/icons/DivBlock.svelte +14 -0
- package/dist/ui/icons/DivBlock.svelte.d.ts +28 -0
- package/dist/ui/icons/EditIcon.svelte +15 -0
- package/dist/ui/icons/EditIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/ExpertIcon.svelte +16 -0
- package/dist/ui/icons/ExpertIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/EyeCancelIcon.svelte +12 -0
- package/dist/ui/icons/EyeCancelIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/EyeIcon.svelte +12 -0
- package/dist/ui/icons/EyeIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/FavouriteIcon.svelte +6 -0
- package/dist/ui/icons/FavouriteIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/FileUploadIcon.svelte +18 -0
- package/dist/ui/icons/FileUploadIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/FilterIcon.svelte +8 -0
- package/dist/ui/icons/FilterIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/FinsweetLibraryIcon.svelte +21 -0
- package/dist/ui/icons/FinsweetLibraryIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/FinsweetLogoIcon.svelte +20 -0
- package/dist/ui/icons/FinsweetLogoIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/FolderIcon.svelte +6 -0
- package/dist/ui/icons/FolderIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/FolderOutlinedIcon.svelte +8 -0
- package/dist/ui/icons/FolderOutlinedIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/FolderPlusIcon.svelte +10 -0
- package/dist/ui/icons/FolderPlusIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/FreeComponentIcon.svelte +8 -0
- package/dist/ui/icons/FreeComponentIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/GlobeIcon.svelte +14 -0
- package/dist/ui/icons/GlobeIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/HandPointUpIcon.svelte +9 -0
- package/dist/ui/icons/HandPointUpIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/HeartIcon.svelte +8 -0
- package/dist/ui/icons/HeartIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/HeartIconOutlined.svelte +8 -0
- package/dist/ui/icons/HeartIconOutlined.svelte.d.ts +26 -0
- package/dist/ui/icons/HelpAltIcon.svelte +23 -0
- package/dist/ui/icons/HelpAltIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/HelpIcon.svelte +16 -0
- package/dist/ui/icons/HelpIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/HomeIcon.svelte +8 -0
- package/dist/ui/icons/HomeIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/InfoIcon.svelte +14 -0
- package/dist/ui/icons/InfoIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/ListIcon.svelte +18 -0
- package/dist/ui/icons/ListIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/LockIcon.svelte +13 -0
- package/dist/ui/icons/LockIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/MessageIcon.svelte +10 -0
- package/dist/ui/icons/MessageIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/MobileLandscape.svelte +20 -0
- package/dist/ui/icons/MobileLandscape.svelte.d.ts +21 -0
- package/dist/ui/icons/MobilePortrait.svelte +20 -0
- package/dist/ui/icons/MobilePortrait.svelte.d.ts +21 -0
- package/dist/ui/icons/NavigatorIcon.svelte +8 -0
- package/dist/ui/icons/NavigatorIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/OpenBookIcon.svelte +8 -0
- package/dist/ui/icons/OpenBookIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/PageDraftIcon.svelte +8 -0
- package/dist/ui/icons/PageDraftIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/PageIcon.svelte +9 -0
- package/dist/ui/icons/PageIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/PageLockedIcon.svelte +8 -0
- package/dist/ui/icons/PageLockedIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/PageOutlinedIcon.svelte +8 -0
- package/dist/ui/icons/PageOutlinedIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/PageSectionIcon.svelte +10 -0
- package/dist/ui/icons/PageSectionIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/Pencil.svelte +12 -0
- package/dist/ui/icons/Pencil.svelte.d.ts +20 -0
- package/dist/ui/icons/PencilOutlinedIcon.svelte +15 -0
- package/dist/ui/icons/PencilOutlinedIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/PinIcon.svelte +8 -0
- package/dist/ui/icons/PinIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/PlayIcon.svelte +8 -0
- package/dist/ui/icons/PlayIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/PlusIcon.svelte +8 -0
- package/dist/ui/icons/PlusIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/PreviewEyeIcon.svelte +12 -0
- package/dist/ui/icons/PreviewEyeIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/ProfileIcon.svelte +12 -0
- package/dist/ui/icons/ProfileIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/PublishCancelIcon.svelte +8 -0
- package/dist/ui/icons/PublishCancelIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/PublishIcon.svelte +12 -0
- package/dist/ui/icons/PublishIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/RefreshIcon.svelte +10 -0
- package/dist/ui/icons/RefreshIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/RepairIcon.svelte +10 -0
- package/dist/ui/icons/RepairIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/SaveIcon.svelte +14 -0
- package/dist/ui/icons/SaveIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/SearchIcon.svelte +8 -0
- package/dist/ui/icons/SearchIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/SelectIcon.svelte +7 -0
- package/dist/ui/icons/SelectIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/SettingsIcon.svelte +8 -0
- package/dist/ui/icons/SettingsIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/SidebarToggleIcon.svelte +28 -0
- package/dist/ui/icons/SidebarToggleIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/SliderAppIcon.svelte +14 -0
- package/dist/ui/icons/SliderAppIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/SquareCheckIcon.svelte +3 -0
- package/dist/ui/icons/SquareCheckIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/StarIcon.svelte +6 -0
- package/dist/ui/icons/StarIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/StarOutlinedIcon.svelte +6 -0
- package/dist/ui/icons/StarOutlinedIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/StaticContentIcon.svelte +8 -0
- package/dist/ui/icons/StaticContentIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/SubtractIcon.svelte +9 -0
- package/dist/ui/icons/SubtractIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/TabNewIcon.svelte +6 -0
- package/dist/ui/icons/TabNewIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/TableAppIcon.svelte +19 -0
- package/dist/ui/icons/TableAppIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/Tablet.svelte +20 -0
- package/dist/ui/icons/Tablet.svelte.d.ts +21 -0
- package/dist/ui/icons/TabletPreview.svelte +20 -0
- package/dist/ui/icons/TabletPreview.svelte.d.ts +21 -0
- package/dist/ui/icons/TabsIcon.svelte +17 -0
- package/dist/ui/icons/TabsIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/ThreeDotsIcon.svelte +14 -0
- package/dist/ui/icons/ThreeDotsIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/TimesIcon.svelte +4 -0
- package/dist/ui/icons/TimesIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/ToolTipInfoCircleIcon.svelte +11 -0
- package/dist/ui/icons/ToolTipInfoCircleIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/TooltipInfoCircleFilled.svelte +13 -0
- package/dist/ui/icons/TooltipInfoCircleFilled.svelte.d.ts +26 -0
- package/dist/ui/icons/TooltipInfoSquaredIcon.svelte +16 -0
- package/dist/ui/icons/TooltipInfoSquaredIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/TriangleDownIcon.svelte +7 -0
- package/dist/ui/icons/TriangleDownIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/TriangleDownIconToggle.svelte +21 -0
- package/dist/ui/icons/TriangleDownIconToggle.svelte.d.ts +20 -0
- package/dist/ui/icons/UndoIcon.svelte +6 -0
- package/dist/ui/icons/UndoIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/UploadFileIcon.svelte +10 -0
- package/dist/ui/icons/UploadFileIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/WarningCircleIcon.svelte +7 -0
- package/dist/ui/icons/WarningCircleIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/WarningCircleOutlineIcon.svelte +14 -0
- package/dist/ui/icons/WarningCircleOutlineIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/WarningTriangleIcon.svelte +6 -0
- package/dist/ui/icons/WarningTriangleIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/WarningTriangleOutlineIcon.svelte +14 -0
- package/dist/ui/icons/WarningTriangleOutlineIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/WebflowComponentIcon.svelte +14 -0
- package/dist/ui/icons/WebflowComponentIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/WebflowComponentOutlinedIcon.svelte +10 -0
- package/dist/ui/icons/WebflowComponentOutlinedIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/WebflowInsightsIcon.svelte +6 -0
- package/dist/ui/icons/WebflowInsightsIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/WizedLogoIcon.svelte +39 -0
- package/dist/ui/icons/WizedLogoIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/XL.svelte +19 -0
- package/dist/ui/icons/XL.svelte.d.ts +21 -0
- package/dist/ui/icons/XXL.svelte +19 -0
- package/dist/ui/icons/XXL.svelte.d.ts +21 -0
- package/dist/ui/icons/XXXL.svelte +19 -0
- package/dist/ui/icons/XXXL.svelte.d.ts +21 -0
- package/dist/ui/icons/apps/FsConsentIcon.svelte +22 -0
- package/dist/ui/icons/apps/FsConsentIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/apps/FsCursorIcon.svelte +12 -0
- package/dist/ui/icons/apps/FsCursorIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/apps/FsExampleIcon.svelte +10 -0
- package/dist/ui/icons/apps/FsExampleIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/apps/FsInstagramFeedIcon.svelte +27 -0
- package/dist/ui/icons/apps/FsInstagramFeedIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/apps/FsMarqueeIcon.svelte +13 -0
- package/dist/ui/icons/apps/FsMarqueeIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/apps/FsNumberCountIcon.svelte +46 -0
- package/dist/ui/icons/apps/FsNumberCountIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/apps/FsSliderIcon.svelte +13 -0
- package/dist/ui/icons/apps/FsSliderIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/apps/FsTablesIcon.svelte +19 -0
- package/dist/ui/icons/apps/FsTablesIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/apps/FsTabsIcon.svelte +24 -0
- package/dist/ui/icons/apps/FsTabsIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/apps/FsTooltipIcon.svelte +12 -0
- package/dist/ui/icons/apps/FsTooltipIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/apps/FsYouTubeFeedIcon.svelte +43 -0
- package/dist/ui/icons/apps/FsYouTubeFeedIcon.svelte.d.ts +26 -0
- package/dist/ui/icons/apps/index.d.ts +15 -0
- package/dist/ui/icons/apps/index.js +15 -0
- package/dist/ui/icons/index.d.ts +120 -0
- package/dist/ui/icons/index.js +120 -0
- package/dist/ui/index.css +494 -0
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.js +2 -0
- package/dist/utils/api/checkIfAppModeIsDesign.d.ts +5 -0
- package/dist/utils/api/checkIfAppModeIsDesign.js +20 -0
- package/dist/utils/api/clipboard/handlePaste.d.ts +46 -0
- package/dist/utils/api/clipboard/handlePaste.js +53 -0
- package/dist/utils/api/clipboard/index.d.ts +1 -0
- package/dist/utils/api/clipboard/index.js +1 -0
- package/dist/utils/api/copyPaste/index.d.ts +18 -0
- package/dist/utils/api/copyPaste/index.js +1 -0
- package/dist/utils/api/getAllAssets.d.ts +12 -0
- package/dist/utils/api/getAllAssets.js +21 -0
- package/dist/utils/api/getFinsweetComponentsEnvironment.d.ts +9 -0
- package/dist/utils/api/getFinsweetComponentsEnvironment.js +70 -0
- package/dist/utils/api/index.d.ts +6 -0
- package/dist/utils/api/index.js +6 -0
- package/dist/utils/api/insertWithXSCP.d.ts +5 -0
- package/dist/utils/api/insertWithXSCP.js +13 -0
- package/dist/utils/auth/crossWindowLogin.d.ts +2 -0
- package/dist/utils/auth/crossWindowLogin.js +49 -0
- package/dist/utils/auth/index.d.ts +61 -0
- package/dist/utils/auth/index.js +196 -0
- package/dist/utils/browser-storage/index.d.ts +2 -0
- package/dist/utils/browser-storage/index.js +2 -0
- package/dist/utils/browser-storage/localStorage.d.ts +24 -0
- package/dist/utils/browser-storage/localStorage.js +56 -0
- package/dist/utils/browser-storage/sessionStorage.d.ts +24 -0
- package/dist/utils/browser-storage/sessionStorage.js +56 -0
- package/dist/utils/constants.d.ts +61 -0
- package/dist/utils/constants.js +73 -0
- package/dist/utils/custom-code/api.d.ts +17 -0
- package/dist/utils/custom-code/api.js +41 -0
- package/dist/utils/custom-code/index.d.ts +1 -0
- package/dist/utils/custom-code/index.js +1 -0
- package/dist/utils/helpers/cleanupTooltipMessage.d.ts +5 -0
- package/dist/utils/helpers/cleanupTooltipMessage.js +25 -0
- package/dist/utils/helpers/goto.d.ts +7 -0
- package/dist/utils/helpers/goto.js +35 -0
- package/dist/utils/helpers/index.d.ts +5 -0
- package/dist/utils/helpers/index.js +5 -0
- package/dist/utils/helpers/noop.d.ts +4 -0
- package/dist/utils/helpers/noop.js +7 -0
- package/dist/utils/helpers/numbers.d.ts +27 -0
- package/dist/utils/helpers/numbers.js +61 -0
- package/dist/utils/helpers/objectsToModuleExports.d.ts +9 -0
- package/dist/utils/helpers/objectsToModuleExports.js +13 -0
- package/dist/utils/helpers/trimText.d.ts +15 -0
- package/dist/utils/helpers/trimText.js +33 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/logger/index.d.ts +19 -0
- package/dist/utils/logger/index.js +41 -0
- package/dist/utils/webflow-canvas/attributes/getAllWebflowElementAttributes.d.ts +6 -0
- package/dist/utils/webflow-canvas/attributes/getAllWebflowElementAttributes.js +19 -0
- package/dist/utils/webflow-canvas/attributes/getInstanceNamesFromObject.d.ts +8 -0
- package/dist/utils/webflow-canvas/attributes/getInstanceNamesFromObject.js +21 -0
- package/dist/utils/webflow-canvas/attributes/getWebflowElementAttribute.d.ts +7 -0
- package/dist/utils/webflow-canvas/attributes/getWebflowElementAttribute.js +25 -0
- package/dist/utils/webflow-canvas/attributes/getWebflowElementTextContent.d.ts +6 -0
- package/dist/utils/webflow-canvas/attributes/getWebflowElementTextContent.js +26 -0
- package/dist/utils/webflow-canvas/attributes/index.d.ts +7 -0
- package/dist/utils/webflow-canvas/attributes/index.js +7 -0
- package/dist/utils/webflow-canvas/attributes/removeWebflowElementAttribute.d.ts +7 -0
- package/dist/utils/webflow-canvas/attributes/removeWebflowElementAttribute.js +37 -0
- package/dist/utils/webflow-canvas/attributes/setStyles.d.ts +10 -0
- package/dist/utils/webflow-canvas/attributes/setStyles.js +36 -0
- package/dist/utils/webflow-canvas/attributes/setWebflowElementAttribute.d.ts +11 -0
- package/dist/utils/webflow-canvas/attributes/setWebflowElementAttribute.js +61 -0
- package/dist/utils/webflow-canvas/findInstanceElement.d.ts +32 -0
- package/dist/utils/webflow-canvas/findInstanceElement.js +144 -0
- package/dist/utils/webflow-canvas/getAllPages.d.ts +29 -0
- package/dist/utils/webflow-canvas/getAllPages.js +93 -0
- package/dist/utils/webflow-canvas/getSiteStagingUrl.d.ts +7 -0
- package/dist/utils/webflow-canvas/getSiteStagingUrl.js +14 -0
- package/dist/utils/webflow-canvas/index.d.ts +3 -0
- package/dist/utils/webflow-canvas/index.js +3 -0
- package/package.json +107 -0
|
@@ -0,0 +1,778 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Component, Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
import { cleanupTooltipMessage } from '../../../utils';
|
|
5
|
+
|
|
6
|
+
import { DeleteIcon, ToolTipInfoCircleIcon, UndoIcon } from '../../icons';
|
|
7
|
+
import Loader from '../Loader.svelte';
|
|
8
|
+
import { Tooltip } from '../tooltip';
|
|
9
|
+
import type {
|
|
10
|
+
TEXT_SIZES,
|
|
11
|
+
TEXT_WEIGHTS,
|
|
12
|
+
TextClickEvent,
|
|
13
|
+
TextPopupActionEvent,
|
|
14
|
+
TextProps
|
|
15
|
+
} from './types';
|
|
16
|
+
|
|
17
|
+
let {
|
|
18
|
+
// Basic text properties
|
|
19
|
+
label = '',
|
|
20
|
+
class: className = '',
|
|
21
|
+
raw = false,
|
|
22
|
+
capitalize = false,
|
|
23
|
+
disabled = false,
|
|
24
|
+
title = '',
|
|
25
|
+
wrap = 'normal',
|
|
26
|
+
textAlign = 'left',
|
|
27
|
+
fontSize = 'normal',
|
|
28
|
+
fontWeight = 'normal',
|
|
29
|
+
fontColor = 'var(--actionPrimaryText)',
|
|
30
|
+
height = '',
|
|
31
|
+
ellipsisOnWidth = '',
|
|
32
|
+
|
|
33
|
+
// Tooltip configuration - pass any tooltip props
|
|
34
|
+
tooltip,
|
|
35
|
+
|
|
36
|
+
// Popup configuration - for action popups (reset, delete, etc.)
|
|
37
|
+
popup,
|
|
38
|
+
|
|
39
|
+
// Icon and loading
|
|
40
|
+
icon = null,
|
|
41
|
+
loading = false,
|
|
42
|
+
|
|
43
|
+
// Link behavior
|
|
44
|
+
link = false,
|
|
45
|
+
|
|
46
|
+
// Event handlers
|
|
47
|
+
onclick,
|
|
48
|
+
|
|
49
|
+
// Snippets
|
|
50
|
+
children,
|
|
51
|
+
pill,
|
|
52
|
+
|
|
53
|
+
...restProps
|
|
54
|
+
}: TextProps & {
|
|
55
|
+
onclick?: (event: MouseEvent) => void;
|
|
56
|
+
} = $props();
|
|
57
|
+
|
|
58
|
+
// Text size and weight mappings
|
|
59
|
+
let textFontSizes: Record<TEXT_SIZES, string> = {
|
|
60
|
+
normal: '11.5px',
|
|
61
|
+
large: '12.5px'
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
let textFontWeights: Record<TEXT_WEIGHTS, string> = {
|
|
65
|
+
normal: '400',
|
|
66
|
+
bold: '600'
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
// Derived computed values using $derived
|
|
70
|
+
let computedFontSize = $derived(() => {
|
|
71
|
+
const fontSizeKey = fontSize as keyof typeof textFontSizes;
|
|
72
|
+
return textFontSizes[fontSizeKey] || fontSize;
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
let computedFontWeight = $derived(() => {
|
|
76
|
+
const fontWeightKey = fontWeight as keyof typeof textFontWeights;
|
|
77
|
+
return textFontWeights[fontWeightKey] || fontWeight;
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// State for popup functionality
|
|
81
|
+
let isPopupHidden = $state(true);
|
|
82
|
+
let wrapperElement: HTMLElement | undefined = $state();
|
|
83
|
+
let popupElement: HTMLElement | undefined = $state();
|
|
84
|
+
|
|
85
|
+
// Computed popup configuration with defaults
|
|
86
|
+
let popupConfig = $derived({
|
|
87
|
+
disabled: popup?.disabled ?? false,
|
|
88
|
+
title: popup?.title ?? 'Remove',
|
|
89
|
+
subtitle: popup?.subtitle ?? 'Alt + click',
|
|
90
|
+
description: popup?.description ?? 'This action will remove the current selection.',
|
|
91
|
+
icon: popup?.icon ?? DeleteIcon,
|
|
92
|
+
active: popup?.active ?? false
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
// Dynamic component assignments for Svelte 5
|
|
96
|
+
let IconComponent = $derived(icon);
|
|
97
|
+
let PopupIconComponent = $derived(popupConfig.icon);
|
|
98
|
+
|
|
99
|
+
// Check if popup should be enabled (only when popup prop has content and is active)
|
|
100
|
+
let hasPopup = $derived(
|
|
101
|
+
!!popup && Object.keys(popup).length > 0 && !popup.disabled && popup.active === true
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Handles the popup action functionality
|
|
106
|
+
*/
|
|
107
|
+
function handlePopupAction(): void {
|
|
108
|
+
const actionEvent: TextPopupActionEvent = {
|
|
109
|
+
detail: true
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
// Dispatch action event
|
|
113
|
+
if (wrapperElement) {
|
|
114
|
+
wrapperElement.dispatchEvent(new CustomEvent('popupAction', actionEvent));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
isPopupHidden = true;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Handle keydown events to detect Alt+Enter for popup action
|
|
122
|
+
*/
|
|
123
|
+
function handleAltEnter(event: KeyboardEvent): void {
|
|
124
|
+
if (event.altKey && event.code === 'Enter') {
|
|
125
|
+
handlePopupAction();
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Handle click events
|
|
131
|
+
*/
|
|
132
|
+
function handleClick(event: MouseEvent): void {
|
|
133
|
+
if (disabled || loading) return;
|
|
134
|
+
|
|
135
|
+
const clickEvent: TextClickEvent = {
|
|
136
|
+
detail: event
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
onclick?.(event);
|
|
140
|
+
|
|
141
|
+
// Dispatch custom click event
|
|
142
|
+
if (wrapperElement) {
|
|
143
|
+
wrapperElement.dispatchEvent(new CustomEvent('textClick', clickEvent));
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Handle popup toggle
|
|
149
|
+
*/
|
|
150
|
+
function handlePopupToggle(event: Event): void {
|
|
151
|
+
event.stopPropagation();
|
|
152
|
+
isPopupHidden = false;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Handle click outside the popup
|
|
157
|
+
*/
|
|
158
|
+
function handleClickOutside(event: Event): void {
|
|
159
|
+
if (popupElement && !popupElement.contains(event.target as Node)) {
|
|
160
|
+
isPopupHidden = true;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Handle popup click
|
|
166
|
+
*/
|
|
167
|
+
function handlePopupClick(event: MouseEvent): void {
|
|
168
|
+
event.stopPropagation();
|
|
169
|
+
handlePopupAction();
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Handle popup keyboard interaction
|
|
174
|
+
*/
|
|
175
|
+
function handlePopupKeydown(event: KeyboardEvent): void {
|
|
176
|
+
if (event.key === 'Enter') {
|
|
177
|
+
event.stopPropagation();
|
|
178
|
+
handlePopupAction();
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// Effect for setting up Alt+Enter listener when popup is open
|
|
183
|
+
$effect(() => {
|
|
184
|
+
if (!isPopupHidden && wrapperElement) {
|
|
185
|
+
wrapperElement.addEventListener('keydown', handleAltEnter);
|
|
186
|
+
wrapperElement.focus();
|
|
187
|
+
|
|
188
|
+
return () => {
|
|
189
|
+
wrapperElement?.removeEventListener('keydown', handleAltEnter);
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
// Effect for handling click outside to close popup
|
|
195
|
+
$effect(() => {
|
|
196
|
+
if (!isPopupHidden) {
|
|
197
|
+
document.addEventListener('click', handleClickOutside);
|
|
198
|
+
|
|
199
|
+
return () => {
|
|
200
|
+
document.removeEventListener('click', handleClickOutside);
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
// Computed CSS classes
|
|
206
|
+
let labelClasses = $derived(() => {
|
|
207
|
+
const classes = ['labels'];
|
|
208
|
+
if (disabled) classes.push('disabled');
|
|
209
|
+
if (link) classes.push('link');
|
|
210
|
+
if (loading) classes.push('is-busy');
|
|
211
|
+
if (hasPopup && popupConfig.active) classes.push('active');
|
|
212
|
+
classes.push(className);
|
|
213
|
+
return classes.join(' ');
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
// Determine if this should be interactive (button-like)
|
|
217
|
+
let isInteractive = $derived(!!onclick || link || hasPopup || !!tooltip);
|
|
218
|
+
|
|
219
|
+
let textClasses = $derived(() => {
|
|
220
|
+
const classes = ['text'];
|
|
221
|
+
if (ellipsisOnWidth && !icon && !loading) {
|
|
222
|
+
classes.push('ellipsis');
|
|
223
|
+
}
|
|
224
|
+
return classes.join(' ');
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
let textStyles = $derived(() => {
|
|
228
|
+
const styles = [
|
|
229
|
+
`font-weight: ${computedFontWeight()}`,
|
|
230
|
+
`font-size: ${computedFontSize()}`,
|
|
231
|
+
`color: ${fontColor}`
|
|
232
|
+
];
|
|
233
|
+
|
|
234
|
+
if (capitalize) styles.push('text-transform: capitalize');
|
|
235
|
+
if (height) styles.push(`height: ${height}`);
|
|
236
|
+
|
|
237
|
+
// Handle ellipsis - different behavior for text-only vs text-with-icons
|
|
238
|
+
if (ellipsisOnWidth && !(icon || loading)) {
|
|
239
|
+
// Text-only ellipsis: use block display with text-align for proper ellipsis
|
|
240
|
+
styles.push(`width: ${ellipsisOnWidth}`);
|
|
241
|
+
styles.push('white-space: nowrap');
|
|
242
|
+
styles.push('overflow: hidden');
|
|
243
|
+
styles.push('text-overflow: ellipsis');
|
|
244
|
+
styles.push('display: block');
|
|
245
|
+
styles.push(`text-align: ${textAlign}`);
|
|
246
|
+
} else if (ellipsisOnWidth && (icon || loading)) {
|
|
247
|
+
// Text-with-icons ellipsis: just apply ellipsis, width is handled by container
|
|
248
|
+
styles.push('white-space: nowrap');
|
|
249
|
+
styles.push('overflow: hidden');
|
|
250
|
+
styles.push('text-overflow: ellipsis');
|
|
251
|
+
styles.push('flex: 1');
|
|
252
|
+
styles.push('min-width: 0');
|
|
253
|
+
} else {
|
|
254
|
+
// Normal wrapping behavior
|
|
255
|
+
styles.push(`white-space: ${wrap}`);
|
|
256
|
+
styles.push('display: flex');
|
|
257
|
+
styles.push('align-items: center');
|
|
258
|
+
styles.push('gap: 4px');
|
|
259
|
+
styles.push(`text-align: ${textAlign}`);
|
|
260
|
+
// Add justify-content for alignment
|
|
261
|
+
if (textAlign === 'center') styles.push('justify-content: center');
|
|
262
|
+
else if (textAlign === 'right') styles.push('justify-content: flex-end');
|
|
263
|
+
else styles.push('justify-content: flex-start');
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
return styles.join('; ');
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
let labelStyles = $derived(() => {
|
|
270
|
+
const styles: string[] = [];
|
|
271
|
+
// Container styles if needed
|
|
272
|
+
return styles.length > 0 ? styles.join('; ') : undefined;
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
// Show tooltip logic - hide tooltip when popup is showing (popup takes priority)
|
|
276
|
+
let shouldShowTooltip = $derived(
|
|
277
|
+
!!tooltip &&
|
|
278
|
+
Object.keys(tooltip).length > 0 &&
|
|
279
|
+
(tooltip.message || tooltip.tooltipContent) &&
|
|
280
|
+
!disabled &&
|
|
281
|
+
(isPopupHidden || !hasPopup)
|
|
282
|
+
);
|
|
283
|
+
</script>
|
|
284
|
+
|
|
285
|
+
{#if label || tooltip || icon || children}
|
|
286
|
+
{#if !hasPopup && shouldShowTooltip}
|
|
287
|
+
<!-- Simple text with tooltip -->
|
|
288
|
+
<Tooltip {...tooltip}>
|
|
289
|
+
{#snippet target()}
|
|
290
|
+
<div
|
|
291
|
+
class={labelClasses()}
|
|
292
|
+
data-component="Text"
|
|
293
|
+
{...isInteractive ? { tabindex: 0 } : {}}
|
|
294
|
+
role={isInteractive ? 'button' : undefined}
|
|
295
|
+
onclick={handleClick}
|
|
296
|
+
{title}
|
|
297
|
+
style={labelStyles()}
|
|
298
|
+
{...restProps}
|
|
299
|
+
>
|
|
300
|
+
{#if label?.trim() || icon || children}
|
|
301
|
+
{#if ellipsisOnWidth && (icon || loading)}
|
|
302
|
+
<!-- handling ellipsis with icons -->
|
|
303
|
+
<div
|
|
304
|
+
class="text-with-icon"
|
|
305
|
+
style="display: flex; align-items: center; gap: 4px; width: {ellipsisOnWidth}; justify-content: {textAlign ===
|
|
306
|
+
'center'
|
|
307
|
+
? 'center'
|
|
308
|
+
: textAlign === 'right'
|
|
309
|
+
? 'flex-end'
|
|
310
|
+
: 'flex-start'};"
|
|
311
|
+
>
|
|
312
|
+
{#if icon || loading}
|
|
313
|
+
{#if loading}
|
|
314
|
+
<div class="loading" style="flex-shrink: 0;">
|
|
315
|
+
<Loader size={16} />
|
|
316
|
+
</div>
|
|
317
|
+
{:else if icon}
|
|
318
|
+
<IconComponent style="flex-shrink: 0;" />
|
|
319
|
+
{/if}
|
|
320
|
+
{/if}
|
|
321
|
+
<div class={textClasses()} style={textStyles()}>
|
|
322
|
+
{#if children}
|
|
323
|
+
{@render children()}
|
|
324
|
+
{:else if raw}
|
|
325
|
+
{@html label}
|
|
326
|
+
{:else}
|
|
327
|
+
{label}
|
|
328
|
+
{/if}
|
|
329
|
+
</div>
|
|
330
|
+
</div>
|
|
331
|
+
{:else}
|
|
332
|
+
<!-- Normal text handling -->
|
|
333
|
+
<div class={textClasses()} style={textStyles()}>
|
|
334
|
+
{#if icon || loading}
|
|
335
|
+
{#if loading}
|
|
336
|
+
<div class="loading">
|
|
337
|
+
<Loader size={16} />
|
|
338
|
+
</div>
|
|
339
|
+
{:else if icon}
|
|
340
|
+
<IconComponent />
|
|
341
|
+
{/if}
|
|
342
|
+
{/if}
|
|
343
|
+
|
|
344
|
+
{#if children}
|
|
345
|
+
{@render children()}
|
|
346
|
+
{:else if raw}
|
|
347
|
+
{@html label}
|
|
348
|
+
{:else}
|
|
349
|
+
{label}
|
|
350
|
+
{/if}
|
|
351
|
+
</div>
|
|
352
|
+
{/if}
|
|
353
|
+
{/if}
|
|
354
|
+
|
|
355
|
+
{#if pill}
|
|
356
|
+
{@render pill()}
|
|
357
|
+
{/if}
|
|
358
|
+
</div>
|
|
359
|
+
{/snippet}
|
|
360
|
+
</Tooltip>
|
|
361
|
+
{:else if !hasPopup}
|
|
362
|
+
<!-- Simple text without tooltip -->
|
|
363
|
+
<div
|
|
364
|
+
class={labelClasses()}
|
|
365
|
+
data-component="Text"
|
|
366
|
+
{...isInteractive ? { tabindex: 0 } : {}}
|
|
367
|
+
role={isInteractive ? 'button' : undefined}
|
|
368
|
+
onclick={handleClick}
|
|
369
|
+
{title}
|
|
370
|
+
style={labelStyles()}
|
|
371
|
+
{...restProps}
|
|
372
|
+
>
|
|
373
|
+
{#if label?.trim() || icon || children}
|
|
374
|
+
{#if ellipsisOnWidth && (icon || loading)}
|
|
375
|
+
<!-- handling ellipsis with icons -->
|
|
376
|
+
<div
|
|
377
|
+
class="text-with-icon"
|
|
378
|
+
style="display: flex; align-items: center; gap: 4px; width: {ellipsisOnWidth}; justify-content: {textAlign ===
|
|
379
|
+
'center'
|
|
380
|
+
? 'center'
|
|
381
|
+
: textAlign === 'right'
|
|
382
|
+
? 'flex-end'
|
|
383
|
+
: 'flex-start'};"
|
|
384
|
+
>
|
|
385
|
+
{#if icon || loading}
|
|
386
|
+
{#if loading}
|
|
387
|
+
<div class="loading" style="flex-shrink: 0;">
|
|
388
|
+
<Loader size={16} />
|
|
389
|
+
</div>
|
|
390
|
+
{:else if icon}
|
|
391
|
+
<IconComponent style="flex-shrink: 0;" />
|
|
392
|
+
{/if}
|
|
393
|
+
{/if}
|
|
394
|
+
<div class={textClasses()} style={textStyles()}>
|
|
395
|
+
{#if children}
|
|
396
|
+
{@render children()}
|
|
397
|
+
{:else if raw}
|
|
398
|
+
{@html label}
|
|
399
|
+
{:else}
|
|
400
|
+
{label}
|
|
401
|
+
{/if}
|
|
402
|
+
</div>
|
|
403
|
+
</div>
|
|
404
|
+
{:else}
|
|
405
|
+
<!-- Normal text handling -->
|
|
406
|
+
<div class={textClasses()} style={textStyles()}>
|
|
407
|
+
{#if icon || loading}
|
|
408
|
+
{#if loading}
|
|
409
|
+
<div class="loading">
|
|
410
|
+
<Loader size={16} />
|
|
411
|
+
</div>
|
|
412
|
+
{:else if icon}
|
|
413
|
+
<IconComponent />
|
|
414
|
+
{/if}
|
|
415
|
+
{/if}
|
|
416
|
+
|
|
417
|
+
{#if children}
|
|
418
|
+
{@render children()}
|
|
419
|
+
{:else if raw}
|
|
420
|
+
{@html label}
|
|
421
|
+
{:else}
|
|
422
|
+
{label}
|
|
423
|
+
{/if}
|
|
424
|
+
</div>
|
|
425
|
+
{/if}
|
|
426
|
+
{/if}
|
|
427
|
+
|
|
428
|
+
{#if pill}
|
|
429
|
+
{@render pill()}
|
|
430
|
+
{/if}
|
|
431
|
+
</div>
|
|
432
|
+
{:else}
|
|
433
|
+
<!-- Text with popup functionality -->
|
|
434
|
+
<div
|
|
435
|
+
class="label-popup {disabled ? 'disabled' : ''}"
|
|
436
|
+
onclick={handlePopupToggle}
|
|
437
|
+
onkeydown={(e) => e.key === 'Enter' && handlePopupToggle(e)}
|
|
438
|
+
bind:this={wrapperElement}
|
|
439
|
+
role="button"
|
|
440
|
+
tabindex="-1"
|
|
441
|
+
>
|
|
442
|
+
<Tooltip
|
|
443
|
+
position="fixed"
|
|
444
|
+
offsetVal={0}
|
|
445
|
+
padding="0"
|
|
446
|
+
width="200px"
|
|
447
|
+
showArrow={false}
|
|
448
|
+
bind:hidden={isPopupHidden}
|
|
449
|
+
listener="click"
|
|
450
|
+
listenerout="click"
|
|
451
|
+
>
|
|
452
|
+
{#snippet target()}
|
|
453
|
+
<span class="dropdown-label item {popupConfig.active ? 'active' : ''}">
|
|
454
|
+
{#if shouldShowTooltip}
|
|
455
|
+
<!-- Text with popup and tooltip -->
|
|
456
|
+
<Tooltip {...tooltip}>
|
|
457
|
+
{#snippet target()}
|
|
458
|
+
<div
|
|
459
|
+
class={labelClasses()}
|
|
460
|
+
data-component="Text"
|
|
461
|
+
{...isInteractive ? { tabindex: 0 } : {}}
|
|
462
|
+
role={isInteractive ? 'button' : undefined}
|
|
463
|
+
onclick={handleClick}
|
|
464
|
+
{title}
|
|
465
|
+
style={labelStyles()}
|
|
466
|
+
{...restProps}
|
|
467
|
+
>
|
|
468
|
+
{#if label?.trim() || icon || children}
|
|
469
|
+
{#if ellipsisOnWidth && (icon || loading)}
|
|
470
|
+
<!-- handling ellipsis with icons -->
|
|
471
|
+
<div
|
|
472
|
+
class="text-with-icon"
|
|
473
|
+
style="display: flex; align-items: center; gap: 4px; width: {ellipsisOnWidth}; justify-content: {textAlign ===
|
|
474
|
+
'center'
|
|
475
|
+
? 'center'
|
|
476
|
+
: textAlign === 'right'
|
|
477
|
+
? 'flex-end'
|
|
478
|
+
: 'flex-start'};"
|
|
479
|
+
>
|
|
480
|
+
{#if icon || loading}
|
|
481
|
+
{#if loading}
|
|
482
|
+
<div class="loading" style="flex-shrink: 0;">
|
|
483
|
+
<Loader size={16} />
|
|
484
|
+
</div>
|
|
485
|
+
{:else if icon}
|
|
486
|
+
<IconComponent style="flex-shrink: 0;" />
|
|
487
|
+
{/if}
|
|
488
|
+
{/if}
|
|
489
|
+
<div class={textClasses()} style={textStyles()}>
|
|
490
|
+
{#if children}
|
|
491
|
+
{@render children()}
|
|
492
|
+
{:else if raw}
|
|
493
|
+
{@html label}
|
|
494
|
+
{:else}
|
|
495
|
+
{label}
|
|
496
|
+
{/if}
|
|
497
|
+
</div>
|
|
498
|
+
</div>
|
|
499
|
+
{:else}
|
|
500
|
+
<!-- Normal text handling -->
|
|
501
|
+
<div class={textClasses()} style={textStyles()}>
|
|
502
|
+
{#if icon || loading}
|
|
503
|
+
{#if loading}
|
|
504
|
+
<div class="loading">
|
|
505
|
+
<Loader size={16} />
|
|
506
|
+
</div>
|
|
507
|
+
{:else if icon}
|
|
508
|
+
<IconComponent />
|
|
509
|
+
{/if}
|
|
510
|
+
{/if}
|
|
511
|
+
|
|
512
|
+
{#if children}
|
|
513
|
+
{@render children()}
|
|
514
|
+
{:else if raw}
|
|
515
|
+
{@html label}
|
|
516
|
+
{:else}
|
|
517
|
+
{label}
|
|
518
|
+
{/if}
|
|
519
|
+
</div>
|
|
520
|
+
{/if}
|
|
521
|
+
{/if}
|
|
522
|
+
|
|
523
|
+
{#if pill}
|
|
524
|
+
{@render pill()}
|
|
525
|
+
{/if}
|
|
526
|
+
</div>
|
|
527
|
+
{/snippet}
|
|
528
|
+
</Tooltip>
|
|
529
|
+
{:else}
|
|
530
|
+
<!-- Text with popup without tooltip -->
|
|
531
|
+
<div
|
|
532
|
+
class={labelClasses()}
|
|
533
|
+
data-component="Text"
|
|
534
|
+
{...isInteractive ? { tabindex: 0 } : {}}
|
|
535
|
+
role={isInteractive ? 'button' : undefined}
|
|
536
|
+
onclick={handleClick}
|
|
537
|
+
{title}
|
|
538
|
+
style={labelStyles()}
|
|
539
|
+
{...restProps}
|
|
540
|
+
>
|
|
541
|
+
{#if label?.trim() || icon || children}
|
|
542
|
+
{#if ellipsisOnWidth && (icon || loading)}
|
|
543
|
+
<!-- handling ellipsis with icons -->
|
|
544
|
+
<div
|
|
545
|
+
class="text-with-icon"
|
|
546
|
+
style="display: flex; align-items: center; gap: 4px; width: {ellipsisOnWidth}; justify-content: {textAlign ===
|
|
547
|
+
'center'
|
|
548
|
+
? 'center'
|
|
549
|
+
: textAlign === 'right'
|
|
550
|
+
? 'flex-end'
|
|
551
|
+
: 'flex-start'};"
|
|
552
|
+
>
|
|
553
|
+
{#if icon || loading}
|
|
554
|
+
{#if loading}
|
|
555
|
+
<div class="loading" style="flex-shrink: 0;">
|
|
556
|
+
<Loader size={16} />
|
|
557
|
+
</div>
|
|
558
|
+
{:else if icon}
|
|
559
|
+
<IconComponent style="flex-shrink: 0;" />
|
|
560
|
+
{/if}
|
|
561
|
+
{/if}
|
|
562
|
+
<div class={textClasses()} style={textStyles()}>
|
|
563
|
+
{#if children}
|
|
564
|
+
{@render children()}
|
|
565
|
+
{:else if raw}
|
|
566
|
+
{@html label}
|
|
567
|
+
{:else}
|
|
568
|
+
{label}
|
|
569
|
+
{/if}
|
|
570
|
+
</div>
|
|
571
|
+
</div>
|
|
572
|
+
{:else}
|
|
573
|
+
<!-- Normal text handling -->
|
|
574
|
+
<div class={textClasses()} style={textStyles()}>
|
|
575
|
+
{#if icon || loading}
|
|
576
|
+
{#if loading}
|
|
577
|
+
<div class="loading">
|
|
578
|
+
<Loader size={16} />
|
|
579
|
+
</div>
|
|
580
|
+
{:else if icon}
|
|
581
|
+
<IconComponent />
|
|
582
|
+
{/if}
|
|
583
|
+
{/if}
|
|
584
|
+
|
|
585
|
+
{#if children}
|
|
586
|
+
{@render children()}
|
|
587
|
+
{:else if raw}
|
|
588
|
+
{@html label}
|
|
589
|
+
{:else}
|
|
590
|
+
{label}
|
|
591
|
+
{/if}
|
|
592
|
+
</div>
|
|
593
|
+
{/if}
|
|
594
|
+
{/if}
|
|
595
|
+
|
|
596
|
+
{#if pill}
|
|
597
|
+
{@render pill()}
|
|
598
|
+
{/if}
|
|
599
|
+
</div>
|
|
600
|
+
{/if}
|
|
601
|
+
</span>
|
|
602
|
+
{/snippet}
|
|
603
|
+
{#snippet tooltipContent()}
|
|
604
|
+
<div
|
|
605
|
+
class="popup-wrapper"
|
|
606
|
+
style={!popupConfig.active ? 'display:none' : ''}
|
|
607
|
+
bind:this={popupElement}
|
|
608
|
+
>
|
|
609
|
+
<div
|
|
610
|
+
class="popup-header"
|
|
611
|
+
role="button"
|
|
612
|
+
tabindex="0"
|
|
613
|
+
onclick={handlePopupClick}
|
|
614
|
+
onkeydown={handlePopupKeydown}
|
|
615
|
+
>
|
|
616
|
+
<PopupIconComponent />
|
|
617
|
+
<span class="popup-title">{popupConfig.title}</span>
|
|
618
|
+
<span class="popup-subtitle">{popupConfig.subtitle}</span>
|
|
619
|
+
</div>
|
|
620
|
+
<div class="popup-description">
|
|
621
|
+
<span>{popupConfig.description}</span>
|
|
622
|
+
</div>
|
|
623
|
+
</div>
|
|
624
|
+
{/snippet}
|
|
625
|
+
</Tooltip>
|
|
626
|
+
</div>
|
|
627
|
+
{/if}
|
|
628
|
+
{/if}
|
|
629
|
+
|
|
630
|
+
<style>
|
|
631
|
+
.text {
|
|
632
|
+
font-family: inherit;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
.labels.link {
|
|
636
|
+
cursor: pointer;
|
|
637
|
+
padding: 4px;
|
|
638
|
+
border-radius: 4px;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
.labels.link:hover:not(.disabled),
|
|
642
|
+
.labels.link.is-busy {
|
|
643
|
+
background-color: var(--defaultLightHover);
|
|
644
|
+
border-radius: 4px;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
.labels :global(.target .message) {
|
|
648
|
+
font-weight: 500;
|
|
649
|
+
font-size: 11px;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
.labels.disabled,
|
|
653
|
+
.labels.link.is-busy {
|
|
654
|
+
opacity: 0.75;
|
|
655
|
+
cursor: not-allowed;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
.labels {
|
|
659
|
+
display: block;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
.loading {
|
|
663
|
+
display: flex;
|
|
664
|
+
align-items: center;
|
|
665
|
+
justify-content: center;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
/* Label-specific styles */
|
|
669
|
+
.label-popup.disabled {
|
|
670
|
+
opacity: 0.75;
|
|
671
|
+
cursor: not-allowed;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.label-popup :global(.target:has(.item)) {
|
|
675
|
+
display: flex;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
.label-popup :global(.tooltip:has(.popup)) {
|
|
679
|
+
border-radius: none;
|
|
680
|
+
background: none;
|
|
681
|
+
box-shadow: none;
|
|
682
|
+
z-index: 9999999;
|
|
683
|
+
width: max-content;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
.dropdown-label {
|
|
687
|
+
width: 100%;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
:global(.dropdown-label.active .labels:not(.dropdown-label [role='tooltip'] .labels)) {
|
|
691
|
+
color: rgb(138, 194, 255);
|
|
692
|
+
background: rgba(0, 132, 255, 0.18);
|
|
693
|
+
cursor: pointer;
|
|
694
|
+
border-radius: 4px;
|
|
695
|
+
display: grid !important;
|
|
696
|
+
grid-template-columns: 1fr max-content !important;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
* {
|
|
700
|
+
font-family: Inter;
|
|
701
|
+
font-style: normal;
|
|
702
|
+
line-height: 16px;
|
|
703
|
+
letter-spacing: -0.115px;
|
|
704
|
+
color: var(--actionPrimaryText);
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
/* Popup Wrapper Styles - matching original popup design */
|
|
708
|
+
.popup-wrapper {
|
|
709
|
+
display: flex;
|
|
710
|
+
width: 200px;
|
|
711
|
+
flex-direction: column;
|
|
712
|
+
justify-content: center;
|
|
713
|
+
align-items: flex-start;
|
|
714
|
+
border-radius: 4px;
|
|
715
|
+
border: 1px solid var(--border-border-1, #363636);
|
|
716
|
+
background: #353535;
|
|
717
|
+
height: max-content;
|
|
718
|
+
min-height: 80px;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
.popup-header {
|
|
722
|
+
display: grid;
|
|
723
|
+
grid-template-columns: max-content 1fr max-content;
|
|
724
|
+
padding: 8px;
|
|
725
|
+
align-items: center;
|
|
726
|
+
cursor: pointer;
|
|
727
|
+
gap: 8px;
|
|
728
|
+
align-self: stretch;
|
|
729
|
+
border-bottom: 1px solid var(--border1, #363636);
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
.popup-header:hover {
|
|
733
|
+
background-color: var(--hoverColor);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
.popup-title {
|
|
737
|
+
color: var(--text1, #f5f5f5);
|
|
738
|
+
font-size: 11px;
|
|
739
|
+
font-style: normal;
|
|
740
|
+
font-weight: 500;
|
|
741
|
+
display: flex;
|
|
742
|
+
flex-direction: column;
|
|
743
|
+
justify-content: center;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
.popup-subtitle {
|
|
747
|
+
color: var(--text2, #bdbdbd);
|
|
748
|
+
font-size: 11px;
|
|
749
|
+
font-style: normal;
|
|
750
|
+
font-weight: 500;
|
|
751
|
+
display: flex;
|
|
752
|
+
flex-direction: column;
|
|
753
|
+
justify-content: center;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
.popup-description {
|
|
757
|
+
display: flex;
|
|
758
|
+
padding: 8px;
|
|
759
|
+
align-items: center;
|
|
760
|
+
gap: 12px;
|
|
761
|
+
align-self: stretch;
|
|
762
|
+
height: max-content;
|
|
763
|
+
min-height: 48px;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
.popup-description span {
|
|
767
|
+
color: var(--text2, #bdbdbd);
|
|
768
|
+
font-family: Inter;
|
|
769
|
+
font-size: 11px;
|
|
770
|
+
font-style: normal;
|
|
771
|
+
font-weight: 400;
|
|
772
|
+
line-height: 16px;
|
|
773
|
+
display: flex;
|
|
774
|
+
flex-direction: column;
|
|
775
|
+
justify-content: center;
|
|
776
|
+
flex: 1 0 0;
|
|
777
|
+
}
|
|
778
|
+
</style>
|