@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,84 @@
|
|
|
1
|
+
import { type Component, type Snippet } from 'svelte';
|
|
2
|
+
import type { TooltipProps } from '../tooltip/types.js';
|
|
3
|
+
import type { ButtonType, ButtonVariant } from './types.js';
|
|
4
|
+
interface Props {
|
|
5
|
+
/**
|
|
6
|
+
* Button type for form submission
|
|
7
|
+
*/
|
|
8
|
+
type?: ButtonType;
|
|
9
|
+
/**
|
|
10
|
+
* Visual variant of the button
|
|
11
|
+
*/
|
|
12
|
+
variant?: ButtonVariant;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the button is disabled
|
|
15
|
+
*/
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Whether to show loading state
|
|
19
|
+
*/
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Button text content
|
|
23
|
+
*/
|
|
24
|
+
text?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Left icon component
|
|
27
|
+
*/
|
|
28
|
+
icon?: Component;
|
|
29
|
+
/**
|
|
30
|
+
* Right icon component
|
|
31
|
+
*/
|
|
32
|
+
rightIcon?: Component;
|
|
33
|
+
/**
|
|
34
|
+
* Icon color (defaults to currentColor)
|
|
35
|
+
*/
|
|
36
|
+
iconColor?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Icon size
|
|
39
|
+
*/
|
|
40
|
+
iconSize?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Custom padding override
|
|
43
|
+
*/
|
|
44
|
+
padding?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Additional CSS classes
|
|
47
|
+
*/
|
|
48
|
+
class?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Loading text override
|
|
51
|
+
*/
|
|
52
|
+
loadingText?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Whether button should take full width
|
|
55
|
+
*/
|
|
56
|
+
fullWidth?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Tooltip configuration object with all tooltip props
|
|
59
|
+
*/
|
|
60
|
+
tooltip?: Partial<TooltipProps>;
|
|
61
|
+
/**
|
|
62
|
+
* Whether button is in invalid state
|
|
63
|
+
*/
|
|
64
|
+
invalid?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Custom styles
|
|
67
|
+
*/
|
|
68
|
+
style?: string;
|
|
69
|
+
/**
|
|
70
|
+
* ARIA label for accessibility
|
|
71
|
+
*/
|
|
72
|
+
ariaLabel?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Custom content snippet
|
|
75
|
+
*/
|
|
76
|
+
children?: Snippet;
|
|
77
|
+
/**
|
|
78
|
+
* Click event handler
|
|
79
|
+
*/
|
|
80
|
+
onclick?: (event: MouseEvent) => void;
|
|
81
|
+
}
|
|
82
|
+
declare const Button: Component<Props, {}, "">;
|
|
83
|
+
type Button = ReturnType<typeof Button>;
|
|
84
|
+
export default Button;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Button } from './Button.svelte';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Component } from 'svelte';
|
|
2
|
+
export type ButtonType = 'button' | 'submit' | 'reset';
|
|
3
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'cms';
|
|
4
|
+
export interface ButtonProps {
|
|
5
|
+
type?: ButtonType;
|
|
6
|
+
variant?: ButtonVariant;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
text?: string;
|
|
10
|
+
icon?: Component | null;
|
|
11
|
+
rightIcon?: Component | null;
|
|
12
|
+
iconColor?: string;
|
|
13
|
+
iconSize?: string;
|
|
14
|
+
padding?: string;
|
|
15
|
+
class?: string;
|
|
16
|
+
loadingText?: string;
|
|
17
|
+
fullWidth?: boolean;
|
|
18
|
+
tooltipContent?: string;
|
|
19
|
+
invalid?: boolean;
|
|
20
|
+
style?: string;
|
|
21
|
+
ariaLabel?: string;
|
|
22
|
+
onclick?: (event: MouseEvent) => void;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { type Component, onDestroy } from 'svelte';
|
|
3
|
+
|
|
4
|
+
import { createFormSubscription, globalStore } from '../../../stores';
|
|
5
|
+
import { canAccessFeature, finsweetUser } from '../../../utils';
|
|
6
|
+
|
|
7
|
+
import { ChevronIcon } from '../../icons';
|
|
8
|
+
import { Button, Text, Tooltip } from '..';
|
|
9
|
+
import Section from '../Section.svelte';
|
|
10
|
+
import type { ButtonItem } from './types';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Accept individual buttons
|
|
14
|
+
*/
|
|
15
|
+
let {
|
|
16
|
+
editMode = false,
|
|
17
|
+
formKey,
|
|
18
|
+
buttons
|
|
19
|
+
}: {
|
|
20
|
+
buttons: ButtonItem[];
|
|
21
|
+
editMode: boolean;
|
|
22
|
+
formKey: string;
|
|
23
|
+
} = $props();
|
|
24
|
+
|
|
25
|
+
// Create reactive state for selected element
|
|
26
|
+
let selectedElement = $state<AnyElement | null>(null);
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Check if user is logged in
|
|
30
|
+
*/
|
|
31
|
+
const isLoggedIn = $derived(!!$finsweetUser?.user?.userId);
|
|
32
|
+
const form = createFormSubscription(formKey);
|
|
33
|
+
|
|
34
|
+
const unsubscribe =
|
|
35
|
+
typeof webflow !== 'undefined'
|
|
36
|
+
? webflow?.subscribe?.('selectedelement', (el) => {
|
|
37
|
+
selectedElement = el;
|
|
38
|
+
})
|
|
39
|
+
: () => {};
|
|
40
|
+
|
|
41
|
+
onDestroy(() => unsubscribe());
|
|
42
|
+
|
|
43
|
+
const buttonItems = $derived(() => {
|
|
44
|
+
const isEditting = editMode || !!$globalStore?.editMode;
|
|
45
|
+
const needsRepair = $globalStore?.repairMode && isEditting;
|
|
46
|
+
|
|
47
|
+
const hasAccess = canAccessFeature(isLoggedIn, $finsweetUser?.user?.libraryAccess, [
|
|
48
|
+
'canManageLibrary'
|
|
49
|
+
]);
|
|
50
|
+
|
|
51
|
+
return buttons.filter((item: ButtonItem) => {
|
|
52
|
+
// validation is handled in parent component
|
|
53
|
+
if (item.escapeValidation) return true;
|
|
54
|
+
|
|
55
|
+
//if not logged in remove library
|
|
56
|
+
if (!hasAccess?.granted) return item.type !== 'library';
|
|
57
|
+
|
|
58
|
+
// Filter out library buttons in create mode
|
|
59
|
+
if (isEditting && !needsRepair) return true;
|
|
60
|
+
return item.id !== 'save' && item.type !== 'library';
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
<div class="footer">
|
|
66
|
+
<div class="grouped-buttons">
|
|
67
|
+
{#each buttonItems() as button, index (button.id || index)}
|
|
68
|
+
{#if button.show !== false}
|
|
69
|
+
<!-- Button with popup menu -->
|
|
70
|
+
{#if button?.popupButtons?.length}
|
|
71
|
+
<Tooltip
|
|
72
|
+
position="fixed"
|
|
73
|
+
placement="top-start"
|
|
74
|
+
offsetVal={8}
|
|
75
|
+
showArrow={false}
|
|
76
|
+
listener={button.popupTrigger || 'click'}
|
|
77
|
+
listenerout={button.popupTrigger || 'click'}
|
|
78
|
+
width="210px"
|
|
79
|
+
>
|
|
80
|
+
{#snippet target()}
|
|
81
|
+
<Button
|
|
82
|
+
text={button.text}
|
|
83
|
+
variant={button.variant || 'primary'}
|
|
84
|
+
disabled={button.disabled || false}
|
|
85
|
+
loading={button.loading || false}
|
|
86
|
+
rightIcon={ChevronIcon}
|
|
87
|
+
class="popup-button-chevron"
|
|
88
|
+
/>
|
|
89
|
+
{/snippet}
|
|
90
|
+
{#snippet tooltipContent()}
|
|
91
|
+
<div role="button" tabindex="0" class="popup-content">
|
|
92
|
+
<div class="popup-content-list">
|
|
93
|
+
{#each button.popupButtons || [] as popupButton, popupIndex (popupIndex)}
|
|
94
|
+
{#if popupButton.show !== false}
|
|
95
|
+
<Section
|
|
96
|
+
className="link"
|
|
97
|
+
clickable
|
|
98
|
+
disabled={popupButton.disabled || popupButton.loading}
|
|
99
|
+
on:click={(e: MouseEvent) => {
|
|
100
|
+
e.stopPropagation();
|
|
101
|
+
e.preventDefault();
|
|
102
|
+
if (popupButton.disabled || popupButton.loading) return;
|
|
103
|
+
if (typeof popupButton.onClick === 'function') popupButton.onClick();
|
|
104
|
+
}}
|
|
105
|
+
>
|
|
106
|
+
{#if popupButton.icon}
|
|
107
|
+
<span class="popup-content-icon">
|
|
108
|
+
<popupButton.icon />
|
|
109
|
+
</span>
|
|
110
|
+
{/if}
|
|
111
|
+
<div class="popup-content-item">
|
|
112
|
+
<Text
|
|
113
|
+
label={popupButton.text}
|
|
114
|
+
fontWeight="500"
|
|
115
|
+
fontColor="var(--text2)"
|
|
116
|
+
fontSize="normal"
|
|
117
|
+
/>
|
|
118
|
+
<Text
|
|
119
|
+
label={popupButton.description || ''}
|
|
120
|
+
fontColor="#BDBDBD"
|
|
121
|
+
fontSize="normal"
|
|
122
|
+
/>
|
|
123
|
+
</div>
|
|
124
|
+
</Section>
|
|
125
|
+
{/if}
|
|
126
|
+
{/each}
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
{/snippet}
|
|
130
|
+
</Tooltip>
|
|
131
|
+
|
|
132
|
+
<!-- Button with tooltip -->
|
|
133
|
+
{:else if button.tooltip}
|
|
134
|
+
<Tooltip
|
|
135
|
+
width={button.tooltip?.width || '160px'}
|
|
136
|
+
placement={button.tooltip?.placement || 'top'}
|
|
137
|
+
offsetVal={10}
|
|
138
|
+
showArrow={button.tooltip?.showArrow !== false}
|
|
139
|
+
>
|
|
140
|
+
{#snippet target()}
|
|
141
|
+
<Button
|
|
142
|
+
text={button.text}
|
|
143
|
+
variant={button.variant || 'primary'}
|
|
144
|
+
disabled={button.disabled || false}
|
|
145
|
+
loading={button.loading || false}
|
|
146
|
+
onclick={button.onClick || (() => {})}
|
|
147
|
+
/>
|
|
148
|
+
{/snippet}
|
|
149
|
+
{#snippet tooltipContent()}
|
|
150
|
+
<div
|
|
151
|
+
class="tooltip-content {button.tooltip?.className || ''}"
|
|
152
|
+
style="display: {button.tooltip?.icon ? 'grid' : 'inline-block'}"
|
|
153
|
+
>
|
|
154
|
+
{#if button.tooltip?.icon}
|
|
155
|
+
<span class="icon">
|
|
156
|
+
<button.tooltip.icon />
|
|
157
|
+
</span>
|
|
158
|
+
{/if}
|
|
159
|
+
<Text label={button.tooltip?.content || ''} fontColor="var(--text2)" />
|
|
160
|
+
</div>
|
|
161
|
+
{/snippet}
|
|
162
|
+
</Tooltip>
|
|
163
|
+
|
|
164
|
+
<!-- Simple button -->
|
|
165
|
+
{:else}
|
|
166
|
+
<Button
|
|
167
|
+
text={button.text}
|
|
168
|
+
variant={button.variant || 'primary'}
|
|
169
|
+
disabled={button.disabled || button.loading || false}
|
|
170
|
+
loading={button.loading || false}
|
|
171
|
+
onclick={button.onClick || (() => {})}
|
|
172
|
+
/>
|
|
173
|
+
{/if}
|
|
174
|
+
{/if}
|
|
175
|
+
{/each}
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
|
|
179
|
+
<style>
|
|
180
|
+
.footer :global(.w-button svg) {
|
|
181
|
+
transform: rotate(270deg);
|
|
182
|
+
}
|
|
183
|
+
.grouped-buttons :global(.target:not(:has(.dropdown-label))) {
|
|
184
|
+
width: max-content !important;
|
|
185
|
+
}
|
|
186
|
+
.grouped-buttons :global(.target .tooltip) {
|
|
187
|
+
padding: 8px 0;
|
|
188
|
+
gap: 0;
|
|
189
|
+
}
|
|
190
|
+
.footer :global(.button-link.blocked .icon svg) {
|
|
191
|
+
color: var(--yellowText);
|
|
192
|
+
}
|
|
193
|
+
.footer :global(.tooltip) {
|
|
194
|
+
padding: 0;
|
|
195
|
+
width: 100%;
|
|
196
|
+
}
|
|
197
|
+
.footer :global(.tooltip) {
|
|
198
|
+
padding: 0 !important;
|
|
199
|
+
flex-direction: column;
|
|
200
|
+
gap: 0;
|
|
201
|
+
}
|
|
202
|
+
.tooltip-content {
|
|
203
|
+
display: grid;
|
|
204
|
+
grid-template-columns: 14px 1fr;
|
|
205
|
+
width: 100%;
|
|
206
|
+
height: 100%;
|
|
207
|
+
align-items: start;
|
|
208
|
+
gap: var(--Spacing-8, 8px);
|
|
209
|
+
padding: 6px;
|
|
210
|
+
}
|
|
211
|
+
.tooltip-content.invalid-selection :global(svg) {
|
|
212
|
+
color: var(--yellowText);
|
|
213
|
+
}
|
|
214
|
+
.grouped-buttons {
|
|
215
|
+
display: flex;
|
|
216
|
+
flex-direction: row;
|
|
217
|
+
align-items: center;
|
|
218
|
+
gap: 4px;
|
|
219
|
+
}
|
|
220
|
+
.icon :global(svg) {
|
|
221
|
+
width: 14px;
|
|
222
|
+
height: 14px;
|
|
223
|
+
color: var(--text2);
|
|
224
|
+
margin-top: 2px;
|
|
225
|
+
}
|
|
226
|
+
.icon {
|
|
227
|
+
display: flex;
|
|
228
|
+
align-items: center;
|
|
229
|
+
justify-content: center;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.popup-content {
|
|
233
|
+
display: flex;
|
|
234
|
+
flex-direction: column;
|
|
235
|
+
gap: 4px;
|
|
236
|
+
min-width: 150px;
|
|
237
|
+
background: var(--background);
|
|
238
|
+
border-radius: 4px;
|
|
239
|
+
padding: 4px;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.popup-content-list {
|
|
243
|
+
display: flex;
|
|
244
|
+
width: 100%;
|
|
245
|
+
padding: 4px 0px;
|
|
246
|
+
flex-direction: column;
|
|
247
|
+
align-items: flex-start;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.popup-content-list :global(svg) {
|
|
251
|
+
height: 16px;
|
|
252
|
+
width: 16px;
|
|
253
|
+
color: var(--text1);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.popup-content-list :global(.section-wrap.link) {
|
|
257
|
+
display: flex;
|
|
258
|
+
padding: 4px var(--Spacing-8, 8px);
|
|
259
|
+
align-items: flex-start;
|
|
260
|
+
gap: 4px;
|
|
261
|
+
align-self: stretch;
|
|
262
|
+
flex-direction: row;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.popup-content-list .popup-content-item {
|
|
266
|
+
display: flex;
|
|
267
|
+
flex-direction: column;
|
|
268
|
+
align-items: flex-start;
|
|
269
|
+
flex: 1 0 0;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.footer :global(.popup-button-chevron svg) {
|
|
273
|
+
transform: rotate(90deg);
|
|
274
|
+
width: 16px;
|
|
275
|
+
height: 16px;
|
|
276
|
+
}
|
|
277
|
+
</style>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Component } from 'svelte';
|
|
2
|
+
import type { ButtonItem } from './types';
|
|
3
|
+
type $$ComponentProps = {
|
|
4
|
+
buttons: ButtonItem[];
|
|
5
|
+
editMode: boolean;
|
|
6
|
+
formKey: string;
|
|
7
|
+
};
|
|
8
|
+
declare const FooterButton: Component<$$ComponentProps, {}, "">;
|
|
9
|
+
type FooterButton = ReturnType<typeof FooterButton>;
|
|
10
|
+
export default FooterButton;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Placement } from '@floating-ui/dom';
|
|
2
|
+
import type { Component } from 'svelte';
|
|
3
|
+
/**
|
|
4
|
+
* Individual button item properties
|
|
5
|
+
*/
|
|
6
|
+
export interface ButtonItem {
|
|
7
|
+
id?: 'main' | 'update-single' | 'update-all' | 'save';
|
|
8
|
+
text: string;
|
|
9
|
+
escapeValidation?: boolean;
|
|
10
|
+
variant?: 'primary' | 'secondary' | 'cms';
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
type?: 'library' | 'component' | 'popup';
|
|
14
|
+
onClick?: () => void;
|
|
15
|
+
show?: boolean;
|
|
16
|
+
popupButtons?: ButtonItem[];
|
|
17
|
+
popupTrigger?: 'click' | 'hover';
|
|
18
|
+
icon?: Component;
|
|
19
|
+
description?: string;
|
|
20
|
+
tooltip?: {
|
|
21
|
+
content: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
width?: string;
|
|
24
|
+
placement?: Placement;
|
|
25
|
+
showArrow?: boolean;
|
|
26
|
+
icon?: Component;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
<script module>
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import { fn } from 'storybook/test';
|
|
4
|
+
|
|
5
|
+
import { CheckIcon, PlusIcon } from '../../icons';
|
|
6
|
+
import Clickable from './Clickable.svelte';
|
|
7
|
+
|
|
8
|
+
const { Story } = defineMeta({
|
|
9
|
+
title: 'UI/Clickable',
|
|
10
|
+
component: Clickable,
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
parameters: {
|
|
13
|
+
docs: {
|
|
14
|
+
description: {
|
|
15
|
+
component:
|
|
16
|
+
'A versatile clickable wrapper component that provides keyboard accessibility and interactive states. Use this when you need to make any content clickable with proper focus management and ARIA support.'
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
argTypes: {
|
|
21
|
+
disabled: {
|
|
22
|
+
control: { type: 'boolean' },
|
|
23
|
+
description: 'Whether the clickable element is disabled'
|
|
24
|
+
},
|
|
25
|
+
class: {
|
|
26
|
+
control: { type: 'text' },
|
|
27
|
+
description: 'Additional CSS classes to apply'
|
|
28
|
+
},
|
|
29
|
+
onclick: {
|
|
30
|
+
action: 'clicked',
|
|
31
|
+
description: 'Click event handler'
|
|
32
|
+
},
|
|
33
|
+
onkeydown: {
|
|
34
|
+
action: 'keydown',
|
|
35
|
+
description: 'Keydown event handler'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
args: {
|
|
39
|
+
onclick: fn(),
|
|
40
|
+
onkeydown: fn()
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<Story
|
|
46
|
+
name="Card"
|
|
47
|
+
parameters={{
|
|
48
|
+
docs: {
|
|
49
|
+
description: {
|
|
50
|
+
story:
|
|
51
|
+
'A card-style clickable element using design system colors and shadows. Perfect for dashboard items, settings panels, or any card-based UI.'
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
56
|
+
<Clickable class="story-card">
|
|
57
|
+
<div class="card-content">
|
|
58
|
+
<div class="card-header">
|
|
59
|
+
<CheckIcon />
|
|
60
|
+
<h3>Task Completed</h3>
|
|
61
|
+
</div>
|
|
62
|
+
<p class="card-description">
|
|
63
|
+
Click anywhere on this card to view details. Uses design system colors and proper hover
|
|
64
|
+
states.
|
|
65
|
+
</p>
|
|
66
|
+
<span class="card-timestamp">2 hours ago</span>
|
|
67
|
+
</div>
|
|
68
|
+
</Clickable>
|
|
69
|
+
</Story>
|
|
70
|
+
|
|
71
|
+
<Story
|
|
72
|
+
name="Action Button"
|
|
73
|
+
parameters={{
|
|
74
|
+
docs: {
|
|
75
|
+
description: {
|
|
76
|
+
story:
|
|
77
|
+
'A button-style clickable element that follows the design system styling. Use when you need custom button behavior or complex button content.'
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}}
|
|
81
|
+
>
|
|
82
|
+
<Clickable class="story-action-button">
|
|
83
|
+
<div class="action-content">
|
|
84
|
+
<PlusIcon />
|
|
85
|
+
<span>Add New Item</span>
|
|
86
|
+
</div>
|
|
87
|
+
</Clickable>
|
|
88
|
+
</Story>
|
|
89
|
+
|
|
90
|
+
<Story
|
|
91
|
+
name="Disabled"
|
|
92
|
+
parameters={{
|
|
93
|
+
docs: {
|
|
94
|
+
description: {
|
|
95
|
+
story:
|
|
96
|
+
'Shows the disabled state with reduced opacity and no pointer events. Maintains accessibility by setting proper ARIA attributes.'
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}}
|
|
100
|
+
>
|
|
101
|
+
<Clickable disabled class="story-card">
|
|
102
|
+
<div class="card-content">
|
|
103
|
+
<div class="card-header">
|
|
104
|
+
<PlusIcon />
|
|
105
|
+
<h3>Disabled Card</h3>
|
|
106
|
+
</div>
|
|
107
|
+
<p class="card-description">This card is disabled and cannot be clicked.</p>
|
|
108
|
+
</div>
|
|
109
|
+
</Clickable>
|
|
110
|
+
</Story>
|
|
111
|
+
|
|
112
|
+
<style>
|
|
113
|
+
:global(.story-card) {
|
|
114
|
+
display: block;
|
|
115
|
+
width: 100%;
|
|
116
|
+
max-width: 320px;
|
|
117
|
+
background: var(--background2, #353535);
|
|
118
|
+
border: 1px solid var(--border1, rgba(255, 255, 255, 0.13));
|
|
119
|
+
border-radius: var(--border-radius, 4px);
|
|
120
|
+
transition: all 0.2s ease;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
:global(.story-card:not(.disabled)) {
|
|
124
|
+
cursor: pointer;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
:global(.story-card:hover:not(.disabled)) {
|
|
128
|
+
background: var(--background3, #404040);
|
|
129
|
+
border-color: var(--border2, rgba(255, 255, 255, 0.16));
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
:global(.story-card:focus-visible) {
|
|
133
|
+
outline: 2px solid var(--blueBorder, #007df0);
|
|
134
|
+
outline-offset: 2px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.card-content {
|
|
138
|
+
padding: var(--spacing-16, 16px);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.card-header {
|
|
142
|
+
display: flex;
|
|
143
|
+
align-items: center;
|
|
144
|
+
gap: var(--spacing-8, 8px);
|
|
145
|
+
margin-bottom: var(--spacing-8, 8px);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.card-header h3 {
|
|
149
|
+
margin: 0;
|
|
150
|
+
color: var(--text1, #ffffff);
|
|
151
|
+
font-size: var(--font-size-large, 12.5px);
|
|
152
|
+
font-weight: var(--font-weight-medium, 600);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.card-description {
|
|
156
|
+
margin: 0 0 var(--spacing-8, 8px) 0;
|
|
157
|
+
color: var(--text2, rgba(255, 255, 255, 0.67));
|
|
158
|
+
font-size: var(--font-size-small, 11.5px);
|
|
159
|
+
line-height: 1.4;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.card-timestamp {
|
|
163
|
+
color: var(--text3, rgba(255, 255, 255, 0.67));
|
|
164
|
+
font-size: var(--font-size-small, 11.5px);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
:global(.story-action-button) {
|
|
168
|
+
display: inline-flex;
|
|
169
|
+
background: var(
|
|
170
|
+
--actionSecondaryBackground,
|
|
171
|
+
linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.1) 100%),
|
|
172
|
+
#404040
|
|
173
|
+
);
|
|
174
|
+
border: 1px solid var(--border2, rgba(255, 255, 255, 0.16));
|
|
175
|
+
border-radius: var(--border-radius, 4px);
|
|
176
|
+
transition: all 0.2s ease;
|
|
177
|
+
box-shadow:
|
|
178
|
+
0px 0.5px 1px rgba(0, 0, 0, 0.8),
|
|
179
|
+
inset 0px 0.5px 0.5px rgba(255, 255, 255, 0.12);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
:global(.story-action-button:not(.disabled)) {
|
|
183
|
+
cursor: pointer;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
:global(.story-action-button:hover:not(.disabled)) {
|
|
187
|
+
background: var(
|
|
188
|
+
--actionSecondaryBackgroundHover,
|
|
189
|
+
linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.16) 100%)
|
|
190
|
+
);
|
|
191
|
+
border-color: var(--border3, rgba(255, 255, 255, 0.19));
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
:global(.story-action-button:focus-visible) {
|
|
195
|
+
outline: 2px solid var(--blueBorder, #007df0);
|
|
196
|
+
outline-offset: 2px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
:global(.story-action-button:active:not(.disabled)) {
|
|
200
|
+
background: var(--defaultLightActive, rgba(255, 255, 255, 0.03));
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.action-content {
|
|
204
|
+
display: flex;
|
|
205
|
+
align-items: center;
|
|
206
|
+
gap: var(--spacing-8, 8px);
|
|
207
|
+
padding: var(--spacing-8, 8px) var(--spacing-12, 12px);
|
|
208
|
+
color: var(--actionSecondaryText, #e0e0e0);
|
|
209
|
+
font-size: var(--font-size-small, 11.5px);
|
|
210
|
+
font-weight: var(--font-weight-normal, 400);
|
|
211
|
+
letter-spacing: var(--font-size-small-letter-spacing, -0.115px);
|
|
212
|
+
}
|
|
213
|
+
</style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export default Clickable;
|
|
2
|
+
type Clickable = SvelteComponent<{
|
|
3
|
+
[x: string]: never;
|
|
4
|
+
}, {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
}, {}> & {
|
|
7
|
+
$$bindings?: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
declare const Clickable: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
+
[x: string]: never;
|
|
11
|
+
}, {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
}, {}, {}, string>;
|
|
14
|
+
import Clickable from './Clickable.svelte';
|
|
15
|
+
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> {
|
|
16
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
|
+
$$bindings?: Bindings;
|
|
18
|
+
} & Exports;
|
|
19
|
+
(internal: unknown, props: {
|
|
20
|
+
$$events?: Events;
|
|
21
|
+
$$slots?: Slots;
|
|
22
|
+
}): Exports & {
|
|
23
|
+
$set?: any;
|
|
24
|
+
$on?: any;
|
|
25
|
+
};
|
|
26
|
+
z_$$bindings?: Bindings;
|
|
27
|
+
}
|