one
Version:
One is a React framework for web, iOS, and Android apps.
1 lines • 2.44 kB
Source Map (JSON)
{"version":3,"file":"ArrangementView.js","names":[],"sources":["esm/platform/ArrangementView.js"],"sourcesContent":["import { Children, isValidElement } from \"react\";\nimport { DomView } from \"./web/DomView\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nfunction ArrangementPrimary(_props) {\n throw new Error(\"Swift.ArrangementView.Primary must be a direct child of Swift.ArrangementView\");\n}\nfunction ArrangementSecondary(_props) {\n throw new Error(\"Swift.ArrangementView.Secondary must be a direct child of Swift.ArrangementView\");\n}\nfunction ArrangementViewComponent({\n children,\n primary,\n secondary,\n leading,\n detail,\n style,\n testID\n}) {\n let primaryNode = primary ?? leading;\n let secondaryNode = secondary ?? detail;\n Children.forEach(children, (child) => {\n if (!isValidElement(child)) return;\n if (child.type === ArrangementPrimary) {\n primaryNode = child.props.children;\n } else if (child.type === ArrangementSecondary) {\n secondaryNode = child.props.children;\n }\n });\n return /* @__PURE__ */ jsxs(DomView, { testID, baseStyle: { flex: 1, flexDirection: \"row\" }, style, children: [\n /* @__PURE__ */ jsx(DomView, { baseStyle: { flex: 1 }, children: primaryNode }),\n /* @__PURE__ */ jsx(DomView, { baseStyle: { flex: 1 }, children: secondaryNode })\n ] });\n}\nconst ArrangementView = Object.assign(ArrangementViewComponent, {\n Primary: ArrangementPrimary,\n Secondary: ArrangementSecondary,\n Leading: ArrangementPrimary,\n Detail: ArrangementSecondary\n});\nexport {\n ArrangementPrimary,\n ArrangementSecondary,\n ArrangementView,\n ArrangementViewComponent\n};\n//# sourceMappingURL=ArrangementView.js.map\n"],"mappings":";;;;;AAGA,SAAS,mBAAmB,QAAQ;CAClC,MAAM,IAAI,MAAM,+EAA+E;AACjG;AACA,SAAS,qBAAqB,QAAQ;CACpC,MAAM,IAAI,MAAM,iFAAiF;AACnG;AACA,SAAS,yBAAyB,EAChC,UACA,SACA,WACA,SACA,QACA,OACA,UACC;CACD,IAAI,cAAc,WAAW;CAC7B,IAAI,gBAAgB,aAAa;CACjC,SAAS,QAAQ,WAAW,UAAU;EACpC,IAAI,CAAC,eAAe,KAAK,GAAG;EAC5B,IAAI,MAAM,SAAS,oBAAoB;GACrC,cAAc,MAAM,MAAM;EAC5B,OAAO,IAAI,MAAM,SAAS,sBAAsB;GAC9C,gBAAgB,MAAM,MAAM;EAC9B;CACF,CAAC;CACD,OAAuB,qBAAK,SAAS;EAAE;EAAQ,WAAW;GAAE,MAAM;GAAG,eAAe;EAAM;EAAG;EAAO,UAAU,CAC5F,oBAAI,SAAS;GAAE,WAAW,EAAE,MAAM,EAAE;GAAG,UAAU;EAAY,CAAC,GAC9D,oBAAI,SAAS;GAAE,WAAW,EAAE,MAAM,EAAE;GAAG,UAAU;EAAc,CAAC,CAClF;CAAE,CAAC;AACL;AACA,MAAM,kBAAkB,OAAO,OAAO,0BAA0B;CAC9D,SAAS;CACT,WAAW;CACX,SAAS;CACT,QAAQ;AACV,CAAC"}