@copilotkit/a2ui-renderer
Version:
A2UI Renderer for CopilotKit - render A2UI surfaces in React applications
1 lines • 2.12 kB
Source Map (JSON)
{"version":3,"file":"List.cjs","names":["createReactComponent","ListApi","mapAlign","ChildList"],"sources":["../../../../../../src/react-renderer/a2ui-react/catalog/basic/components/List.tsx"],"sourcesContent":["/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport { createReactComponent } from \"../../../adapter\";\nimport { ListApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { ChildList } from \"./ChildList\";\nimport { mapAlign } from \"../utils\";\n\nexport const List = createReactComponent(\n ListApi,\n ({ props, buildChild, context }) => {\n const isHorizontal = props.direction === \"horizontal\";\n const style: React.CSSProperties = {\n display: \"flex\",\n flexDirection: isHorizontal ? \"row\" : \"column\",\n alignItems: mapAlign(props.align),\n overflowX: isHorizontal ? \"auto\" : \"hidden\",\n overflowY: isHorizontal ? \"hidden\" : \"auto\",\n width: \"100%\",\n margin: 0,\n padding: 0,\n };\n\n return (\n <div style={style}>\n <ChildList\n childList={props.children}\n buildChild={buildChild}\n context={context}\n />\n </div>\n );\n },\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAa,OAAOA,qCAClBC,4CACC,EAAE,OAAO,YAAY,cAAc;CAClC,MAAM,eAAe,MAAM,cAAc;AAYzC,QACE,2CAAC;EAAI,OAZ4B;GACjC,SAAS;GACT,eAAe,eAAe,QAAQ;GACtC,YAAYC,uBAAS,MAAM,MAAM;GACjC,WAAW,eAAe,SAAS;GACnC,WAAW,eAAe,WAAW;GACrC,OAAO;GACP,QAAQ;GACR,SAAS;GACV;YAIG,2CAACC;GACC,WAAW,MAAM;GACL;GACH;IACT;GACE;EAGX"}