@intlayer/design-system 5.5.3 → 5.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +2 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +2 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
- package/dist/components/SocialNetworks/index.cjs +7 -7
- package/dist/components/SocialNetworks/index.cjs.map +1 -1
- package/dist/components/SocialNetworks/index.mjs +7 -7
- package/dist/components/SocialNetworks/index.mjs.map +1 -1
- package/package.json +17 -17
package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs
CHANGED
|
@@ -59,7 +59,7 @@ const DictionaryCreationForm = ({
|
|
|
59
59
|
{
|
|
60
60
|
schema: DictionarySchema,
|
|
61
61
|
onSubmitSuccess,
|
|
62
|
-
className: "w-full max-w-[400px]",
|
|
62
|
+
className: "w-full max-w-[400px] m-auto",
|
|
63
63
|
...form,
|
|
64
64
|
children: [
|
|
65
65
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -96,6 +96,7 @@ const DictionaryCreationForm = ({
|
|
|
96
96
|
color: "text",
|
|
97
97
|
isLoading: isSubmitting,
|
|
98
98
|
label: createDictionaryButton.ariaLabel.value,
|
|
99
|
+
isFullWidth: true,
|
|
99
100
|
children: createDictionaryButton.text
|
|
100
101
|
}
|
|
101
102
|
)
|
package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DictionaryCreationForm.cjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.tsx"],"sourcesContent":["'use client';\n\nimport { type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport {\n useAddDictionary,\n useGetProjects,\n} from '../../../hooks/intlayerAPIHooks';\nimport { useAuth } from '../../Auth';\nimport { Form, useForm } from '../../Form';\nimport { MultiSelect } from '../../Select';\nimport { dictionaryFormContent } from './dictionaryCreationForm.content';\nimport {\n useDictionarySchema,\n type DictionaryFormData,\n} from './useDictionaryFormSchema';\n\ntype DictionaryCreationFormProps = {\n onDictionaryCreated?: () => void;\n};\n\nexport const DictionaryCreationForm: FC<DictionaryCreationFormProps> = ({\n onDictionaryCreated,\n}) => {\n const { session } = useAuth();\n const { project } = session ?? {};\n const { addDictionary } = useAddDictionary();\n const { data: projects } = useGetProjects();\n const DictionarySchema = useDictionarySchema(String(project?._id));\n const { form, isSubmitting } = useForm(DictionarySchema);\n const { keyInput, createDictionaryButton, projectInput } = useDictionary(\n dictionaryFormContent\n );\n\n const onSubmitSuccess = async (data: DictionaryFormData) => {\n await addDictionary({ dictionary: data }).then(() =>\n onDictionaryCreated?.()\n );\n };\n\n return (\n <Form\n schema={DictionarySchema}\n onSubmitSuccess={onSubmitSuccess}\n className=\"w-full max-w-[400px]\"\n {...form}\n >\n <Form.Input\n name=\"key\"\n label={keyInput.label.value}\n placeholder={keyInput.placeholder.value}\n isRequired\n />\n\n <Form.MultiSelect name=\"projectIds\" label={projectInput.label.value}>\n <MultiSelect.Trigger\n getBadgeValue={(value) =>\n projects?.data?.find((project) => String(project._id) === value)\n ?.name ?? value\n }\n >\n <MultiSelect.Input placeholder={projectInput.placeholder.value} />\n </MultiSelect.Trigger>\n <MultiSelect.Content>\n <MultiSelect.List>\n {projects?.data?.map((project) => (\n <MultiSelect.Item\n key={String(project._id)}\n value={String(project._id)}\n >\n {project.name}\n </MultiSelect.Item>\n ))}\n </MultiSelect.List>\n </MultiSelect.Content>\n </Form.MultiSelect>\n\n <Form.Button\n className=\"ml-auto mt-12\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n label={createDictionaryButton.ariaLabel.value}\n >\n {createDictionaryButton.text}\n </Form.Button>\n </Form>\n );\n};\n"],"names":["useAuth","useAddDictionary","useGetProjects","useDictionarySchema","useForm","useDictionary","dictionaryFormContent","jsxs","Form","jsx","MultiSelect","project"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBO,MAAM,yBAA0D,CAAC;AAAA,EACtE;AACF,MAAM;AACE,QAAA,EAAE,QAAQ,IAAIA,sCAAQ;AAC5B,QAAM,EAAE,YAAY,WAAW,CAAC;AAC1B,QAAA,EAAE,cAAc,IAAIC,wCAAiB;AAC3C,QAAM,EAAE,MAAM,SAAS,IAAIC,sCAAe;AAC1C,QAAM,mBAAmBC,gFAAA,oBAAoB,OAAO,SAAS,GAAG,CAAC;AACjE,QAAM,EAAE,MAAM,iBAAiBC,yBAAAA,QAAQ,gBAAgB;AACvD,QAAM,EAAE,UAAU,wBAAwB,aAAiB,IAAAC,cAAA;AAAA,IACzDC,uFAAAA;AAAAA,EACF;AAEM,QAAA,kBAAkB,OAAO,SAA6B;AAC1D,UAAM,cAAc,EAAE,YAAY,KAAA,CAAM,EAAE;AAAA,MAAK,MAC7C,sBAAsB;AAAA,IACxB;AAAA,EACF;AAGE,SAAAC,2BAAA;AAAA,IAACC,sCAAA;AAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR;AAAA,MACA,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAAC,2BAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,SAAS,MAAM;AAAA,YACtB,aAAa,SAAS,YAAY;AAAA,YAClC,YAAU;AAAA,UAAA;AAAA,QACZ;AAAA,QAEAD,2BAAAA,KAACC,2CAAK,aAAL,EAAiB,MAAK,cAAa,OAAO,aAAa,MAAM,OAC5D,UAAA;AAAA,UAAAC,2BAAA;AAAA,YAACC,8BAAAA,YAAY;AAAA,YAAZ;AAAA,cACC,eAAe,CAAC,UACd,UAAU,MAAM,KAAK,CAACC,aAAY,OAAOA,SAAQ,GAAG,MAAM,KAAK,GAC3D,QAAQ;AAAA,cAGd,yCAACD,8BAAAA,YAAY,OAAZ,EAAkB,aAAa,aAAa,YAAY,MAAO,CAAA;AAAA,YAAA;AAAA,UAClE;AAAA,UACCD,2BAAAA,IAAAC,8BAAAA,YAAY,SAAZ,EACC,UAACD,2BAAA,IAAAC,8BAAA,YAAY,MAAZ,EACE,UAAU,UAAA,MAAM,IAAI,CAACC,aACpBF,2BAAA;AAAA,YAACC,8BAAAA,YAAY;AAAA,YAAZ;AAAA,cAEC,OAAO,OAAOC,SAAQ,GAAG;AAAA,cAExB,UAAAA,SAAQ;AAAA,YAAA;AAAA,YAHJ,OAAOA,SAAQ,GAAG;AAAA,UAK1B,CAAA,EACH,CAAA,EACF,CAAA;AAAA,QAAA,GACF;AAAA,QAEAF,2BAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,OAAM;AAAA,YACN,WAAW;AAAA,YACX,OAAO,uBAAuB,UAAU;AAAA,
|
|
1
|
+
{"version":3,"file":"DictionaryCreationForm.cjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.tsx"],"sourcesContent":["'use client';\n\nimport { type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport {\n useAddDictionary,\n useGetProjects,\n} from '../../../hooks/intlayerAPIHooks';\nimport { useAuth } from '../../Auth';\nimport { Form, useForm } from '../../Form';\nimport { MultiSelect } from '../../Select';\nimport { dictionaryFormContent } from './dictionaryCreationForm.content';\nimport {\n useDictionarySchema,\n type DictionaryFormData,\n} from './useDictionaryFormSchema';\n\ntype DictionaryCreationFormProps = {\n onDictionaryCreated?: () => void;\n};\n\nexport const DictionaryCreationForm: FC<DictionaryCreationFormProps> = ({\n onDictionaryCreated,\n}) => {\n const { session } = useAuth();\n const { project } = session ?? {};\n const { addDictionary } = useAddDictionary();\n const { data: projects } = useGetProjects();\n const DictionarySchema = useDictionarySchema(String(project?._id));\n const { form, isSubmitting } = useForm(DictionarySchema);\n const { keyInput, createDictionaryButton, projectInput } = useDictionary(\n dictionaryFormContent\n );\n\n const onSubmitSuccess = async (data: DictionaryFormData) => {\n await addDictionary({ dictionary: data }).then(() =>\n onDictionaryCreated?.()\n );\n };\n\n return (\n <Form\n schema={DictionarySchema}\n onSubmitSuccess={onSubmitSuccess}\n className=\"w-full max-w-[400px] m-auto\"\n {...form}\n >\n <Form.Input\n name=\"key\"\n label={keyInput.label.value}\n placeholder={keyInput.placeholder.value}\n isRequired\n />\n\n <Form.MultiSelect name=\"projectIds\" label={projectInput.label.value}>\n <MultiSelect.Trigger\n getBadgeValue={(value) =>\n projects?.data?.find((project) => String(project._id) === value)\n ?.name ?? value\n }\n >\n <MultiSelect.Input placeholder={projectInput.placeholder.value} />\n </MultiSelect.Trigger>\n <MultiSelect.Content>\n <MultiSelect.List>\n {projects?.data?.map((project) => (\n <MultiSelect.Item\n key={String(project._id)}\n value={String(project._id)}\n >\n {project.name}\n </MultiSelect.Item>\n ))}\n </MultiSelect.List>\n </MultiSelect.Content>\n </Form.MultiSelect>\n\n <Form.Button\n className=\"ml-auto mt-12\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n label={createDictionaryButton.ariaLabel.value}\n isFullWidth\n >\n {createDictionaryButton.text}\n </Form.Button>\n </Form>\n );\n};\n"],"names":["useAuth","useAddDictionary","useGetProjects","useDictionarySchema","useForm","useDictionary","dictionaryFormContent","jsxs","Form","jsx","MultiSelect","project"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBO,MAAM,yBAA0D,CAAC;AAAA,EACtE;AACF,MAAM;AACE,QAAA,EAAE,QAAQ,IAAIA,sCAAQ;AAC5B,QAAM,EAAE,YAAY,WAAW,CAAC;AAC1B,QAAA,EAAE,cAAc,IAAIC,wCAAiB;AAC3C,QAAM,EAAE,MAAM,SAAS,IAAIC,sCAAe;AAC1C,QAAM,mBAAmBC,gFAAA,oBAAoB,OAAO,SAAS,GAAG,CAAC;AACjE,QAAM,EAAE,MAAM,iBAAiBC,yBAAAA,QAAQ,gBAAgB;AACvD,QAAM,EAAE,UAAU,wBAAwB,aAAiB,IAAAC,cAAA;AAAA,IACzDC,uFAAAA;AAAAA,EACF;AAEM,QAAA,kBAAkB,OAAO,SAA6B;AAC1D,UAAM,cAAc,EAAE,YAAY,KAAA,CAAM,EAAE;AAAA,MAAK,MAC7C,sBAAsB;AAAA,IACxB;AAAA,EACF;AAGE,SAAAC,2BAAA;AAAA,IAACC,sCAAA;AAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR;AAAA,MACA,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAAC,2BAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,SAAS,MAAM;AAAA,YACtB,aAAa,SAAS,YAAY;AAAA,YAClC,YAAU;AAAA,UAAA;AAAA,QACZ;AAAA,QAEAD,2BAAAA,KAACC,2CAAK,aAAL,EAAiB,MAAK,cAAa,OAAO,aAAa,MAAM,OAC5D,UAAA;AAAA,UAAAC,2BAAA;AAAA,YAACC,8BAAAA,YAAY;AAAA,YAAZ;AAAA,cACC,eAAe,CAAC,UACd,UAAU,MAAM,KAAK,CAACC,aAAY,OAAOA,SAAQ,GAAG,MAAM,KAAK,GAC3D,QAAQ;AAAA,cAGd,yCAACD,8BAAAA,YAAY,OAAZ,EAAkB,aAAa,aAAa,YAAY,MAAO,CAAA;AAAA,YAAA;AAAA,UAClE;AAAA,UACCD,2BAAAA,IAAAC,8BAAAA,YAAY,SAAZ,EACC,UAACD,2BAAA,IAAAC,8BAAA,YAAY,MAAZ,EACE,UAAU,UAAA,MAAM,IAAI,CAACC,aACpBF,2BAAA;AAAA,YAACC,8BAAAA,YAAY;AAAA,YAAZ;AAAA,cAEC,OAAO,OAAOC,SAAQ,GAAG;AAAA,cAExB,UAAAA,SAAQ;AAAA,YAAA;AAAA,YAHJ,OAAOA,SAAQ,GAAG;AAAA,UAK1B,CAAA,EACH,CAAA,EACF,CAAA;AAAA,QAAA,GACF;AAAA,QAEAF,2BAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,OAAM;AAAA,YACN,WAAW;AAAA,YACX,OAAO,uBAAuB,UAAU;AAAA,YACxC,aAAW;AAAA,YAEV,UAAuB,uBAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAC1B;AAAA,IAAA;AAAA,EACF;AAEJ;;"}
|
package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DictionaryCreationForm.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAehC,KAAK,2BAA2B,GAAG;IACjC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,
|
|
1
|
+
{"version":3,"file":"DictionaryCreationForm.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAehC,KAAK,2BAA2B,GAAG;IACjC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CAoElE,CAAC"}
|
package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs
CHANGED
|
@@ -57,7 +57,7 @@ const DictionaryCreationForm = ({
|
|
|
57
57
|
{
|
|
58
58
|
schema: DictionarySchema,
|
|
59
59
|
onSubmitSuccess,
|
|
60
|
-
className: "w-full max-w-[400px]",
|
|
60
|
+
className: "w-full max-w-[400px] m-auto",
|
|
61
61
|
...form,
|
|
62
62
|
children: [
|
|
63
63
|
/* @__PURE__ */ jsx(
|
|
@@ -94,6 +94,7 @@ const DictionaryCreationForm = ({
|
|
|
94
94
|
color: "text",
|
|
95
95
|
isLoading: isSubmitting,
|
|
96
96
|
label: createDictionaryButton.ariaLabel.value,
|
|
97
|
+
isFullWidth: true,
|
|
97
98
|
children: createDictionaryButton.text
|
|
98
99
|
}
|
|
99
100
|
)
|
package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DictionaryCreationForm.mjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.tsx"],"sourcesContent":["'use client';\n\nimport { type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport {\n useAddDictionary,\n useGetProjects,\n} from '../../../hooks/intlayerAPIHooks';\nimport { useAuth } from '../../Auth';\nimport { Form, useForm } from '../../Form';\nimport { MultiSelect } from '../../Select';\nimport { dictionaryFormContent } from './dictionaryCreationForm.content';\nimport {\n useDictionarySchema,\n type DictionaryFormData,\n} from './useDictionaryFormSchema';\n\ntype DictionaryCreationFormProps = {\n onDictionaryCreated?: () => void;\n};\n\nexport const DictionaryCreationForm: FC<DictionaryCreationFormProps> = ({\n onDictionaryCreated,\n}) => {\n const { session } = useAuth();\n const { project } = session ?? {};\n const { addDictionary } = useAddDictionary();\n const { data: projects } = useGetProjects();\n const DictionarySchema = useDictionarySchema(String(project?._id));\n const { form, isSubmitting } = useForm(DictionarySchema);\n const { keyInput, createDictionaryButton, projectInput } = useDictionary(\n dictionaryFormContent\n );\n\n const onSubmitSuccess = async (data: DictionaryFormData) => {\n await addDictionary({ dictionary: data }).then(() =>\n onDictionaryCreated?.()\n );\n };\n\n return (\n <Form\n schema={DictionarySchema}\n onSubmitSuccess={onSubmitSuccess}\n className=\"w-full max-w-[400px]\"\n {...form}\n >\n <Form.Input\n name=\"key\"\n label={keyInput.label.value}\n placeholder={keyInput.placeholder.value}\n isRequired\n />\n\n <Form.MultiSelect name=\"projectIds\" label={projectInput.label.value}>\n <MultiSelect.Trigger\n getBadgeValue={(value) =>\n projects?.data?.find((project) => String(project._id) === value)\n ?.name ?? value\n }\n >\n <MultiSelect.Input placeholder={projectInput.placeholder.value} />\n </MultiSelect.Trigger>\n <MultiSelect.Content>\n <MultiSelect.List>\n {projects?.data?.map((project) => (\n <MultiSelect.Item\n key={String(project._id)}\n value={String(project._id)}\n >\n {project.name}\n </MultiSelect.Item>\n ))}\n </MultiSelect.List>\n </MultiSelect.Content>\n </Form.MultiSelect>\n\n <Form.Button\n className=\"ml-auto mt-12\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n label={createDictionaryButton.ariaLabel.value}\n >\n {createDictionaryButton.text}\n </Form.Button>\n </Form>\n );\n};\n"],"names":["project"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBO,MAAM,yBAA0D,CAAC;AAAA,EACtE;AACF,MAAM;AACE,QAAA,EAAE,QAAQ,IAAI,QAAQ;AAC5B,QAAM,EAAE,YAAY,WAAW,CAAC;AAC1B,QAAA,EAAE,cAAc,IAAI,iBAAiB;AAC3C,QAAM,EAAE,MAAM,SAAS,IAAI,eAAe;AAC1C,QAAM,mBAAmB,oBAAoB,OAAO,SAAS,GAAG,CAAC;AACjE,QAAM,EAAE,MAAM,iBAAiB,QAAQ,gBAAgB;AACvD,QAAM,EAAE,UAAU,wBAAwB,aAAiB,IAAA;AAAA,IACzD;AAAA,EACF;AAEM,QAAA,kBAAkB,OAAO,SAA6B;AAC1D,UAAM,cAAc,EAAE,YAAY,KAAA,CAAM,EAAE;AAAA,MAAK,MAC7C,sBAAsB;AAAA,IACxB;AAAA,EACF;AAGE,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR;AAAA,MACA,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,SAAS,MAAM;AAAA,YACtB,aAAa,SAAS,YAAY;AAAA,YAClC,YAAU;AAAA,UAAA;AAAA,QACZ;AAAA,QAEA,qBAAC,KAAK,aAAL,EAAiB,MAAK,cAAa,OAAO,aAAa,MAAM,OAC5D,UAAA;AAAA,UAAA;AAAA,YAAC,YAAY;AAAA,YAAZ;AAAA,cACC,eAAe,CAAC,UACd,UAAU,MAAM,KAAK,CAACA,aAAY,OAAOA,SAAQ,GAAG,MAAM,KAAK,GAC3D,QAAQ;AAAA,cAGd,8BAAC,YAAY,OAAZ,EAAkB,aAAa,aAAa,YAAY,MAAO,CAAA;AAAA,YAAA;AAAA,UAClE;AAAA,UACC,oBAAA,YAAY,SAAZ,EACC,UAAC,oBAAA,YAAY,MAAZ,EACE,UAAU,UAAA,MAAM,IAAI,CAACA,aACpB;AAAA,YAAC,YAAY;AAAA,YAAZ;AAAA,cAEC,OAAO,OAAOA,SAAQ,GAAG;AAAA,cAExB,UAAAA,SAAQ;AAAA,YAAA;AAAA,YAHJ,OAAOA,SAAQ,GAAG;AAAA,UAK1B,CAAA,EACH,CAAA,EACF,CAAA;AAAA,QAAA,GACF;AAAA,QAEA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,OAAM;AAAA,YACN,WAAW;AAAA,YACX,OAAO,uBAAuB,UAAU;AAAA,
|
|
1
|
+
{"version":3,"file":"DictionaryCreationForm.mjs","sources":["../../../../src/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.tsx"],"sourcesContent":["'use client';\n\nimport { type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport {\n useAddDictionary,\n useGetProjects,\n} from '../../../hooks/intlayerAPIHooks';\nimport { useAuth } from '../../Auth';\nimport { Form, useForm } from '../../Form';\nimport { MultiSelect } from '../../Select';\nimport { dictionaryFormContent } from './dictionaryCreationForm.content';\nimport {\n useDictionarySchema,\n type DictionaryFormData,\n} from './useDictionaryFormSchema';\n\ntype DictionaryCreationFormProps = {\n onDictionaryCreated?: () => void;\n};\n\nexport const DictionaryCreationForm: FC<DictionaryCreationFormProps> = ({\n onDictionaryCreated,\n}) => {\n const { session } = useAuth();\n const { project } = session ?? {};\n const { addDictionary } = useAddDictionary();\n const { data: projects } = useGetProjects();\n const DictionarySchema = useDictionarySchema(String(project?._id));\n const { form, isSubmitting } = useForm(DictionarySchema);\n const { keyInput, createDictionaryButton, projectInput } = useDictionary(\n dictionaryFormContent\n );\n\n const onSubmitSuccess = async (data: DictionaryFormData) => {\n await addDictionary({ dictionary: data }).then(() =>\n onDictionaryCreated?.()\n );\n };\n\n return (\n <Form\n schema={DictionarySchema}\n onSubmitSuccess={onSubmitSuccess}\n className=\"w-full max-w-[400px] m-auto\"\n {...form}\n >\n <Form.Input\n name=\"key\"\n label={keyInput.label.value}\n placeholder={keyInput.placeholder.value}\n isRequired\n />\n\n <Form.MultiSelect name=\"projectIds\" label={projectInput.label.value}>\n <MultiSelect.Trigger\n getBadgeValue={(value) =>\n projects?.data?.find((project) => String(project._id) === value)\n ?.name ?? value\n }\n >\n <MultiSelect.Input placeholder={projectInput.placeholder.value} />\n </MultiSelect.Trigger>\n <MultiSelect.Content>\n <MultiSelect.List>\n {projects?.data?.map((project) => (\n <MultiSelect.Item\n key={String(project._id)}\n value={String(project._id)}\n >\n {project.name}\n </MultiSelect.Item>\n ))}\n </MultiSelect.List>\n </MultiSelect.Content>\n </Form.MultiSelect>\n\n <Form.Button\n className=\"ml-auto mt-12\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n label={createDictionaryButton.ariaLabel.value}\n isFullWidth\n >\n {createDictionaryButton.text}\n </Form.Button>\n </Form>\n );\n};\n"],"names":["project"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBO,MAAM,yBAA0D,CAAC;AAAA,EACtE;AACF,MAAM;AACE,QAAA,EAAE,QAAQ,IAAI,QAAQ;AAC5B,QAAM,EAAE,YAAY,WAAW,CAAC;AAC1B,QAAA,EAAE,cAAc,IAAI,iBAAiB;AAC3C,QAAM,EAAE,MAAM,SAAS,IAAI,eAAe;AAC1C,QAAM,mBAAmB,oBAAoB,OAAO,SAAS,GAAG,CAAC;AACjE,QAAM,EAAE,MAAM,iBAAiB,QAAQ,gBAAgB;AACvD,QAAM,EAAE,UAAU,wBAAwB,aAAiB,IAAA;AAAA,IACzD;AAAA,EACF;AAEM,QAAA,kBAAkB,OAAO,SAA6B;AAC1D,UAAM,cAAc,EAAE,YAAY,KAAA,CAAM,EAAE;AAAA,MAAK,MAC7C,sBAAsB;AAAA,IACxB;AAAA,EACF;AAGE,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR;AAAA,MACA,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,SAAS,MAAM;AAAA,YACtB,aAAa,SAAS,YAAY;AAAA,YAClC,YAAU;AAAA,UAAA;AAAA,QACZ;AAAA,QAEA,qBAAC,KAAK,aAAL,EAAiB,MAAK,cAAa,OAAO,aAAa,MAAM,OAC5D,UAAA;AAAA,UAAA;AAAA,YAAC,YAAY;AAAA,YAAZ;AAAA,cACC,eAAe,CAAC,UACd,UAAU,MAAM,KAAK,CAACA,aAAY,OAAOA,SAAQ,GAAG,MAAM,KAAK,GAC3D,QAAQ;AAAA,cAGd,8BAAC,YAAY,OAAZ,EAAkB,aAAa,aAAa,YAAY,MAAO,CAAA;AAAA,YAAA;AAAA,UAClE;AAAA,UACC,oBAAA,YAAY,SAAZ,EACC,UAAC,oBAAA,YAAY,MAAZ,EACE,UAAU,UAAA,MAAM,IAAI,CAACA,aACpB;AAAA,YAAC,YAAY;AAAA,YAAZ;AAAA,cAEC,OAAO,OAAOA,SAAQ,GAAG;AAAA,cAExB,UAAAA,SAAQ;AAAA,YAAA;AAAA,YAHJ,OAAOA,SAAQ,GAAG;AAAA,UAK1B,CAAA,EACH,CAAA,EACF,CAAA;AAAA,QAAA,GACF;AAAA,QAEA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,OAAM;AAAA,YACN,WAAW;AAAA,YACX,OAAO,uBAAuB,UAAU;AAAA,YACxC,aAAW;AAAA,YAEV,UAAuB,uBAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAC1B;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
|
@@ -12,37 +12,37 @@ const components_SocialNetworks_YoutubeLogo = require("./YoutubeLogo.cjs");
|
|
|
12
12
|
const socialNetworks = [
|
|
13
13
|
{
|
|
14
14
|
href: "https://www.producthunt.com/posts/intlayer?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-intlayer",
|
|
15
|
-
component: /* @__PURE__ */ jsxRuntime.jsx(components_SocialNetworks_ProductHuntLogo.ProductHuntLogo, { className: "max-w-full max-h-full" }),
|
|
15
|
+
component: /* @__PURE__ */ jsxRuntime.jsx(components_SocialNetworks_ProductHuntLogo.ProductHuntLogo, { className: "max-w-full max-h-full h-auto" }),
|
|
16
16
|
label: "Product Hunt"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
href: "https://x.com/Intlayer183096",
|
|
20
|
-
component: /* @__PURE__ */ jsxRuntime.jsx(components_SocialNetworks_XLogo.XLogo, { className: "max-w-full max-h-full" }),
|
|
20
|
+
component: /* @__PURE__ */ jsxRuntime.jsx(components_SocialNetworks_XLogo.XLogo, { className: "max-w-full max-h-full h-auto" }),
|
|
21
21
|
label: "X"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
href: "https://www.youtube.com/@intlayer",
|
|
25
|
-
component: /* @__PURE__ */ jsxRuntime.jsx(components_SocialNetworks_YoutubeLogo.YoutubeLogo, { className: "max-w-full max-h-full" }),
|
|
25
|
+
component: /* @__PURE__ */ jsxRuntime.jsx(components_SocialNetworks_YoutubeLogo.YoutubeLogo, { className: "max-w-full max-h-full h-auto" }),
|
|
26
26
|
label: "YouTube"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
href: "https://www.linkedin.com/company/intlayerorg",
|
|
30
|
-
component: /* @__PURE__ */ jsxRuntime.jsx(components_SocialNetworks_LinkedInLogo.LinkedInLogo, { className: "max-w-full max-h-full" }),
|
|
30
|
+
component: /* @__PURE__ */ jsxRuntime.jsx(components_SocialNetworks_LinkedInLogo.LinkedInLogo, { className: "max-w-full max-h-full h-auto" }),
|
|
31
31
|
label: "LinkedIn"
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
href: "https://www.tiktok.com/@intlayer",
|
|
35
|
-
component: /* @__PURE__ */ jsxRuntime.jsx(components_SocialNetworks_TiktokLogo.TiktokLogo, { className: "max-w-full max-h-full" }),
|
|
35
|
+
component: /* @__PURE__ */ jsxRuntime.jsx(components_SocialNetworks_TiktokLogo.TiktokLogo, { className: "max-w-full max-h-full h-auto" }),
|
|
36
36
|
label: "TikTok"
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
href: "https://www.instagram.com/intlayer_org/",
|
|
40
|
-
component: /* @__PURE__ */ jsxRuntime.jsx(components_SocialNetworks_InstagramLogo.InstagramLogo, { className: "max-w-full max-h-full" }),
|
|
40
|
+
component: /* @__PURE__ */ jsxRuntime.jsx(components_SocialNetworks_InstagramLogo.InstagramLogo, { className: "max-w-full max-h-full h-auto" }),
|
|
41
41
|
label: "Instagram"
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
href: "https://www.facebook.com/intlayer",
|
|
45
|
-
component: /* @__PURE__ */ jsxRuntime.jsx(components_SocialNetworks_FacebookLogo.FacebookLogo, { className: "max-w-full max-h-full" }),
|
|
45
|
+
component: /* @__PURE__ */ jsxRuntime.jsx(components_SocialNetworks_FacebookLogo.FacebookLogo, { className: "max-w-full max-h-full h-auto" }),
|
|
46
46
|
label: "Facebook"
|
|
47
47
|
}
|
|
48
48
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/SocialNetworks/index.tsx"],"sourcesContent":["import { AnchorHTMLAttributes, DetailedHTMLProps, FC, ReactNode } from 'react';\nimport { FacebookLogo } from './FacebookLogo';\nimport { InstagramLogo } from './InstagramLogo';\nimport { LinkedInLogo } from './LinkedInLogo';\nimport { ProductHuntLogo } from './ProductHuntLogo';\nimport { TiktokLogo } from './TiktokLogo';\nimport { XLogo } from './XLogo';\nimport { YoutubeLogo } from './YoutubeLogo';\n\nconst socialNetworks = [\n {\n href: 'https://www.producthunt.com/posts/intlayer?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-intlayer',\n component: <ProductHuntLogo className=\"max-w-full max-h-full\" />,\n label: 'Product Hunt',\n },\n {\n href: 'https://x.com/Intlayer183096',\n component: <XLogo className=\"max-w-full max-h-full\" />,\n label: 'X',\n },\n {\n href: 'https://www.youtube.com/@intlayer',\n component: <YoutubeLogo className=\"max-w-full max-h-full\" />,\n label: 'YouTube',\n },\n {\n href: 'https://www.linkedin.com/company/intlayerorg',\n component: <LinkedInLogo className=\"max-w-full max-h-full\" />,\n label: 'LinkedIn',\n },\n {\n href: 'https://www.tiktok.com/@intlayer',\n component: <TiktokLogo className=\"max-w-full max-h-full\" />,\n label: 'TikTok',\n },\n {\n href: 'https://www.instagram.com/intlayer_org/',\n component: <InstagramLogo className=\"max-w-full max-h-full\" />,\n label: 'Instagram',\n },\n {\n href: 'https://www.facebook.com/intlayer',\n component: <FacebookLogo className=\"max-w-full max-h-full\" />,\n label: 'Facebook',\n },\n];\n\ntype SocialNetworksProps = {\n renderItem?: (item: (typeof socialNetworks)[number]) => ReactNode;\n} & DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n>;\n\ntype DefaultRenderItemProps = DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n> & {\n component: ReactNode;\n label: string;\n};\n\nconst DefaultRenderItem: FC<DefaultRenderItemProps> = ({\n href,\n component,\n label,\n ...iconProps\n}) => (\n <a\n key={href}\n href={href}\n aria-label={label}\n className=\"max-w-4 max-h-4\"\n {...iconProps}\n >\n {component}\n </a>\n);\n\nexport const SocialNetworks = ({\n renderItem,\n ...iconProps\n}: SocialNetworksProps) =>\n socialNetworks.map(\n renderItem ??\n ((props) => (\n <DefaultRenderItem {...props} {...iconProps} key={props.label} />\n ))\n );\n\nexport * from './FacebookLogo';\nexport * from './InstagramLogo';\nexport * from './LinkedInLogo';\nexport * from './ProductHuntLogo';\nexport * from './TiktokLogo';\nexport * from './XLogo';\nexport * from './YoutubeLogo';\n"],"names":["jsx","ProductHuntLogo","XLogo","YoutubeLogo","LinkedInLogo","TiktokLogo","InstagramLogo","FacebookLogo","createElement"],"mappings":";;;;;;;;;;;AASA,MAAM,iBAAiB;AAAA,EACrB;AAAA,IACE,MAAM;AAAA,IACN,WAAWA,2BAAAA,IAACC,0CAAAA,iBAAgB,EAAA,WAAU,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/SocialNetworks/index.tsx"],"sourcesContent":["import { AnchorHTMLAttributes, DetailedHTMLProps, FC, ReactNode } from 'react';\nimport { FacebookLogo } from './FacebookLogo';\nimport { InstagramLogo } from './InstagramLogo';\nimport { LinkedInLogo } from './LinkedInLogo';\nimport { ProductHuntLogo } from './ProductHuntLogo';\nimport { TiktokLogo } from './TiktokLogo';\nimport { XLogo } from './XLogo';\nimport { YoutubeLogo } from './YoutubeLogo';\n\nconst socialNetworks = [\n {\n href: 'https://www.producthunt.com/posts/intlayer?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-intlayer',\n component: <ProductHuntLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'Product Hunt',\n },\n {\n href: 'https://x.com/Intlayer183096',\n component: <XLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'X',\n },\n {\n href: 'https://www.youtube.com/@intlayer',\n component: <YoutubeLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'YouTube',\n },\n {\n href: 'https://www.linkedin.com/company/intlayerorg',\n component: <LinkedInLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'LinkedIn',\n },\n {\n href: 'https://www.tiktok.com/@intlayer',\n component: <TiktokLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'TikTok',\n },\n {\n href: 'https://www.instagram.com/intlayer_org/',\n component: <InstagramLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'Instagram',\n },\n {\n href: 'https://www.facebook.com/intlayer',\n component: <FacebookLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'Facebook',\n },\n];\n\ntype SocialNetworksProps = {\n renderItem?: (item: (typeof socialNetworks)[number]) => ReactNode;\n} & DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n>;\n\ntype DefaultRenderItemProps = DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n> & {\n component: ReactNode;\n label: string;\n};\n\nconst DefaultRenderItem: FC<DefaultRenderItemProps> = ({\n href,\n component,\n label,\n ...iconProps\n}) => (\n <a\n key={href}\n href={href}\n aria-label={label}\n className=\"max-w-4 max-h-4\"\n {...iconProps}\n >\n {component}\n </a>\n);\n\nexport const SocialNetworks = ({\n renderItem,\n ...iconProps\n}: SocialNetworksProps) =>\n socialNetworks.map(\n renderItem ??\n ((props) => (\n <DefaultRenderItem {...props} {...iconProps} key={props.label} />\n ))\n );\n\nexport * from './FacebookLogo';\nexport * from './InstagramLogo';\nexport * from './LinkedInLogo';\nexport * from './ProductHuntLogo';\nexport * from './TiktokLogo';\nexport * from './XLogo';\nexport * from './YoutubeLogo';\n"],"names":["jsx","ProductHuntLogo","XLogo","YoutubeLogo","LinkedInLogo","TiktokLogo","InstagramLogo","FacebookLogo","createElement"],"mappings":";;;;;;;;;;;AASA,MAAM,iBAAiB;AAAA,EACrB;AAAA,IACE,MAAM;AAAA,IACN,WAAWA,2BAAAA,IAACC,0CAAAA,iBAAgB,EAAA,WAAU,+BAA+B,CAAA;AAAA,IACrE,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAWD,2BAAAA,IAACE,gCAAAA,OAAM,EAAA,WAAU,+BAA+B,CAAA;AAAA,IAC3D,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAWF,2BAAAA,IAACG,sCAAAA,aAAY,EAAA,WAAU,+BAA+B,CAAA;AAAA,IACjE,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAWH,2BAAAA,IAACI,uCAAAA,cAAa,EAAA,WAAU,+BAA+B,CAAA;AAAA,IAClE,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAWJ,2BAAAA,IAACK,qCAAAA,YAAW,EAAA,WAAU,+BAA+B,CAAA;AAAA,IAChE,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAWL,2BAAAA,IAACM,wCAAAA,eAAc,EAAA,WAAU,+BAA+B,CAAA;AAAA,IACnE,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAWN,2BAAAA,IAACO,uCAAAA,cAAa,EAAA,WAAU,+BAA+B,CAAA;AAAA,IAClE,OAAO;AAAA,EAAA;AAEX;AAiBA,MAAM,oBAAgD,CAAC;AAAA,EACrD;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEP,2BAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IAEC;AAAA,IACA,cAAY;AAAA,IACZ,WAAU;AAAA,IACT,GAAG;AAAA,IAEH,UAAA;AAAA,EAAA;AAAA,EANI;AAOP;AAGK,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA,GAAG;AACL,MACE,eAAe;AAAA,EACb,eACG,CAAC,UACCQ,6BAAA,cAAA,mBAAA,EAAmB,GAAG,OAAQ,GAAG,WAAW,KAAK,MAAM,MAAO,CAAA;AAErE;;;;;;;;;"}
|
|
@@ -10,37 +10,37 @@ import { YoutubeLogo } from "./YoutubeLogo.mjs";
|
|
|
10
10
|
const socialNetworks = [
|
|
11
11
|
{
|
|
12
12
|
href: "https://www.producthunt.com/posts/intlayer?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-intlayer",
|
|
13
|
-
component: /* @__PURE__ */ jsx(ProductHuntLogo, { className: "max-w-full max-h-full" }),
|
|
13
|
+
component: /* @__PURE__ */ jsx(ProductHuntLogo, { className: "max-w-full max-h-full h-auto" }),
|
|
14
14
|
label: "Product Hunt"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
href: "https://x.com/Intlayer183096",
|
|
18
|
-
component: /* @__PURE__ */ jsx(XLogo, { className: "max-w-full max-h-full" }),
|
|
18
|
+
component: /* @__PURE__ */ jsx(XLogo, { className: "max-w-full max-h-full h-auto" }),
|
|
19
19
|
label: "X"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
href: "https://www.youtube.com/@intlayer",
|
|
23
|
-
component: /* @__PURE__ */ jsx(YoutubeLogo, { className: "max-w-full max-h-full" }),
|
|
23
|
+
component: /* @__PURE__ */ jsx(YoutubeLogo, { className: "max-w-full max-h-full h-auto" }),
|
|
24
24
|
label: "YouTube"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
href: "https://www.linkedin.com/company/intlayerorg",
|
|
28
|
-
component: /* @__PURE__ */ jsx(LinkedInLogo, { className: "max-w-full max-h-full" }),
|
|
28
|
+
component: /* @__PURE__ */ jsx(LinkedInLogo, { className: "max-w-full max-h-full h-auto" }),
|
|
29
29
|
label: "LinkedIn"
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
href: "https://www.tiktok.com/@intlayer",
|
|
33
|
-
component: /* @__PURE__ */ jsx(TiktokLogo, { className: "max-w-full max-h-full" }),
|
|
33
|
+
component: /* @__PURE__ */ jsx(TiktokLogo, { className: "max-w-full max-h-full h-auto" }),
|
|
34
34
|
label: "TikTok"
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
href: "https://www.instagram.com/intlayer_org/",
|
|
38
|
-
component: /* @__PURE__ */ jsx(InstagramLogo, { className: "max-w-full max-h-full" }),
|
|
38
|
+
component: /* @__PURE__ */ jsx(InstagramLogo, { className: "max-w-full max-h-full h-auto" }),
|
|
39
39
|
label: "Instagram"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
href: "https://www.facebook.com/intlayer",
|
|
43
|
-
component: /* @__PURE__ */ jsx(FacebookLogo, { className: "max-w-full max-h-full" }),
|
|
43
|
+
component: /* @__PURE__ */ jsx(FacebookLogo, { className: "max-w-full max-h-full h-auto" }),
|
|
44
44
|
label: "Facebook"
|
|
45
45
|
}
|
|
46
46
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../src/components/SocialNetworks/index.tsx"],"sourcesContent":["import { AnchorHTMLAttributes, DetailedHTMLProps, FC, ReactNode } from 'react';\nimport { FacebookLogo } from './FacebookLogo';\nimport { InstagramLogo } from './InstagramLogo';\nimport { LinkedInLogo } from './LinkedInLogo';\nimport { ProductHuntLogo } from './ProductHuntLogo';\nimport { TiktokLogo } from './TiktokLogo';\nimport { XLogo } from './XLogo';\nimport { YoutubeLogo } from './YoutubeLogo';\n\nconst socialNetworks = [\n {\n href: 'https://www.producthunt.com/posts/intlayer?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-intlayer',\n component: <ProductHuntLogo className=\"max-w-full max-h-full\" />,\n label: 'Product Hunt',\n },\n {\n href: 'https://x.com/Intlayer183096',\n component: <XLogo className=\"max-w-full max-h-full\" />,\n label: 'X',\n },\n {\n href: 'https://www.youtube.com/@intlayer',\n component: <YoutubeLogo className=\"max-w-full max-h-full\" />,\n label: 'YouTube',\n },\n {\n href: 'https://www.linkedin.com/company/intlayerorg',\n component: <LinkedInLogo className=\"max-w-full max-h-full\" />,\n label: 'LinkedIn',\n },\n {\n href: 'https://www.tiktok.com/@intlayer',\n component: <TiktokLogo className=\"max-w-full max-h-full\" />,\n label: 'TikTok',\n },\n {\n href: 'https://www.instagram.com/intlayer_org/',\n component: <InstagramLogo className=\"max-w-full max-h-full\" />,\n label: 'Instagram',\n },\n {\n href: 'https://www.facebook.com/intlayer',\n component: <FacebookLogo className=\"max-w-full max-h-full\" />,\n label: 'Facebook',\n },\n];\n\ntype SocialNetworksProps = {\n renderItem?: (item: (typeof socialNetworks)[number]) => ReactNode;\n} & DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n>;\n\ntype DefaultRenderItemProps = DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n> & {\n component: ReactNode;\n label: string;\n};\n\nconst DefaultRenderItem: FC<DefaultRenderItemProps> = ({\n href,\n component,\n label,\n ...iconProps\n}) => (\n <a\n key={href}\n href={href}\n aria-label={label}\n className=\"max-w-4 max-h-4\"\n {...iconProps}\n >\n {component}\n </a>\n);\n\nexport const SocialNetworks = ({\n renderItem,\n ...iconProps\n}: SocialNetworksProps) =>\n socialNetworks.map(\n renderItem ??\n ((props) => (\n <DefaultRenderItem {...props} {...iconProps} key={props.label} />\n ))\n );\n\nexport * from './FacebookLogo';\nexport * from './InstagramLogo';\nexport * from './LinkedInLogo';\nexport * from './ProductHuntLogo';\nexport * from './TiktokLogo';\nexport * from './XLogo';\nexport * from './YoutubeLogo';\n"],"names":[],"mappings":";;;;;;;;;AASA,MAAM,iBAAiB;AAAA,EACrB;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,iBAAgB,EAAA,WAAU,
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../src/components/SocialNetworks/index.tsx"],"sourcesContent":["import { AnchorHTMLAttributes, DetailedHTMLProps, FC, ReactNode } from 'react';\nimport { FacebookLogo } from './FacebookLogo';\nimport { InstagramLogo } from './InstagramLogo';\nimport { LinkedInLogo } from './LinkedInLogo';\nimport { ProductHuntLogo } from './ProductHuntLogo';\nimport { TiktokLogo } from './TiktokLogo';\nimport { XLogo } from './XLogo';\nimport { YoutubeLogo } from './YoutubeLogo';\n\nconst socialNetworks = [\n {\n href: 'https://www.producthunt.com/posts/intlayer?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-intlayer',\n component: <ProductHuntLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'Product Hunt',\n },\n {\n href: 'https://x.com/Intlayer183096',\n component: <XLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'X',\n },\n {\n href: 'https://www.youtube.com/@intlayer',\n component: <YoutubeLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'YouTube',\n },\n {\n href: 'https://www.linkedin.com/company/intlayerorg',\n component: <LinkedInLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'LinkedIn',\n },\n {\n href: 'https://www.tiktok.com/@intlayer',\n component: <TiktokLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'TikTok',\n },\n {\n href: 'https://www.instagram.com/intlayer_org/',\n component: <InstagramLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'Instagram',\n },\n {\n href: 'https://www.facebook.com/intlayer',\n component: <FacebookLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'Facebook',\n },\n];\n\ntype SocialNetworksProps = {\n renderItem?: (item: (typeof socialNetworks)[number]) => ReactNode;\n} & DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n>;\n\ntype DefaultRenderItemProps = DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n> & {\n component: ReactNode;\n label: string;\n};\n\nconst DefaultRenderItem: FC<DefaultRenderItemProps> = ({\n href,\n component,\n label,\n ...iconProps\n}) => (\n <a\n key={href}\n href={href}\n aria-label={label}\n className=\"max-w-4 max-h-4\"\n {...iconProps}\n >\n {component}\n </a>\n);\n\nexport const SocialNetworks = ({\n renderItem,\n ...iconProps\n}: SocialNetworksProps) =>\n socialNetworks.map(\n renderItem ??\n ((props) => (\n <DefaultRenderItem {...props} {...iconProps} key={props.label} />\n ))\n );\n\nexport * from './FacebookLogo';\nexport * from './InstagramLogo';\nexport * from './LinkedInLogo';\nexport * from './ProductHuntLogo';\nexport * from './TiktokLogo';\nexport * from './XLogo';\nexport * from './YoutubeLogo';\n"],"names":[],"mappings":";;;;;;;;;AASA,MAAM,iBAAiB;AAAA,EACrB;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,iBAAgB,EAAA,WAAU,+BAA+B,CAAA;AAAA,IACrE,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,OAAM,EAAA,WAAU,+BAA+B,CAAA;AAAA,IAC3D,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,aAAY,EAAA,WAAU,+BAA+B,CAAA;AAAA,IACjE,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,cAAa,EAAA,WAAU,+BAA+B,CAAA;AAAA,IAClE,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,YAAW,EAAA,WAAU,+BAA+B,CAAA;AAAA,IAChE,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,eAAc,EAAA,WAAU,+BAA+B,CAAA;AAAA,IACnE,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,cAAa,EAAA,WAAU,+BAA+B,CAAA;AAAA,IAClE,OAAO;AAAA,EAAA;AAEX;AAiBA,MAAM,oBAAgD,CAAC;AAAA,EACrD;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC;AAAA,EAAA;AAAA,IAEC;AAAA,IACA,cAAY;AAAA,IACZ,WAAU;AAAA,IACT,GAAG;AAAA,IAEH,UAAA;AAAA,EAAA;AAAA,EANI;AAOP;AAGK,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA,GAAG;AACL,MACE,eAAe;AAAA,EACb,eACG,CAAC,UACC,8BAAA,mBAAA,EAAmB,GAAG,OAAQ,GAAG,WAAW,KAAK,MAAM,MAAO,CAAA;AAErE;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/design-system",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Intlayer design system, including UI components used in the Intlayer editor, website, and visual editor/CMS.",
|
|
6
6
|
"keywords": [
|
|
@@ -78,12 +78,12 @@
|
|
|
78
78
|
"tailwind-merge": "^3.0.2",
|
|
79
79
|
"zod": "^3.24.2",
|
|
80
80
|
"zustand": "^4.5.6",
|
|
81
|
-
"@intlayer/api": "5.5.
|
|
82
|
-
"@intlayer/
|
|
83
|
-
"@intlayer/
|
|
84
|
-
"@intlayer/
|
|
85
|
-
"
|
|
86
|
-
"react
|
|
81
|
+
"@intlayer/api": "5.5.4",
|
|
82
|
+
"@intlayer/core": "5.5.4",
|
|
83
|
+
"@intlayer/dictionaries-entry": "5.5.4",
|
|
84
|
+
"@intlayer/config": "5.5.4",
|
|
85
|
+
"react-intlayer": "5.5.4",
|
|
86
|
+
"@intlayer/editor-react": "5.5.4"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
89
|
"@chromatic-com/storybook": "^3.2.6",
|
|
@@ -120,11 +120,11 @@
|
|
|
120
120
|
"vite": "^6.3.1",
|
|
121
121
|
"vite-plugin-dts": "^4.5.3",
|
|
122
122
|
"vitest": "^3.0.9",
|
|
123
|
-
"@intlayer/backend": "5.5.
|
|
123
|
+
"@intlayer/backend": "5.5.4",
|
|
124
124
|
"@utils/eslint-config": "1.0.4",
|
|
125
125
|
"@utils/ts-config": "1.0.4",
|
|
126
|
-
"@utils/
|
|
127
|
-
"@utils/
|
|
126
|
+
"@utils/ts-config-types": "1.0.4",
|
|
127
|
+
"@utils/tsup-config": "1.0.4"
|
|
128
128
|
},
|
|
129
129
|
"peerDependencies": {
|
|
130
130
|
"@monaco-editor/react": "^4.7.0",
|
|
@@ -135,13 +135,13 @@
|
|
|
135
135
|
"react-dom": ">=16.0.0",
|
|
136
136
|
"tailwind-merge": "^3.0.2",
|
|
137
137
|
"zustand": "^4.5.6",
|
|
138
|
-
"@intlayer/
|
|
139
|
-
"@intlayer/
|
|
140
|
-
"@intlayer/
|
|
141
|
-
"@intlayer/editor-react": "5.5.
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"intlayer": "5.5.
|
|
138
|
+
"@intlayer/api": "5.5.4",
|
|
139
|
+
"@intlayer/config": "5.5.4",
|
|
140
|
+
"@intlayer/core": "5.5.4",
|
|
141
|
+
"@intlayer/editor-react": "5.5.4",
|
|
142
|
+
"intlayer": "5.5.4",
|
|
143
|
+
"@intlayer/dictionaries-entry": "5.5.4",
|
|
144
|
+
"react-intlayer": "5.5.4"
|
|
145
145
|
},
|
|
146
146
|
"scripts": {
|
|
147
147
|
"build": "pnpm build:package && pnpm build:css",
|