@intlayer/design-system 5.7.6-canary.0 → 5.7.7
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 +3 -0
- package/dist/.vite/manifest.json +8 -0
- package/dist/Form-CriPBaZk.js.map +1 -1
- package/dist/Form-DJrUK3mm.cjs.map +1 -1
- package/dist/better-auth.8zoxzg-F-BEBqzpjz.cjs.map +1 -1
- package/dist/better-auth.8zoxzg-F-D8e0X4ys.js.map +1 -1
- package/dist/components/Accordion/Accordion.cjs.map +1 -1
- package/dist/components/Accordion/Accordion.mjs.map +1 -1
- package/dist/components/Avatar/index.cjs.map +1 -1
- package/dist/components/Avatar/index.mjs.map +1 -1
- package/dist/components/Badge/index.cjs.map +1 -1
- package/dist/components/Badge/index.mjs.map +1 -1
- package/dist/components/Breadcrumb/breadcrumb.content.cjs.map +1 -1
- package/dist/components/Breadcrumb/breadcrumb.content.mjs.map +1 -1
- package/dist/components/Breadcrumb/index.cjs.map +1 -1
- package/dist/components/Breadcrumb/index.mjs.map +1 -1
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.mjs.map +1 -1
- package/dist/components/ClickOutsideDiv/index.cjs.map +1 -1
- package/dist/components/ClickOutsideDiv/index.mjs.map +1 -1
- package/dist/components/Command/index.cjs.map +1 -1
- package/dist/components/Command/index.mjs.map +1 -1
- package/dist/components/Container/index.cjs.map +1 -1
- package/dist/components/Container/index.mjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditor.cjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditor.mjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorInput.cjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorInput.mjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.cjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.mjs.map +1 -1
- package/dist/components/ContentSelector/ContentSelector.cjs.map +1 -1
- package/dist/components/CopyButton/index.cjs.map +1 -1
- package/dist/components/CopyButton/index.mjs.map +1 -1
- package/dist/components/CopyToClipboard/index.cjs.map +1 -1
- package/dist/components/CopyToClipboard/index.mjs.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
- package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
- package/dist/components/DictionaryEditor/ItemLayout.cjs.map +1 -1
- package/dist/components/DictionaryEditor/ItemLayout.mjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/FileWrapper.cjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/FileWrapper.mjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs.map +1 -1
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/JSONEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/JSONEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/getIsEditableSection.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/getIsEditableSection.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs.map +1 -1
- package/dist/components/DropDown/index.cjs.map +1 -1
- package/dist/components/DropDown/index.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldInput.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldInput.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldLayout.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldLayout.mjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.cjs.map +1 -1
- package/dist/components/EditableField/EditableFieldTextArea.mjs.map +1 -1
- package/dist/components/Flags/Flag.cjs.map +1 -1
- package/dist/components/Flags/Flag.mjs.map +1 -1
- package/dist/components/Footer/index.cjs +1 -1
- package/dist/components/Footer/index.cjs.map +1 -1
- package/dist/components/Footer/index.mjs +1 -1
- package/dist/components/Footer/index.mjs.map +1 -1
- package/dist/components/Form/FormBase.cjs.map +1 -1
- package/dist/components/Form/FormBase.mjs.map +1 -1
- package/dist/components/Form/FormControl.cjs.map +1 -1
- package/dist/components/Form/FormControl.mjs.map +1 -1
- package/dist/components/Form/FormDescription.cjs.map +1 -1
- package/dist/components/Form/FormDescription.mjs.map +1 -1
- package/dist/components/Form/FormField.cjs.map +1 -1
- package/dist/components/Form/FormField.mjs.map +1 -1
- package/dist/components/Form/FormItem.cjs.map +1 -1
- package/dist/components/Form/FormItem.mjs.map +1 -1
- package/dist/components/Form/FormLabel.cjs.map +1 -1
- package/dist/components/Form/FormLabel.mjs.map +1 -1
- package/dist/components/Form/FormMessage.cjs.map +1 -1
- package/dist/components/Form/FormMessage.mjs.map +1 -1
- package/dist/components/Form/elements/FormElementWrapper.cjs.map +1 -1
- package/dist/components/Form/elements/FormElementWrapper.mjs.map +1 -1
- package/dist/components/Form/layout/FormLabelLayout.cjs.map +1 -1
- package/dist/components/Form/layout/FormLabelLayout.mjs.map +1 -1
- package/dist/components/Form/layout/RequiredStar.cjs.map +1 -1
- package/dist/components/Form/layout/RequiredStar.mjs.map +1 -1
- package/dist/components/Headers/SectionScroller.cjs.map +1 -1
- package/dist/components/Headers/SectionScroller.mjs.map +1 -1
- package/dist/components/Headers/index.cjs.map +1 -1
- package/dist/components/Headers/index.mjs.map +1 -1
- package/dist/components/HeightResizer/index.cjs.map +1 -1
- package/dist/components/HeightResizer/index.mjs.map +1 -1
- package/dist/components/IDE/Code.cjs.map +1 -1
- package/dist/components/IDE/Code.mjs.map +1 -1
- package/dist/components/IDE/CodeBlockClient.cjs.map +1 -1
- package/dist/components/IDE/CodeBlockClient.mjs.map +1 -1
- package/dist/components/IDE/CodeBlockServer.cjs.map +1 -1
- package/dist/components/IDE/CodeBlockServer.mjs.map +1 -1
- package/dist/components/IDE/CodeConditionalRenderer.cjs.map +1 -1
- package/dist/components/IDE/CodeConditionalRenderer.mjs.map +1 -1
- package/dist/components/IDE/CodeContext.cjs.map +1 -1
- package/dist/components/IDE/CodeContext.mjs.map +1 -1
- package/dist/components/IDE/CodeFormatSelector.cjs.map +1 -1
- package/dist/components/IDE/CodeFormatSelector.mjs.map +1 -1
- package/dist/components/IDE/ContentDeclarationFormatSelector.cjs.map +1 -1
- package/dist/components/IDE/ContentDeclarationFormatSelector.mjs.map +1 -1
- package/dist/components/IDE/CopyButton.content.cjs.map +1 -1
- package/dist/components/IDE/CopyButton.content.mjs.map +1 -1
- package/dist/components/IDE/CopyCode.cjs.map +1 -1
- package/dist/components/IDE/CopyCode.mjs.map +1 -1
- package/dist/components/IDE/FileList.cjs.map +1 -1
- package/dist/components/IDE/FileList.mjs.map +1 -1
- package/dist/components/IDE/FileTree.cjs.map +1 -1
- package/dist/components/IDE/FileTree.mjs.map +1 -1
- package/dist/components/IDE/IDE.cjs.map +1 -1
- package/dist/components/IDE/IDE.mjs.map +1 -1
- package/dist/components/IDE/MarkDownRender.cjs.map +1 -1
- package/dist/components/IDE/MarkDownRender.mjs.map +1 -1
- package/dist/components/IDE/MonacoCode.cjs.map +1 -1
- package/dist/components/IDE/MonacoCode.mjs.map +1 -1
- package/dist/components/IDE/PackageManagerSelector.cjs.map +1 -1
- package/dist/components/IDE/PackageManagerSelector.mjs.map +1 -1
- package/dist/components/IDE/code.content.cjs.map +1 -1
- package/dist/components/IDE/code.content.mjs.map +1 -1
- package/dist/components/IDE/copyCode.content.cjs.map +1 -1
- package/dist/components/IDE/copyCode.content.mjs.map +1 -1
- package/dist/components/IDE/createFileTree.cjs.map +1 -1
- package/dist/components/IDE/createFileTree.mjs.map +1 -1
- package/dist/components/InformationTag/index.cjs.map +1 -1
- package/dist/components/InformationTag/index.mjs.map +1 -1
- package/dist/components/Input/Checkbox.cjs.map +1 -1
- package/dist/components/Input/Checkbox.mjs.map +1 -1
- package/dist/components/Input/Input.cjs.map +1 -1
- package/dist/components/Input/Input.mjs.map +1 -1
- package/dist/components/Input/InputPassword.cjs.map +1 -1
- package/dist/components/Input/InputPassword.mjs.map +1 -1
- package/dist/components/KeyboardScreenAdapter/index.cjs.map +1 -1
- package/dist/components/KeyboardScreenAdapter/index.mjs.map +1 -1
- package/dist/components/Label/index.cjs.map +1 -1
- package/dist/components/Link/Link.cjs.map +1 -1
- package/dist/components/Link/Link.mjs.map +1 -1
- package/dist/components/Loader/index.cjs.map +1 -1
- package/dist/components/Loader/index.content.cjs.map +1 -1
- package/dist/components/Loader/index.content.mjs.map +1 -1
- package/dist/components/Loader/index.mjs.map +1 -1
- package/dist/components/Loader/spinner.cjs.map +1 -1
- package/dist/components/Loader/spinner.mjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.cjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.cjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs.map +1 -1
- package/dist/components/Logo/Logo.cjs.map +1 -1
- package/dist/components/Logo/Logo.mjs.map +1 -1
- package/dist/components/Logo/LogoTextOnly.cjs.map +1 -1
- package/dist/components/Logo/LogoTextOnly.mjs.map +1 -1
- package/dist/components/Logo/LogoWithText.cjs.map +1 -1
- package/dist/components/Logo/LogoWithText.mjs.map +1 -1
- package/dist/components/Logo/LogoWithTextBelow.cjs.map +1 -1
- package/dist/components/Logo/LogoWithTextBelow.mjs.map +1 -1
- package/dist/components/MarkDownRender/index.cjs.map +1 -1
- package/dist/components/MarkDownRender/index.mjs.map +1 -1
- package/dist/components/MaxHeightSmoother/index.cjs.map +1 -1
- package/dist/components/MaxHeightSmoother/index.mjs.map +1 -1
- package/dist/components/MaxWidthSmoother/index.cjs.map +1 -1
- package/dist/components/MaxWidthSmoother/index.mjs.map +1 -1
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.mjs.map +1 -1
- package/dist/components/Navbar/Burger.cjs.map +1 -1
- package/dist/components/Navbar/Burger.mjs.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.cjs.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.mjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.cjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.mjs.map +1 -1
- package/dist/components/Navbar/index.cjs.map +1 -1
- package/dist/components/Navbar/index.mjs.map +1 -1
- package/dist/components/Navbar/useNavigation.cjs.map +1 -1
- package/dist/components/Navbar/useNavigation.mjs.map +1 -1
- package/dist/components/Pattern/DotPattern.cjs.map +1 -1
- package/dist/components/Pattern/DotPattern.mjs.map +1 -1
- package/dist/components/Pattern/GridPattern.cjs.map +1 -1
- package/dist/components/Pattern/GridPattern.mjs.map +1 -1
- package/dist/components/Pattern/SpotLight.cjs.map +1 -1
- package/dist/components/Pattern/SpotLight.mjs.map +1 -1
- package/dist/components/Popover/index.cjs.map +1 -1
- package/dist/components/Popover/index.mjs.map +1 -1
- package/dist/components/PressableSpan/PressableSpan.cjs.map +1 -1
- package/dist/components/PressableSpan/PressableSpan.mjs.map +1 -1
- package/dist/components/RightDrawer/RightDrawer.cjs.map +1 -1
- package/dist/components/RightDrawer/RightDrawer.mjs.map +1 -1
- package/dist/components/RightDrawer/isElementAtTopAndNotCovered.cjs.map +1 -1
- package/dist/components/RightDrawer/isElementAtTopAndNotCovered.mjs.map +1 -1
- package/dist/components/RightDrawer/useRightDrawerStore.cjs.map +1 -1
- package/dist/components/RightDrawer/useRightDrawerStore.mjs.map +1 -1
- package/dist/components/Select/Multiselect.cjs.map +1 -1
- package/dist/components/Select/Multiselect.mjs.map +1 -1
- package/dist/components/Select/Select.cjs.map +1 -1
- package/dist/components/Select/Select.mjs.map +1 -1
- package/dist/components/SocialNetworks/DiscordLogo.cjs +23 -0
- package/dist/components/SocialNetworks/DiscordLogo.cjs.map +1 -0
- package/dist/components/SocialNetworks/DiscordLogo.d.ts +3 -0
- package/dist/components/SocialNetworks/DiscordLogo.d.ts.map +1 -0
- package/dist/components/SocialNetworks/DiscordLogo.mjs +23 -0
- package/dist/components/SocialNetworks/DiscordLogo.mjs.map +1 -0
- package/dist/components/SocialNetworks/FacebookLogo.cjs.map +1 -1
- package/dist/components/SocialNetworks/FacebookLogo.mjs.map +1 -1
- package/dist/components/SocialNetworks/InstagramLogo.cjs.map +1 -1
- package/dist/components/SocialNetworks/InstagramLogo.mjs.map +1 -1
- package/dist/components/SocialNetworks/LinkedInLogo.cjs.map +1 -1
- package/dist/components/SocialNetworks/LinkedInLogo.mjs.map +1 -1
- package/dist/components/SocialNetworks/ProductHuntLogo.cjs.map +1 -1
- package/dist/components/SocialNetworks/ProductHuntLogo.mjs.map +1 -1
- package/dist/components/SocialNetworks/TiktokLogo.cjs.map +1 -1
- package/dist/components/SocialNetworks/TiktokLogo.mjs.map +1 -1
- package/dist/components/SocialNetworks/XLogo.cjs.map +1 -1
- package/dist/components/SocialNetworks/XLogo.mjs.map +1 -1
- package/dist/components/SocialNetworks/YoutubeLogo.cjs.map +1 -1
- package/dist/components/SocialNetworks/YoutubeLogo.mjs.map +1 -1
- package/dist/components/SocialNetworks/index.cjs +7 -0
- package/dist/components/SocialNetworks/index.cjs.map +1 -1
- package/dist/components/SocialNetworks/index.d.ts +1 -0
- package/dist/components/SocialNetworks/index.d.ts.map +1 -1
- package/dist/components/SocialNetworks/index.mjs +7 -0
- package/dist/components/SocialNetworks/index.mjs.map +1 -1
- package/dist/components/SwitchSelector/index.cjs.map +1 -1
- package/dist/components/SwitchSelector/index.mjs.map +1 -1
- package/dist/components/TabSelector/TabSelector.cjs.map +1 -1
- package/dist/components/TabSelector/TabSelector.mjs.map +1 -1
- package/dist/components/Tag/index.cjs.map +1 -1
- package/dist/components/Tag/index.mjs.map +1 -1
- package/dist/components/TextArea/AutoSizeTextArea.cjs.map +1 -1
- package/dist/components/TextArea/AutoSizeTextArea.mjs.map +1 -1
- package/dist/components/TextArea/AutocompleteTextArea.cjs.map +1 -1
- package/dist/components/TextArea/AutocompleteTextArea.mjs.map +1 -1
- package/dist/components/TextArea/TextArea.cjs.map +1 -1
- package/dist/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.cjs.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.cjs.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.mjs.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/types.cjs.map +1 -1
- package/dist/components/ThemeSwitcherDropDown/types.mjs.map +1 -1
- package/dist/components/Toaster/Toast.cjs.map +1 -1
- package/dist/components/Toaster/Toast.mjs.map +1 -1
- package/dist/components/Toaster/Toaster.cjs.map +1 -1
- package/dist/components/Toaster/Toaster.mjs.map +1 -1
- package/dist/components/Toaster/useToast.cjs.map +1 -1
- package/dist/components/Toaster/useToast.mjs.map +1 -1
- package/dist/components/WithResizer/index.cjs.map +1 -1
- package/dist/components/WithResizer/index.mjs.map +1 -1
- package/dist/components/index.cjs +2 -0
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.mjs +2 -0
- package/dist/components/index.mjs.map +1 -1
- package/dist/hooks/auth.cjs.map +1 -1
- package/dist/hooks/auth.mjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncWrapper.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncWrapper.mjs.map +1 -1
- package/dist/hooks/useAuth/useAuth.cjs.map +1 -1
- package/dist/hooks/useAuth/useAuth.mjs.map +1 -1
- package/dist/hooks/useAuth/useOAuth2.cjs.map +1 -1
- package/dist/hooks/useAuth/useOAuth2.mjs.map +1 -1
- package/dist/hooks/useAuth/useSession.cjs.map +1 -1
- package/dist/hooks/useAuth/useSession.mjs.map +1 -1
- package/dist/hooks/useDevice.cjs.map +1 -1
- package/dist/hooks/useDevice.mjs.map +1 -1
- package/dist/hooks/useGetAllDictionaries.cjs.map +1 -1
- package/dist/hooks/useGetAllDictionaries.mjs.map +1 -1
- package/dist/hooks/useGetElementOrWindow.cjs.map +1 -1
- package/dist/hooks/useGetElementOrWindow.mjs.map +1 -1
- package/dist/hooks/useIntlayerAPI.cjs.map +1 -1
- package/dist/hooks/useIntlayerAPI.mjs.map +1 -1
- package/dist/hooks/useIsDarkMode.cjs.map +1 -1
- package/dist/hooks/useIsDarkMode.mjs.map +1 -1
- package/dist/hooks/useIsMounted.cjs.map +1 -1
- package/dist/hooks/useIsMounted.mjs.map +1 -1
- package/dist/hooks/useItemSelector.cjs.map +1 -1
- package/dist/hooks/useItemSelector.mjs.map +1 -1
- package/dist/hooks/useKeyboardDetector.cjs.map +1 -1
- package/dist/hooks/useKeyboardDetector.mjs.map +1 -1
- package/dist/hooks/usePersistedStore.cjs.map +1 -1
- package/dist/hooks/usePersistedStore.mjs.map +1 -1
- package/dist/hooks/useScreenWidth.cjs.map +1 -1
- package/dist/hooks/useScreenWidth.mjs.map +1 -1
- package/dist/hooks/useScrollBlockage/useScrollBlockageStore.cjs.map +1 -1
- package/dist/hooks/useScrollBlockage/useScrollBlockageStore.mjs.map +1 -1
- package/dist/hooks/useScrollDetection.cjs.map +1 -1
- package/dist/hooks/useScrollDetection.mjs.map +1 -1
- package/dist/hooks/useUser/index.cjs.map +1 -1
- package/dist/hooks/useUser/index.mjs.map +1 -1
- package/dist/index-BCuMWKyy.js.map +1 -1
- package/dist/index-BYzBot7l.cjs.map +1 -1
- package/dist/index-DW4Wnns5.cjs.map +1 -1
- package/dist/index-aPP3MzPT.js.map +1 -1
- package/dist/parse-BJVwmz92.cjs.map +1 -1
- package/dist/parse-pnJgclyf.js.map +1 -1
- package/dist/schemas-BIuxHDyZ.js.map +1 -1
- package/dist/schemas-Q6C7ZNs3.cjs.map +1 -1
- package/dist/tailwind.config.cjs.map +1 -1
- package/dist/tailwind.config.mjs.map +1 -1
- package/dist/utils/camelCase.cjs.map +1 -1
- package/dist/utils/camelCase.mjs.map +1 -1
- package/dist/utils/capitalize.cjs.map +1 -1
- package/dist/utils/capitalize.mjs.map +1 -1
- package/dist/utils/object.cjs.map +1 -1
- package/dist/utils/object.mjs.map +1 -1
- package/dist/zod-D4WapgbL.js.map +1 -1
- package/dist/zod-K7y5gPX4.cjs.map +1 -1
- package/package.json +16 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code.content.cjs","sources":["../../../src/components/IDE/code.content.ts"],"sourcesContent":["import { t, type Dictionary } from 'intlayer';\n\nconst codeContent = {\n key: 'code',\n content: {\n title: t({\n en: 'Copy code',\n es: 'Copiar código',\n pt: 'Copiar código',\n fr: 'Copier le code',\n de: 'Code kopieren',\n it: 'Copiare il codice',\n ja: 'コードをコピー',\n ko: '코드 복사',\n zh: '复制代码',\n hi: 'कोड कॉपी करें',\n 'en-GB': 'Copy code',\n ru: 'Копировать код',\n ar: 'نسخ الكود',\n }),\n description: t({\n en: 'Copy the code to the clipboard',\n es: 'Copiar el código al portapapeles',\n pt: 'Copiar o código para a área de transferência',\n fr: 'Copier le code dans le presse-papiers',\n de: 'Kopieren Sie den Code in die Zwischenablage',\n it: 'Copiare il codice nella clipboard',\n ja: 'コードをクリップボードにコピー',\n ko: '코드를 클립보드에 복사',\n zh: '复制代码到剪贴板',\n hi: 'कोड को क्लिपबोर्ड पर कॉपी करें',\n 'en-GB': 'Copy the code to the clipboard',\n ru: 'Копировать код в буфер обмена',\n ar: 'نسخ الكود إلى الحافظة',\n }),\n },\n} satisfies Dictionary;\n\nexport default codeContent;\n"],"names":["t"],"mappings":";;AAEA,MAAM,cAAc;AAAA,EAClB,KAAK;AAAA,EACL,SAAS;AAAA,IACP,OAAOA,SAAAA,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,aAAaA,SAAAA,EAAE;AAAA,MACb,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,
|
|
1
|
+
{"version":3,"file":"code.content.cjs","sources":["../../../src/components/IDE/code.content.ts"],"sourcesContent":["import { t, type Dictionary } from 'intlayer';\n\nconst codeContent = {\n key: 'code',\n content: {\n title: t({\n en: 'Copy code',\n es: 'Copiar código',\n pt: 'Copiar código',\n fr: 'Copier le code',\n de: 'Code kopieren',\n it: 'Copiare il codice',\n ja: 'コードをコピー',\n ko: '코드 복사',\n zh: '复制代码',\n hi: 'कोड कॉपी करें',\n 'en-GB': 'Copy code',\n ru: 'Копировать код',\n ar: 'نسخ الكود',\n }),\n description: t({\n en: 'Copy the code to the clipboard',\n es: 'Copiar el código al portapapeles',\n pt: 'Copiar o código para a área de transferência',\n fr: 'Copier le code dans le presse-papiers',\n de: 'Kopieren Sie den Code in die Zwischenablage',\n it: 'Copiare il codice nella clipboard',\n ja: 'コードをクリップボードにコピー',\n ko: '코드를 클립보드에 복사',\n zh: '复制代码到剪贴板',\n hi: 'कोड को क्लिपबोर्ड पर कॉपी करें',\n 'en-GB': 'Copy the code to the clipboard',\n ru: 'Копировать код в буфер обмена',\n ar: 'نسخ الكود إلى الحافظة',\n }),\n },\n} satisfies Dictionary;\n\nexport default codeContent;\n"],"names":["t"],"mappings":";;AAEA,MAAM,cAAc;AAAA,EAClB,KAAK;AAAA,EACL,SAAS;AAAA,IACP,OAAOA,SAAAA,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,aAAaA,SAAAA,EAAE;AAAA,MACb,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,EAAA;AAEL;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code.content.mjs","sources":["../../../src/components/IDE/code.content.ts"],"sourcesContent":["import { t, type Dictionary } from 'intlayer';\n\nconst codeContent = {\n key: 'code',\n content: {\n title: t({\n en: 'Copy code',\n es: 'Copiar código',\n pt: 'Copiar código',\n fr: 'Copier le code',\n de: 'Code kopieren',\n it: 'Copiare il codice',\n ja: 'コードをコピー',\n ko: '코드 복사',\n zh: '复制代码',\n hi: 'कोड कॉपी करें',\n 'en-GB': 'Copy code',\n ru: 'Копировать код',\n ar: 'نسخ الكود',\n }),\n description: t({\n en: 'Copy the code to the clipboard',\n es: 'Copiar el código al portapapeles',\n pt: 'Copiar o código para a área de transferência',\n fr: 'Copier le code dans le presse-papiers',\n de: 'Kopieren Sie den Code in die Zwischenablage',\n it: 'Copiare il codice nella clipboard',\n ja: 'コードをクリップボードにコピー',\n ko: '코드를 클립보드에 복사',\n zh: '复制代码到剪贴板',\n hi: 'कोड को क्लिपबोर्ड पर कॉपी करें',\n 'en-GB': 'Copy the code to the clipboard',\n ru: 'Копировать код в буфер обмена',\n ar: 'نسخ الكود إلى الحافظة',\n }),\n },\n} satisfies Dictionary;\n\nexport default codeContent;\n"],"names":[],"mappings":";AAEA,MAAM,cAAc;AAAA,EAClB,KAAK;AAAA,EACL,SAAS;AAAA,IACP,OAAO,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,aAAa,EAAE;AAAA,MACb,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,
|
|
1
|
+
{"version":3,"file":"code.content.mjs","sources":["../../../src/components/IDE/code.content.ts"],"sourcesContent":["import { t, type Dictionary } from 'intlayer';\n\nconst codeContent = {\n key: 'code',\n content: {\n title: t({\n en: 'Copy code',\n es: 'Copiar código',\n pt: 'Copiar código',\n fr: 'Copier le code',\n de: 'Code kopieren',\n it: 'Copiare il codice',\n ja: 'コードをコピー',\n ko: '코드 복사',\n zh: '复制代码',\n hi: 'कोड कॉपी करें',\n 'en-GB': 'Copy code',\n ru: 'Копировать код',\n ar: 'نسخ الكود',\n }),\n description: t({\n en: 'Copy the code to the clipboard',\n es: 'Copiar el código al portapapeles',\n pt: 'Copiar o código para a área de transferência',\n fr: 'Copier le code dans le presse-papiers',\n de: 'Kopieren Sie den Code in die Zwischenablage',\n it: 'Copiare il codice nella clipboard',\n ja: 'コードをクリップボードにコピー',\n ko: '코드를 클립보드에 복사',\n zh: '复制代码到剪贴板',\n hi: 'कोड को क्लिपबोर्ड पर कॉपी करें',\n 'en-GB': 'Copy the code to the clipboard',\n ru: 'Копировать код в буфер обмена',\n ar: 'نسخ الكود إلى الحافظة',\n }),\n },\n} satisfies Dictionary;\n\nexport default codeContent;\n"],"names":[],"mappings":";AAEA,MAAM,cAAc;AAAA,EAClB,KAAK;AAAA,EACL,SAAS;AAAA,IACP,OAAO,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,aAAa,EAAE;AAAA,MACb,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,EAAA;AAEL;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copyCode.content.cjs","sources":["../../../src/components/IDE/copyCode.content.ts"],"sourcesContent":["import { t, type Dictionary } from 'intlayer';\n\nconst copyContentContent = {\n key: 'code',\n content: {\n title: t({\n en: 'Copy code',\n es: 'Copiar código',\n pt: 'Copiar código',\n fr: 'Copier le code',\n de: 'Code kopieren',\n it: 'Copiare il codice',\n ja: 'コードをコピー',\n ko: '코드 복사',\n zh: '复制代码',\n hi: 'कोड कॉपी करें',\n 'en-GB': 'Copy code',\n ru: 'Копировать код',\n ar: 'نسخ الكود',\n }),\n description: t({\n en: 'Copy the code to the clipboard',\n es: 'Copiar el código al portapapeles',\n pt: 'Copiar o código para a área de transferência',\n fr: 'Copier le code dans le presse-papiers',\n de: 'Kopieren Sie den Code in die Zwischenablage',\n it: 'Copiare il codice nella clipboard',\n ja: 'コードをクリップボードにコピー',\n ko: '코드를 클립보드에 복사',\n zh: '复制代码到剪贴板',\n hi: 'कोड को क्लिपबोर्ड पर कॉपी करें',\n 'en-GB': 'Copy the code to the clipboard',\n ru: 'Копировать код в буфер обмена',\n ar: 'نسخ الكود إلى الحافظة',\n }),\n },\n} satisfies Dictionary;\n\nexport default copyContentContent;\n"],"names":["t"],"mappings":";;AAEA,MAAM,qBAAqB;AAAA,EACzB,KAAK;AAAA,EACL,SAAS;AAAA,IACP,OAAOA,SAAAA,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,aAAaA,SAAAA,EAAE;AAAA,MACb,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,
|
|
1
|
+
{"version":3,"file":"copyCode.content.cjs","sources":["../../../src/components/IDE/copyCode.content.ts"],"sourcesContent":["import { t, type Dictionary } from 'intlayer';\n\nconst copyContentContent = {\n key: 'code',\n content: {\n title: t({\n en: 'Copy code',\n es: 'Copiar código',\n pt: 'Copiar código',\n fr: 'Copier le code',\n de: 'Code kopieren',\n it: 'Copiare il codice',\n ja: 'コードをコピー',\n ko: '코드 복사',\n zh: '复制代码',\n hi: 'कोड कॉपी करें',\n 'en-GB': 'Copy code',\n ru: 'Копировать код',\n ar: 'نسخ الكود',\n }),\n description: t({\n en: 'Copy the code to the clipboard',\n es: 'Copiar el código al portapapeles',\n pt: 'Copiar o código para a área de transferência',\n fr: 'Copier le code dans le presse-papiers',\n de: 'Kopieren Sie den Code in die Zwischenablage',\n it: 'Copiare il codice nella clipboard',\n ja: 'コードをクリップボードにコピー',\n ko: '코드를 클립보드에 복사',\n zh: '复制代码到剪贴板',\n hi: 'कोड को क्लिपबोर्ड पर कॉपी करें',\n 'en-GB': 'Copy the code to the clipboard',\n ru: 'Копировать код в буфер обмена',\n ar: 'نسخ الكود إلى الحافظة',\n }),\n },\n} satisfies Dictionary;\n\nexport default copyContentContent;\n"],"names":["t"],"mappings":";;AAEA,MAAM,qBAAqB;AAAA,EACzB,KAAK;AAAA,EACL,SAAS;AAAA,IACP,OAAOA,SAAAA,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,aAAaA,SAAAA,EAAE;AAAA,MACb,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,EAAA;AAEL;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copyCode.content.mjs","sources":["../../../src/components/IDE/copyCode.content.ts"],"sourcesContent":["import { t, type Dictionary } from 'intlayer';\n\nconst copyContentContent = {\n key: 'code',\n content: {\n title: t({\n en: 'Copy code',\n es: 'Copiar código',\n pt: 'Copiar código',\n fr: 'Copier le code',\n de: 'Code kopieren',\n it: 'Copiare il codice',\n ja: 'コードをコピー',\n ko: '코드 복사',\n zh: '复制代码',\n hi: 'कोड कॉपी करें',\n 'en-GB': 'Copy code',\n ru: 'Копировать код',\n ar: 'نسخ الكود',\n }),\n description: t({\n en: 'Copy the code to the clipboard',\n es: 'Copiar el código al portapapeles',\n pt: 'Copiar o código para a área de transferência',\n fr: 'Copier le code dans le presse-papiers',\n de: 'Kopieren Sie den Code in die Zwischenablage',\n it: 'Copiare il codice nella clipboard',\n ja: 'コードをクリップボードにコピー',\n ko: '코드를 클립보드에 복사',\n zh: '复制代码到剪贴板',\n hi: 'कोड को क्लिपबोर्ड पर कॉपी करें',\n 'en-GB': 'Copy the code to the clipboard',\n ru: 'Копировать код в буфер обмена',\n ar: 'نسخ الكود إلى الحافظة',\n }),\n },\n} satisfies Dictionary;\n\nexport default copyContentContent;\n"],"names":[],"mappings":";AAEA,MAAM,qBAAqB;AAAA,EACzB,KAAK;AAAA,EACL,SAAS;AAAA,IACP,OAAO,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,aAAa,EAAE;AAAA,MACb,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,
|
|
1
|
+
{"version":3,"file":"copyCode.content.mjs","sources":["../../../src/components/IDE/copyCode.content.ts"],"sourcesContent":["import { t, type Dictionary } from 'intlayer';\n\nconst copyContentContent = {\n key: 'code',\n content: {\n title: t({\n en: 'Copy code',\n es: 'Copiar código',\n pt: 'Copiar código',\n fr: 'Copier le code',\n de: 'Code kopieren',\n it: 'Copiare il codice',\n ja: 'コードをコピー',\n ko: '코드 복사',\n zh: '复制代码',\n hi: 'कोड कॉपी करें',\n 'en-GB': 'Copy code',\n ru: 'Копировать код',\n ar: 'نسخ الكود',\n }),\n description: t({\n en: 'Copy the code to the clipboard',\n es: 'Copiar el código al portapapeles',\n pt: 'Copiar o código para a área de transferência',\n fr: 'Copier le code dans le presse-papiers',\n de: 'Kopieren Sie den Code in die Zwischenablage',\n it: 'Copiare il codice nella clipboard',\n ja: 'コードをクリップボードにコピー',\n ko: '코드를 클립보드에 복사',\n zh: '复制代码到剪贴板',\n hi: 'कोड को क्लिपबोर्ड पर कॉपी करें',\n 'en-GB': 'Copy the code to the clipboard',\n ru: 'Копировать код в буфер обмена',\n ar: 'نسخ الكود إلى الحافظة',\n }),\n },\n} satisfies Dictionary;\n\nexport default copyContentContent;\n"],"names":[],"mappings":";AAEA,MAAM,qBAAqB;AAAA,EACzB,KAAK;AAAA,EACL,SAAS;AAAA,IACP,OAAO,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,aAAa,EAAE;AAAA,MACb,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,EAAA;AAEL;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createFileTree.cjs","sources":["../../../src/components/IDE/createFileTree.ts"],"sourcesContent":["export type FilePath = {\n path: string;\n subPath?: FilePath[];\n isFile: boolean;\n};\n\nexport const createFileTree = (paths: string[]): FilePath[] => {\n const root: FilePath = { path: '', subPath: [], isFile: false };\n\n paths.forEach((path) => {\n const parts = path.split('/').filter((part) => part !== ''); // Remove empty strings due to leading slash\n let current = root;\n\n for (let i = 0; i < parts.length; i++) {\n const part = parts[i];\n const isFile = i === parts.length - 1; // Last part of the path is a file\n\n if (!current.subPath) {\n current.subPath = [];\n }\n\n let next = current.subPath.find((sub) => sub.path === part);\n\n if (!next) {\n next = { path: part, isFile, subPath: isFile ? undefined : [] };\n current.subPath.push(next);\n }\n\n current = next;\n }\n });\n\n return root.subPath ?? [];\n};\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"createFileTree.cjs","sources":["../../../src/components/IDE/createFileTree.ts"],"sourcesContent":["export type FilePath = {\n path: string;\n subPath?: FilePath[];\n isFile: boolean;\n};\n\nexport const createFileTree = (paths: string[]): FilePath[] => {\n const root: FilePath = { path: '', subPath: [], isFile: false };\n\n paths.forEach((path) => {\n const parts = path.split('/').filter((part) => part !== ''); // Remove empty strings due to leading slash\n let current = root;\n\n for (let i = 0; i < parts.length; i++) {\n const part = parts[i];\n const isFile = i === parts.length - 1; // Last part of the path is a file\n\n if (!current.subPath) {\n current.subPath = [];\n }\n\n let next = current.subPath.find((sub) => sub.path === part);\n\n if (!next) {\n next = { path: part, isFile, subPath: isFile ? undefined : [] };\n current.subPath.push(next);\n }\n\n current = next;\n }\n });\n\n return root.subPath ?? [];\n};\n"],"names":[],"mappings":";;AAMO,MAAM,iBAAiB,CAAC,UAAgC;AAC7D,QAAM,OAAiB,EAAY,SAAS,GAAkB;AAE9D,QAAM,QAAQ,CAAC,SAAS;AACtB,UAAM,QAAQ,KAAK,MAAM,GAAG,EAAE,OAAO,CAAC,SAAS,SAAS,EAAE;AAC1D,QAAI,UAAU;AAEd,aAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACrC,YAAM,OAAO,MAAM,CAAC;AACpB,YAAM,SAAS,MAAM,MAAM,SAAS;AAEpC,UAAI,CAAC,QAAQ,SAAS;AACpB,gBAAQ,UAAU,CAAA;AAAA,MACpB;AAEA,UAAI,OAAO,QAAQ,QAAQ,KAAK,CAAC,QAAQ,IAAI,SAAS,IAAI;AAE1D,UAAI,CAAC,MAAM;AACT,eAAO,EAAE,MAAM,MAAM,QAAQ,SAAS,SAAS,SAAY,GAAC;AAC5D,gBAAQ,QAAQ,KAAK,IAAI;AAAA,MAC3B;AAEA,gBAAU;AAAA,IACZ;AAAA,EACF,CAAC;AAED,SAAO,KAAK,WAAW,CAAA;AACzB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createFileTree.mjs","sources":["../../../src/components/IDE/createFileTree.ts"],"sourcesContent":["export type FilePath = {\n path: string;\n subPath?: FilePath[];\n isFile: boolean;\n};\n\nexport const createFileTree = (paths: string[]): FilePath[] => {\n const root: FilePath = { path: '', subPath: [], isFile: false };\n\n paths.forEach((path) => {\n const parts = path.split('/').filter((part) => part !== ''); // Remove empty strings due to leading slash\n let current = root;\n\n for (let i = 0; i < parts.length; i++) {\n const part = parts[i];\n const isFile = i === parts.length - 1; // Last part of the path is a file\n\n if (!current.subPath) {\n current.subPath = [];\n }\n\n let next = current.subPath.find((sub) => sub.path === part);\n\n if (!next) {\n next = { path: part, isFile, subPath: isFile ? undefined : [] };\n current.subPath.push(next);\n }\n\n current = next;\n }\n });\n\n return root.subPath ?? [];\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createFileTree.mjs","sources":["../../../src/components/IDE/createFileTree.ts"],"sourcesContent":["export type FilePath = {\n path: string;\n subPath?: FilePath[];\n isFile: boolean;\n};\n\nexport const createFileTree = (paths: string[]): FilePath[] => {\n const root: FilePath = { path: '', subPath: [], isFile: false };\n\n paths.forEach((path) => {\n const parts = path.split('/').filter((part) => part !== ''); // Remove empty strings due to leading slash\n let current = root;\n\n for (let i = 0; i < parts.length; i++) {\n const part = parts[i];\n const isFile = i === parts.length - 1; // Last part of the path is a file\n\n if (!current.subPath) {\n current.subPath = [];\n }\n\n let next = current.subPath.find((sub) => sub.path === part);\n\n if (!next) {\n next = { path: part, isFile, subPath: isFile ? undefined : [] };\n current.subPath.push(next);\n }\n\n current = next;\n }\n });\n\n return root.subPath ?? [];\n};\n"],"names":[],"mappings":"AAMO,MAAM,iBAAiB,CAAC,UAAgC;AAC7D,QAAM,OAAiB,EAAY,SAAS,GAAkB;AAE9D,QAAM,QAAQ,CAAC,SAAS;AACtB,UAAM,QAAQ,KAAK,MAAM,GAAG,EAAE,OAAO,CAAC,SAAS,SAAS,EAAE;AAC1D,QAAI,UAAU;AAEd,aAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACrC,YAAM,OAAO,MAAM,CAAC;AACpB,YAAM,SAAS,MAAM,MAAM,SAAS;AAEpC,UAAI,CAAC,QAAQ,SAAS;AACpB,gBAAQ,UAAU,CAAA;AAAA,MACpB;AAEA,UAAI,OAAO,QAAQ,QAAQ,KAAK,CAAC,QAAQ,IAAI,SAAS,IAAI;AAE1D,UAAI,CAAC,MAAM;AACT,eAAO,EAAE,MAAM,MAAM,QAAQ,SAAS,SAAS,SAAY,GAAC;AAC5D,gBAAQ,QAAQ,KAAK,IAAI;AAAA,MAC3B;AAEA,gBAAU;AAAA,IACZ;AAAA,EACF,CAAC;AAED,SAAO,KAAK,WAAW,CAAA;AACzB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/InformationTag/index.tsx"],"sourcesContent":["import type { DetailedHTMLProps, FC } from 'react';\nimport { cn } from '../../utils/cn';\n\ntype CopiedTextInformationProps = DetailedHTMLProps<\n React.HTMLAttributes<HTMLElement>,\n HTMLElement\n>;\n\nexport const InformationTag: FC<CopiedTextInformationProps> = ({\n className,\n children,\n ...props\n}) => (\n <i className={cn('text-xs text-neutral-400', className)} {...props}>\n ⓘ {children}\n </i>\n);\n"],"names":["jsxs","cn"],"mappings":";;;;AAQO,MAAM,iBAAiD,CAAC;AAAA,EAC7D;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEA,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/InformationTag/index.tsx"],"sourcesContent":["import type { DetailedHTMLProps, FC } from 'react';\nimport { cn } from '../../utils/cn';\n\ntype CopiedTextInformationProps = DetailedHTMLProps<\n React.HTMLAttributes<HTMLElement>,\n HTMLElement\n>;\n\nexport const InformationTag: FC<CopiedTextInformationProps> = ({\n className,\n children,\n ...props\n}) => (\n <i className={cn('text-xs text-neutral-400', className)} {...props}>\n ⓘ {children}\n </i>\n);\n"],"names":["jsxs","cn"],"mappings":";;;;AAQO,MAAM,iBAAiD,CAAC;AAAA,EAC7D;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEA,2BAAAA,KAAC,OAAE,WAAWC,SAAAA,GAAG,4BAA4B,SAAS,GAAI,GAAG,OAAO,UAAA;AAAA,EAAA;AAAA,EAC/D;AAAA,EAAA,CACL;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../src/components/InformationTag/index.tsx"],"sourcesContent":["import type { DetailedHTMLProps, FC } from 'react';\nimport { cn } from '../../utils/cn';\n\ntype CopiedTextInformationProps = DetailedHTMLProps<\n React.HTMLAttributes<HTMLElement>,\n HTMLElement\n>;\n\nexport const InformationTag: FC<CopiedTextInformationProps> = ({\n className,\n children,\n ...props\n}) => (\n <i className={cn('text-xs text-neutral-400', className)} {...props}>\n ⓘ {children}\n </i>\n);\n"],"names":[],"mappings":";;AAQO,MAAM,iBAAiD,CAAC;AAAA,EAC7D;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE,qBAAC,OAAE,WAAW,GAAG,4BAA4B,SAAS,GAAI,GAAG,OAAO,UAAA;AAAA,EAAA;AAAA,EAC/D;AAAA,
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../src/components/InformationTag/index.tsx"],"sourcesContent":["import type { DetailedHTMLProps, FC } from 'react';\nimport { cn } from '../../utils/cn';\n\ntype CopiedTextInformationProps = DetailedHTMLProps<\n React.HTMLAttributes<HTMLElement>,\n HTMLElement\n>;\n\nexport const InformationTag: FC<CopiedTextInformationProps> = ({\n className,\n children,\n ...props\n}) => (\n <i className={cn('text-xs text-neutral-400', className)} {...props}>\n ⓘ {children}\n </i>\n);\n"],"names":[],"mappings":";;AAQO,MAAM,iBAAiD,CAAC;AAAA,EAC7D;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE,qBAAC,OAAE,WAAW,GAAG,4BAA4B,SAAS,GAAI,GAAG,OAAO,UAAA;AAAA,EAAA;AAAA,EAC/D;AAAA,EAAA,CACL;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.cjs","sources":["../../../src/components/Input/Checkbox.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport {\n ReactNode,\n type DetailedHTMLProps,\n type FC,\n type InputHTMLAttributes,\n} from 'react';\n\nexport const checkboxVariants = cva('', {\n variants: {\n variant: {\n default: [\n 'pointer rounded border-2 bg-input-background text-input-text shadow-none outline-0 transition-all',\n 'border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]',\n 'checked:bg-checkbox-checked checked:border-checkbox-checked-border',\n 'disabled:opacity-50',\n ],\n },\n size: {\n sm: 'size-4',\n md: 'size-5',\n lg: 'size-6',\n },\n color: {\n primary: 'accent-primary',\n secondary: 'accent-secondary',\n destructive: 'accent-destructive',\n neutral: 'accent-neutral',\n light: 'accent-light',\n text: 'accent-text',\n dark: 'accent-dark',\n error: 'accent-error',\n success: 'accent-success',\n custom: 'accent-custom',\n },\n validationStyleEnabled: {\n disabled: '',\n enabled: 'valid:border-success invalid:border-error',\n },\n },\n defaultVariants: {\n variant: 'default',\n color: 'primary',\n validationStyleEnabled: 'disabled',\n size: 'md',\n },\n});\n\nexport type CheckboxProps = Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n 'size'\n> & {\n name: string;\n validationStyleEnabled?: boolean;\n label?: ReactNode;\n} & Omit<VariantProps<typeof checkboxVariants>, 'validationStyleEnabled'>;\n\nconst Input: FC<CheckboxProps> = ({\n validationStyleEnabled = false,\n label,\n size,\n color,\n name,\n variant,\n className,\n ...props\n}) => (\n <input\n type=\"checkbox\"\n className={checkboxVariants({\n variant,\n size,\n color,\n validationStyleEnabled: validationStyleEnabled ? 'enabled' : 'disabled',\n className,\n })}\n {...props}\n />\n);\n\nexport const Checkbox: FC<CheckboxProps> = (props) => {\n const { label, name, id } = props;\n\n return label ? (\n <label\n htmlFor={id ?? name}\n className=\"flex items-center gap-x-4 font-medium text-sm cursor-pointer\"\n >\n <Input id={id ?? name} {...props} />\n {label}\n </label>\n ) : (\n <Input id={id ?? name} {...props} />\n );\n};\n"],"names":["cva","jsx","jsxs"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"Checkbox.cjs","sources":["../../../src/components/Input/Checkbox.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport {\n ReactNode,\n type DetailedHTMLProps,\n type FC,\n type InputHTMLAttributes,\n} from 'react';\n\nexport const checkboxVariants = cva('', {\n variants: {\n variant: {\n default: [\n 'pointer rounded border-2 bg-input-background text-input-text shadow-none outline-0 transition-all',\n 'border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]',\n 'checked:bg-checkbox-checked checked:border-checkbox-checked-border',\n 'disabled:opacity-50',\n ],\n },\n size: {\n sm: 'size-4',\n md: 'size-5',\n lg: 'size-6',\n },\n color: {\n primary: 'accent-primary',\n secondary: 'accent-secondary',\n destructive: 'accent-destructive',\n neutral: 'accent-neutral',\n light: 'accent-light',\n text: 'accent-text',\n dark: 'accent-dark',\n error: 'accent-error',\n success: 'accent-success',\n custom: 'accent-custom',\n },\n validationStyleEnabled: {\n disabled: '',\n enabled: 'valid:border-success invalid:border-error',\n },\n },\n defaultVariants: {\n variant: 'default',\n color: 'primary',\n validationStyleEnabled: 'disabled',\n size: 'md',\n },\n});\n\nexport type CheckboxProps = Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n 'size'\n> & {\n name: string;\n validationStyleEnabled?: boolean;\n label?: ReactNode;\n} & Omit<VariantProps<typeof checkboxVariants>, 'validationStyleEnabled'>;\n\nconst Input: FC<CheckboxProps> = ({\n validationStyleEnabled = false,\n label,\n size,\n color,\n name,\n variant,\n className,\n ...props\n}) => (\n <input\n type=\"checkbox\"\n className={checkboxVariants({\n variant,\n size,\n color,\n validationStyleEnabled: validationStyleEnabled ? 'enabled' : 'disabled',\n className,\n })}\n {...props}\n />\n);\n\nexport const Checkbox: FC<CheckboxProps> = (props) => {\n const { label, name, id } = props;\n\n return label ? (\n <label\n htmlFor={id ?? name}\n className=\"flex items-center gap-x-4 font-medium text-sm cursor-pointer\"\n >\n <Input id={id ?? name} {...props} />\n {label}\n </label>\n ) : (\n <Input id={id ?? name} {...props} />\n );\n};\n"],"names":["cva","jsx","jsxs"],"mappings":";;;;AAQO,MAAM,mBAAmBA,uBAAAA,IAAI,IAAI;AAAA,EACtC,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,QACP;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,IACF;AAAA,IAEF,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA;AAAA,IAEN,OAAO;AAAA,MACL,SAAS;AAAA,MACT,WAAW;AAAA,MACX,aAAa;AAAA,MACb,SAAS;AAAA,MACT,OAAO;AAAA,MACP,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,MACP,SAAS;AAAA,MACT,QAAQ;AAAA,IAAA;AAAA,IAEV,wBAAwB;AAAA,MACtB,UAAU;AAAA,MACV,SAAS;AAAA,IAAA;AAAA,EACX;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,IACT,OAAO;AAAA,IACP,wBAAwB;AAAA,IACxB,MAAM;AAAA,EAAA;AAEV,CAAC;AAWD,MAAM,QAA2B,CAAC;AAAA,EAChC,yBAAyB;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEC,2BAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,MAAK;AAAA,IACL,WAAW,iBAAiB;AAAA,MAC1B;AAAA,MACA;AAAA,MACA;AAAA,MACA,wBAAwB,yBAAyB,YAAY;AAAA,MAC7D;AAAA,IAAA,CACD;AAAA,IACA,GAAG;AAAA,EAAA;AACN;AAGK,MAAM,WAA8B,CAAC,UAAU;AACpD,QAAM,EAAE,OAAO,MAAM,GAAA,IAAO;AAE5B,SAAO,QACLC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,SAAS,MAAM;AAAA,MACf,WAAU;AAAA,MAEV,UAAA;AAAA,QAAAD,2BAAAA,IAAC,OAAA,EAAM,IAAI,MAAM,MAAO,GAAG,OAAO;AAAA,QACjC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,IAGHA,2BAAAA,IAAC,OAAA,EAAM,IAAI,MAAM,MAAO,GAAG,OAAO;AAEtC;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.mjs","sources":["../../../src/components/Input/Checkbox.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport {\n ReactNode,\n type DetailedHTMLProps,\n type FC,\n type InputHTMLAttributes,\n} from 'react';\n\nexport const checkboxVariants = cva('', {\n variants: {\n variant: {\n default: [\n 'pointer rounded border-2 bg-input-background text-input-text shadow-none outline-0 transition-all',\n 'border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]',\n 'checked:bg-checkbox-checked checked:border-checkbox-checked-border',\n 'disabled:opacity-50',\n ],\n },\n size: {\n sm: 'size-4',\n md: 'size-5',\n lg: 'size-6',\n },\n color: {\n primary: 'accent-primary',\n secondary: 'accent-secondary',\n destructive: 'accent-destructive',\n neutral: 'accent-neutral',\n light: 'accent-light',\n text: 'accent-text',\n dark: 'accent-dark',\n error: 'accent-error',\n success: 'accent-success',\n custom: 'accent-custom',\n },\n validationStyleEnabled: {\n disabled: '',\n enabled: 'valid:border-success invalid:border-error',\n },\n },\n defaultVariants: {\n variant: 'default',\n color: 'primary',\n validationStyleEnabled: 'disabled',\n size: 'md',\n },\n});\n\nexport type CheckboxProps = Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n 'size'\n> & {\n name: string;\n validationStyleEnabled?: boolean;\n label?: ReactNode;\n} & Omit<VariantProps<typeof checkboxVariants>, 'validationStyleEnabled'>;\n\nconst Input: FC<CheckboxProps> = ({\n validationStyleEnabled = false,\n label,\n size,\n color,\n name,\n variant,\n className,\n ...props\n}) => (\n <input\n type=\"checkbox\"\n className={checkboxVariants({\n variant,\n size,\n color,\n validationStyleEnabled: validationStyleEnabled ? 'enabled' : 'disabled',\n className,\n })}\n {...props}\n />\n);\n\nexport const Checkbox: FC<CheckboxProps> = (props) => {\n const { label, name, id } = props;\n\n return label ? (\n <label\n htmlFor={id ?? name}\n className=\"flex items-center gap-x-4 font-medium text-sm cursor-pointer\"\n >\n <Input id={id ?? name} {...props} />\n {label}\n </label>\n ) : (\n <Input id={id ?? name} {...props} />\n );\n};\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"Checkbox.mjs","sources":["../../../src/components/Input/Checkbox.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport {\n ReactNode,\n type DetailedHTMLProps,\n type FC,\n type InputHTMLAttributes,\n} from 'react';\n\nexport const checkboxVariants = cva('', {\n variants: {\n variant: {\n default: [\n 'pointer rounded border-2 bg-input-background text-input-text shadow-none outline-0 transition-all',\n 'border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]',\n 'checked:bg-checkbox-checked checked:border-checkbox-checked-border',\n 'disabled:opacity-50',\n ],\n },\n size: {\n sm: 'size-4',\n md: 'size-5',\n lg: 'size-6',\n },\n color: {\n primary: 'accent-primary',\n secondary: 'accent-secondary',\n destructive: 'accent-destructive',\n neutral: 'accent-neutral',\n light: 'accent-light',\n text: 'accent-text',\n dark: 'accent-dark',\n error: 'accent-error',\n success: 'accent-success',\n custom: 'accent-custom',\n },\n validationStyleEnabled: {\n disabled: '',\n enabled: 'valid:border-success invalid:border-error',\n },\n },\n defaultVariants: {\n variant: 'default',\n color: 'primary',\n validationStyleEnabled: 'disabled',\n size: 'md',\n },\n});\n\nexport type CheckboxProps = Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n 'size'\n> & {\n name: string;\n validationStyleEnabled?: boolean;\n label?: ReactNode;\n} & Omit<VariantProps<typeof checkboxVariants>, 'validationStyleEnabled'>;\n\nconst Input: FC<CheckboxProps> = ({\n validationStyleEnabled = false,\n label,\n size,\n color,\n name,\n variant,\n className,\n ...props\n}) => (\n <input\n type=\"checkbox\"\n className={checkboxVariants({\n variant,\n size,\n color,\n validationStyleEnabled: validationStyleEnabled ? 'enabled' : 'disabled',\n className,\n })}\n {...props}\n />\n);\n\nexport const Checkbox: FC<CheckboxProps> = (props) => {\n const { label, name, id } = props;\n\n return label ? (\n <label\n htmlFor={id ?? name}\n className=\"flex items-center gap-x-4 font-medium text-sm cursor-pointer\"\n >\n <Input id={id ?? name} {...props} />\n {label}\n </label>\n ) : (\n <Input id={id ?? name} {...props} />\n );\n};\n"],"names":[],"mappings":";;AAQO,MAAM,mBAAmB,IAAI,IAAI;AAAA,EACtC,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,QACP;AAAA,QACA;AAAA,QACA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{"version":3,"file":"Input.cjs","sources":["../../../src/components/Input/Input.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport {\n type FC,\n type DetailedHTMLProps,\n type InputHTMLAttributes,\n} from 'react';\n\nexport const inputVariants = cva('', {\n variants: {\n variant: {\n default: [\n 'w-full select-text resize-none rounded-xl border-2 bg-input-background text-base md:text-sm text-input-text shadow-none outline-0 transition-all',\n 'border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]',\n 'aria-[invalid=true]:border-error',\n 'disabled:opacity-50',\n ],\n invisible: [\n 'w-full border-none bg-inherit text-inherit outline-hidden ring-0',\n ],\n },\n size: {\n md: 'px-2 md:py-1 py-3',\n lg: 'p-4 md:py-2',\n },\n validationStyleEnabled: {\n disabled: '',\n enabled: 'valid:border-success invalid:border-error',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n validationStyleEnabled: 'disabled',\n },\n});\n\nexport type InputProps = DetailedHTMLProps<\n InputHTMLAttributes<HTMLInputElement>,\n HTMLInputElement\n> & {\n validationStyleEnabled?: boolean;\n} & Omit<VariantProps<typeof inputVariants>, 'validationStyleEnabled'>;\n\nexport const Input: FC<InputProps> = ({\n validationStyleEnabled = false,\n variant,\n size,\n className,\n ...props\n}) => (\n <input\n className={inputVariants({\n variant,\n size,\n validationStyleEnabled: validationStyleEnabled ? 'enabled' : 'disabled',\n className,\n })}\n {...props}\n />\n);\n"],"names":["cva","jsx"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"Input.cjs","sources":["../../../src/components/Input/Input.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport {\n type FC,\n type DetailedHTMLProps,\n type InputHTMLAttributes,\n} from 'react';\n\nexport const inputVariants = cva('', {\n variants: {\n variant: {\n default: [\n 'w-full select-text resize-none rounded-xl border-2 bg-input-background text-base md:text-sm text-input-text shadow-none outline-0 transition-all',\n 'border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]',\n 'aria-[invalid=true]:border-error',\n 'disabled:opacity-50',\n ],\n invisible: [\n 'w-full border-none bg-inherit text-inherit outline-hidden ring-0',\n ],\n },\n size: {\n md: 'px-2 md:py-1 py-3',\n lg: 'p-4 md:py-2',\n },\n validationStyleEnabled: {\n disabled: '',\n enabled: 'valid:border-success invalid:border-error',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n validationStyleEnabled: 'disabled',\n },\n});\n\nexport type InputProps = DetailedHTMLProps<\n InputHTMLAttributes<HTMLInputElement>,\n HTMLInputElement\n> & {\n validationStyleEnabled?: boolean;\n} & Omit<VariantProps<typeof inputVariants>, 'validationStyleEnabled'>;\n\nexport const Input: FC<InputProps> = ({\n validationStyleEnabled = false,\n variant,\n size,\n className,\n ...props\n}) => (\n <input\n className={inputVariants({\n variant,\n size,\n validationStyleEnabled: validationStyleEnabled ? 'enabled' : 'disabled',\n className,\n })}\n {...props}\n />\n);\n"],"names":["cva","jsx"],"mappings":";;;;AAOO,MAAM,gBAAgBA,uBAAAA,IAAI,IAAI;AAAA,EACnC,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,QACP;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,MAEF,WAAW;AAAA,QACT;AAAA,MAAA;AAAA,IACF;AAAA,IAEF,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA;AAAA,IAEN,wBAAwB;AAAA,MACtB,UAAU;AAAA,MACV,SAAS;AAAA,IAAA;AAAA,EACX;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,IACT,MAAM;AAAA,IACN,wBAAwB;AAAA,EAAA;AAE5B,CAAC;AASM,MAAM,QAAwB,CAAC;AAAA,EACpC,yBAAyB;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEC,2BAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAW,cAAc;AAAA,MACvB;AAAA,MACA;AAAA,MACA,wBAAwB,yBAAyB,YAAY;AAAA,MAC7D;AAAA,IAAA,CACD;AAAA,IACA,GAAG;AAAA,EAAA;AACN;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.mjs","sources":["../../../src/components/Input/Input.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport {\n type FC,\n type DetailedHTMLProps,\n type InputHTMLAttributes,\n} from 'react';\n\nexport const inputVariants = cva('', {\n variants: {\n variant: {\n default: [\n 'w-full select-text resize-none rounded-xl border-2 bg-input-background text-base md:text-sm text-input-text shadow-none outline-0 transition-all',\n 'border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]',\n 'aria-[invalid=true]:border-error',\n 'disabled:opacity-50',\n ],\n invisible: [\n 'w-full border-none bg-inherit text-inherit outline-hidden ring-0',\n ],\n },\n size: {\n md: 'px-2 md:py-1 py-3',\n lg: 'p-4 md:py-2',\n },\n validationStyleEnabled: {\n disabled: '',\n enabled: 'valid:border-success invalid:border-error',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n validationStyleEnabled: 'disabled',\n },\n});\n\nexport type InputProps = DetailedHTMLProps<\n InputHTMLAttributes<HTMLInputElement>,\n HTMLInputElement\n> & {\n validationStyleEnabled?: boolean;\n} & Omit<VariantProps<typeof inputVariants>, 'validationStyleEnabled'>;\n\nexport const Input: FC<InputProps> = ({\n validationStyleEnabled = false,\n variant,\n size,\n className,\n ...props\n}) => (\n <input\n className={inputVariants({\n variant,\n size,\n validationStyleEnabled: validationStyleEnabled ? 'enabled' : 'disabled',\n className,\n })}\n {...props}\n />\n);\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"Input.mjs","sources":["../../../src/components/Input/Input.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport {\n type FC,\n type DetailedHTMLProps,\n type InputHTMLAttributes,\n} from 'react';\n\nexport const inputVariants = cva('', {\n variants: {\n variant: {\n default: [\n 'w-full select-text resize-none rounded-xl border-2 bg-input-background text-base md:text-sm text-input-text shadow-none outline-0 transition-all',\n 'border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]',\n 'aria-[invalid=true]:border-error',\n 'disabled:opacity-50',\n ],\n invisible: [\n 'w-full border-none bg-inherit text-inherit outline-hidden ring-0',\n ],\n },\n size: {\n md: 'px-2 md:py-1 py-3',\n lg: 'p-4 md:py-2',\n },\n validationStyleEnabled: {\n disabled: '',\n enabled: 'valid:border-success invalid:border-error',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n validationStyleEnabled: 'disabled',\n },\n});\n\nexport type InputProps = DetailedHTMLProps<\n InputHTMLAttributes<HTMLInputElement>,\n HTMLInputElement\n> & {\n validationStyleEnabled?: boolean;\n} & Omit<VariantProps<typeof inputVariants>, 'validationStyleEnabled'>;\n\nexport const Input: FC<InputProps> = ({\n validationStyleEnabled = false,\n variant,\n size,\n className,\n ...props\n}) => (\n <input\n className={inputVariants({\n variant,\n size,\n validationStyleEnabled: validationStyleEnabled ? 'enabled' : 'disabled',\n className,\n })}\n {...props}\n />\n);\n"],"names":[],"mappings":";;AAOO,MAAM,gBAAgB,IAAI,IAAI;AAAA,EACnC,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,QACP;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,MAEF,WAAW;AAAA,QACT;AAAA,MAAA;AAAA,IACF;AAAA,IAEF,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA;AAAA,IAEN,wBAAwB;AAAA,MACtB,UAAU;AAAA,MACV,SAAS;AAAA,IAAA;AAAA,EACX;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,IACT,MAAM;AAAA,IACN,wBAAwB;AAAA,EAAA;AAE5B,CAAC;AASM,MAAM,QAAwB,CAAC;AAAA,EACpC,yBAAyB;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAW,cAAc;AAAA,MACvB;AAAA,MACA;AAAA,MACA,wBAAwB,yBAAyB,YAAY;AAAA,MAC7D;AAAA,IAAA,CACD;AAAA,IACA,GAAG;AAAA,EAAA;AACN;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputPassword.cjs","sources":["../../../src/components/Input/InputPassword.tsx"],"sourcesContent":["'use client';\n\nimport { EyeIcon, EyeOffIcon } from 'lucide-react';\nimport { type FC, useState, type MouseEventHandler } from 'react';\nimport { Input, type InputProps } from './Input';\n\ntype InputPasswordProps = Omit<InputProps, 'type'>;\n\nexport const InputPassword: FC<InputPasswordProps> = (props) => {\n const [isPasswordRevealed, setIsPasswordRevealed] = useState(false);\n\n const handlePasswordReveal: MouseEventHandler<HTMLButtonElement> = (e) => {\n e.preventDefault();\n e.stopPropagation();\n setIsPasswordRevealed((isPasswordRevealed) => !isPasswordRevealed);\n };\n\n const EyeIconComponent = isPasswordRevealed ? EyeIcon : EyeOffIcon;\n\n return (\n <div className=\"relative\">\n <Input\n {...props}\n aria-label=\"password\"\n type={isPasswordRevealed ? 'text' : 'password'}\n />\n\n <button\n data-testid=\"eye-icon\"\n className=\"absolute right-2 h-full flex-row items-center\"\n onClick={handlePasswordReveal}\n aria-label={isPasswordRevealed ? 'Hide password' : 'Show password'}\n >\n <EyeIconComponent\n className=\"text-neutral mr-2 inline-block\"\n size={20}\n />\n </button>\n </div>\n );\n};\n"],"names":["useState","isPasswordRevealed","EyeIcon","EyeOffIcon","jsxs","jsx","Input"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"InputPassword.cjs","sources":["../../../src/components/Input/InputPassword.tsx"],"sourcesContent":["'use client';\n\nimport { EyeIcon, EyeOffIcon } from 'lucide-react';\nimport { type FC, useState, type MouseEventHandler } from 'react';\nimport { Input, type InputProps } from './Input';\n\ntype InputPasswordProps = Omit<InputProps, 'type'>;\n\nexport const InputPassword: FC<InputPasswordProps> = (props) => {\n const [isPasswordRevealed, setIsPasswordRevealed] = useState(false);\n\n const handlePasswordReveal: MouseEventHandler<HTMLButtonElement> = (e) => {\n e.preventDefault();\n e.stopPropagation();\n setIsPasswordRevealed((isPasswordRevealed) => !isPasswordRevealed);\n };\n\n const EyeIconComponent = isPasswordRevealed ? EyeIcon : EyeOffIcon;\n\n return (\n <div className=\"relative\">\n <Input\n {...props}\n aria-label=\"password\"\n type={isPasswordRevealed ? 'text' : 'password'}\n />\n\n <button\n data-testid=\"eye-icon\"\n className=\"absolute right-2 h-full flex-row items-center\"\n onClick={handlePasswordReveal}\n aria-label={isPasswordRevealed ? 'Hide password' : 'Show password'}\n >\n <EyeIconComponent\n className=\"text-neutral mr-2 inline-block\"\n size={20}\n />\n </button>\n </div>\n );\n};\n"],"names":["useState","isPasswordRevealed","EyeIcon","EyeOffIcon","jsxs","jsx","Input"],"mappings":";;;;;;;AAQO,MAAM,gBAAwC,CAAC,UAAU;AAC9D,QAAM,CAAC,oBAAoB,qBAAqB,IAAIA,aAAAA,SAAS,KAAK;AAElE,QAAM,uBAA6D,CAAC,MAAM;AACxE,MAAE,eAAA;AACF,MAAE,gBAAA;AACF,0BAAsB,CAACC,wBAAuB,CAACA,mBAAkB;AAAA,EACnE;AAEA,QAAM,mBAAmB,qBAAqBC,YAAAA,UAAUC,YAAAA;AAExD,SACEC,2BAAAA,KAAC,OAAA,EAAI,WAAU,YACb,UAAA;AAAA,IAAAC,2BAAAA;AAAAA,MAACC,uBAAAA;AAAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,cAAW;AAAA,QACX,MAAM,qBAAqB,SAAS;AAAA,MAAA;AAAA,IAAA;AAAA,IAGtCD,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC,eAAY;AAAA,QACZ,WAAU;AAAA,QACV,SAAS;AAAA,QACT,cAAY,qBAAqB,kBAAkB;AAAA,QAEnD,UAAAA,2BAAAA;AAAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,MAAM;AAAA,UAAA;AAAA,QAAA;AAAA,MACR;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputPassword.mjs","sources":["../../../src/components/Input/InputPassword.tsx"],"sourcesContent":["'use client';\n\nimport { EyeIcon, EyeOffIcon } from 'lucide-react';\nimport { type FC, useState, type MouseEventHandler } from 'react';\nimport { Input, type InputProps } from './Input';\n\ntype InputPasswordProps = Omit<InputProps, 'type'>;\n\nexport const InputPassword: FC<InputPasswordProps> = (props) => {\n const [isPasswordRevealed, setIsPasswordRevealed] = useState(false);\n\n const handlePasswordReveal: MouseEventHandler<HTMLButtonElement> = (e) => {\n e.preventDefault();\n e.stopPropagation();\n setIsPasswordRevealed((isPasswordRevealed) => !isPasswordRevealed);\n };\n\n const EyeIconComponent = isPasswordRevealed ? EyeIcon : EyeOffIcon;\n\n return (\n <div className=\"relative\">\n <Input\n {...props}\n aria-label=\"password\"\n type={isPasswordRevealed ? 'text' : 'password'}\n />\n\n <button\n data-testid=\"eye-icon\"\n className=\"absolute right-2 h-full flex-row items-center\"\n onClick={handlePasswordReveal}\n aria-label={isPasswordRevealed ? 'Hide password' : 'Show password'}\n >\n <EyeIconComponent\n className=\"text-neutral mr-2 inline-block\"\n size={20}\n />\n </button>\n </div>\n );\n};\n"],"names":["isPasswordRevealed"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"InputPassword.mjs","sources":["../../../src/components/Input/InputPassword.tsx"],"sourcesContent":["'use client';\n\nimport { EyeIcon, EyeOffIcon } from 'lucide-react';\nimport { type FC, useState, type MouseEventHandler } from 'react';\nimport { Input, type InputProps } from './Input';\n\ntype InputPasswordProps = Omit<InputProps, 'type'>;\n\nexport const InputPassword: FC<InputPasswordProps> = (props) => {\n const [isPasswordRevealed, setIsPasswordRevealed] = useState(false);\n\n const handlePasswordReveal: MouseEventHandler<HTMLButtonElement> = (e) => {\n e.preventDefault();\n e.stopPropagation();\n setIsPasswordRevealed((isPasswordRevealed) => !isPasswordRevealed);\n };\n\n const EyeIconComponent = isPasswordRevealed ? EyeIcon : EyeOffIcon;\n\n return (\n <div className=\"relative\">\n <Input\n {...props}\n aria-label=\"password\"\n type={isPasswordRevealed ? 'text' : 'password'}\n />\n\n <button\n data-testid=\"eye-icon\"\n className=\"absolute right-2 h-full flex-row items-center\"\n onClick={handlePasswordReveal}\n aria-label={isPasswordRevealed ? 'Hide password' : 'Show password'}\n >\n <EyeIconComponent\n className=\"text-neutral mr-2 inline-block\"\n size={20}\n />\n </button>\n </div>\n );\n};\n"],"names":["isPasswordRevealed"],"mappings":";;;;;AAQO,MAAM,gBAAwC,CAAC,UAAU;AAC9D,QAAM,CAAC,oBAAoB,qBAAqB,IAAI,SAAS,KAAK;AAElE,QAAM,uBAA6D,CAAC,MAAM;AACxE,MAAE,eAAA;AACF,MAAE,gBAAA;AACF,0BAAsB,CAACA,wBAAuB,CAACA,mBAAkB;AAAA,EACnE;AAEA,QAAM,mBAAmB,qBAAqB,UAAU;AAExD,SACE,qBAAC,OAAA,EAAI,WAAU,YACb,UAAA;AAAA,IAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,cAAW;AAAA,QACX,MAAM,qBAAqB,SAAS;AAAA,MAAA;AAAA,IAAA;AAAA,IAGtC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,eAAY;AAAA,QACZ,WAAU;AAAA,QACV,SAAS;AAAA,QACT,cAAY,qBAAqB,kBAAkB;AAAA,QAEnD,UAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,MAAM;AAAA,UAAA;AAAA,QAAA;AAAA,MACR;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/KeyboardScreenAdapter/index.tsx"],"sourcesContent":["'use client';\n\nimport type { FC, HTMLAttributes, PropsWithChildren } from 'react';\nimport { useKeyboardDetector } from '../../hooks/useKeyboardDetector';\nimport { cn } from '../../utils/cn';\n\nexport const KeyboardScreenAdapter: FC<\n PropsWithChildren<HTMLAttributes<HTMLDivElement>>\n> = ({ children, className, ...props }) => {\n const { windowHeight } = useKeyboardDetector();\n\n return (\n <div\n className={cn(\n 'h-screen w-screen overflow-auto scroll-smooth transition',\n className\n )}\n style={{\n maxHeight: windowHeight ? `${windowHeight}px` : undefined,\n }}\n {...props}\n >\n {children}\n </div>\n );\n};\n"],"names":["useKeyboardDetector","jsx","cn"],"mappings":";;;;;;AAMO,MAAM,wBAET,CAAC,EAAE,UAAU,WAAW,GAAG,YAAY;
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/KeyboardScreenAdapter/index.tsx"],"sourcesContent":["'use client';\n\nimport type { FC, HTMLAttributes, PropsWithChildren } from 'react';\nimport { useKeyboardDetector } from '../../hooks/useKeyboardDetector';\nimport { cn } from '../../utils/cn';\n\nexport const KeyboardScreenAdapter: FC<\n PropsWithChildren<HTMLAttributes<HTMLDivElement>>\n> = ({ children, className, ...props }) => {\n const { windowHeight } = useKeyboardDetector();\n\n return (\n <div\n className={cn(\n 'h-screen w-screen overflow-auto scroll-smooth transition',\n className\n )}\n style={{\n maxHeight: windowHeight ? `${windowHeight}px` : undefined,\n }}\n {...props}\n >\n {children}\n </div>\n );\n};\n"],"names":["useKeyboardDetector","jsx","cn"],"mappings":";;;;;;AAMO,MAAM,wBAET,CAAC,EAAE,UAAU,WAAW,GAAG,YAAY;AACzC,QAAM,EAAE,aAAA,IAAiBA,8CAAA;AAEzB,SACEC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,SAAAA;AAAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAEF,OAAO;AAAA,QACL,WAAW,eAAe,GAAG,YAAY,OAAO;AAAA,MAAA;AAAA,MAEjD,GAAG;AAAA,MAEH;AAAA,IAAA;AAAA,EAAA;AAGP;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../src/components/KeyboardScreenAdapter/index.tsx"],"sourcesContent":["'use client';\n\nimport type { FC, HTMLAttributes, PropsWithChildren } from 'react';\nimport { useKeyboardDetector } from '../../hooks/useKeyboardDetector';\nimport { cn } from '../../utils/cn';\n\nexport const KeyboardScreenAdapter: FC<\n PropsWithChildren<HTMLAttributes<HTMLDivElement>>\n> = ({ children, className, ...props }) => {\n const { windowHeight } = useKeyboardDetector();\n\n return (\n <div\n className={cn(\n 'h-screen w-screen overflow-auto scroll-smooth transition',\n className\n )}\n style={{\n maxHeight: windowHeight ? `${windowHeight}px` : undefined,\n }}\n {...props}\n >\n {children}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;AAMO,MAAM,wBAET,CAAC,EAAE,UAAU,WAAW,GAAG,YAAY;
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../src/components/KeyboardScreenAdapter/index.tsx"],"sourcesContent":["'use client';\n\nimport type { FC, HTMLAttributes, PropsWithChildren } from 'react';\nimport { useKeyboardDetector } from '../../hooks/useKeyboardDetector';\nimport { cn } from '../../utils/cn';\n\nexport const KeyboardScreenAdapter: FC<\n PropsWithChildren<HTMLAttributes<HTMLDivElement>>\n> = ({ children, className, ...props }) => {\n const { windowHeight } = useKeyboardDetector();\n\n return (\n <div\n className={cn(\n 'h-screen w-screen overflow-auto scroll-smooth transition',\n className\n )}\n style={{\n maxHeight: windowHeight ? `${windowHeight}px` : undefined,\n }}\n {...props}\n >\n {children}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;AAMO,MAAM,wBAET,CAAC,EAAE,UAAU,WAAW,GAAG,YAAY;AACzC,QAAM,EAAE,aAAA,IAAiB,oBAAA;AAEzB,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAEF,OAAO;AAAA,QACL,WAAW,eAAe,GAAG,YAAY,OAAO;AAAA,MAAA;AAAA,MAEjD,GAAG;AAAA,MAEH;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/Label/index.tsx"],"sourcesContent":["import { type FC, type LabelHTMLAttributes } from 'react';\n\nexport const Label: FC<LabelHTMLAttributes<HTMLLabelElement>> = ({\n htmlFor,\n ...props\n}) => (\n <label\n className=\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n htmlFor={htmlFor}\n {...props}\n />\n);\n"],"names":["jsx"],"mappings":";;;AAEO,MAAM,QAAmD,CAAC;AAAA,EAC/D;AAAA,EACA,GAAG;AACL,MACEA,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/Label/index.tsx"],"sourcesContent":["import { type FC, type LabelHTMLAttributes } from 'react';\n\nexport const Label: FC<LabelHTMLAttributes<HTMLLabelElement>> = ({\n htmlFor,\n ...props\n}) => (\n <label\n className=\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n htmlFor={htmlFor}\n {...props}\n />\n);\n"],"names":["jsx"],"mappings":";;;AAEO,MAAM,QAAmD,CAAC;AAAA,EAC/D;AAAA,EACA,GAAG;AACL,MACEA,2BAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAU;AAAA,IACV;AAAA,IACC,GAAG;AAAA,EAAA;AACN;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.cjs","sources":["../../../src/components/Link/Link.tsx"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport type { LocalesValues } from '@intlayer/config/client';\nimport { getLocalizedUrl } from '@intlayer/core';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { ExternalLink } from 'lucide-react';\nimport {\n type AnchorHTMLAttributes,\n type DetailedHTMLProps,\n type FC,\n} from 'react';\nimport { cn } from '../../utils/cn';\n\nexport const linkVariants = cva(\n 'gap-3 transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n variant: {\n default:\n 'h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-4 hover:bg-current/0 hover:underline',\n 'invisible-link':\n 'h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-4 hover:bg-current/0',\n button:\n 'rounded-lg bg-current *:text-text-opposite min-h-8 px-6 max-md:py-2 text-sm flex items-center justify-center gap-2 whitespace-nowrap font-medium transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50',\n 'button-outlined':\n 'rounded-lg border-[1.5px] hover:bg-current/30 min-h-8 px-6 max-md:py-2 text-sm flex items-center justify-center gap-2 whitespace-nowrap font-medium transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50',\n hoverable:\n 'block rounded-lg border-none bg-current/0 transition hover:bg-current/20 aria-[current]:bg-current/5',\n },\n color: {\n primary: 'text-primary',\n secondary: 'text-secondary',\n destructive: 'text-destructive',\n neutral: 'text-neutral',\n light: 'text-white',\n dark: 'text-neutral-800',\n text: 'text-text',\n 'text-inverse': 'text-text-opposite',\n error: 'text-error',\n success: 'text-success',\n custom: '',\n },\n underlined: {\n default: '',\n true: 'underline',\n false: 'no-underline',\n },\n },\n\n defaultVariants: {\n variant: 'default',\n color: 'primary',\n underlined: 'default',\n },\n }\n);\n\nexport type LinkProps = DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n> &\n VariantProps<typeof linkVariants> & {\n label: string;\n isExternalLink?: boolean;\n isActive?: boolean;\n locale?: LocalesValues;\n };\n\nexport const checkIsExternalLink = ({\n href,\n isExternalLink: isExternalLinkProp,\n}: LinkProps): boolean => {\n const isValidHref = typeof href === 'string' && href.trim() !== '';\n const isExternalLink =\n isExternalLinkProp === true ||\n (typeof isExternalLinkProp === 'undefined' &&\n isValidHref &&\n /^https?:\\/\\//.test(href));\n\n return isExternalLink;\n};\n\nexport const Link: FC<LinkProps> = (props) => {\n const {\n variant = 'default',\n color = 'primary',\n children,\n label,\n className,\n isActive,\n underlined,\n locale,\n isExternalLink: isExternalLinkProp,\n href: hrefProp,\n ...otherProps\n } = props;\n const { internationalization } = configuration;\n\n const isExternalLink = checkIsExternalLink(props);\n const isChildrenString = typeof children === 'string';\n\n const rel = isExternalLink ? 'noopener noreferrer nofollow' : undefined;\n\n const target = isExternalLink ? '_blank' : '_self';\n\n const hrefLang = locale\n ? locale === internationalization.defaultLocale\n ? 'x-default'\n : locale\n : undefined;\n\n const href =\n locale && hrefProp && !isExternalLink\n ? getLocalizedUrl(hrefProp, locale)\n : hrefProp;\n\n return (\n <a\n href={href}\n hrefLang={hrefLang}\n aria-label={label}\n rel={rel}\n target={target}\n aria-current={isActive ? 'page' : undefined}\n className={cn(\n linkVariants({\n variant,\n color,\n underlined,\n className,\n })\n )}\n {...otherProps}\n >\n {variant === 'button' ? <span>{children}</span> : children}\n {isExternalLink && isChildrenString && (\n <ExternalLink className=\"ml-2 inline-block size-4\" />\n )}\n </a>\n );\n};\n"],"names":["cva","getLocalizedUrl","jsxs","cn","jsx","ExternalLink"],"mappings":";;;;;;;;AAYO,MAAM,eAAeA,
|
|
1
|
+
{"version":3,"file":"Link.cjs","sources":["../../../src/components/Link/Link.tsx"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport type { LocalesValues } from '@intlayer/config/client';\nimport { getLocalizedUrl } from '@intlayer/core';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { ExternalLink } from 'lucide-react';\nimport {\n type AnchorHTMLAttributes,\n type DetailedHTMLProps,\n type FC,\n} from 'react';\nimport { cn } from '../../utils/cn';\n\nexport const linkVariants = cva(\n 'gap-3 transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n variant: {\n default:\n 'h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-4 hover:bg-current/0 hover:underline',\n 'invisible-link':\n 'h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-4 hover:bg-current/0',\n button:\n 'rounded-lg bg-current *:text-text-opposite min-h-8 px-6 max-md:py-2 text-sm flex items-center justify-center gap-2 whitespace-nowrap font-medium transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50',\n 'button-outlined':\n 'rounded-lg border-[1.5px] hover:bg-current/30 min-h-8 px-6 max-md:py-2 text-sm flex items-center justify-center gap-2 whitespace-nowrap font-medium transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50',\n hoverable:\n 'block rounded-lg border-none bg-current/0 transition hover:bg-current/20 aria-[current]:bg-current/5',\n },\n color: {\n primary: 'text-primary',\n secondary: 'text-secondary',\n destructive: 'text-destructive',\n neutral: 'text-neutral',\n light: 'text-white',\n dark: 'text-neutral-800',\n text: 'text-text',\n 'text-inverse': 'text-text-opposite',\n error: 'text-error',\n success: 'text-success',\n custom: '',\n },\n underlined: {\n default: '',\n true: 'underline',\n false: 'no-underline',\n },\n },\n\n defaultVariants: {\n variant: 'default',\n color: 'primary',\n underlined: 'default',\n },\n }\n);\n\nexport type LinkProps = DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n> &\n VariantProps<typeof linkVariants> & {\n label: string;\n isExternalLink?: boolean;\n isActive?: boolean;\n locale?: LocalesValues;\n };\n\nexport const checkIsExternalLink = ({\n href,\n isExternalLink: isExternalLinkProp,\n}: LinkProps): boolean => {\n const isValidHref = typeof href === 'string' && href.trim() !== '';\n const isExternalLink =\n isExternalLinkProp === true ||\n (typeof isExternalLinkProp === 'undefined' &&\n isValidHref &&\n /^https?:\\/\\//.test(href));\n\n return isExternalLink;\n};\n\nexport const Link: FC<LinkProps> = (props) => {\n const {\n variant = 'default',\n color = 'primary',\n children,\n label,\n className,\n isActive,\n underlined,\n locale,\n isExternalLink: isExternalLinkProp,\n href: hrefProp,\n ...otherProps\n } = props;\n const { internationalization } = configuration;\n\n const isExternalLink = checkIsExternalLink(props);\n const isChildrenString = typeof children === 'string';\n\n const rel = isExternalLink ? 'noopener noreferrer nofollow' : undefined;\n\n const target = isExternalLink ? '_blank' : '_self';\n\n const hrefLang = locale\n ? locale === internationalization.defaultLocale\n ? 'x-default'\n : locale\n : undefined;\n\n const href =\n locale && hrefProp && !isExternalLink\n ? getLocalizedUrl(hrefProp, locale)\n : hrefProp;\n\n return (\n <a\n href={href}\n hrefLang={hrefLang}\n aria-label={label}\n rel={rel}\n target={target}\n aria-current={isActive ? 'page' : undefined}\n className={cn(\n linkVariants({\n variant,\n color,\n underlined,\n className,\n })\n )}\n {...otherProps}\n >\n {variant === 'button' ? <span>{children}</span> : children}\n {isExternalLink && isChildrenString && (\n <ExternalLink className=\"ml-2 inline-block size-4\" />\n )}\n </a>\n );\n};\n"],"names":["cva","getLocalizedUrl","jsxs","cn","jsx","ExternalLink"],"mappings":";;;;;;;;AAYO,MAAM,eAAeA,uBAAAA;AAAAA,EAC1B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SACE;AAAA,QACF,kBACE;AAAA,QACF,QACE;AAAA,QACF,mBACE;AAAA,QACF,WACE;AAAA,MAAA;AAAA,MAEJ,OAAO;AAAA,QACL,SAAS;AAAA,QACT,WAAW;AAAA,QACX,aAAa;AAAA,QACb,SAAS;AAAA,QACT,OAAO;AAAA,QACP,MAAM;AAAA,QACN,MAAM;AAAA,QACN,gBAAgB;AAAA,QAChB,OAAO;AAAA,QACP,SAAS;AAAA,QACT,QAAQ;AAAA,MAAA;AAAA,MAEV,YAAY;AAAA,QACV,SAAS;AAAA,QACT,MAAM;AAAA,QACN,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAGF,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,OAAO;AAAA,MACP,YAAY;AAAA,IAAA;AAAA,EACd;AAEJ;AAaO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
|
|
|
1
|
-
{"version":3,"file":"Link.mjs","sources":["../../../src/components/Link/Link.tsx"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport type { LocalesValues } from '@intlayer/config/client';\nimport { getLocalizedUrl } from '@intlayer/core';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { ExternalLink } from 'lucide-react';\nimport {\n type AnchorHTMLAttributes,\n type DetailedHTMLProps,\n type FC,\n} from 'react';\nimport { cn } from '../../utils/cn';\n\nexport const linkVariants = cva(\n 'gap-3 transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n variant: {\n default:\n 'h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-4 hover:bg-current/0 hover:underline',\n 'invisible-link':\n 'h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-4 hover:bg-current/0',\n button:\n 'rounded-lg bg-current *:text-text-opposite min-h-8 px-6 max-md:py-2 text-sm flex items-center justify-center gap-2 whitespace-nowrap font-medium transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50',\n 'button-outlined':\n 'rounded-lg border-[1.5px] hover:bg-current/30 min-h-8 px-6 max-md:py-2 text-sm flex items-center justify-center gap-2 whitespace-nowrap font-medium transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50',\n hoverable:\n 'block rounded-lg border-none bg-current/0 transition hover:bg-current/20 aria-[current]:bg-current/5',\n },\n color: {\n primary: 'text-primary',\n secondary: 'text-secondary',\n destructive: 'text-destructive',\n neutral: 'text-neutral',\n light: 'text-white',\n dark: 'text-neutral-800',\n text: 'text-text',\n 'text-inverse': 'text-text-opposite',\n error: 'text-error',\n success: 'text-success',\n custom: '',\n },\n underlined: {\n default: '',\n true: 'underline',\n false: 'no-underline',\n },\n },\n\n defaultVariants: {\n variant: 'default',\n color: 'primary',\n underlined: 'default',\n },\n }\n);\n\nexport type LinkProps = DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n> &\n VariantProps<typeof linkVariants> & {\n label: string;\n isExternalLink?: boolean;\n isActive?: boolean;\n locale?: LocalesValues;\n };\n\nexport const checkIsExternalLink = ({\n href,\n isExternalLink: isExternalLinkProp,\n}: LinkProps): boolean => {\n const isValidHref = typeof href === 'string' && href.trim() !== '';\n const isExternalLink =\n isExternalLinkProp === true ||\n (typeof isExternalLinkProp === 'undefined' &&\n isValidHref &&\n /^https?:\\/\\//.test(href));\n\n return isExternalLink;\n};\n\nexport const Link: FC<LinkProps> = (props) => {\n const {\n variant = 'default',\n color = 'primary',\n children,\n label,\n className,\n isActive,\n underlined,\n locale,\n isExternalLink: isExternalLinkProp,\n href: hrefProp,\n ...otherProps\n } = props;\n const { internationalization } = configuration;\n\n const isExternalLink = checkIsExternalLink(props);\n const isChildrenString = typeof children === 'string';\n\n const rel = isExternalLink ? 'noopener noreferrer nofollow' : undefined;\n\n const target = isExternalLink ? '_blank' : '_self';\n\n const hrefLang = locale\n ? locale === internationalization.defaultLocale\n ? 'x-default'\n : locale\n : undefined;\n\n const href =\n locale && hrefProp && !isExternalLink\n ? getLocalizedUrl(hrefProp, locale)\n : hrefProp;\n\n return (\n <a\n href={href}\n hrefLang={hrefLang}\n aria-label={label}\n rel={rel}\n target={target}\n aria-current={isActive ? 'page' : undefined}\n className={cn(\n linkVariants({\n variant,\n color,\n underlined,\n className,\n })\n )}\n {...otherProps}\n >\n {variant === 'button' ? <span>{children}</span> : children}\n {isExternalLink && isChildrenString && (\n <ExternalLink className=\"ml-2 inline-block size-4\" />\n )}\n </a>\n );\n};\n"],"names":[],"mappings":";;;;;;AAYO,MAAM,eAAe;AAAA,EAC1B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SACE;AAAA,QACF,kBACE;AAAA,QACF,QACE;AAAA,QACF,mBACE;AAAA,QACF,WACE;AAAA,
|
|
1
|
+
{"version":3,"file":"Link.mjs","sources":["../../../src/components/Link/Link.tsx"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport type { LocalesValues } from '@intlayer/config/client';\nimport { getLocalizedUrl } from '@intlayer/core';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { ExternalLink } from 'lucide-react';\nimport {\n type AnchorHTMLAttributes,\n type DetailedHTMLProps,\n type FC,\n} from 'react';\nimport { cn } from '../../utils/cn';\n\nexport const linkVariants = cva(\n 'gap-3 transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n variant: {\n default:\n 'h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-4 hover:bg-current/0 hover:underline',\n 'invisible-link':\n 'h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-4 hover:bg-current/0',\n button:\n 'rounded-lg bg-current *:text-text-opposite min-h-8 px-6 max-md:py-2 text-sm flex items-center justify-center gap-2 whitespace-nowrap font-medium transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50',\n 'button-outlined':\n 'rounded-lg border-[1.5px] hover:bg-current/30 min-h-8 px-6 max-md:py-2 text-sm flex items-center justify-center gap-2 whitespace-nowrap font-medium transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50',\n hoverable:\n 'block rounded-lg border-none bg-current/0 transition hover:bg-current/20 aria-[current]:bg-current/5',\n },\n color: {\n primary: 'text-primary',\n secondary: 'text-secondary',\n destructive: 'text-destructive',\n neutral: 'text-neutral',\n light: 'text-white',\n dark: 'text-neutral-800',\n text: 'text-text',\n 'text-inverse': 'text-text-opposite',\n error: 'text-error',\n success: 'text-success',\n custom: '',\n },\n underlined: {\n default: '',\n true: 'underline',\n false: 'no-underline',\n },\n },\n\n defaultVariants: {\n variant: 'default',\n color: 'primary',\n underlined: 'default',\n },\n }\n);\n\nexport type LinkProps = DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n> &\n VariantProps<typeof linkVariants> & {\n label: string;\n isExternalLink?: boolean;\n isActive?: boolean;\n locale?: LocalesValues;\n };\n\nexport const checkIsExternalLink = ({\n href,\n isExternalLink: isExternalLinkProp,\n}: LinkProps): boolean => {\n const isValidHref = typeof href === 'string' && href.trim() !== '';\n const isExternalLink =\n isExternalLinkProp === true ||\n (typeof isExternalLinkProp === 'undefined' &&\n isValidHref &&\n /^https?:\\/\\//.test(href));\n\n return isExternalLink;\n};\n\nexport const Link: FC<LinkProps> = (props) => {\n const {\n variant = 'default',\n color = 'primary',\n children,\n label,\n className,\n isActive,\n underlined,\n locale,\n isExternalLink: isExternalLinkProp,\n href: hrefProp,\n ...otherProps\n } = props;\n const { internationalization } = configuration;\n\n const isExternalLink = checkIsExternalLink(props);\n const isChildrenString = typeof children === 'string';\n\n const rel = isExternalLink ? 'noopener noreferrer nofollow' : undefined;\n\n const target = isExternalLink ? '_blank' : '_self';\n\n const hrefLang = locale\n ? locale === internationalization.defaultLocale\n ? 'x-default'\n : locale\n : undefined;\n\n const href =\n locale && hrefProp && !isExternalLink\n ? getLocalizedUrl(hrefProp, locale)\n : hrefProp;\n\n return (\n <a\n href={href}\n hrefLang={hrefLang}\n aria-label={label}\n rel={rel}\n target={target}\n aria-current={isActive ? 'page' : undefined}\n className={cn(\n linkVariants({\n variant,\n color,\n underlined,\n className,\n })\n )}\n {...otherProps}\n >\n {variant === 'button' ? <span>{children}</span> : children}\n {isExternalLink && isChildrenString && (\n <ExternalLink className=\"ml-2 inline-block size-4\" />\n )}\n </a>\n );\n};\n"],"names":[],"mappings":";;;;;;AAYO,MAAM,eAAe;AAAA,EAC1B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SACE;AAAA,QACF,kBACE;AAAA,QACF,QACE;AAAA,QACF,mBACE;AAAA,QACF,WACE;AAAA,MAAA;AAAA,MAEJ,OAAO;AAAA,QACL,SAAS;AAAA,QACT,WAAW;AAAA,QACX,aAAa;AAAA,QACb,SAAS;AAAA,QACT,OAAO;AAAA,QACP,MAAM;AAAA,QACN,MAAM;AAAA,QACN,gBAAgB;AAAA,QAChB,OAAO;AA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AAA,QAAA,YAAY,WAAW,oBAAC,QAAA,EAAM,SAAA,CAAS,IAAU;AAAA,QACjD,kBAAkB,oBACjB,oBAAC,cAAA,EAAa,WAAU,2BAAA,CAA2B;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAI3D;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/Loader/index.tsx"],"sourcesContent":["import type { FC, HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Spinner } from './spinner';\n\nexport type LoaderProps = HTMLAttributes<HTMLDivElement> & {\n isLoading?: boolean;\n};\n\n/**\n *\n * Component can be use as a wrapper or standalone\n *\n * Example:\n * ```jsx\n * <Loader isLoading={isLoading}>\n * <div>Content</div>\n * </Loader>\n * ```\n * or\n * ```jsx\n * <Loader isLoading={isLoading} />\n * ```\n *\n * if isLoading is undefined, it will default to true\n * ```jsx\n * <Loader />\n * ```\n */\nexport const Loader: FC<LoaderProps> = ({\n children,\n isLoading = true,\n className,\n ...props\n}) => (\n <>\n {isLoading ? (\n <div\n className={cn(\n 'flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center',\n className\n )}\n role=\"status\"\n aria-label=\"Animated icon, meaning that the website is processing\"\n {...props}\n >\n <Spinner className=\"size-10 max-h-full max-w-full\" />\n </div>\n ) : (\n (children ?? <></>)\n )}\n </>\n);\n"],"names":["jsx","cn","Spinner"],"mappings":";;;;;AA4BO,MAAM,SAA0B,CAAC;AAAA,EACtC;AAAA,EACA,YAAY;AAAA,EACZ;AAAA,EACA,GAAG;AACL,4DAEK,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/Loader/index.tsx"],"sourcesContent":["import type { FC, HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Spinner } from './spinner';\n\nexport type LoaderProps = HTMLAttributes<HTMLDivElement> & {\n isLoading?: boolean;\n};\n\n/**\n *\n * Component can be use as a wrapper or standalone\n *\n * Example:\n * ```jsx\n * <Loader isLoading={isLoading}>\n * <div>Content</div>\n * </Loader>\n * ```\n * or\n * ```jsx\n * <Loader isLoading={isLoading} />\n * ```\n *\n * if isLoading is undefined, it will default to true\n * ```jsx\n * <Loader />\n * ```\n */\nexport const Loader: FC<LoaderProps> = ({\n children,\n isLoading = true,\n className,\n ...props\n}) => (\n <>\n {isLoading ? (\n <div\n className={cn(\n 'flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center',\n className\n )}\n role=\"status\"\n aria-label=\"Animated icon, meaning that the website is processing\"\n {...props}\n >\n <Spinner className=\"size-10 max-h-full max-w-full\" />\n </div>\n ) : (\n (children ?? <></>)\n )}\n </>\n);\n"],"names":["jsx","cn","Spinner"],"mappings":";;;;;AA4BO,MAAM,SAA0B,CAAC;AAAA,EACtC;AAAA,EACA,YAAY;AAAA,EACZ;AAAA,EACA,GAAG;AACL,4DAEK,UAAA,YACCA,2BAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,SAAAA;AAAAA,MACT;AAAA,MACA;AAAA,IAAA;AAAA,IAEF,MAAK;AAAA,IACL,cAAW;AAAA,IACV,GAAG;AAAA,IAEJ,UAAAD,2BAAAA,IAACE,0BAAAA,SAAA,EAAQ,WAAU,gCAAA,CAAgC;AAAA,EAAA;AACrD,IAEC,kEAAc,EAAA,CAEnB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.content.cjs","sources":["../../../src/components/Loader/index.content.ts"],"sourcesContent":["import { t, type Dictionary } from 'intlayer';\n\nexport const loaderContent = {\n key: 'loader',\n content: {\n label: t({\n en: 'Animated icon, meaning that the website is processing',\n 'en-GB': 'Animated icon, meaning that the website is processing',\n fr: 'Icône animée, signifiant que le site Web est en cours de traitement',\n es: 'Icono animado, significa que el sitio web está procesando',\n de: 'Animiertes Icon, das heißt, dass die Website in Bearbeitung ist',\n ja: 'アニメーションアイコン、ウェブサイトが処理していることを意味する',\n ko: '애니메이션 아이콘, 웹 사이트가 처리 중인 의미',\n zh: '动画图标,意味着网站正在处理',\n it: 'Icona animata, che significa che il sito web è in fase di elaborazione',\n pt: 'Ícone animado, o que significa que o site está processando',\n }),\n },\n} satisfies Dictionary;\n\nexport default loaderContent;\n"],"names":["t"],"mappings":";;;AAEO,MAAM,gBAAgB;AAAA,EAC3B,KAAK;AAAA,EACL,SAAS;AAAA,IACP,OAAOA,SAAAA,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,
|
|
1
|
+
{"version":3,"file":"index.content.cjs","sources":["../../../src/components/Loader/index.content.ts"],"sourcesContent":["import { t, type Dictionary } from 'intlayer';\n\nexport const loaderContent = {\n key: 'loader',\n content: {\n label: t({\n en: 'Animated icon, meaning that the website is processing',\n 'en-GB': 'Animated icon, meaning that the website is processing',\n fr: 'Icône animée, signifiant que le site Web est en cours de traitement',\n es: 'Icono animado, significa que el sitio web está procesando',\n de: 'Animiertes Icon, das heißt, dass die Website in Bearbeitung ist',\n ja: 'アニメーションアイコン、ウェブサイトが処理していることを意味する',\n ko: '애니메이션 아이콘, 웹 사이트가 처리 중인 의미',\n zh: '动画图标,意味着网站正在处理',\n it: 'Icona animata, che significa che il sito web è in fase di elaborazione',\n pt: 'Ícone animado, o que significa que o site está processando',\n }),\n },\n} satisfies Dictionary;\n\nexport default loaderContent;\n"],"names":["t"],"mappings":";;;AAEO,MAAM,gBAAgB;AAAA,EAC3B,KAAK;AAAA,EACL,SAAS;AAAA,IACP,OAAOA,SAAAA,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,EAAA;AAEL;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.content.mjs","sources":["../../../src/components/Loader/index.content.ts"],"sourcesContent":["import { t, type Dictionary } from 'intlayer';\n\nexport const loaderContent = {\n key: 'loader',\n content: {\n label: t({\n en: 'Animated icon, meaning that the website is processing',\n 'en-GB': 'Animated icon, meaning that the website is processing',\n fr: 'Icône animée, signifiant que le site Web est en cours de traitement',\n es: 'Icono animado, significa que el sitio web está procesando',\n de: 'Animiertes Icon, das heißt, dass die Website in Bearbeitung ist',\n ja: 'アニメーションアイコン、ウェブサイトが処理していることを意味する',\n ko: '애니메이션 아이콘, 웹 사이트가 처리 중인 의미',\n zh: '动画图标,意味着网站正在处理',\n it: 'Icona animata, che significa che il sito web è in fase di elaborazione',\n pt: 'Ícone animado, o que significa que o site está processando',\n }),\n },\n} satisfies Dictionary;\n\nexport default loaderContent;\n"],"names":[],"mappings":";AAEO,MAAM,gBAAgB;AAAA,EAC3B,KAAK;AAAA,EACL,SAAS;AAAA,IACP,OAAO,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,
|
|
1
|
+
{"version":3,"file":"index.content.mjs","sources":["../../../src/components/Loader/index.content.ts"],"sourcesContent":["import { t, type Dictionary } from 'intlayer';\n\nexport const loaderContent = {\n key: 'loader',\n content: {\n label: t({\n en: 'Animated icon, meaning that the website is processing',\n 'en-GB': 'Animated icon, meaning that the website is processing',\n fr: 'Icône animée, signifiant que le site Web est en cours de traitement',\n es: 'Icono animado, significa que el sitio web está procesando',\n de: 'Animiertes Icon, das heißt, dass die Website in Bearbeitung ist',\n ja: 'アニメーションアイコン、ウェブサイトが処理していることを意味する',\n ko: '애니메이션 아이콘, 웹 사이트가 처리 중인 의미',\n zh: '动画图标,意味着网站正在处理',\n it: 'Icona animata, che significa che il sito web è in fase di elaborazione',\n pt: 'Ícone animado, o que significa que o site está processando',\n }),\n },\n} satisfies Dictionary;\n\nexport default loaderContent;\n"],"names":[],"mappings":";AAEO,MAAM,gBAAgB;AAAA,EAC3B,KAAK;AAAA,EACL,SAAS;AAAA,IACP,OAAO,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,EAAA;AAEL;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../src/components/Loader/index.tsx"],"sourcesContent":["import type { FC, HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Spinner } from './spinner';\n\nexport type LoaderProps = HTMLAttributes<HTMLDivElement> & {\n isLoading?: boolean;\n};\n\n/**\n *\n * Component can be use as a wrapper or standalone\n *\n * Example:\n * ```jsx\n * <Loader isLoading={isLoading}>\n * <div>Content</div>\n * </Loader>\n * ```\n * or\n * ```jsx\n * <Loader isLoading={isLoading} />\n * ```\n *\n * if isLoading is undefined, it will default to true\n * ```jsx\n * <Loader />\n * ```\n */\nexport const Loader: FC<LoaderProps> = ({\n children,\n isLoading = true,\n className,\n ...props\n}) => (\n <>\n {isLoading ? (\n <div\n className={cn(\n 'flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center',\n className\n )}\n role=\"status\"\n aria-label=\"Animated icon, meaning that the website is processing\"\n {...props}\n >\n <Spinner className=\"size-10 max-h-full max-w-full\" />\n </div>\n ) : (\n (children ?? <></>)\n )}\n </>\n);\n"],"names":[],"mappings":";;;AA4BO,MAAM,SAA0B,CAAC;AAAA,EACtC;AAAA,EACA,YAAY;AAAA,EACZ;AAAA,EACA,GAAG;AACL,sCAEK,
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../src/components/Loader/index.tsx"],"sourcesContent":["import type { FC, HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Spinner } from './spinner';\n\nexport type LoaderProps = HTMLAttributes<HTMLDivElement> & {\n isLoading?: boolean;\n};\n\n/**\n *\n * Component can be use as a wrapper or standalone\n *\n * Example:\n * ```jsx\n * <Loader isLoading={isLoading}>\n * <div>Content</div>\n * </Loader>\n * ```\n * or\n * ```jsx\n * <Loader isLoading={isLoading} />\n * ```\n *\n * if isLoading is undefined, it will default to true\n * ```jsx\n * <Loader />\n * ```\n */\nexport const Loader: FC<LoaderProps> = ({\n children,\n isLoading = true,\n className,\n ...props\n}) => (\n <>\n {isLoading ? (\n <div\n className={cn(\n 'flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center',\n className\n )}\n role=\"status\"\n aria-label=\"Animated icon, meaning that the website is processing\"\n {...props}\n >\n <Spinner className=\"size-10 max-h-full max-w-full\" />\n </div>\n ) : (\n (children ?? <></>)\n )}\n </>\n);\n"],"names":[],"mappings":";;;AA4BO,MAAM,SAA0B,CAAC;AAAA,EACtC;AAAA,EACA,YAAY;AAAA,EACZ;AAAA,EACA,GAAG;AACL,sCAEK,UAAA,YACC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IAAA;AAAA,IAEF,MAAK;AAAA,IACL,cAAW;AAAA,IACV,GAAG;AAAA,IAEJ,UAAA,oBAAC,SAAA,EAAQ,WAAU,gCAAA,CAAgC;AAAA,EAAA;AACrD,IAEC,4CAAc,EAAA,CAEnB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.cjs","sources":["../../../src/components/Loader/spinner.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\nimport { cn } from '../../utils/cn';\n\ntype SpinnerProps = SVGProps<SVGSVGElement> & {\n strokeWidth?: number;\n};\n\nexport const Spinner = ({ className, strokeWidth = 4 }: SpinnerProps) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"44\"\n height=\"44\"\n viewBox=\"0 0 44 44\"\n stroke=\"currentColor\"\n className={cn('size-full', className)}\n >\n <g fill=\"none\" fillRule=\"evenodd\" strokeWidth={strokeWidth}>\n <circle cx=\"22\" cy=\"22\" r=\"1\">\n <animate\n attributeName=\"r\"\n begin=\"0s\"\n dur=\"1.8s\"\n values=\"1; 20\"\n calcMode=\"spline\"\n keyTimes=\"0; 1\"\n keySplines=\"0.165, 0.84, 0.44, 1\"\n repeatCount=\"indefinite\"\n />\n <animate\n attributeName=\"stroke-opacity\"\n begin=\"0s\"\n dur=\"1.8s\"\n values=\"1; 0\"\n calcMode=\"spline\"\n keyTimes=\"0; 1\"\n keySplines=\"0.3, 0.61, 0.355, 1\"\n repeatCount=\"indefinite\"\n />\n </circle>\n <circle cx=\"22\" cy=\"22\" r=\"1\">\n <animate\n attributeName=\"r\"\n begin=\"-0.9s\"\n dur=\"1.8s\"\n values=\"1; 20\"\n calcMode=\"spline\"\n keyTimes=\"0; 1\"\n keySplines=\"0.165, 0.84, 0.44, 1\"\n repeatCount=\"indefinite\"\n />\n <animate\n attributeName=\"stroke-opacity\"\n begin=\"-0.9s\"\n dur=\"1.8s\"\n values=\"1; 0\"\n calcMode=\"spline\"\n keyTimes=\"0; 1\"\n keySplines=\"0.3, 0.61, 0.355, 1\"\n repeatCount=\"indefinite\"\n />\n </circle>\n </g>\n </svg>\n);\n"],"names":["jsx","cn","jsxs"],"mappings":";;;;AAOO,MAAM,UAAU,CAAC,EAAE,WAAW,cAAc,
|
|
1
|
+
{"version":3,"file":"spinner.cjs","sources":["../../../src/components/Loader/spinner.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\nimport { cn } from '../../utils/cn';\n\ntype SpinnerProps = SVGProps<SVGSVGElement> & {\n strokeWidth?: number;\n};\n\nexport const Spinner = ({ className, strokeWidth = 4 }: SpinnerProps) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"44\"\n height=\"44\"\n viewBox=\"0 0 44 44\"\n stroke=\"currentColor\"\n className={cn('size-full', className)}\n >\n <g fill=\"none\" fillRule=\"evenodd\" strokeWidth={strokeWidth}>\n <circle cx=\"22\" cy=\"22\" r=\"1\">\n <animate\n attributeName=\"r\"\n begin=\"0s\"\n dur=\"1.8s\"\n values=\"1; 20\"\n calcMode=\"spline\"\n keyTimes=\"0; 1\"\n keySplines=\"0.165, 0.84, 0.44, 1\"\n repeatCount=\"indefinite\"\n />\n <animate\n attributeName=\"stroke-opacity\"\n begin=\"0s\"\n dur=\"1.8s\"\n values=\"1; 0\"\n calcMode=\"spline\"\n keyTimes=\"0; 1\"\n keySplines=\"0.3, 0.61, 0.355, 1\"\n repeatCount=\"indefinite\"\n />\n </circle>\n <circle cx=\"22\" cy=\"22\" r=\"1\">\n <animate\n attributeName=\"r\"\n begin=\"-0.9s\"\n dur=\"1.8s\"\n values=\"1; 20\"\n calcMode=\"spline\"\n keyTimes=\"0; 1\"\n keySplines=\"0.165, 0.84, 0.44, 1\"\n repeatCount=\"indefinite\"\n />\n <animate\n attributeName=\"stroke-opacity\"\n begin=\"-0.9s\"\n dur=\"1.8s\"\n values=\"1; 0\"\n calcMode=\"spline\"\n keyTimes=\"0; 1\"\n keySplines=\"0.3, 0.61, 0.355, 1\"\n repeatCount=\"indefinite\"\n />\n </circle>\n </g>\n </svg>\n);\n"],"names":["jsx","cn","jsxs"],"mappings":";;;;AAOO,MAAM,UAAU,CAAC,EAAE,WAAW,cAAc,QACjDA,2BAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,QAAO;AAAA,IACP,WAAWC,SAAAA,GAAG,aAAa,SAAS;AAAA,IAEpC,0CAAC,KAAA,EAAE,MAAK,QAAO,UAAS,WAAU,aAChC,UAAA;AAAA,MAAAC,gCAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,KACxB,UAAA;AAAA,QAAAF,2BAAAA;AAAAA,UAAC;AAAA,UAAA;AAAA,YACC,eAAc;AAAA,YACd,OAAM;AAAA,YACN,KAAI;AAAA,YACJ,QAAO;AAAA,YACP,UAAS;AAAA,YACT,UAAS;AAAA,YACT,YAAW;AAAA,YACX,aAAY;AAAA,UAAA;AAAA,QAAA;AAAA,QAEdA,2BAAAA;AAAAA,UAAC;AAAA,UAAA;AAAA,YACC,eAAc;AAAA,YACd,OAAM;AAAA,YACN,KAAI;AAAA,YACJ,QAAO;AAAA,YACP,UAAS;AAAA,YACT,UAAS;AAAA,YACT,YAAW;AAAA,YACX,aAAY;AAAA,UAAA;AAAA,QAAA;AAAA,MACd,GACF;AAAA,sCACC,UAAA,EAAO,IAAG,MAAK,IAAG,MAAK,GAAE,KACxB,UAAA;AAAA,QAAAA,2BAAAA;AAAAA,UAAC;AAAA,UAAA;AAAA,YACC,eAAc;AAAA,YACd,OAAM;AAAA,YACN,KAAI;AAAA,YACJ,QAAO;AAAA,YACP,UAAS;AAAA,YACT,UAAS;AAAA,YACT,YAAW;AAAA,YACX,aAAY;AAAA,UAAA;AAAA,QAAA;AAAA,QAEdA,2BAAAA;AAAAA,UAAC;AAAA,UAAA;AAAA,YACC,eAAc;AAAA,YACd,OAAM;AAAA,YACN,KAAI;AAAA,YACJ,QAAO;AAAA,YACP,UAAS;AAAA,YACT,UAAS;AAAA,YACT,YAAW;AAAA,YACX,aAAY;AAAA,UAAA;AAAA,QAAA;AAAA,MACd,EAAA,CACF;AAAA,IAAA,EAAA,CACF;AAAA,EAAA;AACF;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.mjs","sources":["../../../src/components/Loader/spinner.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\nimport { cn } from '../../utils/cn';\n\ntype SpinnerProps = SVGProps<SVGSVGElement> & {\n strokeWidth?: number;\n};\n\nexport const Spinner = ({ className, strokeWidth = 4 }: SpinnerProps) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"44\"\n height=\"44\"\n viewBox=\"0 0 44 44\"\n stroke=\"currentColor\"\n className={cn('size-full', className)}\n >\n <g fill=\"none\" fillRule=\"evenodd\" strokeWidth={strokeWidth}>\n <circle cx=\"22\" cy=\"22\" r=\"1\">\n <animate\n attributeName=\"r\"\n begin=\"0s\"\n dur=\"1.8s\"\n values=\"1; 20\"\n calcMode=\"spline\"\n keyTimes=\"0; 1\"\n keySplines=\"0.165, 0.84, 0.44, 1\"\n repeatCount=\"indefinite\"\n />\n <animate\n attributeName=\"stroke-opacity\"\n begin=\"0s\"\n dur=\"1.8s\"\n values=\"1; 0\"\n calcMode=\"spline\"\n keyTimes=\"0; 1\"\n keySplines=\"0.3, 0.61, 0.355, 1\"\n repeatCount=\"indefinite\"\n />\n </circle>\n <circle cx=\"22\" cy=\"22\" r=\"1\">\n <animate\n attributeName=\"r\"\n begin=\"-0.9s\"\n dur=\"1.8s\"\n values=\"1; 20\"\n calcMode=\"spline\"\n keyTimes=\"0; 1\"\n keySplines=\"0.165, 0.84, 0.44, 1\"\n repeatCount=\"indefinite\"\n />\n <animate\n attributeName=\"stroke-opacity\"\n begin=\"-0.9s\"\n dur=\"1.8s\"\n values=\"1; 0\"\n calcMode=\"spline\"\n keyTimes=\"0; 1\"\n keySplines=\"0.3, 0.61, 0.355, 1\"\n repeatCount=\"indefinite\"\n />\n </circle>\n </g>\n </svg>\n);\n"],"names":[],"mappings":";;AAOO,MAAM,UAAU,CAAC,EAAE,WAAW,cAAc,
|
|
1
|
+
{"version":3,"file":"spinner.mjs","sources":["../../../src/components/Loader/spinner.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\nimport { cn } from '../../utils/cn';\n\ntype SpinnerProps = SVGProps<SVGSVGElement> & {\n strokeWidth?: number;\n};\n\nexport const Spinner = ({ className, strokeWidth = 4 }: SpinnerProps) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"44\"\n height=\"44\"\n viewBox=\"0 0 44 44\"\n stroke=\"currentColor\"\n className={cn('size-full', className)}\n >\n <g fill=\"none\" fillRule=\"evenodd\" strokeWidth={strokeWidth}>\n <circle cx=\"22\" cy=\"22\" r=\"1\">\n <animate\n attributeName=\"r\"\n begin=\"0s\"\n dur=\"1.8s\"\n values=\"1; 20\"\n calcMode=\"spline\"\n keyTimes=\"0; 1\"\n keySplines=\"0.165, 0.84, 0.44, 1\"\n repeatCount=\"indefinite\"\n />\n <animate\n attributeName=\"stroke-opacity\"\n begin=\"0s\"\n dur=\"1.8s\"\n values=\"1; 0\"\n calcMode=\"spline\"\n keyTimes=\"0; 1\"\n keySplines=\"0.3, 0.61, 0.355, 1\"\n repeatCount=\"indefinite\"\n />\n </circle>\n <circle cx=\"22\" cy=\"22\" r=\"1\">\n <animate\n attributeName=\"r\"\n begin=\"-0.9s\"\n dur=\"1.8s\"\n values=\"1; 20\"\n calcMode=\"spline\"\n keyTimes=\"0; 1\"\n keySplines=\"0.165, 0.84, 0.44, 1\"\n repeatCount=\"indefinite\"\n />\n <animate\n attributeName=\"stroke-opacity\"\n begin=\"-0.9s\"\n dur=\"1.8s\"\n values=\"1; 0\"\n calcMode=\"spline\"\n keyTimes=\"0; 1\"\n keySplines=\"0.3, 0.61, 0.355, 1\"\n repeatCount=\"indefinite\"\n />\n </circle>\n </g>\n </svg>\n);\n"],"names":[],"mappings":";;AAOO,MAAM,UAAU,CAAC,EAAE,WAAW,cAAc,QACjD;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,QAAO;AAAA,IACP,WAAW,GAAG,aAAa,SAAS;AAAA,IAEpC,+BAAC,KAAA,EAAE,MAAK,QAAO,UAAS,WAAU,aAChC,UAAA;AAAA,MAAA,qBAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,KACxB,UAAA;AAAA,QAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,eAAc;AAAA,YACd,OAAM;AAAA,YACN,KAAI;AAAA,YACJ,QAAO;AAAA,YACP,UAAS;AAAA,YACT,UAAS;AAAA,YACT,YAAW;AAAA,YACX,aAAY;AAAA,UAAA;AAAA,QAAA;AAAA,QAEd;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,eAAc;AAAA,YACd,OAAM;AAAA,YACN,KAAI;AAAA,YACJ,QAAO;AAAA,YACP,UAAS;AAAA,YACT,UAAS;AAAA,YACT,YAAW;AAAA,YACX,aAAY;AAAA,UAAA;AAAA,QAAA;AAAA,MACd,GACF;AAAA,2BACC,UAAA,EAAO,IAAG,MAAK,IAAG,MAAK,GAAE,KACxB,UAAA;AAAA,QAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,eAAc;AAAA,YACd,OAAM;AAAA,YACN,KAAI;AAAA,YACJ,QAAO;AAAA,YACP,UAAS;AAAA,YACT,UAAS;AAAA,YACT,YAAW;AAAA,YACX,aAAY;AAAA,UAAA;AAAA,QAAA;AAAA,QAEd;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,eAAc;AAAA,YACd,OAAM;AAAA,YACN,KAAI;AAAA,YACJ,QAAO;AAAA,YACP,UAAS;AAAA,YACT,UAAS;AAAA,YACT,YAAW;AAAA,YACX,aAAY;AAAA,UAAA;AAAA,QAAA;AAAA,MACd,EAAA,CACF;AAAA,IAAA,EAAA,CACF;AAAA,EAAA;AACF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocaleSwitcherContent.cjs","sources":["../../../src/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.tsx"],"sourcesContent":["'use client';\n\nimport { Locales, type LocalesValues } from '@intlayer/config/client';\nimport { getHTMLTextDir, getLocaleName } from '@intlayer/core';\nimport Fuse, { type IFuseOptions } from 'fuse.js';\nimport { Check, Globe, MoveVertical } from 'lucide-react';\nimport { useCallback, useMemo, useRef, useState, type FC } from 'react';\nimport { useDictionary, useLocale } from 'react-intlayer';\nimport { usePersistedStore } from '../../hooks';\nimport { Button } from '../Button';\nimport { Container } from '../Container';\nimport { DropDown, type PanelProps } from '../DropDown';\nimport { Input } from '../Input';\nimport { SwitchSelector } from '../SwitchSelector';\nimport localeSwitcherContent from './localeSwitcher.content';\nimport { useLocaleSwitcherContent } from './LocaleSwitcherContentContext';\n\nexport type LocaleSwitcherContentProps = {\n panelProps?: Omit<PanelProps, 'identifier'>;\n isMultilingual?: boolean;\n};\n\nconst DROPDOWN_IDENTIFIER = 'locale-switcher-content';\n\ntype MultilingualAvailableLocales = {\n locale: LocalesValues;\n englishName: string;\n currentLocaleName: string;\n ownLocaleName: string;\n};\n\nexport const LocaleSwitcherContent: FC<LocaleSwitcherContentProps> = ({\n panelProps,\n isMultilingual = true,\n}) => {\n const {\n switchTo,\n searchInput,\n localeSwitcherLabel,\n languageListLabel,\n seeAllLocalesSwitch,\n } = useDictionary(localeSwitcherContent);\n const inputRef = useRef<HTMLInputElement>(null);\n const { locale } = useLocale();\n const { availableLocales, selectedLocales, setSelectedLocales } =\n useLocaleSwitcherContent();\n\n const multilingualAvailableLocales: MultilingualAvailableLocales[] = useMemo(\n () =>\n availableLocales.map((localeEl) => {\n const englishName = getLocaleName(localeEl, Locales.ENGLISH);\n const currentLocaleName = getLocaleName(localeEl, locale);\n const ownLocaleName = getLocaleName(localeEl);\n return {\n locale: localeEl,\n englishName,\n currentLocaleName,\n ownLocaleName,\n };\n }),\n [availableLocales, locale]\n );\n\n const [results, setResults] = useState<MultilingualAvailableLocales[]>(\n multilingualAvailableLocales\n );\n const [seeAllLocales, setSeeAllLocales] = usePersistedStore(\n 'locale-content-selector-see-all-locales',\n false\n );\n\n // Create a new Fuse instance with the options and documentation data\n const fuse = useMemo(() => {\n const fuseOptions: IFuseOptions<MultilingualAvailableLocales> = {\n keys: [\n { name: 'ownLocaleName', weight: 0.4 },\n { name: 'englishName', weight: 0.2 },\n { name: 'currentLocaleName', weight: 0.2 },\n { name: 'locale', weight: 0.2 },\n ],\n threshold: 0.02, // Defines how fuzzy the matching should be (lower is more strict)\n };\n\n return new Fuse(multilingualAvailableLocales, fuseOptions);\n }, [multilingualAvailableLocales]);\n\n const handleSearch = useCallback(\n (searchQuery: string) => {\n if (searchQuery) {\n // Perform search on every input change\n const searchResults = fuse\n .search(searchQuery)\n .map((result) => result.item);\n setResults(searchResults);\n } else {\n setResults(multilingualAvailableLocales);\n }\n },\n [fuse, multilingualAvailableLocales]\n );\n\n const handleClickLocale = (localeItem: LocalesValues) => {\n if (isMultilingual) {\n if (selectedLocales.includes(localeItem)) {\n if (selectedLocales.length > 1) {\n setSelectedLocales((prev) => prev.filter((el) => el !== localeItem));\n }\n } else {\n setSelectedLocales((prev) => [...prev, localeItem]);\n }\n } else {\n setSelectedLocales([localeItem]);\n }\n };\n\n const handleSeeAllLocales = (value: boolean) => {\n setSeeAllLocales(value);\n if (value) {\n setSelectedLocales(availableLocales);\n } else {\n setSelectedLocales([locale]);\n }\n };\n\n return (\n <div\n className=\"border-text text-text rounded-xl border transition-colors\"\n aria-label={localeSwitcherLabel.value}\n >\n <DropDown identifier={DROPDOWN_IDENTIFIER}>\n <DropDown.Trigger identifier={DROPDOWN_IDENTIFIER}>\n <div className=\"flex w-full items-center justify-between\">\n <div className=\"px-2 py-1\">\n <Globe size={18} />\n </div>\n <MoveVertical className=\"self-center\" size={18} />\n </div>\n </DropDown.Trigger>\n\n <DropDown.Panel\n identifier={DROPDOWN_IDENTIFIER}\n isOverable\n isFocusable\n className=\"left-auto right-0\"\n {...panelProps}\n >\n <Container\n className=\"max-h-[80vh] min-w-28\"\n separator=\"y\"\n role=\"listbox\"\n transparency=\"sm\"\n border\n roundedSize=\"2xl\"\n borderColor=\"text\"\n aria-label={languageListLabel.value}\n >\n {isMultilingual && (\n <div className=\"m-auto p-2\">\n <SwitchSelector\n defaultValue={false}\n onChange={handleSeeAllLocales}\n color=\"text\"\n size=\"sm\"\n className=\"!w-60\"\n choices={[\n {\n content: seeAllLocalesSwitch.true.value,\n value: true,\n },\n {\n content: seeAllLocalesSwitch.false.value,\n value: false,\n },\n ]}\n />\n </div>\n )}\n\n {!(isMultilingual && seeAllLocales) && (\n <>\n <div className=\"p-3\">\n <Input\n type=\"search\"\n aria-label={searchInput.ariaLabel.value}\n placeholder={searchInput.placeholder.value}\n onChange={(e) => handleSearch(e.target.value)}\n ref={inputRef}\n />\n </div>\n <ol className=\"divide-text/20 divide-y divide-dashed overflow-y-auto p-1\">\n {results.map(\n ({\n locale: localeItem,\n currentLocaleName,\n ownLocaleName,\n }) => (\n <li className=\"px-1.5 py-1\" key={localeItem}>\n <Button\n onClick={() => handleClickLocale(localeItem)}\n label={`${switchTo} ${currentLocaleName}`}\n disabled={\n !(availableLocales ?? availableLocales).includes(\n localeItem\n )\n }\n isActive={selectedLocales.includes(localeItem)}\n variant=\"hoverable\"\n color=\"text\"\n isFullWidth\n textAlign=\"left\"\n size=\"sm\"\n >\n <div className=\"flex flex-row items-center justify-between gap-3 px-2 py-1\">\n {isMultilingual && (\n <div className=\"w-4\">\n {selectedLocales.includes(localeItem) && (\n <Check className=\"size-full\" />\n )}\n </div>\n )}\n <div className=\"flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1\">\n <div className=\"flex flex-col text-nowrap\">\n <span\n dir={getHTMLTextDir(localeItem)}\n lang={localeItem}\n >\n {ownLocaleName}\n </span>\n <span className=\"text-neutral text-xs\">\n {currentLocaleName}\n </span>\n </div>\n <span className=\"text-neutral text-sm\">\n {localeItem.toUpperCase()}\n </span>\n </div>\n </div>\n </Button>\n </li>\n )\n )}\n </ol>\n </>\n )}\n </Container>\n </DropDown.Panel>\n </DropDown>\n </div>\n );\n};\n"],"names":["useDictionary","localeSwitcherContent","useRef","useLocale","useLocaleSwitcherContent","useMemo","getLocaleName","Locales","useState","usePersistedStore","useCallback","jsx","jsxs","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EACF,CAAA;AAAA,wBAAA;AAAA,2BAxC6B,UA0CjC;AAAA,oBAAA,EAGN,CAAA;AAAA,kBAAA,EACF,CAAA;AAAA,gBAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAEJ;AAAA,QAAA;AAAA,MACF,EACF,CAAA;AAAA,IAAA;AAAA,EACF;AAEJ;;"}
|
|
1
|
+
{"version":3,"file":"LocaleSwitcherContent.cjs","sources":["../../../src/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.tsx"],"sourcesContent":["'use client';\n\nimport { Locales, type LocalesValues } from '@intlayer/config/client';\nimport { getHTMLTextDir, getLocaleName } from '@intlayer/core';\nimport Fuse, { type IFuseOptions } from 'fuse.js';\nimport { Check, Globe, MoveVertical } from 'lucide-react';\nimport { useCallback, useMemo, useRef, useState, type FC } from 'react';\nimport { useDictionary, useLocale } from 'react-intlayer';\nimport { usePersistedStore } from '../../hooks';\nimport { Button } from '../Button';\nimport { Container } from '../Container';\nimport { DropDown, type PanelProps } from '../DropDown';\nimport { Input } from '../Input';\nimport { SwitchSelector } from '../SwitchSelector';\nimport localeSwitcherContent from './localeSwitcher.content';\nimport { useLocaleSwitcherContent } from './LocaleSwitcherContentContext';\n\nexport type LocaleSwitcherContentProps = {\n panelProps?: Omit<PanelProps, 'identifier'>;\n isMultilingual?: boolean;\n};\n\nconst DROPDOWN_IDENTIFIER = 'locale-switcher-content';\n\ntype MultilingualAvailableLocales = {\n locale: LocalesValues;\n englishName: string;\n currentLocaleName: string;\n ownLocaleName: string;\n};\n\nexport const LocaleSwitcherContent: FC<LocaleSwitcherContentProps> = ({\n panelProps,\n isMultilingual = true,\n}) => {\n const {\n switchTo,\n searchInput,\n localeSwitcherLabel,\n languageListLabel,\n seeAllLocalesSwitch,\n } = useDictionary(localeSwitcherContent);\n const inputRef = useRef<HTMLInputElement>(null);\n const { locale } = useLocale();\n const { availableLocales, selectedLocales, setSelectedLocales } =\n useLocaleSwitcherContent();\n\n const multilingualAvailableLocales: MultilingualAvailableLocales[] = useMemo(\n () =>\n availableLocales.map((localeEl) => {\n const englishName = getLocaleName(localeEl, Locales.ENGLISH);\n const currentLocaleName = getLocaleName(localeEl, locale);\n const ownLocaleName = getLocaleName(localeEl);\n return {\n locale: localeEl,\n englishName,\n currentLocaleName,\n ownLocaleName,\n };\n }),\n [availableLocales, locale]\n );\n\n const [results, setResults] = useState<MultilingualAvailableLocales[]>(\n multilingualAvailableLocales\n );\n const [seeAllLocales, setSeeAllLocales] = usePersistedStore(\n 'locale-content-selector-see-all-locales',\n false\n );\n\n // Create a new Fuse instance with the options and documentation data\n const fuse = useMemo(() => {\n const fuseOptions: IFuseOptions<MultilingualAvailableLocales> = {\n keys: [\n { name: 'ownLocaleName', weight: 0.4 },\n { name: 'englishName', weight: 0.2 },\n { name: 'currentLocaleName', weight: 0.2 },\n { name: 'locale', weight: 0.2 },\n ],\n threshold: 0.02, // Defines how fuzzy the matching should be (lower is more strict)\n };\n\n return new Fuse(multilingualAvailableLocales, fuseOptions);\n }, [multilingualAvailableLocales]);\n\n const handleSearch = useCallback(\n (searchQuery: string) => {\n if (searchQuery) {\n // Perform search on every input change\n const searchResults = fuse\n .search(searchQuery)\n .map((result) => result.item);\n setResults(searchResults);\n } else {\n setResults(multilingualAvailableLocales);\n }\n },\n [fuse, multilingualAvailableLocales]\n );\n\n const handleClickLocale = (localeItem: LocalesValues) => {\n if (isMultilingual) {\n if (selectedLocales.includes(localeItem)) {\n if (selectedLocales.length > 1) {\n setSelectedLocales((prev) => prev.filter((el) => el !== localeItem));\n }\n } else {\n setSelectedLocales((prev) => [...prev, localeItem]);\n }\n } else {\n setSelectedLocales([localeItem]);\n }\n };\n\n const handleSeeAllLocales = (value: boolean) => {\n setSeeAllLocales(value);\n if (value) {\n setSelectedLocales(availableLocales);\n } else {\n setSelectedLocales([locale]);\n }\n };\n\n return (\n <div\n className=\"border-text text-text rounded-xl border transition-colors\"\n aria-label={localeSwitcherLabel.value}\n >\n <DropDown identifier={DROPDOWN_IDENTIFIER}>\n <DropDown.Trigger identifier={DROPDOWN_IDENTIFIER}>\n <div className=\"flex w-full items-center justify-between\">\n <div className=\"px-2 py-1\">\n <Globe size={18} />\n </div>\n <MoveVertical className=\"self-center\" size={18} />\n </div>\n </DropDown.Trigger>\n\n <DropDown.Panel\n identifier={DROPDOWN_IDENTIFIER}\n isOverable\n isFocusable\n className=\"left-auto right-0\"\n {...panelProps}\n >\n <Container\n className=\"max-h-[80vh] min-w-28\"\n separator=\"y\"\n role=\"listbox\"\n transparency=\"sm\"\n border\n roundedSize=\"2xl\"\n borderColor=\"text\"\n aria-label={languageListLabel.value}\n >\n {isMultilingual && (\n <div className=\"m-auto p-2\">\n <SwitchSelector\n defaultValue={false}\n onChange={handleSeeAllLocales}\n color=\"text\"\n size=\"sm\"\n className=\"!w-60\"\n choices={[\n {\n content: seeAllLocalesSwitch.true.value,\n value: true,\n },\n {\n content: seeAllLocalesSwitch.false.value,\n value: false,\n },\n ]}\n />\n </div>\n )}\n\n {!(isMultilingual && seeAllLocales) && (\n <>\n <div className=\"p-3\">\n <Input\n type=\"search\"\n aria-label={searchInput.ariaLabel.value}\n placeholder={searchInput.placeholder.value}\n onChange={(e) => handleSearch(e.target.value)}\n ref={inputRef}\n />\n </div>\n <ol className=\"divide-text/20 divide-y divide-dashed overflow-y-auto p-1\">\n {results.map(\n ({\n locale: localeItem,\n currentLocaleName,\n ownLocaleName,\n }) => (\n <li className=\"px-1.5 py-1\" key={localeItem}>\n <Button\n onClick={() => handleClickLocale(localeItem)}\n label={`${switchTo} ${currentLocaleName}`}\n disabled={\n !(availableLocales ?? availableLocales).includes(\n localeItem\n )\n }\n isActive={selectedLocales.includes(localeItem)}\n variant=\"hoverable\"\n color=\"text\"\n isFullWidth\n textAlign=\"left\"\n size=\"sm\"\n >\n <div className=\"flex flex-row items-center justify-between gap-3 px-2 py-1\">\n {isMultilingual && (\n <div className=\"w-4\">\n {selectedLocales.includes(localeItem) && (\n <Check className=\"size-full\" />\n )}\n </div>\n )}\n <div className=\"flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1\">\n <div className=\"flex flex-col text-nowrap\">\n <span\n dir={getHTMLTextDir(localeItem)}\n lang={localeItem}\n >\n {ownLocaleName}\n </span>\n <span className=\"text-neutral text-xs\">\n {currentLocaleName}\n </span>\n </div>\n <span className=\"text-neutral text-sm\">\n {localeItem.toUpperCase()}\n </span>\n </div>\n </div>\n </Button>\n </li>\n )\n )}\n </ol>\n </>\n )}\n </Container>\n </DropDown.Panel>\n </DropDown>\n </div>\n );\n};\n"],"names":["useDictionary","localeSwitcherContent","useRef","useLocale","useLocaleSwitcherContent","useMemo","getLocaleName","Locales","useState","usePersistedStore","useCallback","jsx","jsxs","DropDown","Globe","MoveVertical","Container","SwitchSelector","Fragment","Input","Button","Check","getHTMLTextDir"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAM,sBAAsB;AASrB,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA,iBAAiB;AACnB,MAAM;AACJ,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACEA,cAAAA,cAAcC,+DAAqB;AACvC,QAAM,WAAWC,aAAAA,OAAyB,IAAI;AAC9C,QAAM,EAAE,OAAA,IAAWC,wBAAA;AACnB,QAAM,EAAE,kBAAkB,iBAAiB,mBAAA,IACzCC,sEAAAA,yBAAA;AAEF,QAAM,+BAA+DC,aAAAA;AAAAA,IACnE,MACE,iBAAiB,IAAI,CAAC,aAAa;AACjC,YAAM,cAAcC,KAAAA,cAAc,UAAUC,OAAAA,QAAQ,OAAO;AAC3D,YAAM,oBAAoBD,KAAAA,cAAc,UAAU,MAAM;AACxD,YAAM,gBAAgBA,KAAAA,cAAc,QAAQ;AAC5C,aAAO;AAAA,QACL,QAAQ;AAAA,QACR;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,IAEJ,CAAC;AAAA,IACH,CAAC,kBAA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gB,SAAS,UAAU,KAClCA,2BAAAA,IAACU,YAAAA,OAAA,EAAM,WAAU,YAAA,CAAY,GAEjC;AAAA,4BAEFT,2BAAAA,KAAC,OAAA,EAAI,WAAU,qEACb,UAAA;AAAA,8BAAAA,2BAAAA,KAAC,OAAA,EAAI,WAAU,6BACb,UAAA;AAAA,gCAAAD,2BAAAA;AAAAA,kCAAC;AAAA,kCAAA;AAAA,oCACC,KAAKW,KAAAA,eAAe,UAAU;AAAA,oCAC9B,MAAM;AAAA,oCAEL,UAAA;AAAA,kCAAA;AAAA,gCAAA;AAAA,gCAEHX,2BAAAA,IAAC,QAAA,EAAK,WAAU,wBACb,UAAA,kBAAA,CACH;AAAA,8BAAA,GACF;AAAA,6DACC,QAAA,EAAK,WAAU,wBACb,UAAA,WAAW,cAAY,CAC1B;AAAA,4BAAA,EAAA,CACF;AAAA,0BAAA,EAAA,CACF;AAAA,wBAAA;AAAA,sBAAA,KAxC6B,UA0CjC;AAAA,oBAAA,EAEJ,CACF;AAAA,kBAAA,EAAA,CACF;AAAA,gBAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAEJ;AAAA,QAAA;AAAA,MACF,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocaleSwitcherContent.mjs","sources":["../../../src/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.tsx"],"sourcesContent":["'use client';\n\nimport { Locales, type LocalesValues } from '@intlayer/config/client';\nimport { getHTMLTextDir, getLocaleName } from '@intlayer/core';\nimport Fuse, { type IFuseOptions } from 'fuse.js';\nimport { Check, Globe, MoveVertical } from 'lucide-react';\nimport { useCallback, useMemo, useRef, useState, type FC } from 'react';\nimport { useDictionary, useLocale } from 'react-intlayer';\nimport { usePersistedStore } from '../../hooks';\nimport { Button } from '../Button';\nimport { Container } from '../Container';\nimport { DropDown, type PanelProps } from '../DropDown';\nimport { Input } from '../Input';\nimport { SwitchSelector } from '../SwitchSelector';\nimport localeSwitcherContent from './localeSwitcher.content';\nimport { useLocaleSwitcherContent } from './LocaleSwitcherContentContext';\n\nexport type LocaleSwitcherContentProps = {\n panelProps?: Omit<PanelProps, 'identifier'>;\n isMultilingual?: boolean;\n};\n\nconst DROPDOWN_IDENTIFIER = 'locale-switcher-content';\n\ntype MultilingualAvailableLocales = {\n locale: LocalesValues;\n englishName: string;\n currentLocaleName: string;\n ownLocaleName: string;\n};\n\nexport const LocaleSwitcherContent: FC<LocaleSwitcherContentProps> = ({\n panelProps,\n isMultilingual = true,\n}) => {\n const {\n switchTo,\n searchInput,\n localeSwitcherLabel,\n languageListLabel,\n seeAllLocalesSwitch,\n } = useDictionary(localeSwitcherContent);\n const inputRef = useRef<HTMLInputElement>(null);\n const { locale } = useLocale();\n const { availableLocales, selectedLocales, setSelectedLocales } =\n useLocaleSwitcherContent();\n\n const multilingualAvailableLocales: MultilingualAvailableLocales[] = useMemo(\n () =>\n availableLocales.map((localeEl) => {\n const englishName = getLocaleName(localeEl, Locales.ENGLISH);\n const currentLocaleName = getLocaleName(localeEl, locale);\n const ownLocaleName = getLocaleName(localeEl);\n return {\n locale: localeEl,\n englishName,\n currentLocaleName,\n ownLocaleName,\n };\n }),\n [availableLocales, locale]\n );\n\n const [results, setResults] = useState<MultilingualAvailableLocales[]>(\n multilingualAvailableLocales\n );\n const [seeAllLocales, setSeeAllLocales] = usePersistedStore(\n 'locale-content-selector-see-all-locales',\n false\n );\n\n // Create a new Fuse instance with the options and documentation data\n const fuse = useMemo(() => {\n const fuseOptions: IFuseOptions<MultilingualAvailableLocales> = {\n keys: [\n { name: 'ownLocaleName', weight: 0.4 },\n { name: 'englishName', weight: 0.2 },\n { name: 'currentLocaleName', weight: 0.2 },\n { name: 'locale', weight: 0.2 },\n ],\n threshold: 0.02, // Defines how fuzzy the matching should be (lower is more strict)\n };\n\n return new Fuse(multilingualAvailableLocales, fuseOptions);\n }, [multilingualAvailableLocales]);\n\n const handleSearch = useCallback(\n (searchQuery: string) => {\n if (searchQuery) {\n // Perform search on every input change\n const searchResults = fuse\n .search(searchQuery)\n .map((result) => result.item);\n setResults(searchResults);\n } else {\n setResults(multilingualAvailableLocales);\n }\n },\n [fuse, multilingualAvailableLocales]\n );\n\n const handleClickLocale = (localeItem: LocalesValues) => {\n if (isMultilingual) {\n if (selectedLocales.includes(localeItem)) {\n if (selectedLocales.length > 1) {\n setSelectedLocales((prev) => prev.filter((el) => el !== localeItem));\n }\n } else {\n setSelectedLocales((prev) => [...prev, localeItem]);\n }\n } else {\n setSelectedLocales([localeItem]);\n }\n };\n\n const handleSeeAllLocales = (value: boolean) => {\n setSeeAllLocales(value);\n if (value) {\n setSelectedLocales(availableLocales);\n } else {\n setSelectedLocales([locale]);\n }\n };\n\n return (\n <div\n className=\"border-text text-text rounded-xl border transition-colors\"\n aria-label={localeSwitcherLabel.value}\n >\n <DropDown identifier={DROPDOWN_IDENTIFIER}>\n <DropDown.Trigger identifier={DROPDOWN_IDENTIFIER}>\n <div className=\"flex w-full items-center justify-between\">\n <div className=\"px-2 py-1\">\n <Globe size={18} />\n </div>\n <MoveVertical className=\"self-center\" size={18} />\n </div>\n </DropDown.Trigger>\n\n <DropDown.Panel\n identifier={DROPDOWN_IDENTIFIER}\n isOverable\n isFocusable\n className=\"left-auto right-0\"\n {...panelProps}\n >\n <Container\n className=\"max-h-[80vh] min-w-28\"\n separator=\"y\"\n role=\"listbox\"\n transparency=\"sm\"\n border\n roundedSize=\"2xl\"\n borderColor=\"text\"\n aria-label={languageListLabel.value}\n >\n {isMultilingual && (\n <div className=\"m-auto p-2\">\n <SwitchSelector\n defaultValue={false}\n onChange={handleSeeAllLocales}\n color=\"text\"\n size=\"sm\"\n className=\"!w-60\"\n choices={[\n {\n content: seeAllLocalesSwitch.true.value,\n value: true,\n },\n {\n content: seeAllLocalesSwitch.false.value,\n value: false,\n },\n ]}\n />\n </div>\n )}\n\n {!(isMultilingual && seeAllLocales) && (\n <>\n <div className=\"p-3\">\n <Input\n type=\"search\"\n aria-label={searchInput.ariaLabel.value}\n placeholder={searchInput.placeholder.value}\n onChange={(e) => handleSearch(e.target.value)}\n ref={inputRef}\n />\n </div>\n <ol className=\"divide-text/20 divide-y divide-dashed overflow-y-auto p-1\">\n {results.map(\n ({\n locale: localeItem,\n currentLocaleName,\n ownLocaleName,\n }) => (\n <li className=\"px-1.5 py-1\" key={localeItem}>\n <Button\n onClick={() => handleClickLocale(localeItem)}\n label={`${switchTo} ${currentLocaleName}`}\n disabled={\n !(availableLocales ?? availableLocales).includes(\n localeItem\n )\n }\n isActive={selectedLocales.includes(localeItem)}\n variant=\"hoverable\"\n color=\"text\"\n isFullWidth\n textAlign=\"left\"\n size=\"sm\"\n >\n <div className=\"flex flex-row items-center justify-between gap-3 px-2 py-1\">\n {isMultilingual && (\n <div className=\"w-4\">\n {selectedLocales.includes(localeItem) && (\n <Check className=\"size-full\" />\n )}\n </div>\n )}\n <div className=\"flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1\">\n <div className=\"flex flex-col text-nowrap\">\n <span\n dir={getHTMLTextDir(localeItem)}\n lang={localeItem}\n >\n {ownLocaleName}\n </span>\n <span className=\"text-neutral text-xs\">\n {currentLocaleName}\n </span>\n </div>\n <span className=\"text-neutral text-sm\">\n {localeItem.toUpperCase()}\n </span>\n </div>\n </div>\n </Button>\n </li>\n )\n )}\n </ol>\n </>\n )}\n </Container>\n </DropDown.Panel>\n </DropDown>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAM,sBAAsB;AASrB,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA,iBAAiB;AACnB,MAAM;AACE,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACE,cAAc,qBAAqB;AACjC,QAAA,WAAW,OAAyB,IAAI;AACxC,QAAA,EAAE,OAAO,IAAI,UAAU;AAC7B,QAAM,EAA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I,WAAU,OACZ,UAAgB,gBAAA,SAAS,UAAU,KACjC,oBAAA,OAAA,EAAM,WAAU,YAAY,CAAA,GAEjC;AAAA,4BAEF,qBAAC,OAAI,EAAA,WAAU,qEACb,UAAA;AAAA,8BAAC,qBAAA,OAAA,EAAI,WAAU,6BACb,UAAA;AAAA,gCAAA;AAAA,kCAAC;AAAA,kCAAA;AAAA,oCACC,KAAK,eAAe,UAAU;AAAA,oCAC9B,MAAM;AAAA,oCAEL,UAAA;AAAA,kCAAA;AAAA,gCACH;AAAA,gCACC,oBAAA,QAAA,EAAK,WAAU,wBACb,UACH,kBAAA,CAAA;AAAA,8BAAA,GACF;AAAA,kDACC,QAAK,EAAA,WAAU,wBACb,UAAA,WAAW,cACd,CAAA;AAAA,4BAAA,EACF,CAAA;AAAA,0BAAA,EACF,CAAA;AAAA,wBAAA;AAAA,2BAxC6B,UA0CjC;AAAA,oBAAA,EAGN,CAAA;AAAA,kBAAA,EACF,CAAA;AAAA,gBAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAEJ;AAAA,QAAA;AAAA,MACF,EACF,CAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"LocaleSwitcherContent.mjs","sources":["../../../src/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.tsx"],"sourcesContent":["'use client';\n\nimport { Locales, type LocalesValues } from '@intlayer/config/client';\nimport { getHTMLTextDir, getLocaleName } from '@intlayer/core';\nimport Fuse, { type IFuseOptions } from 'fuse.js';\nimport { Check, Globe, MoveVertical } from 'lucide-react';\nimport { useCallback, useMemo, useRef, useState, type FC } from 'react';\nimport { useDictionary, useLocale } from 'react-intlayer';\nimport { usePersistedStore } from '../../hooks';\nimport { Button } from '../Button';\nimport { Container } from '../Container';\nimport { DropDown, type PanelProps } from '../DropDown';\nimport { Input } from '../Input';\nimport { SwitchSelector } from '../SwitchSelector';\nimport localeSwitcherContent from './localeSwitcher.content';\nimport { useLocaleSwitcherContent } from './LocaleSwitcherContentContext';\n\nexport type LocaleSwitcherContentProps = {\n panelProps?: Omit<PanelProps, 'identifier'>;\n isMultilingual?: boolean;\n};\n\nconst DROPDOWN_IDENTIFIER = 'locale-switcher-content';\n\ntype MultilingualAvailableLocales = {\n locale: LocalesValues;\n englishName: string;\n currentLocaleName: string;\n ownLocaleName: string;\n};\n\nexport const LocaleSwitcherContent: FC<LocaleSwitcherContentProps> = ({\n panelProps,\n isMultilingual = true,\n}) => {\n const {\n switchTo,\n searchInput,\n localeSwitcherLabel,\n languageListLabel,\n seeAllLocalesSwitch,\n } = useDictionary(localeSwitcherContent);\n const inputRef = useRef<HTMLInputElement>(null);\n const { locale } = useLocale();\n const { availableLocales, selectedLocales, setSelectedLocales } =\n useLocaleSwitcherContent();\n\n const multilingualAvailableLocales: MultilingualAvailableLocales[] = useMemo(\n () =>\n availableLocales.map((localeEl) => {\n const englishName = getLocaleName(localeEl, Locales.ENGLISH);\n const currentLocaleName = getLocaleName(localeEl, locale);\n const ownLocaleName = getLocaleName(localeEl);\n return {\n locale: localeEl,\n englishName,\n currentLocaleName,\n ownLocaleName,\n };\n }),\n [availableLocales, locale]\n );\n\n const [results, setResults] = useState<MultilingualAvailableLocales[]>(\n multilingualAvailableLocales\n );\n const [seeAllLocales, setSeeAllLocales] = usePersistedStore(\n 'locale-content-selector-see-all-locales',\n false\n );\n\n // Create a new Fuse instance with the options and documentation data\n const fuse = useMemo(() => {\n const fuseOptions: IFuseOptions<MultilingualAvailableLocales> = {\n keys: [\n { name: 'ownLocaleName', weight: 0.4 },\n { name: 'englishName', weight: 0.2 },\n { name: 'currentLocaleName', weight: 0.2 },\n { name: 'locale', weight: 0.2 },\n ],\n threshold: 0.02, // Defines how fuzzy the matching should be (lower is more strict)\n };\n\n return new Fuse(multilingualAvailableLocales, fuseOptions);\n }, [multilingualAvailableLocales]);\n\n const handleSearch = useCallback(\n (searchQuery: string) => {\n if (searchQuery) {\n // Perform search on every input change\n const searchResults = fuse\n .search(searchQuery)\n .map((result) => result.item);\n setResults(searchResults);\n } else {\n setResults(multilingualAvailableLocales);\n }\n },\n [fuse, multilingualAvailableLocales]\n );\n\n const handleClickLocale = (localeItem: LocalesValues) => {\n if (isMultilingual) {\n if (selectedLocales.includes(localeItem)) {\n if (selectedLocales.length > 1) {\n setSelectedLocales((prev) => prev.filter((el) => el !== localeItem));\n }\n } else {\n setSelectedLocales((prev) => [...prev, localeItem]);\n }\n } else {\n setSelectedLocales([localeItem]);\n }\n };\n\n const handleSeeAllLocales = (value: boolean) => {\n setSeeAllLocales(value);\n if (value) {\n setSelectedLocales(availableLocales);\n } else {\n setSelectedLocales([locale]);\n }\n };\n\n return (\n <div\n className=\"border-text text-text rounded-xl border transition-colors\"\n aria-label={localeSwitcherLabel.value}\n >\n <DropDown identifier={DROPDOWN_IDENTIFIER}>\n <DropDown.Trigger identifier={DROPDOWN_IDENTIFIER}>\n <div className=\"flex w-full items-center justify-between\">\n <div className=\"px-2 py-1\">\n <Globe size={18} />\n </div>\n <MoveVertical className=\"self-center\" size={18} />\n </div>\n </DropDown.Trigger>\n\n <DropDown.Panel\n identifier={DROPDOWN_IDENTIFIER}\n isOverable\n isFocusable\n className=\"left-auto right-0\"\n {...panelProps}\n >\n <Container\n className=\"max-h-[80vh] min-w-28\"\n separator=\"y\"\n role=\"listbox\"\n transparency=\"sm\"\n border\n roundedSize=\"2xl\"\n borderColor=\"text\"\n aria-label={languageListLabel.value}\n >\n {isMultilingual && (\n <div className=\"m-auto p-2\">\n <SwitchSelector\n defaultValue={false}\n onChange={handleSeeAllLocales}\n color=\"text\"\n size=\"sm\"\n className=\"!w-60\"\n choices={[\n {\n content: seeAllLocalesSwitch.true.value,\n value: true,\n },\n {\n content: seeAllLocalesSwitch.false.value,\n value: false,\n },\n ]}\n />\n </div>\n )}\n\n {!(isMultilingual && seeAllLocales) && (\n <>\n <div className=\"p-3\">\n <Input\n type=\"search\"\n aria-label={searchInput.ariaLabel.value}\n placeholder={searchInput.placeholder.value}\n onChange={(e) => handleSearch(e.target.value)}\n ref={inputRef}\n />\n </div>\n <ol className=\"divide-text/20 divide-y divide-dashed overflow-y-auto p-1\">\n {results.map(\n ({\n locale: localeItem,\n currentLocaleName,\n ownLocaleName,\n }) => (\n <li className=\"px-1.5 py-1\" key={localeItem}>\n <Button\n onClick={() => handleClickLocale(localeItem)}\n label={`${switchTo} ${currentLocaleName}`}\n disabled={\n !(availableLocales ?? availableLocales).includes(\n localeItem\n )\n }\n isActive={selectedLocales.includes(localeItem)}\n variant=\"hoverable\"\n color=\"text\"\n isFullWidth\n textAlign=\"left\"\n size=\"sm\"\n >\n <div className=\"flex flex-row items-center justify-between gap-3 px-2 py-1\">\n {isMultilingual && (\n <div className=\"w-4\">\n {selectedLocales.includes(localeItem) && (\n <Check className=\"size-full\" />\n )}\n </div>\n )}\n <div className=\"flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1\">\n <div className=\"flex flex-col text-nowrap\">\n <span\n dir={getHTMLTextDir(localeItem)}\n lang={localeItem}\n >\n {ownLocaleName}\n </span>\n <span className=\"text-neutral text-xs\">\n {currentLocaleName}\n </span>\n </div>\n <span className=\"text-neutral text-sm\">\n {localeItem.toUpperCase()}\n </span>\n </div>\n </div>\n </Button>\n </li>\n )\n )}\n </ol>\n </>\n )}\n </Container>\n </DropDown.Panel>\n </DropDown>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAM,sBAAsB;AASrB,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA,iBAAiB;AACnB,MAAM;AACJ,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACE,cAAc,qBAAqB;AACvC,QAAM,WAAW,OAAyB,IAAI;AAC9C,QAAM,EAAE,OAAA,IAAW,UAAA;AACnB,QAAM,EAAE,kBAAkB,iBAAiB,mBAAA,IACzC,yBAAA;AAEF,QAAM,+BAA+D;AAAA,I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AC,OAAA,EAAM,WAAU,YAAA,CAAY,GAEjC;AAAA,4BAEF,qBAAC,OAAA,EAAI,WAAU,qEACb,UAAA;AAAA,8BAAA,qBAAC,OAAA,EAAI,WAAU,6BACb,UAAA;AAAA,gCAAA;AAAA,kCAAC;AAAA,kCAAA;AAAA,oCACC,KAAK,eAAe,UAAU;AAAA,oCAC9B,MAAM;AAAA,oCAEL,UAAA;AAAA,kCAAA;AAAA,gCAAA;AAAA,gCAEH,oBAAC,QAAA,EAAK,WAAU,wBACb,UAAA,kBAAA,CACH;AAAA,8BAAA,GACF;AAAA,kDACC,QAAA,EAAK,WAAU,wBACb,UAAA,WAAW,cAAY,CAC1B;AAAA,4BAAA,EAAA,CACF;AAAA,0BAAA,EAAA,CACF;AAAA,wBAAA;AAAA,sBAAA,KAxC6B,UA0CjC;AAAA,oBAAA,EAEJ,CACF;AAAA,kBAAA,EAAA,CACF;AAAA,gBAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAEJ;AAAA,QAAA;AAAA,MACF,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocaleSwitcherContentContext.cjs","sources":["../../../src/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.tsx"],"sourcesContent":["'use client';\n\nimport type { LocalesValues } from 'intlayer';\nimport {\n createContext,\n useContext,\n type Dispatch,\n type PropsWithChildren,\n type SetStateAction,\n type FC,\n} from 'react';\nimport { useLocale } from 'react-intlayer';\nimport { usePersistedStore } from '../../hooks';\n\ntype LocaleSwitcherContentContextProps = {\n availableLocales: LocalesValues[];\n selectedLocales: LocalesValues[];\n setSelectedLocales: Dispatch<SetStateAction<LocalesValues[]>>;\n};\n\nconst LocaleSwitcherContentContext =\n createContext<LocaleSwitcherContentContextProps>({\n availableLocales: [],\n selectedLocales: [],\n setSelectedLocales: () => {},\n });\n\nexport const useLocaleSwitcherContent = () =>\n useContext(LocaleSwitcherContentContext);\n\ntype LocaleSwitcherContentProviderProps = {\n availableLocales: LocalesValues[];\n defaultSelectedLocales?: LocalesValues[];\n};\n\nexport const LocaleSwitcherContentProvider: FC<\n PropsWithChildren<LocaleSwitcherContentProviderProps>\n> = ({ availableLocales, defaultSelectedLocales, children }) => {\n const { locale } = useLocale();\n\n const [selectedLocales, setSelectedLocales] = usePersistedStore<\n LocalesValues[]\n >(\n 'locale-content-selector-selected-locales',\n defaultSelectedLocales ?? [locale]\n );\n\n return (\n <LocaleSwitcherContentContext\n value={{\n availableLocales,\n selectedLocales,\n setSelectedLocales,\n }}\n >\n {children}\n </LocaleSwitcherContentContext>\n );\n};\n"],"names":["createContext","useContext","useLocale","usePersistedStore","jsx"],"mappings":";;;;;;;;;;;;;;;AAoBA,MAAM,+BACJA,aAAAA,cAAiD;AAAA,EAC/C,kBAAkB,
|
|
1
|
+
{"version":3,"file":"LocaleSwitcherContentContext.cjs","sources":["../../../src/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.tsx"],"sourcesContent":["'use client';\n\nimport type { LocalesValues } from 'intlayer';\nimport {\n createContext,\n useContext,\n type Dispatch,\n type PropsWithChildren,\n type SetStateAction,\n type FC,\n} from 'react';\nimport { useLocale } from 'react-intlayer';\nimport { usePersistedStore } from '../../hooks';\n\ntype LocaleSwitcherContentContextProps = {\n availableLocales: LocalesValues[];\n selectedLocales: LocalesValues[];\n setSelectedLocales: Dispatch<SetStateAction<LocalesValues[]>>;\n};\n\nconst LocaleSwitcherContentContext =\n createContext<LocaleSwitcherContentContextProps>({\n availableLocales: [],\n selectedLocales: [],\n setSelectedLocales: () => {},\n });\n\nexport const useLocaleSwitcherContent = () =>\n useContext(LocaleSwitcherContentContext);\n\ntype LocaleSwitcherContentProviderProps = {\n availableLocales: LocalesValues[];\n defaultSelectedLocales?: LocalesValues[];\n};\n\nexport const LocaleSwitcherContentProvider: FC<\n PropsWithChildren<LocaleSwitcherContentProviderProps>\n> = ({ availableLocales, defaultSelectedLocales, children }) => {\n const { locale } = useLocale();\n\n const [selectedLocales, setSelectedLocales] = usePersistedStore<\n LocalesValues[]\n >(\n 'locale-content-selector-selected-locales',\n defaultSelectedLocales ?? [locale]\n );\n\n return (\n <LocaleSwitcherContentContext\n value={{\n availableLocales,\n selectedLocales,\n setSelectedLocales,\n }}\n >\n {children}\n </LocaleSwitcherContentContext>\n );\n};\n"],"names":["createContext","useContext","useLocale","usePersistedStore","jsx"],"mappings":";;;;;;;;;;;;;;;AAoBA,MAAM,+BACJA,aAAAA,cAAiD;AAAA,EAC/C,kBAAkB,CAAA;AAAA,EAClB,iBAAiB,CAAA;AAAA,EACjB,oBAAoB,MAAM;AAAA,EAAC;AAC7B,CAAC;AAEI,MAAM,2BAA2B,MACtCC,aAAAA,WAAW,4BAA4B;AAOlC,MAAM,gCAET,CAAC,EAAE,kBAAkB,wBAAwB,eAAe;AAC9D,QAAM,EAAE,OAAA,IAAWC,wBAAA;AAEnB,QAAM,CAAC,iBAAiB,kBAAkB,IAAIC,wBAAAA;AAAAA,IAG5C;AAAA,IACA,0BAA0B,CAAC,MAAM;AAAA,EAAA;AAGnC,SACEC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,MAGD;AAAA,IAAA;AAAA,EAAA;AAGP;;;"}
|