@copilotkit/a2ui-renderer
Version:
A2UI Renderer for CopilotKit - render A2UI surfaces in React applications
1 lines • 1.4 kB
Source Map (JSON)
{"version":3,"file":"list.cjs","names":["createLitComponent","ListApi","mapAlign","renderChildList"],"sources":["../../../../src/web-components/catalog/basic/list.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { styleMap } from \"lit/directives/style-map.js\";\nimport { ListApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { createLitComponent } from \"../../adapter\";\nimport { renderChildList } from \"../children\";\nimport { mapAlign } from \"./utils\";\n\nexport const List = createLitComponent(ListApi, ({ props, buildChild }) => {\n const isHorizontal = props.direction === \"horizontal\";\n return html`\n <div\n style=${styleMap({\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 ${renderChildList(props.children, buildChild)}\n </div>\n `;\n});\n"],"mappings":";;;;;;;;AAOA,MAAa,OAAOA,mCAAmBC,4CAAU,EAAE,OAAO,iBAAiB;CACzE,MAAM,eAAe,MAAM,cAAc;AACzC,QAAO,QAAI;;wDAEU;EACf,SAAS;EACT,eAAe,eAAe,QAAQ;EACtC,YAAYC,uBAAS,MAAM,MAAM;EACjC,WAAW,eAAe,SAAS;EACnC,WAAW,eAAe,WAAW;EACrC,OAAO;EACP,QAAQ;EACR,SAAS;EACV,CAAC,CAAC;;QAEDC,iCAAgB,MAAM,UAAU,WAAW,CAAC;;;EAGlD"}