@intlayer/design-system 8.1.2 → 8.1.3
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/esm/_virtual/_rolldown/runtime.mjs +1 -18
- package/dist/esm/components/Accordion/Accordion.mjs +1 -99
- package/dist/esm/components/Accordion/Accordion.mjs.map +1 -1
- package/dist/esm/components/Accordion/index.mjs +1 -3
- package/dist/esm/components/Avatar/index.mjs +1 -126
- package/dist/esm/components/Avatar/index.mjs.map +1 -1
- package/dist/esm/components/Badge/index.mjs +1 -150
- package/dist/esm/components/Badge/index.mjs.map +1 -1
- package/dist/esm/components/Breadcrumb/breadcrumb.content.mjs +1 -32
- package/dist/esm/components/Breadcrumb/breadcrumb.content.mjs.map +1 -1
- package/dist/esm/components/Breadcrumb/index.mjs +1 -232
- package/dist/esm/components/Breadcrumb/index.mjs.map +1 -1
- package/dist/esm/components/Browser/Browser.content.mjs +1 -179
- package/dist/esm/components/Browser/Browser.content.mjs.map +1 -1
- package/dist/esm/components/Browser/Browser.mjs +1 -249
- package/dist/esm/components/Browser/Browser.mjs.map +1 -1
- package/dist/esm/components/Browser/index.mjs +1 -3
- package/dist/esm/components/Button/Button.mjs +1 -287
- package/dist/esm/components/Button/Button.mjs.map +1 -1
- package/dist/esm/components/Button/index.mjs +1 -3
- package/dist/esm/components/Carousel/index.content.mjs +1 -79
- package/dist/esm/components/Carousel/index.content.mjs.map +1 -1
- package/dist/esm/components/Carousel/index.mjs +4 -270
- package/dist/esm/components/Carousel/index.mjs.map +1 -1
- package/dist/esm/components/ClickOutsideDiv/index.mjs +1 -42
- package/dist/esm/components/ClickOutsideDiv/index.mjs.map +1 -1
- package/dist/esm/components/CollapsibleTable/CollapsibleTable.mjs +1 -246
- package/dist/esm/components/CollapsibleTable/CollapsibleTable.mjs.map +1 -1
- package/dist/esm/components/CollapsibleTable/index.mjs +1 -3
- package/dist/esm/components/Command/index.mjs +1 -88
- package/dist/esm/components/Command/index.mjs.map +1 -1
- package/dist/esm/components/Container/index.mjs +1 -203
- package/dist/esm/components/Container/index.mjs.map +1 -1
- package/dist/esm/components/ContentEditor/ContentEditor.mjs +1 -107
- package/dist/esm/components/ContentEditor/ContentEditor.mjs.map +1 -1
- package/dist/esm/components/ContentEditor/ContentEditorInput.mjs +1 -110
- package/dist/esm/components/ContentEditor/ContentEditorInput.mjs.map +1 -1
- package/dist/esm/components/ContentEditor/ContentEditorTextArea.mjs +1 -113
- package/dist/esm/components/ContentEditor/ContentEditorTextArea.mjs.map +1 -1
- package/dist/esm/components/ContentEditor/index.mjs +1 -5
- package/dist/esm/components/ContentSelector/ContentSelector.mjs +1 -81
- package/dist/esm/components/ContentSelector/ContentSelector.mjs.map +1 -1
- package/dist/esm/components/ContentSelector/index.mjs +1 -3
- package/dist/esm/components/CopyButton/CopyButton.content.mjs +1 -32
- package/dist/esm/components/CopyButton/CopyButton.content.mjs.map +1 -1
- package/dist/esm/components/CopyButton/index.mjs +1 -121
- package/dist/esm/components/CopyButton/index.mjs.map +1 -1
- package/dist/esm/components/CopyToClipboard/index.mjs +1 -101
- package/dist/esm/components/CopyToClipboard/index.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/DictionaryEditor.mjs +1 -31
- package/dist/esm/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/ItemLayout.mjs +1 -36
- package/dist/esm/components/DictionaryEditor/ItemLayout.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/ArrayWrapper.mjs +1 -35
- package/dist/esm/components/DictionaryEditor/NodeWrapper/ArrayWrapper.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/ConditionWrapper.mjs +1 -32
- package/dist/esm/components/DictionaryEditor/NodeWrapper/ConditionWrapper.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.mjs +1 -32
- package/dist/esm/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/FileWrapper.mjs +1 -36
- package/dist/esm/components/DictionaryEditor/NodeWrapper/FileWrapper.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/HtmlWrapper.mjs +1 -21
- package/dist/esm/components/DictionaryEditor/NodeWrapper/HtmlWrapper.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/InsertionWrapper.mjs +1 -21
- package/dist/esm/components/DictionaryEditor/NodeWrapper/InsertionWrapper.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.mjs +1 -21
- package/dist/esm/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.mjs +1 -39
- package/dist/esm/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs +1 -35
- package/dist/esm/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/TranslationWrapper.mjs +1 -22
- package/dist/esm/components/DictionaryEditor/NodeWrapper/TranslationWrapper.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/index.mjs +1 -88
- package/dist/esm/components/DictionaryEditor/NodeWrapper/index.mjs.map +1 -1
- package/dist/esm/components/DictionaryEditor/index.mjs +1 -3
- package/dist/esm/components/DictionaryFieldEditor/ContentEditor.mjs +1 -61
- package/dist/esm/components/DictionaryFieldEditor/ContentEditor.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +1 -661
- package/dist/esm/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +1 -64
- package/dist/esm/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs +1 -268
- package/dist/esm/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.mjs +1 -98
- package/dist/esm/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.mjs +1 -14
- package/dist/esm/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +1 -328
- package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs +1 -575
- package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs +1 -338
- package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs +1 -29
- package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +1 -112
- package/dist/esm/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/EnumKeyInput.mjs +1 -98
- package/dist/esm/components/DictionaryFieldEditor/EnumKeyInput.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/JSONEditor.mjs +1 -28
- package/dist/esm/components/DictionaryFieldEditor/JSONEditor.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs +1 -22
- package/dist/esm/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +1 -172
- package/dist/esm/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs +1 -268
- package/dist/esm/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/NodeTypeSelector.mjs +1 -84
- package/dist/esm/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +1 -153
- package/dist/esm/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +1 -350
- package/dist/esm/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/StructureEditor.mjs +1 -19
- package/dist/esm/components/DictionaryFieldEditor/StructureEditor.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/StructureView/StructureView.mjs +1 -199
- package/dist/esm/components/DictionaryFieldEditor/StructureView/StructureView.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/StructureView/structureView.content.mjs +1 -100
- package/dist/esm/components/DictionaryFieldEditor/StructureView/structureView.content.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs +1 -73
- package/dist/esm/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs +1 -27
- package/dist/esm/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.mjs +1 -4
- package/dist/esm/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.mjs +1 -78
- package/dist/esm/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs +1 -58
- package/dist/esm/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/getIsEditableSection.mjs +1 -14
- package/dist/esm/components/DictionaryFieldEditor/getIsEditableSection.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/index.mjs +1 -10
- package/dist/esm/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs +1 -318
- package/dist/esm/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs.map +1 -1
- package/dist/esm/components/DropDown/index.mjs +1 -177
- package/dist/esm/components/DropDown/index.mjs.map +1 -1
- package/dist/esm/components/EditableField/EditableFieldInput.mjs +1 -68
- package/dist/esm/components/EditableField/EditableFieldInput.mjs.map +1 -1
- package/dist/esm/components/EditableField/EditableFieldLayout.mjs +1 -103
- package/dist/esm/components/EditableField/EditableFieldLayout.mjs.map +1 -1
- package/dist/esm/components/EditableField/EditableFieldTextArea.mjs +1 -77
- package/dist/esm/components/EditableField/EditableFieldTextArea.mjs.map +1 -1
- package/dist/esm/components/EditableField/index.mjs +1 -4
- package/dist/esm/components/ExpandCollapse/ExpandCollapse.mjs +1 -96
- package/dist/esm/components/ExpandCollapse/ExpandCollapse.mjs.map +1 -1
- package/dist/esm/components/ExpandCollapse/expandCollapse.content.mjs +1 -58
- package/dist/esm/components/ExpandCollapse/expandCollapse.content.mjs.map +1 -1
- package/dist/esm/components/ExpandCollapse/index.mjs +1 -3
- package/dist/esm/components/Flags/Flag.mjs +1 -326
- package/dist/esm/components/Flags/Flag.mjs.map +1 -1
- package/dist/esm/components/Flags/ae.mjs +1 -36
- package/dist/esm/components/Flags/ae.mjs.map +1 -1
- package/dist/esm/components/Flags/af.mjs +1 -96
- package/dist/esm/components/Flags/af.mjs.map +1 -1
- package/dist/esm/components/Flags/al.mjs +1 -37
- package/dist/esm/components/Flags/al.mjs.map +1 -1
- package/dist/esm/components/Flags/am.mjs +1 -33
- package/dist/esm/components/Flags/am.mjs.map +1 -1
- package/dist/esm/components/Flags/ar.mjs +1 -160
- package/dist/esm/components/Flags/ar.mjs.map +1 -1
- package/dist/esm/components/Flags/at.mjs +1 -30
- package/dist/esm/components/Flags/at.mjs.map +1 -1
- package/dist/esm/components/Flags/au.mjs +1 -42
- package/dist/esm/components/Flags/au.mjs.map +1 -1
- package/dist/esm/components/Flags/az.mjs +1 -46
- package/dist/esm/components/Flags/az.mjs.map +1 -1
- package/dist/esm/components/Flags/ba.mjs +1 -40
- package/dist/esm/components/Flags/ba.mjs.map +1 -1
- package/dist/esm/components/Flags/bd.mjs +1 -32
- package/dist/esm/components/Flags/bd.mjs.map +1 -1
- package/dist/esm/components/Flags/be.mjs +1 -36
- package/dist/esm/components/Flags/be.mjs.map +1 -1
- package/dist/esm/components/Flags/bg.mjs +1 -33
- package/dist/esm/components/Flags/bg.mjs.map +1 -1
- package/dist/esm/components/Flags/bh.mjs +1 -30
- package/dist/esm/components/Flags/bh.mjs.map +1 -1
- package/dist/esm/components/Flags/bn.mjs +1 -42
- package/dist/esm/components/Flags/bn.mjs.map +1 -1
- package/dist/esm/components/Flags/bo.mjs +1 -3030
- package/dist/esm/components/Flags/bo.mjs.map +1 -1
- package/dist/esm/components/Flags/br.mjs +1 -106
- package/dist/esm/components/Flags/br.mjs.map +1 -1
- package/dist/esm/components/Flags/bw.mjs +1 -33
- package/dist/esm/components/Flags/bw.mjs.map +1 -1
- package/dist/esm/components/Flags/by.mjs +1 -45
- package/dist/esm/components/Flags/by.mjs.map +1 -1
- package/dist/esm/components/Flags/bz.mjs +1 -338
- package/dist/esm/components/Flags/bz.mjs.map +1 -1
- package/dist/esm/components/Flags/ca.mjs +1 -30
- package/dist/esm/components/Flags/ca.mjs.map +1 -1
- package/dist/esm/components/Flags/ch.mjs +1 -30
- package/dist/esm/components/Flags/ch.mjs.map +1 -1
- package/dist/esm/components/Flags/cl.mjs +1 -43
- package/dist/esm/components/Flags/cl.mjs.map +1 -1
- package/dist/esm/components/Flags/cn.mjs +1 -57
- package/dist/esm/components/Flags/cn.mjs.map +1 -1
- package/dist/esm/components/Flags/co.mjs +1 -36
- package/dist/esm/components/Flags/co.mjs.map +1 -1
- package/dist/esm/components/Flags/cr.mjs +1 -36
- package/dist/esm/components/Flags/cr.mjs.map +1 -1
- package/dist/esm/components/Flags/cu.mjs +1 -43
- package/dist/esm/components/Flags/cu.mjs.map +1 -1
- package/dist/esm/components/Flags/cv.mjs +1 -43
- package/dist/esm/components/Flags/cv.mjs.map +1 -1
- package/dist/esm/components/Flags/cz.mjs +1 -33
- package/dist/esm/components/Flags/cz.mjs.map +1 -1
- package/dist/esm/components/Flags/de.mjs +1 -33
- package/dist/esm/components/Flags/de.mjs.map +1 -1
- package/dist/esm/components/Flags/dj.mjs +1 -43
- package/dist/esm/components/Flags/dj.mjs.map +1 -1
- package/dist/esm/components/Flags/dk.mjs +1 -33
- package/dist/esm/components/Flags/dk.mjs.map +1 -1
- package/dist/esm/components/Flags/do.mjs +1 -211
- package/dist/esm/components/Flags/do.mjs.map +1 -1
- package/dist/esm/components/Flags/dz.mjs +1 -33
- package/dist/esm/components/Flags/dz.mjs.map +1 -1
- package/dist/esm/components/Flags/ec.mjs +1 -622
- package/dist/esm/components/Flags/ec.mjs.map +1 -1
- package/dist/esm/components/Flags/ee.mjs +1 -33
- package/dist/esm/components/Flags/ee.mjs.map +1 -1
- package/dist/esm/components/Flags/eg.mjs +1 -112
- package/dist/esm/components/Flags/eg.mjs.map +1 -1
- package/dist/esm/components/Flags/es-ct.mjs +1 -32
- package/dist/esm/components/Flags/es-ct.mjs.map +1 -1
- package/dist/esm/components/Flags/es-ga.mjs +1 -792
- package/dist/esm/components/Flags/es-ga.mjs.map +1 -1
- package/dist/esm/components/Flags/es-pv.mjs +1 -33
- package/dist/esm/components/Flags/es-pv.mjs.map +1 -1
- package/dist/esm/components/Flags/es.mjs +1 -2226
- package/dist/esm/components/Flags/es.mjs.map +1 -1
- package/dist/esm/components/Flags/et.mjs +1 -50
- package/dist/esm/components/Flags/et.mjs.map +1 -1
- package/dist/esm/components/Flags/fi.mjs +1 -33
- package/dist/esm/components/Flags/fi.mjs.map +1 -1
- package/dist/esm/components/Flags/flags.mjs +1 -1363
- package/dist/esm/components/Flags/flags.mjs.map +1 -1
- package/dist/esm/components/Flags/fo.mjs +1 -41
- package/dist/esm/components/Flags/fo.mjs.map +1 -1
- package/dist/esm/components/Flags/fr.mjs +1 -33
- package/dist/esm/components/Flags/fr.mjs.map +1 -1
- package/dist/esm/components/Flags/gb-wls.mjs +1 -43
- package/dist/esm/components/Flags/gb-wls.mjs.map +1 -1
- package/dist/esm/components/Flags/gb.mjs +1 -39
- package/dist/esm/components/Flags/gb.mjs.map +1 -1
- package/dist/esm/components/Flags/ge.mjs +1 -37
- package/dist/esm/components/Flags/ge.mjs.map +1 -1
- package/dist/esm/components/Flags/gh.mjs +1 -36
- package/dist/esm/components/Flags/gh.mjs.map +1 -1
- package/dist/esm/components/Flags/gr.mjs +1 -66
- package/dist/esm/components/Flags/gr.mjs.map +1 -1
- package/dist/esm/components/Flags/gt.mjs +1 -461
- package/dist/esm/components/Flags/gt.mjs.map +1 -1
- package/dist/esm/components/Flags/gw.mjs +1 -67
- package/dist/esm/components/Flags/gw.mjs.map +1 -1
- package/dist/esm/components/Flags/hk.mjs +1 -44
- package/dist/esm/components/Flags/hk.mjs.map +1 -1
- package/dist/esm/components/Flags/hn.mjs +1 -83
- package/dist/esm/components/Flags/hn.mjs.map +1 -1
- package/dist/esm/components/Flags/hr.mjs +1 -94
- package/dist/esm/components/Flags/hr.mjs.map +1 -1
- package/dist/esm/components/Flags/hu.mjs +1 -33
- package/dist/esm/components/Flags/hu.mjs.map +1 -1
- package/dist/esm/components/Flags/id.mjs +1 -30
- package/dist/esm/components/Flags/id.mjs.map +1 -1
- package/dist/esm/components/Flags/ie.mjs +1 -36
- package/dist/esm/components/Flags/ie.mjs.map +1 -1
- package/dist/esm/components/Flags/il.mjs +1 -46
- package/dist/esm/components/Flags/il.mjs.map +1 -1
- package/dist/esm/components/Flags/in.mjs +1 -74
- package/dist/esm/components/Flags/in.mjs.map +1 -1
- package/dist/esm/components/Flags/index.mjs +1 -4
- package/dist/esm/components/Flags/iq.mjs +1 -40
- package/dist/esm/components/Flags/iq.mjs.map +1 -1
- package/dist/esm/components/Flags/ir.mjs +1 -112
- package/dist/esm/components/Flags/ir.mjs.map +1 -1
- package/dist/esm/components/Flags/is.mjs +1 -40
- package/dist/esm/components/Flags/is.mjs.map +1 -1
- package/dist/esm/components/Flags/it.mjs +1 -36
- package/dist/esm/components/Flags/it.mjs.map +1 -1
- package/dist/esm/components/Flags/jm.mjs +1 -36
- package/dist/esm/components/Flags/jm.mjs.map +1 -1
- package/dist/esm/components/Flags/jo.mjs +1 -48
- package/dist/esm/components/Flags/jo.mjs.map +1 -1
- package/dist/esm/components/Flags/jp.mjs +1 -41
- package/dist/esm/components/Flags/jp.mjs.map +1 -1
- package/dist/esm/components/Flags/ke.mjs +1 -91
- package/dist/esm/components/Flags/ke.mjs.map +1 -1
- package/dist/esm/components/Flags/kg.mjs +1 -49
- package/dist/esm/components/Flags/kg.mjs.map +1 -1
- package/dist/esm/components/Flags/kh.mjs +1 -76
- package/dist/esm/components/Flags/kh.mjs.map +1 -1
- package/dist/esm/components/Flags/km.mjs +1 -52
- package/dist/esm/components/Flags/km.mjs.map +1 -1
- package/dist/esm/components/Flags/kr.mjs +1 -64
- package/dist/esm/components/Flags/kr.mjs.map +1 -1
- package/dist/esm/components/Flags/kw.mjs +1 -44
- package/dist/esm/components/Flags/kw.mjs.map +1 -1
- package/dist/esm/components/Flags/kz.mjs +1 -94
- package/dist/esm/components/Flags/kz.mjs.map +1 -1
- package/dist/esm/components/Flags/la.mjs +1 -39
- package/dist/esm/components/Flags/la.mjs.map +1 -1
- package/dist/esm/components/Flags/lb.mjs +1 -50
- package/dist/esm/components/Flags/lb.mjs.map +1 -1
- package/dist/esm/components/Flags/li.mjs +1 -136
- package/dist/esm/components/Flags/li.mjs.map +1 -1
- package/dist/esm/components/Flags/lk.mjs +1 -73
- package/dist/esm/components/Flags/lk.mjs.map +1 -1
- package/dist/esm/components/Flags/lt.mjs +1 -46
- package/dist/esm/components/Flags/lt.mjs.map +1 -1
- package/dist/esm/components/Flags/lu.mjs +1 -33
- package/dist/esm/components/Flags/lu.mjs.map +1 -1
- package/dist/esm/components/Flags/lv.mjs +1 -30
- package/dist/esm/components/Flags/lv.mjs.map +1 -1
- package/dist/esm/components/Flags/ly.mjs +1 -39
- package/dist/esm/components/Flags/ly.mjs.map +1 -1
- package/dist/esm/components/Flags/ma.mjs +1 -32
- package/dist/esm/components/Flags/ma.mjs.map +1 -1
- package/dist/esm/components/Flags/mc.mjs +1 -33
- package/dist/esm/components/Flags/mc.mjs.map +1 -1
- package/dist/esm/components/Flags/md.mjs +1 -317
- package/dist/esm/components/Flags/md.mjs.map +1 -1
- package/dist/esm/components/Flags/mk.mjs +1 -37
- package/dist/esm/components/Flags/mk.mjs.map +1 -1
- package/dist/esm/components/Flags/mm.mjs +1 -58
- package/dist/esm/components/Flags/mm.mjs.map +1 -1
- package/dist/esm/components/Flags/mn.mjs +1 -59
- package/dist/esm/components/Flags/mn.mjs.map +1 -1
- package/dist/esm/components/Flags/mo.mjs +1 -42
- package/dist/esm/components/Flags/mo.mjs.map +1 -1
- package/dist/esm/components/Flags/mr.mjs +1 -37
- package/dist/esm/components/Flags/mr.mjs.map +1 -1
- package/dist/esm/components/Flags/mt.mjs +1 -153
- package/dist/esm/components/Flags/mt.mjs.map +1 -1
- package/dist/esm/components/Flags/mv.mjs +1 -40
- package/dist/esm/components/Flags/mv.mjs.map +1 -1
- package/dist/esm/components/Flags/mx.mjs +1 -1365
- package/dist/esm/components/Flags/mx.mjs.map +1 -1
- package/dist/esm/components/Flags/my.mjs +1 -78
- package/dist/esm/components/Flags/my.mjs.map +1 -1
- package/dist/esm/components/Flags/mz.mjs +1 -92
- package/dist/esm/components/Flags/mz.mjs.map +1 -1
- package/dist/esm/components/Flags/ng.mjs +1 -33
- package/dist/esm/components/Flags/ng.mjs.map +1 -1
- package/dist/esm/components/Flags/ni.mjs +1 -451
- package/dist/esm/components/Flags/ni.mjs.map +1 -1
- package/dist/esm/components/Flags/nl.mjs +1 -33
- package/dist/esm/components/Flags/nl.mjs.map +1 -1
- package/dist/esm/components/Flags/no.mjs +1 -39
- package/dist/esm/components/Flags/no.mjs.map +1 -1
- package/dist/esm/components/Flags/np.mjs +1 -38
- package/dist/esm/components/Flags/np.mjs.map +1 -1
- package/dist/esm/components/Flags/nz.mjs +1 -104
- package/dist/esm/components/Flags/nz.mjs.map +1 -1
- package/dist/esm/components/Flags/om.mjs +1 -539
- package/dist/esm/components/Flags/om.mjs.map +1 -1
- package/dist/esm/components/Flags/pa.mjs +1 -46
- package/dist/esm/components/Flags/pa.mjs.map +1 -1
- package/dist/esm/components/Flags/pe.mjs +1 -30
- package/dist/esm/components/Flags/pe.mjs.map +1 -1
- package/dist/esm/components/Flags/ph.mjs +1 -36
- package/dist/esm/components/Flags/ph.mjs.map +1 -1
- package/dist/esm/components/Flags/pk.mjs +1 -38
- package/dist/esm/components/Flags/pk.mjs.map +1 -1
- package/dist/esm/components/Flags/pl.mjs +1 -30
- package/dist/esm/components/Flags/pl.mjs.map +1 -1
- package/dist/esm/components/Flags/pr.mjs +1 -43
- package/dist/esm/components/Flags/pr.mjs.map +1 -1
- package/dist/esm/components/Flags/ps.mjs +1 -45
- package/dist/esm/components/Flags/ps.mjs.map +1 -1
- package/dist/esm/components/Flags/pt.mjs +1 -152
- package/dist/esm/components/Flags/pt.mjs.map +1 -1
- package/dist/esm/components/Flags/py.mjs +1 -61
- package/dist/esm/components/Flags/py.mjs.map +1 -1
- package/dist/esm/components/Flags/qa.mjs +1 -30
- package/dist/esm/components/Flags/qa.mjs.map +1 -1
- package/dist/esm/components/Flags/ro.mjs +1 -36
- package/dist/esm/components/Flags/ro.mjs.map +1 -1
- package/dist/esm/components/Flags/rs.mjs +1 -820
- package/dist/esm/components/Flags/rs.mjs.map +1 -1
- package/dist/esm/components/Flags/ru.mjs +1 -33
- package/dist/esm/components/Flags/ru.mjs.map +1 -1
- package/dist/esm/components/Flags/sa.mjs +1 -79
- package/dist/esm/components/Flags/sa.mjs.map +1 -1
- package/dist/esm/components/Flags/sd.mjs +1 -44
- package/dist/esm/components/Flags/sd.mjs.map +1 -1
- package/dist/esm/components/Flags/se.mjs +1 -30
- package/dist/esm/components/Flags/se.mjs.map +1 -1
- package/dist/esm/components/Flags/sg.mjs +1 -42
- package/dist/esm/components/Flags/sg.mjs.map +1 -1
- package/dist/esm/components/Flags/si.mjs +1 -59
- package/dist/esm/components/Flags/si.mjs.map +1 -1
- package/dist/esm/components/Flags/sk.mjs +1 -45
- package/dist/esm/components/Flags/sk.mjs.map +1 -1
- package/dist/esm/components/Flags/so.mjs +1 -37
- package/dist/esm/components/Flags/so.mjs.map +1 -1
- package/dist/esm/components/Flags/st.mjs +1 -73
- package/dist/esm/components/Flags/st.mjs.map +1 -1
- package/dist/esm/components/Flags/sv.mjs +1 -1735
- package/dist/esm/components/Flags/sv.mjs.map +1 -1
- package/dist/esm/components/Flags/sy.mjs +1 -36
- package/dist/esm/components/Flags/sy.mjs.map +1 -1
- package/dist/esm/components/Flags/td.mjs +1 -33
- package/dist/esm/components/Flags/td.mjs.map +1 -1
- package/dist/esm/components/Flags/th.mjs +1 -33
- package/dist/esm/components/Flags/th.mjs.map +1 -1
- package/dist/esm/components/Flags/tl.mjs +1 -43
- package/dist/esm/components/Flags/tl.mjs.map +1 -1
- package/dist/esm/components/Flags/tn.mjs +1 -30
- package/dist/esm/components/Flags/tn.mjs.map +1 -1
- package/dist/esm/components/Flags/tr.mjs +1 -36
- package/dist/esm/components/Flags/tr.mjs.map +1 -1
- package/dist/esm/components/Flags/tt.mjs +1 -35
- package/dist/esm/components/Flags/tt.mjs.map +1 -1
- package/dist/esm/components/Flags/tw.mjs +1 -40
- package/dist/esm/components/Flags/tw.mjs.map +1 -1
- package/dist/esm/components/Flags/tz.mjs +1 -44
- package/dist/esm/components/Flags/tz.mjs.map +1 -1
- package/dist/esm/components/Flags/ua.mjs +1 -33
- package/dist/esm/components/Flags/ua.mjs.map +1 -1
- package/dist/esm/components/Flags/ug.mjs +1 -145
- package/dist/esm/components/Flags/ug.mjs.map +1 -1
- package/dist/esm/components/Flags/us.mjs +1 -45
- package/dist/esm/components/Flags/us.mjs.map +1 -1
- package/dist/esm/components/Flags/uy.mjs +1 -63
- package/dist/esm/components/Flags/uy.mjs.map +1 -1
- package/dist/esm/components/Flags/uz.mjs +1 -109
- package/dist/esm/components/Flags/uz.mjs.map +1 -1
- package/dist/esm/components/Flags/ve.mjs +1 -84
- package/dist/esm/components/Flags/ve.mjs.map +1 -1
- package/dist/esm/components/Flags/vn.mjs +1 -37
- package/dist/esm/components/Flags/vn.mjs.map +1 -1
- package/dist/esm/components/Flags/xx.mjs +1 -35
- package/dist/esm/components/Flags/xx.mjs.map +1 -1
- package/dist/esm/components/Flags/ye.mjs +1 -36
- package/dist/esm/components/Flags/ye.mjs.map +1 -1
- package/dist/esm/components/Flags/za.mjs +1 -51
- package/dist/esm/components/Flags/za.mjs.map +1 -1
- package/dist/esm/components/Flags/zw.mjs +1 -70
- package/dist/esm/components/Flags/zw.mjs.map +1 -1
- package/dist/esm/components/Footer/index.mjs +1 -123
- package/dist/esm/components/Footer/index.mjs.map +1 -1
- package/dist/esm/components/Form/Form.mjs +1 -65
- package/dist/esm/components/Form/Form.mjs.map +1 -1
- package/dist/esm/components/Form/FormBase.mjs +1 -50
- package/dist/esm/components/Form/FormBase.mjs.map +1 -1
- package/dist/esm/components/Form/FormControl.mjs +1 -19
- package/dist/esm/components/Form/FormControl.mjs.map +1 -1
- package/dist/esm/components/Form/FormDescription.mjs +1 -17
- package/dist/esm/components/Form/FormDescription.mjs.map +1 -1
- package/dist/esm/components/Form/FormField.mjs +1 -34
- package/dist/esm/components/Form/FormField.mjs.map +1 -1
- package/dist/esm/components/Form/FormItem.mjs +1 -23
- package/dist/esm/components/Form/FormItem.mjs.map +1 -1
- package/dist/esm/components/Form/FormLabel.mjs +1 -19
- package/dist/esm/components/Form/FormLabel.mjs.map +1 -1
- package/dist/esm/components/Form/FormMessage.mjs +1 -21
- package/dist/esm/components/Form/FormMessage.mjs.map +1 -1
- package/dist/esm/components/Form/elements/AutoSizeTextAreaElement.mjs +1 -14
- package/dist/esm/components/Form/elements/AutoSizeTextAreaElement.mjs.map +1 -1
- package/dist/esm/components/Form/elements/CheckboxElement.mjs +1 -25
- package/dist/esm/components/Form/elements/CheckboxElement.mjs.map +1 -1
- package/dist/esm/components/Form/elements/EditableFieldInputElement.mjs +1 -16
- package/dist/esm/components/Form/elements/EditableFieldInputElement.mjs.map +1 -1
- package/dist/esm/components/Form/elements/EditableFieldTextAreaElement.mjs +1 -16
- package/dist/esm/components/Form/elements/EditableFieldTextAreaElement.mjs.map +1 -1
- package/dist/esm/components/Form/elements/FormElement.mjs +1 -58
- package/dist/esm/components/Form/elements/FormElement.mjs.map +1 -1
- package/dist/esm/components/Form/elements/FormElementWrapper.mjs +1 -34
- package/dist/esm/components/Form/elements/FormElementWrapper.mjs.map +1 -1
- package/dist/esm/components/Form/elements/InputElement.mjs +1 -16
- package/dist/esm/components/Form/elements/InputElement.mjs.map +1 -1
- package/dist/esm/components/Form/elements/InputPasswordElement.mjs +1 -19
- package/dist/esm/components/Form/elements/InputPasswordElement.mjs.map +1 -1
- package/dist/esm/components/Form/elements/MultiselectElement.mjs +1 -49
- package/dist/esm/components/Form/elements/MultiselectElement.mjs.map +1 -1
- package/dist/esm/components/Form/elements/OTPElement.mjs +1 -108
- package/dist/esm/components/Form/elements/OTPElement.mjs.map +1 -1
- package/dist/esm/components/Form/elements/SearchInputElement.mjs +1 -16
- package/dist/esm/components/Form/elements/SearchInputElement.mjs.map +1 -1
- package/dist/esm/components/Form/elements/SelectElement.mjs +1 -49
- package/dist/esm/components/Form/elements/SelectElement.mjs.map +1 -1
- package/dist/esm/components/Form/elements/SwitchSelectorElement.mjs +1 -48
- package/dist/esm/components/Form/elements/SwitchSelectorElement.mjs.map +1 -1
- package/dist/esm/components/Form/elements/TextAreaElement.mjs +1 -16
- package/dist/esm/components/Form/elements/TextAreaElement.mjs.map +1 -1
- package/dist/esm/components/Form/elements/index.mjs +1 -10
- package/dist/esm/components/Form/index.mjs +1 -5
- package/dist/esm/components/Form/layout/FormItemLayout.mjs +1 -24
- package/dist/esm/components/Form/layout/FormItemLayout.mjs.map +1 -1
- package/dist/esm/components/Form/layout/FormLabelLayout.mjs +1 -20
- package/dist/esm/components/Form/layout/FormLabelLayout.mjs.map +1 -1
- package/dist/esm/components/Form/layout/RequiredStar.mjs +1 -10
- package/dist/esm/components/Form/layout/RequiredStar.mjs.map +1 -1
- package/dist/esm/components/Form/layout/index.mjs +1 -4
- package/dist/esm/components/HTMLRender/HTMLRender.mjs +1 -65
- package/dist/esm/components/HTMLRender/HTMLRender.mjs.map +1 -1
- package/dist/esm/components/HTMLRender/index.mjs +1 -3
- package/dist/esm/components/Headers/index.mjs +1 -216
- package/dist/esm/components/Headers/index.mjs.map +1 -1
- package/dist/esm/components/HeightResizer/index.mjs +1 -163
- package/dist/esm/components/HeightResizer/index.mjs.map +1 -1
- package/dist/esm/components/HideShow/index.mjs +1 -70
- package/dist/esm/components/HideShow/index.mjs.map +1 -1
- package/dist/esm/components/IDE/Code.mjs +2 -59
- package/dist/esm/components/IDE/Code.mjs.map +1 -1
- package/dist/esm/components/IDE/CodeBlockClient.mjs +2 -31
- package/dist/esm/components/IDE/CodeBlockClient.mjs.map +1 -1
- package/dist/esm/components/IDE/CodeBlockServer.mjs +2 -45
- package/dist/esm/components/IDE/CodeBlockServer.mjs.map +1 -1
- package/dist/esm/components/IDE/CodeBlockShiki.mjs +1 -109
- package/dist/esm/components/IDE/CodeBlockShiki.mjs.map +1 -1
- package/dist/esm/components/IDE/CodeConditionalRenderer.mjs +1 -20
- package/dist/esm/components/IDE/CodeConditionalRenderer.mjs.map +1 -1
- package/dist/esm/components/IDE/CodeContext.mjs +1 -44
- package/dist/esm/components/IDE/CodeContext.mjs.map +1 -1
- package/dist/esm/components/IDE/CodeFormatSelector.mjs +1 -40
- package/dist/esm/components/IDE/CodeFormatSelector.mjs.map +1 -1
- package/dist/esm/components/IDE/ContentDeclarationFormatSelector.mjs +1 -41
- package/dist/esm/components/IDE/ContentDeclarationFormatSelector.mjs.map +1 -1
- package/dist/esm/components/IDE/CopyCode.mjs +1 -27
- package/dist/esm/components/IDE/CopyCode.mjs.map +1 -1
- package/dist/esm/components/IDE/FileList.mjs +1 -34
- package/dist/esm/components/IDE/FileList.mjs.map +1 -1
- package/dist/esm/components/IDE/FileTree.mjs +1 -64
- package/dist/esm/components/IDE/FileTree.mjs.map +1 -1
- package/dist/esm/components/IDE/IDE.mjs +1 -87
- package/dist/esm/components/IDE/IDE.mjs.map +1 -1
- package/dist/esm/components/IDE/MarkDownRender.mjs +1 -22
- package/dist/esm/components/IDE/MarkDownRender.mjs.map +1 -1
- package/dist/esm/components/IDE/MonacoCode.mjs +2 -103
- package/dist/esm/components/IDE/MonacoCode.mjs.map +1 -1
- package/dist/esm/components/IDE/PackageManagerSelector.mjs +1 -42
- package/dist/esm/components/IDE/PackageManagerSelector.mjs.map +1 -1
- package/dist/esm/components/IDE/code.content.mjs +1 -58
- package/dist/esm/components/IDE/code.content.mjs.map +1 -1
- package/dist/esm/components/IDE/copyCode.content.mjs +1 -58
- package/dist/esm/components/IDE/copyCode.content.mjs.map +1 -1
- package/dist/esm/components/IDE/createFileTree.mjs +1 -31
- package/dist/esm/components/IDE/createFileTree.mjs.map +1 -1
- package/dist/esm/components/IDE/index.mjs +1 -6
- package/dist/esm/components/IDE/selectors.content.mjs +1 -144
- package/dist/esm/components/IDE/selectors.content.mjs.map +1 -1
- package/dist/esm/components/InformationTag/index.mjs +1 -80
- package/dist/esm/components/InformationTag/index.mjs.map +1 -1
- package/dist/esm/components/Input/Checkbox.mjs +1 -97
- package/dist/esm/components/Input/Checkbox.mjs.map +1 -1
- package/dist/esm/components/Input/Input.mjs +1 -64
- package/dist/esm/components/Input/Input.mjs.map +1 -1
- package/dist/esm/components/Input/InputPassword.mjs +1 -38
- package/dist/esm/components/Input/InputPassword.mjs.map +1 -1
- package/dist/esm/components/Input/OTPInput.mjs +2 -474
- package/dist/esm/components/Input/OTPInput.mjs.map +1 -1
- package/dist/esm/components/Input/SearchInput.mjs +1 -17
- package/dist/esm/components/Input/SearchInput.mjs.map +1 -1
- package/dist/esm/components/Input/index.mjs +1 -7
- package/dist/esm/components/KeyboardScreenAdapter/index.mjs +1 -119
- package/dist/esm/components/KeyboardScreenAdapter/index.mjs.map +1 -1
- package/dist/esm/components/KeyboardShortcut/KeyboardShortcut.mjs +1 -230
- package/dist/esm/components/KeyboardShortcut/KeyboardShortcut.mjs.map +1 -1
- package/dist/esm/components/KeyboardShortcut/index.mjs +1 -3
- package/dist/esm/components/Label/index.mjs +1 -53
- package/dist/esm/components/Label/index.mjs.map +1 -1
- package/dist/esm/components/LanguageBackground/index.mjs +1 -87
- package/dist/esm/components/LanguageBackground/index.mjs.map +1 -1
- package/dist/esm/components/Link/Link.mjs +1 -239
- package/dist/esm/components/Link/Link.mjs.map +1 -1
- package/dist/esm/components/Link/index.mjs +1 -3
- package/dist/esm/components/Loader/index.content.mjs +1 -32
- package/dist/esm/components/Loader/index.content.mjs.map +1 -1
- package/dist/esm/components/Loader/index.mjs +1 -111
- package/dist/esm/components/Loader/index.mjs.map +1 -1
- package/dist/esm/components/Loader/spinner.mjs +1 -121
- package/dist/esm/components/Loader/spinner.mjs.map +1 -1
- package/dist/esm/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +1 -183
- package/dist/esm/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -1
- package/dist/esm/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs +1 -29
- package/dist/esm/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs.map +1 -1
- package/dist/esm/components/LocaleSwitcherContentDropDown/index.mjs +1 -4
- package/dist/esm/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs +1 -182
- package/dist/esm/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs.map +1 -1
- package/dist/esm/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +1 -134
- package/dist/esm/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
- package/dist/esm/components/LocaleSwitcherDropDown/index.mjs +1 -3
- package/dist/esm/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs +1 -140
- package/dist/esm/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs.map +1 -1
- package/dist/esm/components/Logo/Logo.mjs +1 -34
- package/dist/esm/components/Logo/Logo.mjs.map +1 -1
- package/dist/esm/components/Logo/LogoTextOnly.mjs +1 -28
- package/dist/esm/components/Logo/LogoTextOnly.mjs.map +1 -1
- package/dist/esm/components/Logo/LogoWithText.mjs +1 -34
- package/dist/esm/components/Logo/LogoWithText.mjs.map +1 -1
- package/dist/esm/components/Logo/LogoWithTextBelow.mjs +1 -34
- package/dist/esm/components/Logo/LogoWithTextBelow.mjs.map +1 -1
- package/dist/esm/components/Logo/index.mjs +1 -6
- package/dist/esm/components/MarkDownRender/MarkDownRender.mjs +1 -167
- package/dist/esm/components/MarkDownRender/MarkDownRender.mjs.map +1 -1
- package/dist/esm/components/MarkDownRender/index.mjs +1 -3
- package/dist/esm/components/MaxHeightSmoother/index.mjs +1 -163
- package/dist/esm/components/MaxHeightSmoother/index.mjs.map +1 -1
- package/dist/esm/components/MaxWidthSmoother/index.mjs +1 -18
- package/dist/esm/components/MaxWidthSmoother/index.mjs.map +1 -1
- package/dist/esm/components/Modal/Modal.mjs +1 -201
- package/dist/esm/components/Modal/Modal.mjs.map +1 -1
- package/dist/esm/components/Modal/index.mjs +1 -3
- package/dist/esm/components/Navbar/Burger.mjs +1 -76
- package/dist/esm/components/Navbar/Burger.mjs.map +1 -1
- package/dist/esm/components/Navbar/DesktopNavbar.mjs +1 -96
- package/dist/esm/components/Navbar/DesktopNavbar.mjs.map +1 -1
- package/dist/esm/components/Navbar/MobileNavbar.mjs +1 -169
- package/dist/esm/components/Navbar/MobileNavbar.mjs.map +1 -1
- package/dist/esm/components/Navbar/index.mjs +1 -86
- package/dist/esm/components/Navbar/index.mjs.map +1 -1
- package/dist/esm/components/Navbar/useNavigation.mjs +1 -152
- package/dist/esm/components/Navbar/useNavigation.mjs.map +1 -1
- package/dist/esm/components/Pagination/NumberItemsSelector.mjs +1 -46
- package/dist/esm/components/Pagination/NumberItemsSelector.mjs.map +1 -1
- package/dist/esm/components/Pagination/Pagination.mjs +1 -173
- package/dist/esm/components/Pagination/Pagination.mjs.map +1 -1
- package/dist/esm/components/Pagination/ShowingResultsNumberItems.mjs +1 -27
- package/dist/esm/components/Pagination/ShowingResultsNumberItems.mjs.map +1 -1
- package/dist/esm/components/Pagination/index.mjs +1 -5
- package/dist/esm/components/Pagination/pagination.content.mjs +1 -114
- package/dist/esm/components/Pagination/pagination.content.mjs.map +1 -1
- package/dist/esm/components/Pattern/DotPattern.mjs +1 -121
- package/dist/esm/components/Pattern/DotPattern.mjs.map +1 -1
- package/dist/esm/components/Pattern/GridPattern.mjs +1 -156
- package/dist/esm/components/Pattern/GridPattern.mjs.map +1 -1
- package/dist/esm/components/Pattern/SpotLight.mjs +1 -168
- package/dist/esm/components/Pattern/SpotLight.mjs.map +1 -1
- package/dist/esm/components/Pattern/index.mjs +1 -5
- package/dist/esm/components/Popover/dynamic.mjs +1 -128
- package/dist/esm/components/Popover/dynamic.mjs.map +1 -1
- package/dist/esm/components/Popover/index.mjs +1 -4
- package/dist/esm/components/Popover/static.mjs +1 -192
- package/dist/esm/components/Popover/static.mjs.map +1 -1
- package/dist/esm/components/PressableSpan/PressableSpan.mjs +1 -158
- package/dist/esm/components/PressableSpan/PressableSpan.mjs.map +1 -1
- package/dist/esm/components/PressableSpan/index.mjs +1 -3
- package/dist/esm/components/RightDrawer/RightDrawer.mjs +1 -179
- package/dist/esm/components/RightDrawer/RightDrawer.mjs.map +1 -1
- package/dist/esm/components/RightDrawer/index.mjs +1 -4
- package/dist/esm/components/RightDrawer/isElementAtTopAndNotCovered.mjs +1 -60
- package/dist/esm/components/RightDrawer/isElementAtTopAndNotCovered.mjs.map +1 -1
- package/dist/esm/components/RightDrawer/rightDrawer.content.mjs +1 -59
- package/dist/esm/components/RightDrawer/rightDrawer.content.mjs.map +1 -1
- package/dist/esm/components/RightDrawer/useRightDrawer.mjs +1 -64
- package/dist/esm/components/RightDrawer/useRightDrawer.mjs.map +1 -1
- package/dist/esm/components/Select/Multiselect.mjs +1 -353
- package/dist/esm/components/Select/Multiselect.mjs.map +1 -1
- package/dist/esm/components/Select/Select.mjs +1 -276
- package/dist/esm/components/Select/Select.mjs.map +1 -1
- package/dist/esm/components/Select/index.mjs +1 -4
- package/dist/esm/components/SocialNetworks/DiscordLogo.mjs +1 -20
- package/dist/esm/components/SocialNetworks/DiscordLogo.mjs.map +1 -1
- package/dist/esm/components/SocialNetworks/FacebookLogo.mjs +1 -17
- package/dist/esm/components/SocialNetworks/FacebookLogo.mjs.map +1 -1
- package/dist/esm/components/SocialNetworks/InstagramLogo.mjs +1 -29
- package/dist/esm/components/SocialNetworks/InstagramLogo.mjs.map +1 -1
- package/dist/esm/components/SocialNetworks/LinkedInLogo.mjs +1 -32
- package/dist/esm/components/SocialNetworks/LinkedInLogo.mjs.map +1 -1
- package/dist/esm/components/SocialNetworks/ProductHuntLogo.mjs +1 -15
- package/dist/esm/components/SocialNetworks/ProductHuntLogo.mjs.map +1 -1
- package/dist/esm/components/SocialNetworks/TiktokLogo.mjs +1 -17
- package/dist/esm/components/SocialNetworks/TiktokLogo.mjs.map +1 -1
- package/dist/esm/components/SocialNetworks/XLogo.mjs +1 -17
- package/dist/esm/components/SocialNetworks/XLogo.mjs.map +1 -1
- package/dist/esm/components/SocialNetworks/YoutubeLogo.mjs +1 -17
- package/dist/esm/components/SocialNetworks/YoutubeLogo.mjs.map +1 -1
- package/dist/esm/components/SocialNetworks/index.mjs +1 -64
- package/dist/esm/components/SocialNetworks/index.mjs.map +1 -1
- package/dist/esm/components/SwitchSelector/index.mjs +1 -145
- package/dist/esm/components/SwitchSelector/index.mjs.map +1 -1
- package/dist/esm/components/Tab/Tab.mjs +1 -148
- package/dist/esm/components/Tab/Tab.mjs.map +1 -1
- package/dist/esm/components/Tab/TabContext.mjs +1 -33
- package/dist/esm/components/Tab/TabContext.mjs.map +1 -1
- package/dist/esm/components/Tab/index.mjs +1 -3
- package/dist/esm/components/TabSelector/TabSelector.mjs +1 -111
- package/dist/esm/components/TabSelector/TabSelector.mjs.map +1 -1
- package/dist/esm/components/TabSelector/index.mjs +1 -3
- package/dist/esm/components/Table/Table.mjs +1 -195
- package/dist/esm/components/Table/Table.mjs.map +1 -1
- package/dist/esm/components/Table/index.mjs +1 -3
- package/dist/esm/components/Table/table.content.mjs +1 -36
- package/dist/esm/components/Table/table.content.mjs.map +1 -1
- package/dist/esm/components/Tag/index.mjs +1 -316
- package/dist/esm/components/Tag/index.mjs.map +1 -1
- package/dist/esm/components/Terminal/Terminal.mjs +3 -160
- package/dist/esm/components/Terminal/Terminal.mjs.map +1 -1
- package/dist/esm/components/Terminal/index.mjs +1 -3
- package/dist/esm/components/Terminal/terminal.content.mjs +1 -60
- package/dist/esm/components/Terminal/terminal.content.mjs.map +1 -1
- package/dist/esm/components/TextArea/AutoSizeTextArea.mjs +1 -106
- package/dist/esm/components/TextArea/AutoSizeTextArea.mjs.map +1 -1
- package/dist/esm/components/TextArea/AutocompleteTextArea.mjs +1 -257
- package/dist/esm/components/TextArea/AutocompleteTextArea.mjs.map +1 -1
- package/dist/esm/components/TextArea/TextArea.mjs +1 -58
- package/dist/esm/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/esm/components/TextArea/index.mjs +1 -5
- package/dist/esm/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs +1 -79
- package/dist/esm/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs.map +1 -1
- package/dist/esm/components/ThemeSwitcherDropDown/MobileThemeSwitcher.mjs +1 -53
- package/dist/esm/components/ThemeSwitcherDropDown/MobileThemeSwitcher.mjs.map +1 -1
- package/dist/esm/components/ThemeSwitcherDropDown/index.mjs +1 -5
- package/dist/esm/components/ThemeSwitcherDropDown/types.mjs +1 -10
- package/dist/esm/components/ThemeSwitcherDropDown/types.mjs.map +1 -1
- package/dist/esm/components/Toaster/Toast.mjs +1 -187
- package/dist/esm/components/Toaster/Toast.mjs.map +1 -1
- package/dist/esm/components/Toaster/Toaster.mjs +1 -66
- package/dist/esm/components/Toaster/Toaster.mjs.map +1 -1
- package/dist/esm/components/Toaster/index.mjs +1 -5
- package/dist/esm/components/Toaster/useToast.mjs +1 -308
- package/dist/esm/components/Toaster/useToast.mjs.map +1 -1
- package/dist/esm/components/WithResizer/index.mjs +1 -200
- package/dist/esm/components/WithResizer/index.mjs.map +1 -1
- package/dist/esm/components/index.mjs +1 -105
- package/dist/esm/hooks/index.mjs +1 -22
- package/dist/esm/hooks/reactQuery.mjs +1 -915
- package/dist/esm/hooks/reactQuery.mjs.map +1 -1
- package/dist/esm/hooks/useAuth/index.mjs +1 -5
- package/dist/esm/hooks/useAuth/useAuth.mjs +1 -21
- package/dist/esm/hooks/useAuth/useAuth.mjs.map +1 -1
- package/dist/esm/hooks/useAuth/useOAuth2.mjs +1 -28
- package/dist/esm/hooks/useAuth/useOAuth2.mjs.map +1 -1
- package/dist/esm/hooks/useAuth/useSession.mjs +1 -42
- package/dist/esm/hooks/useAuth/useSession.mjs.map +1 -1
- package/dist/esm/hooks/useDevice.mjs +1 -71
- package/dist/esm/hooks/useDevice.mjs.map +1 -1
- package/dist/esm/hooks/useGetElementById.mjs +1 -15
- package/dist/esm/hooks/useGetElementById.mjs.map +1 -1
- package/dist/esm/hooks/useGetElementOrWindow.mjs +1 -15
- package/dist/esm/hooks/useGetElementOrWindow.mjs.map +1 -1
- package/dist/esm/hooks/useHorizontalSwipe.mjs +1 -123
- package/dist/esm/hooks/useHorizontalSwipe.mjs.map +1 -1
- package/dist/esm/hooks/useIntlayerAPI.mjs +1 -21
- package/dist/esm/hooks/useIntlayerAPI.mjs.map +1 -1
- package/dist/esm/hooks/useIsDarkMode.mjs +1 -15
- package/dist/esm/hooks/useIsDarkMode.mjs.map +1 -1
- package/dist/esm/hooks/useIsMounted.mjs +1 -15
- package/dist/esm/hooks/useIsMounted.mjs.map +1 -1
- package/dist/esm/hooks/useItemSelector.mjs +1 -146
- package/dist/esm/hooks/useItemSelector.mjs.map +1 -1
- package/dist/esm/hooks/useKeyboardDetector.mjs +1 -26
- package/dist/esm/hooks/useKeyboardDetector.mjs.map +1 -1
- package/dist/esm/hooks/usePersistedStore.mjs +1 -65
- package/dist/esm/hooks/usePersistedStore.mjs.map +1 -1
- package/dist/esm/hooks/useScreenWidth.mjs +1 -20
- package/dist/esm/hooks/useScreenWidth.mjs.map +1 -1
- package/dist/esm/hooks/useScrollBlockage/index.mjs +1 -27
- package/dist/esm/hooks/useScrollBlockage/index.mjs.map +1 -1
- package/dist/esm/hooks/useScrollBlockage/useScrollBlockageStore.mjs +1 -70
- package/dist/esm/hooks/useScrollBlockage/useScrollBlockageStore.mjs.map +1 -1
- package/dist/esm/hooks/useScrollDetection.mjs +1 -61
- package/dist/esm/hooks/useScrollDetection.mjs.map +1 -1
- package/dist/esm/hooks/useScrollY.mjs +1 -68
- package/dist/esm/hooks/useScrollY.mjs.map +1 -1
- package/dist/esm/hooks/useSearch.mjs +1 -50
- package/dist/esm/hooks/useSearch.mjs.map +1 -1
- package/dist/esm/hooks/useUser/index.mjs +1 -28
- package/dist/esm/hooks/useUser/index.mjs.map +1 -1
- package/dist/esm/libs/auth.mjs +1 -176
- package/dist/esm/libs/auth.mjs.map +1 -1
- package/dist/esm/libs/index.mjs +1 -3
- package/dist/esm/providers/ReactQueryProvider.mjs +1 -86
- package/dist/esm/providers/ReactQueryProvider.mjs.map +1 -1
- package/dist/esm/providers/index.mjs +1 -4
- package/dist/esm/tailwind.config.mjs +1 -15
- package/dist/esm/tailwind.config.mjs.map +1 -1
- package/dist/esm/utils/cn.mjs +1 -8
- package/dist/esm/utils/cn.mjs.map +1 -1
- package/dist/esm/utils/image.mjs +1 -51
- package/dist/esm/utils/image.mjs.map +1 -1
- package/dist/esm/utils/object.mjs +1 -32
- package/dist/esm/utils/object.mjs.map +1 -1
- package/dist/types/components/Avatar/index.d.ts.map +1 -1
- package/dist/types/components/Breadcrumb/breadcrumb.content.d.ts +1 -1
- package/dist/types/components/Browser/Browser.content.d.ts +8 -8
- package/dist/types/components/Button/Button.d.ts +3 -3
- package/dist/types/components/Carousel/index.content.d.ts +5 -5
- package/dist/types/components/CollapsibleTable/CollapsibleTable.d.ts +2 -84
- package/dist/types/components/CollapsibleTable/CollapsibleTable.d.ts.map +1 -1
- package/dist/types/components/Command/index.d.ts +2 -2
- package/dist/types/components/Container/index.d.ts +7 -7
- package/dist/types/components/CopyButton/CopyButton.content.d.ts +1 -1
- package/dist/types/components/DictionaryEditor/NodeWrapper/ConditionWrapper.d.ts +1 -1
- package/dist/types/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.d.ts +1 -1
- package/dist/types/components/DictionaryEditor/NodeWrapper/FileWrapper.d.ts +1 -1
- package/dist/types/components/DictionaryEditor/NodeWrapper/FileWrapper.d.ts.map +1 -1
- package/dist/types/components/DictionaryEditor/NodeWrapper/HtmlWrapper.d.ts +1 -1
- package/dist/types/components/DictionaryEditor/NodeWrapper/InsertionWrapper.d.ts +1 -1
- package/dist/types/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.d.ts +1 -1
- package/dist/types/components/DictionaryEditor/NodeWrapper/TranslationWrapper.d.ts +1 -1
- package/dist/types/components/DictionaryEditor/NodeWrapper/index.d.ts.map +1 -1
- package/dist/types/components/DictionaryFieldEditor/ContentEditorView/TextEditor.d.ts.map +1 -1
- package/dist/types/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts +12 -12
- package/dist/types/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.d.ts +4 -4
- package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +27 -27
- package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts +16 -16
- package/dist/types/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts +12 -12
- package/dist/types/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +16 -16
- package/dist/types/components/DictionaryFieldEditor/StructureView/structureView.content.d.ts +4 -4
- package/dist/types/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts +3 -3
- package/dist/types/components/DictionaryFieldEditor/dictionaryFieldEditor.content.d.ts +2 -2
- package/dist/types/components/DictionaryFieldEditor/getIsEditableSection.d.ts.map +1 -1
- package/dist/types/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts +15 -15
- package/dist/types/components/ExpandCollapse/expandCollapse.content.d.ts +3 -3
- package/dist/types/components/HTMLRender/HTMLRender.d.ts.map +1 -1
- package/dist/types/components/IDE/MonacoCode.d.ts.map +1 -1
- package/dist/types/components/IDE/code.content.d.ts +2 -2
- package/dist/types/components/IDE/copyCode.content.d.ts +2 -2
- package/dist/types/components/IDE/selectors.content.d.ts +6 -6
- package/dist/types/components/Input/Checkbox.d.ts +2 -2
- package/dist/types/components/Input/Input.d.ts +1 -1
- package/dist/types/components/Link/Link.d.ts +3 -3
- package/dist/types/components/Loader/index.content.d.ts +1 -1
- package/dist/types/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts +8 -8
- package/dist/types/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts +6 -6
- package/dist/types/components/Pagination/Pagination.d.ts +1 -1
- package/dist/types/components/Pagination/pagination.content.d.ts +7 -7
- package/dist/types/components/RightDrawer/rightDrawer.content.d.ts +2 -2
- package/dist/types/components/SwitchSelector/index.d.ts +2 -2
- package/dist/types/components/Tab/Tab.d.ts +1 -1
- package/dist/types/components/TabSelector/TabSelector.d.ts +1 -1
- package/dist/types/components/Table/table.content.d.ts +1 -1
- package/dist/types/components/Tag/index.d.ts +3 -3
- package/dist/types/components/Terminal/terminal.content.d.ts +2 -2
- package/package.json +14 -14
- package/tailwind.css +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/components/CopyToClipboard/index.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@utils/cn';\nimport { CopyCheck, CopyIcon } from 'lucide-react';\nimport {\n type FC,\n type KeyboardEvent,\n type MouseEvent,\n type PropsWithChildren,\n useState,\n} from 'react';\n\n/**\n * Props for the CopyToClipboard component\n */\nexport interface CopyToClipboardProps extends PropsWithChildren {\n /**\n * The text to copy to the clipboard when clicked\n * @example \"Hello World\"\n * @example \"npm install @intlayer/design-system\"\n */\n text: string;\n\n /**\n * Additional CSS classes for the wrapper element\n * @example \"bg-blue-100 text-blue-800\"\n */\n className?: string;\n\n /**\n * Accessible label for screen readers when copy operation is available\n * @default \"Copy to clipboard\"\n */\n 'aria-label'?: string;\n\n /**\n * Accessible label for screen readers when content has been copied\n * @default \"Copied to clipboard\"\n */\n 'aria-copied-label'?: string;\n\n /**\n * Duration in milliseconds to show the \"copied\" state\n * @default 2000\n */\n feedbackDuration?: number;\n\n /**\n * Callback function called when copy operation succeeds\n */\n onCopySuccess?: () => void;\n\n /**\n * Callback function called when copy operation fails\n */\n onCopyError?: (error: Error) => void;\n\n /**\n * Disable the copy to clipboard functionality and return the children\n * @default false\n */\n disable?: boolean;\n\n /**\n * Prevent the default behavior of the link when clicked\n * @default true\n */\n preventDefault?: boolean;\n\n /**\n * Stop the propagation of the event when clicked\n * @default true\n */\n stopPropagation?: boolean;\n\n /**\n * The size of the icon in pixels\n * @default 16\n */\n size?: number;\n}\n\nexport const useCopyToClipboard = (\n text?: string,\n feedbackDuration = 2000,\n onCopySuccess?: () => void,\n onCopyError?: (error: Error) => void\n) => {\n const [isCopied, setIsCopied] = useState(false);\n\n const copy = async () => {\n if (!text) return;\n\n try {\n if (navigator.clipboard?.writeText) {\n await navigator.clipboard.writeText(text);\n } else {\n onCopyError?.(new Error('Clipboard API not supported in this browser'));\n return;\n }\n\n setIsCopied(true);\n setTimeout(() => setIsCopied(false), feedbackDuration);\n onCopySuccess?.();\n } catch (error) {\n const errorMessage =\n error instanceof Error ? error.message : 'Failed to copy to clipboard';\n onCopyError?.(error instanceof Error ? error : new Error(errorMessage));\n }\n };\n\n return { isCopied, copy };\n};\n\n/**\n * CopyToClipboard Component\n *\n * A versatile component that allows users to copy text to their clipboard with visual feedback.\n * Provides accessibility features, customizable feedback duration, and error handling.\n *\n * @example\n * ```tsx\n * // Basic usage\n * <CopyToClipboard text=\"Hello World\">\n * <span>Click to copy</span>\n * </CopyToClipboard>\n *\n * // With custom styling, callbacks, and icon size\n * <CopyToClipboard\n * text=\"npm install @intlayer/design-system\"\n * className=\"bg-gray-100 p-2\"\n * feedbackDuration={3000}\n * size={20}\n * onCopySuccess={() => console.log('Copied!')}\n * >\n * <code>npm install @intlayer/design-system</code>\n * </CopyToClipboard>\n * ```\n *\n * @component\n * @accessibility\n * - Uses proper ARIA labels for copy and copied states\n * - Supports keyboard navigation (Enter and Space keys)\n * - Announces state changes to screen readers\n * - Provides visual focus indicators\n */\nexport const CopyToClipboard: FC<CopyToClipboardProps> = ({\n text,\n children,\n className,\n 'aria-label': ariaLabel = 'Copy to clipboard',\n 'aria-copied-label': ariaCopiedLabel = 'Copied to clipboard',\n feedbackDuration = 2000,\n onCopySuccess,\n onCopyError,\n disable,\n preventDefault = true,\n stopPropagation = true,\n size = 14,\n}) => {\n const { isCopied, copy } = useCopyToClipboard(\n text,\n feedbackDuration,\n onCopySuccess,\n onCopyError\n );\n\n if (disable) return <span className={className}>{children}</span>;\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n handleCopy(event);\n }\n };\n\n const handleCopy = (event: MouseEvent | KeyboardEvent) => {\n if (preventDefault) event.preventDefault();\n if (stopPropagation) event.stopPropagation();\n\n copy();\n };\n\n const currentAriaLabel = isCopied ? ariaCopiedLabel : ariaLabel;\n\n const IconComponent = isCopied ? CopyCheck : CopyIcon;\n\n return (\n <span\n className={cn(\n 'inline-flex max-w-full cursor-pointer items-center gap-2 rounded-md p-0.5 hover:bg-neutral/10',\n className\n )}\n onClick={handleCopy}\n onKeyDown={handleKeyDown}\n role=\"button\"\n tabIndex={0}\n aria-label={currentAriaLabel}\n aria-pressed={isCopied}\n data-testid=\"copy-to-clipboard\"\n >\n <span className=\"min-w-0 break-all\">{children}</span>\n\n {text && (\n <IconComponent\n className=\"ml-1 ml-auto shrink-0\"\n size={size}\n aria-hidden=\"true\"\n />\n )}\n </span>\n );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/components/CopyToClipboard/index.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@utils/cn';\nimport { CopyCheck, CopyIcon } from 'lucide-react';\nimport {\n type FC,\n type KeyboardEvent,\n type MouseEvent,\n type PropsWithChildren,\n useState,\n} from 'react';\n\n/**\n * Props for the CopyToClipboard component\n */\nexport interface CopyToClipboardProps extends PropsWithChildren {\n /**\n * The text to copy to the clipboard when clicked\n * @example \"Hello World\"\n * @example \"npm install @intlayer/design-system\"\n */\n text: string;\n\n /**\n * Additional CSS classes for the wrapper element\n * @example \"bg-blue-100 text-blue-800\"\n */\n className?: string;\n\n /**\n * Accessible label for screen readers when copy operation is available\n * @default \"Copy to clipboard\"\n */\n 'aria-label'?: string;\n\n /**\n * Accessible label for screen readers when content has been copied\n * @default \"Copied to clipboard\"\n */\n 'aria-copied-label'?: string;\n\n /**\n * Duration in milliseconds to show the \"copied\" state\n * @default 2000\n */\n feedbackDuration?: number;\n\n /**\n * Callback function called when copy operation succeeds\n */\n onCopySuccess?: () => void;\n\n /**\n * Callback function called when copy operation fails\n */\n onCopyError?: (error: Error) => void;\n\n /**\n * Disable the copy to clipboard functionality and return the children\n * @default false\n */\n disable?: boolean;\n\n /**\n * Prevent the default behavior of the link when clicked\n * @default true\n */\n preventDefault?: boolean;\n\n /**\n * Stop the propagation of the event when clicked\n * @default true\n */\n stopPropagation?: boolean;\n\n /**\n * The size of the icon in pixels\n * @default 16\n */\n size?: number;\n}\n\nexport const useCopyToClipboard = (\n text?: string,\n feedbackDuration = 2000,\n onCopySuccess?: () => void,\n onCopyError?: (error: Error) => void\n) => {\n const [isCopied, setIsCopied] = useState(false);\n\n const copy = async () => {\n if (!text) return;\n\n try {\n if (navigator.clipboard?.writeText) {\n await navigator.clipboard.writeText(text);\n } else {\n onCopyError?.(new Error('Clipboard API not supported in this browser'));\n return;\n }\n\n setIsCopied(true);\n setTimeout(() => setIsCopied(false), feedbackDuration);\n onCopySuccess?.();\n } catch (error) {\n const errorMessage =\n error instanceof Error ? error.message : 'Failed to copy to clipboard';\n onCopyError?.(error instanceof Error ? error : new Error(errorMessage));\n }\n };\n\n return { isCopied, copy };\n};\n\n/**\n * CopyToClipboard Component\n *\n * A versatile component that allows users to copy text to their clipboard with visual feedback.\n * Provides accessibility features, customizable feedback duration, and error handling.\n *\n * @example\n * ```tsx\n * // Basic usage\n * <CopyToClipboard text=\"Hello World\">\n * <span>Click to copy</span>\n * </CopyToClipboard>\n *\n * // With custom styling, callbacks, and icon size\n * <CopyToClipboard\n * text=\"npm install @intlayer/design-system\"\n * className=\"bg-gray-100 p-2\"\n * feedbackDuration={3000}\n * size={20}\n * onCopySuccess={() => console.log('Copied!')}\n * >\n * <code>npm install @intlayer/design-system</code>\n * </CopyToClipboard>\n * ```\n *\n * @component\n * @accessibility\n * - Uses proper ARIA labels for copy and copied states\n * - Supports keyboard navigation (Enter and Space keys)\n * - Announces state changes to screen readers\n * - Provides visual focus indicators\n */\nexport const CopyToClipboard: FC<CopyToClipboardProps> = ({\n text,\n children,\n className,\n 'aria-label': ariaLabel = 'Copy to clipboard',\n 'aria-copied-label': ariaCopiedLabel = 'Copied to clipboard',\n feedbackDuration = 2000,\n onCopySuccess,\n onCopyError,\n disable,\n preventDefault = true,\n stopPropagation = true,\n size = 14,\n}) => {\n const { isCopied, copy } = useCopyToClipboard(\n text,\n feedbackDuration,\n onCopySuccess,\n onCopyError\n );\n\n if (disable) return <span className={className}>{children}</span>;\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n handleCopy(event);\n }\n };\n\n const handleCopy = (event: MouseEvent | KeyboardEvent) => {\n if (preventDefault) event.preventDefault();\n if (stopPropagation) event.stopPropagation();\n\n copy();\n };\n\n const currentAriaLabel = isCopied ? ariaCopiedLabel : ariaLabel;\n\n const IconComponent = isCopied ? CopyCheck : CopyIcon;\n\n return (\n <span\n className={cn(\n 'inline-flex max-w-full cursor-pointer items-center gap-2 rounded-md p-0.5 hover:bg-neutral/10',\n className\n )}\n onClick={handleCopy}\n onKeyDown={handleKeyDown}\n role=\"button\"\n tabIndex={0}\n aria-label={currentAriaLabel}\n aria-pressed={isCopied}\n data-testid=\"copy-to-clipboard\"\n >\n <span className=\"min-w-0 break-all\">{children}</span>\n\n {text && (\n <IconComponent\n className=\"ml-1 ml-auto shrink-0\"\n size={size}\n aria-hidden=\"true\"\n />\n )}\n </span>\n );\n};\n"],"mappings":"+LAkFA,MAAa,GACX,EACA,EAAmB,IACnB,EACA,IACG,CACH,GAAM,CAAC,EAAU,GAAe,EAAS,GAAM,CAuB/C,MAAO,CAAE,WAAU,KArBN,SAAY,CAClB,KAEL,GAAI,CACF,GAAI,UAAU,WAAW,UACvB,MAAM,UAAU,UAAU,UAAU,EAAK,KACpC,CACL,IAAkB,MAAM,8CAA8C,CAAC,CACvE,OAGF,EAAY,GAAK,CACjB,eAAiB,EAAY,GAAM,CAAE,EAAiB,CACtD,KAAiB,OACV,EAAO,CACd,IAAM,EACJ,aAAiB,MAAQ,EAAM,QAAU,8BAC3C,IAAc,aAAiB,MAAQ,EAAY,MAAM,EAAa,CAAC,GAIlD,EAmCd,GAA6C,CACxD,OACA,WACA,YACA,aAAc,EAAY,oBAC1B,oBAAqB,EAAkB,sBACvC,mBAAmB,IACnB,gBACA,cACA,UACA,iBAAiB,GACjB,kBAAkB,GAClB,OAAO,MACH,CACJ,GAAM,CAAE,WAAU,QAAS,EACzB,EACA,EACA,EACA,EACD,CAED,GAAI,EAAS,OAAO,EAAC,OAAA,CAAgB,YAAY,YAAgB,CAEjE,IAAM,EAAiB,GAAyB,EAC1C,EAAM,MAAQ,SAAW,EAAM,MAAQ,MACzC,EAAW,EAAM,EAIf,EAAc,GAAsC,CACpD,GAAgB,EAAM,gBAAgB,CACtC,GAAiB,EAAM,iBAAiB,CAE5C,GAAM,EAGF,EAAmB,EAAW,EAAkB,EAEhD,EAAgB,EAAW,EAAY,EAE7C,OACE,EAAC,OAAA,CACC,UAAW,EACT,gGACA,EACD,CACD,QAAS,EACT,UAAW,EACX,KAAK,SACL,SAAU,EACV,aAAY,EACZ,eAAc,EACd,cAAY,8BAEZ,EAAC,OAAA,CAAK,UAAU,oBAAqB,YAAgB,CAEpD,GACC,EAAC,EAAA,CACC,UAAU,wBACJ,OACN,cAAY,QACZ,CAAA,EAEC"}
|
|
@@ -1,32 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { NodeWrapper } from "./NodeWrapper/index.mjs";
|
|
4
|
-
import { createElement } from "react";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import { useEditedContent, useFocusUnmergedDictionary } from "@intlayer/editor-react";
|
|
7
|
-
|
|
8
|
-
//#region src/components/DictionaryEditor/DictionaryEditor.tsx
|
|
9
|
-
const DictionaryEditor = ({ dictionary, ...props }) => {
|
|
10
|
-
const { editedContent, addEditedContent } = useEditedContent();
|
|
11
|
-
const { focusedContent, setFocusedContentKeyPath } = useFocusUnmergedDictionary();
|
|
12
|
-
return /* @__PURE__ */ jsx("div", {
|
|
13
|
-
className: "flex flex-col gap-2",
|
|
14
|
-
children: /* @__PURE__ */ createElement(NodeWrapper, {
|
|
15
|
-
...props,
|
|
16
|
-
keyPath: [],
|
|
17
|
-
dictionary,
|
|
18
|
-
key: JSON.stringify((editedContent?.[dictionary.localId] ?? dictionary).content),
|
|
19
|
-
editedContent: editedContent?.[dictionary.localId]?.content,
|
|
20
|
-
focusedKeyPath: focusedContent?.keyPath,
|
|
21
|
-
section: dictionary.content,
|
|
22
|
-
onContentChange: (content) => {
|
|
23
|
-
addEditedContent(dictionary.localId, content.newValue, content.keyPath);
|
|
24
|
-
},
|
|
25
|
-
onFocusKeyPath: setFocusedContentKeyPath
|
|
26
|
-
})
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
//#endregion
|
|
31
|
-
export { DictionaryEditor };
|
|
1
|
+
"use client";import{NodeWrapper as e}from"./NodeWrapper/index.mjs";import{createElement as t}from"react";import{jsx as n}from"react/jsx-runtime";import{useEditedContent as r,useFocusUnmergedDictionary as i}from"@intlayer/editor-react";const a=({dictionary:a,...o})=>{let{editedContent:s,addEditedContent:c}=r(),{focusedContent:l,setFocusedContentKeyPath:u}=i();return n(`div`,{className:`flex flex-col gap-2`,children:t(e,{...o,keyPath:[],dictionary:a,key:JSON.stringify((s?.[a.localId]??a).content),editedContent:s?.[a.localId]?.content,focusedKeyPath:l?.keyPath,section:a.content,onContentChange:e=>{c(a.localId,e.newValue,e.keyPath)},onFocusKeyPath:u})})};export{a as DictionaryEditor};
|
|
32
2
|
//# sourceMappingURL=DictionaryEditor.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DictionaryEditor.mjs","names":[],"sources":["../../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport {\n useEditedContent,\n useFocusUnmergedDictionary,\n} from '@intlayer/editor-react';\nimport type { Dictionary, Locale } from '@intlayer/types';\nimport type { FC } from 'react';\nimport { NodeWrapper } from './NodeWrapper';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locale;\n onDelete?: () => void;\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n ...props\n}) => {\n const { editedContent, addEditedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath } =\n useFocusUnmergedDictionary();\n\n return (\n <div className=\"flex flex-col gap-2\">\n <NodeWrapper\n {...props}\n keyPath={[]}\n dictionary={dictionary}\n key={JSON.stringify(\n (editedContent?.[dictionary.localId!] ?? dictionary).content\n )}\n editedContent={editedContent?.[dictionary.localId!]?.content}\n focusedKeyPath={focusedContent?.keyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(\n dictionary.localId!,\n content.newValue,\n content.keyPath\n );\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"DictionaryEditor.mjs","names":[],"sources":["../../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport {\n useEditedContent,\n useFocusUnmergedDictionary,\n} from '@intlayer/editor-react';\nimport type { Dictionary, Locale } from '@intlayer/types';\nimport type { FC } from 'react';\nimport { NodeWrapper } from './NodeWrapper';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locale;\n onDelete?: () => void;\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n ...props\n}) => {\n const { editedContent, addEditedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath } =\n useFocusUnmergedDictionary();\n\n return (\n <div className=\"flex flex-col gap-2\">\n <NodeWrapper\n {...props}\n keyPath={[]}\n dictionary={dictionary}\n key={JSON.stringify(\n (editedContent?.[dictionary.localId!] ?? dictionary).content\n )}\n editedContent={editedContent?.[dictionary.localId!]?.content}\n focusedKeyPath={focusedContent?.keyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(\n dictionary.localId!,\n content.newValue,\n content.keyPath\n );\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n );\n};\n"],"mappings":"2OAgBA,MAAa,GAA+C,CAC1D,aACA,GAAG,KACC,CACJ,GAAM,CAAE,gBAAe,oBAAqB,GAAkB,CACxD,CAAE,iBAAgB,4BACtB,GAA4B,CAE9B,OACE,EAAC,MAAA,CAAI,UAAU,+BACb,EAAC,EAAA,CACC,GAAI,EACJ,QAAS,EAAE,CACC,aACZ,IAAK,KAAK,WACP,IAAgB,EAAW,UAAa,GAAY,QACtD,CACD,cAAe,IAAgB,EAAW,UAAW,QACrD,eAAgB,GAAgB,QAChC,QAAS,EAAW,QACpB,gBAAkB,GAAY,CAC5B,EACE,EAAW,QACX,EAAQ,SACR,EAAQ,QACT,EAEH,eAAgB,GAChB,EACE"}
|
|
@@ -1,37 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Accordion } from "../Accordion/Accordion.mjs";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region src/components/DictionaryEditor/ItemLayout.tsx
|
|
6
|
-
const ItemLayout = ({ level, title, description, children, rightParam, isSelected, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
7
|
-
className: cn("rounded-md p-2 transition", "hover:bg-card/30 [&:has(.section:hover)]:bg-transparent", level === 2 && "hover:bg-card/30", level >= 3 && "", isSelected === true && "bg-card/40"),
|
|
8
|
-
...props,
|
|
9
|
-
children: /* @__PURE__ */ jsx(Accordion, {
|
|
10
|
-
isOpen: isSelected,
|
|
11
|
-
label: title,
|
|
12
|
-
header: /* @__PURE__ */ jsxs("div", {
|
|
13
|
-
className: "flex w-full",
|
|
14
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
15
|
-
className: "flex w-full items-center justify-between",
|
|
16
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
17
|
-
className: cn(level === 0 && "text-lg", level === 1 && "text-md", level === 2 && "text-md", level >= 3 && "text-base"),
|
|
18
|
-
children: title
|
|
19
|
-
}), rightParam && /* @__PURE__ */ jsx("div", {
|
|
20
|
-
className: "flex w-auto items-center justify-between p-3",
|
|
21
|
-
children: rightParam
|
|
22
|
-
})]
|
|
23
|
-
}), description && /* @__PURE__ */ jsx("p", {
|
|
24
|
-
className: "pl-3 text-card text-sm",
|
|
25
|
-
children: description
|
|
26
|
-
})]
|
|
27
|
-
}),
|
|
28
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
29
|
-
className: "size-full px-2",
|
|
30
|
-
children
|
|
31
|
-
})
|
|
32
|
-
})
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
//#endregion
|
|
36
|
-
export { ItemLayout };
|
|
1
|
+
import{cn as e}from"../../utils/cn.mjs";import{Accordion as t}from"../Accordion/Accordion.mjs";import{jsx as n,jsxs as r}from"react/jsx-runtime";const i=({level:i,title:a,description:o,children:s,rightParam:c,isSelected:l,...u})=>n(`div`,{className:e(`rounded-md p-2 transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,i===2&&`hover:bg-card/30`,i>=3&&``,l===!0&&`bg-card/40`),...u,children:n(t,{isOpen:l,label:a,header:r(`div`,{className:`flex w-full`,children:[r(`div`,{className:`flex w-full items-center justify-between`,children:[n(`span`,{className:e(i===0&&`text-lg`,i===1&&`text-md`,i===2&&`text-md`,i>=3&&`text-base`),children:a}),c&&n(`div`,{className:`flex w-auto items-center justify-between p-3`,children:c})]}),o&&n(`p`,{className:`pl-3 text-card text-sm`,children:o})]}),children:n(`div`,{className:`size-full px-2`,children:s})})});export{i as ItemLayout};
|
|
37
2
|
//# sourceMappingURL=ItemLayout.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemLayout.mjs","names":[],"sources":["../../../../src/components/DictionaryEditor/ItemLayout.tsx"],"sourcesContent":["import { cn } from '@utils/cn';\nimport type { FC, HTMLAttributes, ReactNode } from 'react';\nimport { Accordion } from '../Accordion';\n\ninterface ItemWrapperProps extends HTMLAttributes<HTMLDivElement> {\n level: number;\n children: ReactNode;\n title: string;\n description: string;\n rightParam?: ReactNode;\n isSelected: boolean;\n}\n\nexport const ItemLayout: FC<ItemWrapperProps> = ({\n level,\n title,\n description,\n children,\n rightParam,\n isSelected,\n ...props\n}) => (\n <div\n className={cn(\n 'rounded-md p-2 transition',\n 'hover:bg-card/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30',\n level >= 3 && '',\n isSelected === true && 'bg-card/40'\n )}\n {...props}\n >\n <Accordion\n isOpen={isSelected}\n label={title}\n header={\n <div className=\"flex w-full\">\n <div className=\"flex w-full items-center justify-between\">\n <span\n className={cn(\n level === 0 && 'text-lg',\n level === 1 && 'text-md',\n level === 2 && 'text-md',\n level >= 3 && 'text-base'\n )}\n >\n {title}\n </span>\n {rightParam && (\n <div className=\"flex w-auto items-center justify-between p-3\">\n {rightParam}\n </div>\n )}\n </div>\n {description && (\n <p className=\"pl-3 text-card text-sm\">{description}</p>\n )}\n </div>\n }\n >\n <div className=\"size-full px-2\">{children}</div>\n </Accordion>\n </div>\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ItemLayout.mjs","names":[],"sources":["../../../../src/components/DictionaryEditor/ItemLayout.tsx"],"sourcesContent":["import { cn } from '@utils/cn';\nimport type { FC, HTMLAttributes, ReactNode } from 'react';\nimport { Accordion } from '../Accordion';\n\ninterface ItemWrapperProps extends HTMLAttributes<HTMLDivElement> {\n level: number;\n children: ReactNode;\n title: string;\n description: string;\n rightParam?: ReactNode;\n isSelected: boolean;\n}\n\nexport const ItemLayout: FC<ItemWrapperProps> = ({\n level,\n title,\n description,\n children,\n rightParam,\n isSelected,\n ...props\n}) => (\n <div\n className={cn(\n 'rounded-md p-2 transition',\n 'hover:bg-card/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30',\n level >= 3 && '',\n isSelected === true && 'bg-card/40'\n )}\n {...props}\n >\n <Accordion\n isOpen={isSelected}\n label={title}\n header={\n <div className=\"flex w-full\">\n <div className=\"flex w-full items-center justify-between\">\n <span\n className={cn(\n level === 0 && 'text-lg',\n level === 1 && 'text-md',\n level === 2 && 'text-md',\n level >= 3 && 'text-base'\n )}\n >\n {title}\n </span>\n {rightParam && (\n <div className=\"flex w-auto items-center justify-between p-3\">\n {rightParam}\n </div>\n )}\n </div>\n {description && (\n <p className=\"pl-3 text-card text-sm\">{description}</p>\n )}\n </div>\n }\n >\n <div className=\"size-full px-2\">{children}</div>\n </Accordion>\n </div>\n);\n"],"mappings":"iJAaA,MAAa,GAAoC,CAC/C,QACA,QACA,cACA,WACA,aACA,aACA,GAAG,KAEH,EAAC,MAAA,CACC,UAAW,EACT,4BACA,0DACA,IAAU,GAAK,mBACf,GAAS,GAAK,GACd,IAAe,IAAQ,aACxB,CACD,GAAI,WAEJ,EAAC,EAAA,CACC,OAAQ,EACR,MAAO,EACP,OACE,EAAC,MAAA,CAAI,UAAU,wBACb,EAAC,MAAA,CAAI,UAAU,qDACb,EAAC,OAAA,CACC,UAAW,EACT,IAAU,GAAK,UACf,IAAU,GAAK,UACf,IAAU,GAAK,UACf,GAAS,GAAK,YACf,UAEA,GACI,CACN,GACC,EAAC,MAAA,CAAI,UAAU,wDACZ,GACG,CAAA,EAEJ,CACL,GACC,EAAC,IAAA,CAAE,UAAU,kCAA0B,GAAgB,CAAA,EAErD,UAGR,EAAC,MAAA,CAAI,UAAU,iBAAkB,YAAe,EACtC,EACR"}
|
|
@@ -1,36 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { NodeWrapper } from "./index.mjs";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
import { isSameKeyPath } from "@intlayer/core";
|
|
5
|
-
import { NodeType } from "@intlayer/types";
|
|
6
|
-
|
|
7
|
-
//#region src/components/DictionaryEditor/NodeWrapper/ArrayWrapper.tsx
|
|
8
|
-
const ArrayWrapper = (props) => {
|
|
9
|
-
const { keyPath, section, onFocusKeyPath, focusedKeyPath = [] } = props;
|
|
10
|
-
return section.map((subSection, key) => {
|
|
11
|
-
const newKeyPathEl = {
|
|
12
|
-
key,
|
|
13
|
-
type: NodeType.Array
|
|
14
|
-
};
|
|
15
|
-
const newKeyPath = [...keyPath, newKeyPathEl];
|
|
16
|
-
return /* @__PURE__ */ jsx(ItemLayout, {
|
|
17
|
-
level: keyPath.length,
|
|
18
|
-
title: `${key}`,
|
|
19
|
-
description: "",
|
|
20
|
-
isSelected: isSameKeyPath(newKeyPath, focusedKeyPath),
|
|
21
|
-
onClick: (e) => {
|
|
22
|
-
e.stopPropagation();
|
|
23
|
-
onFocusKeyPath(newKeyPath);
|
|
24
|
-
},
|
|
25
|
-
children: /* @__PURE__ */ jsx(NodeWrapper, {
|
|
26
|
-
...props,
|
|
27
|
-
keyPath: newKeyPath,
|
|
28
|
-
section: subSection
|
|
29
|
-
})
|
|
30
|
-
}, JSON.stringify(subSection));
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
//#endregion
|
|
35
|
-
export { ArrayWrapper };
|
|
1
|
+
import{ItemLayout as e}from"../ItemLayout.mjs";import{NodeWrapper as t}from"./index.mjs";import{jsx as n}from"react/jsx-runtime";import{NodeType as r}from"@intlayer/types";import{isSameKeyPath as i}from"@intlayer/core/utils";const a=a=>{let{keyPath:o,section:s,onFocusKeyPath:c,focusedKeyPath:l=[]}=a;return s.map((s,u)=>{let d={key:u,type:r.Array},f=[...o,d];return n(e,{level:o.length,title:`${u}`,description:``,isSelected:i(f,l),onClick:e=>{e.stopPropagation(),c(f)},children:n(t,{...a,keyPath:f,section:s})},JSON.stringify(s))})};export{a as ArrayWrapper};
|
|
36
2
|
//# sourceMappingURL=ArrayWrapper.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayWrapper.mjs","names":[],"sources":["../../../../../src/components/DictionaryEditor/NodeWrapper/ArrayWrapper.tsx"],"sourcesContent":["import { isSameKeyPath } from '@intlayer/core';\nimport type { ContentNode } from '@intlayer/types';\nimport { type KeyPath, NodeType } from '@intlayer/types';\nimport type { FC } from 'react';\nimport { ItemLayout } from '../ItemLayout';\nimport { NodeWrapper, type NodeWrapperProps } from './index';\n\ntype ArrayWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: ContentNode[];\n};\n\nexport const ArrayWrapper: FC<ArrayWrapperProps> = (props) => {\n const { keyPath, section, onFocusKeyPath, focusedKeyPath = [] } = props;\n\n return section.map((subSection, key) => {\n const newKeyPathEl: KeyPath = {\n key,\n type: NodeType.Array,\n };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n return (\n <ItemLayout\n level={keyPath.length}\n key={JSON.stringify(subSection)}\n title={`${key}`}\n description=\"\"\n isSelected={isSameKeyPath(newKeyPath, focusedKeyPath)}\n onClick={(e) => {\n e.stopPropagation();\n onFocusKeyPath(newKeyPath);\n }}\n >\n <NodeWrapper {...props} keyPath={newKeyPath} section={subSection} />\n </ItemLayout>\n );\n });\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ArrayWrapper.mjs","names":[],"sources":["../../../../../src/components/DictionaryEditor/NodeWrapper/ArrayWrapper.tsx"],"sourcesContent":["import { isSameKeyPath } from '@intlayer/core/utils';\nimport type { ContentNode } from '@intlayer/types';\nimport { type KeyPath, NodeType } from '@intlayer/types';\nimport type { FC } from 'react';\nimport { ItemLayout } from '../ItemLayout';\nimport { NodeWrapper, type NodeWrapperProps } from './index';\n\ntype ArrayWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: ContentNode[];\n};\n\nexport const ArrayWrapper: FC<ArrayWrapperProps> = (props) => {\n const { keyPath, section, onFocusKeyPath, focusedKeyPath = [] } = props;\n\n return section.map((subSection, key) => {\n const newKeyPathEl: KeyPath = {\n key,\n type: NodeType.Array,\n };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n return (\n <ItemLayout\n level={keyPath.length}\n key={JSON.stringify(subSection)}\n title={`${key}`}\n description=\"\"\n isSelected={isSameKeyPath(newKeyPath, focusedKeyPath)}\n onClick={(e) => {\n e.stopPropagation();\n onFocusKeyPath(newKeyPath);\n }}\n >\n <NodeWrapper {...props} keyPath={newKeyPath} section={subSection} />\n </ItemLayout>\n );\n });\n};\n"],"mappings":"iOAWA,MAAa,EAAuC,GAAU,CAC5D,GAAM,CAAE,UAAS,UAAS,iBAAgB,iBAAiB,EAAE,EAAK,EAElE,OAAO,EAAQ,KAAK,EAAY,IAAQ,CACtC,IAAM,EAAwB,CAC5B,MACA,KAAM,EAAS,MAChB,CACK,EAAwB,CAAC,GAAG,EAAS,EAAa,CAExD,OACE,EAAC,EAAA,CACC,MAAO,EAAQ,OAEf,MAAO,GAAG,IACV,YAAY,GACZ,WAAY,EAAc,EAAY,EAAe,CACrD,QAAU,GAAM,CACd,EAAE,iBAAiB,CACnB,EAAe,EAAW,WAG5B,EAAC,EAAA,CAAY,GAAI,EAAO,QAAS,EAAY,QAAS,GAAc,EAT/D,KAAK,UAAU,EAAW,CAUpB,EAEf"}
|
|
@@ -1,33 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createElement } from "react";
|
|
3
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { NodeType } from "@intlayer/types";
|
|
5
|
-
|
|
6
|
-
//#region src/components/DictionaryEditor/NodeWrapper/ConditionWrapper.tsx
|
|
7
|
-
const ConditionWrapper = (props) => {
|
|
8
|
-
const { keyPath, section } = props;
|
|
9
|
-
return /* @__PURE__ */ jsx("div", {
|
|
10
|
-
className: "ml-2 grid grid-cols-[auto,1fr] gap-2",
|
|
11
|
-
children: Object.keys(section).filter((key) => !traceKeys.includes(key)).map((key) => {
|
|
12
|
-
const newKeyPathEl = {
|
|
13
|
-
type: NodeType.Condition,
|
|
14
|
-
key
|
|
15
|
-
};
|
|
16
|
-
const newKeyPath = [...keyPath, newKeyPathEl];
|
|
17
|
-
const subSection = section[NodeType.Condition][key];
|
|
18
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
19
|
-
className: "flex items-center font-bold",
|
|
20
|
-
children: key
|
|
21
|
-
}), /* @__PURE__ */ createElement(NodeWrapper, {
|
|
22
|
-
...props,
|
|
23
|
-
key,
|
|
24
|
-
keyPath: newKeyPath,
|
|
25
|
-
section: subSection
|
|
26
|
-
})] });
|
|
27
|
-
})
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
//#endregion
|
|
32
|
-
export { ConditionWrapper };
|
|
1
|
+
import{NodeWrapper as e,traceKeys as t}from"./index.mjs";import{createElement as n}from"react";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";import{NodeType as o}from"@intlayer/types";const s=s=>{let{keyPath:c,section:l}=s;return i(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(l).filter(e=>!t.includes(e)).map(t=>{let u={type:o.Condition,key:t},d=[...c,u],f=l[o.Condition][t];return a(r,{children:[i(`span`,{className:`flex items-center font-bold`,children:t}),n(e,{...s,key:t,keyPath:d,section:f})]})})})};export{s as ConditionWrapper};
|
|
33
2
|
//# sourceMappingURL=ConditionWrapper.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionWrapper.mjs","names":[],"sources":["../../../../../src/components/DictionaryEditor/NodeWrapper/ConditionWrapper.tsx"],"sourcesContent":["import type { ConditionContent } from '@intlayer/core';\nimport { type ContentNode, type KeyPath, NodeType } from '@intlayer/types';\nimport type { FC } from 'react';\nimport { NodeWrapper, type NodeWrapperProps, traceKeys } from './index';\n\ntype ConditionWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: ConditionContent<ContentNode>;\n};\n\nexport const ConditionWrapper: FC<ConditionWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n {Object.keys(section)\n .filter((key) => !traceKeys.includes(key))\n .map((key) => {\n const newKeyPathEl: KeyPath = {\n type: NodeType.Condition,\n key,\n };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n const subSection =\n section[NodeType.Condition][\n key as keyof (typeof section)[NodeType.Condition]\n ]!;\n\n return (\n <>\n <span className=\"flex items-center font-bold\">{key}</span>\n <NodeWrapper\n {...props}\n key={key}\n keyPath={newKeyPath}\n section={subSection}\n />\n </>\n );\n })}\n </div>\n );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConditionWrapper.mjs","names":[],"sources":["../../../../../src/components/DictionaryEditor/NodeWrapper/ConditionWrapper.tsx"],"sourcesContent":["import type { ConditionContent } from '@intlayer/core/transpiler';\nimport { type ContentNode, type KeyPath, NodeType } from '@intlayer/types';\nimport type { FC } from 'react';\nimport { NodeWrapper, type NodeWrapperProps, traceKeys } from './index';\n\ntype ConditionWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: ConditionContent<ContentNode>;\n};\n\nexport const ConditionWrapper: FC<ConditionWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n {Object.keys(section)\n .filter((key) => !traceKeys.includes(key))\n .map((key) => {\n const newKeyPathEl: KeyPath = {\n type: NodeType.Condition,\n key,\n };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n const subSection =\n section[NodeType.Condition][\n key as keyof (typeof section)[NodeType.Condition]\n ]!;\n\n return (\n <>\n <span className=\"flex items-center font-bold\">{key}</span>\n <NodeWrapper\n {...props}\n key={key}\n keyPath={newKeyPath}\n section={subSection}\n />\n </>\n );\n })}\n </div>\n );\n};\n"],"mappings":"0MASA,MAAa,EAA+C,GAAU,CACpE,GAAM,CAAE,UAAS,WAAY,EAE7B,OACE,EAAC,MAAA,CAAI,UAAU,gDACZ,OAAO,KAAK,EAAQ,CAClB,OAAQ,GAAQ,CAAC,EAAU,SAAS,EAAI,CAAC,CACzC,IAAK,GAAQ,CACZ,IAAM,EAAwB,CAC5B,KAAM,EAAS,UACf,MACD,CACK,EAAwB,CAAC,GAAG,EAAS,EAAa,CAElD,EACJ,EAAQ,EAAS,WACf,GAGJ,OACE,EAAA,EAAA,CAAA,SAAA,CACE,EAAC,OAAA,CAAK,UAAU,uCAA+B,GAAW,CAC1D,EAAC,EAAA,CACC,GAAI,EACC,MACL,QAAS,EACT,QAAS,GACT,CAAA,CAAA,CACD,EAEL,EACA"}
|
|
@@ -1,33 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createElement } from "react";
|
|
3
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { NodeType } from "@intlayer/types";
|
|
5
|
-
|
|
6
|
-
//#region src/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.tsx
|
|
7
|
-
const EnumerationWrapper = (props) => {
|
|
8
|
-
const { keyPath, section } = props;
|
|
9
|
-
return /* @__PURE__ */ jsx("div", {
|
|
10
|
-
className: "ml-2 grid grid-cols-[auto,1fr] gap-2",
|
|
11
|
-
children: Object.keys(section).filter((key) => !traceKeys.includes(key)).map((key) => {
|
|
12
|
-
const newKeyPathEl = {
|
|
13
|
-
type: NodeType.Enumeration,
|
|
14
|
-
key
|
|
15
|
-
};
|
|
16
|
-
const newKeyPath = [...keyPath, newKeyPathEl];
|
|
17
|
-
const subSection = section[NodeType.Enumeration][key];
|
|
18
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
19
|
-
className: "flex items-center font-bold",
|
|
20
|
-
children: key
|
|
21
|
-
}), /* @__PURE__ */ createElement(NodeWrapper, {
|
|
22
|
-
...props,
|
|
23
|
-
key,
|
|
24
|
-
keyPath: newKeyPath,
|
|
25
|
-
section: subSection
|
|
26
|
-
})] });
|
|
27
|
-
})
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
//#endregion
|
|
32
|
-
export { EnumerationWrapper };
|
|
1
|
+
import{NodeWrapper as e,traceKeys as t}from"./index.mjs";import{createElement as n}from"react";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";import{NodeType as o}from"@intlayer/types";const s=s=>{let{keyPath:c,section:l}=s;return i(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(l).filter(e=>!t.includes(e)).map(t=>{let u={type:o.Enumeration,key:t},d=[...c,u],f=l[o.Enumeration][t];return a(r,{children:[i(`span`,{className:`flex items-center font-bold`,children:t}),n(e,{...s,key:t,keyPath:d,section:f})]})})})};export{s as EnumerationWrapper};
|
|
33
2
|
//# sourceMappingURL=EnumerationWrapper.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnumerationWrapper.mjs","names":[],"sources":["../../../../../src/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.tsx"],"sourcesContent":["import type { EnumerationContent } from '@intlayer/core';\nimport { type ContentNode, type KeyPath, NodeType } from '@intlayer/types';\nimport type { FC } from 'react';\nimport { NodeWrapper, type NodeWrapperProps, traceKeys } from './index';\n\ntype EnumerationWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: EnumerationContent<ContentNode>;\n};\n\nexport const EnumerationWrapper: FC<EnumerationWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n {Object.keys(section)\n .filter((key) => !traceKeys.includes(key))\n .map((key) => {\n const newKeyPathEl: KeyPath = {\n type: NodeType.Enumeration,\n key,\n };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n const subSection =\n section[NodeType.Enumeration][\n key as keyof (typeof section)[NodeType.Enumeration]\n ]!;\n\n return (\n <>\n <span className=\"flex items-center font-bold\">{key}</span>\n <NodeWrapper\n {...props}\n key={key}\n keyPath={newKeyPath}\n section={subSection}\n />\n </>\n );\n })}\n </div>\n );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"EnumerationWrapper.mjs","names":[],"sources":["../../../../../src/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.tsx"],"sourcesContent":["import type { EnumerationContent } from '@intlayer/core/transpiler';\nimport { type ContentNode, type KeyPath, NodeType } from '@intlayer/types';\nimport type { FC } from 'react';\nimport { NodeWrapper, type NodeWrapperProps, traceKeys } from './index';\n\ntype EnumerationWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: EnumerationContent<ContentNode>;\n};\n\nexport const EnumerationWrapper: FC<EnumerationWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n {Object.keys(section)\n .filter((key) => !traceKeys.includes(key))\n .map((key) => {\n const newKeyPathEl: KeyPath = {\n type: NodeType.Enumeration,\n key,\n };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n const subSection =\n section[NodeType.Enumeration][\n key as keyof (typeof section)[NodeType.Enumeration]\n ]!;\n\n return (\n <>\n <span className=\"flex items-center font-bold\">{key}</span>\n <NodeWrapper\n {...props}\n key={key}\n keyPath={newKeyPath}\n section={subSection}\n />\n </>\n );\n })}\n </div>\n );\n};\n"],"mappings":"0MASA,MAAa,EAAmD,GAAU,CACxE,GAAM,CAAE,UAAS,WAAY,EAE7B,OACE,EAAC,MAAA,CAAI,UAAU,gDACZ,OAAO,KAAK,EAAQ,CAClB,OAAQ,GAAQ,CAAC,EAAU,SAAS,EAAI,CAAC,CACzC,IAAK,GAAQ,CACZ,IAAM,EAAwB,CAC5B,KAAM,EAAS,YACf,MACD,CACK,EAAwB,CAAC,GAAG,EAAS,EAAa,CAElD,EACJ,EAAQ,EAAS,aACf,GAGJ,OACE,EAAA,EAAA,CAAA,SAAA,CACE,EAAC,OAAA,CAAK,UAAU,uCAA+B,GAAW,CAC1D,EAAC,EAAA,CACC,GAAI,EACC,MACL,QAAS,EACT,QAAS,GACT,CAAA,CAAA,CACD,EAEL,EACA"}
|
|
@@ -1,37 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { getContentNodeByKeyPath } from "@intlayer/core";
|
|
4
|
-
import { useEditedContent } from "@intlayer/editor-react";
|
|
5
|
-
import { NodeType } from "@intlayer/types";
|
|
6
|
-
|
|
7
|
-
//#region src/components/DictionaryEditor/NodeWrapper/FileWrapper.tsx
|
|
8
|
-
const FileWrapper = (props) => {
|
|
9
|
-
const { keyPath, section } = props;
|
|
10
|
-
const { addEditedContent } = useEditedContent();
|
|
11
|
-
const editedContentValue = getContentNodeByKeyPath(props.editedContent, keyPath);
|
|
12
|
-
const subSection = section[NodeType.File];
|
|
13
|
-
const { content } = section;
|
|
14
|
-
const newKeyPath = [...keyPath, { type: NodeType.File }];
|
|
15
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
16
|
-
className: "ml-2 grid grid-cols-[auto,1fr] gap-2",
|
|
17
|
-
children: [/* @__PURE__ */ jsxs("span", {
|
|
18
|
-
className: "text-neutral text-sm",
|
|
19
|
-
children: [subSection, " "]
|
|
20
|
-
}), /* @__PURE__ */ jsx(StringWrapper, {
|
|
21
|
-
...props,
|
|
22
|
-
keyPath: newKeyPath,
|
|
23
|
-
section: content,
|
|
24
|
-
editedContentValue: editedContentValue?.content,
|
|
25
|
-
onContentChange: (content) => {
|
|
26
|
-
addEditedContent(props.dictionary.localId, {
|
|
27
|
-
...section,
|
|
28
|
-
content: content.newValue
|
|
29
|
-
}, keyPath);
|
|
30
|
-
}
|
|
31
|
-
})]
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
//#endregion
|
|
36
|
-
export { FileWrapper };
|
|
1
|
+
import{StringWrapper as e}from"./StringWrapper.mjs";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{useEditedContent as r}from"@intlayer/editor-react";import{getContentNodeByKeyPath as i}from"@intlayer/core/dictionaryManipulator";import{NodeType as a}from"@intlayer/types";const o=o=>{let{keyPath:s,section:c}=o,{addEditedContent:l}=r(),u=i(o.editedContent,s),d=c[a.File],{content:f}=c,p=[...s,{type:a.File}];return n(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:[n(`span`,{className:`text-neutral text-sm`,children:[d,` `]}),t(e,{...o,keyPath:p,section:f,editedContentValue:u?.content,onContentChange:e=>{l(o.dictionary.localId,{...c,content:e.newValue},s)}})]})};export{o as FileWrapper};
|
|
37
2
|
//# sourceMappingURL=FileWrapper.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileWrapper.mjs","names":[],"sources":["../../../../../src/components/DictionaryEditor/NodeWrapper/FileWrapper.tsx"],"sourcesContent":["import { type FileContent
|
|
1
|
+
{"version":3,"file":"FileWrapper.mjs","names":[],"sources":["../../../../../src/components/DictionaryEditor/NodeWrapper/FileWrapper.tsx"],"sourcesContent":["import { getContentNodeByKeyPath } from '@intlayer/core/dictionaryManipulator';\nimport type { FileContent } from '@intlayer/core/transpiler';\nimport { useEditedContent } from '@intlayer/editor-react';\nimport {\n type KeyPath,\n type LocalDictionaryId,\n NodeType,\n} from '@intlayer/types';\nimport type { FC } from 'react';\nimport { StringWrapper, type StringWrapperProps } from './StringWrapper';\n\ntype FileWrapperProps = Omit<StringWrapperProps, 'section'> & {\n section: FileContent;\n};\n\nexport const FileWrapper: FC<FileWrapperProps> = (props) => {\n const { keyPath, section } = props;\n const { addEditedContent } = useEditedContent();\n const editedContentValue = getContentNodeByKeyPath(\n props.editedContent,\n keyPath\n ) as FileContent | undefined;\n\n const subSection = section[NodeType.File];\n const { content } = section;\n\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.File,\n },\n ];\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n <span className=\"text-neutral text-sm\">{subSection} </span>\n <StringWrapper\n {...props}\n keyPath={newKeyPath}\n section={content}\n editedContentValue={editedContentValue?.content}\n onContentChange={(content) => {\n addEditedContent(\n props.dictionary.localId as LocalDictionaryId,\n {\n ...section,\n content: content.newValue,\n } as FileContent,\n keyPath\n );\n }}\n />\n </div>\n );\n};\n"],"mappings":"0RAeA,MAAa,EAAqC,GAAU,CAC1D,GAAM,CAAE,UAAS,WAAY,EACvB,CAAE,oBAAqB,GAAkB,CACzC,EAAqB,EACzB,EAAM,cACN,EACD,CAEK,EAAa,EAAQ,EAAS,MAC9B,CAAE,WAAY,EAEd,EAAwB,CAC5B,GAAG,EACH,CACE,KAAM,EAAS,KAChB,CACF,CAED,OACE,EAAC,MAAA,CAAI,UAAU,iDACb,EAAC,OAAA,CAAK,UAAU,iCAAwB,EAAW,IAAA,EAAQ,CAC3D,EAAC,EAAA,CACC,GAAI,EACJ,QAAS,EACT,QAAS,EACT,mBAAoB,GAAoB,QACxC,gBAAkB,GAAY,CAC5B,EACE,EAAM,WAAW,QACjB,CACE,GAAG,EACH,QAAS,EAAQ,SAClB,CACD,EACD,GAEH,CAAA,EACE"}
|
|
@@ -1,22 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { NodeType } from "@intlayer/types";
|
|
4
|
-
|
|
5
|
-
//#region src/components/DictionaryEditor/NodeWrapper/HtmlWrapper.tsx
|
|
6
|
-
const HtmlWrapper = (props) => {
|
|
7
|
-
const { keyPath, section } = props;
|
|
8
|
-
const newKeyPath = [...keyPath, { type: NodeType.HTML }];
|
|
9
|
-
const subSection = section[NodeType.HTML];
|
|
10
|
-
return /* @__PURE__ */ jsx("div", {
|
|
11
|
-
className: "ml-2 grid grid-cols-[auto,1fr] gap-2",
|
|
12
|
-
children: /* @__PURE__ */ jsx(NodeWrapper, {
|
|
13
|
-
...props,
|
|
14
|
-
keyPath: newKeyPath,
|
|
15
|
-
section: subSection
|
|
16
|
-
})
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
//#endregion
|
|
21
|
-
export { HtmlWrapper };
|
|
1
|
+
import{NodeWrapper as e}from"./index.mjs";import{jsx as t}from"react/jsx-runtime";import{NodeType as n}from"@intlayer/types";const r=r=>{let{keyPath:i,section:a}=r,o=[...i,{type:n.HTML}],s=a[n.HTML];return t(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:t(e,{...r,keyPath:o,section:s})})};export{r as HtmlWrapper};
|
|
22
2
|
//# sourceMappingURL=HtmlWrapper.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HtmlWrapper.mjs","names":[],"sources":["../../../../../src/components/DictionaryEditor/NodeWrapper/HtmlWrapper.tsx"],"sourcesContent":["import type { HTMLContent } from '@intlayer/core';\nimport { type ContentNode, type KeyPath, NodeType } from '@intlayer/types';\nimport type { FC } from 'react';\nimport { NodeWrapper, type NodeWrapperProps } from './index';\n\ntype HtmlWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: HTMLContent<ContentNode>;\n};\n\nexport const HtmlWrapper: FC<HtmlWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.HTML,\n },\n ];\n\n const subSection = section[NodeType.HTML] as ContentNode;\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n <NodeWrapper {...props} keyPath={newKeyPath} section={subSection} />\n </div>\n );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"HtmlWrapper.mjs","names":[],"sources":["../../../../../src/components/DictionaryEditor/NodeWrapper/HtmlWrapper.tsx"],"sourcesContent":["import type { HTMLContent } from '@intlayer/core/transpiler';\nimport { type ContentNode, type KeyPath, NodeType } from '@intlayer/types';\nimport type { FC } from 'react';\nimport { NodeWrapper, type NodeWrapperProps } from './index';\n\ntype HtmlWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: HTMLContent<ContentNode>;\n};\n\nexport const HtmlWrapper: FC<HtmlWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.HTML,\n },\n ];\n\n const subSection = section[NodeType.HTML] as ContentNode;\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n <NodeWrapper {...props} keyPath={newKeyPath} section={subSection} />\n </div>\n );\n};\n"],"mappings":"6HASA,MAAa,EAAqC,GAAU,CAC1D,GAAM,CAAE,UAAS,WAAY,EAEvB,EAAwB,CAC5B,GAAG,EACH,CACE,KAAM,EAAS,KAChB,CACF,CAEK,EAAa,EAAQ,EAAS,MAEpC,OACE,EAAC,MAAA,CAAI,UAAU,gDACb,EAAC,EAAA,CAAY,GAAI,EAAO,QAAS,EAAY,QAAS,GAAc,EAChE"}
|
|
@@ -1,22 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { NodeType } from "@intlayer/types";
|
|
4
|
-
|
|
5
|
-
//#region src/components/DictionaryEditor/NodeWrapper/InsertionWrapper.tsx
|
|
6
|
-
const InsertionWrapper = (props) => {
|
|
7
|
-
const { keyPath, section } = props;
|
|
8
|
-
const newKeyPath = [...keyPath, { type: NodeType.Insertion }];
|
|
9
|
-
const subSection = section[NodeType.Insertion];
|
|
10
|
-
return /* @__PURE__ */ jsx("div", {
|
|
11
|
-
className: "ml-2 grid grid-cols-[auto,1fr] gap-2",
|
|
12
|
-
children: /* @__PURE__ */ jsx(NodeWrapper, {
|
|
13
|
-
...props,
|
|
14
|
-
keyPath: newKeyPath,
|
|
15
|
-
section: subSection
|
|
16
|
-
})
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
//#endregion
|
|
21
|
-
export { InsertionWrapper };
|
|
1
|
+
import{NodeWrapper as e}from"./index.mjs";import{jsx as t}from"react/jsx-runtime";import{NodeType as n}from"@intlayer/types";const r=r=>{let{keyPath:i,section:a}=r,o=[...i,{type:n.Insertion}],s=a[n.Insertion];return t(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:t(e,{...r,keyPath:o,section:s})})};export{r as InsertionWrapper};
|
|
22
2
|
//# sourceMappingURL=InsertionWrapper.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsertionWrapper.mjs","names":[],"sources":["../../../../../src/components/DictionaryEditor/NodeWrapper/InsertionWrapper.tsx"],"sourcesContent":["import type { InsertionContent } from '@intlayer/core';\nimport { type ContentNode, type KeyPath, NodeType } from '@intlayer/types';\nimport type { FC } from 'react';\nimport { NodeWrapper, type NodeWrapperProps } from './index';\n\ntype InsertionWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: InsertionContent<ContentNode>;\n};\n\nexport const InsertionWrapper: FC<InsertionWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.Insertion,\n },\n ];\n\n const subSection = section[NodeType.Insertion];\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n <NodeWrapper {...props} keyPath={newKeyPath} section={subSection} />\n </div>\n );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"InsertionWrapper.mjs","names":[],"sources":["../../../../../src/components/DictionaryEditor/NodeWrapper/InsertionWrapper.tsx"],"sourcesContent":["import type { InsertionContent } from '@intlayer/core/transpiler';\nimport { type ContentNode, type KeyPath, NodeType } from '@intlayer/types';\nimport type { FC } from 'react';\nimport { NodeWrapper, type NodeWrapperProps } from './index';\n\ntype InsertionWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: InsertionContent<ContentNode>;\n};\n\nexport const InsertionWrapper: FC<InsertionWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.Insertion,\n },\n ];\n\n const subSection = section[NodeType.Insertion];\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n <NodeWrapper {...props} keyPath={newKeyPath} section={subSection} />\n </div>\n );\n};\n"],"mappings":"6HASA,MAAa,EAA+C,GAAU,CACpE,GAAM,CAAE,UAAS,WAAY,EAEvB,EAAwB,CAC5B,GAAG,EACH,CACE,KAAM,EAAS,UAChB,CACF,CAEK,EAAa,EAAQ,EAAS,WAEpC,OACE,EAAC,MAAA,CAAI,UAAU,gDACb,EAAC,EAAA,CAAY,GAAI,EAAO,QAAS,EAAY,QAAS,GAAc,EAChE"}
|
|
@@ -1,22 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { NodeType } from "@intlayer/types";
|
|
4
|
-
|
|
5
|
-
//#region src/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.tsx
|
|
6
|
-
const MarkdownWrapper = (props) => {
|
|
7
|
-
const { keyPath, section } = props;
|
|
8
|
-
const newKeyPath = [...keyPath, { type: NodeType.Markdown }];
|
|
9
|
-
const subSection = section[NodeType.Markdown];
|
|
10
|
-
return /* @__PURE__ */ jsx("div", {
|
|
11
|
-
className: "ml-2 grid grid-cols-[auto,1fr] gap-2",
|
|
12
|
-
children: /* @__PURE__ */ jsx(NodeWrapper, {
|
|
13
|
-
...props,
|
|
14
|
-
keyPath: newKeyPath,
|
|
15
|
-
section: subSection
|
|
16
|
-
})
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
//#endregion
|
|
21
|
-
export { MarkdownWrapper };
|
|
1
|
+
import{NodeWrapper as e}from"./index.mjs";import{jsx as t}from"react/jsx-runtime";import{NodeType as n}from"@intlayer/types";const r=r=>{let{keyPath:i,section:a}=r,o=[...i,{type:n.Markdown}],s=a[n.Markdown];return t(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:t(e,{...r,keyPath:o,section:s})})};export{r as MarkdownWrapper};
|
|
22
2
|
//# sourceMappingURL=MarkdownWrapper.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownWrapper.mjs","names":[],"sources":["../../../../../src/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.tsx"],"sourcesContent":["import type { MarkdownContent } from '@intlayer/core';\nimport { type ContentNode, type KeyPath, NodeType } from '@intlayer/types';\nimport type { FC } from 'react';\nimport { NodeWrapper, type NodeWrapperProps } from './index';\n\ntype MarkdownWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: MarkdownContent<ContentNode>;\n};\n\nexport const MarkdownWrapper: FC<MarkdownWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.Markdown,\n },\n ];\n\n const subSection = section[NodeType.Markdown] as ContentNode;\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n <NodeWrapper {...props} keyPath={newKeyPath} section={subSection} />\n </div>\n );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"MarkdownWrapper.mjs","names":[],"sources":["../../../../../src/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.tsx"],"sourcesContent":["import type { MarkdownContent } from '@intlayer/core/transpiler';\nimport { type ContentNode, type KeyPath, NodeType } from '@intlayer/types';\nimport type { FC } from 'react';\nimport { NodeWrapper, type NodeWrapperProps } from './index';\n\ntype MarkdownWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: MarkdownContent<ContentNode>;\n};\n\nexport const MarkdownWrapper: FC<MarkdownWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.Markdown,\n },\n ];\n\n const subSection = section[NodeType.Markdown] as ContentNode;\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n <NodeWrapper {...props} keyPath={newKeyPath} section={subSection} />\n </div>\n );\n};\n"],"mappings":"6HASA,MAAa,EAA6C,GAAU,CAClE,GAAM,CAAE,UAAS,WAAY,EAEvB,EAAwB,CAC5B,GAAG,EACH,CACE,KAAM,EAAS,SAChB,CACF,CAEK,EAAa,EAAQ,EAAS,UAEpC,OACE,EAAC,MAAA,CAAI,UAAU,gDACb,EAAC,EAAA,CAAY,GAAI,EAAO,QAAS,EAAY,QAAS,GAAc,EAChE"}
|
|
@@ -1,40 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { NodeWrapper, traceKeys } from "./index.mjs";
|
|
3
|
-
import { memo, useMemo } from "react";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import { isSameKeyPath } from "@intlayer/core";
|
|
6
|
-
import { NodeType } from "@intlayer/types";
|
|
7
|
-
import { camelCaseToSentence } from "@intlayer/config/client";
|
|
8
|
-
|
|
9
|
-
//#region src/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.tsx
|
|
10
|
-
const NestedObjectWrapper = memo((props) => {
|
|
11
|
-
const { keyPath, section, focusedKeyPath = [], onFocusKeyPath } = props;
|
|
12
|
-
return useMemo(() => Object.keys(section ?? {}).filter((key) => !traceKeys.includes(key)), [section]).map((key) => {
|
|
13
|
-
const newKeyPathEl = {
|
|
14
|
-
key,
|
|
15
|
-
type: NodeType.Object
|
|
16
|
-
};
|
|
17
|
-
const newKeyPath = [...keyPath, newKeyPathEl];
|
|
18
|
-
const isSelected = isSameKeyPath(newKeyPath, focusedKeyPath);
|
|
19
|
-
return /* @__PURE__ */ jsx(ItemLayout, {
|
|
20
|
-
level: keyPath.length,
|
|
21
|
-
title: camelCaseToSentence(key),
|
|
22
|
-
description: "",
|
|
23
|
-
isSelected,
|
|
24
|
-
onClick: (e) => {
|
|
25
|
-
e.stopPropagation();
|
|
26
|
-
if (isSelected) onFocusKeyPath([]);
|
|
27
|
-
else onFocusKeyPath(newKeyPath);
|
|
28
|
-
},
|
|
29
|
-
children: /* @__PURE__ */ jsx(NodeWrapper, {
|
|
30
|
-
...props,
|
|
31
|
-
keyPath: newKeyPath,
|
|
32
|
-
section: section[key]
|
|
33
|
-
})
|
|
34
|
-
}, key);
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
//#endregion
|
|
39
|
-
export { NestedObjectWrapper };
|
|
1
|
+
import{ItemLayout as e}from"../ItemLayout.mjs";import{NodeWrapper as t,traceKeys as n}from"./index.mjs";import{memo as r,useMemo as i}from"react";import{jsx as a}from"react/jsx-runtime";import{NodeType as o}from"@intlayer/types";import{isSameKeyPath as s}from"@intlayer/core/utils";import{camelCaseToSentence as c}from"@intlayer/config/client";const l=r(r=>{let{keyPath:l,section:u,focusedKeyPath:d=[],onFocusKeyPath:f}=r;return i(()=>Object.keys(u??{}).filter(e=>!n.includes(e)),[u]).map(n=>{let i={key:n,type:o.Object},p=[...l,i],m=s(p,d);return a(e,{level:l.length,title:c(n),description:``,isSelected:m,onClick:e=>{e.stopPropagation(),f(m?[]:p)},children:a(t,{...r,keyPath:p,section:u[n]})},n)})});export{l as NestedObjectWrapper};
|
|
40
2
|
//# sourceMappingURL=NestedObjectWrapper.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestedObjectWrapper.mjs","names":[],"sources":["../../../../../src/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.tsx"],"sourcesContent":["import { camelCaseToSentence } from '@intlayer/config/client';\nimport { isSameKeyPath } from '@intlayer/core';\nimport { type ContentNode, type KeyPath, NodeType } from '@intlayer/types';\nimport { type FC, memo, useMemo } from 'react';\nimport { ItemLayout } from '../ItemLayout';\nimport { NodeWrapper, type NodeWrapperProps, traceKeys } from './index';\n\ntype NestedObjectWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: Record<string, ContentNode>;\n};\n\nexport const NestedObjectWrapper: FC<NestedObjectWrapperProps> = memo(\n (props) => {\n const { keyPath, section, focusedKeyPath = [], onFocusKeyPath } = props;\n\n const sectionKeys = useMemo(\n () =>\n Object.keys(section ?? {}).filter((key) => !traceKeys.includes(key)),\n [section]\n );\n\n return sectionKeys.map((key) => {\n const newKeyPathEl: KeyPath = { key, type: NodeType.Object };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n const isSelected = isSameKeyPath(newKeyPath, focusedKeyPath);\n\n return (\n <ItemLayout\n level={keyPath.length}\n key={key}\n title={camelCaseToSentence(key)}\n description=\"\"\n isSelected={isSelected}\n onClick={(e) => {\n e.stopPropagation();\n\n if (isSelected) {\n onFocusKeyPath([]);\n } else {\n onFocusKeyPath(newKeyPath);\n }\n }}\n >\n <NodeWrapper {...props} keyPath={newKeyPath} section={section[key]} />\n </ItemLayout>\n );\n });\n }\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"NestedObjectWrapper.mjs","names":[],"sources":["../../../../../src/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.tsx"],"sourcesContent":["import { camelCaseToSentence } from '@intlayer/config/client';\nimport { isSameKeyPath } from '@intlayer/core/utils';\nimport { type ContentNode, type KeyPath, NodeType } from '@intlayer/types';\nimport { type FC, memo, useMemo } from 'react';\nimport { ItemLayout } from '../ItemLayout';\nimport { NodeWrapper, type NodeWrapperProps, traceKeys } from './index';\n\ntype NestedObjectWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: Record<string, ContentNode>;\n};\n\nexport const NestedObjectWrapper: FC<NestedObjectWrapperProps> = memo(\n (props) => {\n const { keyPath, section, focusedKeyPath = [], onFocusKeyPath } = props;\n\n const sectionKeys = useMemo(\n () =>\n Object.keys(section ?? {}).filter((key) => !traceKeys.includes(key)),\n [section]\n );\n\n return sectionKeys.map((key) => {\n const newKeyPathEl: KeyPath = { key, type: NodeType.Object };\n const newKeyPath: KeyPath[] = [...keyPath, newKeyPathEl];\n\n const isSelected = isSameKeyPath(newKeyPath, focusedKeyPath);\n\n return (\n <ItemLayout\n level={keyPath.length}\n key={key}\n title={camelCaseToSentence(key)}\n description=\"\"\n isSelected={isSelected}\n onClick={(e) => {\n e.stopPropagation();\n\n if (isSelected) {\n onFocusKeyPath([]);\n } else {\n onFocusKeyPath(newKeyPath);\n }\n }}\n >\n <NodeWrapper {...props} keyPath={newKeyPath} section={section[key]} />\n </ItemLayout>\n );\n });\n }\n);\n"],"mappings":"wVAWA,MAAa,EAAoD,EAC9D,GAAU,CACT,GAAM,CAAE,UAAS,UAAS,iBAAiB,EAAE,CAAE,kBAAmB,EAQlE,OANoB,MAEhB,OAAO,KAAK,GAAW,EAAE,CAAC,CAAC,OAAQ,GAAQ,CAAC,EAAU,SAAS,EAAI,CAAC,CACtE,CAAC,EAAQ,CACV,CAEkB,IAAK,GAAQ,CAC9B,IAAM,EAAwB,CAAE,MAAK,KAAM,EAAS,OAAQ,CACtD,EAAwB,CAAC,GAAG,EAAS,EAAa,CAElD,EAAa,EAAc,EAAY,EAAe,CAE5D,OACE,EAAC,EAAA,CACC,MAAO,EAAQ,OAEf,MAAO,EAAoB,EAAI,CAC/B,YAAY,GACA,aACZ,QAAU,GAAM,CACd,EAAE,iBAAiB,CAGjB,EADE,EACa,EAAE,CAEF,EAAW,WAI9B,EAAC,EAAA,CAAY,GAAI,EAAO,QAAS,EAAY,QAAS,EAAQ,IAAQ,EAdjE,EAeM,EAEf,EAEL"}
|
|
@@ -1,36 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { EditableFieldTextArea } from "../../EditableField/EditableFieldTextArea.mjs";
|
|
3
|
-
import { Fragment, jsx } from "react/jsx-runtime";
|
|
4
|
-
import { getContentNodeByKeyPath } from "@intlayer/core";
|
|
5
|
-
import { useEditorLocale } from "@intlayer/editor-react";
|
|
6
|
-
|
|
7
|
-
//#region src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx
|
|
8
|
-
const StringWrapper = ({ keyPath, section, editedContent, editedContentValue: editedContentValueProp, onContentChange, onFocusKeyPath, renderSection }) => {
|
|
9
|
-
const currentLocale = useEditorLocale();
|
|
10
|
-
const editedContentValue = editedContentValueProp ?? getContentNodeByKeyPath(editedContent, keyPath, currentLocale);
|
|
11
|
-
if (editedContentValue && typeof editedContentValue !== "string") return /* @__PURE__ */ jsx(Fragment, { children: "Error loading section - Edited content Incoherence with the original content format" });
|
|
12
|
-
const level = keyPath.length;
|
|
13
|
-
const content = String(editedContentValue ?? section);
|
|
14
|
-
return /* @__PURE__ */ jsx("span", {
|
|
15
|
-
role: "button",
|
|
16
|
-
tabIndex: 0,
|
|
17
|
-
className: cn("w-full rounded-md p-2 text-left transition", "hover:bg-card/30 [&:has(.section:hover)]:bg-transparent", level === 2 && "hover:bg-card/30", level >= 3 && ""),
|
|
18
|
-
onClick: (e) => {
|
|
19
|
-
e.stopPropagation();
|
|
20
|
-
onFocusKeyPath(keyPath);
|
|
21
|
-
},
|
|
22
|
-
children: typeof renderSection === "function" ? renderSection(content) : /* @__PURE__ */ jsx(EditableFieldTextArea, {
|
|
23
|
-
"aria-label": "Editable field",
|
|
24
|
-
defaultValue: content,
|
|
25
|
-
onSave: (newValue) => onContentChange({
|
|
26
|
-
keyPath,
|
|
27
|
-
newValue
|
|
28
|
-
}),
|
|
29
|
-
onCancel: () => null
|
|
30
|
-
})
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
//#endregion
|
|
35
|
-
export { StringWrapper };
|
|
1
|
+
import{cn as e}from"../../../utils/cn.mjs";import{EditableFieldTextArea as t}from"../../EditableField/EditableFieldTextArea.mjs";import{Fragment as n,jsx as r}from"react/jsx-runtime";import{useEditorLocale as i}from"@intlayer/editor-react";import{getContentNodeByKeyPath as a}from"@intlayer/core/dictionaryManipulator";const o=({keyPath:o,section:s,editedContent:c,editedContentValue:l,onContentChange:u,onFocusKeyPath:d,renderSection:f})=>{let p=i(),m=l??a(c,o,p);if(m&&typeof m!=`string`)return r(n,{children:`Error loading section - Edited content Incoherence with the original content format`});let h=o.length,g=String(m??s);return r(`button`,{type:`button`,className:e(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,h===2&&`hover:bg-card/30`,h>=3&&``),onClick:e=>{e.stopPropagation(),d(o)},children:typeof f==`function`?f(g):r(t,{"aria-label":`Editable field`,defaultValue:g,onSave:e=>u({keyPath:o,newValue:e}),onCancel:()=>null})})};export{o as StringWrapper};
|
|
36
2
|
//# sourceMappingURL=StringWrapper.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StringWrapper.mjs","names":[],"sources":["../../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"sourcesContent":["import { EditableFieldTextArea } from '@components/EditableField';\nimport { getContentNodeByKeyPath } from '@intlayer/core';\nimport { useEditorLocale } from '@intlayer/editor-react';\nimport { cn } from '@utils/cn';\nimport type { FC } from 'react';\nimport type { NodeWrapperProps } from './index';\n\nexport type StringWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: string;\n editedContentValue?: string;\n};\n\nexport const StringWrapper: FC<StringWrapperProps> = ({\n keyPath,\n section,\n editedContent,\n editedContentValue: editedContentValueProp,\n onContentChange,\n onFocusKeyPath,\n renderSection,\n}) => {\n const currentLocale = useEditorLocale();\n const editedContentValue =\n editedContentValueProp ??\n getContentNodeByKeyPath(editedContent, keyPath, currentLocale);\n\n if (editedContentValue && typeof editedContentValue !== 'string') {\n return (\n <>\n Error loading section - Edited content Incoherence with the original\n content format\n </>\n );\n }\n\n const level = keyPath.length;\n\n const content = String(editedContentValue ?? section);\n\n return (\n <
|
|
1
|
+
{"version":3,"file":"StringWrapper.mjs","names":[],"sources":["../../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"sourcesContent":["import { EditableFieldTextArea } from '@components/EditableField';\nimport { getContentNodeByKeyPath } from '@intlayer/core/dictionaryManipulator';\nimport { useEditorLocale } from '@intlayer/editor-react';\nimport { cn } from '@utils/cn';\nimport type { FC } from 'react';\nimport type { NodeWrapperProps } from './index';\n\nexport type StringWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: string;\n editedContentValue?: string;\n};\n\nexport const StringWrapper: FC<StringWrapperProps> = ({\n keyPath,\n section,\n editedContent,\n editedContentValue: editedContentValueProp,\n onContentChange,\n onFocusKeyPath,\n renderSection,\n}) => {\n const currentLocale = useEditorLocale();\n const editedContentValue =\n editedContentValueProp ??\n getContentNodeByKeyPath(editedContent, keyPath, currentLocale);\n\n if (editedContentValue && typeof editedContentValue !== 'string') {\n return (\n <>\n Error loading section - Edited content Incoherence with the original\n content format\n </>\n );\n }\n\n const level = keyPath.length;\n\n const content = String(editedContentValue ?? section);\n\n return (\n <button\n type=\"button\"\n className={cn(\n 'w-full rounded-md p-2 text-left transition',\n 'hover:bg-card/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30',\n level >= 3 && ''\n )}\n onClick={(e) => {\n e.stopPropagation();\n onFocusKeyPath(keyPath);\n }}\n >\n {typeof renderSection === 'function' ? (\n renderSection(content)\n ) : (\n <EditableFieldTextArea\n aria-label=\"Editable field\"\n defaultValue={content}\n onSave={(newValue) => onContentChange({ keyPath, newValue })}\n onCancel={() => null}\n />\n )}\n </button>\n );\n};\n"],"mappings":"+TAYA,MAAa,GAAyC,CACpD,UACA,UACA,gBACA,mBAAoB,EACpB,kBACA,iBACA,mBACI,CACJ,IAAM,EAAgB,GAAiB,CACjC,EACJ,GACA,EAAwB,EAAe,EAAS,EAAc,CAEhE,GAAI,GAAsB,OAAO,GAAuB,SACtD,OACE,EAAA,EAAA,CAAA,SAAE,sFAAA,CAGC,CAIP,IAAM,EAAQ,EAAQ,OAEhB,EAAU,OAAO,GAAsB,EAAQ,CAErD,OACE,EAAC,SAAA,CACC,KAAK,SACL,UAAW,EACT,6CACA,0DACA,IAAU,GAAK,mBACf,GAAS,GAAK,GACf,CACD,QAAU,GAAM,CACd,EAAE,iBAAiB,CACnB,EAAe,EAAQ,WAGxB,OAAO,GAAkB,WACxB,EAAc,EAAQ,CAEtB,EAAC,EAAA,CACC,aAAW,iBACX,aAAc,EACd,OAAS,GAAa,EAAgB,CAAE,UAAS,WAAU,CAAC,CAC5D,aAAgB,MAChB,EAEG"}
|