@intlayer/design-system 3.3.4 → 3.3.6

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.
Files changed (106) hide show
  1. package/dist/.vite/manifest.json +20 -0
  2. package/dist/components/Auth/SignInForm/SignInForm.cjs +2 -0
  3. package/dist/components/Auth/SignInForm/SignInForm.cjs.map +1 -1
  4. package/dist/components/Auth/SignInForm/SignInForm.d.ts.map +1 -1
  5. package/dist/components/Auth/SignInForm/SignInForm.mjs +2 -0
  6. package/dist/components/Auth/SignInForm/SignInForm.mjs.map +1 -1
  7. package/dist/components/Button/Button.cjs +7 -7
  8. package/dist/components/Button/Button.cjs.map +1 -1
  9. package/dist/components/Button/Button.mjs +7 -7
  10. package/dist/components/Button/Button.mjs.map +1 -1
  11. package/dist/components/DictionaryEditor/DictionaryEditor.cjs +9 -6
  12. package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
  13. package/dist/components/DictionaryEditor/DictionaryEditor.d.ts.map +1 -1
  14. package/dist/components/DictionaryEditor/DictionaryEditor.mjs +9 -6
  15. package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
  16. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs +3 -2
  17. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
  18. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.d.ts.map +1 -1
  19. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs +3 -2
  20. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
  21. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs +6 -3
  22. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
  23. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts.map +1 -1
  24. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs +6 -3
  25. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
  26. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +3 -2
  27. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
  28. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
  29. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +3 -2
  30. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
  31. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs +12 -9
  32. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs.map +1 -1
  33. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts.map +1 -1
  34. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs +12 -9
  35. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs.map +1 -1
  36. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs +13 -4
  37. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs.map +1 -1
  38. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.d.ts.map +1 -1
  39. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs +13 -4
  40. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs.map +1 -1
  41. package/dist/components/DictionaryFieldEditor/JSONEditor.cjs +7 -4
  42. package/dist/components/DictionaryFieldEditor/JSONEditor.cjs.map +1 -1
  43. package/dist/components/DictionaryFieldEditor/JSONEditor.d.ts.map +1 -1
  44. package/dist/components/DictionaryFieldEditor/JSONEditor.mjs +7 -4
  45. package/dist/components/DictionaryFieldEditor/JSONEditor.mjs.map +1 -1
  46. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +10 -3
  47. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
  48. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts.map +1 -1
  49. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +10 -3
  50. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
  51. package/dist/components/DictionaryFieldEditor/NodeEditor.cjs +10 -7
  52. package/dist/components/DictionaryFieldEditor/NodeEditor.cjs.map +1 -1
  53. package/dist/components/DictionaryFieldEditor/NodeEditor.d.ts.map +1 -1
  54. package/dist/components/DictionaryFieldEditor/NodeEditor.mjs +10 -7
  55. package/dist/components/DictionaryFieldEditor/NodeEditor.mjs.map +1 -1
  56. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +6 -3
  57. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
  58. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.d.ts.map +1 -1
  59. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +6 -3
  60. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
  61. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +3 -2
  62. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
  63. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
  64. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +3 -2
  65. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
  66. package/dist/components/Input/Input.cjs +2 -2
  67. package/dist/components/Input/Input.cjs.map +1 -1
  68. package/dist/components/Input/Input.mjs +2 -2
  69. package/dist/components/Input/Input.mjs.map +1 -1
  70. package/dist/components/Link/Link.cjs +1 -1
  71. package/dist/components/Link/Link.cjs.map +1 -1
  72. package/dist/components/Link/Link.mjs +1 -1
  73. package/dist/components/Link/Link.mjs.map +1 -1
  74. package/dist/components/RightDrawer/RightDrawer.cjs +19 -5
  75. package/dist/components/RightDrawer/RightDrawer.cjs.map +1 -1
  76. package/dist/components/RightDrawer/RightDrawer.d.ts +2 -0
  77. package/dist/components/RightDrawer/RightDrawer.d.ts.map +1 -1
  78. package/dist/components/RightDrawer/RightDrawer.mjs +19 -5
  79. package/dist/components/RightDrawer/RightDrawer.mjs.map +1 -1
  80. package/dist/components/RightDrawer/index.cjs +0 -1
  81. package/dist/components/RightDrawer/index.cjs.map +1 -1
  82. package/dist/components/RightDrawer/index.mjs +1 -2
  83. package/dist/components/RightDrawer/useRightDrawerStore.cjs +11 -10
  84. package/dist/components/RightDrawer/useRightDrawerStore.cjs.map +1 -1
  85. package/dist/components/RightDrawer/useRightDrawerStore.d.ts +2 -2
  86. package/dist/components/RightDrawer/useRightDrawerStore.d.ts.map +1 -1
  87. package/dist/components/RightDrawer/useRightDrawerStore.mjs +11 -10
  88. package/dist/components/RightDrawer/useRightDrawerStore.mjs.map +1 -1
  89. package/dist/components/index.cjs +0 -1
  90. package/dist/components/index.cjs.map +1 -1
  91. package/dist/components/index.mjs +1 -2
  92. package/dist/hooks/intlayerAPIHooks.cjs +2 -2
  93. package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
  94. package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
  95. package/dist/hooks/intlayerAPIHooks.mjs +2 -2
  96. package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
  97. package/dist/hooks/useAsync/useAsync.cjs +3 -46
  98. package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
  99. package/dist/hooks/useAsync/useAsync.mjs +3 -46
  100. package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
  101. package/dist/shallow-lhDIFtEp.cjs +48 -0
  102. package/dist/shallow-lhDIFtEp.cjs.map +1 -0
  103. package/dist/shallow-m9BpCkKh.js +49 -0
  104. package/dist/shallow-m9BpCkKh.js.map +1 -0
  105. package/dist/tailwind.css +1 -1
  106. package/package.json +14 -14
@@ -75,6 +75,14 @@
75
75
  "file": "jsx-runtime-XHKiWCTo.cjs",
76
76
  "name": "jsx-runtime"
77
77
  },
78
+ "_shallow-lhDIFtEp.cjs": {
79
+ "file": "shallow-lhDIFtEp.cjs",
80
+ "name": "shallow"
81
+ },
82
+ "_shallow-m9BpCkKh.js": {
83
+ "file": "shallow-m9BpCkKh.js",
84
+ "name": "shallow"
85
+ },
78
86
  "_zod-BV4nCGJE.js": {
79
87
  "file": "zod-BV4nCGJE.js",
80
88
  "name": "zod"
@@ -567,6 +575,7 @@
567
575
  "isEntry": true,
568
576
  "imports": [
569
577
  "_jsx-runtime-XHKiWCTo.cjs",
578
+ "_shallow-lhDIFtEp.cjs",
570
579
  "_index-BtZWYJhL.cjs",
571
580
  "src/components/DictionaryEditor/useEditedContentStore.ts",
572
581
  "src/components/DictionaryEditor/useEditionPanelStore.ts",
@@ -657,6 +666,7 @@
657
666
  "isEntry": true,
658
667
  "imports": [
659
668
  "_jsx-runtime-XHKiWCTo.cjs",
669
+ "_shallow-lhDIFtEp.cjs",
660
670
  "src/hooks/useScrollBlockage/useScrollBlockageStore.ts",
661
671
  "src/hooks/useAsync/useAsyncStateStore.ts",
662
672
  "src/hooks/intlayerAPIHooks.ts",
@@ -713,6 +723,7 @@
713
723
  "isEntry": true,
714
724
  "imports": [
715
725
  "_jsx-runtime-XHKiWCTo.cjs",
726
+ "_shallow-lhDIFtEp.cjs",
716
727
  "src/hooks/useScrollBlockage/useScrollBlockageStore.ts",
717
728
  "src/hooks/useAsync/useAsyncStateStore.ts",
718
729
  "src/libs/intlayer-api/index.ts",
@@ -816,6 +827,7 @@
816
827
  "isEntry": true,
817
828
  "imports": [
818
829
  "_jsx-runtime-XHKiWCTo.cjs",
830
+ "_shallow-lhDIFtEp.cjs",
819
831
  "src/components/Button/Button.tsx",
820
832
  "src/components/Container/index.tsx",
821
833
  "src/components/DictionaryEditor/useEditedContentStore.ts",
@@ -845,6 +857,7 @@
845
857
  "isEntry": true,
846
858
  "imports": [
847
859
  "_jsx-runtime-XHKiWCTo.cjs",
860
+ "_shallow-lhDIFtEp.cjs",
848
861
  "src/components/EditableField/EditableFieldInput.tsx",
849
862
  "src/components/EditableField/EditableFieldTextArea.tsx",
850
863
  "src/utils/camelCase.ts",
@@ -874,6 +887,7 @@
874
887
  "isEntry": true,
875
888
  "imports": [
876
889
  "_jsx-runtime-XHKiWCTo.cjs",
890
+ "_shallow-lhDIFtEp.cjs",
877
891
  "src/utils/dictionary.ts",
878
892
  "src/utils/object.ts",
879
893
  "src/components/Button/Button.tsx",
@@ -916,6 +930,7 @@
916
930
  "isEntry": true,
917
931
  "imports": [
918
932
  "_jsx-runtime-XHKiWCTo.cjs",
933
+ "_shallow-lhDIFtEp.cjs",
919
934
  "src/components/ContentEditor/ContentEditorTextArea.tsx",
920
935
  "src/components/DictionaryEditor/useEditedContentStore.ts",
921
936
  "src/components/DictionaryEditor/useEditionPanelStore.ts",
@@ -950,6 +965,7 @@
950
965
  "isEntry": true,
951
966
  "imports": [
952
967
  "_jsx-runtime-XHKiWCTo.cjs",
968
+ "_shallow-lhDIFtEp.cjs",
953
969
  "src/utils/camelCase.ts",
954
970
  "src/utils/dictionary.ts",
955
971
  "src/components/Accordion/Accordion.tsx",
@@ -983,6 +999,7 @@
983
999
  "isEntry": true,
984
1000
  "imports": [
985
1001
  "_jsx-runtime-XHKiWCTo.cjs",
1002
+ "_shallow-lhDIFtEp.cjs",
986
1003
  "src/components/Container/index.tsx",
987
1004
  "src/components/DictionaryEditor/useEditedContentStore.ts",
988
1005
  "src/components/DictionaryEditor/useEditionPanelStore.ts",
@@ -1010,6 +1027,7 @@
1010
1027
  "isEntry": true,
1011
1028
  "imports": [
1012
1029
  "_jsx-runtime-XHKiWCTo.cjs",
1030
+ "_shallow-lhDIFtEp.cjs",
1013
1031
  "src/utils/dictionary.ts",
1014
1032
  "src/components/DictionaryEditor/useEditedContentStore.ts",
1015
1033
  "src/components/DictionaryEditor/useEditionPanelStore.ts",
@@ -1036,6 +1054,7 @@
1036
1054
  "isEntry": true,
1037
1055
  "imports": [
1038
1056
  "_jsx-runtime-XHKiWCTo.cjs",
1057
+ "_shallow-lhDIFtEp.cjs",
1039
1058
  "src/hooks/useScrollBlockage/useScrollBlockageStore.ts",
1040
1059
  "src/hooks/useAsync/useAsyncStateStore.ts",
1041
1060
  "src/hooks/intlayerAPIHooks.ts",
@@ -2364,6 +2383,7 @@
2364
2383
  "src": "src/hooks/useAsync/useAsync.ts",
2365
2384
  "isEntry": true,
2366
2385
  "imports": [
2386
+ "_shallow-lhDIFtEp.cjs",
2367
2387
  "src/hooks/useAsync/useAsyncStateStore.ts"
2368
2388
  ]
2369
2389
  },
@@ -57,6 +57,7 @@ const SignInForm = ({
57
57
  variant: "link",
58
58
  label: signInContent.forgotPasswordLink.ariaLabel,
59
59
  color: "text",
60
+ size: "sm",
60
61
  onClick: onClickForgotPassword,
61
62
  children: signInContent.forgotPasswordLink.text
62
63
  }
@@ -80,6 +81,7 @@ const SignInForm = ({
80
81
  variant: "link",
81
82
  label: signInContent.signUpLink.ariaLabel,
82
83
  color: "text",
84
+ size: "sm",
83
85
  onClick: onClickSignUp,
84
86
  children: signInContent.signUpLink.text
85
87
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SignInForm.cjs","sources":["../../../../src/components/Auth/SignInForm/SignInForm.tsx"],"sourcesContent":["'use client';\n\nimport type { FC } from 'react';\nimport { Form, useForm } from '../../Form';\nimport { ExternalsLoginButtons } from '../ExternalsLoginButtons';\nimport { getSignInContent } from './index.content';\nimport { getSignInSchema, type SignIn } from './SignInSchema';\n\ntype SignInFormProps = {\n onSubmitSuccess: (data: SignIn) => Promise<void>;\n onClickForgotPassword: () => void;\n onClickSignUp: () => void;\n onSubmitError?: (error: Error) => void;\n};\n\nexport const SignInForm: FC<SignInFormProps> = ({\n onSubmitSuccess,\n onSubmitError,\n onClickForgotPassword,\n onClickSignUp,\n}) => {\n const SignInSchema = getSignInSchema();\n const { form, isSubmitting } = useForm(SignInSchema);\n const signInContent = getSignInContent();\n\n return (\n <>\n <Form\n schema={SignInSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n autoComplete\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.Input\n name=\"email\"\n label={signInContent.emailInput.label}\n placeholder={signInContent.emailInput.placeholder}\n isRequired\n autoComplete=\"email\"\n />\n\n <Form.InputPassword\n name=\"password\"\n label={signInContent.passwordInput.label}\n placeholder={signInContent.passwordInput.placeholder}\n isRequired\n autoComplete=\"current-password\"\n />\n </div>\n\n <Form.Button\n className=\"ml-auto mt-2 block\"\n variant=\"link\"\n label={signInContent.forgotPasswordLink.ariaLabel}\n color=\"text\"\n onClick={onClickForgotPassword}\n >\n {signInContent.forgotPasswordLink.text}\n </Form.Button>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n label={signInContent.loginButton.ariaLabel}\n >\n {signInContent.loginButton.text}\n </Form.Button>\n\n <span className=\"text-neutral dark:text-neutral-dark m-auto mt-3 flex w-full items-center justify-center text-xs\">\n {signInContent.signUpLink.message}\n <Form.Button\n variant=\"link\"\n label={signInContent.signUpLink.ariaLabel}\n color=\"text\"\n onClick={onClickSignUp}\n >\n {signInContent.signUpLink.text}\n </Form.Button>\n </span>\n </Form>\n <ExternalsLoginButtons />\n </>\n );\n};\n"],"names":["getSignInSchema","useForm","getSignInContent","jsxs","Fragment","Form","jsx","ExternalsLoginButtons"],"mappings":";;;;;;;;;;AAeO,MAAM,aAAkC,CAAC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,eAAeA,wCAAAA;AACrB,QAAM,EAAE,MAAM,aAAa,IAAIC,iCAAQ,YAAY;AACnD,QAAM,gBAAgBC,yCAAAA;AAEtB,SAEIC,2BAAA,kBAAA,KAAAC,uCAAA,EAAA,UAAA;AAAA,IAAAD,2BAAA,kBAAA;AAAA,MAACE,sCAAA;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR;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;AAAA,gBACN,SAAS;AAAA,gBAER,wBAAc,WAAW;AAAA,cAAA;AAAA,YAC5B;AAAA,UAAA,GACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,qDACCE,4DAAsB,uBAAA,EAAA;AAAA,EACzB,EAAA,CAAA;AAEJ;;"}
1
+ {"version":3,"file":"SignInForm.cjs","sources":["../../../../src/components/Auth/SignInForm/SignInForm.tsx"],"sourcesContent":["'use client';\n\nimport type { FC } from 'react';\nimport { Form, useForm } from '../../Form';\nimport { ExternalsLoginButtons } from '../ExternalsLoginButtons';\nimport { getSignInContent } from './index.content';\nimport { getSignInSchema, type SignIn } from './SignInSchema';\n\ntype SignInFormProps = {\n onSubmitSuccess: (data: SignIn) => Promise<void>;\n onClickForgotPassword: () => void;\n onClickSignUp: () => void;\n onSubmitError?: (error: Error) => void;\n};\n\nexport const SignInForm: FC<SignInFormProps> = ({\n onSubmitSuccess,\n onSubmitError,\n onClickForgotPassword,\n onClickSignUp,\n}) => {\n const SignInSchema = getSignInSchema();\n const { form, isSubmitting } = useForm(SignInSchema);\n const signInContent = getSignInContent();\n\n return (\n <>\n <Form\n schema={SignInSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n autoComplete\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.Input\n name=\"email\"\n label={signInContent.emailInput.label}\n placeholder={signInContent.emailInput.placeholder}\n isRequired\n autoComplete=\"email\"\n />\n\n <Form.InputPassword\n name=\"password\"\n label={signInContent.passwordInput.label}\n placeholder={signInContent.passwordInput.placeholder}\n isRequired\n autoComplete=\"current-password\"\n />\n </div>\n\n <Form.Button\n className=\"ml-auto mt-2 block\"\n variant=\"link\"\n label={signInContent.forgotPasswordLink.ariaLabel}\n color=\"text\"\n size=\"sm\"\n onClick={onClickForgotPassword}\n >\n {signInContent.forgotPasswordLink.text}\n </Form.Button>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n label={signInContent.loginButton.ariaLabel}\n >\n {signInContent.loginButton.text}\n </Form.Button>\n\n <span className=\"text-neutral dark:text-neutral-dark m-auto mt-3 flex w-full items-center justify-center text-xs\">\n {signInContent.signUpLink.message}\n <Form.Button\n variant=\"link\"\n label={signInContent.signUpLink.ariaLabel}\n color=\"text\"\n size=\"sm\"\n onClick={onClickSignUp}\n >\n {signInContent.signUpLink.text}\n </Form.Button>\n </span>\n </Form>\n <ExternalsLoginButtons />\n </>\n );\n};\n"],"names":["getSignInSchema","useForm","getSignInContent","jsxs","Fragment","Form","jsx","ExternalsLoginButtons"],"mappings":";;;;;;;;;;AAeO,MAAM,aAAkC,CAAC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,eAAeA,wCAAAA;AACrB,QAAM,EAAE,MAAM,aAAa,IAAIC,iCAAQ,YAAY;AACnD,QAAM,gBAAgBC,yCAAAA;AAEtB,SAEIC,2BAAA,kBAAA,KAAAC,uCAAA,EAAA,UAAA;AAAA,IAAAD,2BAAA,kBAAA;AAAA,MAACE,sCAAA;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR;AAAA,QACA;AAAA,QACA,cAAY;AAAA,QACZ,WAAU;AAAA,QACT,GAAG;AAAA,QAEJ,UAAA;AAAA,UAACF,2BAAAA,kBAAAA,KAAA,OAAA,EAAI,WAAU,yBACb,UAAA;AAAA,YAAAG,2BAAA,kBAAA;AAAA,cAACD,sCAAAA,KAAK;AAAA,cAAL;AAAA,gBACC,MAAK;AAAA,gBACL,OAAO,cAAc,WAAW;AAAA,gBAChC,aAAa,cAAc,WAAW;AAAA,gBACtC,YAAU;AAAA,gBACV,cAAa;AAAA,cAAA;AAAA,YACf;AAAA,YAEAC,2BAAA,kBAAA;AAAA,cAACD,sCAAAA,KAAK;AAAA,cAAL;AAAA,gBACC,MAAK;AAAA,gBACL,OAAO,cAAc,cAAc;AAAA,gBACnC,aAAa,cAAc,cAAc;AAAA,gBACzC,YAAU;AAAA,gBACV,cAAa;AAAA,cAAA;AAAA,YACf;AAAA,UAAA,GACF;AAAA,UAEAC,2BAAA,kBAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,WAAU;AAAA,cACV,SAAQ;AAAA,cACR,OAAO,cAAc,mBAAmB;AAAA,cACxC,OAAM;AAAA,cACN,MAAK;AAAA,cACL,SAAS;AAAA,cAER,wBAAc,mBAAmB;AAAA,YAAA;AAAA,UACpC;AAAA,UAEAC,2BAAA,kBAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,WAAU;AAAA,cACV,MAAK;AAAA,cACL,OAAM;AAAA,cACN,WAAW;AAAA,cACX,OAAO,cAAc,YAAY;AAAA,cAEhC,wBAAc,YAAY;AAAA,YAAA;AAAA,UAC7B;AAAA,UAEAF,2BAAAA,kBAAAA,KAAC,QAAK,EAAA,WAAU,mGACb,UAAA;AAAA,YAAA,cAAc,WAAW;AAAA,YAC1BG,2BAAA,kBAAA;AAAA,cAACD,sCAAAA,KAAK;AAAA,cAAL;AAAA,gBACC,SAAQ;AAAA,gBACR,OAAO,cAAc,WAAW;AAAA,gBAChC,OAAM;AAAA,gBACN,MAAK;AAAA,gBACL,SAAS;AAAA,gBAER,wBAAc,WAAW;AAAA,cAAA;AAAA,YAC5B;AAAA,UAAA,GACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,qDACCE,4DAAsB,uBAAA,EAAA;AAAA,EACzB,EAAA,CAAA;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SignInForm.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/SignInForm/SignInForm.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,EAAmB,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE9D,KAAK,eAAe,GAAG;IACrB,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAClC,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAyE1C,CAAC"}
1
+ {"version":3,"file":"SignInForm.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/SignInForm/SignInForm.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,EAAmB,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE9D,KAAK,eAAe,GAAG;IACrB,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAClC,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA2E1C,CAAC"}
@@ -55,6 +55,7 @@ const SignInForm = ({
55
55
  variant: "link",
56
56
  label: signInContent.forgotPasswordLink.ariaLabel,
57
57
  color: "text",
58
+ size: "sm",
58
59
  onClick: onClickForgotPassword,
59
60
  children: signInContent.forgotPasswordLink.text
60
61
  }
@@ -78,6 +79,7 @@ const SignInForm = ({
78
79
  variant: "link",
79
80
  label: signInContent.signUpLink.ariaLabel,
80
81
  color: "text",
82
+ size: "sm",
81
83
  onClick: onClickSignUp,
82
84
  children: signInContent.signUpLink.text
83
85
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SignInForm.mjs","sources":["../../../../src/components/Auth/SignInForm/SignInForm.tsx"],"sourcesContent":["'use client';\n\nimport type { FC } from 'react';\nimport { Form, useForm } from '../../Form';\nimport { ExternalsLoginButtons } from '../ExternalsLoginButtons';\nimport { getSignInContent } from './index.content';\nimport { getSignInSchema, type SignIn } from './SignInSchema';\n\ntype SignInFormProps = {\n onSubmitSuccess: (data: SignIn) => Promise<void>;\n onClickForgotPassword: () => void;\n onClickSignUp: () => void;\n onSubmitError?: (error: Error) => void;\n};\n\nexport const SignInForm: FC<SignInFormProps> = ({\n onSubmitSuccess,\n onSubmitError,\n onClickForgotPassword,\n onClickSignUp,\n}) => {\n const SignInSchema = getSignInSchema();\n const { form, isSubmitting } = useForm(SignInSchema);\n const signInContent = getSignInContent();\n\n return (\n <>\n <Form\n schema={SignInSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n autoComplete\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.Input\n name=\"email\"\n label={signInContent.emailInput.label}\n placeholder={signInContent.emailInput.placeholder}\n isRequired\n autoComplete=\"email\"\n />\n\n <Form.InputPassword\n name=\"password\"\n label={signInContent.passwordInput.label}\n placeholder={signInContent.passwordInput.placeholder}\n isRequired\n autoComplete=\"current-password\"\n />\n </div>\n\n <Form.Button\n className=\"ml-auto mt-2 block\"\n variant=\"link\"\n label={signInContent.forgotPasswordLink.ariaLabel}\n color=\"text\"\n onClick={onClickForgotPassword}\n >\n {signInContent.forgotPasswordLink.text}\n </Form.Button>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n label={signInContent.loginButton.ariaLabel}\n >\n {signInContent.loginButton.text}\n </Form.Button>\n\n <span className=\"text-neutral dark:text-neutral-dark m-auto mt-3 flex w-full items-center justify-center text-xs\">\n {signInContent.signUpLink.message}\n <Form.Button\n variant=\"link\"\n label={signInContent.signUpLink.ariaLabel}\n color=\"text\"\n onClick={onClickSignUp}\n >\n {signInContent.signUpLink.text}\n </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,WAAW;AAAA,cACX,OAAO,cAAc,YAAY;AAAA,cAEhC,wBAAc,YAAY;AAAA,YAAA;AAAA,UAC7B;AAAA,UAEAF,kCAAAA,KAAC,QAAK,EAAA,WAAU,mGACb,UAAA;AAAA,YAAA,cAAc,WAAW;AAAA,YAC1BE,kCAAA;AAAA,cAAC,KAAK;AAAA,cAAL;AAAA,gBACC,SAAQ;AAAA,gBACR,OAAO,cAAc,WAAW;AAAA,gBAChC,OAAM;AAAA,gBACN,SAAS;AAAA,gBAER,wBAAc,WAAW;AAAA,cAAA;AAAA,YAC5B;AAAA,UAAA,GACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,0CACC,uBAAsB,EAAA;AAAA,EACzB,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"SignInForm.mjs","sources":["../../../../src/components/Auth/SignInForm/SignInForm.tsx"],"sourcesContent":["'use client';\n\nimport type { FC } from 'react';\nimport { Form, useForm } from '../../Form';\nimport { ExternalsLoginButtons } from '../ExternalsLoginButtons';\nimport { getSignInContent } from './index.content';\nimport { getSignInSchema, type SignIn } from './SignInSchema';\n\ntype SignInFormProps = {\n onSubmitSuccess: (data: SignIn) => Promise<void>;\n onClickForgotPassword: () => void;\n onClickSignUp: () => void;\n onSubmitError?: (error: Error) => void;\n};\n\nexport const SignInForm: FC<SignInFormProps> = ({\n onSubmitSuccess,\n onSubmitError,\n onClickForgotPassword,\n onClickSignUp,\n}) => {\n const SignInSchema = getSignInSchema();\n const { form, isSubmitting } = useForm(SignInSchema);\n const signInContent = getSignInContent();\n\n return (\n <>\n <Form\n schema={SignInSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n autoComplete\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.Input\n name=\"email\"\n label={signInContent.emailInput.label}\n placeholder={signInContent.emailInput.placeholder}\n isRequired\n autoComplete=\"email\"\n />\n\n <Form.InputPassword\n name=\"password\"\n label={signInContent.passwordInput.label}\n placeholder={signInContent.passwordInput.placeholder}\n isRequired\n autoComplete=\"current-password\"\n />\n </div>\n\n <Form.Button\n className=\"ml-auto mt-2 block\"\n variant=\"link\"\n label={signInContent.forgotPasswordLink.ariaLabel}\n color=\"text\"\n size=\"sm\"\n onClick={onClickForgotPassword}\n >\n {signInContent.forgotPasswordLink.text}\n </Form.Button>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n label={signInContent.loginButton.ariaLabel}\n >\n {signInContent.loginButton.text}\n </Form.Button>\n\n <span className=\"text-neutral dark:text-neutral-dark m-auto mt-3 flex w-full items-center justify-center text-xs\">\n {signInContent.signUpLink.message}\n <Form.Button\n variant=\"link\"\n label={signInContent.signUpLink.ariaLabel}\n color=\"text\"\n size=\"sm\"\n onClick={onClickSignUp}\n >\n {signInContent.signUpLink.text}\n </Form.Button>\n </span>\n </Form>\n <ExternalsLoginButtons />\n </>\n );\n};\n"],"names":["jsxs","Fragment","jsx"],"mappings":";;;;;;;;AAeO,MAAM,aAAkC,CAAC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,eAAe;AACrB,QAAM,EAAE,MAAM,aAAa,IAAI,QAAQ,YAAY;AACnD,QAAM,gBAAgB;AAEtB,SAEIA,kCAAA,KAAAC,4BAAA,EAAA,UAAA;AAAA,IAAAD,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR;AAAA,QACA;AAAA,QACA,cAAY;AAAA,QACZ,WAAU;AAAA,QACT,GAAG;AAAA,QAEJ,UAAA;AAAA,UAACA,kCAAAA,KAAA,OAAA,EAAI,WAAU,yBACb,UAAA;AAAA,YAAAE,kCAAA;AAAA,cAAC,KAAK;AAAA,cAAL;AAAA,gBACC,MAAK;AAAA,gBACL,OAAO,cAAc,WAAW;AAAA,gBAChC,aAAa,cAAc,WAAW;AAAA,gBACtC,YAAU;AAAA,gBACV,cAAa;AAAA,cAAA;AAAA,YACf;AAAA,YAEAA,kCAAA;AAAA,cAAC,KAAK;AAAA,cAAL;AAAA,gBACC,MAAK;AAAA,gBACL,OAAO,cAAc,cAAc;AAAA,gBACnC,aAAa,cAAc,cAAc;AAAA,gBACzC,YAAU;AAAA,gBACV,cAAa;AAAA,cAAA;AAAA,YACf;AAAA,UAAA,GACF;AAAA,UAEAA,kCAAA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,WAAU;AAAA,cACV,SAAQ;AAAA,cACR,OAAO,cAAc,mBAAmB;AAAA,cACxC,OAAM;AAAA,cACN,MAAK;AAAA,cACL,SAAS;AAAA,cAER,wBAAc,mBAAmB;AAAA,YAAA;AAAA,UACpC;AAAA,UAEAA,kCAAA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,WAAU;AAAA,cACV,MAAK;AAAA,cACL,OAAM;AAAA,cACN,WAAW;AAAA,cACX,OAAO,cAAc,YAAY;AAAA,cAEhC,wBAAc,YAAY;AAAA,YAAA;AAAA,UAC7B;AAAA,UAEAF,kCAAAA,KAAC,QAAK,EAAA,WAAU,mGACb,UAAA;AAAA,YAAA,cAAc,WAAW;AAAA,YAC1BE,kCAAA;AAAA,cAAC,KAAK;AAAA,cAAL;AAAA,gBACC,SAAQ;AAAA,gBACR,OAAO,cAAc,WAAW;AAAA,gBAChC,OAAM;AAAA,gBACN,MAAK;AAAA,gBACL,SAAS;AAAA,gBAER,wBAAc,WAAW;AAAA,cAAA;AAAA,YAC5B;AAAA,UAAA,GACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,0CACC,uBAAsB,EAAA;AAAA,EACzB,EAAA,CAAA;AAEJ;"}
@@ -27,10 +27,10 @@ const buttonVariants = classVarianceAuthority.cva(
27
27
  {
28
28
  variants: {
29
29
  size: {
30
- sm: "min-h-8 px-3 text-xs",
31
- md: "min-h-9 px-6 text-base",
32
- lg: "min-h-10 px-8 text-lg",
33
- xl: "min-h-11 px-10 text-xl",
30
+ sm: "min-h-7 px-3 max-md:py-1 text-xs",
31
+ md: "min-h-8 px-6 max-md:py-2 text-sm",
32
+ lg: "min-h-10 px-8 max-md:py-3 text-base",
33
+ xl: "min-h-11 px-10 max-md:py-4 text-lg",
34
34
  "icon-sm": "p-0",
35
35
  "icon-md": "p-0",
36
36
  "icon-lg": "p-0",
@@ -84,9 +84,9 @@ const buttonVariants = classVarianceAuthority.cva(
84
84
  );
85
85
  const Button = require$$0.forwardRef(
86
86
  ({
87
- variant = "default",
88
- size = "sm",
89
- color = "primary",
87
+ variant,
88
+ size,
89
+ color,
90
90
  children,
91
91
  Icon,
92
92
  IconRight,
@@ -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-8 px-3 text-xs',\n md: 'min-h-9 px-6 text-base',\n lg: 'min-h-10 px-8 text-lg',\n xl: 'min-h-11 px-10 text-xl',\n 'icon-sm': 'p-0',\n 'icon-md': 'p-0',\n 'icon-lg': 'p-0',\n 'icon-xl': 'p-0',\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=true]: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 = 'default',\n size = 'sm',\n color = 'primary',\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}\n aria-selected={isActive}\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\">{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,IACb;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,MAAM;AAAA,EACR;AACF,CAAC;AAED,MAAM,iBAAiBA,uBAAA;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,QACF;AAAA,MACF;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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AAA;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,UAAU,UAAS;AAAA,UAGnC,aACCD,2BAAA,kBAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWC,SAAA;AAAA,gBACT,mBAAmB,EAAE,MAAM,WAAW,eAAe;AAAA,gBACrD;AAAA,cACF;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,OAAO,cAAc;;"}
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-0',\n 'icon-lg': 'p-0',\n 'icon-xl': 'p-0',\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=true]: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}\n aria-selected={isActive}\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\">{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,IACb;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,MAAM;AAAA,EACR;AACF,CAAC;AAED,MAAM,iBAAiBA,uBAAA;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,QACF;AAAA,MACF;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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AAmB,EAAE,MAAM,WAAW,eAAe;AAAA,gBACrD;AAAA,cACF;AAAA,cACA;AAAA,YAAA;AAAA,UACF;AAAA,UAEC,OAAO,aAAa,gEAClB,OAAI,EAAA,WAAU,UAAU,UAAS;AAAA,UAGnC,aACCD,2BAAA,kBAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWC,SAAA;AAAA,gBACT,mBAAmB,EAAE,MAAM,WAAW,eAAe;AAAA,gBACrD;AAAA,cACF;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,OAAO,cAAc;;"}
@@ -25,10 +25,10 @@ const buttonVariants = cva(
25
25
  {
26
26
  variants: {
27
27
  size: {
28
- sm: "min-h-8 px-3 text-xs",
29
- md: "min-h-9 px-6 text-base",
30
- lg: "min-h-10 px-8 text-lg",
31
- xl: "min-h-11 px-10 text-xl",
28
+ sm: "min-h-7 px-3 max-md:py-1 text-xs",
29
+ md: "min-h-8 px-6 max-md:py-2 text-sm",
30
+ lg: "min-h-10 px-8 max-md:py-3 text-base",
31
+ xl: "min-h-11 px-10 max-md:py-4 text-lg",
32
32
  "icon-sm": "p-0",
33
33
  "icon-md": "p-0",
34
34
  "icon-lg": "p-0",
@@ -82,9 +82,9 @@ const buttonVariants = cva(
82
82
  );
83
83
  const Button = forwardRef(
84
84
  ({
85
- variant = "default",
86
- size = "sm",
87
- color = "primary",
85
+ variant,
86
+ size,
87
+ color,
88
88
  children,
89
89
  Icon,
90
90
  IconRight,
@@ -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-8 px-3 text-xs',\n md: 'min-h-9 px-6 text-base',\n lg: 'min-h-10 px-8 text-lg',\n xl: 'min-h-11 px-10 text-xl',\n 'icon-sm': 'p-0',\n 'icon-md': 'p-0',\n 'icon-lg': 'p-0',\n 'icon-xl': 'p-0',\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=true]: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 = 'default',\n size = 'sm',\n color = 'primary',\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}\n aria-selected={isActive}\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\">{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,IACb;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,MAAM;AAAA,EACR;AACF,CAAC;AAED,MAAM,iBAAiB;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ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Ae;AAAA,QACf,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,kCAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAW;AAAA,gBACT,mBAAmB,EAAE,MAAM,WAAW,eAAe;AAAA,gBACrD;AAAA,cACF;AAAA,YAAA;AAAA,UACF;AAAA,UAGFA,kCAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAW;AAAA,gBACT,mBAAmB,EAAE,MAAM,WAAW,eAAe;AAAA,gBACrD;AAAA,cACF;AAAA,cACA;AAAA,YAAA;AAAA,UACF;AAAA,UAEC,OAAO,aAAa,qDAClB,OAAI,EAAA,WAAU,UAAU,UAAS;AAAA,UAGnC,aACCA,kCAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAW;AAAA,gBACT,mBAAmB,EAAE,MAAM,WAAW,eAAe;AAAA,gBACrD;AAAA,cACF;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,OAAO,cAAc;"}
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-0',\n 'icon-lg': 'p-0',\n 'icon-xl': 'p-0',\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=true]: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}\n aria-selected={isActive}\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\">{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,IACb;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,MAAM;AAAA,EACR;AACF,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;AA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AA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA,CACD;AAAA,QACA,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA,QAAQ,CAAC,aACRC,kCAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAW;AAAA,gBACT,mBAAmB,EAAE,MAAM,WAAW,eAAe;AAAA,gBACrD;AAAA,cACF;AAAA,YAAA;AAAA,UACF;AAAA,UAGFA,kCAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAW;AAAA,gBACT,mBAAmB,EAAE,MAAM,WAAW,eAAe;AAAA,gBACrD;AAAA,cACF;AAAA,cACA;AAAA,YAAA;AAAA,UACF;AAAA,UAEC,OAAO,aAAa,qDAClB,OAAI,EAAA,WAAU,UAAU,UAAS;AAAA,UAGnC,aACCA,kCAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAW;AAAA,gBACT,mBAAmB,EAAE,MAAM,WAAW,eAAe;AAAA,gBACrD;AAAA,cACF;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,OAAO,cAAc;"}
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const jsxRuntime = require("../../jsx-runtime-XHKiWCTo.cjs");
5
5
  const require$$0 = require("react");
6
+ const shallow = require("../../shallow-lhDIFtEp.cjs");
6
7
  const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../index-BtZWYJhL.cjs");
7
8
  const components_DictionaryEditor_useEditedContentStore = require("./useEditedContentStore.cjs");
8
9
  const components_DictionaryEditor_useEditionPanelStore = require("./useEditionPanelStore.cjs");
@@ -11,15 +12,17 @@ const DictionaryEditor = ({
11
12
  dictionary,
12
13
  ...props
13
14
  }) => {
14
- const { addEditedContent, editedContent } = components_DictionaryEditor_useEditedContentStore.useEditedContentStore((s) => ({
15
- addEditedContent: s.addEditedContent,
16
- editedContent: s.editedContent
17
- }));
15
+ const { addEditedContent, editedContent } = components_DictionaryEditor_useEditedContentStore.useEditedContentStore(
16
+ shallow.useShallow((s) => ({
17
+ addEditedContent: s.addEditedContent,
18
+ editedContent: s.editedContent
19
+ }))
20
+ );
18
21
  const { focusedContent, setFocusedContentKeyPath } = components_DictionaryEditor_useEditionPanelStore.useEditionPanelStore(
19
- (s) => ({
22
+ shallow.useShallow((s) => ({
20
23
  focusedContent: s.focusedContent,
21
24
  setFocusedContentKeyPath: s.setFocusedContentKeyPath
22
- })
25
+ }))
23
26
  );
24
27
  const focusedKeyPath = focusedContent?.keyPath;
25
28
  return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "flex h-full flex-col justify-between gap-2", children: [
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryEditor.cjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary, KeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { NodeWrapper } from './NodeWrapper';\nimport { useEditedContentStore } from './useEditedContentStore';\nimport { useEditionPanelStore } from './useEditionPanelStore';\nimport { ValidDictionaryChangeButtons } from './ValidDictionaryChangeButtons';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n onClickEdit?: (keyPath: KeyPath[]) => void;\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n ...props\n}) => {\n const { addEditedContent, editedContent } = useEditedContentStore((s) => ({\n addEditedContent: s.addEditedContent,\n editedContent: s.editedContent,\n }));\n const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(\n (s) => ({\n focusedContent: s.focusedContent,\n setFocusedContentKeyPath: s.setFocusedContentKeyPath,\n })\n );\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex h-full flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n key={JSON.stringify(\n (editedContent[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <ValidDictionaryChangeButtons dictionary={dictionary} />\n </div>\n );\n};\n"],"names":["useEditedContentStore","useEditionPanelStore","jsxs","jsx","createElement","NodeWrapper","ValidDictionaryChangeButtons"],"mappings":";;;;;;;;;AAgBO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,kBAAkB,cAAkB,IAAAA,kDAAA,sBAAsB,CAAC,OAAO;AAAA,IACxE,kBAAkB,EAAE;AAAA,IACpB,eAAe,EAAE;AAAA,EACjB,EAAA;AACI,QAAA,EAAE,gBAAgB,yBAAA,IAA6BC,iDAAA;AAAA,IACnD,CAAC,OAAO;AAAA,MACN,gBAAgB,EAAE;AAAA,MAClB,0BAA0B,EAAE;AAAA,IAAA;AAAA,EAC9B;AAGF,QAAM,iBAAiB,gBAAgB;AAGrC,SAAAC,2BAAA,kBAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAAC,iDAAC,OACC,EAAA,UAAAC,2BAAA;AAAA,MAACC,qDAAA;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV,KAAK,KAAK;AAAA,WACP,cAAc,WAAW,GAAG,KAAK,YAAY;AAAA,QAChD;AAAA,QACA,eAAe,cAAc,WAAW,GAAG,GAAG;AAAA,QAC9C;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACAF,iDAACG,yDAAAA,gCAA6B,YAAwB;AAAA,EACxD,EAAA,CAAA;AAEJ;;"}
1
+ {"version":3,"file":"DictionaryEditor.cjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary, KeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { useShallow } from 'zustand/react/shallow';\nimport { NodeWrapper } from './NodeWrapper';\nimport { useEditedContentStore } from './useEditedContentStore';\nimport { useEditionPanelStore } from './useEditionPanelStore';\nimport { ValidDictionaryChangeButtons } from './ValidDictionaryChangeButtons';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n onClickEdit?: (keyPath: KeyPath[]) => void;\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n ...props\n}) => {\n const { addEditedContent, editedContent } = useEditedContentStore(\n useShallow((s) => ({\n addEditedContent: s.addEditedContent,\n editedContent: s.editedContent,\n }))\n );\n const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(\n useShallow((s) => ({\n focusedContent: s.focusedContent,\n setFocusedContentKeyPath: s.setFocusedContentKeyPath,\n }))\n );\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex h-full flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n key={JSON.stringify(\n (editedContent[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <ValidDictionaryChangeButtons dictionary={dictionary} />\n </div>\n );\n};\n"],"names":["useEditedContentStore","useShallow","useEditionPanelStore","jsxs","jsx","createElement","NodeWrapper","ValidDictionaryChangeButtons"],"mappings":";;;;;;;;;;AAiBO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA,GAAG;AACL,MAAM;AACE,QAAA,EAAE,kBAAkB,cAAA,IAAkBA,kDAAA;AAAA,IAC1CC,QAAA,WAAW,CAAC,OAAO;AAAA,MACjB,kBAAkB,EAAE;AAAA,MACpB,eAAe,EAAE;AAAA,IAAA,EACjB;AAAA,EAAA;AAEE,QAAA,EAAE,gBAAgB,yBAAA,IAA6BC,iDAAA;AAAA,IACnDD,QAAA,WAAW,CAAC,OAAO;AAAA,MACjB,gBAAgB,EAAE;AAAA,MAClB,0BAA0B,EAAE;AAAA,IAAA,EAC5B;AAAA,EAAA;AAGJ,QAAM,iBAAiB,gBAAgB;AAGrC,SAAAE,2BAAA,kBAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAAC,iDAAC,OACC,EAAA,UAAAC,2BAAA;AAAA,MAACC,qDAAA;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV,KAAK,KAAK;AAAA,WACP,cAAc,WAAW,GAAG,KAAK,YAAY;AAAA,QAChD;AAAA,QACA,eAAe,cAAc,WAAW,GAAG,GAAG;AAAA,QAC9C;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACAF,iDAACG,yDAAAA,gCAA6B,YAAwB;AAAA,EACxD,EAAA,CAAA;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,KAAK,qBAAqB,GAAG;IAC3B,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAsCtD,CAAC"}
1
+ {"version":3,"file":"DictionaryEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAOhC,KAAK,qBAAqB,GAAG;IAC3B,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAwCtD,CAAC"}
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { j as jsxRuntimeExports } from "../../jsx-runtime-DaNGiM0W.js";
3
3
  import { createElement } from "react";
4
+ import { u as useShallow } from "../../shallow-m9BpCkKh.js";
4
5
  import { N as NodeWrapper } from "../../index-D9oaKvKC.js";
5
6
  import { useEditedContentStore } from "./useEditedContentStore.mjs";
6
7
  import { useEditionPanelStore } from "./useEditionPanelStore.mjs";
@@ -9,15 +10,17 @@ const DictionaryEditor = ({
9
10
  dictionary,
10
11
  ...props
11
12
  }) => {
12
- const { addEditedContent, editedContent } = useEditedContentStore((s) => ({
13
- addEditedContent: s.addEditedContent,
14
- editedContent: s.editedContent
15
- }));
13
+ const { addEditedContent, editedContent } = useEditedContentStore(
14
+ useShallow((s) => ({
15
+ addEditedContent: s.addEditedContent,
16
+ editedContent: s.editedContent
17
+ }))
18
+ );
16
19
  const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(
17
- (s) => ({
20
+ useShallow((s) => ({
18
21
  focusedContent: s.focusedContent,
19
22
  setFocusedContentKeyPath: s.setFocusedContentKeyPath
20
- })
23
+ }))
21
24
  );
22
25
  const focusedKeyPath = focusedContent?.keyPath;
23
26
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-full flex-col justify-between gap-2", children: [
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryEditor.mjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary, KeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { NodeWrapper } from './NodeWrapper';\nimport { useEditedContentStore } from './useEditedContentStore';\nimport { useEditionPanelStore } from './useEditionPanelStore';\nimport { ValidDictionaryChangeButtons } from './ValidDictionaryChangeButtons';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n onClickEdit?: (keyPath: KeyPath[]) => void;\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n ...props\n}) => {\n const { addEditedContent, editedContent } = useEditedContentStore((s) => ({\n addEditedContent: s.addEditedContent,\n editedContent: s.editedContent,\n }));\n const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(\n (s) => ({\n focusedContent: s.focusedContent,\n setFocusedContentKeyPath: s.setFocusedContentKeyPath,\n })\n );\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex h-full flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n key={JSON.stringify(\n (editedContent[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <ValidDictionaryChangeButtons dictionary={dictionary} />\n </div>\n );\n};\n"],"names":["jsxs","jsx"],"mappings":";;;;;;;AAgBO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,kBAAkB,cAAkB,IAAA,sBAAsB,CAAC,OAAO;AAAA,IACxE,kBAAkB,EAAE;AAAA,IACpB,eAAe,EAAE;AAAA,EACjB,EAAA;AACI,QAAA,EAAE,gBAAgB,yBAAA,IAA6B;AAAA,IACnD,CAAC,OAAO;AAAA,MACN,gBAAgB,EAAE;AAAA,MAClB,0BAA0B,EAAE;AAAA,IAAA;AAAA,EAC9B;AAGF,QAAM,iBAAiB,gBAAgB;AAGrC,SAAAA,kCAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAAC,sCAAC,OACC,EAAA,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV,KAAK,KAAK;AAAA,WACP,cAAc,WAAW,GAAG,KAAK,YAAY;AAAA,QAChD;AAAA,QACA,eAAe,cAAc,WAAW,GAAG,GAAG;AAAA,QAC9C;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACAA,sCAAC,gCAA6B,YAAwB;AAAA,EACxD,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"DictionaryEditor.mjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary, KeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { useShallow } from 'zustand/react/shallow';\nimport { NodeWrapper } from './NodeWrapper';\nimport { useEditedContentStore } from './useEditedContentStore';\nimport { useEditionPanelStore } from './useEditionPanelStore';\nimport { ValidDictionaryChangeButtons } from './ValidDictionaryChangeButtons';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n onClickEdit?: (keyPath: KeyPath[]) => void;\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n ...props\n}) => {\n const { addEditedContent, editedContent } = useEditedContentStore(\n useShallow((s) => ({\n addEditedContent: s.addEditedContent,\n editedContent: s.editedContent,\n }))\n );\n const { focusedContent, setFocusedContentKeyPath } = useEditionPanelStore(\n useShallow((s) => ({\n focusedContent: s.focusedContent,\n setFocusedContentKeyPath: s.setFocusedContentKeyPath,\n }))\n );\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex h-full flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n key={JSON.stringify(\n (editedContent[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <ValidDictionaryChangeButtons dictionary={dictionary} />\n </div>\n );\n};\n"],"names":["jsxs","jsx"],"mappings":";;;;;;;;AAiBO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA,GAAG;AACL,MAAM;AACE,QAAA,EAAE,kBAAkB,cAAA,IAAkB;AAAA,IAC1C,WAAW,CAAC,OAAO;AAAA,MACjB,kBAAkB,EAAE;AAAA,MACpB,eAAe,EAAE;AAAA,IAAA,EACjB;AAAA,EAAA;AAEE,QAAA,EAAE,gBAAgB,yBAAA,IAA6B;AAAA,IACnD,WAAW,CAAC,OAAO;AAAA,MACjB,gBAAgB,EAAE;AAAA,MAClB,0BAA0B,EAAE;AAAA,IAAA,EAC5B;AAAA,EAAA;AAGJ,QAAM,iBAAiB,gBAAgB;AAGrC,SAAAA,kCAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAAC,sCAAC,OACC,EAAA,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV,KAAK,KAAK;AAAA,WACP,cAAc,WAAW,GAAG,KAAK,YAAY;AAAA,QAChD;AAAA,QACA,eAAe,cAAc,WAAW,GAAG,GAAG;AAAA,QAC9C;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACAA,sCAAC,gCAA6B,YAAwB;AAAA,EACxD,EAAA,CAAA;AAEJ;"}
@@ -5,6 +5,7 @@ const jsxRuntime = require("../../jsx-runtime-XHKiWCTo.cjs");
5
5
  const lucideReact = require("lucide-react");
6
6
  const require$$0 = require("react");
7
7
  const reactIntlayer = require("react-intlayer");
8
+ const shallow = require("../../shallow-lhDIFtEp.cjs");
8
9
  require("../../hooks/useScrollBlockage/useScrollBlockageStore.cjs");
9
10
  require("../../hooks/useAsync/useAsyncStateStore.cjs");
10
11
  const hooks_intlayerAPIHooks = require("../../hooks/intlayerAPIHooks.cjs");
@@ -23,10 +24,10 @@ const ValidDictionaryChangeButtons = ({ dictionary }) => {
23
24
  );
24
25
  const { pushDictionaries } = hooks_intlayerAPIHooks.usePushDictionaries();
25
26
  const { editedContent, restoreEditedContent } = components_DictionaryEditor_useEditedContentStore.useEditedContentStore(
26
- (s) => ({
27
+ shallow.useShallow((s) => ({
27
28
  editedContent: s.editedContent,
28
29
  restoreEditedContent: s.restoreEditedContent
29
- })
30
+ }))
30
31
  );
31
32
  const { form, isSubmitting } = components_Form_FormBase.useForm(
32
33
  ValidDictionaryChangeButtonsSchemaSchema
@@ -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 { 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 (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","useForm","useMemo","jsx","jsxs","Form","RotateCcw","ArrowUpFromLine","Save"],"mappings":";;;;;;;;;;;;;;;;;;AAiBO,MAAM,+BAET,CAAC,EAAE,iBAAiB;AACtB,QAAM,2CACJA,+DAAAA;AAEF,QAAM,EAAE,aAAa,YAAY,cAAkB,IAAAC,cAAA;AAAA,IACjDC,iEAAA;AAAA,EAAA;AAGI,QAAA,EAAE,qBAAqBC,uBAAAA;AAEvB,QAAA,EAAE,eAAe,qBAAA,IAAyBC,kDAAA;AAAA,IAC9C,CAAC,OAAO;AAAA,MACN,eAAe,EAAE;AAAA,MACjB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AA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,cAAc,MAAM;AAAA,YAC3B,UAAU,CAAC,YAAY;AAAA,YACvB,MAAME,YAAA;AAAA,YACN,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YAEV,UAAc,cAAA;AAAA,UAAA;AAAA,YAGjB,YACEJ,2BAAA,kBAAA;AAAA,UAACE,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,WAAW,MAAM;AAAA,YACxB,UAAU,CAAC,YAAY;AAAA,YACvB,MAAMG,YAAA;AAAA,YACN,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YAEV,UAAW,WAAA;AAAA,UAAA;AAAA,QACd;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR,EAAA,CAAA;AAEJ;;"}
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":";;;;;;;;;;;;;;;;;;;AAkBO,MAAM,+BAET,CAAC,EAAE,iBAAiB;AACtB,QAAM,2CACJA,+DAAAA;AAEF,QAAM,EAAE,aAAa,YAAY,cAAkB,IAAAC,cAAA;AAAA,IACjDC,iEAAA;AAAA,EAAA;AAGI,QAAA,EAAE,qBAAqBC,uBAAAA;AAEvB,QAAA,EAAE,eAAe,qBAAA,IAAyBC,kDAAA;AAAA,IAC9CC,QAAA,WAAW,CAAC,OAAO;AAAA,MACjB,eAAe,EAAE;AAAA,MACjB,sBAAsB,EAAE;AAAA,IAAA,EACxB;AAAA,EAAA;AAEE,QAAA,EAAE,MAAM,aAAA,IAAiBC,yBAAA;AAAA,IAC7B;AAAA,EAAA;AAGF,QAAM,mBAAmBC,WAAA;AAAA,IACvB,MAAM,cAAc,WAAW,GAAG;AAAA,IAClC,CAAC,eAAe,WAAW,GAAG;AAAA,EAAA;AAGhC,QAAM,WAAWA,WAAA;AAAA,IACf,MACE,oBACA,KAAK,UAAU,kBAAkB,OAAO,MACtC,KAAK,UAAU,YAAY,OAAO;AAAA,IACtC,CAAC,kBAAkB,UAAU;AAAA,EAAA;AAG/B,QAAM,oBAAoBA,WAAA;AAAA,IACxB,MAAM,OAAQ,YAAkC,QAAQ;AAAA,IACxD,CAAC,UAAU;AAAA,EAAA;AAGb,QAAM,kBAAkB,YAAY;AAClC,UAAM,iBAAiB;AAAA,MACrB;AAAA,QACE,GAAG;AAAA,QACH,GAAG,cAAc,WAAW,GAAG;AAAA,MACjC;AAAA,IAAA,CACD;AAAA,EAAA;AAID,SAAAC,2BAAAA,kBAAAA,IAAC,OAAI,EAAA,WAAU,QACb,UAAAC,2BAAA,kBAAA;AAAA,IAACC,sCAAA;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACT,GAAG;AAAA,MACJ,QAAQ;AAAA,MACR;AAAA,MAEC,UAAA;AAAA,QACC,YAAAF,2BAAA,kBAAA;AAAA,UAACE,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,YAAY,MAAM;AAAA,YACzB,UAAU,CAAC,YAAY;AAAA,YACvB,WAAU;AAAA,YACV,MAAMC,YAAA;AAAA,YACN,SAAQ;AAAA,YACR,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YACX,SAAS,MAAM,qBAAqB,WAAW,GAAG;AAAA,YAEjD,UAAY,YAAA;AAAA,UAAA;AAAA,QACf;AAAA,QAED,oBACCH,2BAAA,kBAAA;AAAA,UAACE,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,cAAc,MAAM;AAAA,YAC3B,UAAU,CAAC,YAAY;AAAA,YACvB,MAAME,YAAA;AAAA,YACN,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YAEV,UAAc,cAAA;AAAA,UAAA;AAAA,YAGjB,YACEJ,2BAAA,kBAAA;AAAA,UAACE,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,WAAW,MAAM;AAAA,YACxB,UAAU,CAAC,YAAY;AAAA,YACvB,MAAMG,YAAA;AAAA,YACN,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YAEV,UAAW,WAAA;AAAA,UAAA;AAAA,QACd;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR,EAAA,CAAA;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;AAQzC,KAAK,iCAAiC,GAAG;IACvC,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,EAAE,CAC3C,iCAAiC,CAsGlC,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;AASzC,KAAK,iCAAiC,GAAG;IACvC,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,EAAE,CAC3C,iCAAiC,CAsGlC,CAAC"}
@@ -3,6 +3,7 @@ import { j as jsxRuntimeExports } from "../../jsx-runtime-DaNGiM0W.js";
3
3
  import { RotateCcw, ArrowUpFromLine, Save } from "lucide-react";
4
4
  import { useMemo } from "react";
5
5
  import { useDictionary } from "react-intlayer";
6
+ import { u as useShallow } from "../../shallow-m9BpCkKh.js";
6
7
  import "../../hooks/useScrollBlockage/useScrollBlockageStore.mjs";
7
8
  import "../../hooks/useAsync/useAsyncStateStore.mjs";
8
9
  import { usePushDictionaries } from "../../hooks/intlayerAPIHooks.mjs";
@@ -21,10 +22,10 @@ const ValidDictionaryChangeButtons = ({ dictionary }) => {
21
22
  );
22
23
  const { pushDictionaries } = usePushDictionaries();
23
24
  const { editedContent, restoreEditedContent } = useEditedContentStore(
24
- (s) => ({
25
+ useShallow((s) => ({
25
26
  editedContent: s.editedContent,
26
27
  restoreEditedContent: s.restoreEditedContent
27
- })
28
+ }))
28
29
  );
29
30
  const { form, isSubmitting } = useForm(
30
31
  ValidDictionaryChangeButtonsSchemaSchema
@@ -1 +1 @@
1
- {"version":3,"file":"ValidDictionaryChangeButtons.mjs","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 { 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 (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":["jsx","jsxs"],"mappings":";;;;;;;;;;;;;;;;AAiBO,MAAM,+BAET,CAAC,EAAE,iBAAiB;AACtB,QAAM,2CACJ;AAEF,QAAM,EAAE,aAAa,YAAY,cAAkB,IAAA;AAAA,IACjD;AAAA,EAAA;AAGI,QAAA,EAAE,qBAAqB;AAEvB,QAAA,EAAE,eAAe,qBAAA,IAAyB;AAAA,IAC9C,CAAC,OAAO;AAAA,MACN,eAAe,EAAE;AAAA,MACjB,sBAAsB,EAAE;AAAA,IAAA;AAAA,EAC1B;AAEI,QAAA,EAAE,MAAM,aAAA,IAAiB;AAAA,IAC7B;AAAA,EAAA;AAGF,QAAM,mBAAmB;AAAA,IACvB,MAAM,cAAc,WAAW,GAAG;AAAA,IAClC,CAAC,eAAe,WAAW,GAAG;AAAA,EAAA;AAGhC,QAAM,WAAW;AAAA,IACf,MACE,oBACA,KAAK,UAAU,kBAAkB,OAAO,MACtC,KAAK,UAAU,YAAY,OAAO;AAAA,IACtC,CAAC,kBAAkB,UAAU;AAAA,EAAA;AAG/B,QAAM,oBAAoB;AAAA,IACxB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,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"ValidDictionaryChangeButtons.mjs","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":["jsx","jsxs"],"mappings":";;;;;;;;;;;;;;;;;AAkBO,MAAM,+BAET,CAAC,EAAE,iBAAiB;AACtB,QAAM,2CACJ;AAEF,QAAM,EAAE,aAAa,YAAY,cAAkB,IAAA;AAAA,IACjD;AAAA,EAAA;AAGI,QAAA,EAAE,qBAAqB;AAEvB,QAAA,EAAE,eAAe,qBAAA,IAAyB;AAAA,IAC9C,WAAW,CAAC,OAAO;AAAA,MACjB,eAAe,EAAE;AAAA,MACjB,sBAAsB,EAAE;AAAA,IAAA,EACxB;AAAA,EAAA;AAEE,QAAA,EAAE,MAAM,aAAA,IAAiB;AAAA,IAC7B;AAAA,EAAA;AAGF,QAAM,mBAAmB;AAAA,IACvB,MAAM,cAAc,WAAW,GAAG;AAAA,IAClC,CAAC,eAAe,WAAW,GAAG;AAAA,EAAA;AAGhC,QAAM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CAAC,YAAY;AAAA,YACvB,MAAM;AAAA,YACN,OAAM;AAAA,YACN,aAAW;AAAA,YACX,WAAW;AAAA,YAEV,UAAW,WAAA;AAAA,UAAA;AAAA,QACd;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR,EAAA,CAAA;AAEJ;"}
@@ -4,6 +4,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const jsxRuntime = require("../../../jsx-runtime-XHKiWCTo.cjs");
5
5
  const require$$0 = require("react");
6
6
  const reactIntlayer = require("react-intlayer");
7
+ const shallow = require("../../../shallow-lhDIFtEp.cjs");
7
8
  require("../../../hooks/useScrollBlockage/useScrollBlockageStore.cjs");
8
9
  require("../../../hooks/useAsync/useAsyncStateStore.cjs");
9
10
  require("../../../libs/intlayer-api/index.cjs");
@@ -31,9 +32,11 @@ const DictionariesSelector = ({
31
32
  onClickDictionaryList
32
33
  }) => {
33
34
  const { online, locale, isLoading } = hooks_useGetAllDictionaries.useGetAllDictionaries();
34
- const { focusedContent } = components_DictionaryEditor_useEditionPanelStore.useEditionPanelStore((s) => ({
35
- focusedContent: s.focusedContent
36
- }));
35
+ const { focusedContent } = components_DictionaryEditor_useEditionPanelStore.useEditionPanelStore(
36
+ shallow.useShallow((s) => ({
37
+ focusedContent: s.focusedContent
38
+ }))
39
+ );
37
40
  const { noDictionaryMessage, dictionaryNotFoundMessage } = reactIntlayer.useDictionary(
38
41
  components_DictionaryFieldEditor_DictionariesSelector_dictionariesSelector_content.dictionariesSelectorContent
39
42
  );