@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,93 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { ClickableProps } from './types';
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
class: className = '',
|
|
6
|
+
disabled = false,
|
|
7
|
+
children,
|
|
8
|
+
onclick,
|
|
9
|
+
onkeydown,
|
|
10
|
+
...restProps
|
|
11
|
+
}: ClickableProps = $props();
|
|
12
|
+
|
|
13
|
+
// Generate unique ID using $state for reactivity
|
|
14
|
+
let uniqueId = $state(crypto.randomUUID());
|
|
15
|
+
|
|
16
|
+
// Handle click events
|
|
17
|
+
function handleClick(event: MouseEvent) {
|
|
18
|
+
if (disabled) return;
|
|
19
|
+
onclick?.(event);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Handle keyboard events
|
|
23
|
+
function handleKeydown(event: KeyboardEvent) {
|
|
24
|
+
if (disabled) return;
|
|
25
|
+
|
|
26
|
+
// Activate on Enter or Space
|
|
27
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
28
|
+
event.preventDefault();
|
|
29
|
+
// Call the click handler directly for better test compatibility
|
|
30
|
+
handleClick(new MouseEvent('click', { bubbles: true, cancelable: true }));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
onkeydown?.(event);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Computed classes using $derived
|
|
37
|
+
let computedClasses = $derived(`clickable ${className} ${disabled ? 'disabled' : ''}`);
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<div
|
|
41
|
+
id={uniqueId}
|
|
42
|
+
class={computedClasses}
|
|
43
|
+
role="button"
|
|
44
|
+
tabindex={disabled ? -1 : 0}
|
|
45
|
+
aria-disabled={disabled}
|
|
46
|
+
onclick={handleClick}
|
|
47
|
+
onkeydown={handleKeydown}
|
|
48
|
+
{...restProps}
|
|
49
|
+
>
|
|
50
|
+
{#if children}
|
|
51
|
+
{@render children()}
|
|
52
|
+
{/if}
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<style>
|
|
56
|
+
.clickable {
|
|
57
|
+
all: unset;
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
transition: opacity 0.2s ease;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.clickable:focus-visible {
|
|
66
|
+
outline: 2px solid var(--color-focus, #007bff);
|
|
67
|
+
outline-offset: 2px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.clickable.disabled {
|
|
71
|
+
opacity: 0.6;
|
|
72
|
+
cursor: not-allowed;
|
|
73
|
+
pointer-events: none;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Make sure disabled state overrides any other cursor styles */
|
|
77
|
+
.clickable.disabled,
|
|
78
|
+
.clickable.disabled:hover,
|
|
79
|
+
.clickable.disabled:active,
|
|
80
|
+
.clickable.disabled:focus {
|
|
81
|
+
cursor: not-allowed !important;
|
|
82
|
+
pointer-events: none !important;
|
|
83
|
+
opacity: 0.6 !important;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.clickable:hover:not(.disabled) {
|
|
87
|
+
opacity: 0.8;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.clickable:active:not(.disabled) {
|
|
91
|
+
transform: translateY(1px);
|
|
92
|
+
}
|
|
93
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Clickable } from './Clickable.svelte';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
export interface ClickableProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
class?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
children?: Snippet;
|
|
7
|
+
onclick?: (event: MouseEvent) => void;
|
|
8
|
+
onkeydown?: (event: KeyboardEvent) => void;
|
|
9
|
+
}
|
|
10
|
+
export interface ClickableEvents {
|
|
11
|
+
click: {
|
|
12
|
+
detail: MouseEvent;
|
|
13
|
+
};
|
|
14
|
+
keydown: {
|
|
15
|
+
detail: KeyboardEvent;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* All Re-usable Components
|
|
3
|
+
*/
|
|
4
|
+
import BreakpointItem from './breakpoints/BreakpointItem.svelte';
|
|
5
|
+
import ButtonGroup from './ButtonGroup.svelte';
|
|
6
|
+
import Checkbox from './Checkbox.svelte';
|
|
7
|
+
import { Clickable } from './clickable';
|
|
8
|
+
import Copy from './Copy.svelte';
|
|
9
|
+
import CustomModal from './CustomModal.svelte';
|
|
10
|
+
import DisableInEditMode from './DisableInEditMode.svelte';
|
|
11
|
+
import Divider from './Divider.svelte';
|
|
12
|
+
import Header from './Header.svelte';
|
|
13
|
+
import Iframe from './Iframe.svelte';
|
|
14
|
+
import ImageUpload from './ImageUpload.svelte';
|
|
15
|
+
import InjectComponent from './InjectComponent.svelte';
|
|
16
|
+
import { Input } from './input';
|
|
17
|
+
import { Layout } from './layout';
|
|
18
|
+
import Loader from './Loader.svelte';
|
|
19
|
+
import LoadingScreen from './LoadingScreen.svelte';
|
|
20
|
+
import Modal from './Modal.svelte';
|
|
21
|
+
import Navbar from './Navbar.svelte';
|
|
22
|
+
import NoSettingsNeeded from './NoSettingsNeeded.svelte';
|
|
23
|
+
import Notification from './Notification.svelte';
|
|
24
|
+
import PreviewBar from './PreviewBar.svelte';
|
|
25
|
+
import ScrollableContent from './ScrollableContent.svelte';
|
|
26
|
+
import Section from './Section.svelte';
|
|
27
|
+
import SelectBodyOrDivBlock from './SelectBodyOrDivBlock.svelte';
|
|
28
|
+
import Spacer from './Spacer.svelte';
|
|
29
|
+
import SpinnerPlusMinus from './SpinnerPlusMinus.svelte';
|
|
30
|
+
import SpinnerUpDown from './SpinnerUpDown.svelte';
|
|
31
|
+
import Switch from './switch/Switch.svelte';
|
|
32
|
+
import Tabs from './Tabs.svelte';
|
|
33
|
+
import { Text } from './text';
|
|
34
|
+
import ToggleItem from './ToggleItem.svelte';
|
|
35
|
+
import ToggleList from './ToggleList.svelte';
|
|
36
|
+
import { Tooltip } from './tooltip';
|
|
37
|
+
export { BreakpointItem, ButtonGroup, Checkbox, Clickable, Copy, CustomModal, DisableInEditMode, Notification, Divider, Header, Iframe, ImageUpload, InjectComponent, Layout, Loader, LoadingScreen, Modal, Navbar, NoSettingsNeeded, PreviewBar, ScrollableContent, Section, SelectBodyOrDivBlock, Spacer, SpinnerPlusMinus, SpinnerUpDown, Switch, Tabs, Text, ToggleItem, ToggleList, Tooltip, Input };
|
|
38
|
+
export * from './breakpoints';
|
|
39
|
+
export * from './clickable';
|
|
40
|
+
export * from './input';
|
|
41
|
+
export * from './layout';
|
|
42
|
+
export * from './select';
|
|
43
|
+
export * from './switch';
|
|
44
|
+
export * from './text';
|
|
45
|
+
export * from './tooltip';
|
|
46
|
+
export * from './buttons';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* All Re-usable Components
|
|
3
|
+
*/
|
|
4
|
+
import BreakpointItem from './breakpoints/BreakpointItem.svelte';
|
|
5
|
+
import ButtonGroup from './ButtonGroup.svelte';
|
|
6
|
+
import Checkbox from './Checkbox.svelte';
|
|
7
|
+
import { Clickable } from './clickable';
|
|
8
|
+
import Copy from './Copy.svelte';
|
|
9
|
+
import CustomModal from './CustomModal.svelte';
|
|
10
|
+
import DisableInEditMode from './DisableInEditMode.svelte';
|
|
11
|
+
import Divider from './Divider.svelte';
|
|
12
|
+
import Header from './Header.svelte';
|
|
13
|
+
import Iframe from './Iframe.svelte';
|
|
14
|
+
import ImageUpload from './ImageUpload.svelte';
|
|
15
|
+
import InjectComponent from './InjectComponent.svelte';
|
|
16
|
+
import { Input } from './input';
|
|
17
|
+
import { Layout } from './layout';
|
|
18
|
+
import Loader from './Loader.svelte';
|
|
19
|
+
import LoadingScreen from './LoadingScreen.svelte';
|
|
20
|
+
import Modal from './Modal.svelte';
|
|
21
|
+
import Navbar from './Navbar.svelte';
|
|
22
|
+
import NoSettingsNeeded from './NoSettingsNeeded.svelte';
|
|
23
|
+
import Notification from './Notification.svelte';
|
|
24
|
+
import PreviewBar from './PreviewBar.svelte';
|
|
25
|
+
import ScrollableContent from './ScrollableContent.svelte';
|
|
26
|
+
import Section from './Section.svelte';
|
|
27
|
+
import SelectBodyOrDivBlock from './SelectBodyOrDivBlock.svelte';
|
|
28
|
+
import Spacer from './Spacer.svelte';
|
|
29
|
+
import SpinnerPlusMinus from './SpinnerPlusMinus.svelte';
|
|
30
|
+
import SpinnerUpDown from './SpinnerUpDown.svelte';
|
|
31
|
+
import Switch from './switch/Switch.svelte';
|
|
32
|
+
import Tabs from './Tabs.svelte';
|
|
33
|
+
import { Text } from './text';
|
|
34
|
+
import ToggleItem from './ToggleItem.svelte';
|
|
35
|
+
import ToggleList from './ToggleList.svelte';
|
|
36
|
+
import { Tooltip } from './tooltip';
|
|
37
|
+
export { BreakpointItem, ButtonGroup, Checkbox, Clickable, Copy, CustomModal, DisableInEditMode, Notification, Divider, Header, Iframe, ImageUpload, InjectComponent, Layout, Loader, LoadingScreen, Modal, Navbar, NoSettingsNeeded, PreviewBar, ScrollableContent, Section, SelectBodyOrDivBlock, Spacer, SpinnerPlusMinus, SpinnerUpDown, Switch, Tabs, Text, ToggleItem, ToggleList, Tooltip, Input };
|
|
38
|
+
export * from './breakpoints';
|
|
39
|
+
export * from './clickable';
|
|
40
|
+
export * from './input';
|
|
41
|
+
export * from './layout';
|
|
42
|
+
export * from './select';
|
|
43
|
+
export * from './switch';
|
|
44
|
+
export * from './text';
|
|
45
|
+
export * from './tooltip';
|
|
46
|
+
export * from './buttons';
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/sveltekit';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("svelte").Component<import("./types.js").InputProps, {}, "">;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
tags: string[];
|
|
14
|
+
argTypes: {
|
|
15
|
+
value: {
|
|
16
|
+
control: string;
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
placeholder: {
|
|
20
|
+
control: string;
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
type: {
|
|
24
|
+
control: {
|
|
25
|
+
type: string;
|
|
26
|
+
};
|
|
27
|
+
options: string[];
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
disabled: {
|
|
31
|
+
control: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
readonly: {
|
|
35
|
+
control: string;
|
|
36
|
+
description: string;
|
|
37
|
+
};
|
|
38
|
+
invalid: {
|
|
39
|
+
control: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
autofocus: {
|
|
43
|
+
control: string;
|
|
44
|
+
description: string;
|
|
45
|
+
};
|
|
46
|
+
units: {
|
|
47
|
+
control: string;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
pill: {
|
|
51
|
+
control: {
|
|
52
|
+
type: string;
|
|
53
|
+
};
|
|
54
|
+
options: (string | null)[];
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
57
|
+
fontSize: {
|
|
58
|
+
control: string;
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
width: {
|
|
62
|
+
control: string;
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
height: {
|
|
66
|
+
control: string;
|
|
67
|
+
description: string;
|
|
68
|
+
};
|
|
69
|
+
maxLength: {
|
|
70
|
+
control: string;
|
|
71
|
+
description: string;
|
|
72
|
+
};
|
|
73
|
+
minLength: {
|
|
74
|
+
control: string;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
export default meta;
|
|
80
|
+
type Story = StoryObj<typeof meta>;
|
|
81
|
+
export declare const Default: Story;
|
|
82
|
+
export declare const WithValue: Story;
|
|
83
|
+
export declare const WithPlaceholder: Story;
|
|
84
|
+
export declare const EmailInput: Story;
|
|
85
|
+
export declare const PasswordInput: Story;
|
|
86
|
+
export declare const NumberInput: Story;
|
|
87
|
+
export declare const Disabled: Story;
|
|
88
|
+
export declare const ReadOnly: Story;
|
|
89
|
+
export declare const Invalid: Story;
|
|
90
|
+
export declare const Autofocus: Story;
|
|
91
|
+
export declare const WithPixelUnits: Story;
|
|
92
|
+
export declare const WithPercentageUnits: Story;
|
|
93
|
+
export declare const WithEmUnits: Story;
|
|
94
|
+
export declare const BluePill: Story;
|
|
95
|
+
export declare const GrayPill: Story;
|
|
96
|
+
export declare const PillWithUnits: Story;
|
|
97
|
+
export declare const ErrorAlert: Story;
|
|
98
|
+
export declare const SuccessAlert: Story;
|
|
99
|
+
export declare const InfoAlert: Story;
|
|
100
|
+
export declare const WarningAlert: Story;
|
|
101
|
+
export declare const LongErrorMessage: Story;
|
|
102
|
+
export declare const CustomSize: Story;
|
|
103
|
+
export declare const SmallInput: Story;
|
|
104
|
+
export declare const LargeInput: Story;
|
|
105
|
+
export declare const WithMaxLength: Story;
|
|
106
|
+
export declare const WithMinLength: Story;
|
|
107
|
+
export declare const InteractiveExample: Story;
|
|
108
|
+
export declare const ComplexExample: Story;
|
|
109
|
+
export declare const FormFieldExample: Story;
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
import Input from './Input.svelte';
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Ui/Input',
|
|
4
|
+
component: Input,
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: 'centered',
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: 'A versatile input component with support for various states, validation alerts, pill styling, and units display.'
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
tags: ['autodocs'],
|
|
14
|
+
argTypes: {
|
|
15
|
+
value: {
|
|
16
|
+
control: 'text',
|
|
17
|
+
description: 'Input field value'
|
|
18
|
+
},
|
|
19
|
+
placeholder: {
|
|
20
|
+
control: 'text',
|
|
21
|
+
description: 'Input field placeholder text'
|
|
22
|
+
},
|
|
23
|
+
type: {
|
|
24
|
+
control: { type: 'select' },
|
|
25
|
+
options: ['text', 'email', 'password', 'number', 'tel', 'url'],
|
|
26
|
+
description: 'Input field type'
|
|
27
|
+
},
|
|
28
|
+
disabled: {
|
|
29
|
+
control: 'boolean',
|
|
30
|
+
description: 'Disables the input field'
|
|
31
|
+
},
|
|
32
|
+
readonly: {
|
|
33
|
+
control: 'boolean',
|
|
34
|
+
description: 'Makes the input field read-only'
|
|
35
|
+
},
|
|
36
|
+
invalid: {
|
|
37
|
+
control: 'boolean',
|
|
38
|
+
description: 'Applies invalid styling to the input'
|
|
39
|
+
},
|
|
40
|
+
autofocus: {
|
|
41
|
+
control: 'boolean',
|
|
42
|
+
description: 'Focuses the input when component mounts'
|
|
43
|
+
},
|
|
44
|
+
units: {
|
|
45
|
+
control: 'text',
|
|
46
|
+
description: 'Units display text (e.g., "px", "em", "%")'
|
|
47
|
+
},
|
|
48
|
+
pill: {
|
|
49
|
+
control: { type: 'select' },
|
|
50
|
+
options: [null, 'blue', 'gray'],
|
|
51
|
+
description: 'Pill background variant'
|
|
52
|
+
},
|
|
53
|
+
fontSize: {
|
|
54
|
+
control: 'text',
|
|
55
|
+
description: 'Custom font size'
|
|
56
|
+
},
|
|
57
|
+
width: {
|
|
58
|
+
control: 'text',
|
|
59
|
+
description: 'Input width'
|
|
60
|
+
},
|
|
61
|
+
height: {
|
|
62
|
+
control: 'text',
|
|
63
|
+
description: 'Input height'
|
|
64
|
+
},
|
|
65
|
+
maxLength: {
|
|
66
|
+
control: 'number',
|
|
67
|
+
description: 'Maximum input length'
|
|
68
|
+
},
|
|
69
|
+
minLength: {
|
|
70
|
+
control: 'number',
|
|
71
|
+
description: 'Minimum input length'
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
export default meta;
|
|
76
|
+
// Basic stories
|
|
77
|
+
export const Default = {
|
|
78
|
+
args: {
|
|
79
|
+
placeholder: 'Enter text...'
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
export const WithValue = {
|
|
83
|
+
args: {
|
|
84
|
+
value: 'Sample text',
|
|
85
|
+
placeholder: 'Enter text...'
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
export const WithPlaceholder = {
|
|
89
|
+
args: {
|
|
90
|
+
placeholder: 'Type something here...'
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
// Input types
|
|
94
|
+
export const EmailInput = {
|
|
95
|
+
args: {
|
|
96
|
+
type: 'email',
|
|
97
|
+
placeholder: 'Enter your email...'
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
export const PasswordInput = {
|
|
101
|
+
args: {
|
|
102
|
+
type: 'password',
|
|
103
|
+
placeholder: 'Enter password...'
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
export const NumberInput = {
|
|
107
|
+
args: {
|
|
108
|
+
type: 'number',
|
|
109
|
+
placeholder: 'Enter a number...'
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
// States
|
|
113
|
+
export const Disabled = {
|
|
114
|
+
args: {
|
|
115
|
+
value: 'Disabled input',
|
|
116
|
+
disabled: true
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
export const ReadOnly = {
|
|
120
|
+
args: {
|
|
121
|
+
value: 'Read-only input',
|
|
122
|
+
readonly: true
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
export const Invalid = {
|
|
126
|
+
args: {
|
|
127
|
+
value: 'Invalid input',
|
|
128
|
+
invalid: true
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
export const Autofocus = {
|
|
132
|
+
args: {
|
|
133
|
+
autofocus: true,
|
|
134
|
+
placeholder: 'This input has autofocus'
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
// With units
|
|
138
|
+
export const WithPixelUnits = {
|
|
139
|
+
args: {
|
|
140
|
+
value: '20',
|
|
141
|
+
units: 'px',
|
|
142
|
+
placeholder: 'Enter pixels...'
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
export const WithPercentageUnits = {
|
|
146
|
+
args: {
|
|
147
|
+
value: '50',
|
|
148
|
+
units: '%',
|
|
149
|
+
placeholder: 'Enter percentage...'
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
export const WithEmUnits = {
|
|
153
|
+
args: {
|
|
154
|
+
value: '1.5',
|
|
155
|
+
units: 'em',
|
|
156
|
+
placeholder: 'Enter em value...'
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
// Pills
|
|
160
|
+
export const BluePill = {
|
|
161
|
+
args: {
|
|
162
|
+
value: 'Blue pill text',
|
|
163
|
+
pill: 'blue'
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
export const GrayPill = {
|
|
167
|
+
args: {
|
|
168
|
+
value: 'Gray pill text',
|
|
169
|
+
pill: 'gray'
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
export const PillWithUnits = {
|
|
173
|
+
args: {
|
|
174
|
+
value: '100',
|
|
175
|
+
pill: 'blue',
|
|
176
|
+
units: 'px'
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
// Alert states (now using Tooltip component)
|
|
180
|
+
export const ErrorAlert = {
|
|
181
|
+
args: {
|
|
182
|
+
value: 'Input with error',
|
|
183
|
+
invalid: true,
|
|
184
|
+
alert: {
|
|
185
|
+
type: 'error',
|
|
186
|
+
message: 'This field contains an error'
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
parameters: {
|
|
190
|
+
docs: {
|
|
191
|
+
description: {
|
|
192
|
+
story: 'Input with error state. Hover over the input to see the error tooltip.'
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
export const SuccessAlert = {
|
|
198
|
+
args: {
|
|
199
|
+
value: 'Valid input',
|
|
200
|
+
alert: {
|
|
201
|
+
type: 'success',
|
|
202
|
+
message: 'Input is valid!'
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
parameters: {
|
|
206
|
+
docs: {
|
|
207
|
+
description: {
|
|
208
|
+
story: 'Input with success state. Hover to see the success tooltip.'
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
export const InfoAlert = {
|
|
214
|
+
args: {
|
|
215
|
+
value: 'Info message',
|
|
216
|
+
alert: {
|
|
217
|
+
type: 'info',
|
|
218
|
+
message: 'Additional information about this field'
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
parameters: {
|
|
222
|
+
docs: {
|
|
223
|
+
description: {
|
|
224
|
+
story: 'Input with info state. Hover to see the info tooltip.'
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
export const WarningAlert = {
|
|
230
|
+
args: {
|
|
231
|
+
value: 'Warning input',
|
|
232
|
+
alert: {
|
|
233
|
+
type: 'warning',
|
|
234
|
+
message: 'Please review this input'
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
parameters: {
|
|
238
|
+
docs: {
|
|
239
|
+
description: {
|
|
240
|
+
story: 'Input with warning state. Hover to see the warning tooltip.'
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
export const LongErrorMessage = {
|
|
246
|
+
args: {
|
|
247
|
+
value: 'Invalid email format',
|
|
248
|
+
invalid: true,
|
|
249
|
+
alert: {
|
|
250
|
+
type: 'error',
|
|
251
|
+
message: 'Please enter a valid email address. The format should be user@domain.com'
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
parameters: {
|
|
255
|
+
docs: {
|
|
256
|
+
description: {
|
|
257
|
+
story: 'Input with a longer error message. The tooltip automatically adjusts to fit the content.'
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
// Sizing
|
|
263
|
+
export const CustomSize = {
|
|
264
|
+
args: {
|
|
265
|
+
placeholder: 'Custom sized input',
|
|
266
|
+
width: '300px',
|
|
267
|
+
height: '40px',
|
|
268
|
+
fontSize: '16px'
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
export const SmallInput = {
|
|
272
|
+
args: {
|
|
273
|
+
placeholder: 'Small input',
|
|
274
|
+
width: '150px',
|
|
275
|
+
height: '28px',
|
|
276
|
+
fontSize: '12px'
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
export const LargeInput = {
|
|
280
|
+
args: {
|
|
281
|
+
placeholder: 'Large input',
|
|
282
|
+
width: '400px',
|
|
283
|
+
height: '48px',
|
|
284
|
+
fontSize: '18px'
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
// Length constraints
|
|
288
|
+
export const WithMaxLength = {
|
|
289
|
+
args: {
|
|
290
|
+
placeholder: 'Max 10 characters',
|
|
291
|
+
maxLength: 10
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
export const WithMinLength = {
|
|
295
|
+
args: {
|
|
296
|
+
placeholder: 'Min 5 characters',
|
|
297
|
+
minLength: 5
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
// Interactive examples
|
|
301
|
+
export const InteractiveExample = {
|
|
302
|
+
args: {
|
|
303
|
+
placeholder: 'Type to see events',
|
|
304
|
+
oninput: (value) => console.log('Input event:', value),
|
|
305
|
+
onblur: (value) => console.log('Blur event:', value),
|
|
306
|
+
onfocus: (event) => console.log('Focus event:', event),
|
|
307
|
+
onkeydown: (event) => console.log('Keydown event:', event)
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
// Complex combinations
|
|
311
|
+
export const ComplexExample = {
|
|
312
|
+
args: {
|
|
313
|
+
value: '42',
|
|
314
|
+
pill: 'blue',
|
|
315
|
+
units: 'px',
|
|
316
|
+
maxLength: 4,
|
|
317
|
+
type: 'number',
|
|
318
|
+
width: '200px',
|
|
319
|
+
alert: {
|
|
320
|
+
type: 'info',
|
|
321
|
+
message: 'Enter a pixel value'
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
export const FormFieldExample = {
|
|
326
|
+
args: {
|
|
327
|
+
id: 'email-field',
|
|
328
|
+
type: 'email',
|
|
329
|
+
placeholder: 'your.email@example.com',
|
|
330
|
+
width: '300px',
|
|
331
|
+
alert: {
|
|
332
|
+
type: 'error',
|
|
333
|
+
message: 'Please enter a valid email address'
|
|
334
|
+
},
|
|
335
|
+
invalid: true
|
|
336
|
+
}
|
|
337
|
+
};
|