@intlayer/design-system 3.5.3 → 3.5.5
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 +1 -1
- package/dist/.vite/manifest.json +274 -125
- package/dist/CopyButton-Cxu3goRg.cjs +59 -0
- package/dist/CopyButton-Cxu3goRg.cjs.map +1 -0
- package/dist/CopyButton-DlcDlf6U.js +60 -0
- package/dist/CopyButton-DlcDlf6U.js.map +1 -0
- package/dist/components/Auth/AuthModal/index.cjs +4 -0
- package/dist/components/Auth/AuthModal/index.cjs.map +1 -1
- package/dist/components/Auth/AuthModal/index.mjs +4 -0
- package/dist/components/Auth/AuthModal/index.mjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs +5 -4
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.d.ts +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.d.ts.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs +5 -4
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.cjs +170 -0
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.cjs.map +1 -0
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.d.ts +26 -0
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.d.ts.map +1 -0
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.mjs +170 -0
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.mjs.map +1 -0
- package/dist/components/Auth/ChangePasswordForm/index.cjs +2 -2
- package/dist/components/Auth/ChangePasswordForm/index.d.ts +1 -1
- package/dist/components/Auth/ChangePasswordForm/index.d.ts.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/index.mjs +2 -2
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.cjs +37 -0
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.cjs.map +1 -0
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.cjs +131 -0
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.cjs.map +1 -0
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.d.ts +15 -0
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.d.ts.map +1 -0
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.mjs +131 -0
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.mjs.map +1 -0
- package/dist/components/Auth/ChangePasswordForm/{ChangePasswordSchema.d.ts → useChangePasswordSchema.d.ts} +3 -3
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.d.ts.map +1 -0
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.mjs +37 -0
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.mjs.map +1 -0
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs +11 -10
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.d.ts.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs +12 -11
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.cjs +86 -32
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.cjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.d.ts +13 -9
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.d.ts.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.mjs +85 -31
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.mjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs +5 -4
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.d.ts +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.d.ts.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs +5 -4
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/index.cjs +2 -2
- package/dist/components/Auth/ResetPasswordForm/index.d.ts +1 -1
- package/dist/components/Auth/ResetPasswordForm/index.d.ts.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/index.mjs +2 -2
- package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.cjs +123 -0
- package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.cjs.map +1 -0
- package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.d.ts +21 -0
- package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.d.ts.map +1 -0
- package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.mjs +123 -0
- package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.mjs.map +1 -0
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.cjs +16 -0
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.cjs.map +1 -0
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.cjs +56 -0
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.cjs.map +1 -0
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.d.ts +10 -0
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.d.ts.map +1 -0
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.mjs +56 -0
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.mjs.map +1 -0
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.d.ts +10 -0
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.d.ts.map +1 -0
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.mjs +16 -0
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.mjs.map +1 -0
- package/dist/components/Auth/SignInForm/SignInForm.cjs +22 -15
- package/dist/components/Auth/SignInForm/SignInForm.cjs.map +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.d.ts +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.d.ts.map +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.mjs +22 -15
- package/dist/components/Auth/SignInForm/SignInForm.mjs.map +1 -1
- package/dist/components/Auth/SignInForm/index.cjs +2 -2
- package/dist/components/Auth/SignInForm/index.d.ts +1 -1
- package/dist/components/Auth/SignInForm/index.d.ts.map +1 -1
- package/dist/components/Auth/SignInForm/index.mjs +2 -2
- package/dist/components/Auth/SignInForm/signIn.content.cjs +217 -0
- package/dist/components/Auth/SignInForm/signIn.content.cjs.map +1 -0
- package/dist/components/Auth/SignInForm/signIn.content.d.ts +31 -0
- package/dist/components/Auth/SignInForm/signIn.content.d.ts.map +1 -0
- package/dist/components/Auth/SignInForm/signIn.content.mjs +217 -0
- package/dist/components/Auth/SignInForm/signIn.content.mjs.map +1 -0
- package/dist/components/Auth/SignInForm/useSignInSchema.cjs +25 -0
- package/dist/components/Auth/SignInForm/useSignInSchema.cjs.map +1 -0
- package/dist/components/Auth/SignInForm/useSignInSchema.content.cjs +71 -0
- package/dist/components/Auth/SignInForm/useSignInSchema.content.cjs.map +1 -0
- package/dist/components/Auth/SignInForm/useSignInSchema.content.d.ts +11 -0
- package/dist/components/Auth/SignInForm/useSignInSchema.content.d.ts.map +1 -0
- package/dist/components/Auth/SignInForm/useSignInSchema.content.mjs +71 -0
- package/dist/components/Auth/SignInForm/useSignInSchema.content.mjs.map +1 -0
- package/dist/components/Auth/SignInForm/{SignInSchema.d.ts → useSignInSchema.d.ts} +3 -3
- package/dist/components/Auth/SignInForm/useSignInSchema.d.ts.map +1 -0
- package/dist/components/Auth/SignInForm/useSignInSchema.mjs +25 -0
- package/dist/components/Auth/SignInForm/useSignInSchema.mjs.map +1 -0
- package/dist/components/Auth/SignUpForm/SignUpForm.cjs +4 -4
- package/dist/components/Auth/SignUpForm/SignUpForm.cjs.map +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.d.ts +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.d.ts.map +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.mjs +3 -3
- package/dist/components/Auth/SignUpForm/SignUpForm.mjs.map +1 -1
- package/dist/components/Auth/SignUpForm/index.cjs +2 -2
- package/dist/components/Auth/SignUpForm/index.d.ts +1 -1
- package/dist/components/Auth/SignUpForm/index.d.ts.map +1 -1
- package/dist/components/Auth/SignUpForm/index.mjs +2 -2
- package/dist/components/Auth/SignUpForm/signUpForm.content.cjs +182 -0
- package/dist/components/Auth/SignUpForm/signUpForm.content.cjs.map +1 -0
- package/dist/components/Auth/SignUpForm/signUpForm.content.d.ts +24 -0
- package/dist/components/Auth/SignUpForm/signUpForm.content.d.ts.map +1 -0
- package/dist/components/Auth/SignUpForm/signUpForm.content.mjs +182 -0
- package/dist/components/Auth/SignUpForm/signUpForm.content.mjs.map +1 -0
- package/dist/components/Auth/SignUpForm/useSignUpSchema.cjs +36 -0
- package/dist/components/Auth/SignUpForm/useSignUpSchema.cjs.map +1 -0
- package/dist/components/Auth/SignUpForm/useSignUpSchema.content.cjs +116 -0
- package/dist/components/Auth/SignUpForm/useSignUpSchema.content.cjs.map +1 -0
- package/dist/components/Auth/SignUpForm/useSignUpSchema.content.d.ts +14 -0
- package/dist/components/Auth/SignUpForm/useSignUpSchema.content.d.ts.map +1 -0
- package/dist/components/Auth/SignUpForm/useSignUpSchema.content.mjs +116 -0
- package/dist/components/Auth/SignUpForm/useSignUpSchema.content.mjs.map +1 -0
- package/dist/components/Auth/SignUpForm/{SignUpSchema.d.ts → useSignUpSchema.d.ts} +3 -3
- package/dist/components/Auth/SignUpForm/useSignUpSchema.d.ts.map +1 -0
- package/dist/components/Auth/SignUpForm/useSignUpSchema.mjs +36 -0
- package/dist/components/Auth/SignUpForm/useSignUpSchema.mjs.map +1 -0
- package/dist/components/Auth/index.cjs +8 -8
- package/dist/components/Auth/index.mjs +8 -8
- package/dist/components/Auth/useAuth/useSession.cjs +1 -0
- package/dist/components/Auth/useAuth/useSession.cjs.map +1 -1
- package/dist/components/Auth/useAuth/useSession.mjs +1 -0
- package/dist/components/Auth/useAuth/useSession.mjs.map +1 -1
- package/dist/components/Breadcrumb/breadcrumb.content.cjs +26 -0
- package/dist/components/Breadcrumb/breadcrumb.content.cjs.map +1 -0
- package/dist/components/Breadcrumb/breadcrumb.content.d.ts +8 -0
- package/dist/components/Breadcrumb/breadcrumb.content.d.ts.map +1 -0
- package/dist/components/Breadcrumb/breadcrumb.content.mjs +26 -0
- package/dist/components/Breadcrumb/breadcrumb.content.mjs.map +1 -0
- package/dist/components/Breadcrumb/index.cjs +103 -34
- package/dist/components/Breadcrumb/index.cjs.map +1 -1
- package/dist/components/Breadcrumb/index.d.ts +6 -2
- package/dist/components/Breadcrumb/index.d.ts.map +1 -1
- package/dist/components/Breadcrumb/index.mjs +103 -34
- package/dist/components/Breadcrumb/index.mjs.map +1 -1
- package/dist/components/Button/Button.cjs +7 -8
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.mjs +7 -8
- package/dist/components/Button/Button.mjs.map +1 -1
- package/dist/components/Container/index.cjs +2 -2
- package/dist/components/Container/index.cjs.map +1 -1
- package/dist/components/Container/index.mjs +2 -2
- package/dist/components/Container/index.mjs.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
- package/dist/components/DictionaryEditor/index.cjs +4 -0
- package/dist/components/DictionaryEditor/index.cjs.map +1 -1
- package/dist/components/DictionaryEditor/index.mjs +4 -0
- package/dist/components/DictionaryEditor/index.mjs.map +1 -1
- package/dist/components/DictionaryEditor/useEditedContentStore.cjs +3 -0
- package/dist/components/DictionaryEditor/useEditedContentStore.cjs.map +1 -1
- package/dist/components/DictionaryEditor/useEditedContentStore.d.ts +2 -2
- package/dist/components/DictionaryEditor/useEditedContentStore.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/useEditedContentStore.mjs +3 -0
- package/dist/components/DictionaryEditor/useEditedContentStore.mjs.map +1 -1
- package/dist/components/DictionaryEditor/useEditionPanelStore.cjs.map +1 -1
- package/dist/components/DictionaryEditor/useEditionPanelStore.d.ts +1 -1
- package/dist/components/DictionaryEditor/useEditionPanelStore.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/useEditionPanelStore.mjs.map +1 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs +60 -6
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs.map +1 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs +60 -6
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs +7 -5
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs +7 -5
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.cjs +22 -2
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.mjs +22 -2
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +14 -6
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +14 -6
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.cjs +151 -21
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs +151 -21
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.cjs +27 -0
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.cjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.cjs +71 -0
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.cjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.d.ts +11 -0
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.mjs +71 -0
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/{dictionaryFormSchema.d.ts → useDictionaryFormSchema.d.ts} +3 -3
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.mjs +27 -0
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +24 -16
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +24 -16
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs +176 -16
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs +176 -16
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs +44 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs +176 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts +17 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs +176 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/{DictionaryDetailsSchema.d.ts → useDictionaryDetailsSchema.d.ts} +3 -3
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts.map +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs +44 -0
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs.map +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +6 -3
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +6 -3
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/JSONEditor.cjs +20 -18
- package/dist/components/DictionaryFieldEditor/JSONEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/JSONEditor.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/JSONEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/JSONEditor.mjs +20 -18
- package/dist/components/DictionaryFieldEditor/JSONEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.cjs +10 -2
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.d.ts +2 -0
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs +10 -2
- package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs +121 -11
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs +121 -11
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeEditor.cjs +10 -14
- package/dist/components/DictionaryFieldEditor/NodeEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeEditor.mjs +10 -14
- package/dist/components/DictionaryFieldEditor/NodeEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +63 -20
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +66 -23
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +98 -6
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +4 -0
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +98 -6
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.cjs +44 -4
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs +44 -4
- package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/editorView.content.cjs +77 -7
- package/dist/components/DictionaryFieldEditor/editorView.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/editorView.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/editorView.content.mjs +77 -7
- package/dist/components/DictionaryFieldEditor/editorView.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs +66 -6
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs +66 -6
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs.map +1 -1
- package/dist/components/DropDown/index.cjs.map +1 -1
- package/dist/components/DropDown/index.d.ts +18 -1
- package/dist/components/DropDown/index.d.ts.map +1 -1
- package/dist/components/DropDown/index.mjs.map +1 -1
- package/dist/components/Headers/index.cjs +1 -1
- package/dist/components/Headers/index.cjs.map +1 -1
- package/dist/components/Headers/index.mjs +1 -1
- package/dist/components/Headers/index.mjs.map +1 -1
- package/dist/components/IDE/CodeRender copy.cjs +141 -0
- package/dist/components/IDE/CodeRender copy.cjs.map +1 -0
- package/dist/components/IDE/CodeRender copy.d.ts +14 -0
- package/dist/components/IDE/CodeRender copy.d.ts.map +1 -0
- package/dist/components/IDE/CodeRender copy.mjs +141 -0
- package/dist/components/IDE/CodeRender copy.mjs.map +1 -0
- package/dist/components/IDE/CodeRender.cjs +39 -625
- package/dist/components/IDE/CodeRender.cjs.map +1 -1
- package/dist/components/IDE/CodeRender.d.ts +4 -5
- package/dist/components/IDE/CodeRender.d.ts.map +1 -1
- package/dist/components/IDE/CodeRender.mjs +40 -604
- package/dist/components/IDE/CodeRender.mjs.map +1 -1
- package/dist/components/IDE/CopyButton.cjs +40 -0
- package/dist/components/IDE/CopyButton.cjs.map +1 -0
- package/dist/components/IDE/CopyButton.content.cjs +26 -0
- package/dist/components/IDE/CopyButton.content.cjs.map +1 -0
- package/dist/components/IDE/CopyButton.content.d.ts +8 -0
- package/dist/components/IDE/CopyButton.content.d.ts.map +1 -0
- package/dist/components/IDE/CopyButton.content.mjs +26 -0
- package/dist/components/IDE/CopyButton.content.mjs.map +1 -0
- package/dist/components/IDE/CopyButton.d.ts +7 -0
- package/dist/components/IDE/CopyButton.d.ts.map +1 -0
- package/dist/components/IDE/CopyButton.mjs +40 -0
- package/dist/components/IDE/CopyButton.mjs.map +1 -0
- package/dist/components/IDE/IDE.cjs +1 -1
- package/dist/components/IDE/IDE.cjs.map +1 -1
- package/dist/components/IDE/IDE.mjs +1 -1
- package/dist/components/IDE/IDE.mjs.map +1 -1
- package/dist/components/IDE/MarkDownRender.cjs +10 -2
- package/dist/components/IDE/MarkDownRender.cjs.map +1 -1
- package/dist/components/IDE/MarkDownRender.d.ts.map +1 -1
- package/dist/components/IDE/MarkDownRender.mjs +10 -2
- package/dist/components/IDE/MarkDownRender.mjs.map +1 -1
- package/dist/components/IDE/MonacoCode.cjs +129 -0
- package/dist/components/IDE/MonacoCode.cjs.map +1 -0
- package/dist/components/IDE/MonacoCode.d.ts +14 -0
- package/dist/components/IDE/MonacoCode.d.ts.map +1 -0
- package/dist/components/IDE/MonacoCode.mjs +129 -0
- package/dist/components/IDE/MonacoCode.mjs.map +1 -0
- package/dist/components/Link/Link.cjs +50 -31
- package/dist/components/Link/Link.cjs.map +1 -1
- package/dist/components/Link/Link.d.ts +3 -0
- package/dist/components/Link/Link.d.ts.map +1 -1
- package/dist/components/Link/Link.mjs +51 -32
- package/dist/components/Link/Link.mjs.map +1 -1
- package/dist/components/Link/index.cjs +1 -0
- package/dist/components/Link/index.cjs.map +1 -1
- package/dist/components/Link/index.mjs +3 -2
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs +122 -42
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts +2 -0
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +123 -43
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.cjs +86 -0
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.cjs.map +1 -0
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts +14 -0
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts.map +1 -0
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs +87 -0
- package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs.map +1 -0
- package/dist/components/MarkDownRender/index.cjs +4 -2
- package/dist/components/MarkDownRender/index.cjs.map +1 -1
- package/dist/components/MarkDownRender/index.d.ts +3 -1
- package/dist/components/MarkDownRender/index.d.ts.map +1 -1
- package/dist/components/MarkDownRender/index.mjs +4 -2
- package/dist/components/MarkDownRender/index.mjs.map +1 -1
- package/dist/components/Modal/Modal.cjs +8 -10
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.mjs +8 -10
- package/dist/components/Modal/Modal.mjs.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.cjs +1 -1
- package/dist/components/Navbar/DesktopNavbar.cjs.map +1 -1
- package/dist/components/Navbar/DesktopNavbar.mjs +1 -1
- package/dist/components/Navbar/DesktopNavbar.mjs.map +1 -1
- package/dist/components/index.cjs +13 -8
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.mjs +14 -9
- package/dist/components/index.mjs.map +1 -1
- package/dist/design-system.css +235 -0
- package/dist/hooks/index.cjs +6 -0
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.mjs +7 -1
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.cjs +8 -2
- package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.d.ts +4 -0
- package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs +8 -2
- package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
- package/dist/hooks/useAsync/index.cjs +3 -0
- package/dist/hooks/useAsync/index.cjs.map +1 -1
- package/dist/hooks/useAsync/index.d.ts +1 -0
- package/dist/hooks/useAsync/index.d.ts.map +1 -1
- package/dist/hooks/useAsync/index.mjs +4 -1
- package/dist/hooks/useAsync/index.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.cjs +2 -9
- package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.d.ts.map +1 -1
- package/dist/hooks/useAsync/useAsync.mjs +3 -10
- package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.cjs +123 -69
- package/dist/hooks/useAsync/useAsyncStateStore.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.d.ts +35 -11
- package/dist/hooks/useAsync/useAsyncStateStore.d.ts.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.mjs +123 -69
- package/dist/hooks/useAsync/useAsyncStateStore.mjs.map +1 -1
- package/dist/hooks/useIntlayerAPI.d.ts +3 -0
- package/dist/hooks/useIntlayerAPI.d.ts.map +1 -1
- package/dist/hooks/useIsDarkMode.cjs +15 -0
- package/dist/hooks/useIsDarkMode.cjs.map +1 -0
- package/dist/hooks/useIsDarkMode.d.ts +2 -0
- package/dist/hooks/useIsDarkMode.d.ts.map +1 -0
- package/dist/hooks/useIsDarkMode.mjs +15 -0
- package/dist/hooks/useIsDarkMode.mjs.map +1 -0
- package/dist/libs/intlayer-api/ai.cjs +24 -0
- package/dist/libs/intlayer-api/ai.cjs.map +1 -0
- package/dist/libs/intlayer-api/ai.d.ts +10 -0
- package/dist/libs/intlayer-api/ai.d.ts.map +1 -0
- package/dist/libs/intlayer-api/ai.mjs +24 -0
- package/dist/libs/intlayer-api/ai.mjs.map +1 -0
- package/dist/libs/intlayer-api/index.cjs +3 -1
- package/dist/libs/intlayer-api/index.cjs.map +1 -1
- package/dist/libs/intlayer-api/index.d.ts +6 -0
- package/dist/libs/intlayer-api/index.d.ts.map +1 -1
- package/dist/libs/intlayer-api/index.mjs +3 -1
- package/dist/libs/intlayer-api/index.mjs.map +1 -1
- package/dist/tailwind.css +1 -1
- package/package.json +19 -16
- package/dist/__vite-browser-external-SDi5tJh6.cjs +0 -4
- package/dist/__vite-browser-external-SDi5tJh6.cjs.map +0 -1
- package/dist/__vite-browser-external-r74dyCO2.js +0 -5
- package/dist/__vite-browser-external-r74dyCO2.js.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.cjs +0 -66
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.cjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.d.ts.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.mjs +0 -66
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.mjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/index.content.cjs +0 -67
- package/dist/components/Auth/ChangePasswordForm/index.content.cjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/index.content.d.ts +0 -23
- package/dist/components/Auth/ChangePasswordForm/index.content.d.ts.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/index.content.mjs +0 -67
- package/dist/components/Auth/ChangePasswordForm/index.content.mjs.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.cjs +0 -29
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.cjs.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.d.ts +0 -10
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.d.ts.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.mjs +0 -29
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.mjs.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/index.content.cjs +0 -50
- package/dist/components/Auth/ResetPasswordForm/index.content.cjs.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/index.content.d.ts +0 -18
- package/dist/components/Auth/ResetPasswordForm/index.content.d.ts.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/index.content.mjs +0 -50
- package/dist/components/Auth/ResetPasswordForm/index.content.mjs.map +0 -1
- package/dist/components/Auth/SignInForm/SignInSchema.cjs +0 -38
- package/dist/components/Auth/SignInForm/SignInSchema.cjs.map +0 -1
- package/dist/components/Auth/SignInForm/SignInSchema.d.ts.map +0 -1
- package/dist/components/Auth/SignInForm/SignInSchema.mjs +0 -38
- package/dist/components/Auth/SignInForm/SignInSchema.mjs.map +0 -1
- package/dist/components/Auth/SignInForm/index.content.cjs +0 -84
- package/dist/components/Auth/SignInForm/index.content.cjs.map +0 -1
- package/dist/components/Auth/SignInForm/index.content.d.ts +0 -28
- package/dist/components/Auth/SignInForm/index.content.d.ts.map +0 -1
- package/dist/components/Auth/SignInForm/index.content.mjs +0 -84
- package/dist/components/Auth/SignInForm/index.content.mjs.map +0 -1
- package/dist/components/Auth/SignUpForm/SignUpSchema.cjs +0 -61
- package/dist/components/Auth/SignUpForm/SignUpSchema.cjs.map +0 -1
- package/dist/components/Auth/SignUpForm/SignUpSchema.d.ts.map +0 -1
- package/dist/components/Auth/SignUpForm/SignUpSchema.mjs +0 -61
- package/dist/components/Auth/SignUpForm/SignUpSchema.mjs.map +0 -1
- package/dist/components/Auth/SignUpForm/index.content.cjs +0 -72
- package/dist/components/Auth/SignUpForm/index.content.cjs.map +0 -1
- package/dist/components/Auth/SignUpForm/index.content.d.ts +0 -24
- package/dist/components/Auth/SignUpForm/index.content.d.ts.map +0 -1
- package/dist/components/Auth/SignUpForm/index.content.mjs +0 -72
- package/dist/components/Auth/SignUpForm/index.content.mjs.map +0 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.cjs +0 -40
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.cjs.map +0 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.d.ts.map +0 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.mjs +0 -40
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.mjs.map +0 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.cjs +0 -85
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.cjs.map +0 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.d.ts.map +0 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.mjs +0 -85
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.mjs.map +0 -1
- package/dist/tailwind.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/Breadcrumb/index.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/Breadcrumb/index.tsx"],"sourcesContent":["'use client';\n\nimport { Locales } from '@intlayer/config/client';\nimport { ChevronRightIcon } from 'lucide-react';\nimport { Fragment, HTMLAttributes, type FC } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { cn } from '../../utils/cn';\nimport { Button, type ButtonProps } from '../Button';\nimport { Link, type LinkProps } from '../Link';\nimport { breadCrumbContent } from './breadcrumb.content';\n\ntype LinkLinkProps = {\n children: string;\n position: number;\n locale?: Locales;\n} & Omit<LinkProps, 'children' | 'label'>;\n\nconst LinkLink: FC<LinkLinkProps> = ({\n href,\n lang,\n children,\n onClick,\n color,\n position,\n locale,\n ...props\n}) => {\n const { linkLabel } = useDictionary(breadCrumbContent);\n\n return (\n <>\n <Link\n href={href}\n locale={locale}\n color={color}\n onClick={onClick}\n itemProp=\"item\"\n {...props}\n label={`${linkLabel} ${children}`}\n >\n <span itemProp=\"name\">{children}</span>\n </Link>\n <meta itemProp=\"position\" content={position.toString()} />\n </>\n );\n};\n\ntype ButtonButtonProps = {\n children: string;\n position: number;\n} & Omit<ButtonProps, 'children' | 'label'>;\n\nconst ButtonLink: FC<ButtonButtonProps> = ({\n children: text,\n onClick,\n color,\n position,\n ...props\n}) => {\n const { linkLabel } = useDictionary(breadCrumbContent);\n\n return (\n <>\n <Button\n onClick={onClick}\n variant=\"link\"\n label={`${linkLabel} ${text}`}\n color={color}\n itemProp=\"item\"\n {...props}\n >\n <span itemProp=\"name\">{text}</span>\n </Button>\n <meta itemProp=\"position\" content={position.toString()} />\n </>\n );\n};\n\ntype SpanProps = {\n children: string;\n position: number;\n} & HTMLAttributes<HTMLSpanElement>;\n\nconst Span: FC<SpanProps> = ({ children, position, ...props }) => (\n <>\n <div itemProp=\"item\">\n <span itemProp=\"name\" {...props}>\n {children}\n </span>\n </div>\n <meta itemProp=\"position\" content={position.toString()} />\n </>\n);\n\ntype DetailedBreadcrumbLink = {\n href?: string;\n text: string;\n onClick?: () => void;\n};\nexport type BreadcrumbLink = string | DetailedBreadcrumbLink;\n\nexport type BreadcrumbProps = {\n links: BreadcrumbLink[];\n color?:\n | 'primary'\n | 'destructive'\n | 'neutral'\n | 'light'\n | 'dark'\n | 'text'\n | 'custom';\n locale?: Locales;\n elementType?: 'page' | 'location';\n} & HTMLAttributes<HTMLOListElement>;\n\nexport const Breadcrumb: FC<BreadcrumbProps> = ({\n links,\n className,\n color = 'text',\n locale,\n elementType = 'page',\n ...props\n}) => (\n <nav aria-label=\"breadcrumb\">\n <ol\n className={cn(\n 'flex flex-row flex-wrap items-center gap-2 text-sm',\n className\n )}\n itemScope\n itemType=\"http://schema.org/BreadcrumbList\"\n {...props}\n >\n {links.map((link, index) => {\n const isLastLink = index === links.length - 1;\n const isLink =\n typeof link === 'object' && typeof link.href === 'string';\n const isButton =\n typeof link === 'object' && typeof link.onClick === 'function';\n const isActive = index === links.length - 1;\n const ariaCurrent = isActive ? elementType : undefined;\n\n const text = (link as DetailedBreadcrumbLink).text ?? link;\n\n let section = (\n <Span key={text} position={index + 1} aria-current={ariaCurrent}>\n {text}\n </Span>\n );\n\n if (isLink) {\n section = (\n <LinkLink\n key={text}\n href={link.href!}\n color={color}\n position={index + 1}\n locale={locale}\n aria-current={ariaCurrent}\n >\n {text}\n </LinkLink>\n );\n } else if (isButton) {\n section = (\n <ButtonLink\n key={text}\n onClick={link.onClick!}\n color={color}\n position={index + 1}\n aria-current={ariaCurrent}\n >\n {text}\n </ButtonLink>\n );\n }\n\n const listElement = (\n <li\n itemProp=\"itemListElement\"\n itemScope\n itemType=\"https://schema.org/ListItem\"\n key={text}\n >\n {section}\n </li>\n );\n\n if (isLastLink) {\n return listElement;\n }\n\n return (\n <Fragment key={text}>\n {listElement}\n <ChevronRightIcon size={10} />\n </Fragment>\n );\n })}\n </ol>\n </nav>\n);\n"],"names":["useDictionary","breadCrumbContent","jsxs","Fragment","jsx","Link","Button","cn","ChevronRightIcon"],"mappings":";;;;;;;;;;;AAkBA,MAAM,WAA8B,CAAC;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,UAAA,IAAcA,cAAA,cAAcC,0DAAiB;AAErD,SAEIC,2BAAA,kBAAA,KAAAC,uCAAA,EAAA,UAAA;AAAA,IAAAC,2BAAA,kBAAA;AAAA,MAACC,qBAAA;AAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAS;AAAA,QACR,GAAG;AAAA,QACJ,OAAO,GAAG,SAAS,IAAI,QAAQ;AAAA,QAE/B,UAACD,2BAAA,kBAAA,IAAA,QAAA,EAAK,UAAS,QAAQ,SAAS,CAAA;AAAA,MAAA;AAAA,IAClC;AAAA,qDACC,QAAK,EAAA,UAAS,YAAW,SAAS,SAAS,WAAY,CAAA;AAAA,EAAA,GAC1D;AAEJ;AAOA,MAAM,aAAoC,CAAC;AAAA,EACzC,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,UAAA,IAAcJ,cAAA,cAAcC,0DAAiB;AAErD,SAEIC,2BAAA,kBAAA,KAAAC,uCAAA,EAAA,UAAA;AAAA,IAAAC,2BAAA,kBAAA;AAAA,MAACE,yBAAA;AAAA,MAAA;AAAA,QACC;AAAA,QACA,SAAQ;AAAA,QACR,OAAO,GAAG,SAAS,IAAI,IAAI;AAAA,QAC3B;AAAA,QACA,UAAS;AAAA,QACR,GAAG;AAAA,QAEJ,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kBAAAH,2BAAA,kBAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YAEC,MAAM,KAAK;AAAA,YACX;AAAA,YACA,UAAU,QAAQ;AAAA,YAClB;AAAA,YACA,gBAAc;AAAA,YAEb,UAAA;AAAA,UAAA;AAAA,UAPI;AAAA,QAQP;AAAA,iBAEO,UAAU;AAEjB,kBAAAA,2BAAA,kBAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YAEC,SAAS,KAAK;AAAA,YACd;AAAA,YACA,UAAU,QAAQ;AAAA,YAClB,gBAAc;AAAA,YAEb,UAAA;AAAA,UAAA;AAAA,UANI;AAAA,QAOP;AAAA,MAAA;AAIJ,YAAM,cACJA,2BAAA,kBAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAS;AAAA,UACT,WAAS;AAAA,UACT,UAAS;AAAA,UAGR,UAAA;AAAA,QAAA;AAAA,QAFI;AAAA,MAGP;AAGF,UAAI,YAAY;AACP,eAAA;AAAA,MAAA;AAIP,aAAAF,2BAAA,kBAAA,KAACC,qBAAA,EACE,UAAA;AAAA,QAAA;AAAA,QACDC,2BAAAA,kBAAAA,IAACI,YAAiB,kBAAA,EAAA,MAAM,GAAI,CAAA;AAAA,MAAA,EAAA,GAFf,IAGf;AAAA,IAEH,CAAA;AAAA,EAAA;AACH,EACF,CAAA;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Locales } from '@intlayer/config/client';
|
|
1
2
|
import { HTMLAttributes, FC } from 'react';
|
|
2
3
|
type DetailedBreadcrumbLink = {
|
|
3
4
|
href?: string;
|
|
@@ -5,9 +6,12 @@ type DetailedBreadcrumbLink = {
|
|
|
5
6
|
onClick?: () => void;
|
|
6
7
|
};
|
|
7
8
|
export type BreadcrumbLink = string | DetailedBreadcrumbLink;
|
|
8
|
-
type BreadcrumbProps = {
|
|
9
|
+
export type BreadcrumbProps = {
|
|
9
10
|
links: BreadcrumbLink[];
|
|
10
|
-
|
|
11
|
+
color?: 'primary' | 'destructive' | 'neutral' | 'light' | 'dark' | 'text' | 'custom';
|
|
12
|
+
locale?: Locales;
|
|
13
|
+
elementType?: 'page' | 'location';
|
|
14
|
+
} & HTMLAttributes<HTMLOListElement>;
|
|
11
15
|
export declare const Breadcrumb: FC<BreadcrumbProps>;
|
|
12
16
|
export {};
|
|
13
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumb/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumb/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAElD,OAAO,EAAY,cAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AA2F1D,KAAK,sBAAsB,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AACF,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,sBAAsB,CAAC;AAE7D,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,KAAK,CAAC,EACF,SAAS,GACT,aAAa,GACb,SAAS,GACT,OAAO,GACP,MAAM,GACN,MAAM,GACN,QAAQ,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;CACnC,GAAG,cAAc,CAAC,gBAAgB,CAAC,CAAC;AAErC,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAsF1C,CAAC"}
|
|
@@ -1,41 +1,77 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { j as jsxRuntimeExports } from "../../jsx-runtime-DaNGiM0W.js";
|
|
2
3
|
import { ChevronRightIcon } from "lucide-react";
|
|
3
4
|
import { Fragment } from "react";
|
|
5
|
+
import { useDictionary } from "react-intlayer";
|
|
4
6
|
import { cn } from "../../utils/cn.mjs";
|
|
5
7
|
import { Button } from "../Button/Button.mjs";
|
|
6
8
|
import { Link } from "../Link/Link.mjs";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
9
|
+
import { breadCrumbContent } from "./breadcrumb.content.mjs";
|
|
10
|
+
const LinkLink = ({
|
|
11
|
+
href,
|
|
12
|
+
lang,
|
|
13
|
+
children,
|
|
14
|
+
onClick,
|
|
15
|
+
color,
|
|
16
|
+
position,
|
|
17
|
+
locale,
|
|
18
|
+
...props
|
|
19
|
+
}) => {
|
|
20
|
+
const { linkLabel } = useDictionary(breadCrumbContent);
|
|
21
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
22
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
23
|
+
Link,
|
|
24
|
+
{
|
|
25
|
+
href,
|
|
26
|
+
locale,
|
|
27
|
+
color,
|
|
28
|
+
onClick,
|
|
29
|
+
itemProp: "item",
|
|
30
|
+
...props,
|
|
31
|
+
label: `${linkLabel} ${children}`,
|
|
32
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { itemProp: "name", children })
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("meta", { itemProp: "position", content: position.toString() })
|
|
36
|
+
] });
|
|
37
|
+
};
|
|
38
|
+
const ButtonLink = ({
|
|
39
|
+
children: text,
|
|
40
|
+
onClick,
|
|
41
|
+
color,
|
|
42
|
+
position,
|
|
43
|
+
...props
|
|
44
|
+
}) => {
|
|
45
|
+
const { linkLabel } = useDictionary(breadCrumbContent);
|
|
46
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
47
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
48
|
+
Button,
|
|
49
|
+
{
|
|
50
|
+
onClick,
|
|
51
|
+
variant: "link",
|
|
52
|
+
label: `${linkLabel} ${text}`,
|
|
53
|
+
color,
|
|
54
|
+
itemProp: "item",
|
|
55
|
+
...props,
|
|
56
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { itemProp: "name", children: text })
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("meta", { itemProp: "position", content: position.toString() })
|
|
60
|
+
] });
|
|
61
|
+
};
|
|
62
|
+
const Span = ({ children, position, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
63
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { itemProp: "item", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { itemProp: "name", ...props, children }) }),
|
|
64
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("meta", { itemProp: "position", content: position.toString() })
|
|
65
|
+
] });
|
|
33
66
|
const Breadcrumb = ({
|
|
34
67
|
links,
|
|
35
68
|
className,
|
|
69
|
+
color = "text",
|
|
70
|
+
locale,
|
|
71
|
+
elementType = "page",
|
|
36
72
|
...props
|
|
37
|
-
}) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
38
|
-
"
|
|
73
|
+
}) => /* @__PURE__ */ jsxRuntimeExports.jsx("nav", { "aria-label": "breadcrumb", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
74
|
+
"ol",
|
|
39
75
|
{
|
|
40
76
|
className: cn(
|
|
41
77
|
"flex flex-row flex-wrap items-center gap-2 text-sm",
|
|
@@ -48,23 +84,56 @@ const Breadcrumb = ({
|
|
|
48
84
|
const isLastLink = index === links.length - 1;
|
|
49
85
|
const isLink = typeof link === "object" && typeof link.href === "string";
|
|
50
86
|
const isButton = typeof link === "object" && typeof link.onClick === "function";
|
|
87
|
+
const isActive = index === links.length - 1;
|
|
88
|
+
const ariaCurrent = isActive ? elementType : void 0;
|
|
51
89
|
const text = link.text ?? link;
|
|
52
|
-
let
|
|
90
|
+
let section = /* @__PURE__ */ jsxRuntimeExports.jsx(Span, { position: index + 1, "aria-current": ariaCurrent, children: text }, text);
|
|
53
91
|
if (isLink) {
|
|
54
|
-
|
|
92
|
+
section = /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
93
|
+
LinkLink,
|
|
94
|
+
{
|
|
95
|
+
href: link.href,
|
|
96
|
+
color,
|
|
97
|
+
position: index + 1,
|
|
98
|
+
locale,
|
|
99
|
+
"aria-current": ariaCurrent,
|
|
100
|
+
children: text
|
|
101
|
+
},
|
|
102
|
+
text
|
|
103
|
+
);
|
|
55
104
|
} else if (isButton) {
|
|
56
|
-
|
|
105
|
+
section = /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
106
|
+
ButtonLink,
|
|
107
|
+
{
|
|
108
|
+
onClick: link.onClick,
|
|
109
|
+
color,
|
|
110
|
+
position: index + 1,
|
|
111
|
+
"aria-current": ariaCurrent,
|
|
112
|
+
children: text
|
|
113
|
+
},
|
|
114
|
+
text
|
|
115
|
+
);
|
|
57
116
|
}
|
|
117
|
+
const listElement = /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
118
|
+
"li",
|
|
119
|
+
{
|
|
120
|
+
itemProp: "itemListElement",
|
|
121
|
+
itemScope: true,
|
|
122
|
+
itemType: "https://schema.org/ListItem",
|
|
123
|
+
children: section
|
|
124
|
+
},
|
|
125
|
+
text
|
|
126
|
+
);
|
|
58
127
|
if (isLastLink) {
|
|
59
|
-
return
|
|
128
|
+
return listElement;
|
|
60
129
|
}
|
|
61
130
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Fragment, { children: [
|
|
62
|
-
|
|
131
|
+
listElement,
|
|
63
132
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRightIcon, { size: 10 })
|
|
64
133
|
] }, text);
|
|
65
134
|
})
|
|
66
135
|
}
|
|
67
|
-
);
|
|
136
|
+
) });
|
|
68
137
|
export {
|
|
69
138
|
Breadcrumb
|
|
70
139
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../src/components/Breadcrumb/index.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../src/components/Breadcrumb/index.tsx"],"sourcesContent":["'use client';\n\nimport { Locales } from '@intlayer/config/client';\nimport { ChevronRightIcon } from 'lucide-react';\nimport { Fragment, HTMLAttributes, type FC } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { cn } from '../../utils/cn';\nimport { Button, type ButtonProps } from '../Button';\nimport { Link, type LinkProps } from '../Link';\nimport { breadCrumbContent } from './breadcrumb.content';\n\ntype LinkLinkProps = {\n children: string;\n position: number;\n locale?: Locales;\n} & Omit<LinkProps, 'children' | 'label'>;\n\nconst LinkLink: FC<LinkLinkProps> = ({\n href,\n lang,\n children,\n onClick,\n color,\n position,\n locale,\n ...props\n}) => {\n const { linkLabel } = useDictionary(breadCrumbContent);\n\n return (\n <>\n <Link\n href={href}\n locale={locale}\n color={color}\n onClick={onClick}\n itemProp=\"item\"\n {...props}\n label={`${linkLabel} ${children}`}\n >\n <span itemProp=\"name\">{children}</span>\n </Link>\n <meta itemProp=\"position\" content={position.toString()} />\n </>\n );\n};\n\ntype ButtonButtonProps = {\n children: string;\n position: number;\n} & Omit<ButtonProps, 'children' | 'label'>;\n\nconst ButtonLink: FC<ButtonButtonProps> = ({\n children: text,\n onClick,\n color,\n position,\n ...props\n}) => {\n const { linkLabel } = useDictionary(breadCrumbContent);\n\n return (\n <>\n <Button\n onClick={onClick}\n variant=\"link\"\n label={`${linkLabel} ${text}`}\n color={color}\n itemProp=\"item\"\n {...props}\n >\n <span itemProp=\"name\">{text}</span>\n </Button>\n <meta itemProp=\"position\" content={position.toString()} />\n </>\n );\n};\n\ntype SpanProps = {\n children: string;\n position: number;\n} & HTMLAttributes<HTMLSpanElement>;\n\nconst Span: FC<SpanProps> = ({ children, position, ...props }) => (\n <>\n <div itemProp=\"item\">\n <span itemProp=\"name\" {...props}>\n {children}\n </span>\n </div>\n <meta itemProp=\"position\" content={position.toString()} />\n </>\n);\n\ntype DetailedBreadcrumbLink = {\n href?: string;\n text: string;\n onClick?: () => void;\n};\nexport type BreadcrumbLink = string | DetailedBreadcrumbLink;\n\nexport type BreadcrumbProps = {\n links: BreadcrumbLink[];\n color?:\n | 'primary'\n | 'destructive'\n | 'neutral'\n | 'light'\n | 'dark'\n | 'text'\n | 'custom';\n locale?: Locales;\n elementType?: 'page' | 'location';\n} & HTMLAttributes<HTMLOListElement>;\n\nexport const Breadcrumb: FC<BreadcrumbProps> = ({\n links,\n className,\n color = 'text',\n locale,\n elementType = 'page',\n ...props\n}) => (\n <nav aria-label=\"breadcrumb\">\n <ol\n className={cn(\n 'flex flex-row flex-wrap items-center gap-2 text-sm',\n className\n )}\n itemScope\n itemType=\"http://schema.org/BreadcrumbList\"\n {...props}\n >\n {links.map((link, index) => {\n const isLastLink = index === links.length - 1;\n const isLink =\n typeof link === 'object' && typeof link.href === 'string';\n const isButton =\n typeof link === 'object' && typeof link.onClick === 'function';\n const isActive = index === links.length - 1;\n const ariaCurrent = isActive ? elementType : undefined;\n\n const text = (link as DetailedBreadcrumbLink).text ?? link;\n\n let section = (\n <Span key={text} position={index + 1} aria-current={ariaCurrent}>\n {text}\n </Span>\n );\n\n if (isLink) {\n section = (\n <LinkLink\n key={text}\n href={link.href!}\n color={color}\n position={index + 1}\n locale={locale}\n aria-current={ariaCurrent}\n >\n {text}\n </LinkLink>\n );\n } else if (isButton) {\n section = (\n <ButtonLink\n key={text}\n onClick={link.onClick!}\n color={color}\n position={index + 1}\n aria-current={ariaCurrent}\n >\n {text}\n </ButtonLink>\n );\n }\n\n const listElement = (\n <li\n itemProp=\"itemListElement\"\n itemScope\n itemType=\"https://schema.org/ListItem\"\n key={text}\n >\n {section}\n </li>\n );\n\n if (isLastLink) {\n return listElement;\n }\n\n return (\n <Fragment key={text}>\n {listElement}\n <ChevronRightIcon size={10} />\n </Fragment>\n );\n })}\n </ol>\n </nav>\n);\n"],"names":["jsxs","Fragment","jsx"],"mappings":";;;;;;;;;AAkBA,MAAM,WAA8B,CAAC;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,UAAA,IAAc,cAAc,iBAAiB;AAErD,SAEIA,kCAAA,KAAAC,4BAAA,EAAA,UAAA;AAAA,IAAAC,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAS;AAAA,QACR,GAAG;AAAA,QACJ,OAAO,GAAG,SAAS,IAAI,QAAQ;AAAA,QAE/B,UAACA,kCAAA,IAAA,QAAA,EAAK,UAAS,QAAQ,SAAS,CAAA;AAAA,MAAA;AAAA,IAClC;AAAA,0CACC,QAAK,EAAA,UAAS,YAAW,SAAS,SAAS,WAAY,CAAA;AAAA,EAAA,GAC1D;AAEJ;AAOA,MAAM,aAAoC,CAAC;AAAA,EACzC,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,UAAA,IAAc,cAAc,iBAAiB;AAErD,SAEIF,kCAAA,KAAAC,4BAAA,EAAA,UAAA;AAAA,IAAAC,kCAAA;A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gDACD,MAAgB,EAAA,UAAU,QAAQ,GAAG,gBAAc,aACjD,UAAA,KAAA,GADQ,IAEX;AAGF,UAAI,QAAQ;AAER,kBAAAA,kCAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YAEC,MAAM,KAAK;AAAA,YACX;AAAA,YACA,UAAU,QAAQ;AAAA,YAClB;AAAA,YACA,gBAAc;AAAA,YAEb,UAAA;AAAA,UAAA;AAAA,UAPI;AAAA,QAQP;AAAA,iBAEO,UAAU;AAEjB,kBAAAA,kCAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YAEC,SAAS,KAAK;AAAA,YACd;AAAA,YACA,UAAU,QAAQ;AAAA,YAClB,gBAAc;AAAA,YAEb,UAAA;AAAA,UAAA;AAAA,UANI;AAAA,QAOP;AAAA,MAAA;AAIJ,YAAM,cACJA,kCAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAS;AAAA,UACT,WAAS;AAAA,UACT,UAAS;AAAA,UAGR,UAAA;AAAA,QAAA;AAAA,QAFI;AAAA,MAGP;AAGF,UAAI,YAAY;AACP,eAAA;AAAA,MAAA;AAIP,aAAAF,kCAAA,KAACC,UAAA,EACE,UAAA;AAAA,QAAA;AAAA,QACDC,kCAAAA,IAAC,kBAAiB,EAAA,MAAM,GAAI,CAAA;AAAA,MAAA,EAAA,GAFf,IAGf;AAAA,IAEH,CAAA;AAAA,EAAA;AACH,EACF,CAAA;"}
|
|
@@ -31,10 +31,10 @@ const buttonVariants = classVarianceAuthority.cva(
|
|
|
31
31
|
md: "min-h-8 px-6 max-md:py-2 text-sm",
|
|
32
32
|
lg: "min-h-10 px-8 max-md:py-3 text-base",
|
|
33
33
|
xl: "min-h-11 px-10 max-md:py-4 text-lg",
|
|
34
|
-
"icon-sm": "p-0",
|
|
35
|
-
"icon-md": "p-
|
|
36
|
-
"icon-lg": "p-
|
|
37
|
-
"icon-xl": "p-
|
|
34
|
+
"icon-sm": "p-0.5",
|
|
35
|
+
"icon-md": "p-1",
|
|
36
|
+
"icon-lg": "p-1.5",
|
|
37
|
+
"icon-xl": "p-2"
|
|
38
38
|
},
|
|
39
39
|
variant: {
|
|
40
40
|
default: "rounded-lg text-text-opposite dark:text-text-opposite-dark",
|
|
@@ -42,7 +42,7 @@ const buttonVariants = classVarianceAuthority.cva(
|
|
|
42
42
|
outline: "rounded-lg border-[1.5px] bg-opacity-0 hover:bg-opacity-30 dark:bg-opacity-0",
|
|
43
43
|
link: "h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 hover:bg-transparent hover:underline dark:bg-transparent hover:dark:bg-transparent",
|
|
44
44
|
"invisible-link": "h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 hover:bg-transparent dark:bg-transparent hover:dark:bg-transparent",
|
|
45
|
-
hoverable: "rounded-lg border-none bg-opacity-0 transition hover:bg-opacity-10 aria-[current
|
|
45
|
+
hoverable: "rounded-lg border-none bg-opacity-0 transition hover:bg-opacity-10 aria-[current]:bg-opacity-5 dark:border-none dark:bg-opacity-0 dark:hover:bg-opacity-10",
|
|
46
46
|
input: [
|
|
47
47
|
"w-full select-text resize-none rounded-xl border-2 bg-input-background text-sm text-input-text shadow-none outline-0 transition-all dark:bg-input-background-dark dark:text-input-text-dark",
|
|
48
48
|
"border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none] dark:border-input-border-dark dark:hover:border-input-border-hover-dark dark:focus:border-input-border-focus",
|
|
@@ -107,8 +107,7 @@ const Button = require$$0.forwardRef(
|
|
|
107
107
|
{
|
|
108
108
|
ref,
|
|
109
109
|
disabled: isLoading || disabled,
|
|
110
|
-
"aria-current": isActive,
|
|
111
|
-
"aria-selected": isActive,
|
|
110
|
+
"aria-current": isActive ? "page" : void 0,
|
|
112
111
|
"aria-label": label,
|
|
113
112
|
"aria-busy": isLoading,
|
|
114
113
|
role: isLink ? "link" : void 0,
|
|
@@ -142,7 +141,7 @@ const Button = require$$0.forwardRef(
|
|
|
142
141
|
isLoading
|
|
143
142
|
}
|
|
144
143
|
),
|
|
145
|
-
typeof children !== "undefined" && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { className: "flex-1", children }),
|
|
144
|
+
typeof children !== "undefined" && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { className: "flex-1 truncate", children }),
|
|
146
145
|
IconRight && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
147
146
|
IconRight,
|
|
148
147
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.cjs","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport type { LucideIcon } from 'lucide-react';\nimport {\n forwardRef,\n type ButtonHTMLAttributes,\n type DetailedHTMLProps,\n type FC,\n} from 'react';\nimport { cn } from '../../utils/cn';\nimport { Loader } from '../Loader';\n\nconst buttonIconVariants = cva('size-4', {\n variants: {\n size: {\n sm: 'w-4',\n md: 'w-6',\n lg: 'w-7',\n xl: 'w-9',\n 'icon-sm': 'size-6 p-1',\n 'icon-md': 'size-7 p-1',\n 'icon-lg': 'size-9 p-1',\n 'icon-xl': 'size-10 p-1',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n});\n\nconst buttonVariants = cva(\n 'flex items-center gap-3 whitespace-nowrap font-medium transition focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n size: {\n sm: 'min-h-7 px-3 max-md:py-1 text-xs',\n md: 'min-h-8 px-6 max-md:py-2 text-sm',\n lg: 'min-h-10 px-8 max-md:py-3 text-base',\n xl: 'min-h-11 px-10 max-md:py-4 text-lg',\n 'icon-sm': 'p-0',\n 'icon-md': 'p-
|
|
1
|
+
{"version":3,"file":"Button.cjs","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport type { LucideIcon } from 'lucide-react';\nimport {\n forwardRef,\n type ButtonHTMLAttributes,\n type DetailedHTMLProps,\n type FC,\n} from 'react';\nimport { cn } from '../../utils/cn';\nimport { Loader } from '../Loader';\n\nconst buttonIconVariants = cva('size-4', {\n variants: {\n size: {\n sm: 'w-4',\n md: 'w-6',\n lg: 'w-7',\n xl: 'w-9',\n 'icon-sm': 'size-6 p-1',\n 'icon-md': 'size-7 p-1',\n 'icon-lg': 'size-9 p-1',\n 'icon-xl': 'size-10 p-1',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n});\n\nconst buttonVariants = cva(\n 'flex items-center gap-3 whitespace-nowrap font-medium transition focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n size: {\n sm: 'min-h-7 px-3 max-md:py-1 text-xs',\n md: 'min-h-8 px-6 max-md:py-2 text-sm',\n lg: 'min-h-10 px-8 max-md:py-3 text-base',\n xl: 'min-h-11 px-10 max-md:py-4 text-lg',\n 'icon-sm': 'p-0.5',\n 'icon-md': 'p-1',\n 'icon-lg': 'p-1.5',\n 'icon-xl': 'p-2',\n },\n variant: {\n default: 'rounded-lg text-text-opposite dark:text-text-opposite-dark',\n none: 'border-none bg-opacity-0 text-inherit hover:bg-opacity-0 dark:bg-opacity-0 dark:text-inherit dark:hover:bg-opacity-0',\n outline:\n 'rounded-lg border-[1.5px] bg-opacity-0 hover:bg-opacity-30 dark:bg-opacity-0',\n link: 'h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 hover:bg-transparent hover:underline dark:bg-transparent hover:dark:bg-transparent',\n 'invisible-link':\n 'h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 hover:bg-transparent dark:bg-transparent hover:dark:bg-transparent',\n hoverable:\n 'rounded-lg border-none bg-opacity-0 transition hover:bg-opacity-10 aria-[current]:bg-opacity-5 dark:border-none dark:bg-opacity-0 dark:hover:bg-opacity-10',\n input: [\n 'w-full select-text resize-none rounded-xl border-2 bg-input-background text-sm text-input-text shadow-none outline-0 transition-all dark:bg-input-background-dark dark:text-input-text-dark',\n 'border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none] dark:border-input-border-dark dark:hover:border-input-border-hover-dark dark:focus:border-input-border-focus',\n 'aria-[invalid=true]:border-error dark:aria-[invalid=true]:border-error-dark',\n 'disabled:opacity-50',\n ],\n },\n color: {\n primary:\n 'border-primary bg-primary text-primary hover:bg-primary-500 dark:border-primary-dark dark:bg-primary-dark dark:text-primary-dark hover:dark:bg-primary-300',\n secondary:\n 'border-secondary bg-secondary text-secondary hover:bg-secondary-300 dark:border-secondary-dark dark:bg-secondary-dark dark:text-secondary-dark hover:dark:bg-secondary-100',\n destructive:\n 'border-destructive bg-destructive text-destructive hover:bg-destructive-500 dark:border-destructive-dark dark:bg-destructive-dark hover:dark:bg-destructive-200',\n neutral:\n 'border-neutral bg-neutral text-neutral hover:bg-neutral-600 dark:border-neutral-dark dark:bg-neutral-dark dark:text-neutral-dark hover:dark:bg-neutral-400',\n light: 'border-white bg-white text-white hover:bg-neutral-500',\n dark: 'border-neutral-800 bg-neutral-800 text-neutral-800 hover:bg-neutral-900 dark:hover:bg-neutral-700',\n text: 'border-text bg-text text-text hover:opacity-80 dark:border-text-dark dark:bg-text-dark dark:text-text-dark',\n 'text-inverse':\n 'border-text-dark dark:border-text bg-text-dark dark:bg-text text-text-dark dark:text-text hover:opacity-80',\n error:\n 'border-error bg-error text-error hover:bg-error-500 dark:border-error-dark dark:bg-error-dark dark:text-error-dark hover:dark:bg-error-300',\n success:\n 'border-success bg-success text-success hover:bg-success-500 dark:border-success-dark dark:bg-success-dark dark:text-success-dark hover:dark:bg-success-300',\n custom: '',\n },\n\n textAlign: {\n left: 'text-left',\n center: 'text-center',\n right: 'text-right',\n },\n\n isFullWidth: {\n true: 'w-full',\n false: '',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n color: 'primary',\n textAlign: 'center',\n isFullWidth: false,\n },\n }\n);\n\nexport type ButtonProps = DetailedHTMLProps<\n ButtonHTMLAttributes<HTMLButtonElement>,\n HTMLButtonElement\n> &\n VariantProps<typeof buttonVariants> & {\n /**\n * Optional icon to be displayed on the button\n */\n label: string;\n Icon?: FC | LucideIcon;\n IconRight?: FC | LucideIcon;\n iconClassName?: string;\n isLoading?: boolean;\n isActive?: boolean;\n isFullWidth?: boolean;\n };\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n variant,\n size,\n color,\n children,\n Icon,\n IconRight,\n iconClassName,\n isLoading = false,\n isActive,\n isFullWidth = false,\n textAlign = IconRight ? 'left' : 'center',\n disabled,\n label,\n className,\n type = 'button',\n ...props\n },\n ref\n ) => {\n const isLink = variant === 'link' || variant === 'invisible-link';\n\n return (\n <button\n ref={ref}\n disabled={isLoading || disabled}\n aria-current={isActive ? 'page' : undefined}\n aria-label={label}\n aria-busy={isLoading}\n role={isLink ? 'link' : undefined}\n type={type}\n className={buttonVariants({\n variant,\n size,\n color,\n isFullWidth,\n textAlign,\n className,\n })}\n {...props}\n >\n {Icon && !isLoading && (\n <Icon\n className={cn(\n buttonIconVariants({ size, className: iconClassName }),\n 'float-start'\n )}\n />\n )}\n\n <Loader\n className={cn(\n buttonIconVariants({ size, className: iconClassName }),\n 'float-start'\n )}\n isLoading={isLoading}\n />\n\n {typeof children !== 'undefined' && (\n <div className=\"flex-1 truncate\">{children}</div>\n )}\n\n {IconRight && (\n <IconRight\n className={cn(\n buttonIconVariants({ size, className: iconClassName }),\n ''\n )}\n />\n )}\n </button>\n );\n }\n);\n\nButton.displayName = 'Button';\n"],"names":["cva","forwardRef","jsxs","jsx","cn","Loader"],"mappings":";;;;;;;AAWA,MAAM,qBAAqBA,2BAAI,UAAU;AAAA,EACvC,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,IAAA;AAAA,EAEf;AAAA,EACA,iBAAiB;AAAA,IACf,MAA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QACG;AACG,UAAA,SAAS,YAAY,UAAU,YAAY;AAG/C,WAAAC,2BAAA,kBAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,UAAU,aAAa;AAAA,QACvB,gBAAc,WAAW,SAAS;AAAA,QAClC,cAAY;AAAA,QACZ,aAAW;AAAA,QACX,MAAM,SAAS,SAAS;AAAA,QACxB;AAAA,QACA,WAAW,eAAe;AAAA,UACxB;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA,CACD;AAAA,QACA,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA,QAAQ,CAAC,aACRC,2BAAA,kBAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWC,SAAA;AAAA,gBACT,mBAAmB,EAAE,MAAM,WAAW,eAAe;AAAA,gBACrD;AAAA,cAAA;AAAA,YACF;AAAA,UACF;AAAA,UAGFD,2BAAA,kBAAA;AAAA,YAACE,wBAAA;AAAA,YAAA;AAAA,cACC,WAAWD,SAAA;AAAA,gBACT,mBAAmB,EAAE,MAAM,WAAW,eAAe;AAAA,gBACrD;AAAA,cACF;AAAA,cACA;AAAA,YAAA;AAAA,UACF;AAAA,UAEC,OAAO,aAAa,gEAClB,OAAI,EAAA,WAAU,mBAAmB,UAAS;AAAA,UAG5C,aACCD,2BAAA,kBAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWC,SAAA;AAAA,gBACT,mBAAmB,EAAE,MAAM,WAAW,eAAe;AAAA,gBACrD;AAAA,cAAA;AAAA,YACF;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAEJ;AAAA,EAAA;AAGN;AAEA,OAAO,cAAc;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OA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AE,GAAG,UAAU,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEJ,eAAO,MAAM,MAAM,wHA2ElB,CAAC"}
|
|
@@ -29,10 +29,10 @@ const buttonVariants = cva(
|
|
|
29
29
|
md: "min-h-8 px-6 max-md:py-2 text-sm",
|
|
30
30
|
lg: "min-h-10 px-8 max-md:py-3 text-base",
|
|
31
31
|
xl: "min-h-11 px-10 max-md:py-4 text-lg",
|
|
32
|
-
"icon-sm": "p-0",
|
|
33
|
-
"icon-md": "p-
|
|
34
|
-
"icon-lg": "p-
|
|
35
|
-
"icon-xl": "p-
|
|
32
|
+
"icon-sm": "p-0.5",
|
|
33
|
+
"icon-md": "p-1",
|
|
34
|
+
"icon-lg": "p-1.5",
|
|
35
|
+
"icon-xl": "p-2"
|
|
36
36
|
},
|
|
37
37
|
variant: {
|
|
38
38
|
default: "rounded-lg text-text-opposite dark:text-text-opposite-dark",
|
|
@@ -40,7 +40,7 @@ const buttonVariants = cva(
|
|
|
40
40
|
outline: "rounded-lg border-[1.5px] bg-opacity-0 hover:bg-opacity-30 dark:bg-opacity-0",
|
|
41
41
|
link: "h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 hover:bg-transparent hover:underline dark:bg-transparent hover:dark:bg-transparent",
|
|
42
42
|
"invisible-link": "h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 hover:bg-transparent dark:bg-transparent hover:dark:bg-transparent",
|
|
43
|
-
hoverable: "rounded-lg border-none bg-opacity-0 transition hover:bg-opacity-10 aria-[current
|
|
43
|
+
hoverable: "rounded-lg border-none bg-opacity-0 transition hover:bg-opacity-10 aria-[current]:bg-opacity-5 dark:border-none dark:bg-opacity-0 dark:hover:bg-opacity-10",
|
|
44
44
|
input: [
|
|
45
45
|
"w-full select-text resize-none rounded-xl border-2 bg-input-background text-sm text-input-text shadow-none outline-0 transition-all dark:bg-input-background-dark dark:text-input-text-dark",
|
|
46
46
|
"border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none] dark:border-input-border-dark dark:hover:border-input-border-hover-dark dark:focus:border-input-border-focus",
|
|
@@ -105,8 +105,7 @@ const Button = forwardRef(
|
|
|
105
105
|
{
|
|
106
106
|
ref,
|
|
107
107
|
disabled: isLoading || disabled,
|
|
108
|
-
"aria-current": isActive,
|
|
109
|
-
"aria-selected": isActive,
|
|
108
|
+
"aria-current": isActive ? "page" : void 0,
|
|
110
109
|
"aria-label": label,
|
|
111
110
|
"aria-busy": isLoading,
|
|
112
111
|
role: isLink ? "link" : void 0,
|
|
@@ -140,7 +139,7 @@ const Button = forwardRef(
|
|
|
140
139
|
isLoading
|
|
141
140
|
}
|
|
142
141
|
),
|
|
143
|
-
typeof children !== "undefined" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", children }),
|
|
142
|
+
typeof children !== "undefined" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 truncate", children }),
|
|
144
143
|
IconRight && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
145
144
|
IconRight,
|
|
146
145
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.mjs","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport type { LucideIcon } from 'lucide-react';\nimport {\n forwardRef,\n type ButtonHTMLAttributes,\n type DetailedHTMLProps,\n type FC,\n} from 'react';\nimport { cn } from '../../utils/cn';\nimport { Loader } from '../Loader';\n\nconst buttonIconVariants = cva('size-4', {\n variants: {\n size: {\n sm: 'w-4',\n md: 'w-6',\n lg: 'w-7',\n xl: 'w-9',\n 'icon-sm': 'size-6 p-1',\n 'icon-md': 'size-7 p-1',\n 'icon-lg': 'size-9 p-1',\n 'icon-xl': 'size-10 p-1',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n});\n\nconst buttonVariants = cva(\n 'flex items-center gap-3 whitespace-nowrap font-medium transition focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n size: {\n sm: 'min-h-7 px-3 max-md:py-1 text-xs',\n md: 'min-h-8 px-6 max-md:py-2 text-sm',\n lg: 'min-h-10 px-8 max-md:py-3 text-base',\n xl: 'min-h-11 px-10 max-md:py-4 text-lg',\n 'icon-sm': 'p-0',\n 'icon-md': 'p-
|
|
1
|
+
{"version":3,"file":"Button.mjs","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport type { LucideIcon } from 'lucide-react';\nimport {\n forwardRef,\n type ButtonHTMLAttributes,\n type DetailedHTMLProps,\n type FC,\n} from 'react';\nimport { cn } from '../../utils/cn';\nimport { Loader } from '../Loader';\n\nconst buttonIconVariants = cva('size-4', {\n variants: {\n size: {\n sm: 'w-4',\n md: 'w-6',\n lg: 'w-7',\n xl: 'w-9',\n 'icon-sm': 'size-6 p-1',\n 'icon-md': 'size-7 p-1',\n 'icon-lg': 'size-9 p-1',\n 'icon-xl': 'size-10 p-1',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n});\n\nconst buttonVariants = cva(\n 'flex items-center gap-3 whitespace-nowrap font-medium transition focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n size: {\n sm: 'min-h-7 px-3 max-md:py-1 text-xs',\n md: 'min-h-8 px-6 max-md:py-2 text-sm',\n lg: 'min-h-10 px-8 max-md:py-3 text-base',\n xl: 'min-h-11 px-10 max-md:py-4 text-lg',\n 'icon-sm': 'p-0.5',\n 'icon-md': 'p-1',\n 'icon-lg': 'p-1.5',\n 'icon-xl': 'p-2',\n },\n variant: {\n default: 'rounded-lg text-text-opposite dark:text-text-opposite-dark',\n none: 'border-none bg-opacity-0 text-inherit hover:bg-opacity-0 dark:bg-opacity-0 dark:text-inherit dark:hover:bg-opacity-0',\n outline:\n 'rounded-lg border-[1.5px] bg-opacity-0 hover:bg-opacity-30 dark:bg-opacity-0',\n link: 'h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 hover:bg-transparent hover:underline dark:bg-transparent hover:dark:bg-transparent',\n 'invisible-link':\n 'h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 hover:bg-transparent dark:bg-transparent hover:dark:bg-transparent',\n hoverable:\n 'rounded-lg border-none bg-opacity-0 transition hover:bg-opacity-10 aria-[current]:bg-opacity-5 dark:border-none dark:bg-opacity-0 dark:hover:bg-opacity-10',\n input: [\n 'w-full select-text resize-none rounded-xl border-2 bg-input-background text-sm text-input-text shadow-none outline-0 transition-all dark:bg-input-background-dark dark:text-input-text-dark',\n 'border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none] dark:border-input-border-dark dark:hover:border-input-border-hover-dark dark:focus:border-input-border-focus',\n 'aria-[invalid=true]:border-error dark:aria-[invalid=true]:border-error-dark',\n 'disabled:opacity-50',\n ],\n },\n color: {\n primary:\n 'border-primary bg-primary text-primary hover:bg-primary-500 dark:border-primary-dark dark:bg-primary-dark dark:text-primary-dark hover:dark:bg-primary-300',\n secondary:\n 'border-secondary bg-secondary text-secondary hover:bg-secondary-300 dark:border-secondary-dark dark:bg-secondary-dark dark:text-secondary-dark hover:dark:bg-secondary-100',\n destructive:\n 'border-destructive bg-destructive text-destructive hover:bg-destructive-500 dark:border-destructive-dark dark:bg-destructive-dark hover:dark:bg-destructive-200',\n neutral:\n 'border-neutral bg-neutral text-neutral hover:bg-neutral-600 dark:border-neutral-dark dark:bg-neutral-dark dark:text-neutral-dark hover:dark:bg-neutral-400',\n light: 'border-white bg-white text-white hover:bg-neutral-500',\n dark: 'border-neutral-800 bg-neutral-800 text-neutral-800 hover:bg-neutral-900 dark:hover:bg-neutral-700',\n text: 'border-text bg-text text-text hover:opacity-80 dark:border-text-dark dark:bg-text-dark dark:text-text-dark',\n 'text-inverse':\n 'border-text-dark dark:border-text bg-text-dark dark:bg-text text-text-dark dark:text-text hover:opacity-80',\n error:\n 'border-error bg-error text-error hover:bg-error-500 dark:border-error-dark dark:bg-error-dark dark:text-error-dark hover:dark:bg-error-300',\n success:\n 'border-success bg-success text-success hover:bg-success-500 dark:border-success-dark dark:bg-success-dark dark:text-success-dark hover:dark:bg-success-300',\n custom: '',\n },\n\n textAlign: {\n left: 'text-left',\n center: 'text-center',\n right: 'text-right',\n },\n\n isFullWidth: {\n true: 'w-full',\n false: '',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n color: 'primary',\n textAlign: 'center',\n isFullWidth: false,\n },\n }\n);\n\nexport type ButtonProps = DetailedHTMLProps<\n ButtonHTMLAttributes<HTMLButtonElement>,\n HTMLButtonElement\n> &\n VariantProps<typeof buttonVariants> & {\n /**\n * Optional icon to be displayed on the button\n */\n label: string;\n Icon?: FC | LucideIcon;\n IconRight?: FC | LucideIcon;\n iconClassName?: string;\n isLoading?: boolean;\n isActive?: boolean;\n isFullWidth?: boolean;\n };\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n variant,\n size,\n color,\n children,\n Icon,\n IconRight,\n iconClassName,\n isLoading = false,\n isActive,\n isFullWidth = false,\n textAlign = IconRight ? 'left' : 'center',\n disabled,\n label,\n className,\n type = 'button',\n ...props\n },\n ref\n ) => {\n const isLink = variant === 'link' || variant === 'invisible-link';\n\n return (\n <button\n ref={ref}\n disabled={isLoading || disabled}\n aria-current={isActive ? 'page' : undefined}\n aria-label={label}\n aria-busy={isLoading}\n role={isLink ? 'link' : undefined}\n type={type}\n className={buttonVariants({\n variant,\n size,\n color,\n isFullWidth,\n textAlign,\n className,\n })}\n {...props}\n >\n {Icon && !isLoading && (\n <Icon\n className={cn(\n buttonIconVariants({ size, className: iconClassName }),\n 'float-start'\n )}\n />\n )}\n\n <Loader\n className={cn(\n buttonIconVariants({ size, className: iconClassName }),\n 'float-start'\n )}\n isLoading={isLoading}\n />\n\n {typeof children !== 'undefined' && (\n <div className=\"flex-1 truncate\">{children}</div>\n )}\n\n {IconRight && (\n <IconRight\n className={cn(\n buttonIconVariants({ size, className: iconClassName }),\n ''\n )}\n />\n )}\n </button>\n );\n }\n);\n\nButton.displayName = 'Button';\n"],"names":["jsxs","jsx"],"mappings":";;;;;AAWA,MAAM,qBAAqB,IAAI,UAAU;AAAA,EACvC,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,IAAA;AAAA,EAEf;AAAA,EACA,iBAAiB;AAAA,IACf,MAAM;AAAA,EAAA;AAEV,CAAC;AAED,MAAM,iBAAiB;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,WAAW;AAAA,QACX,WAAW;AAAA,QACX,WAAW;AAAA,QACX,WAAW;AAAA,MACb;AAAA,MACA,SAAS;AAAA,QACP,SAAS;AAAA,QACT,MAAM;AAAA,QACN,SACE;AAAA,QACF,MAAM;AAAA,QACN,kBACE;AAAA,QACF,WACE;AAAA,QACF,OAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,MAEJ;AAAA,MACA,OAAO;AAAA,QACL,SACE;AAAA,QACF,WACE;AAAA,QACF,aACE;AAAA,QACF,SACE;AAAA,QACF,OAAO;AAAA,QACP,MAAM;AAAA,QACN,MAAM;AAAA,QACN,gBACE;AAAA,QACF,OACE;AAAA,QACF,SACE;AAAA,QACF,QAAQ;AAAA,MACV;AAAA,MAEA,WAAW;AAAA,QACT,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,OAAO;AAAA,MACT;AAAA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AAS;AAAA,UAG5C,aACCA,kCAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAW;AAAA,gBACT,mBAAmB,EAAE,MAAM,WAAW,eAAe;AAAA,gBACrD;AAAA,cAAA;AAAA,YACF;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAEJ;AAAA,EAAA;AAGN;AAEA,OAAO,cAAc;"}
|
|
@@ -21,8 +21,8 @@ const containerVariants = classVarianceAuthority.cva(
|
|
|
21
21
|
transparency: {
|
|
22
22
|
none: "bg-card dark:bg-card-dark",
|
|
23
23
|
full: "",
|
|
24
|
-
sm: "bg-card/
|
|
25
|
-
md: "bg-card/
|
|
24
|
+
sm: "bg-card/90 dark:bg-card-dark/90",
|
|
25
|
+
md: "bg-card/70 dark:bg-card-dark/70",
|
|
26
26
|
lg: "bg-card/40 dark:bg-card-dark/40",
|
|
27
27
|
xl: "bg-card/20 dark:bg-card-dark/20"
|
|
28
28
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/Container/index.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { type PropsWithChildren, forwardRef, type HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\n\nconst containerVariants = cva(\n 'flex flex-col p-10 text-text backdrop-blur dark:text-text-dark',\n {\n variants: {\n roundedSize: {\n none: 'rounded-none',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n '2xl': 'rounded-2xl',\n '3xl': 'rounded-3xl',\n full: 'rounded-full',\n },\n transparency: {\n none: 'bg-card dark:bg-card-dark',\n full: '',\n sm: 'bg-card/
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/Container/index.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { type PropsWithChildren, forwardRef, type HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\n\nconst containerVariants = cva(\n 'flex flex-col p-10 text-text backdrop-blur dark:text-text-dark',\n {\n variants: {\n roundedSize: {\n none: 'rounded-none',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n '2xl': 'rounded-2xl',\n '3xl': 'rounded-3xl',\n full: 'rounded-full',\n },\n transparency: {\n none: 'bg-card dark:bg-card-dark',\n full: '',\n sm: 'bg-card/90 dark:bg-card-dark/90',\n md: 'bg-card/70 dark:bg-card-dark/70',\n lg: 'bg-card/40 dark:bg-card-dark/40',\n xl: 'bg-card/20 dark:bg-card-dark/20',\n },\n padding: {\n none: 'p-0',\n sm: 'p-1',\n md: 'p-2',\n lg: 'p-3',\n xl: 'p-4',\n },\n separator: {\n without: '',\n x: 'divide-x divide-dashed divide-text/20 dark:divide-text-dark/20',\n y: 'divide-y divide-dashed divide-text/20 dark:divide-text-dark/20',\n both: 'divide-x divide-y divide-dashed divide-text/20 dark:divide-text-dark/20',\n },\n border: {\n none: '',\n with: 'border-[1.5px]',\n },\n borderColor: {\n primary: 'border-primary dark:border-primary-dark',\n secondary: 'border-secondary dark:border-secondary-dark',\n neutral: 'border-neutral dark:border-neutral-dark',\n text: 'border-text dark:border-text-dark',\n },\n background: {\n none: 'bg-none',\n with: '',\n },\n gap: {\n none: 'gap-0',\n sm: 'gap-1',\n md: 'gap-3',\n lg: 'gap-5',\n xl: 'gap-8',\n '2xl': 'gap-10',\n },\n },\n\n defaultVariants: {\n roundedSize: 'md',\n border: 'none',\n borderColor: 'text',\n transparency: 'md',\n padding: 'none',\n separator: 'without',\n gap: 'none',\n },\n }\n);\n\nexport type ContainerProps = PropsWithChildren<\n Omit<VariantProps<typeof containerVariants>, 'border' | 'background'>\n> &\n HTMLAttributes<HTMLDivElement> & {\n border?: boolean;\n background?: boolean;\n };\n\nexport const Container = forwardRef<HTMLDivElement, ContainerProps>(\n (\n {\n children,\n roundedSize,\n padding,\n transparency,\n separator,\n className,\n border,\n borderColor,\n background,\n ...props\n },\n ref\n ) => (\n <div\n ref={ref}\n className={cn(\n containerVariants({\n roundedSize,\n transparency,\n padding,\n separator,\n border:\n typeof border === 'boolean'\n ? border\n ? 'with'\n : 'none'\n : undefined,\n background:\n typeof background === 'boolean'\n ? background\n ? 'with'\n : 'none'\n : undefined,\n borderColor,\n className,\n })\n )}\n {...props}\n >\n {children}\n </div>\n )\n);\n\nContainer.displayName = 'Container';\n"],"names":["cva","forwardRef","jsx","cn"],"mappings":";;;;;;AAIA,MAAM,oBAAoBA,uBAAA;AAAA,EACxB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,aAAa;AAAA,QACX,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,OAAO;AAAA,QACP,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,MACA,SAAS;AAAA,QACP,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,MACA,WAAW;AAAA,QACT,SAAS;AAAA,QACT,GAAG;AAAA,QACH,GAAG;AAAA,QACH,MAAM;AAAA,MACR;AAAA,MACA,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,MACA,aAAa;AAAA,QACX,SAAS;AAAA,QACT,WAAW;AAAA,QACX,SAAS;AAAA,QACT,MAAM;AAAA,MACR;AAAA,MACA,YAAY;AAAA,QACV,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,MACA,KAAK;AAAA,QACH,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,OAAO;AAAA,MAAA;AAAA,IAEX;AAAA,IAEA,iBAAiB;AAAA,MACf,aAAa;AAAA,MACb,QAAQ;AAAA,MACR,aAAa;AAAA,MACb,cAAc;AAAA,MACd,SAAS;AAAA,MACT,WAAW;AAAA,MACX,KAAK;AAAA,IAAA;AAAA,EACP;AAEJ;AAUO,MAAM,YAAYC,WAAA;AAAA,EACvB,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,KAEL,QAEAC,2BAAA,kBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAWC,SAAA;AAAA,QACT,kBAAkB;AAAA,UAChB;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,QACE,OAAO,WAAW,YACd,SACE,SACA,SACF;AAAA,UACN,YACE,OAAO,eAAe,YAClB,aACE,SACA,SACF;AAAA,UACN;AAAA,UACA;AAAA,QACD,CAAA;AAAA,MACH;AAAA,MACC,GAAG;AAAA,MAEH;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,UAAU,cAAc;;"}
|
|
@@ -19,8 +19,8 @@ const containerVariants = cva(
|
|
|
19
19
|
transparency: {
|
|
20
20
|
none: "bg-card dark:bg-card-dark",
|
|
21
21
|
full: "",
|
|
22
|
-
sm: "bg-card/
|
|
23
|
-
md: "bg-card/
|
|
22
|
+
sm: "bg-card/90 dark:bg-card-dark/90",
|
|
23
|
+
md: "bg-card/70 dark:bg-card-dark/70",
|
|
24
24
|
lg: "bg-card/40 dark:bg-card-dark/40",
|
|
25
25
|
xl: "bg-card/20 dark:bg-card-dark/20"
|
|
26
26
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../src/components/Container/index.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { type PropsWithChildren, forwardRef, type HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\n\nconst containerVariants = cva(\n 'flex flex-col p-10 text-text backdrop-blur dark:text-text-dark',\n {\n variants: {\n roundedSize: {\n none: 'rounded-none',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n '2xl': 'rounded-2xl',\n '3xl': 'rounded-3xl',\n full: 'rounded-full',\n },\n transparency: {\n none: 'bg-card dark:bg-card-dark',\n full: '',\n sm: 'bg-card/
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../src/components/Container/index.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { type PropsWithChildren, forwardRef, type HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\n\nconst containerVariants = cva(\n 'flex flex-col p-10 text-text backdrop-blur dark:text-text-dark',\n {\n variants: {\n roundedSize: {\n none: 'rounded-none',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n '2xl': 'rounded-2xl',\n '3xl': 'rounded-3xl',\n full: 'rounded-full',\n },\n transparency: {\n none: 'bg-card dark:bg-card-dark',\n full: '',\n sm: 'bg-card/90 dark:bg-card-dark/90',\n md: 'bg-card/70 dark:bg-card-dark/70',\n lg: 'bg-card/40 dark:bg-card-dark/40',\n xl: 'bg-card/20 dark:bg-card-dark/20',\n },\n padding: {\n none: 'p-0',\n sm: 'p-1',\n md: 'p-2',\n lg: 'p-3',\n xl: 'p-4',\n },\n separator: {\n without: '',\n x: 'divide-x divide-dashed divide-text/20 dark:divide-text-dark/20',\n y: 'divide-y divide-dashed divide-text/20 dark:divide-text-dark/20',\n both: 'divide-x divide-y divide-dashed divide-text/20 dark:divide-text-dark/20',\n },\n border: {\n none: '',\n with: 'border-[1.5px]',\n },\n borderColor: {\n primary: 'border-primary dark:border-primary-dark',\n secondary: 'border-secondary dark:border-secondary-dark',\n neutral: 'border-neutral dark:border-neutral-dark',\n text: 'border-text dark:border-text-dark',\n },\n background: {\n none: 'bg-none',\n with: '',\n },\n gap: {\n none: 'gap-0',\n sm: 'gap-1',\n md: 'gap-3',\n lg: 'gap-5',\n xl: 'gap-8',\n '2xl': 'gap-10',\n },\n },\n\n defaultVariants: {\n roundedSize: 'md',\n border: 'none',\n borderColor: 'text',\n transparency: 'md',\n padding: 'none',\n separator: 'without',\n gap: 'none',\n },\n }\n);\n\nexport type ContainerProps = PropsWithChildren<\n Omit<VariantProps<typeof containerVariants>, 'border' | 'background'>\n> &\n HTMLAttributes<HTMLDivElement> & {\n border?: boolean;\n background?: boolean;\n };\n\nexport const Container = forwardRef<HTMLDivElement, ContainerProps>(\n (\n {\n children,\n roundedSize,\n padding,\n transparency,\n separator,\n className,\n border,\n borderColor,\n background,\n ...props\n },\n ref\n ) => (\n <div\n ref={ref}\n className={cn(\n containerVariants({\n roundedSize,\n transparency,\n padding,\n separator,\n border:\n typeof border === 'boolean'\n ? border\n ? 'with'\n : 'none'\n : undefined,\n background:\n typeof background === 'boolean'\n ? background\n ? 'with'\n : 'none'\n : undefined,\n borderColor,\n className,\n })\n )}\n {...props}\n >\n {children}\n </div>\n )\n);\n\nContainer.displayName = 'Container';\n"],"names":["jsx"],"mappings":";;;;AAIA,MAAM,oBAAoB;AAAA,EACxB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,aAAa;AAAA,QACX,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,OAAO;AAAA,QACP,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,MACA,SAAS;AAAA,QACP,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,MACA,WAAW;AAAA,QACT,SAAS;AAAA,QACT,GAAG;AAAA,QACH,GAAG;AAAA,QACH,MAAM;AAAA,MACR;AAAA,MACA,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,MACA,aAAa;AAAA,QACX,SAAS;AAAA,QACT,WAAW;AAAA,QACX,SAAS;AAAA,QACT,MAAM;AAAA,MACR;AAAA,MACA,YAAY;AAAA,QACV,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,MACA,KAAK;AAAA,QACH,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,OAAO;AAAA,MAAA;AAAA,IAEX;AAAA,IAEA,iBAAiB;AAAA,MACf,aAAa;AAAA,MACb,QAAQ;AAAA,MACR,aAAa;AAAA,MACb,cAAc;AAAA,MACd,SAAS;AAAA,MACT,WAAW;AAAA,MACX,KAAK;AAAA,IAAA;AAAA,EACP;AAEJ;AAUO,MAAM,YAAY;AAAA,EACvB,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,KAEL,QAEAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT,kBAAkB;AAAA,UAChB;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,QACE,OAAO,WAAW,YACd,SACE,SACA,SACF;AAAA,UACN,YACE,OAAO,eAAe,YAClB,aACE,SACA,SACF;AAAA,UACN;AAAA,UACA;AAAA,QACD,CAAA;AAAA,MACH;AAAA,MACC,GAAG;AAAA,MAEH;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,UAAU,cAAc;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidDictionaryChangeButtons.cjs","sources":["../../../src/components/DictionaryEditor/ValidDictionaryChangeButtons.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport type { Dictionary } from '@intlayer/core';\nimport { ArrowUpFromLine, RotateCcw, Save } from 'lucide-react';\nimport { useMemo, type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { useShallow } from 'zustand/react/shallow';\nimport { usePushDictionaries } from '../../hooks';\nimport { Form, useForm } from '../Form';\nimport { useEditedContentStore } from './useEditedContentStore';\nimport { validDictionaryChangeButtonsContent } from './validDictionaryChangeButtons.content';\nimport { getValidDictionaryChangeButtonsSchemaSchema } from './validDictionaryChangeButtonsSchema';\n\ntype ValidDictionaryChangeButtonsProps = {\n dictionary: Dictionary;\n};\n\nexport const ValidDictionaryChangeButtons: FC<\n ValidDictionaryChangeButtonsProps\n> = ({ dictionary }) => {\n const ValidDictionaryChangeButtonsSchemaSchema =\n getValidDictionaryChangeButtonsSchemaSchema();\n\n const { resetButton, saveButton, publishButton } = useDictionary(\n validDictionaryChangeButtonsContent\n );\n\n const { pushDictionaries } = usePushDictionaries();\n\n const { editedContent, restoreEditedContent } = useEditedContentStore(\n useShallow((s) => ({\n editedContent: s.editedContent,\n restoreEditedContent: s.restoreEditedContent,\n }))\n );\n const { form, isSubmitting } = useForm(\n ValidDictionaryChangeButtonsSchemaSchema\n );\n\n const editedDictionary = useMemo(\n () => editedContent[dictionary.key],\n [editedContent, dictionary.key]\n );\n\n const isEdited = useMemo(\n () =>\n editedDictionary &&\n JSON.stringify(editedDictionary?.content) !==\n JSON.stringify(dictionary?.content),\n [editedDictionary, dictionary]\n );\n\n const isLocalDictionary = useMemo(\n () => typeof (dictionary as DistantDictionary)?._id === 'undefined',\n [dictionary]\n );\n\n const onSubmitSuccess = async () => {\n await pushDictionaries([\n {\n ...dictionary,\n ...editedContent[dictionary.key],\n },\n ]);\n };\n\n return (\n <div className=\"mb-4\">\n <Form\n className=\"flex w-full flex-row flex-wrap justify-end gap-3\"\n {...form}\n schema={ValidDictionaryChangeButtonsSchemaSchema}\n onSubmitSuccess={onSubmitSuccess}\n >\n {isEdited && (\n <Form.Button\n type=\"button\"\n label={resetButton.label.value}\n disabled={!isEdited || isSubmitting}\n className=\"ml-auto\"\n Icon={RotateCcw}\n variant=\"outline\"\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n onClick={() => restoreEditedContent(dictionary.key)}\n >\n {resetButton.text}\n </Form.Button>\n )}\n {isLocalDictionary ? (\n <Form.Button\n type=\"submit\"\n label={publishButton.label.value}\n disabled={!isEdited || isSubmitting}\n Icon={ArrowUpFromLine}\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n >\n {publishButton.text}\n </Form.Button>\n ) : (\n isEdited && (\n <Form.Button\n type=\"submit\"\n label={saveButton.label.value}\n disabled={!isEdited || isSubmitting}\n Icon={Save}\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n >\n {saveButton.text}\n </Form.Button>\n )\n )}\n </Form>\n </div>\n );\n};\n"],"names":["getValidDictionaryChangeButtonsSchemaSchema","useDictionary","validDictionaryChangeButtonsContent","usePushDictionaries","useEditedContentStore","useShallow","useForm","useMemo","jsx","jsxs","Form","RotateCcw","ArrowUpFromLine","Save"],"mappings":";;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"ValidDictionaryChangeButtons.cjs","sources":["../../../src/components/DictionaryEditor/ValidDictionaryChangeButtons.tsx"],"sourcesContent":["'use client';\n\nimport { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport type { Dictionary } from '@intlayer/core';\nimport { ArrowUpFromLine, RotateCcw, Save } from 'lucide-react';\nimport { useMemo, type FC } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { useShallow } from 'zustand/react/shallow';\nimport { usePushDictionaries } from '../../hooks';\nimport { Form, useForm } from '../Form';\nimport { useEditedContentStore } from './useEditedContentStore';\nimport { validDictionaryChangeButtonsContent } from './validDictionaryChangeButtons.content';\nimport { getValidDictionaryChangeButtonsSchemaSchema } from './validDictionaryChangeButtonsSchema';\n\ntype ValidDictionaryChangeButtonsProps = {\n dictionary: Dictionary;\n};\n\nexport const ValidDictionaryChangeButtons: FC<\n ValidDictionaryChangeButtonsProps\n> = ({ dictionary }) => {\n const ValidDictionaryChangeButtonsSchemaSchema =\n getValidDictionaryChangeButtonsSchemaSchema();\n\n const { resetButton, saveButton, publishButton } = useDictionary(\n validDictionaryChangeButtonsContent\n );\n\n const { pushDictionaries } = usePushDictionaries();\n\n const { editedContent, restoreEditedContent } = useEditedContentStore(\n useShallow((s) => ({\n editedContent: s.editedContent,\n restoreEditedContent: s.restoreEditedContent,\n }))\n );\n const { form, isSubmitting } = useForm(\n ValidDictionaryChangeButtonsSchemaSchema\n );\n\n const editedDictionary = useMemo(\n () => editedContent[dictionary.key],\n [editedContent, dictionary.key]\n );\n\n const isEdited = useMemo(\n () =>\n editedDictionary &&\n JSON.stringify(editedDictionary?.content) !==\n JSON.stringify(dictionary?.content),\n [editedDictionary, dictionary]\n );\n\n const isLocalDictionary = useMemo(\n () => typeof (dictionary as DistantDictionary)?._id === 'undefined',\n [dictionary]\n );\n\n const onSubmitSuccess = async () => {\n await pushDictionaries([\n {\n ...dictionary,\n ...editedContent[dictionary.key],\n },\n ]);\n };\n\n return (\n <div className=\"mb-4\">\n <Form\n className=\"flex w-full flex-row flex-wrap justify-end gap-3\"\n {...form}\n schema={ValidDictionaryChangeButtonsSchemaSchema}\n onSubmitSuccess={onSubmitSuccess}\n >\n {isEdited && (\n <Form.Button\n type=\"button\"\n label={resetButton.label.value}\n disabled={!isEdited || isSubmitting}\n className=\"ml-auto\"\n Icon={RotateCcw}\n variant=\"outline\"\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n onClick={() => restoreEditedContent(dictionary.key)}\n >\n {resetButton.text}\n </Form.Button>\n )}\n {isLocalDictionary ? (\n <Form.Button\n type=\"submit\"\n label={publishButton.label.value}\n disabled={!isEdited || isSubmitting}\n Icon={ArrowUpFromLine}\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n >\n {publishButton.text}\n </Form.Button>\n ) : (\n isEdited && (\n <Form.Button\n type=\"submit\"\n label={saveButton.label.value}\n disabled={!isEdited || isSubmitting}\n Icon={Save}\n color=\"text\"\n isFullWidth\n isLoading={isSubmitting}\n >\n {saveButton.text}\n </Form.Button>\n )\n )}\n </Form>\n </div>\n );\n};\n"],"names":["getValidDictionaryChangeButtonsSchemaSchema","useDictionary","validDictionaryChangeButtonsContent","usePushDictionaries","useEditedContentStore","useShallow","useForm","useMemo","jsx","jsxs","Form","RotateCcw","ArrowUpFromLine","Save"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBO,MAAM,+BAET,CAAC,EAAE,iBAAiB;AACtB,QAAM,2CACJA,+DAAAA,4CAA4C;AAE9C,QAAM,EAAE,aAAa,YAAY,cAAkB,IAAAC,cAAA;AAAA,IACjDC,iEAAAA;AAAAA,EACF;AAEM,QAAA,EAAE,iBAAiB,IAAIC,2CAAoB;AAE3C,QAAA,EAAE,eAAe,qBAAA,IAAyBC,kDAAA;AAAA,IAC9CC,QAAA,WAAW,CAAC,OAAO;AAAA,MACjB,eAAe,EAAE;AAAA,MACjB,sBAAsB,EAAE;AAAA,IAAA,EACxB;AAAA,EACJ;AACM,QAAA,EAAE,MAAM,aAAA,IAAiBC,yBAAA;AAAA,IAC7B;AAAA,EACF;AAEA,QAAM,mBAAmBC,WAAA;AAAA,IACvB,MAAM,cAAc,WAAW,GAAG;AAAA,IAClC,CAAC,eAAe,WAAW,GAAG;AAAA,EAChC;AAEA,QAAM,WAAWA,WAAA;AAAA,IACf,MACE,oBACA,KAAK,UAAU,kBAAkB,OAAO,MACtC,KAAK,UAAU,YAAY,OAAO;AAAA,IACtC,CAAC,kBAAkB,UAAU;AAAA,EAC/B;AAEA,QAAM,oBAAoBA,WAAA;AAAA,IACxB,MAAM,OAAQ,YAAkC,QAAQ;AAAA,IACxD,CAAC,UAAU;AAAA,EACb;AAEA,Q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A,IAAA;AAAA,EAAA,GAIR;AAEJ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidDictionaryChangeButtons.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/ValidDictionaryChangeButtons.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ValidDictionaryChangeButtons.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/ValidDictionaryChangeButtons.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAUzC,KAAK,iCAAiC,GAAG;IACvC,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,EAAE,CAC3C,iCAAiC,CAsGlC,CAAC"}
|