@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,106 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { createEventDispatcher } from 'svelte';
|
|
3
|
+
|
|
4
|
+
export let id: string;
|
|
5
|
+
export let buttons: { name: string; value: string }[] = [];
|
|
6
|
+
export let selected: string;
|
|
7
|
+
export let disabled = false;
|
|
8
|
+
|
|
9
|
+
const dispatch = createEventDispatcher<{
|
|
10
|
+
select: string;
|
|
11
|
+
}>();
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Sets selected value and dispatches the select event.
|
|
15
|
+
* @param value
|
|
16
|
+
*/
|
|
17
|
+
const selectButton = (value: string) => {
|
|
18
|
+
if (disabled) return;
|
|
19
|
+
selected = value;
|
|
20
|
+
dispatch('select', value);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Handles the keydown event for the button.
|
|
25
|
+
* @param event
|
|
26
|
+
* @param value
|
|
27
|
+
*/
|
|
28
|
+
const handleKeydown = (event: KeyboardEvent, value: string) => {
|
|
29
|
+
if (disabled) return;
|
|
30
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
31
|
+
selectButton(value);
|
|
32
|
+
event.preventDefault();
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<div class="button-group">
|
|
38
|
+
{#each buttons as { name, value }, index (index)}
|
|
39
|
+
<div
|
|
40
|
+
{id}
|
|
41
|
+
class="button {selected === value ? 'active' : ''} {disabled ? 'disabled' : ''}"
|
|
42
|
+
role="button"
|
|
43
|
+
tabindex={disabled ? -1 : 0}
|
|
44
|
+
on:click={() => selectButton(value)}
|
|
45
|
+
{...{
|
|
46
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
47
|
+
//@ts-ignore - svelte v4 types for markdown not supported https://github.com/sveltejs/svelte/issues/4701
|
|
48
|
+
//on:keydown: (event: KeyboardEvent) => handleKeydown(event, value)
|
|
49
|
+
}}
|
|
50
|
+
on:keydown={(event) => handleKeydown(event, value)}
|
|
51
|
+
aria-disabled={disabled}
|
|
52
|
+
>
|
|
53
|
+
{name}
|
|
54
|
+
</div>
|
|
55
|
+
{/each}
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<style>
|
|
59
|
+
.button-group {
|
|
60
|
+
display: flex;
|
|
61
|
+
background: var(
|
|
62
|
+
--action-action-secondary-background,
|
|
63
|
+
linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.1) 100%)
|
|
64
|
+
);
|
|
65
|
+
border-radius: var(--border-radius);
|
|
66
|
+
box-shadow: var(--boxShadows-action-secondary);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.button {
|
|
70
|
+
padding: 4px 8px;
|
|
71
|
+
cursor: pointer;
|
|
72
|
+
background: transparent;
|
|
73
|
+
border-radius: 0px;
|
|
74
|
+
transition: background-color 0.2s;
|
|
75
|
+
border-width: 0px;
|
|
76
|
+
margin: 2px 0px;
|
|
77
|
+
color: var(--text1);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.button.disabled {
|
|
81
|
+
opacity: 0.75;
|
|
82
|
+
cursor: not-allowed;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.button-group .button:first-of-type {
|
|
86
|
+
margin-left: 2px;
|
|
87
|
+
border-top-left-radius: var(--border-radius);
|
|
88
|
+
border-bottom-left-radius: var(--border-radius);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.button-group .button:last-of-type {
|
|
92
|
+
margin-right: 2px;
|
|
93
|
+
border-top-right-radius: var(--border-radius);
|
|
94
|
+
border-bottom-right-radius: var(--border-radius);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.button:hover {
|
|
98
|
+
background-color: var(--actionSecondaryBackgroundHover);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.button.active {
|
|
102
|
+
background: var(--background1);
|
|
103
|
+
color: white;
|
|
104
|
+
border-radius: var(--border-radius);
|
|
105
|
+
}
|
|
106
|
+
</style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const ButtonGroup: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
id: string;
|
|
16
|
+
buttons?: {
|
|
17
|
+
name: string;
|
|
18
|
+
value: string;
|
|
19
|
+
}[];
|
|
20
|
+
selected: string;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
}, {
|
|
23
|
+
select: CustomEvent<string>;
|
|
24
|
+
} & {
|
|
25
|
+
[evt: string]: CustomEvent<any>;
|
|
26
|
+
}, {}, {}, string>;
|
|
27
|
+
type ButtonGroup = InstanceType<typeof ButtonGroup>;
|
|
28
|
+
export default ButtonGroup;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { createEventDispatcher } from 'svelte';
|
|
3
|
+
|
|
4
|
+
import { SquareCheckIcon } from '../icons';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* This is the value of the checkbox.
|
|
8
|
+
*/
|
|
9
|
+
export let value: boolean = false;
|
|
10
|
+
/**
|
|
11
|
+
* This means the checkbox is disabled.
|
|
12
|
+
*/
|
|
13
|
+
export let disabled: boolean = false;
|
|
14
|
+
/**
|
|
15
|
+
* This means you are using an external state to control the checkbox.
|
|
16
|
+
*/
|
|
17
|
+
export let preventChange: boolean = false;
|
|
18
|
+
/**
|
|
19
|
+
* This is the id of the checkbox.
|
|
20
|
+
*/
|
|
21
|
+
export let id: string = '';
|
|
22
|
+
/**
|
|
23
|
+
* This is the type of the checkbox. Defaults to `checkbox`.
|
|
24
|
+
*/
|
|
25
|
+
export let type: 'checkbox' | 'radio' = 'checkbox';
|
|
26
|
+
|
|
27
|
+
let checked: boolean = false;
|
|
28
|
+
const dispatch = createEventDispatcher<{
|
|
29
|
+
change: boolean;
|
|
30
|
+
}>();
|
|
31
|
+
|
|
32
|
+
// Ensure checked is always in sync with value
|
|
33
|
+
$: checked = value;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Handles click events on the toggle, dispatching the change.
|
|
37
|
+
*/
|
|
38
|
+
const handleClick = (): void => {
|
|
39
|
+
if (disabled || preventChange) return;
|
|
40
|
+
checked = !checked;
|
|
41
|
+
|
|
42
|
+
dispatch('change', checked);
|
|
43
|
+
};
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<div
|
|
47
|
+
class="custom-checkbox {type} {checked ? 'checked' : ''} {disabled ? 'disabled' : ''}"
|
|
48
|
+
on:click={handleClick}
|
|
49
|
+
on:keydown={() => {}}
|
|
50
|
+
role="checkbox"
|
|
51
|
+
tabindex="0"
|
|
52
|
+
aria-checked={`${checked}`}
|
|
53
|
+
{id}
|
|
54
|
+
>
|
|
55
|
+
{#if checked}
|
|
56
|
+
<SquareCheckIcon />
|
|
57
|
+
{/if}
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<style>
|
|
61
|
+
.custom-checkbox {
|
|
62
|
+
width: 16px;
|
|
63
|
+
height: 16px;
|
|
64
|
+
border-radius: 4px;
|
|
65
|
+
border: 2px solid #ffffff1a;
|
|
66
|
+
display: flex;
|
|
67
|
+
justify-content: center;
|
|
68
|
+
align-items: center;
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
}
|
|
71
|
+
.custom-checkbox.radio {
|
|
72
|
+
border-radius: 50%;
|
|
73
|
+
}
|
|
74
|
+
.custom-checkbox :global(svg) {
|
|
75
|
+
width: 16px;
|
|
76
|
+
height: 16px;
|
|
77
|
+
}
|
|
78
|
+
.custom-checkbox.checked {
|
|
79
|
+
color: white;
|
|
80
|
+
border: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.custom-checkbox.checked :global(svg) {
|
|
84
|
+
color: white;
|
|
85
|
+
background: #006acc;
|
|
86
|
+
border-radius: 4px;
|
|
87
|
+
}
|
|
88
|
+
.custom-checkbox.checked.radio :global(svg) {
|
|
89
|
+
border-radius: 50%;
|
|
90
|
+
}
|
|
91
|
+
.custom-checkbox.disabled {
|
|
92
|
+
cursor: not-allowed;
|
|
93
|
+
}
|
|
94
|
+
</style>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const Checkbox: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
/**
|
|
16
|
+
* This is the value of the checkbox.
|
|
17
|
+
*/ value?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* This means the checkbox is disabled.
|
|
20
|
+
*/ disabled?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* This means you are using an external state to control the checkbox.
|
|
23
|
+
*/ preventChange?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* This is the id of the checkbox.
|
|
26
|
+
*/ id?: string;
|
|
27
|
+
/**
|
|
28
|
+
* This is the type of the checkbox. Defaults to `checkbox`.
|
|
29
|
+
*/ type?: "checkbox" | "radio";
|
|
30
|
+
}, {
|
|
31
|
+
change: CustomEvent<boolean>;
|
|
32
|
+
} & {
|
|
33
|
+
[evt: string]: CustomEvent<any>;
|
|
34
|
+
}, {}, {}, string>;
|
|
35
|
+
type Checkbox = InstanceType<typeof Checkbox>;
|
|
36
|
+
export default Checkbox;
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import ClipboardJS from 'clipboard';
|
|
3
|
+
import { onDestroy } from 'svelte';
|
|
4
|
+
import { writable } from 'svelte/store';
|
|
5
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
6
|
+
|
|
7
|
+
import { trimExtraSpaces } from '../../utils/helpers';
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
ArrowIcon,
|
|
11
|
+
CheckCircleOutlinedIcon,
|
|
12
|
+
CodeIcon,
|
|
13
|
+
CopyIcon,
|
|
14
|
+
EyeIcon,
|
|
15
|
+
WarningCircleOutlineIcon
|
|
16
|
+
} from '../icons';
|
|
17
|
+
|
|
18
|
+
export let heading;
|
|
19
|
+
export let upToDate = false;
|
|
20
|
+
export let hidden = false;
|
|
21
|
+
export let disabled = false;
|
|
22
|
+
export let raw = false;
|
|
23
|
+
export let scriptUpdated = false;
|
|
24
|
+
export let showHeader = true;
|
|
25
|
+
export let comment = '';
|
|
26
|
+
export let shortName = '';
|
|
27
|
+
export let leftSpacing = '0px';
|
|
28
|
+
export let title = 'Click to copy snippet';
|
|
29
|
+
export let showLink = false;
|
|
30
|
+
let snippetElement: HTMLElement;
|
|
31
|
+
let copied = writable<boolean>();
|
|
32
|
+
let notified = writable<boolean>(false);
|
|
33
|
+
|
|
34
|
+
export let content: string;
|
|
35
|
+
const id: string = uuidv4();
|
|
36
|
+
let isCooldown: boolean = false;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Notify the user with a cooldown
|
|
40
|
+
* @param type
|
|
41
|
+
* @param message
|
|
42
|
+
*/
|
|
43
|
+
const notifyWithCooldown = (type: 'Success' | 'Error', message: string) => {
|
|
44
|
+
if (!isCooldown) {
|
|
45
|
+
webflow.notify({ type, message });
|
|
46
|
+
notified.set(true);
|
|
47
|
+
isCooldown = true;
|
|
48
|
+
setTimeout(() => {
|
|
49
|
+
isCooldown = false;
|
|
50
|
+
}, 1000);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
let clipboard: ClipboardJS | null = null;
|
|
55
|
+
|
|
56
|
+
$: {
|
|
57
|
+
clipboard?.destroy();
|
|
58
|
+
if (snippetElement && !disabled) {
|
|
59
|
+
clipboard = new ClipboardJS(snippetElement, {
|
|
60
|
+
text: () => {
|
|
61
|
+
if (disabled) {
|
|
62
|
+
webflow?.notify({
|
|
63
|
+
type: 'Error',
|
|
64
|
+
message: 'Select a category before updating the script.'
|
|
65
|
+
});
|
|
66
|
+
return '';
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (raw) {
|
|
70
|
+
if (comment) return `<!-- ${comment} -->\n${content}`;
|
|
71
|
+
|
|
72
|
+
return content;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const target = snippetElement?.querySelector<HTMLElement>('#text-content');
|
|
76
|
+
|
|
77
|
+
if (target) {
|
|
78
|
+
return target.innerText;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
webflow?.notify({
|
|
82
|
+
type: 'Error',
|
|
83
|
+
message: 'Failed to copy. Try again or contact Finsweet support.'
|
|
84
|
+
});
|
|
85
|
+
return '';
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
clipboard.on('success', (e: ClipboardJS.Event) => {
|
|
90
|
+
copied.set(true);
|
|
91
|
+
notifyWithCooldown('Success', 'Copied to clipboard!');
|
|
92
|
+
e.clearSelection();
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
$: if ($notified) {
|
|
98
|
+
setTimeout(() => notified.set(false), 2000);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
onDestroy(() => {
|
|
102
|
+
clipboard?.destroy();
|
|
103
|
+
});
|
|
104
|
+
</script>
|
|
105
|
+
|
|
106
|
+
{#if !hidden}
|
|
107
|
+
<div class="scripts scan-result" style={hidden ? 'display:none;' : ''}>
|
|
108
|
+
{#if showHeader}
|
|
109
|
+
<div class="info">
|
|
110
|
+
<div class="header {upToDate ? 'completed' : 'pending'}">
|
|
111
|
+
{#if upToDate}
|
|
112
|
+
<CheckCircleOutlinedIcon />
|
|
113
|
+
{:else}
|
|
114
|
+
<WarningCircleOutlineIcon />
|
|
115
|
+
{/if}
|
|
116
|
+
<div class="text-wrapper">
|
|
117
|
+
{#if raw}
|
|
118
|
+
<div class="instruction text">{heading}</div>
|
|
119
|
+
{:else}
|
|
120
|
+
<div class="instruction script">{@html heading}</div>
|
|
121
|
+
{/if}
|
|
122
|
+
<slot name="content" />
|
|
123
|
+
</div>
|
|
124
|
+
<!-- <div class="state">
|
|
125
|
+
<span class="status {upToDate || $copied ? 'success' : 'pending'}"
|
|
126
|
+
>{$copied ? 'Copied' : upToDate ? '' : 'Pending'}</span
|
|
127
|
+
>
|
|
128
|
+
</div> -->
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
{/if}
|
|
132
|
+
<div
|
|
133
|
+
class="copy {disabled ? 'disabled' : ''} {scriptUpdated ? 'script-snippet' : ''}"
|
|
134
|
+
bind:this={snippetElement}
|
|
135
|
+
on:keydown={() => {}}
|
|
136
|
+
tabindex="0"
|
|
137
|
+
role="button"
|
|
138
|
+
aria-label="Copy snippet"
|
|
139
|
+
{title}
|
|
140
|
+
style="{upToDate ? 'display:none' : ''} margin-left:{leftSpacing};"
|
|
141
|
+
>
|
|
142
|
+
<div class="content {disabled ? 'disabled' : ''} {id}" data-target="snippet">
|
|
143
|
+
<span id="text-content">
|
|
144
|
+
{raw ? content : (trimExtraSpaces(content) ?? '')}
|
|
145
|
+
</span>
|
|
146
|
+
</div>
|
|
147
|
+
<span class="icon">
|
|
148
|
+
{#if disabled}
|
|
149
|
+
<EyeIcon />
|
|
150
|
+
{:else}
|
|
151
|
+
<CopyIcon size={16} />
|
|
152
|
+
{/if}
|
|
153
|
+
</span>
|
|
154
|
+
</div>
|
|
155
|
+
|
|
156
|
+
<slot name="customCodeLinks" />
|
|
157
|
+
|
|
158
|
+
{#if (showLink || !upToDate) && !$$slots?.customCodeLinks}
|
|
159
|
+
<div class="settings-link" style="margin-left:{leftSpacing};">
|
|
160
|
+
<a
|
|
161
|
+
href={`https://webflow.com/dashboard/sites/${shortName}/code`}
|
|
162
|
+
target="_blank"
|
|
163
|
+
class="new-tab-link"><CodeIcon />Open Custom code in a new tab <ArrowIcon /></a
|
|
164
|
+
>
|
|
165
|
+
</div>
|
|
166
|
+
{/if}
|
|
167
|
+
</div>
|
|
168
|
+
{/if}
|
|
169
|
+
|
|
170
|
+
<style>
|
|
171
|
+
.settings-link {
|
|
172
|
+
display: flex;
|
|
173
|
+
align-self: stretch;
|
|
174
|
+
justify-content: start;
|
|
175
|
+
width: 100%;
|
|
176
|
+
}
|
|
177
|
+
.text-wrapper {
|
|
178
|
+
display: flex;
|
|
179
|
+
flex-direction: column;
|
|
180
|
+
gap: 4px;
|
|
181
|
+
}
|
|
182
|
+
.new-tab-link {
|
|
183
|
+
display: flex;
|
|
184
|
+
padding: 4px;
|
|
185
|
+
justify-content: center;
|
|
186
|
+
align-items: center;
|
|
187
|
+
gap: 2px;
|
|
188
|
+
text-decoration: none;
|
|
189
|
+
color: var(--blueText);
|
|
190
|
+
text-align: center;
|
|
191
|
+
font-family: Inter;
|
|
192
|
+
font-size: 11.5px;
|
|
193
|
+
font-style: normal;
|
|
194
|
+
font-weight: 400;
|
|
195
|
+
line-height: 16px;
|
|
196
|
+
letter-spacing: -0.115px;
|
|
197
|
+
}
|
|
198
|
+
.header {
|
|
199
|
+
display: flex;
|
|
200
|
+
gap: 10px;
|
|
201
|
+
align-items: start;
|
|
202
|
+
height: max-content;
|
|
203
|
+
}
|
|
204
|
+
.header.completed :global(svg) {
|
|
205
|
+
color: var(--green-green-text, #63d489);
|
|
206
|
+
}
|
|
207
|
+
.header.pending :global(svg) {
|
|
208
|
+
color: var(--yellow-yellow-text, #ffc700);
|
|
209
|
+
}
|
|
210
|
+
.status.pending {
|
|
211
|
+
color: var(--yellow-yellow-text, #ffc700);
|
|
212
|
+
}
|
|
213
|
+
.status.success {
|
|
214
|
+
color: var(--green-green-text, #63d489);
|
|
215
|
+
}
|
|
216
|
+
.status {
|
|
217
|
+
text-align: right;
|
|
218
|
+
}
|
|
219
|
+
.status,
|
|
220
|
+
.info {
|
|
221
|
+
font-family: Inter;
|
|
222
|
+
font-size: 11px;
|
|
223
|
+
font-style: normal;
|
|
224
|
+
font-weight: 400;
|
|
225
|
+
line-height: 16px;
|
|
226
|
+
}
|
|
227
|
+
.info {
|
|
228
|
+
display: flex;
|
|
229
|
+
justify-content: space-between;
|
|
230
|
+
width: 100%;
|
|
231
|
+
min-width: 290px;
|
|
232
|
+
align-items: center;
|
|
233
|
+
gap: 4px;
|
|
234
|
+
}
|
|
235
|
+
.info .instruction {
|
|
236
|
+
flex-grow: 1;
|
|
237
|
+
align-items: center;
|
|
238
|
+
display: flex;
|
|
239
|
+
height: 100%;
|
|
240
|
+
color: #fff;
|
|
241
|
+
font-family: Inter;
|
|
242
|
+
font-size: 12px;
|
|
243
|
+
font-style: normal;
|
|
244
|
+
font-weight: 500;
|
|
245
|
+
line-height: 16px;
|
|
246
|
+
}
|
|
247
|
+
/* .info .state {
|
|
248
|
+
flex-grow: 0;
|
|
249
|
+
flex-shrink: 0;
|
|
250
|
+
width: 45px;
|
|
251
|
+
} */
|
|
252
|
+
|
|
253
|
+
.copy.script-snippet {
|
|
254
|
+
margin-left: 25px;
|
|
255
|
+
}
|
|
256
|
+
.copy .content span {
|
|
257
|
+
display: flex;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.copy .content {
|
|
261
|
+
color: var(--text-text-1, #d9d9d9);
|
|
262
|
+
font-family: Inter;
|
|
263
|
+
font-size: 11px;
|
|
264
|
+
font-style: normal;
|
|
265
|
+
font-weight: 500;
|
|
266
|
+
line-height: 16px;
|
|
267
|
+
display: flex;
|
|
268
|
+
align-items: start;
|
|
269
|
+
align-self: stretch;
|
|
270
|
+
overflow: auto;
|
|
271
|
+
width: 100%;
|
|
272
|
+
white-space: pre-wrap;
|
|
273
|
+
word-wrap: break-word;
|
|
274
|
+
max-width: 600px;
|
|
275
|
+
min-height: max-content;
|
|
276
|
+
}
|
|
277
|
+
.copy .content.disabled {
|
|
278
|
+
cursor: not-allowed;
|
|
279
|
+
color: var(--text2);
|
|
280
|
+
flex: 1 0 0;
|
|
281
|
+
}
|
|
282
|
+
.scripts {
|
|
283
|
+
display: flex;
|
|
284
|
+
padding: var(--spacing-16, 16px);
|
|
285
|
+
flex-direction: column;
|
|
286
|
+
align-items: flex-start;
|
|
287
|
+
gap: 12px;
|
|
288
|
+
align-self: stretch;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.copy {
|
|
292
|
+
border-radius: 4px;
|
|
293
|
+
background: var(
|
|
294
|
+
--actionSecondaryBackground,
|
|
295
|
+
linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.1) 100%),
|
|
296
|
+
rgba(255, 255, 255, 0.08)
|
|
297
|
+
);
|
|
298
|
+
box-shadow:
|
|
299
|
+
0px 0.5px 0.5px 0px rgba(255, 255, 255, 0.12) inset,
|
|
300
|
+
0px 0.5px 1px 0px #000;
|
|
301
|
+
display: flex;
|
|
302
|
+
padding: 6px var(--Spacing-8, 8px);
|
|
303
|
+
align-items: flex-start;
|
|
304
|
+
gap: var(--Spacing-8, 8px);
|
|
305
|
+
align-self: stretch;
|
|
306
|
+
flex: 1 0 0;
|
|
307
|
+
color: var(--text2);
|
|
308
|
+
font-family: Inter;
|
|
309
|
+
font-size: 12px;
|
|
310
|
+
font-style: normal;
|
|
311
|
+
font-weight: 500;
|
|
312
|
+
line-height: 16px;
|
|
313
|
+
cursor: pointer;
|
|
314
|
+
justify-content: space-between;
|
|
315
|
+
flex-direction: row;
|
|
316
|
+
}
|
|
317
|
+
.copy span.icon {
|
|
318
|
+
height: 16px;
|
|
319
|
+
}
|
|
320
|
+
.copy.disabled {
|
|
321
|
+
background: none;
|
|
322
|
+
cursor: not-allowed;
|
|
323
|
+
color: var(--text2);
|
|
324
|
+
border-radius: var(--border-radius, 4px);
|
|
325
|
+
border: 1px solid var(--actionSecondaryBorder);
|
|
326
|
+
opacity: 0.75;
|
|
327
|
+
box-shadow: none;
|
|
328
|
+
}
|
|
329
|
+
</style>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const Copy: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
heading: any;
|
|
16
|
+
upToDate?: boolean;
|
|
17
|
+
hidden?: boolean;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
raw?: boolean;
|
|
20
|
+
scriptUpdated?: boolean;
|
|
21
|
+
showHeader?: boolean;
|
|
22
|
+
comment?: string;
|
|
23
|
+
shortName?: string;
|
|
24
|
+
leftSpacing?: string;
|
|
25
|
+
title?: string;
|
|
26
|
+
showLink?: boolean;
|
|
27
|
+
content: string;
|
|
28
|
+
}, {
|
|
29
|
+
[evt: string]: CustomEvent<any>;
|
|
30
|
+
}, {
|
|
31
|
+
content: {};
|
|
32
|
+
customCodeLinks: {};
|
|
33
|
+
}, {}, string>;
|
|
34
|
+
type Copy = InstanceType<typeof Copy>;
|
|
35
|
+
export default Copy;
|